multichain-address-validator 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ npm install multichain-address-validator
|
|
|
33
33
|
* Cardano: `cardano`, `ada`
|
|
34
34
|
* Dogecoin: `dogecoin`, `doge`
|
|
35
35
|
* EOS: `eos`
|
|
36
|
-
* Etherum: `ethereum`, `eth`, `erc20`, `flare`, `avalanche`, `avalanche-c`, `bsc`, `bnb`, `binance`
|
|
36
|
+
* Etherum: `ethereum`, `eth`, `erc20`, `flare`, `avalanche`, `avalanche-c`, `bsc`, `bnb`, `binance`, `sonic`, `berachain`, `story`
|
|
37
37
|
* Litecoin: `litecoin`, `ltc`
|
|
38
38
|
* Monero: `monero`
|
|
39
39
|
* Nano: `nano`
|
package/dist/chain-validators.js
CHANGED
|
@@ -49,6 +49,7 @@ const chainValidators = {
|
|
|
49
49
|
'avalanche',
|
|
50
50
|
'avalanche-c',
|
|
51
51
|
'base',
|
|
52
|
+
'berachain',
|
|
52
53
|
'binance',
|
|
53
54
|
'BinanceSmartChain',
|
|
54
55
|
'bnb',
|
|
@@ -59,6 +60,7 @@ const chainValidators = {
|
|
|
59
60
|
'erc20',
|
|
60
61
|
'flare',
|
|
61
62
|
'sonic',
|
|
63
|
+
'story',
|
|
62
64
|
],
|
|
63
65
|
validator: ETHValidator
|
|
64
66
|
},
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var MCAV=(()=>{var Bx=Object.create;var te=Object.defineProperty;var vx=Object.getOwnPropertyDescriptor;var Ex=Object.getOwnPropertyNames;var Ix=Object.getPrototypeOf,Cx=Object.prototype.hasOwnProperty;var Ux=(e,t)=>()=>(e&&(t=e(e=0)),t);var L0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tx=(e,t)=>{for(var r in t)te(e,r,{get:t[r],enumerable:!0})},qt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let x of Ex(t))!Cx.call(e,x)&&x!==r&&te(e,x,{get:()=>t[x],enumerable:!(n=vx(t,x))||n.enumerable});return e};var a0=(e,t,r)=>(r=e!=null?Bx(Ix(e)):{},qt(t||!e||!e.__esModule?te(r,"default",{value:e,enumerable:!0}):r,e)),Lx=e=>qt(te({},"__esModule",{value:!0}),e);var Yt=L0(re=>{"use strict";s();re.byteLength=kx;re.toByteArray=Ox;re.fromByteArray=Vx;var e0=[],Y=[],Fx=typeof Uint8Array<"u"?Uint8Array:Array,ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(B0=0,Kt=ke.length;B0<Kt;++B0)e0[B0]=ke[B0],Y[ke.charCodeAt(B0)]=B0;var B0,Kt;Y[45]=62;Y[95]=63;function Jt(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function kx(e){var t=Jt(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Sx(e,t,r){return(t+r)*3/4-r}function Ox(e){var t,r=Jt(e),n=r[0],x=r[1],i=new Fx(Sx(e,n,x)),a=0,f=x>0?n-4:n,o;for(o=0;o<f;o+=4)t=Y[e.charCodeAt(o)]<<18|Y[e.charCodeAt(o+1)]<<12|Y[e.charCodeAt(o+2)]<<6|Y[e.charCodeAt(o+3)],i[a++]=t>>16&255,i[a++]=t>>8&255,i[a++]=t&255;return x===2&&(t=Y[e.charCodeAt(o)]<<2|Y[e.charCodeAt(o+1)]>>4,i[a++]=t&255),x===1&&(t=Y[e.charCodeAt(o)]<<10|Y[e.charCodeAt(o+1)]<<4|Y[e.charCodeAt(o+2)]>>2,i[a++]=t>>8&255,i[a++]=t&255),i}function Hx(e){return e0[e>>18&63]+e0[e>>12&63]+e0[e>>6&63]+e0[e&63]}function Rx(e,t,r){for(var n,x=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),x.push(Hx(n));return x.join("")}function Vx(e){for(var t,r=e.length,n=r%3,x=[],i=16383,a=0,f=r-n;a<f;a+=i)x.push(Rx(e,a,a+i>f?f:a+i));return n===1?(t=e[r-1],x.push(e0[t>>2]+e0[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],x.push(e0[t>>10]+e0[t>>4&63]+e0[t<<2&63]+"=")),x.join("")}});var Zt=L0(Se=>{s();Se.read=function(e,t,r,n,x){var i,a,f=x*8-n-1,o=(1<<f)-1,d=o>>1,h=-7,u=r?x-1:0,m=r?-1:1,p=e[t+u];for(u+=m,i=p&(1<<-h)-1,p>>=-h,h+=f;h>0;i=i*256+e[t+u],u+=m,h-=8);for(a=i&(1<<-h)-1,i>>=-h,h+=n;h>0;a=a*256+e[t+u],u+=m,h-=8);if(i===0)i=1-d;else{if(i===o)return a?NaN:(p?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-d}return(p?-1:1)*a*Math.pow(2,i-n)};Se.write=function(e,t,r,n,x,i){var a,f,o,d=i*8-x-1,h=(1<<d)-1,u=h>>1,m=x===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,v=n?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(f=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(o=Math.pow(2,-a))<1&&(a--,o*=2),a+u>=1?t+=m/o:t+=m*Math.pow(2,1-u),t*o>=2&&(a++,o/=2),a+u>=h?(f=0,a=h):a+u>=1?(f=(t*o-1)*Math.pow(2,x),a=a+u):(f=t*Math.pow(2,u-1)*Math.pow(2,x),a=0));x>=8;e[r+p]=f&255,p+=v,f/=256,x-=8);for(a=a<<x|f,d+=x;d>0;e[r+p]=a&255,p+=v,a/=256,d-=8);e[r+p-v]|=g*128}});var H0=L0(O0=>{"use strict";s();var Oe=Yt(),k0=Zt(),Qt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;O0.Buffer=l;O0.SlowBuffer=Gx;O0.INSPECT_MAX_BYTES=50;var ne=2147483647;O0.kMaxLength=ne;l.TYPED_ARRAY_SUPPORT=Mx();!l.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 Mx(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}});Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function f0(e){if(e>ne)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Me(e)}return nr(e,t,r)}l.poolSize=8192;function nr(e,t,r){if(typeof e=="string")return Nx(e,t);if(ArrayBuffer.isView(e))return $x(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(t0(e,ArrayBuffer)||e&&t0(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(t0(e,SharedArrayBuffer)||e&&t0(e.buffer,SharedArrayBuffer)))return Re(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return l.from(n,t,r);let x=Px(e);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}l.from=function(e,t,r){return nr(e,t,r)};Object.setPrototypeOf(l.prototype,Uint8Array.prototype);Object.setPrototypeOf(l,Uint8Array);function xr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Dx(e,t,r){return xr(e),e<=0?f0(e):t!==void 0?typeof r=="string"?f0(e).fill(t,r):f0(e).fill(t):f0(e)}l.alloc=function(e,t,r){return Dx(e,t,r)};function Me(e){return xr(e),f0(e<0?0:De(e)|0)}l.allocUnsafe=function(e){return Me(e)};l.allocUnsafeSlow=function(e){return Me(e)};function Nx(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ir(e,t)|0,n=f0(r),x=n.write(e,t);return x!==r&&(n=n.slice(0,x)),n}function He(e){let t=e.length<0?0:De(e.length)|0,r=f0(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function $x(e){if(t0(e,Uint8Array)){let t=new Uint8Array(e);return Re(t.buffer,t.byteOffset,t.byteLength)}return He(e)}function Re(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function Px(e){if(l.isBuffer(e)){let t=De(e.length)|0,r=f0(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||$e(e.length)?f0(0):He(e);if(e.type==="Buffer"&&Array.isArray(e.data))return He(e.data)}function De(e){if(e>=ne)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ne.toString(16)+" bytes");return e|0}function Gx(e){return+e!=e&&(e=0),l.alloc(+e)}l.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==l.prototype};l.compare=function(t,r){if(t0(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),t0(r,Uint8Array)&&(r=l.from(r,r.offset,r.byteLength)),!l.isBuffer(t)||!l.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,x=r.length;for(let i=0,a=Math.min(n,x);i<a;++i)if(t[i]!==r[i]){n=t[i],x=r[i];break}return n<x?-1:x<n?1:0};l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};l.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return l.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let x=l.allocUnsafe(r),i=0;for(n=0;n<t.length;++n){let a=t[n];if(t0(a,Uint8Array))i+a.length>x.length?(l.isBuffer(a)||(a=l.from(a)),a.copy(x,i)):Uint8Array.prototype.set.call(x,a,i);else if(l.isBuffer(a))a.copy(x,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=a.length}return x};function ir(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||t0(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let x=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Ve(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return lr(e).length;default:if(x)return n?-1:Ve(e).length;t=(""+t).toLowerCase(),x=!0}}l.byteLength=ir;function zx(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return ei(this,t,r);case"utf8":case"utf-8":return fr(this,t,r);case"ascii":return Zx(this,t,r);case"latin1":case"binary":return Qx(this,t,r);case"base64":return Jx(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ti(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}l.prototype._isBuffer=!0;function v0(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}l.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)v0(this,r,r+1);return this};l.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)v0(this,r,r+3),v0(this,r+1,r+2);return this};l.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)v0(this,r,r+7),v0(this,r+1,r+6),v0(this,r+2,r+5),v0(this,r+3,r+4);return this};l.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?fr(this,0,t):zx.apply(this,arguments)};l.prototype.toLocaleString=l.prototype.toString;l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:l.compare(this,t)===0};l.prototype.inspect=function(){let t="",r=O0.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};Qt&&(l.prototype[Qt]=l.prototype.inspect);l.prototype.compare=function(t,r,n,x,i){if(t0(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),x===void 0&&(x=0),i===void 0&&(i=this.length),r<0||n>t.length||x<0||i>this.length)throw new RangeError("out of range index");if(x>=i&&r>=n)return 0;if(x>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,x>>>=0,i>>>=0,this===t)return 0;let a=i-x,f=n-r,o=Math.min(a,f),d=this.slice(x,i),h=t.slice(r,n);for(let u=0;u<o;++u)if(d[u]!==h[u]){a=d[u],f=h[u];break}return a<f?-1:f<a?1:0};function ar(e,t,r,n,x){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,$e(r)&&(r=x?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(x)return-1;r=e.length-1}else if(r<0)if(x)r=0;else return-1;if(typeof t=="string"&&(t=l.from(t,n)),l.isBuffer(t))return t.length===0?-1:er(e,t,r,n,x);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):er(e,[t],r,n,x);throw new TypeError("val must be string, number or Buffer")}function er(e,t,r,n,x){let i=1,a=e.length,f=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,a/=2,f/=2,r/=2}function o(h,u){return i===1?h[u]:h.readUInt16BE(u*i)}let d;if(x){let h=-1;for(d=r;d<a;d++)if(o(e,d)===o(t,h===-1?0:d-h)){if(h===-1&&(h=d),d-h+1===f)return h*i}else h!==-1&&(d-=d-h),h=-1}else for(r+f>a&&(r=a-f),d=r;d>=0;d--){let h=!0;for(let u=0;u<f;u++)if(o(e,d+u)!==o(t,u)){h=!1;break}if(h)return d}return-1}l.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};l.prototype.indexOf=function(t,r,n){return ar(this,t,r,n,!0)};l.prototype.lastIndexOf=function(t,r,n){return ar(this,t,r,n,!1)};function jx(e,t,r,n){r=Number(r)||0;let x=e.length-r;n?(n=Number(n),n>x&&(n=x)):n=x;let i=t.length;n>i/2&&(n=i/2);let a;for(a=0;a<n;++a){let f=parseInt(t.substr(a*2,2),16);if($e(f))return a;e[r+a]=f}return a}function Xx(e,t,r,n){return xe(Ve(t,e.length-r),e,r,n)}function Wx(e,t,r,n){return xe(ii(t),e,r,n)}function qx(e,t,r,n){return xe(lr(t),e,r,n)}function Kx(e,t,r,n){return xe(ai(t,e.length-r),e,r,n)}l.prototype.write=function(t,r,n,x){if(r===void 0)x="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")x=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,x===void 0&&(x="utf8")):(x=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((n===void 0||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");let a=!1;for(;;)switch(x){case"hex":return jx(this,t,r,n);case"utf8":case"utf-8":return Xx(this,t,r,n);case"ascii":case"latin1":case"binary":return Wx(this,t,r,n);case"base64":return qx(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Kx(this,t,r,n);default:if(a)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),a=!0}};l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Jx(e,t,r){return t===0&&r===e.length?Oe.fromByteArray(e):Oe.fromByteArray(e.slice(t,r))}function fr(e,t,r){r=Math.min(e.length,r);let n=[],x=t;for(;x<r;){let i=e[x],a=null,f=i>239?4:i>223?3:i>191?2:1;if(x+f<=r){let o,d,h,u;switch(f){case 1:i<128&&(a=i);break;case 2:o=e[x+1],(o&192)===128&&(u=(i&31)<<6|o&63,u>127&&(a=u));break;case 3:o=e[x+1],d=e[x+2],(o&192)===128&&(d&192)===128&&(u=(i&15)<<12|(o&63)<<6|d&63,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:o=e[x+1],d=e[x+2],h=e[x+3],(o&192)===128&&(d&192)===128&&(h&192)===128&&(u=(i&15)<<18|(o&63)<<12|(d&63)<<6|h&63,u>65535&&u<1114112&&(a=u))}}a===null?(a=65533,f=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),x+=f}return Yx(n)}var tr=4096;function Yx(e){let t=e.length;if(t<=tr)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=tr));return r}function Zx(e,t,r){let n="";r=Math.min(e.length,r);for(let x=t;x<r;++x)n+=String.fromCharCode(e[x]&127);return n}function Qx(e,t,r){let n="";r=Math.min(e.length,r);for(let x=t;x<r;++x)n+=String.fromCharCode(e[x]);return n}function ei(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let x="";for(let i=t;i<r;++i)x+=fi[e[i]];return x}function ti(e,t,r){let n=e.slice(t,r),x="";for(let i=0;i<n.length-1;i+=2)x+=String.fromCharCode(n[i]+n[i+1]*256);return x}l.prototype.slice=function(t,r){let n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);let x=this.subarray(t,r);return Object.setPrototypeOf(x,l.prototype),x};function j(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||j(t,r,this.length);let x=this[t],i=1,a=0;for(;++a<r&&(i*=256);)x+=this[t+a]*i;return x};l.prototype.readUintBE=l.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||j(t,r,this.length);let x=this[t+--r],i=1;for(;r>0&&(i*=256);)x+=this[t+--r]*i;return x};l.prototype.readUint8=l.prototype.readUInt8=function(t,r){return t=t>>>0,r||j(t,1,this.length),this[t]};l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||j(t,2,this.length),this[t]|this[t+1]<<8};l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||j(t,2,this.length),this[t]<<8|this[t+1]};l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||j(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};l.prototype.readBigUInt64LE=u0(function(t){t=t>>>0,S0(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&j0(t,this.length-8);let x=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(x)+(BigInt(i)<<BigInt(32))});l.prototype.readBigUInt64BE=u0(function(t){t=t>>>0,S0(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&j0(t,this.length-8);let x=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(x)<<BigInt(32))+BigInt(i)});l.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||j(t,r,this.length);let x=this[t],i=1,a=0;for(;++a<r&&(i*=256);)x+=this[t+a]*i;return i*=128,x>=i&&(x-=Math.pow(2,8*r)),x};l.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||j(t,r,this.length);let x=r,i=1,a=this[t+--x];for(;x>0&&(i*=256);)a+=this[t+--x]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*r)),a};l.prototype.readInt8=function(t,r){return t=t>>>0,r||j(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};l.prototype.readInt16LE=function(t,r){t=t>>>0,r||j(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};l.prototype.readInt16BE=function(t,r){t=t>>>0,r||j(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};l.prototype.readInt32LE=function(t,r){return t=t>>>0,r||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};l.prototype.readInt32BE=function(t,r){return t=t>>>0,r||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};l.prototype.readBigInt64LE=u0(function(t){t=t>>>0,S0(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&j0(t,this.length-8);let x=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(x)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});l.prototype.readBigInt64BE=u0(function(t){t=t>>>0,S0(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&j0(t,this.length-8);let x=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(x)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});l.prototype.readFloatLE=function(t,r){return t=t>>>0,r||j(t,4,this.length),k0.read(this,t,!0,23,4)};l.prototype.readFloatBE=function(t,r){return t=t>>>0,r||j(t,4,this.length),k0.read(this,t,!1,23,4)};l.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||j(t,8,this.length),k0.read(this,t,!0,52,8)};l.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||j(t,8,this.length),k0.read(this,t,!1,52,8)};function K(e,t,r,n,x,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>x||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,r,n,x){if(t=+t,r=r>>>0,n=n>>>0,!x){let f=Math.pow(2,8*n)-1;K(this,t,r,n,f,0)}let i=1,a=0;for(this[r]=t&255;++a<n&&(i*=256);)this[r+a]=t/i&255;return r+n};l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,r,n,x){if(t=+t,r=r>>>0,n=n>>>0,!x){let f=Math.pow(2,8*n)-1;K(this,t,r,n,f,0)}let i=n-1,a=1;for(this[r+i]=t&255;--i>=0&&(a*=256);)this[r+i]=t/a&255;return r+n};l.prototype.writeUint8=l.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,1,255,0),this[r]=t&255,r+1};l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function or(e,t,r,n,x){hr(t,n,x,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,r}function cr(e,t,r,n,x){hr(t,n,x,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a=a>>8,e[r+2]=a,a=a>>8,e[r+1]=a,a=a>>8,e[r]=a,r+8}l.prototype.writeBigUInt64LE=u0(function(t,r=0){return or(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});l.prototype.writeBigUInt64BE=u0(function(t,r=0){return cr(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});l.prototype.writeIntLE=function(t,r,n,x){if(t=+t,r=r>>>0,!x){let o=Math.pow(2,8*n-1);K(this,t,r,n,o-1,-o)}let i=0,a=1,f=0;for(this[r]=t&255;++i<n&&(a*=256);)t<0&&f===0&&this[r+i-1]!==0&&(f=1),this[r+i]=(t/a>>0)-f&255;return r+n};l.prototype.writeIntBE=function(t,r,n,x){if(t=+t,r=r>>>0,!x){let o=Math.pow(2,8*n-1);K(this,t,r,n,o-1,-o)}let i=n-1,a=1,f=0;for(this[r+i]=t&255;--i>=0&&(a*=256);)t<0&&f===0&&this[r+i+1]!==0&&(f=1),this[r+i]=(t/a>>0)-f&255;return r+n};l.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};l.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};l.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};l.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};l.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||K(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};l.prototype.writeBigInt64LE=u0(function(t,r=0){return or(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});l.prototype.writeBigInt64BE=u0(function(t,r=0){return cr(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function sr(e,t,r,n,x,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function dr(e,t,r,n,x){return t=+t,r=r>>>0,x||sr(e,t,r,4,34028234663852886e22,-34028234663852886e22),k0.write(e,t,r,n,23,4),r+4}l.prototype.writeFloatLE=function(t,r,n){return dr(this,t,r,!0,n)};l.prototype.writeFloatBE=function(t,r,n){return dr(this,t,r,!1,n)};function ur(e,t,r,n,x){return t=+t,r=r>>>0,x||sr(e,t,r,8,17976931348623157e292,-17976931348623157e292),k0.write(e,t,r,n,52,8),r+8}l.prototype.writeDoubleLE=function(t,r,n){return ur(this,t,r,!0,n)};l.prototype.writeDoubleBE=function(t,r,n){return ur(this,t,r,!1,n)};l.prototype.copy=function(t,r,n,x){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!x&&x!==0&&(x=this.length),r>=t.length&&(r=t.length),r||(r=0),x>0&&x<n&&(x=n),x===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),t.length-r<x-n&&(x=t.length-r+n);let i=x-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,x):Uint8Array.prototype.set.call(t,this.subarray(n,x),r),i};l.prototype.fill=function(t,r,n,x){if(typeof t=="string"){if(typeof r=="string"?(x=r,r=0,n=this.length):typeof n=="string"&&(x=n,n=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!l.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(t.length===1){let a=t.charCodeAt(0);(x==="utf8"&&a<128||x==="latin1")&&(t=a)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i<n;++i)this[i]=t;else{let a=l.isBuffer(t)?t:l.from(t,x),f=a.length;if(f===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-r;++i)this[i+r]=a[i%f]}return this};var F0={};function Ne(e,t,r){F0[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(x){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:x,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}Ne("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Ne("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);Ne("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,x=r;return Number.isInteger(r)&&Math.abs(r)>2**32?x=rr(String(r)):typeof r=="bigint"&&(x=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(x=rr(x)),x+="n"),n+=` It must be ${t}. Received ${x}`,n},RangeError);function rr(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function ri(e,t,r){S0(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&j0(t,e.length-(r+1))}function hr(e,t,r,n,x,i){if(e>r||e<t){let a=typeof t=="bigint"?"n":"",f;throw i>3?t===0||t===BigInt(0)?f=`>= 0${a} and < 2${a} ** ${(i+1)*8}${a}`:f=`>= -(2${a} ** ${(i+1)*8-1}${a}) and < 2 ** ${(i+1)*8-1}${a}`:f=`>= ${t}${a} and <= ${r}${a}`,new F0.ERR_OUT_OF_RANGE("value",f,e)}ri(n,x,i)}function S0(e,t){if(typeof e!="number")throw new F0.ERR_INVALID_ARG_TYPE(t,"number",e)}function j0(e,t,r){throw Math.floor(e)!==e?(S0(e,r),new F0.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new F0.ERR_BUFFER_OUT_OF_BOUNDS:new F0.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var ni=/[^+/0-9A-Za-z-_]/g;function xi(e){if(e=e.split("=")[0],e=e.trim().replace(ni,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Ve(e,t){t=t||1/0;let r,n=e.length,x=null,i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!x){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}x=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),x=r;continue}r=(x-55296<<10|r-56320)+65536}else x&&(t-=3)>-1&&i.push(239,191,189);if(x=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function ii(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function ai(e,t){let r,n,x,i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,x=r%256,i.push(x),i.push(n);return i}function lr(e){return Oe.toByteArray(xi(e))}function xe(e,t,r,n){let x;for(x=0;x<n&&!(x+r>=t.length||x>=e.length);++x)t[x+r]=e[x];return x}function t0(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function $e(e){return e!==e}var fi=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let x=0;x<16;++x)t[n+x]=e[r]+e[x]}return t}();function u0(e){return typeof BigInt>"u"?oi:e}function oi(){throw new Error("BigInt not supported")}});var w,s=Ux(()=>{w=H0().Buffer});var Jr=L0((Kr,he)=>{s();(function(e,t){"use strict";var r=Math.pow(2,-24),n=Math.pow(2,32),x=Math.pow(2,53);function i(o){var d=new ArrayBuffer(256),h=new DataView(d),u,m=0;function p(E){for(var O=d.byteLength,U=m+E;O<U;)O*=2;if(O!==d.byteLength){var L=h;d=new ArrayBuffer(O),h=new DataView(d);for(var $=m+3>>2,S=0;S<$;++S)h.setUint32(S*4,L.getUint32(S*4))}return u=E,h}function v(){m+=u}function g(E){v(p(8).setFloat64(m,E))}function b(E){v(p(1).setUint8(m,E))}function y(E){for(var O=p(E.length),U=0;U<E.length;++U)O.setUint8(m+U,E[U]);v()}function B(E){v(p(2).setUint16(m,E))}function A(E){v(p(4).setUint32(m,E))}function I(E){var O=E%n,U=(E-O)/n,L=p(8);L.setUint32(m,U),L.setUint32(m+4,O),v()}function T(E,O){O<24?b(E<<5|O):O<256?(b(E<<5|24),b(O)):O<65536?(b(E<<5|25),B(O)):O<4294967296?(b(E<<5|26),A(O)):(b(E<<5|27),I(O))}function D(E){var O;if(E===!1)return b(244);if(E===!0)return b(245);if(E===null)return b(246);if(E===t)return b(247);switch(typeof E){case"number":if(Math.floor(E)===E){if(0<=E&&E<=x)return T(0,E);if(-x<=E&&E<0)return T(1,-(E+1))}return b(251),g(E);case"string":var U=[];for(O=0;O<E.length;++O){var L=E.charCodeAt(O);L<128?U.push(L):L<2048?(U.push(192|L>>6),U.push(128|L&63)):L<55296?(U.push(224|L>>12),U.push(128|L>>6&63),U.push(128|L&63)):(L=(L&1023)<<10,L|=E.charCodeAt(++O)&1023,L+=65536,U.push(240|L>>18),U.push(128|L>>12&63),U.push(128|L>>6&63),U.push(128|L&63))}return T(3,U.length),y(U);default:var $;if(Array.isArray(E))for($=E.length,T(4,$),O=0;O<$;++O)D(E[O]);else if(E instanceof Uint8Array)T(2,E.length),y(E);else{var S=Object.keys(E);for($=S.length,T(5,$),O=0;O<$;++O){var V=S[O];D(V),D(E[V])}}}}if(D(o),"slice"in d)return d.slice(0,m);for(var P=new ArrayBuffer(m),z=new DataView(P),X=0;X<m;++X)z.setUint8(X,h.getUint8(X));return P}function a(o,d,h){var u=new DataView(o),m=0;typeof d!="function"&&(d=function(U){return U}),typeof h!="function"&&(h=function(){return t});function p(U,L){return m+=L,U}function v(U){return p(new Uint8Array(o,m,U),U)}function g(){var U=new ArrayBuffer(4),L=new DataView(U),$=A(),S=$&32768,V=$&31744,d0=$&1023;if(V===31744)V=261120;else if(V!==0)V+=114688;else if(d0!==0)return d0*r;return L.setUint32(0,S<<16|V<<13|d0<<13),L.getFloat32(0)}function b(){return p(u.getFloat32(m),4)}function y(){return p(u.getFloat64(m),8)}function B(){return p(u.getUint8(m),1)}function A(){return p(u.getUint16(m),2)}function I(){return p(u.getUint32(m),4)}function T(){return I()*n+I()}function D(){return u.getUint8(m)!==255?!1:(m+=1,!0)}function P(U){if(U<24)return U;if(U===24)return B();if(U===25)return A();if(U===26)return I();if(U===27)return T();if(U===31)return-1;throw"Invalid length encoding"}function z(U){var L=B();if(L===255)return-1;var $=P(L&31);if($<0||L>>5!==U)throw"Invalid indefinite length element";return $}function X(U,L){for(var $=0;$<L;++$){var S=B();S&128&&(S<224?(S=(S&31)<<6|B()&63,L-=1):S<240?(S=(S&15)<<12|(B()&63)<<6|B()&63,L-=2):(S=(S&15)<<18|(B()&63)<<12|(B()&63)<<6|B()&63,L-=3)),S<65536?U.push(S):(S-=65536,U.push(55296|S>>10),U.push(56320|S&1023))}}function E(){var U=B(),L=U>>5,$=U&31,S,V;if(L===7)switch($){case 25:return g();case 26:return b();case 27:return y()}if(V=P($),V<0&&(L<2||6<L))throw"Invalid length";switch(L){case 0:return V;case 1:return-1-V;case 2:if(V<0){for(var d0=[],zt=0;(V=z(L))>=0;)zt+=V,d0.push(v(V));var jt=new Uint8Array(zt),Xt=0;for(S=0;S<d0.length;++S)jt.set(d0[S],Xt),Xt+=d0[S].length;return jt}return v(V);case 3:var Fe=[];if(V<0)for(;(V=z(L))>=0;)X(Fe,V);else X(Fe,V);return String.fromCharCode.apply(null,Fe);case 4:var z0;if(V<0)for(z0=[];!D();)z0.push(E());else for(z0=new Array(V),S=0;S<V;++S)z0[S]=E();return z0;case 5:var Wt={};for(S=0;S<V||V<0&&!D();++S){var _x=E();Wt[_x]=E()}return Wt;case 6:return d(E(),V);case 7:switch(V){case 20:return!1;case 21:return!0;case 22:return null;case 23:return t;default:return h(V)}}}var O=E();if(m!==o.byteLength)throw"Remaining bytes";return O}var f={encode:i,decode:a};typeof define=="function"&&define.amd?define("cbor/cbor",f):typeof he<"u"&&he.exports?he.exports=f:e.CBOR||(e.CBOR=f)})(Kr)});var me=L0(($1,Ln)=>{"use strict";s();function Ma(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var x=e.charAt(n),i=x.charCodeAt(0);if(t[i]!==255)throw new TypeError(x+" is ambiguous");t[i]=n}var a=e.length,f=e.charAt(0),o=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function h(p){if(p instanceof Uint8Array||(ArrayBuffer.isView(p)?p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength):Array.isArray(p)&&(p=Uint8Array.from(p))),!(p instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(p.length===0)return"";for(var v=0,g=0,b=0,y=p.length;b!==y&&p[b]===0;)b++,v++;for(var B=(y-b)*d+1>>>0,A=new Uint8Array(B);b!==y;){for(var I=p[b],T=0,D=B-1;(I!==0||T<g)&&D!==-1;D--,T++)I+=256*A[D]>>>0,A[D]=I%a>>>0,I=I/a>>>0;if(I!==0)throw new Error("Non-zero carry");g=T,b++}for(var P=B-g;P!==B&&A[P]===0;)P++;for(var z=f.repeat(v);P<B;++P)z+=e.charAt(A[P]);return z}function u(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;for(var v=0,g=0,b=0;p[v]===f;)g++,v++;for(var y=(p.length-v)*o+1>>>0,B=new Uint8Array(y);p[v];){var A=t[p.charCodeAt(v)];if(A===255)return;for(var I=0,T=y-1;(A!==0||I<b)&&T!==-1;T--,I++)A+=a*B[T]>>>0,B[T]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");b=I,v++}for(var D=y-b;D!==y&&B[D]===0;)D++;for(var P=new Uint8Array(g+(y-D)),z=g;D!==y;)P[z++]=B[D++];return P}function m(p){var v=u(p);if(v)return v;throw new Error("Non-base"+a+" character")}return{encode:h,decodeUnsafe:u,decode:m}}Ln.exports=Ma});var px=L0((J0,P0)=>{s();var za=200,Mt="__lodash_hash_undefined__",Ie=1,Wn=2,qn=9007199254740991,ye="[object Arguments]",Ft="[object Array]",ja="[object AsyncFunction]",Kn="[object Boolean]",Jn="[object Date]",Yn="[object Error]",Zn="[object Function]",Xa="[object GeneratorFunction]",we="[object Map]",Qn="[object Number]",Wa="[object Null]",$0="[object Object]",Rn="[object Promise]",qa="[object Proxy]",ex="[object RegExp]",Ae="[object Set]",tx="[object String]",Ka="[object Symbol]",Ja="[object Undefined]",kt="[object WeakMap]",rx="[object ArrayBuffer]",_e="[object DataView]",Ya="[object Float32Array]",Za="[object Float64Array]",Qa="[object Int8Array]",ef="[object Int16Array]",tf="[object Int32Array]",rf="[object Uint8Array]",nf="[object Uint8ClampedArray]",xf="[object Uint16Array]",af="[object Uint32Array]",ff=/[\\^$.*+?()[\]{}|]/g,of=/^\[object .+?Constructor\]$/,cf=/^(?:0|[1-9]\d*)$/,N={};N[Ya]=N[Za]=N[Qa]=N[ef]=N[tf]=N[rf]=N[nf]=N[xf]=N[af]=!0;N[ye]=N[Ft]=N[rx]=N[Kn]=N[_e]=N[Jn]=N[Yn]=N[Zn]=N[we]=N[Qn]=N[$0]=N[ex]=N[Ae]=N[tx]=N[kt]=!1;var nx=typeof global=="object"&&global&&global.Object===Object&&global,sf=typeof self=="object"&&self&&self.Object===Object&&self,c0=nx||sf||Function("return this")(),xx=typeof J0=="object"&&J0&&!J0.nodeType&&J0,Vn=xx&&typeof P0=="object"&&P0&&!P0.nodeType&&P0,ix=Vn&&Vn.exports===xx,Ut=ix&&nx.process,Mn=function(){try{return Ut&&Ut.binding&&Ut.binding("util")}catch{}}(),Dn=Mn&&Mn.isTypedArray;function df(e,t){for(var r=-1,n=e==null?0:e.length,x=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[x++]=a)}return i}function uf(e,t){for(var r=-1,n=t.length,x=e.length;++r<n;)e[x+r]=t[r];return e}function hf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function lf(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function bf(e){return function(t){return e(t)}}function pf(e,t){return e.has(t)}function gf(e,t){return e?.[t]}function mf(e){var t=-1,r=Array(e.size);return e.forEach(function(n,x){r[++t]=[x,n]}),r}function yf(e,t){return function(r){return e(t(r))}}function wf(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Af=Array.prototype,_f=Function.prototype,Ce=Object.prototype,Tt=c0["__core-js_shared__"],ax=_f.toString,i0=Ce.hasOwnProperty,Nn=function(){var e=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),fx=Ce.toString,Bf=RegExp("^"+ax.call(i0).replace(ff,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$n=ix?c0.Buffer:void 0,Be=c0.Symbol,Pn=c0.Uint8Array,ox=Ce.propertyIsEnumerable,vf=Af.splice,I0=Be?Be.toStringTag:void 0,Gn=Object.getOwnPropertySymbols,Ef=$n?$n.isBuffer:void 0,If=yf(Object.keys,Object),St=G0(c0,"DataView"),Y0=G0(c0,"Map"),Ot=G0(c0,"Promise"),Ht=G0(c0,"Set"),Rt=G0(c0,"WeakMap"),Z0=G0(Object,"create"),Cf=T0(St),Uf=T0(Y0),Tf=T0(Ot),Lf=T0(Ht),Ff=T0(Rt),zn=Be?Be.prototype:void 0,Lt=zn?zn.valueOf:void 0;function C0(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function kf(){this.__data__=Z0?Z0(null):{},this.size=0}function Sf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Of(e){var t=this.__data__;if(Z0){var r=t[e];return r===Mt?void 0:r}return i0.call(t,e)?t[e]:void 0}function Hf(e){var t=this.__data__;return Z0?t[e]!==void 0:i0.call(t,e)}function Rf(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Z0&&t===void 0?Mt:t,this}C0.prototype.clear=kf;C0.prototype.delete=Sf;C0.prototype.get=Of;C0.prototype.has=Hf;C0.prototype.set=Rf;function s0(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vf(){this.__data__=[],this.size=0}function Mf(e){var t=this.__data__,r=Ue(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():vf.call(t,r,1),--this.size,!0}function Df(e){var t=this.__data__,r=Ue(t,e);return r<0?void 0:t[r][1]}function Nf(e){return Ue(this.__data__,e)>-1}function $f(e,t){var r=this.__data__,n=Ue(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}s0.prototype.clear=Vf;s0.prototype.delete=Mf;s0.prototype.get=Df;s0.prototype.has=Nf;s0.prototype.set=$f;function U0(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Pf(){this.size=0,this.__data__={hash:new C0,map:new(Y0||s0),string:new C0}}function Gf(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t}function zf(e){return Te(this,e).get(e)}function jf(e){return Te(this,e).has(e)}function Xf(e,t){var r=Te(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}U0.prototype.clear=Pf;U0.prototype.delete=Gf;U0.prototype.get=zf;U0.prototype.has=jf;U0.prototype.set=Xf;function ve(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new U0;++t<r;)this.add(e[t])}function Wf(e){return this.__data__.set(e,Mt),this}function qf(e){return this.__data__.has(e)}ve.prototype.add=ve.prototype.push=Wf;ve.prototype.has=qf;function _0(e){var t=this.__data__=new s0(e);this.size=t.size}function Kf(){this.__data__=new s0,this.size=0}function Jf(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Yf(e){return this.__data__.get(e)}function Zf(e){return this.__data__.has(e)}function Qf(e,t){var r=this.__data__;if(r instanceof s0){var n=r.__data__;if(!Y0||n.length<za-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new U0(n)}return r.set(e,t),this.size=r.size,this}_0.prototype.clear=Kf;_0.prototype.delete=Jf;_0.prototype.get=Yf;_0.prototype.has=Zf;_0.prototype.set=Qf;function eo(e,t){var r=Ee(e),n=!r&&po(e),x=!r&&!n&&Vt(e),i=!r&&!n&&!x&&bx(e),a=r||n||x||i,f=a?lf(e.length,String):[],o=f.length;for(var d in e)(t||i0.call(e,d))&&!(a&&(d=="length"||x&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||so(d,o)))&&f.push(d);return f}function Ue(e,t){for(var r=e.length;r--;)if(dx(e[r][0],t))return r;return-1}function to(e,t,r){var n=t(e);return Ee(e)?n:uf(n,r(e))}function ee(e){return e==null?e===void 0?Ja:Wa:I0&&I0 in Object(e)?oo(e):bo(e)}function jn(e){return Q0(e)&&ee(e)==ye}function cx(e,t,r,n,x){return e===t?!0:e==null||t==null||!Q0(e)&&!Q0(t)?e!==e&&t!==t:ro(e,t,r,n,cx,x)}function ro(e,t,r,n,x,i){var a=Ee(e),f=Ee(t),o=a?Ft:A0(e),d=f?Ft:A0(t);o=o==ye?$0:o,d=d==ye?$0:d;var h=o==$0,u=d==$0,m=o==d;if(m&&Vt(e)){if(!Vt(t))return!1;a=!0,h=!1}if(m&&!h)return i||(i=new _0),a||bx(e)?sx(e,t,r,n,x,i):ao(e,t,o,r,n,x,i);if(!(r&Ie)){var p=h&&i0.call(e,"__wrapped__"),v=u&&i0.call(t,"__wrapped__");if(p||v){var g=p?e.value():e,b=v?t.value():t;return i||(i=new _0),x(g,b,r,n,i)}}return m?(i||(i=new _0),fo(e,t,r,n,x,i)):!1}function no(e){if(!lx(e)||ho(e))return!1;var t=ux(e)?Bf:of;return t.test(T0(e))}function xo(e){return Q0(e)&&hx(e.length)&&!!N[ee(e)]}function io(e){if(!lo(e))return If(e);var t=[];for(var r in Object(e))i0.call(e,r)&&r!="constructor"&&t.push(r);return t}function sx(e,t,r,n,x,i){var a=r&Ie,f=e.length,o=t.length;if(f!=o&&!(a&&o>f))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var h=-1,u=!0,m=r&Wn?new ve:void 0;for(i.set(e,t),i.set(t,e);++h<f;){var p=e[h],v=t[h];if(n)var g=a?n(v,p,h,t,e,i):n(p,v,h,e,t,i);if(g!==void 0){if(g)continue;u=!1;break}if(m){if(!hf(t,function(b,y){if(!pf(m,y)&&(p===b||x(p,b,r,n,i)))return m.push(y)})){u=!1;break}}else if(!(p===v||x(p,v,r,n,i))){u=!1;break}}return i.delete(e),i.delete(t),u}function ao(e,t,r,n,x,i,a){switch(r){case _e:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rx:return!(e.byteLength!=t.byteLength||!i(new Pn(e),new Pn(t)));case Kn:case Jn:case Qn:return dx(+e,+t);case Yn:return e.name==t.name&&e.message==t.message;case ex:case tx:return e==t+"";case we:var f=mf;case Ae:var o=n&Ie;if(f||(f=wf),e.size!=t.size&&!o)return!1;var d=a.get(e);if(d)return d==t;n|=Wn,a.set(e,t);var h=sx(f(e),f(t),n,x,i,a);return a.delete(e),h;case Ka:if(Lt)return Lt.call(e)==Lt.call(t)}return!1}function fo(e,t,r,n,x,i){var a=r&Ie,f=Xn(e),o=f.length,d=Xn(t),h=d.length;if(o!=h&&!a)return!1;for(var u=o;u--;){var m=f[u];if(!(a?m in t:i0.call(t,m)))return!1}var p=i.get(e);if(p&&i.get(t))return p==t;var v=!0;i.set(e,t),i.set(t,e);for(var g=a;++u<o;){m=f[u];var b=e[m],y=t[m];if(n)var B=a?n(y,b,m,t,e,i):n(b,y,m,e,t,i);if(!(B===void 0?b===y||x(b,y,r,n,i):B)){v=!1;break}g||(g=m=="constructor")}if(v&&!g){var A=e.constructor,I=t.constructor;A!=I&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof I=="function"&&I instanceof I)&&(v=!1)}return i.delete(e),i.delete(t),v}function Xn(e){return to(e,yo,co)}function Te(e,t){var r=e.__data__;return uo(t)?r[typeof t=="string"?"string":"hash"]:r.map}function G0(e,t){var r=gf(e,t);return no(r)?r:void 0}function oo(e){var t=i0.call(e,I0),r=e[I0];try{e[I0]=void 0;var n=!0}catch{}var x=fx.call(e);return n&&(t?e[I0]=r:delete e[I0]),x}var co=Gn?function(e){return e==null?[]:(e=Object(e),df(Gn(e),function(t){return ox.call(e,t)}))}:wo,A0=ee;(St&&A0(new St(new ArrayBuffer(1)))!=_e||Y0&&A0(new Y0)!=we||Ot&&A0(Ot.resolve())!=Rn||Ht&&A0(new Ht)!=Ae||Rt&&A0(new Rt)!=kt)&&(A0=function(e){var t=ee(e),r=t==$0?e.constructor:void 0,n=r?T0(r):"";if(n)switch(n){case Cf:return _e;case Uf:return we;case Tf:return Rn;case Lf:return Ae;case Ff:return kt}return t});function so(e,t){return t=t??qn,!!t&&(typeof e=="number"||cf.test(e))&&e>-1&&e%1==0&&e<t}function uo(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ho(e){return!!Nn&&Nn in e}function lo(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ce;return e===r}function bo(e){return fx.call(e)}function T0(e){if(e!=null){try{return ax.call(e)}catch{}try{return e+""}catch{}}return""}function dx(e,t){return e===t||e!==e&&t!==t}var po=jn(function(){return arguments}())?jn:function(e){return Q0(e)&&i0.call(e,"callee")&&!ox.call(e,"callee")},Ee=Array.isArray;function go(e){return e!=null&&hx(e.length)&&!ux(e)}var Vt=Ef||Ao;function mo(e,t){return cx(e,t)}function ux(e){if(!lx(e))return!1;var t=ee(e);return t==Zn||t==Xa||t==ja||t==qa}function hx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=qn}function lx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Q0(e){return e!=null&&typeof e=="object"}var bx=Dn?bf(Dn):xo;function yo(e){return go(e)?eo(e):io(e)}function wo(){return[]}function Ao(){return!1}P0.exports=mo});var ko={};Tx(ko,{validate:()=>Fo});s();s();s();s();s();s();var nt=a0(H0(),1);s();s();s();function Pe(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function ci(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function R0(e,...t){if(!ci(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function V0(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function ie(e,t){R0(e);let r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}s();var br=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),ae=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Z=(e,t)=>e<<32-t|e>>>t;var Ge=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,si=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function ze(e){for(let t=0;t<e.length;t++)e[t]=si(e[t])}var di=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function X0(e){R0(e);let t="";for(let r=0;r<e.length;r++)t+=di[e[r]];return t}function ui(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function D0(e){return typeof e=="string"&&(e=ui(e)),R0(e),e}var M0=class{clone(){return this._cloneInto()}},Wo={}.toString;function E0(e){let t=n=>e().update(D0(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function pr(e){let t=(n,x)=>e(x).update(D0(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function hi(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let x=BigInt(32),i=BigInt(4294967295),a=Number(r>>x&i),f=Number(r&i),o=n?4:0,d=n?0:4;e.setUint32(t+o,a,n),e.setUint32(t+d,f,n)}var gr=(e,t,r)=>e&t^~e&r,mr=(e,t,r)=>e&t^e&r^t&r,N0=class extends M0{constructor(t,r,n,x){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=x,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ae(this.buffer)}update(t){V0(this);let{view:r,buffer:n,blockLen:x}=this;t=D0(t);let i=t.length;for(let a=0;a<i;){let f=Math.min(x-this.pos,i-a);if(f===x){let o=ae(t);for(;x<=i-a;a+=x)this.process(o,a);continue}n.set(t.subarray(a,a+f),this.pos),this.pos+=f,a+=f,this.pos===x&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){V0(this),ie(t,this),this.finished=!0;let{buffer:r,view:n,blockLen:x,isLE:i}=this,{pos:a}=this;r[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>x-a&&(this.process(n,0),a=0);for(let u=a;u<x;u++)r[u]=0;hi(n,x-8,BigInt(this.length*8),i),this.process(n,0);let f=ae(t),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let d=o/4,h=this.get();if(d>h.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<d;u++)f.setUint32(4*u,h[u],i)}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:n,length:x,finished:i,destroyed:a,pos:f}=this;return t.length=x,t.pos=f,t.finished=i,t.destroyed=a,x%r&&t.buffer.set(n),t}};var li=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),h0=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),l0=new Uint32Array(64),je=class extends N0{constructor(){super(64,32,8,!1),this.A=h0[0]|0,this.B=h0[1]|0,this.C=h0[2]|0,this.D=h0[3]|0,this.E=h0[4]|0,this.F=h0[5]|0,this.G=h0[6]|0,this.H=h0[7]|0}get(){let{A:t,B:r,C:n,D:x,E:i,F:a,G:f,H:o}=this;return[t,r,n,x,i,a,f,o]}set(t,r,n,x,i,a,f,o){this.A=t|0,this.B=r|0,this.C=n|0,this.D=x|0,this.E=i|0,this.F=a|0,this.G=f|0,this.H=o|0}process(t,r){for(let u=0;u<16;u++,r+=4)l0[u]=t.getUint32(r,!1);for(let u=16;u<64;u++){let m=l0[u-15],p=l0[u-2],v=Z(m,7)^Z(m,18)^m>>>3,g=Z(p,17)^Z(p,19)^p>>>10;l0[u]=g+l0[u-7]+v+l0[u-16]|0}let{A:n,B:x,C:i,D:a,E:f,F:o,G:d,H:h}=this;for(let u=0;u<64;u++){let m=Z(f,6)^Z(f,11)^Z(f,25),p=h+m+gr(f,o,d)+li[u]+l0[u]|0,g=(Z(n,2)^Z(n,13)^Z(n,22))+mr(n,x,i)|0;h=d,d=o,o=f,f=a+p|0,a=i,i=x,x=n,n=p+g|0}n=n+this.A|0,x=x+this.B|0,i=i+this.C|0,a=a+this.D|0,f=f+this.E|0,o=o+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(n,x,i,a,f,o,d,h)}roundClean(){l0.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var yr=E0(()=>new je);s();s();var fe=BigInt(4294967295),Xe=BigInt(32);function wr(e,t=!1){return t?{h:Number(e&fe),l:Number(e>>Xe&fe)}:{h:Number(e>>Xe&fe)|0,l:Number(e&fe)|0}}function We(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let x=0;x<e.length;x++){let{h:i,l:a}=wr(e[x],t);[r[x],n[x]]=[i,a]}return[r,n]}var bi=(e,t)=>BigInt(e>>>0)<<Xe|BigInt(t>>>0),pi=(e,t,r)=>e>>>r,gi=(e,t,r)=>e<<32-r|t>>>r,mi=(e,t,r)=>e>>>r|t<<32-r,yi=(e,t,r)=>e<<32-r|t>>>r,wi=(e,t,r)=>e<<64-r|t>>>r-32,Ai=(e,t,r)=>e>>>r-32|t<<64-r,_i=(e,t)=>t,Bi=(e,t)=>e,qe=(e,t,r)=>e<<r|t>>>32-r,Ke=(e,t,r)=>t<<r|e>>>32-r,Je=(e,t,r)=>t<<r-32|e>>>64-r,Ye=(e,t,r)=>e<<r-32|t>>>64-r;function vi(e,t,r,n){let x=(t>>>0)+(n>>>0);return{h:e+r+(x/2**32|0)|0,l:x|0}}var Ei=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),Ii=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,Ci=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),Ui=(e,t,r,n,x)=>t+r+n+x+(e/2**32|0)|0,Ti=(e,t,r,n,x)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(x>>>0),Li=(e,t,r,n,x,i)=>t+r+n+x+i+(e/2**32|0)|0;var Fi={fromBig:wr,split:We,toBig:bi,shrSH:pi,shrSL:gi,rotrSH:mi,rotrSL:yi,rotrBH:wi,rotrBL:Ai,rotr32H:_i,rotr32L:Bi,rotlSH:qe,rotlSL:Ke,rotlBH:Je,rotlBL:Ye,add:vi,add3L:Ei,add3H:Ii,add4L:Ci,add4H:Ui,add5H:Li,add5L:Ti},k=Fi;var[ki,Si]=k.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),b0=new Uint32Array(80),p0=new Uint32Array(80),oe=class extends N0{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:t,Al:r,Bh:n,Bl:x,Ch:i,Cl:a,Dh:f,Dl:o,Eh:d,El:h,Fh:u,Fl:m,Gh:p,Gl:v,Hh:g,Hl:b}=this;return[t,r,n,x,i,a,f,o,d,h,u,m,p,v,g,b]}set(t,r,n,x,i,a,f,o,d,h,u,m,p,v,g,b){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=x|0,this.Ch=i|0,this.Cl=a|0,this.Dh=f|0,this.Dl=o|0,this.Eh=d|0,this.El=h|0,this.Fh=u|0,this.Fl=m|0,this.Gh=p|0,this.Gl=v|0,this.Hh=g|0,this.Hl=b|0}process(t,r){for(let A=0;A<16;A++,r+=4)b0[A]=t.getUint32(r),p0[A]=t.getUint32(r+=4);for(let A=16;A<80;A++){let I=b0[A-15]|0,T=p0[A-15]|0,D=k.rotrSH(I,T,1)^k.rotrSH(I,T,8)^k.shrSH(I,T,7),P=k.rotrSL(I,T,1)^k.rotrSL(I,T,8)^k.shrSL(I,T,7),z=b0[A-2]|0,X=p0[A-2]|0,E=k.rotrSH(z,X,19)^k.rotrBH(z,X,61)^k.shrSH(z,X,6),O=k.rotrSL(z,X,19)^k.rotrBL(z,X,61)^k.shrSL(z,X,6),U=k.add4L(P,O,p0[A-7],p0[A-16]),L=k.add4H(U,D,E,b0[A-7],b0[A-16]);b0[A]=L|0,p0[A]=U|0}let{Ah:n,Al:x,Bh:i,Bl:a,Ch:f,Cl:o,Dh:d,Dl:h,Eh:u,El:m,Fh:p,Fl:v,Gh:g,Gl:b,Hh:y,Hl:B}=this;for(let A=0;A<80;A++){let I=k.rotrSH(u,m,14)^k.rotrSH(u,m,18)^k.rotrBH(u,m,41),T=k.rotrSL(u,m,14)^k.rotrSL(u,m,18)^k.rotrBL(u,m,41),D=u&p^~u&g,P=m&v^~m&b,z=k.add5L(B,T,P,Si[A],p0[A]),X=k.add5H(z,y,I,D,ki[A],b0[A]),E=z|0,O=k.rotrSH(n,x,28)^k.rotrBH(n,x,34)^k.rotrBH(n,x,39),U=k.rotrSL(n,x,28)^k.rotrBL(n,x,34)^k.rotrBL(n,x,39),L=n&i^n&f^i&f,$=x&a^x&o^a&o;y=g|0,B=b|0,g=p|0,b=v|0,p=u|0,v=m|0,{h:u,l:m}=k.add(d|0,h|0,X|0,E|0),d=f|0,h=o|0,f=i|0,o=a|0,i=n|0,a=x|0;let S=k.add3L(E,U,$);n=k.add3H(S,X,O,L),x=S|0}({h:n,l:x}=k.add(this.Ah|0,this.Al|0,n|0,x|0)),{h:i,l:a}=k.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:f,l:o}=k.add(this.Ch|0,this.Cl|0,f|0,o|0),{h:d,l:h}=k.add(this.Dh|0,this.Dl|0,d|0,h|0),{h:u,l:m}=k.add(this.Eh|0,this.El|0,u|0,m|0),{h:p,l:v}=k.add(this.Fh|0,this.Fl|0,p|0,v|0),{h:g,l:b}=k.add(this.Gh|0,this.Gl|0,g|0,b|0),{h:y,l:B}=k.add(this.Hh|0,this.Hl|0,y|0,B|0),this.set(n,x,i,a,f,o,d,h,u,m,p,v,g,b,y,B)}roundClean(){b0.fill(0),p0.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var Ze=class extends oe{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}};var Ar=E0(()=>new oe);var _r=E0(()=>new Ze);s();var Er=[],Ir=[],Cr=[],Oi=BigInt(0),W0=BigInt(1),Hi=BigInt(2),Ri=BigInt(7),Vi=BigInt(256),Mi=BigInt(113);for(let e=0,t=W0,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Er.push(2*(5*n+r)),Ir.push((e+1)*(e+2)/2%64);let x=Oi;for(let i=0;i<7;i++)t=(t<<W0^(t>>Ri)*Mi)%Vi,t&Hi&&(x^=W0<<(W0<<BigInt(i))-W0);Cr.push(x)}var[Di,Ni]=We(Cr,!0),Br=(e,t,r)=>r>32?Je(e,t,r):qe(e,t,r),vr=(e,t,r)=>r>32?Ye(e,t,r):Ke(e,t,r);function $i(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let a=0;a<10;a++)r[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){let f=(a+8)%10,o=(a+2)%10,d=r[o],h=r[o+1],u=Br(d,h,1)^r[f],m=vr(d,h,1)^r[f+1];for(let p=0;p<50;p+=10)e[a+p]^=u,e[a+p+1]^=m}let x=e[2],i=e[3];for(let a=0;a<24;a++){let f=Ir[a],o=Br(x,i,f),d=vr(x,i,f),h=Er[a];x=e[h],i=e[h+1],e[h]=o,e[h+1]=d}for(let a=0;a<50;a+=10){for(let f=0;f<10;f++)r[f]=e[a+f];for(let f=0;f<10;f++)e[a+f]^=~r[(f+2)%10]&r[(f+4)%10]}e[0]^=Di[n],e[1]^=Ni[n]}r.fill(0)}var ce=class e extends M0{constructor(t,r,n,x=!1,i=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=x,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Pe(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=br(this.state)}keccak(){Ge||ze(this.state32),$i(this.state32,this.rounds),Ge||ze(this.state32),this.posOut=0,this.pos=0}update(t){V0(this);let{blockLen:r,state:n}=this;t=D0(t);let x=t.length;for(let i=0;i<x;){let a=Math.min(r-this.pos,x-i);for(let f=0;f<a;f++)n[this.pos++]^=t[i++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:n,blockLen:x}=this;t[n]^=r,r&128&&n===x-1&&this.keccak(),t[x-1]^=128,this.keccak()}writeInto(t){V0(this,!1),R0(t),this.finish();let r=this.state,{blockLen:n}=this;for(let x=0,i=t.length;x<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-x);t.set(r.subarray(this.posOut,this.posOut+a),x),this.posOut+=a,x+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Pe(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(ie(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:x,rounds:i,enableXOF:a}=this;return t||(t=new e(r,n,x,a,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=n,t.outputLen=x,t.enableXOF=a,t.destroyed=this.destroyed,t}},g0=(e,t,r)=>E0(()=>new ce(t,e,r)),lc=g0(6,144,224/8),bc=g0(6,136,256/8),pc=g0(6,104,384/8),gc=g0(6,72,512/8),mc=g0(1,144,224/8),Ur=g0(1,136,256/8),yc=g0(1,104,384/8),wc=g0(1,72,512/8),Tr=(e,t,r)=>pr((n={})=>new ce(t,e,n.dkLen===void 0?r:n.dkLen,!0)),Ac=Tr(31,168,128/8),_c=Tr(31,136,256/8);s();var o0="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Pi=function(e){let t=[],r=Math.floor(e.length/5),n=e.length%5;if(n!=0){for(let i=0;i<5-n;i++)e+="\0";r+=1}for(let i=0;i<r;i++)t.push(o0.charAt(e.charCodeAt(i*5)>>3)),t.push(o0.charAt((e.charCodeAt(i*5)&7)<<2|e.charCodeAt(i*5+1)>>6)),t.push(o0.charAt((e.charCodeAt(i*5+1)&63)>>1)),t.push(o0.charAt((e.charCodeAt(i*5+1)&1)<<4|e.charCodeAt(i*5+2)>>4)),t.push(o0.charAt((e.charCodeAt(i*5+2)&15)<<1|e.charCodeAt(i*5+3)>>7)),t.push(o0.charAt((e.charCodeAt(i*5+3)&127)>>2)),t.push(o0.charAt((e.charCodeAt(i*5+3)&3)<<3|e.charCodeAt(i*5+4)>>5)),t.push(o0.charAt(e.charCodeAt(i*5+4)&31));let x=0;n==1?x=6:n==2?x=4:n==3?x=3:n==4&&(x=1);for(let i=0;i<x;i++)t.pop();for(let i=0;i<x;i++)t.push("=");return t.join("")},Gi=function(e){let t=new ArrayBuffer(e.length*5/8),r=new Uint8Array(t);for(let n=0;n<e.length/8;n++){let x=[0,0,0,0,0,0,0,0];for(let a=0;a<8;++a)x[a]=o0.indexOf(e[n*8+a]);let i=0;r[n*5+0]=x[i+0]<<3|x[i+1]>>2,r[n*5+1]=(x[i+1]&3)<<6|x[i+2]<<1|x[i+3]>>4,r[n*5+2]=(x[i+3]&15)<<4|x[i+4]>>1,r[n*5+3]=(x[i+4]&1)<<7|x[i+5]<<2|x[i+6]>>3,r[n*5+4]=(x[i+6]&7)<<5|x[i+7]}return r},Lr={b32decode:Gi,b32encode:Pi};s();var Qe="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",et={};for(let e=0;e<Qe.length;++e)et[Qe.charAt(e)]=e;var zi=Qe.length,r0={decode:function(e){if(e.length===0)return[];var t,r,n=[0];for(t=0;t<e.length;++t){var x=e[t];if(!(x in et))throw new Error("Non-base58 character");for(r=0;r<n.length;++r)n[r]*=zi;n[0]+=et[x];var i=0;for(r=0;r<n.length;++r)n[r]+=i,i=n[r]>>8,n[r]&=255;for(;i;)n.push(i&255),i>>=8}for(t=0;e[t]==="1"&&t<e.length-1;++t)n.push(0);return n.reverse()}};s();q.sigma=[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],[14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],[11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4],[7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8],[9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13],[2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9],[12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11],[13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10],[6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5],[10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],[14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],[11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4],[7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8],[9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13],[2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]];q.u256=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479];q.padding=w.from([128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);q.prototype._length_carry=function(e){for(var t=0;t<e.length&&!(e[t]<4294967296);++t)e[t]-=4294967296,e[t+1]+=1};q.prototype.update=function(e,t){e=w.from(e,t);for(var r=this._block,n=0;this._blockOffset+e.length-n>=r.length;){for(var x=this._blockOffset;x<r.length;)r[x++]=e[n++];this._length[0]+=r.length*8,this._length_carry(this._length),this._compress(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];return this};var ji=w.from([1]),Xi=w.from([129]);function se(e,t){return(e<<32-t|e>>>t)>>>0}function m0(e,t,r,n,x,i,a,f){var o=q.sigma,d=q.u256;e[n]=e[n]+((t[o[r][f]]^d[o[r][f+1]])>>>0)+e[x]>>>0,e[a]=se(e[a]^e[n],16),e[i]=e[i]+e[a]>>>0,e[x]=se(e[x]^e[i],12),e[n]=e[n]+((t[o[r][f+1]]^d[o[r][f]])>>>0)+e[x]>>>0,e[a]=se(e[a]^e[n],8),e[i]=e[i]+e[a]>>>0,e[x]=se(e[x]^e[i],7)}function q(){this._h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this._s=[0,0,0,0],this._block=w.allocUnsafe(64),this._blockOffset=0,this._length=[0,0],this._nullt=!1,this._zo=ji,this._oo=Xi}q.prototype._compress=function(){var e=q.u256,t=new Array(16),r=new Array(16),n;for(n=0;n<16;++n)r[n]=this._block.readUInt32BE(n*4);for(n=0;n<8;++n)t[n]=this._h[n]>>>0;for(n=8;n<12;++n)t[n]=(this._s[n-8]^e[n-8])>>>0;for(n=12;n<16;++n)t[n]=e[n-8];for(this._nullt||(t[12]=(t[12]^this._length[0])>>>0,t[13]=(t[13]^this._length[0])>>>0,t[14]=(t[14]^this._length[1])>>>0,t[15]=(t[15]^this._length[1])>>>0),n=0;n<14;++n)m0(t,r,n,0,4,8,12,0),m0(t,r,n,1,5,9,13,2),m0(t,r,n,2,6,10,14,4),m0(t,r,n,3,7,11,15,6),m0(t,r,n,0,5,10,15,8),m0(t,r,n,1,6,11,12,10),m0(t,r,n,2,7,8,13,12),m0(t,r,n,3,4,9,14,14);for(n=0;n<16;++n)this._h[n%8]=(this._h[n%8]^t[n])>>>0;for(n=0;n<8;++n)this._h[n]=(this._h[n]^this._s[n%4])>>>0};q.prototype._padding=function(){var e=this._length[0]+this._blockOffset*8,t=this._length[1];e>=4294967296&&(e-=4294967296,t+=1);var r=w.allocUnsafe(8);r.writeUInt32BE(t,0),r.writeUInt32BE(e,4),this._blockOffset===55?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<55?(this._blockOffset===0&&(this._nullt=!0),this._length[0]-=(55-this._blockOffset)*8,this.update(q.padding.slice(0,55-this._blockOffset))):(this._length[0]-=(64-this._blockOffset)*8,this.update(q.padding.slice(0,64-this._blockOffset)),this._length[0]-=55*8,this.update(q.padding.slice(1,56)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=64,this.update(r)};q.prototype.digest=function(e){this._padding();for(var t=w.allocUnsafe(32),r=0;r<8;++r)t.writeUInt32BE(this._h[r],r*4);return t.toString(e)};var Fr=q;s();function de(e,t,r){var n=e[t]+e[r],x=e[t+1]+e[r+1];n>=4294967296&&x++,e[t]=n,e[t+1]=x}function kr(e,t,r,n){var x=e[t]+r;r<0&&(x+=4294967296);var i=e[t+1]+n;x>=4294967296&&i++,e[t]=x,e[t+1]=i}function Sr(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function y0(e,t,r,n,x,i){var a=q0[x],f=q0[x+1],o=q0[i],d=q0[i+1];de(F,e,t),kr(F,e,a,f);var h=F[n]^F[e],u=F[n+1]^F[e+1];F[n]=u,F[n+1]=h,de(F,r,n),h=F[t]^F[r],u=F[t+1]^F[r+1],F[t]=h>>>24^u<<8,F[t+1]=u>>>24^h<<8,de(F,e,t),kr(F,e,o,d),h=F[n]^F[e],u=F[n+1]^F[e+1],F[n]=h>>>16^u<<16,F[n+1]=u>>>16^h<<16,de(F,r,n),h=F[t]^F[r],u=F[t+1]^F[r+1],F[t]=u>>>31^h<<1,F[t+1]=h>>>31^u<<1}var Or=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Wi=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],W=new Uint8Array(Wi.map(function(e){return e*2})),F=new Uint32Array(32),q0=new Uint32Array(32);function Hr(e,t){var r=0;for(r=0;r<16;r++)F[r]=e.h[r],F[r+16]=Or[r];for(F[24]=F[24]^e.t,F[25]=F[25]^e.t/4294967296,t&&(F[28]=~F[28],F[29]=~F[29]),r=0;r<32;r++)q0[r]=Sr(e.b,4*r);for(r=0;r<12;r++)y0(0,8,16,24,W[r*16+0],W[r*16+1]),y0(2,10,18,26,W[r*16+2],W[r*16+3]),y0(4,12,20,28,W[r*16+4],W[r*16+5]),y0(6,14,22,30,W[r*16+6],W[r*16+7]),y0(0,10,20,30,W[r*16+8],W[r*16+9]),y0(2,12,22,24,W[r*16+10],W[r*16+11]),y0(4,14,16,26,W[r*16+12],W[r*16+13]),y0(6,8,18,28,W[r*16+14],W[r*16+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^F[r]^F[r+16]}var w0=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function K0(e,t,r,n){w0.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=e,w0[0]=e,t&&(w0[1]=t.length),w0[2]=1,w0[3]=1,r&&w0.set(r,32),n&&w0.set(n,48);for(var x=0;x<16;x++)this.h[x]=Or[x]^Sr(w0,x*4);t&&(Rr(this,t),this.c=128)}K0.prototype.update=function(e){return Rr(this,e),this};K0.prototype.digest=function(e){var t=!e||e==="binary"||e==="hex"?new Uint8Array(this.outlen):e;return qi(this,t),e==="hex"?Ki(t):t};K0.prototype.final=K0.prototype.digest;function Rr(e,t){for(var r=0;r<t.length;r++)e.c===128&&(e.t+=e.c,Hr(e,!1),e.c=0),e.b[e.c++]=t[r]}function qi(e,t){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;Hr(e,!0);for(var r=0;r<e.outlen;r++)t[r]=e.h[r>>2]>>8*(r&3);return t}function Ki(e){for(var t="",r=0;r<e.length;r++)t+=Ji(e[r]);return t}function Ji(e){return e<16?"0"+e.toString(16):e.toString(16)}var tt=K0;function Vr(e,t){let r=e.toString(16);return r.length%2===1&&(r="0"+r),r.padStart(t,"0")}function Yi(e){return e>="A"&&e<="F"||e>="a"&&e<="f"||e>="0"&&e<="9"?1:0}function Zi(e){let t=0;return e>="A"&&e<="F"?t=e.charCodeAt(0)-65+10:e>="a"&&e<="f"?t=e.charCodeAt(0)-97+10:e>="0"&&e<="9"&&(t=e.charCodeAt(0)-48),t}function Mr(e){let t="0123456789ABCDEF",r="";return r+=t.charAt(e>>4),r+=t.charAt(e&15),r}function Qi(e){let t="",r=0;for(r=0;r<e.length-1;r++)t+=Mr(e[r]);return t+=Mr(e[r]),t}function rt(e){let t=new Uint8Array(e.length/2),r=0,n=0,x=0,i=0;for(n=0;n<e.length;n++){let a=e.charAt(n);Yi(a)&&(r<<=4,r+=Zi(a),x++,x%2===0&&(t[i++]=r,r=0))}return t}var C={numberToHex:Vr,toHex:function(e){let t="";for(let r=0;r<e.length;r++)t+=Vr(e[r]);return t},sha256:function(e,t="HEX"){return X0(yr(rt(e)))},sha256x2:function(e,t="HEX"){return this.sha256(this.sha256(e,t),t)},sha256Checksum:function(e){return this.sha256(this.sha256(e)).slice(0,8)},sha512:function(e,t="HEX"){return X0(Ar(e))},sha512_256:function(e,t="HEX"){return X0(_r(rt(e)))},blake256:function(e){return new Fr().update(e,"hex").digest("hex")},blake256Checksum:function(e){return this.blake256(this.blake256(e)).substr(0,8)},blake2b:function(e,t){return new tt(t).update(nt.Buffer.from(e,"hex")).digest("hex")},keccak256:function(e){return X0(Ur(e))},keccak256Checksum:function(e){return this.keccak256(e).toString().substr(0,8)},blake2b256:function(e){return new tt(32).update(nt.Buffer.from(e,"hex")).digest("hex")},base58:r0.decode,byteArray2hexStr:Qi,hexStr2byteArray:rt,base32:Lr};s();function H(e){return typeof e=="string"?e:e.address}var Dr=4,ea=58;function ta(e){if(e.length!==ea)return!1;{let t=C.base32.b32decode(e),r=t.slice(0,t.length-Dr),n=C.byteArray2hexStr(t.slice(-4));return C.sha512_256(C.byteArray2hexStr(r)).substr(-Dr*2).toUpperCase()===n}}var xt={isValidAddress:function(e){return ta(H(e))}};s();s();var Nr="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ra=[996825010,642813549,513874426,1027748829,705979059],it={BECH32:"bech32",BECH32M:"bech32m"},J={decode:ia,encode:xa,encodings:it,verifyChecksum:zr};function $r(e){return e==it.BECH32?1:e==it.BECH32M?734539939:null}function Pr(e){for(var t=1,r=0;r<e.length;++r){var n=t>>25;t=(t&33554431)<<5^e[r];for(var x=0;x<5;++x)n>>x&1&&(t^=ra[x])}return t}function Gr(e){var t=[],r;for(r=0;r<e.length;++r)t.push(e.charCodeAt(r)>>5);for(t.push(0),r=0;r<e.length;++r)t.push(e.charCodeAt(r)&31);return t}function zr(e,t,r){return Pr(Gr(e).concat(t))===$r(r)}function na(e,t,r){for(var n=Gr(e).concat(t).concat([0,0,0,0,0,0]),x=Pr(n)^$r(r),i=[],a=0;a<6;++a)i.push(x>>5*(5-a)&31);return i}function xa(e,t,r){for(var n=t.concat(na(e,t,r)),x=e+"1",i=0;i<n.length;++i)x+=Nr.charAt(n[i]);return x}function ia(e,t){var r,n=!1,x=!1;for(r=0;r<e.length;++r){if(e.charCodeAt(r)<33||e.charCodeAt(r)>126)return null;e.charCodeAt(r)>=97&&e.charCodeAt(r)<=122&&(n=!0),e.charCodeAt(r)>=65&&e.charCodeAt(r)<=90&&(x=!0)}if(n&&x)return null;e=e.toLowerCase();var i=e.lastIndexOf("1");if(i<1||i+7>e.length||e.length>110)return null;var a=e.substring(0,i),f=[];for(r=i+1;r<e.length;++r){var o=Nr.indexOf(e.charAt(r));if(o===-1)return null;f.push(o)}return zr(a,f,t)?{hrp:a,data:f.slice(0,f.length-6)}:null}s();s();function jr(e,t,r,n){for(var x=0,i=0,a=[],f=(1<<r)-1,o=0;o<e.length;++o){var d=e[o];if(d<0||d>>t)return null;for(x=x<<t|d,i+=t;i>=r;)i-=r,a.push(x>>i&f)}if(n)i>0&&a.push(x<<r-i&f);else if(i>=t||x<<r-i&f)return null;return a}function at(e,t){var r=!1,n=J.decode(t,J.encodings.BECH32);if(n===null&&(n=J.decode(t,J.encodings.BECH32M),r=!0),n===null||n.hrp!==e||n.data.length<1||n.data[0]>16)return null;var x=jr(n.data.slice(1),5,8,!1);return x===null||x.length<2||x.length>40||n.data[0]===0&&x.length!==20&&x.length!==32||n.data[0]===0&&r||n.data[0]!==0&&!r?null:{version:n.data[0],program:x}}function Xr(e,t,r){var n=J.encodings.BECH32;t>0&&(n=J.encodings.BECH32M);var x=J.encode(e,[t].concat(jr(r,8,5,!0)),n);return at(e,x,n)===null?null:x}function aa(e,t={}){if(!t.bech32Hrp||t.bech32Hrp.length===0)return!1;let r=t.bech32Hrp;for(var n of r){var x=at(n,e);if(x)return Xr(n,x.version,x.program)===e.toLowerCase()}return!1}var Wr={encode:Xr,decode:at,isValidAddress:aa};var qr=a0(H0(),1);function fa(e){try{return r0.decode(e)}catch{return null}}function oa(e,t){switch(e){case"blake256keccak256":let r=C.blake2b256(t);return C.keccak256Checksum(qr.Buffer.from(r,"hex"));case"blake256":return C.blake256Checksum(t);case"keccak256":return C.keccak256Checksum(t);case"sha256":default:return C.sha256Checksum(t)}}function ca(e,t){let r=t.expectedLength||25,n=t.hashFunction||"sha256",x=fa(e);if(x){let i=x.length;if(i!==r)return null;if(t.regex&&!t.regex.test(e))return!1;let a=C.toHex(x.slice(i-4,i)),f=C.toHex(x.slice(0,i-4)),o=oa(n,f);return a===o?C.toHex(x.slice(0,r-24)):null}return null}function sa(e,t){let r=ca(e,t);return r?t.addressTypes.indexOf(r)>=0:!1}var n0=e=>({isValidAddress(t){let r=H(t);return sa(r,e)||Wr.isValidAddress(r,e)}});function ua(e,t){let r=new RegExp(t.regexp),n,x=e.split(":");if(x.length===1)n=e;else{if(x[0]!=="bitcoincash")return!1;n=x[1]}if(!r.test(n)||n.toLowerCase()!=n&&n.toUpperCase()!=n)return!1;let i=C.base32.b32decode(n),a=t.networkType==="mainnet"?"bitcoincash":"bchtest";try{if(J.verifyChecksum(a,i,J.encodings.BECH32))return!1}catch{return!1}return!0}var ha={regexp:/^[qQpP][0-9a-zA-Z]{41}$/},ue=e=>({isValidAddress:function(t){let r=H(t),n={...ha,...e};return ua(r,n)||n0(e).isValidAddress(t)}});s();var In=a0(Jr(),1);s();s();s();var la=(e,t=0)=>{let r=~~t,n=0;for(let x=0;x<e.length;x++)n+=e[x];return r+=n%256,r%256},Yr=la;s();s();var Zr=a0(H0(),1),ba=(e,t)=>Zr.Buffer.from(e,t),ft=ba;function M(e,t){let r=(n,x)=>t(ft(n),x)>>>0;return r.signed=(n,x)=>t(ft(n),x),r.unsigned=r,r.model=e,r}var Qr=M("crc1",Yr);s();s();var ot=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];typeof Int32Array<"u"&&(ot=new Int32Array(ot));var pa=(e,t=0)=>{let r=~~t;for(let n=0;n<e.length;n++)r=ot[(r^e[n])&255]&255;return r},en=pa;var tn=M("crc-8",en);s();s();var ct=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];typeof Int32Array<"u"&&(ct=new Int32Array(ct));var ga=(e,t=0)=>{let r=~~t;for(let n=0;n<e.length;n++)r=ct[(r^e[n])&255]&255;return r},rn=ga;var nn=M("dallas-1-wire",rn);s();s();var st=[0,213,127,170,254,43,129,84,41,252,86,131,215,2,168,125,82,135,45,248,172,121,211,6,123,174,4,209,133,80,250,47,164,113,219,14,90,143,37,240,141,88,242,39,115,166,12,217,246,35,137,92,8,221,119,162,223,10,160,117,33,244,94,139,157,72,226,55,99,182,28,201,180,97,203,30,74,159,53,224,207,26,176,101,49,228,78,155,230,51,153,76,24,205,103,178,57,236,70,147,199,18,184,109,16,197,111,186,238,59,145,68,107,190,20,193,149,64,234,63,66,151,61,232,188,105,195,22,239,58,144,69,17,196,110,187,198,19,185,108,56,237,71,146,189,104,194,23,67,150,60,233,148,65,235,62,106,191,21,192,75,158,52,225,181,96,202,31,98,183,29,200,156,73,227,54,25,204,102,179,231,50,152,77,48,229,79,154,206,27,177,100,114,167,13,216,140,89,243,38,91,142,36,241,165,112,218,15,32,245,95,138,222,11,161,116,9,220,118,163,247,34,136,93,214,3,169,124,40,253,87,130,255,42,128,85,1,212,126,171,132,81,251,46,122,175,5,208,173,120,210,7,83,134,44,249];typeof Int32Array<"u"&&(st=new Int32Array(st));var ma=(e,t=0)=>{let r=~~t;for(let n=0;n<e.length;n++)r=st[(r^e[n])&255]&255;return r},xn=ma;var an=M("crc-8-dvbs2",xn);s();s();var dt=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(dt=new Int32Array(dt));var ya=(e,t=0)=>{let r=~~t;for(let n=0;n<e.length;n++)r=(dt[(r^e[n])&255]^r>>8)&65535;return r},fn=ya;var on=M("crc-16",fn);s();s();var ut=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];typeof Int32Array<"u"&&(ut=new Int32Array(ut));var wa=(e,t)=>{let r=typeof t<"u"?~~t:65535;for(let n=0;n<e.length;n++)r=(ut[(r>>8^e[n])&255]^r<<8)&65535;return r},cn=wa;var sn=M("ccitt",cn);s();s();var ht=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(ht=new Int32Array(ht));var Aa=(e,t)=>{let r=typeof t<"u"?~~t:65535;for(let n=0;n<e.length;n++)r=(ht[(r^e[n])&255]^r>>8)&65535;return r},dn=Aa;var un=M("crc-16-modbus",dn);s();s();var _a=(e,t)=>{let r=typeof t<"u"?~~t:0;for(let n=0;n<e.length;n++){let x=r>>>8&255;x^=e[n]&255,x^=x>>>4,r=r<<8&65535,r^=x,x=x<<5&65535,r^=x,x=x<<7&65535,r^=x}return r},hn=_a;var ln=M("xmodem",hn);s();s();var lt=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];typeof Int32Array<"u"&&(lt=new Int32Array(lt));var Ba=(e,t)=>{let r=typeof t<"u"?~~t:0;for(let n=0;n<e.length;n++)r=(lt[(r^e[n])&255]^r>>8)&65535;return r},bn=Ba;var pn=M("kermit",bn);s();s();var bt=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];typeof Int32Array<"u"&&(bt=new Int32Array(bt));var va=(e,t)=>{let r=typeof t<"u"?~~t:11994318;for(let n=0;n<e.length;n++)r=(bt[(r>>16^e[n])&255]^r<<8)&16777215;return r},gn=va;var mn=M("crc-24",gn);s();s();var pt=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(pt=new Int32Array(pt));var Ea=(e,t)=>{let r=t===0?0:~~t^-1;for(let n=0;n<e.length;n++)r=pt[(r^e[n])&255]^r>>>8;return r^-1},yn=Ea;var wn=M("crc-32",yn);s();s();var gt=[0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188];typeof Int32Array<"u"&&(gt=new Int32Array(gt));var Ia=(e,t)=>{let r=typeof t<"u"?~~t:4294967295;for(let n=0;n<e.length;n++)r=gt[(r>>24^e[n])&255]^r<<8;return r},An=Ia;var _n=M("crc-32-mpeg",An);s();s();var mt=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(mt=new Int32Array(mt));var Ca=(e,t=-1)=>{let r=t===0?0:~~t;for(let n=0;n<e.length;n++)r=mt[(r^e[n])&255]^r>>>8;return r},Bn=Ca;var vn=M("jam",Bn);var le={crc1:Qr,crc8:tn,crc81wire:nn,crc8dvbs2:an,crc16:on,crc16ccitt:sn,crc16modbus:un,crc16xmodem:ln,crc16kermit:pn,crc24:mn,crc32:wn,crc32mpeg2:_n,crcjam:vn};s();var En={isValidAddress:function(e,t){let r=J.decode(e,J.encodings.BECH32);if(!r)return!1;let n=r.hrp;return t.bech32Hrp.indexOf(n)!==-1}};function Ua(e){try{let t=r0.decode(e);return In.default.decode(new Uint8Array(t).buffer)}catch{return null}}function Ta(e){let t=Ua(e);if(!t||!Array.isArray(t)&&t.length!=2)return!1;let r=t[0],n=t[1];return typeof n!="number"?!1:le.crc32(r)==n}function La(e,t){return En.isValidAddress(e,t)}var yt={isValidAddress(e){let t=H(e);return Ta(H(t))||La(t,{bech32Hrp:["addr"]})}};s();function Fa(e){let t=/^[a-z0-9.]+$/g;return e.search(t)!==-1&&e.length===12}var wt={isValidAddress:function(e){return Fa(H(e))}};s();var At={isValidAddress:function(e){let t=H(e);return/^0x[0-9a-fA-F]{40}$/.test(t)?/^0x[0-9a-f]{40}$/.test(t)||/^0x?[0-9A-F]{40}$/.test(t)?!0:this.verifyChecksum(t):!1},verifyChecksum:function(e){e=e.replace("0x","");let t=C.keccak256(e.toLowerCase());for(let r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0}};s();var _t={isValidAddress(e){return/^\d+\.\d+\.\d+$/.test(H(e))}};s();s();s();var _={};function c(e,t,r){if(r!==_)return e instanceof c?e:typeof e>"u"?G:c.parse(e);for(e=e||[];e.length&&!e[e.length-1];)--e.length;this._d=e,this._s=e.length?t||1:0}c._construct=function(e,t){return new c(e,t,_)};var R=1e7,x0=7;c.base=R;c.base_log10=x0;var G=new c([],0,_);c.ZERO=G;var Q=new c([1],1,_);c.ONE=Q;var be=new c(Q._d,-1,_);c.M_ONE=be;c._0=G;c._1=Q;c.small=[G,Q,new c([2],1,_),new c([3],1,_),new c([4],1,_),new c([5],1,_),new c([6],1,_),new c([7],1,_),new c([8],1,_),new c([9],1,_),new c([10],1,_),new c([11],1,_),new c([12],1,_),new c([13],1,_),new c([14],1,_),new c([15],1,_),new c([16],1,_),new c([17],1,_),new c([18],1,_),new c([19],1,_),new c([20],1,_),new c([21],1,_),new c([22],1,_),new c([23],1,_),new c([24],1,_),new c([25],1,_),new c([26],1,_),new c([27],1,_),new c([28],1,_),new c([29],1,_),new c([30],1,_),new c([31],1,_),new c([32],1,_),new c([33],1,_),new c([34],1,_),new c([35],1,_),new c([36],1,_)];c.digits="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");c.prototype.toString=function(e){if(e=+e||10,e<2||e>36)throw new Error("illegal radix "+e+".");if(this._s===0)return"0";if(e===10){var t=this._s<0?"-":"";t+=this._d[this._d.length-1].toString();for(var r=this._d.length-2;r>=0;r--){for(var n=this._d[r].toString();n.length<x0;)n="0"+n;t+=n}return t}else{var x=c.digits;e=c.small[e];for(var i=this._s,a=this.abs(),f=[],o;a._s!==0;){var d=a.divRem(e);a=d[0],o=d[1],f.push(x[o.valueOf()])}return(i<0?"-":"")+f.reverse().join("")}};c.radixRegex=[/^$/,/^$/,/^[01]*$/,/^[012]*$/,/^[0-3]*$/,/^[0-4]*$/,/^[0-5]*$/,/^[0-6]*$/,/^[0-7]*$/,/^[0-8]*$/,/^[0-9]*$/,/^[0-9aA]*$/,/^[0-9abAB]*$/,/^[0-9abcABC]*$/,/^[0-9a-dA-D]*$/,/^[0-9a-eA-E]*$/,/^[0-9a-fA-F]*$/,/^[0-9a-gA-G]*$/,/^[0-9a-hA-H]*$/,/^[0-9a-iA-I]*$/,/^[0-9a-jA-J]*$/,/^[0-9a-kA-K]*$/,/^[0-9a-lA-L]*$/,/^[0-9a-mA-M]*$/,/^[0-9a-nA-N]*$/,/^[0-9a-oA-O]*$/,/^[0-9a-pA-P]*$/,/^[0-9a-qA-Q]*$/,/^[0-9a-rA-R]*$/,/^[0-9a-sA-S]*$/,/^[0-9a-tA-T]*$/,/^[0-9a-uA-U]*$/,/^[0-9a-vA-V]*$/,/^[0-9a-wA-W]*$/,/^[0-9a-xA-X]*$/,/^[0-9a-yA-Y]*$/,/^[0-9a-zA-Z]*$/];c.parse=function(e,t){function r(u){return u=u.replace(/\s*[*xX]\s*10\s*(\^|\*\*)\s*/,"e"),u.replace(/^([+\-])?(\d+)\.?(\d*)[eE]([+\-]?\d+)$/,function(m,p,v,g,b){b=+b;var y=b<0,B=v.length+b;m=(y?v:g).length,b=(b=Math.abs(b))>=m?b-m+y:0;var A=new Array(b+1).join("0"),I=v+g;return(p||"")+(y?I=A+I:I+=A).substr(0,B+=y?A.length:0)+(B<I.length?"."+I.substr(B):"")})}e=e.toString(),(typeof t>"u"||+t==10)&&(e=r(e));var n;typeof t>"u"?n="0[xcb]":t==16?n="0x":t==8?n="0c":t==2?n="0b":n="";var x=new RegExp("^([+\\-]?)("+n+")?([0-9a-z]*)(?:\\.\\d*)?$","i").exec(e);if(x){var i=x[1]||"+",a=x[2]||"",f=x[3]||"";if(typeof t>"u")a==="0x"||a==="0X"?t=16:a==="0c"||a==="0C"?t=8:a==="0b"||a==="0B"?t=2:t=10;else if(t<2||t>36)throw new Error("Illegal radix "+t+".");if(t=+t,!c.radixRegex[t].test(f))throw new Error("Bad digit for radix "+t);if(f=f.replace(/^0+/,"").split(""),f.length===0)return G;if(i=i==="-"?-1:1,t==10){for(var o=[];f.length>=x0;)o.push(parseInt(f.splice(f.length-c.base_log10,c.base_log10).join(""),10));return o.push(parseInt(f.join(""),10)),new c(o,i,_)}var o=G;t=c.small[t];for(var d=c.small,h=0;h<f.length;h++)o=o.multiply(t).add(d[parseInt(f[h],36)]);return new c(o._d,i,_)}else throw new Error("Invalid BigInteger format: "+e)};c.prototype.add=function(e){if(this._s===0)return c(e);if(e=c(e),e._s===0)return this;if(this._s!==e._s)return e=e.negate(),this.subtract(e);for(var t=this._d,r=e._d,n=t.length,x=r.length,i=new Array(Math.max(n,x)+1),a=Math.min(n,x),f=0,o,d=0;d<a;d++)o=t[d]+r[d]+f,i[d]=o%R,f=o/R|0;for(x>n&&(t=r,n=x),d=a;f&&d<n;d++)o=t[d]+f,i[d]=o%R,f=o/R|0;for(f&&(i[d]=f);d<n;d++)i[d]=t[d];return new c(i,this._s,_)};c.prototype.negate=function(){return new c(this._d,-this._s|0,_)};c.prototype.abs=function(){return this._s<0?this.negate():this};c.prototype.subtract=function(e){if(this._s===0)return c(e).negate();if(e=c(e),e._s===0)return this;if(this._s!==e._s)return e=e.negate(),this.add(e);var t=this;this._s<0&&(t=new c(e._d,1,_),e=new c(this._d,1,_));var r=t.compareAbs(e);if(r===0)return G;if(r<0){var n=e;e=t,t=n}var x=t._d,i=e._d,a=x.length,f=i.length,o=new Array(a),d=0,h,u;for(h=0;h<f;h++)u=x[h]-d-i[h],u<0?(u+=R,d=1):d=0,o[h]=u;for(h=f;h<a;h++){if(u=x[h]-d,u<0)u+=R;else{o[h++]=u;break}o[h]=u}for(;h<a;h++)o[h]=x[h];return new c(o,r,_)};(function(){function e(r,n){for(var x=r._d,i=x.slice(),a=!0,f=0;;){var o=(x[f]||0)+1;if(i[f]=o%R,o<=R-1)break;++f}return new c(i,n,_)}function t(r,n){for(var x=r._d,i=x.slice(),a=!0,f=0;;){var o=(x[f]||0)-1;if(o<0)i[f]=o+R;else{i[f]=o;break}++f}return new c(i,n,_)}c.prototype.next=function(){switch(this._s){case 0:return Q;case-1:return t(this,-1);default:return e(this,1)}},c.prototype.prev=function(){switch(this._s){case 0:return be;case-1:return e(this,-1);default:return t(this,1)}}})();c.prototype.compareAbs=function(e){if(this===e)return 0;if(!(e instanceof c)){if(!isFinite(e))return isNaN(e)?e:-1;e=c(e)}if(this._s===0)return e._s!==0?-1:0;if(e._s===0)return 1;var t=this._d.length,r=e._d.length;if(t<r)return-1;if(t>r)return 1;for(var n=this._d,x=e._d,i=t-1;i>=0;i--)if(n[i]!==x[i])return n[i]<x[i]?-1:1;return 0};c.prototype.compare=function(e){if(this===e)return 0;if(e=c(e),this._s===0)return-e._s;if(this._s===e._s){var t=this.compareAbs(e);return t*this._s}else return this._s};c.prototype.isUnit=function(){return this===Q||this===be||this._d.length===1&&this._d[0]===1};c.prototype.multiply=function(e){if(this._s===0||(e=c(e),e._s===0))return G;if(this.isUnit())return this._s<0?e.negate():e;if(e.isUnit())return e._s<0?this.negate():this;if(this===e)return this.square();var t=this._d.length>=e._d.length,r=(t?this:e)._d,n=(t?e:this)._d,x=r.length,i=n.length,a=x+i,f=new Array(a),o;for(o=0;o<a;o++)f[o]=0;for(o=0;o<i;o++){for(var d=0,h=n[o],u=x+o,m,p=o;p<u;p++)m=f[p]+h*r[p-o]+d,d=m/R|0,f[p]=m%R|0;d&&(m=f[p]+d,d=m/R|0,f[p]=m%R)}return new c(f,this._s*e._s,_)};c.prototype.multiplySingleDigit=function(e){if(e===0||this._s===0)return G;if(e===1)return this;var t;if(this._d.length===1)return t=this._d[0]*e,t>=R?new c([t%R|0,t/R|0],1,_):new c([t],1,_);if(e===2)return this.add(this);if(this.isUnit())return new c([e],1,_);for(var r=this._d,n=r.length,x=n+1,i=new Array(x),a=0;a<x;a++)i[a]=0;for(var f=0,o=0;o<n;o++)t=e*r[o]+f,f=t/R|0,i[o]=t%R|0;return f&&(i[o]=f),new c(i,1,_)};c.prototype.square=function(){if(this._s===0)return G;if(this.isUnit())return Q;var e=this._d,t=e.length,r=new Array(t+t+1),n,x,i,a;for(a=0;a<t;a++)i=a*2,n=e[a]*e[a],x=n/R|0,r[i]=n%R,r[i+1]=x;for(a=0;a<t;a++){x=0,i=a*2+1;for(var f=a+1;f<t;f++,i++)n=e[f]*e[a]*2+r[i]+x,x=n/R|0,r[i]=n%R;i=t+a;var o=x+r[i];x=o/R|0,r[i]=o%R,r[i+1]+=x}return new c(r,1,_)};c.prototype.quotient=function(e){return this.divRem(e)[0]};c.prototype.divide=c.prototype.quotient;c.prototype.remainder=function(e){return this.divRem(e)[1]};c.prototype.divRem=function(e){if(e=c(e),e._s===0)throw new Error("Divide by zero");if(this._s===0)return[G,G];if(e._d.length===1)return this.divRemSmall(e._s*e._d[0]);switch(this.compareAbs(e)){case 0:return[this._s===e._s?Q:be,G];case-1:return[G,this]}for(var t=this._s*e._s,r=e.abs(),n=this._d,x=n.length,i=e._d.length,a=[],f,o=new c([],0,_);x;){if(o._d.unshift(n[--x]),o=new c(o._d,1,_),o.compareAbs(e)<0){a.push(0);continue}if(o._s===0)f=0;else{var d=o._d.length,h=r._d.length,u=o._d[d-1]*R+o._d[d-2],m=r._d[h-1]*R+r._d[h-2];o._d.length>r._d.length&&(u=(u+1)*R),f=Math.ceil(u/m)}do{var p=r.multiplySingleDigit(f);if(p.compareAbs(o)<=0)break;f--}while(f);if(a.push(f),!!f){var v=o.subtract(p);o._d=v._d.slice()}}return[new c(a.reverse(),t,_),new c(o._d,this._s,_)]};c.prototype.divRemSmall=function(e){var t;if(e=+e,e===0)throw new Error("Divide by zero");var r=e<0?-1:1,n=this._s*r;if(e=Math.abs(e),e<1||e>=R)throw new Error("Argument out of range");if(this._s===0)return[G,G];if(e===1||e===-1)return[n===1?this.abs():new c(this._d,n,_),G];if(this._d.length===1){var x=new c([this._d[0]/e|0],1,_);return t=new c([this._d[0]%e|0],1,_),n<0&&(x=x.negate()),this._s<0&&(t=t.negate()),[x,t]}for(var i=this._d.slice(),a=new Array(i.length),f=0,o=0,d=0,h;i.length;){if(f=f*R+i[i.length-1],f<e){a[d++]=0,i.pop(),o=R*o+f;continue}f===0?h=0:h=f/e|0;var u=e*h;if(o=f-u,a[d++]=h,!h){i.pop();continue}i.pop(),f=o}return t=new c([o],1,_),this._s<0&&(t=t.negate()),[new c(a.reverse(),n,_),t]};c.prototype.isEven=function(){var e=this._d;return this._s===0||e.length===0||e[0]%2===0};c.prototype.isOdd=function(){return!this.isEven()};c.prototype.sign=function(){return this._s};c.prototype.isPositive=function(){return this._s>0};c.prototype.isNegative=function(){return this._s<0};c.prototype.isZero=function(){return this._s===0};c.prototype.exp10=function(e){if(e=+e,e===0)return this;if(Math.abs(e)>Number(Bt))throw new Error("exponent too large in BigInteger.exp10");if(this._s===0)return G;if(e>0){for(var t=new c(this._d.slice(),this._s,_);e>=x0;e-=x0)t._d.unshift(0);return e==0?t:(t._s=1,t=t.multiplySingleDigit(Math.pow(10,e)),this._s<0?t.negate():t)}else{if(-e>=this._d.length*x0)return G;var t=new c(this._d.slice(),this._s,_);for(e=-e;e>=x0;e-=x0)t._d.shift();return e==0?t:t.divRemSmall(Math.pow(10,e))[0]}};c.prototype.pow=function(e){if(this.isUnit())return this._s>0?this:c(e).isOdd()?this:this.negate();if(e=c(e),e._s===0)return Q;if(e._s<0){if(this._s===0)throw new Error("Divide by zero");return G}if(this._s===0)return G;if(e.isUnit())return this;if(e.compareAbs(Bt)>0)throw new Error("exponent too large in BigInteger.pow");for(var t=this,r=Q,n=c.small[2];e.isPositive();){if(e.isOdd()&&(r=r.multiply(t),e.isUnit()))return r;t=t.square(),e=e.quotient(n)}return r};c.prototype.modPow=function(e,t){for(var r=Q,n=this;e.isPositive();)e.isOdd()&&(r=r.multiply(n).remainder(t)),e=e.quotient(c.small[2]),e.isPositive()&&(n=n.square().remainder(t));return r};c.prototype.log=function(){switch(this._s){case 0:return-1/0;case-1:return NaN;default:}var e=this._d.length;if(e*x0<30)return Math.log(this.valueOf());var t=Math.ceil(30/x0),r=this._d.slice(e-t);return Math.log(new c(r,1,_).valueOf())+(e-t)*Math.log(R)};c.prototype.valueOf=function(){return parseInt(this.toString(),10)};c.prototype.toJSValue=function(){return parseInt(this.toString(),10)};c.prototype.lowVal=function(){return this._d[0]||0};var Bt=c(2147483647);c.MAX_EXP=Bt;(function(){function e(n){return function(x){return n.call(c(x))}}function t(n){return function(x,i){return n.call(c(x),c(i))}}function r(n){return function(x,i,a){return n.call(c(x),c(i),c(a))}}(function(){var n,x,i="toJSValue,isEven,isOdd,sign,isZero,isNegative,abs,isUnit,square,negate,isPositive,toString,next,prev,log".split(","),a="compare,remainder,divRem,subtract,add,quotient,divide,multiply,pow,compareAbs".split(","),f=["modPow"];for(n=0;n<i.length;n++)x=i[n],c[x]=e(c.prototype[x]);for(n=0;n<a.length;n++)x=a[n],c[x]=t(c.prototype[x]);for(n=0;n<f.length;n++)x=f[n],c[x]=r(c.prototype[x]);c.exp10=function(o,d){return c(o).exp10(d)}})()})();var ka=function(){for(var e={},t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",r=[],n=0;n<t.length;n++)r.push(t.charCodeAt(n));var x=[0,2,3,5,6,7,9,10,11],i=r.length,a=8,f=11,o=new c(2).pow(64);function d(g){if(g.length%2!==0)throw"Hex string has invalid length!";for(var b=new Uint8Array(g.length/2),y=0;y<g.length/2;++y)b[y]=parseInt(g.slice(y*2,y*2+2),16);return b}function h(g){for(var b=[],y=0;y<g.length;++y)b.push(("0"+g[y].toString(16)).slice(-2));return b.join("")}function u(g){for(var b=new Uint8Array(g.length),y=0;y<g.length;y++)b[y]=g.charCodeAt(y);return b}function m(g){for(var b=[],y=0;y<g.length;y++)b.push(String.fromCharCode(g[y]));return b.join("")}function p(g){if(g.length<1||g.length>8)throw"Invalid input length";var b=c.ZERO,y=new c(2).pow(8),B=0;switch(9-g.length){case 1:b=b.add(g[B++]);case 2:b=b.multiply(y).add(g[B++]);case 3:b=b.multiply(y).add(g[B++]);case 4:b=b.multiply(y).add(g[B++]);case 5:b=b.multiply(y).add(g[B++]);case 6:b=b.multiply(y).add(g[B++]);case 7:b=b.multiply(y).add(g[B++]);case 8:b=b.multiply(y).add(g[B++]);break;default:throw"Impossible condition"}return b}function v(g,b){var y=new Uint8Array(b);if(b<1||b>8)throw"Invalid input length";for(var B=new c(2).pow(8),A=b-1;A>=0;A--)y[A]=g.remainder(B).toJSValue(),g=g.divide(B);return y}return e.encode_block=function(g,b,y){if(g.length<1||g.length>f)throw"Invalid block length: "+g.length;for(var B=p(g),A=x[g.length]-1;B.compare(0)===1;){var I=B.divRem(i),T=I[1];B=I[0],b[y+A]=r[T.toJSValue()],A--}return b},e.encode=function(g){var b=d(g);if(b.length===0)return"";var y=Math.floor(b.length/a),B=b.length%a,A=y*f+x[B],I=new Uint8Array(A),T;for(T=0;T<A;++T)I[T]=r[0];for(T=0;T<y;T++)I=e.encode_block(b.subarray(T*a,T*a+a),I,T*f);return B>0&&(I=e.encode_block(b.subarray(y*a,y*a+B),I,y*f)),m(I)},e.decode_block=function(g,b,y){if(g.length<1||g.length>f)throw"Invalid block length: "+g.length;var B=x.indexOf(g.length);if(B<=0)throw"Invalid block size";for(var A=new c(0),I=new c(1),T=g.length-1;T>=0;T--){var D=r.indexOf(g[T]);if(D<0)throw"Invalid symbol";var P=I.multiply(D).add(A);if(P.compare(o)===1)throw"Overflow";A=P,I=I.multiply(i)}if(B<a&&new c(2).pow(8*B).compare(A)<=0)throw"Overflow 2";return b.set(v(A,B),y),b},e.decode=function(g){if(g=u(g),g.length===0)return"";var b=Math.floor(g.length/f),y=g.length%f,B=x.indexOf(y);if(B<0)throw"Invalid encoded length";for(var A=b*a+B,I=new Uint8Array(A),T=0;T<b;T++)I=e.decode_block(g.subarray(T*f,T*f+f),I,T*a);return y>0&&(I=e.decode_block(g.subarray(b*f,b*f+y),I,b*a)),h(I)},e}(),Cn=ka;var Sa=new RegExp("^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{95}$"),Oa=new RegExp("^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{106}$"),Un={addressTypes:{mainnet:["18","42"],testnet:["53","63"],stagenet:["24"]},iAddressTypes:{mainnet:["19"],testnet:["54"],stagenet:["25"]}};function Ha(e,t,r){let n=r==="integrated"?Un.iAddressTypes[t]:Un.addressTypes[t],x=parseInt(e.substr(0,2),16).toString();switch(t){case"mainnet":return n.indexOf(x)>=0;case"testnet":return n.indexOf(x)>=0;default:return!1}}function Ra(e){if(e.length%2!==0)return null;let t=new Uint8Array(e.length/2);for(let r=0;r<e.length/2;++r)t[r]=parseInt(e.slice(r*2,r*2+2),16);return t}var pe=e=>({isValidAddress(t){let r=H(t),n="standard";if(!Sa.test(r))if(Oa.test(r))n="integrated";else return!1;let x=Cn.decode(r);if(!x||!Ha(x,e,n))return!1;let i=x.slice(-8),a=C.keccak256Checksum(Ra(x.slice(0,-8)));return i===a}});s();var Va=new RegExp("^0x[0-9a-fA-F]{64}$"),ge={isValidAddress(e){let t=H(e);return Va.test(t)}};s();var Tn=a0(H0(),1);var vt={isValidAddress(e){let t=H(e).toString().toUpperCase().replace(/-/g,"");if(!e||t.length!==40)return!1;let r=C.toHex(C.base32.b32decode(t));return C.keccak256Checksum(Tn.Buffer.from(r.slice(0,42),"hex"))===r.slice(42)}};s();var kn=a0(me(),1);var Sn="13456789abcdefghijkmnopqrstuwxyz",Da=(0,kn.default)(Sn),Fn=new RegExp("^(xrb|nano)_(["+Sn+"]{60})$"),Et={isValidAddress(e){let t=H(e);return Fn.test(t)?this.verifyChecksum(t):!1},verifyChecksum:function(e){let t=Da.decode(Fn.exec(e)[2]).slice(-37),r=C.blake2b(C.toHex(t.slice(0,-5)),5),n=C.toHex(t.slice(-5).reverse());return r===n}};s();var Na=[{addressLength:3,accountIndexLength:1,checkSumLength:1},{addressLength:4,accountIndexLength:2,checkSumLength:1},{addressLength:5,accountIndexLength:2,checkSumLength:2},{addressLength:6,accountIndexLength:4,checkSumLength:1},{addressLength:7,accountIndexLength:4,checkSumLength:2},{addressLength:8,accountIndexLength:4,checkSumLength:3},{addressLength:9,accountIndexLength:4,checkSumLength:4},{addressLength:10,accountIndexLength:8,checkSumLength:1},{addressLength:11,accountIndexLength:8,checkSumLength:2},{addressLength:12,accountIndexLength:8,checkSumLength:3},{addressLength:13,accountIndexLength:8,checkSumLength:4},{addressLength:14,accountIndexLength:8,checkSumLength:5},{addressLength:15,accountIndexLength:8,checkSumLength:6},{addressLength:16,accountIndexLength:8,checkSumLength:7},{addressLength:17,accountIndexLength:8,checkSumLength:8},{addressLength:34,accountIndexLength:32,checkSumLength:2}];function $a(e){try{let t="53533538505245",r=C.base58(e),n=C.byteArray2hexStr(r.slice(0,1)),x=r.slice(1),i=Na.find(d=>d.addressLength===x.length);if(!i)throw new Error("Invalid address length");let a=C.byteArray2hexStr(x.slice(0,i.accountIndexLength)),f=C.byteArray2hexStr(x.slice(-i.checkSumLength));return C.blake2b(t+n+a,64).substr(0,i.checkSumLength*2).toUpperCase()==f}catch{return!1}}var It={isValidAddress(e){return $a(H(e))}};s();var On=a0(me(),1);var Hn="rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz",Pa=(0,On.default)(Hn),Ga=new RegExp("^r["+Hn+"]{27,35}$"),Ct={isValidAddress:function(e){let t=H(e),r=e.destinationTag;return Ga.test(t)&&this.verifyChecksum(t)&&this.verifyMemo(r)},verifyMemo(e){if(!e)return!0;let t=Number(e);return/^[0-9]+$/.test(e)&&t>=0&&t<=4294967295},verifyChecksum:function(e){let t=Pa.decode(e),r=C.sha256Checksum(C.toHex(t.slice(0,-4))),n=C.toHex(t.slice(-4));return r===n}};s();var gx=a0(px(),1);function _o(e){let t=e.slice(0,64),r=e.slice(32*2,38*2),n=C.blake2b(t,32).slice(0,6*2);return!!(0,gx.default)(n,r)}var Dt={isValidAddress:function(e){let t=H(e);return t.length!==76?!1:_o(t)}};s();s();var mx={isValidAddress:function(e,t){try{if(!e||e.length==0||t.minLength&&e.length<t.minLength||t.maxLength&&e.length>t.maxLength)return!1;try{let r=r0.decode(e);if(!r||!r.length)return!1}catch{return!1}return!0}catch{return!1}}};var Nt={isValidAddress:function(e){return mx.isValidAddress(H(e),{maxLength:44,minLength:43})}};s();var Bo=new Uint8Array([6,161,159]);function vo(e){let t=e.slice(0,-4),r=e.slice(-4),n=C.hexStr2byteArray(C.sha256x2(C.byteArray2hexStr(t)));if(!(r[0]^n[0]|r[1]^n[1]|r[2]^n[2]|r[3]^n[3]))return t}var $t={isValidAddress(e){try{let t=r0.decode(H(e)),r=vo(t);return r?(r.slice(Bo.length),!0):!1}catch{return!1}}};s();function Eo(e){if(typeof e!="string"||e.length!==34)return!1;let t;try{t=C.base58(e)}catch{return!1}let n=t.length-4,x=t.slice(n);t=t.slice(0,n);let i=C.sha256(C.byteArray2hexStr(t)),f=C.hexStr2byteArray(C.sha256(i)).slice(0,4);return x[0]===f[0]&&x[1]===f[1]&&x[2]===f[2]&&x[3]===f[3]?t:!1}var Io={addressTypes:["65"]},Pt=e=>({isValidAddress:function(t){let r={...Io,...e},n=Eo(H(t));return!n||n.length!==21?!1:r.addressTypes.includes(n[0].toString())}});s();var yx=a0(me(),1);var wx="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Co=(0,yx.default)(wx),Uo=new RegExp("^["+wx+"]{56}$"),To=48;function Lo(e){let t=e&255,r=e>>8&255;return t<<8|r}var Gt={isValidAddress:function(e){let t=H(e),r=e.destinationTag;return Uo.test(t)&&this.verifyChecksum(t)&&this.verifyMemo(r)},verifyMemo(e){return e?new TextEncoder().encode(e).length<=28:!0},verifyChecksum:function(e){var t=Co.decode(e);if(t[0]!==To)return!1;let r=C.numberToHex(Lo(le.crc16xmodem(t.slice(0,-2))),4),n=C.toHex(t.slice(-2));return r===n}};var Le={algorand:{validator:xt},aptos:{validator:ge},bitcoin:{alternatives:["btc","omni"],validator:{mainnet:n0({addressTypes:["00","05"],bech32Hrp:["bc"]}),testnet:n0({addressTypes:["6f","c4","3c","26"],bech32Hrp:["tb"]})}},bitcoincash:{alternatives:["bch","bitcoin-cash","bitcoin cash"],validator:{mainnet:ue({addressTypes:["00","05"],bech32Hrp:["bc"],networkType:"mainnet"}),testnet:ue({addressTypes:["6f","c4","3c","26"],bech32Hrp:["tb"],networkType:"testnet"})}},cardano:{alternatives:["ada"],validator:yt},doge:{alternatives:["dogecoin"],validator:{mainnet:n0({addressTypes:["1e","16"]}),testnet:n0({addressTypes:["71","c4"]})}},eos:{validator:wt},ethereum:{alternatives:["eth","erc20","flare","avalanche","avalanche-c","bsc","bnb","binance"],validator:At},hedera:{alternatives:["hbar"],validator:_t},litecoin:{alternatives:["ltc"],validator:{mainnet:n0({addressTypes:["30","05","32"],bech32Hrp:["ltc"]}),testnet:n0({addressTypes:["6f","c4","3a"],bech32Hrp:["tltc"]})}},monero:{validator:{mainnet:pe("mainnet"),testnet:pe("testnet")}},nem:{validator:vt},nano:{validator:Et},polkadot:{validator:It},ripple:{alternatives:["xrp"],validator:Ct},sia:{validator:Dt},solana:{alternatives:["spl"],validator:Nt},sui:{validator:ge},tron:{alternatives:["trc20"],validator:Pt()},tezos:{validator:$t},xlm:{alternatives:["stellar"],validator:Gt}};function Ax(e){let t=e.chain||e,r=e.networkType||"mainnet",n=Object.keys(Le).find(x=>x.toUpperCase()===t.toUpperCase()||Le[x]?.alternatives?.map(i=>i.toUpperCase())?.includes(t.toUpperCase()));return Le[n]?.validator[r]||Le[n]?.validator}function Fo(e,t){let r=Ax(t);if(r)return r.isValidAddress(e);throw new Error(`Missing validator for chain: ${t}`)}return Lx(ko);})();
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
ieee754/index.js:
|
|
5
|
+
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
6
|
+
|
|
7
|
+
buffer/index.js:
|
|
8
|
+
(*!
|
|
9
|
+
* The buffer module from node.js, for the browser.
|
|
10
|
+
*
|
|
11
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
12
|
+
* @license MIT
|
|
13
|
+
*)
|
|
14
|
+
|
|
15
|
+
@noble/hashes/esm/utils.js:
|
|
16
|
+
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
17
|
+
*/
|
package/package.json
CHANGED
package/src/chain-validators.ts
CHANGED
|
@@ -80,6 +80,7 @@ const chainValidators: ChainValidators = {
|
|
|
80
80
|
'avalanche',
|
|
81
81
|
'avalanche-c',
|
|
82
82
|
'base',
|
|
83
|
+
'berachain',
|
|
83
84
|
'binance',
|
|
84
85
|
'BinanceSmartChain',
|
|
85
86
|
'bnb',
|
|
@@ -90,6 +91,7 @@ const chainValidators: ChainValidators = {
|
|
|
90
91
|
'erc20',
|
|
91
92
|
'flare',
|
|
92
93
|
'sonic',
|
|
94
|
+
'story',
|
|
93
95
|
],
|
|
94
96
|
validator: ETHValidator
|
|
95
97
|
},
|
|
@@ -69,7 +69,7 @@ const TestCases: Record<string, TestCase> = {
|
|
|
69
69
|
valid: 'eos',
|
|
70
70
|
},
|
|
71
71
|
'ethereum': {
|
|
72
|
-
alternatives: ['eth', 'flare', 'avalanche', 'avalanche-c', 'bsc', 'bnb', 'binance'],
|
|
72
|
+
alternatives: ['eth', 'flare', 'avalanche', 'avalanche-c', 'bsc', 'bnb', 'binance', 'sonic', 'berachain', 'story'],
|
|
73
73
|
valid: 'evm',
|
|
74
74
|
},
|
|
75
75
|
'hedera': {
|