UNPKG

@overgold/light-client

Version:

## Установка переменных

2 lines 4.35 MB
/*! For license information please see index.bundle.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["light-client"]=t():e["light-client"]=t()}(self,(()=>(()=>{var __webpack_modules__={"./node_modules/base64-js/index.js":(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],c=i[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),d=0,l=c>0?a-4:a;for(r=0;r<l;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[d++]=255&t);1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,u=n-o;s<u;s+=a)i.push(c(e,s,s+a>u?u:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(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("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},"./node_modules/bech32/dist/index.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bech32m=t.bech32=void 0;const r="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={};for(let e=0;e<32;e++){const t=r.charAt(e);n[t]=e}function o(e){const t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function i(e){let t=1;for(let r=0;r<e.length;++r){const n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}t=o(t);for(let r=0;r<e.length;++r){const n=e.charCodeAt(r);t=o(t)^31&n}return t}function a(e,t,r,n){let o=0,i=0;const a=(1<<r)-1,s=[];for(let n=0;n<e.length;++n)for(o=o<<t|e[n],i+=t;i>=r;)i-=r,s.push(o>>i&a);if(n)i>0&&s.push(o<<r-i&a);else{if(i>=t)return"Excess padding";if(o<<r-i&a)return"Non-zero padding"}return s}function s(e){return a(e,8,5,!0)}function c(e){const t=a(e,5,8,!1);if(Array.isArray(t))return t}function u(e){const t=a(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function d(e){let t;function a(e,r){if(r=r||90,e.length<8)return e+" too short";if(e.length>r)return"Exceeds length limit";const a=e.toLowerCase(),s=e.toUpperCase();if(e!==a&&e!==s)return"Mixed-case string "+e;const c=(e=a).lastIndexOf("1");if(-1===c)return"No separator character for "+e;if(0===c)return"Missing prefix for "+e;const u=e.slice(0,c),d=e.slice(c+1);if(d.length<6)return"Data too short";let l=i(u);if("string"==typeof l)return l;const A=[];for(let e=0;e<d.length;++e){const t=d.charAt(e),r=n[t];if(void 0===r)return"Unknown character "+t;l=o(l)^r,e+6>=d.length||A.push(r)}return l!==t?"Invalid checksum for "+e:{prefix:u,words:A}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){const r=a(e,t);if("object"==typeof r)return r},decode:function(e,t){const r=a(e,t);if("object"==typeof r)return r;throw new Error(r)},encode:function(e,n,a){if(a=a||90,e.length+7+n.length>a)throw new TypeError("Exceeds length limit");let s=i(e=e.toLowerCase());if("string"==typeof s)throw new Error(s);let c=e+"1";for(let e=0;e<n.length;++e){const t=n[e];if(t>>5!=0)throw new Error("Non 5-bit word");s=o(s)^t,c+=r.charAt(t)}for(let e=0;e<6;++e)s=o(s);s^=t;for(let e=0;e<6;++e){c+=r.charAt(s>>5*(5-e)&31)}return c},toWords:s,fromWordsUnsafe:c,fromWords:u}}t.bech32=d("bech32"),t.bech32m=d("bech32m")},"./node_modules/bip39/src/_wordlists.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={};let o;t.wordlists=n,t._default=o;try{t._default=o=r("./node_modules/bip39/src/wordlists/czech.json"),n.czech=o}catch(e){}try{t._default=o=r("./node_modules/bip39/src/wordlists/chinese_simplified.json"),n.chinese_simplified=o}catch(e){}try{t._default=o=r("./node_modules/bip39/src/wordlists/chinese_traditional.json"),n.chinese_traditional=o}catch(e){}try{t._default=o=r("./node_modules/bip39/src/wordlists/korean.json"),n.korean=o}catch(e){}try{t._default=o=r("./node_modules/bip39/src/wordlists/french.json"),n.french=o}catch(e){}try{t._default=o=r("./node_modules/bip39/src/wordlists/italian.json"),n.italian=o}catch(e){}try{t._default=o=r("./node_modules/bip39/src/wordlists/spanish.json"),n.spanish=o}catch(e){}try{t._default=o=r("./node_modules/bip39/src/wordlists/japanese.json"),n.japanese=o,n.JA=o}catch(e){}try{t._default=o=r("./node_modules/bip39/src/wordlists/portuguese.json"),n.portuguese=o}catch(e){}try{t._default=o=r("./node_modules/bip39/src/wordlists/english.json"),n.english=o,n.EN=o}catch(e){}},"./node_modules/bip39/src/index.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0});const o=r("./node_modules/create-hash/browser.js"),i=r("./node_modules/pbkdf2/browser.js"),a=r("./node_modules/randombytes/browser.js"),s=r("./node_modules/bip39/src/_wordlists.js");let c=s._default;const u="Invalid mnemonic",d="Invalid entropy",l="Invalid mnemonic checksum",A="A wordlist is required but a default could not be found.\nPlease pass a 2048 word array explicitly.";function f(e){return(e||"").normalize("NFKD")}function p(e,t,r){for(;e.length<r;)e=t+e;return e}function g(e){return parseInt(e,2)}function h(e){return e.map((e=>p(e.toString(2),"0",8))).join("")}function m(e){const t=8*e.length/32,r=o("sha256").update(e).digest();return h(Array.from(r)).slice(0,t)}function y(e){return"mnemonic"+(e||"")}function v(e,t){if(!(t=t||c))throw new Error(A);const r=f(e).split(" ");if(r.length%3!=0)throw new Error(u);const o=r.map((e=>{const r=t.indexOf(e);if(-1===r)throw new Error(u);return p(r.toString(2),"0",11)})).join(""),i=32*Math.floor(o.length/33),a=o.slice(0,i),s=o.slice(i),h=a.match(/(.{1,8})/g).map(g);if(h.length<16)throw new Error(d);if(h.length>32)throw new Error(d);if(h.length%4!=0)throw new Error(d);const y=n.from(h);if(m(y)!==s)throw new Error(l);return y.toString("hex")}function b(e,t){if(n.isBuffer(e)||(e=n.from(e,"hex")),!(t=t||c))throw new Error(A);if(e.length<16)throw new TypeError(d);if(e.length>32)throw new TypeError(d);if(e.length%4!=0)throw new TypeError(d);const r=(h(Array.from(e))+m(e)).match(/(.{1,11})/g).map((e=>{const r=g(e);return t[r]}));return"あいこくしん"===t[0]?r.join(" "):r.join(" ")}t.mnemonicToSeedSync=function(e,t){const r=n.from(f(e),"utf8"),o=n.from(y(f(t)),"utf8");return i.pbkdf2Sync(r,o,2048,64,"sha512")},t.mnemonicToSeed=function(e,t){return Promise.resolve().then((()=>function(e,t,r,n,o){return Promise.resolve().then((()=>new Promise(((a,s)=>{i.pbkdf2(e,t,r,n,o,((e,t)=>e?s(e):a(t)))}))))}(n.from(f(e),"utf8"),n.from(y(f(t)),"utf8"),2048,64,"sha512")))},t.mnemonicToEntropy=v,t.entropyToMnemonic=b,t.generateMnemonic=function(e,t,r){if((e=e||128)%32!=0)throw new TypeError(d);return b((t=t||a)(e/8),r)},t.validateMnemonic=function(e,t){try{v(e,t)}catch(e){return!1}return!0},t.setDefaultWordlist=function(e){const t=s.wordlists[e];if(!t)throw new Error('Could not find wordlist for language "'+e+'"');c=t},t.getDefaultWordlist=function(){if(!c)throw new Error("No Default Wordlist set");return Object.keys(s.wordlists).filter((e=>"JA"!==e&&"EN"!==e&&s.wordlists[e].every(((e,t)=>e===c[t]))))[0]};var I=r("./node_modules/bip39/src/_wordlists.js");t.wordlists=I.wordlists},"./node_modules/buffer/index.js":(e,t,r)=>{"use strict";const n=r("./node_modules/base64-js/index.js"),o=r("./node_modules/ieee754/index.js"),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return A(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return f(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||W(e.length)?s(0):A(e);if("Buffer"===e.type&&Array.isArray(e.data))return A(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.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)}function d(e){if("number"!=typeof e)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 l(e){return d(e),s(e<0?0:0|p(e))}function A(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(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 n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(o)return n?-1:K(e).length;t=(""+t).toLowerCase(),o=!0}}function h(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Q(this,t,r);case"utf8":case"utf-8":return E(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),W(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,o){let i,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(u(e,i)===u(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+c>s&&(r=s-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(u(e,i+n)!==u(t,n)){r=!1;break}if(r)return i}return-1}function b(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(W(n))return a;e[r+a]=n}return a}function I(e,t,r,n){return V(K(t,e.length-r),e,r,n)}function _(e,t,r,n){return V(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function C(e,t,r,n){return V(z(t),e,r,n)}function w(e,t,r,n){return V(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function E(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(i=c));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}t.kMaxLength=a,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return d(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},c.allocUnsafe=function(e){return l(e)},c.allocUnsafeSlow=function(e){return l(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).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}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):h.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(n,o),d=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==d[e]){i=u[e],a=d[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return I(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function B(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function O(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function Q(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Z[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function P(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")}function N(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function D(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function x(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function M(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function T(e,t,r,n,i){return t=+t,r>>>=0,i||M(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,i){return t=+t,r>>>=0,i||M(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){j(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){j(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){j(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){j(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const J={};function H(e,t,r){J[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(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function L(e){let t="",r=e.length;const 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 F(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new J.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){j(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||q(t,e.length-(r+1))}(n,o,i)}function j(e,t){if("number"!=typeof e)throw new J.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,r){if(Math.floor(e)!==e)throw j(e,r),new J.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new J.ERR_BUFFER_OUT_OF_BOUNDS;throw new J.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}H("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),H("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),H("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=L(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=L(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=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,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},"./node_modules/call-bind/callBound.js":(e,t,r)=>{"use strict";var n=r("./node_modules/get-intrinsic/index.js"),o=r("./node_modules/call-bind/index.js"),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},"./node_modules/call-bind/index.js":(e,t,r)=>{"use strict";var n=r("./node_modules/function-bind/index.js"),o=r("./node_modules/get-intrinsic/index.js"),i=r("./node_modules/set-function-length/index.js"),a=r("./node_modules/es-errors/type.js"),s=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),u=o("%Reflect.apply%",!0)||n.call(c,s),d=r("./node_modules/es-define-property/index.js"),l=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=u(n,c,arguments);return i(t,1+l(0,e.length-(arguments.length-1)),!0)};var A=function(){return u(n,s,arguments)};d?d(e.exports,"apply",{value:A}):e.exports.apply=A},"./node_modules/cipher-base/index.js":(e,t,r)=>{var n=r("./node_modules/safe-buffer/index.js").Buffer,o=r("./node_modules/stream-browserify/index.js").Transform,i=r("./node_modules/string_decoder/lib/string_decoder.js").StringDecoder;function a(e){o.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r("./node_modules/inherits/inherits_browser.js")(a,o),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var o=this._update(e);return this.hashMode?this:(r&&(o=this._toString(o,r)),o)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new i(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},"./node_modules/create-hash/browser.js":(e,t,r)=>{"use strict";var n=r("./node_modules/inherits/inherits_browser.js"),o=r("./node_modules/md5.js/index.js"),i=r("./node_modules/ripemd160/index.js"),a=r("./node_modules/sha.js/index.js"),s=r("./node_modules/cipher-base/index.js");function c(e){s.call(this,"digest"),this._hash=e}n(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new o:"rmd160"===e||"ripemd160"===e?new i:new c(a(e))}},"./node_modules/create-hash/md5.js":(e,t,r)=>{var n=r("./node_modules/md5.js/index.js");e.exports=function(e){return(new n).update(e).digest()}},"./node_modules/decimal.js/decimal.js":function(e,t,r){var n;!function(o){"use strict";var i,a,s,c=9e15,u=1e9,d="0123456789abcdef",l="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",A="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",f={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-c,maxE:c,crypto:!1},p=!0,g="[DecimalError] ",h=g+"Invalid argument: ",m=g+"Precision limit exceeded",y=g+"crypto unavailable",v="[object Decimal]",b=Math.floor,I=Math.pow,_=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,C=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,w=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,S=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,E=1e7,k=7,B=l.length-1,O=A.length-1,Q={toStringTag:v};function R(e){var t,r,n,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)n=e[t]+"",(r=k-n.length)&&(i+=F(r)),i+=n;a=e[t],(r=k-(n=a+"").length)&&(i+=F(r))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}function P(e,t,r){if(e!==~~e||e<t||e>r)throw Error(h+e)}function N(e,t,r,n){var o,i,a,s;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=k,o=0):(o=Math.ceil((t+1)/k),t%=k),i=I(10,k-t),s=e[o]%i|0,null==n?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=r<4&&99999==s||r>3&&49999==s||5e4==s||0==s):a=(r<4&&s+1==i||r>3&&s+1==i/2)&&(e[o+1]/i/100|0)==I(10,t-2)-1||(s==i/2||0==s)&&0==(e[o+1]/i/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(n||r<4)&&9999==s||!n&&r>3&&4999==s):a=((n||r<4)&&s+1==i||!n&&r>3&&s+1==i/2)&&(e[o+1]/i/1e3|0)==I(10,t-3)-1,a}function D(e,t,r){for(var n,o,i=[0],a=0,s=e.length;a<s;){for(o=i.length;o--;)i[o]*=t;for(i[0]+=d.indexOf(e.charAt(a++)),n=0;n<i.length;n++)i[n]>r-1&&(void 0===i[n+1]&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}Q.absoluteValue=Q.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),M(e)},Q.ceil=function(){return M(new this.constructor(this),this.e+1,2)},Q.clampedTo=Q.clamp=function(e,t){var r=this,n=r.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(h+t);return r.cmp(e)<0?e:r.cmp(t)>0?t:new n(r)},Q.comparedTo=Q.cmp=function(e){var t,r,n,o,i=this,a=i.d,s=(e=new i.constructor(e)).d,c=i.s,u=e.s;if(!a||!s)return c&&u?c!==u?c:a===s?0:!a^c<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?c:s[0]?-u:0;if(c!==u)return c;if(i.e!==e.e)return i.e>e.e^c<0?1:-1;for(t=0,r=(n=a.length)<(o=s.length)?n:o;t<r;++t)if(a[t]!==s[t])return a[t]>s[t]^c<0?1:-1;return n===o?0:n>o^c<0?1:-1},Q.cosine=Q.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=function(e,t){var r,n,o;if(t.isZero())return t;n=t.d.length,n<32?o=(1/X(4,r=Math.ceil(n/3))).toString():(r=16,o="2.3283064365386962890625e-10");e.precision+=r,t=Z(e,1,t.times(o),new e(1));for(var i=r;i--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=r,t}(n,$(n,r)),n.precision=e,n.rounding=t,M(2==s||3==s?r.neg():r,e,t,!0)):new n(1):new n(NaN)},Q.cubeRoot=Q.cbrt=function(){var e,t,r,n,o,i,a,s,c,u,d=this,l=d.constructor;if(!d.isFinite()||d.isZero())return new l(d);for(p=!1,(i=d.s*I(d.s*d,1/3))&&Math.abs(i)!=1/0?n=new l(i.toString()):(r=R(d.d),(i=((e=d.e)-r.length+1)%3)&&(r+=1==i||-2==i?"0":"00"),i=I(r,1/3),e=b((e+1)/3)-(e%3==(e<0?-1:2)),(n=new l(r=i==1/0?"5e"+e:(r=i.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=d.s),a=(e=l.precision)+3;;)if(u=(c=(s=n).times(s).times(s)).plus(d),n=x(u.plus(d).times(s),u.plus(c),a+2,1),R(s.d).slice(0,a)===(r=R(n.d)).slice(0,a)){if("9999"!=(r=r.slice(a-3,a+1))&&(o||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(M(n,e+1,1),t=!n.times(n).times(n).eq(d));break}if(!o&&(M(s,e+1,0),s.times(s).times(s).eq(d))){n=s;break}a+=4,o=1}return p=!0,M(n,e,l.rounding,t)},Q.decimalPlaces=Q.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=((e=t.length-1)-b(this.e/k))*k,e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},Q.dividedBy=Q.div=function(e){return x(this,new this.constructor(e))},Q.dividedToIntegerBy=Q.divToInt=function(e){var t=this.constructor;return M(x(this,new t(e),0,1,1),t.precision,t.rounding)},Q.equals=Q.eq=function(e){return 0===this.cmp(e)},Q.floor=function(){return M(new this.constructor(this),this.e+1,3)},Q.greaterThan=Q.gt=function(e){return this.cmp(e)>0},Q.greaterThanOrEqualTo=Q.gte=function(e){var t=this.cmp(e);return 1==t||0===t},Q.hyperbolicCosine=Q.cosh=function(){var e,t,r,n,o,i=this,a=i.constructor,s=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return s;r=a.precision,n=a.rounding,a.precision=r+Math.max(i.e,i.sd())+4,a.rounding=1,(o=i.d.length)<32?t=(1/X(4,e=Math.ceil(o/3))).toString():(e=16,t="2.3283064365386962890625e-10"),i=Z(a,1,i.times(t),new a(1),!0);for(var c,u=e,d=new a(8);u--;)c=i.times(i),i=s.minus(c.times(d.minus(c.times(d))));return M(i,a.precision=r,a.rounding=n,!0)},Q.hyperbolicSine=Q.sinh=function(){var e,t,r,n,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(o.e,o.sd())+4,i.rounding=1,(n=o.d.length)<3)o=Z(i,2,o,o,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,o=Z(i,2,o=o.times(1/X(5,e)),o,!0);for(var a,s=new i(5),c=new i(16),u=new i(20);e--;)a=o.times(o),o=o.times(s.plus(a.times(c.times(a).plus(u))))}return i.precision=t,i.rounding=r,M(o,t,r,!0)},Q.hyperbolicTangent=Q.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,x(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},Q.inverseCosine=Q.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),o=r.precision,i=r.rounding;return-1!==n?0===n?t.isNeg()?H(r,o,i):new r(0):new r(NaN):t.isZero()?H(r,o+4,i).times(.5):(r.precision=o+6,r.rounding=1,t=t.asin(),e=H(r,o+4,i).times(.5),r.precision=o,r.rounding=i,e.minus(t))},Q.inverseHyperbolicCosine=Q.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,p=!1,r=r.times(r).minus(1).sqrt().plus(r),p=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},Q.inverseHyperbolicSine=Q.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,p=!1,r=r.times(r).plus(1).sqrt().plus(r),p=!0,n.precision=e,n.rounding=t,r.ln())},Q.inverseHyperbolicTangent=Q.atanh=function(){var e,t,r,n,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=i.precision,t=i.rounding,n=o.sd(),Math.max(n,e)<2*-o.e-1?M(new i(o),e,t,!0):(i.precision=r=n-o.e,o=x(o.plus(1),new i(1).minus(o),r+e,1),i.precision=e+4,i.rounding=1,o=o.ln(),i.precision=e,i.rounding=t,o.times(.5))):new i(NaN)},Q.inverseSine=Q.asin=function(){var e,t,r,n,o=this,i=o.constructor;return o.isZero()?new i(o):(t=o.abs().cmp(1),r=i.precision,n=i.rounding,-1!==t?0===t?((e=H(i,r+4,n).times(.5)).s=o.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,o.times(2)))},Q.inverseTangent=Q.atan=function(){var e,t,r,n,o,i,a,s,c,u=this,d=u.constructor,l=d.precision,A=d.rounding;if(u.isFinite()){if(u.isZero())return new d(u);if(u.abs().eq(1)&&l+4<=O)return(a=H(d,l+4,A).times(.25)).s=u.s,a}else{if(!u.s)return new d(NaN);if(l+4<=O)return(a=H(d,l+4,A).times(.5)).s=u.s,a}for(d.precision=s=l+10,d.rounding=1,e=r=Math.min(28,s/k+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(p=!1,t=Math.ceil(s/k),n=1,c=u.times(u),a=new d(u),o=u;-1!==e;)if(o=o.times(c),i=a.minus(o.div(n+=2)),o=o.times(c),void 0!==(a=i.plus(o.div(n+=2))).d[t])for(e=t;a.d[e]===i.d[e]&&e--;);return r&&(a=a.times(2<<r-1)),p=!0,M(a,d.precision=l,d.rounding=A,!0)},Q.isFinite=function(){return!!this.d},Q.isInteger=Q.isInt=function(){return!!this.d&&b(this.e/k)>this.d.length-2},Q.isNaN=function(){return!this.s},Q.isNegative=Q.isNeg=function(){return this.s<0},Q.isPositive=Q.isPos=function(){return this.s>0},Q.isZero=function(){return!!this.d&&0===this.d[0]},Q.lessThan=Q.lt=function(e){return this.cmp(e)<0},Q.lessThanOrEqualTo=Q.lte=function(e){return this.cmp(e)<1},Q.logarithm=Q.log=function(e){var t,r,n,o,i,a,s,c,u=this,d=u.constructor,l=d.precision,A=d.rounding;if(null==e)e=new d(10),t=!0;else{if(r=(e=new d(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new d(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new d(r&&!r[0]?-1/0:1!=u.s?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(o=r[0];o%10==0;)o/=10;i=1!==o}if(p=!1,a=z(u,s=l+5),n=t?J(d,s+10):z(e,s),N((c=x(a,n,s,1)).d,o=l,A))do{if(a=z(u,s+=10),n=t?J(d,s+10):z(e,s),c=x(a,n,s,1),!i){+R(c.d).slice(o+1,o+15)+1==1e14&&(c=M(c,l+1,0));break}}while(N(c.d,o+=10,A));return p=!0,M(c,l,A)},Q.minus=Q.sub=function(e){var t,r,n,o,i,a,s,c,u,d,l,A,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return f.s&&e.s?f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN):e=new g(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,A=e.d,s=g.precision,c=g.rounding,!u[0]||!A[0]){if(A[0])e.s=-e.s;else{if(!u[0])return new g(3===c?-0:0);e=new g(f)}return p?M(e,s,c):e}if(r=b(e.e/k),d=b(f.e/k),u=u.slice(),i=d-r){for((l=i<0)?(t=u,i=-i,a=A.length):(t=A,r=d,a=u.length),i>(n=Math.max(Math.ceil(s/k),a)+2)&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for((l=(n=u.length)<(a=A.length))&&(a=n),n=0;n<a;n++)if(u[n]!=A[n]){l=u[n]<A[n];break}i=0}for(l&&(t=u,u=A,A=t,e.s=-e.s),a=u.length,n=A.length-a;n>0;--n)u[a++]=0;for(n=A.length;n>i;){if(u[--n]<A[n]){for(o=n;o&&0===u[--o];)u[o]=E-1;--u[o],u[n]+=E}u[n]-=A[n]}for(;0===u[--a];)u.pop();for(;0===u[0];u.shift())--r;return u[0]?(e.d=u,e.e=U(u,r),p?M(e,s,c):e):new g(3===c?-0:0)},Q.modulo=Q.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?M(new n(r),n.precision,n.rounding):(p=!1,9==n.modulo?(t=x(r,e.abs(),0,3,1)).s*=e.s:t=x(r,e,0,n.modulo,1),t=t.times(e),p=!0,r.minus(t))},Q.naturalExponential=Q.exp=function(){return K(this)},Q.naturalLogarithm=Q.ln=function(){return z(this)},Q.negated=Q.neg=function(){var e=new this.constructor(this);return e.s=-e.s,M(e)},Q.plus=Q.add=function(e){var t,r,n,o,i,a,s,c,u,d,l=this,A=l.constructor;if(e=new A(e),!l.d||!e.d)return l.s&&e.s?l.d||(e=new A(e.d||l.s===e.s?l:NaN)):e=new A(NaN),e;if(l.s!=e.s)return e.s=-e.s,l.minus(e);if(u=l.d,d=e.d,s=A.precision,c=A.rounding,!u[0]||!d[0])return d[0]||(e=new A(l)),p?M(e,s,c):e;if(i=b(l.e/k),n=b(e.e/k),u=u.slice(),o=i-n){for(o<0?(r=u,o=-o,a=d.length):(r=d,n=i,a=u.length),o>(a=(i=Math.ceil(s/k))>a?i+1:a+1)&&(o=a,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((a=u.length)-(o=d.length)<0&&(o=a,r=d,d=u,u=r),t=0;o;)t=(u[--o]=u[o]+d[o]+t)/E|0,u[o]%=E;for(t&&(u.unshift(t),++n),a=u.length;0==u[--a];)u.pop();return e.d=u,e.e=U(u,n),p?M(e,s,c):e},Q.precision=Q.sd=function(e){var t,r=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(h+e);return r.d?(t=L(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},Q.round=function(){var e=this,t=e.constructor;return M(new t(e),e.e+1,t.rounding)},Q.sine=Q.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Z(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=t.times(1/X(5,r)),t=Z(e,2,t,t);for(var o,i=new e(5),a=new e(16),s=new e(20);r--;)o=t.times(t),t=t.times(i.plus(o.times(a.times(o).minus(s))));return t}(n,$(n,r)),n.precision=e,n.rounding=t,M(s>2?r.neg():r,e,t,!0)):new n(NaN)},Q.squareRoot=Q.sqrt=function(){var e,t,r,n,o,i,a=this,s=a.d,c=a.e,u=a.s,d=a.constructor;if(1!==u||!s||!s[0])return new d(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);for(p=!1,0==(u=Math.sqrt(+a))||u==1/0?(((t=R(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(t),c=b((c+1)/2)-(c<