UNPKG

truffle

Version:

Truffle - Simple development framework for Ethereum

19 lines (16 loc) 3.1 MB
#!/usr/bin/env node exports.id = 1698; exports.ids = [1698]; exports.modules = { /***/ 15691: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ formats: () => (/* binding */ br), /* harmony export */ formatsByCoinType: () => (/* binding */ Er), /* harmony export */ formatsByName: () => (/* binding */ mr) /* harmony export */ }); /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6113); /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_0__); for(var r="qpzry9x8gf2tvdw0s3jn54khce6mua7l",e={},n=0;n<r.length;n++){var i=r.charAt(n);if(void 0!==e[i])throw new TypeError(i+" is ambiguous");e[i]=n}function o(t){var r=t>>25;return(33554431&t)<<5^996825010&-(r>>0&1)^642813549&-(r>>1&1)^513874426&-(r>>2&1)^1027748829&-(r>>3&1)^705979059&-(r>>4&1)}function f(t){for(var r=1,e=0;e<t.length;++e){var n=t.charCodeAt(e);if(n<33||n>126)throw new Error("Invalid prefix ("+t+")");r=o(r)^n>>5}for(r=o(r),e=0;e<t.length;++e){var i=t.charCodeAt(e);r=o(r)^31&i}return r}function u(t,r,e,n){for(var i=0,o=0,f=(1<<e)-1,u=[],a=0;a<t.length;++a)for(i=i<<r|t[a],o+=r;o>=e;)u.push(i>>(o-=e)&f);if(n)o>0&&u.push(i<<e-o&f);else{if(o>=r)throw new Error("Excess padding");if(i<<e-o&f)throw new Error("Non-zero padding")}return u}var a=function(t,r){if(r=r||90,t.length<8)throw new TypeError(t+" too short");if(t.length>r)throw new TypeError("Exceeds length limit");var n=t.toLowerCase(),i=t.toUpperCase();if(t!==n&&t!==i)throw new Error("Mixed-case string "+t);var u=(t=n).lastIndexOf("1");if(-1===u)throw new Error("No separator character for "+t);if(0===u)throw new Error("Missing prefix for "+t);var a=t.slice(0,u),s=t.slice(u+1);if(s.length<6)throw new Error("Data too short");for(var h=f(a),c=[],l=0;l<s.length;++l){var p=s.charAt(l),d=e[p];if(void 0===d)throw new Error("Unknown character "+p);h=o(h)^d,l+6>=s.length||c.push(d)}if(1!==h)throw new Error("Invalid checksum for "+t);return{prefix:a,words:c}},s=function(t,e,n){if(t.length+7+e.length>(n=n||90))throw new TypeError("Exceeds length limit");for(var i=f(t=t.toLowerCase()),u=t+"1",a=0;a<e.length;++a){var s=e[a];if(s>>5!=0)throw new Error("Non 5-bit word");i=o(i)^s,u+=r.charAt(s)}for(a=0;a<6;++a)i=o(i);for(i^=1,a=0;a<6;++a)u+=r.charAt(i>>5*(5-a)&31);return u},h=function(t){return u(t,8,5,!0)},c=function(t){return u(t,5,8,!1)};function l(t,r,e){return t(e={path:r,exports:{},require:function(t,r){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},e.exports),e.exports}var p=l(function(t){var r=function(t){var e=1e7,n=9007199254740992,i=h(n),o=Math.log(n);function f(t,r){return void 0===t?f[0]:void 0!==r?10==+r?K(t):q(t,r):K(t)}function u(t,r){this.value=t,this.sign=r,this.isSmall=!1}function a(t){this.value=t,this.sign=t<0,this.isSmall=!0}function s(t){return-n<t&&t<n}function h(t){return t<1e7?[t]:t<1e14?[t%1e7,Math.floor(t/1e7)]:[t%1e7,Math.floor(t/1e7)%1e7,Math.floor(t/1e14)]}function c(t){l(t);var r=t.length;if(r<4&&S(t,i)<0)switch(r){case 0:return 0;case 1:return t[0];case 2:return t[0]+t[1]*e;default:return t[0]+(t[1]+t[2]*e)*e}return t}function l(t){for(var r=t.length;0===t[--r];);t.length=r+1}function p(t){for(var r=new Array(t),e=-1;++e<t;)r[e]=0;return r}function d(t){return t>0?Math.floor(t):Math.ceil(t)}function g(t,r){var n,i,o=t.length,f=r.length,u=new Array(o),a=0,s=e;for(i=0;i<f;i++)u[i]=(n=t[i]+r[i]+a)-(a=n>=s?1:0)*s;for(;i<o;)n=t[i]+a,u[i++]=n-(a=n===s?1:0)*s;return a>0&&u.push(a),u}function y(t,r){return t.length>=r.length?g(t,r):g(r,t)}function v(t,r){var n,i,o=t.length,f=new Array(o),u=e;for(i=0;i<o;i++)n=t[i]-u+r,r=Math.floor(n/u),f[i]=n-r*u,r+=1;for(;r>0;)f[i++]=r%u,r=Math.floor(r/u);return f}function w(t,r){var e,n,i=t.length,o=r.length,f=new Array(i),u=0;for(e=0;e<o;e++)(n=t[e]-u-r[e])<0?(n+=1e7,u=1):u=0,f[e]=n;for(e=o;e<i;e++){if(!((n=t[e]-u)<0)){f[e++]=n;break}f[e]=n+=1e7}for(;e<i;e++)f[e]=t[e];return l(f),f}function b(t,r,e){var n,i,o=t.length,f=new Array(o),s=-r;for(n=0;n<o;n++)i=t[n]+s,s=Math.floor(i/1e7),f[n]=(i%=1e7)<0?i+1e7:i;return"number"==typeof(f=c(f))?(e&&(f=-f),new a(f)):new u(f,e)}function m(t,r){var e,n,i,o,f=t.length,u=r.length,a=p(f+u);for(i=0;i<f;++i){o=t[i];for(var s=0;s<u;++s)e=o*r[s]+a[i+s],n=Math.floor(e/1e7),a[i+s]=e-1e7*n,a[i+s+1]+=n}return l(a),a}function E(t,r){var n,i,o=t.length,f=new Array(o),u=e,a=0;for(i=0;i<o;i++)n=t[i]*r+a,a=Math.floor(n/u),f[i]=n-a*u;for(;a>0;)f[i++]=a%u,a=Math.floor(a/u);return f}function B(t,r){for(var e=[];r-- >0;)e.push(0);return e.concat(t)}function A(t,r,n){return new u(t<e?E(r,t):m(r,h(t)),n)}function U(t){var r,e,n,i,o=t.length,f=p(o+o);for(n=0;n<o;n++){e=0-(i=t[n])*i;for(var u=n;u<o;u++)r=i*t[u]*2+f[n+u]+e,e=Math.floor(r/1e7),f[n+u]=r-1e7*e;f[n+o]=e}return l(f),f}function I(t,r){var e,n,i,o,f=t.length,u=p(f);for(i=0,e=f-1;e>=0;--e)i=(o=1e7*i+t[e])-(n=d(o/r))*r,u[e]=0|n;return[u,0|i]}function _(t,r){var n,i,o=K(r),s=t.value,g=o.value;if(0===g)throw new Error("Cannot divide by zero");if(t.isSmall)return o.isSmall?[new a(d(s/g)),new a(s%g)]:[f[0],t];if(o.isSmall){if(1===g)return[t,f[0]];if(-1==g)return[t.negate(),f[0]];var y=Math.abs(g);if(y<e){i=c((n=I(s,y))[0]);var v=n[1];return t.sign&&(v=-v),"number"==typeof i?(t.sign!==o.sign&&(i=-i),[new a(i),new a(v)]):[new u(i,t.sign!==o.sign),new a(v)]}g=h(y)}var b=S(s,g);if(-1===b)return[f[0],t];if(0===b)return[f[t.sign===o.sign?1:-1],f[0]];n=s.length+g.length<=200?function(t,r){var n,i,o,f,u,a,s,h=t.length,l=r.length,d=e,g=p(r.length),y=r[l-1],v=Math.ceil(d/(2*y)),w=E(t,v),b=E(r,v);for(w.length<=h&&w.push(0),b.push(0),y=b[l-1],i=h-l;i>=0;i--){for(n=d-1,w[i+l]!==y&&(n=Math.floor((w[i+l]*d+w[i+l-1])/y)),o=0,f=0,a=b.length,u=0;u<a;u++)o+=n*b[u],s=Math.floor(o/d),f+=w[i+u]-(o-s*d),o=s,f<0?(w[i+u]=f+d,f=-1):(w[i+u]=f,f=0);for(;0!==f;){for(n-=1,o=0,u=0;u<a;u++)(o+=w[i+u]-d+b[u])<0?(w[i+u]=o+d,o=0):(w[i+u]=o,o=1);f+=o}g[i]=n}return w=I(w,v)[0],[c(g),c(w)]}(s,g):function(t,r){for(var e,n,i,o,f=t.length,u=r.length,a=[],s=[];f;)if(s.unshift(t[--f]),l(s),S(s,r)<0)a.push(0);else{i=1e7*s[(n=s.length)-1]+s[n-2],n>u&&(i=1e7*(i+1)),e=Math.ceil(i/(1e7*r[u-1]+r[u-2]));do{if(S(o=E(r,e),s)<=0)break;e--}while(e);a.push(e),s=w(s,o)}return a.reverse(),[c(a),c(s)]}(s,g);var m=t.sign!==o.sign,B=n[1],A=t.sign;return"number"==typeof(i=n[0])?(m&&(i=-i),i=new a(i)):i=new u(i,m),"number"==typeof B?(A&&(B=-B),B=new a(B)):B=new u(B,A),[i,B]}function S(t,r){if(t.length!==r.length)return t.length>r.length?1:-1;for(var e=t.length-1;e>=0;e--)if(t[e]!==r[e])return t[e]>r[e]?1:-1;return 0}function x(t){var r=t.abs();return!r.isUnit()&&(!!(r.equals(2)||r.equals(3)||r.equals(5))||!(r.isEven()||r.isDivisibleBy(3)||r.isDivisibleBy(5))&&(!!r.lesser(49)||void 0))}function k(t,e){for(var n,i,o,u=t.prev(),a=u,s=0;a.isEven();)a=a.divide(2),s++;t:for(i=0;i<e.length;i++)if(!t.lesser(e[i])&&!(o=r(e[i]).modPow(a,t)).equals(f[1])&&!o.equals(u)){for(n=s-1;0!=n;n--){if((o=o.square().mod(t)).isUnit())return!1;if(o.equals(u))continue t}return!1}return!0}u.prototype=Object.create(f.prototype),a.prototype=Object.create(f.prototype),u.prototype.add=function(t){var r=K(t);if(this.sign!==r.sign)return this.subtract(r.negate());var e=this.value,n=r.value;return new u(r.isSmall?v(e,Math.abs(n)):y(e,n),this.sign)},u.prototype.plus=u.prototype.add,a.prototype.add=function(t){var r=K(t),e=this.value;if(e<0!==r.sign)return this.subtract(r.negate());var n=r.value;if(r.isSmall){if(s(e+n))return new a(e+n);n=h(Math.abs(n))}return new u(v(n,Math.abs(e)),e<0)},a.prototype.plus=a.prototype.add,u.prototype.subtract=function(t){var r=K(t);if(this.sign!==r.sign)return this.add(r.negate());var e=this.value,n=r.value;return r.isSmall?b(e,Math.abs(n),this.sign):function(t,r,e){var n;return S(t,r)>=0?n=w(t,r):(n=w(r,t),e=!e),"number"==typeof(n=c(n))?(e&&(n=-n),new a(n)):new u(n,e)}(e,n,this.sign)},u.prototype.minus=u.prototype.subtract,a.prototype.subtract=function(t){var r=K(t),e=this.value;if(e<0!==r.sign)return this.add(r.negate());var n=r.value;return r.isSmall?new a(e-n):b(n,Math.abs(e),e>=0)},a.prototype.minus=a.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},a.prototype.negate=function(){var t=this.sign,r=new a(-this.value);return r.sign=!t,r},u.prototype.abs=function(){return new u(this.value,!1)},a.prototype.abs=function(){return new a(Math.abs(this.value))},u.prototype.multiply=function(t){var r,n,i,o=K(t),a=this.value,s=o.value,c=this.sign!==o.sign;if(o.isSmall){if(0===s)return f[0];if(1===s)return this;if(-1===s)return this.negate();if((r=Math.abs(s))<e)return new u(E(a,r),c);s=h(r)}return-.012*(n=a.length)-.012*(i=s.length)+15e-6*n*i>0?new u(function t(r,e){var n=Math.max(r.length,e.length);if(n<=30)return m(r,e);n=Math.ceil(n/2);var i=r.slice(n),o=r.slice(0,n),f=e.slice(n),u=e.slice(0,n),a=t(o,u),s=t(i,f),h=t(y(o,i),y(u,f)),c=y(y(a,B(w(w(h,a),s),n)),B(s,2*n));return l(c),c}(a,s),c):new u(m(a,s),c)},u.prototype.times=u.prototype.multiply,a.prototype._multiplyBySmall=function(t){return s(t.value*this.value)?new a(t.value*this.value):A(Math.abs(t.value),h(Math.abs(this.value)),this.sign!==t.sign)},u.prototype._multiplyBySmall=function(t){return 0===t.value?f[0]:1===t.value?this:-1===t.value?this.negate():A(Math.abs(t.value),this.value,this.sign!==t.sign)},a.prototype.times=a.prototype.multiply=function(t){return K(t)._multiplyBySmall(this)},u.prototype.square=function(){return new u(U(this.value),!1)},a.prototype.square=function(){var t=this.value*this.value;return s(t)?new a(t):new u(U(h(Math.abs(this.value))),!1)},a.prototype.divmod=u.prototype.divmod=function(t){var r=_(this,t);return{quotient:r[0],remainder:r[1]}},a.prototype.over=a.prototype.divide=u.prototype.over=u.prototype.divide=function(t){return _(this,t)[0]},a.prototype.remainder=a.prototype.mod=u.prototype.remainder=u.prototype.mod=function(t){return _(this,t)[1]},u.prototype.pow=function(t){var r,e,n,i=K(t),o=this.value,u=i.value;if(0===u)return f[1];if(0===o)return f[0];if(1===o)return f[1];if(-1===o)return i.isEven()?f[1]:f[-1];if(i.sign)return f[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&s(r=Math.pow(o,u)))return new a(d(r));for(e=this,n=f[1];!0&u&&(n=n.times(e),--u),0!==u;)u/=2,e=e.square();return n},a.prototype.pow=u.prototype.pow,a.prototype.modPow=u.prototype.modPow=function(t,r){if(t=K(t),(r=K(r)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var e=f[1],n=this.mod(r);t.isPositive();){if(n.isZero())return f[0];t.isOdd()&&(e=e.multiply(n).mod(r)),t=t.divide(2),n=n.square().mod(r)}return e},u.prototype.compareAbs=function(t){var r=K(t);return r.isSmall?1:S(this.value,r.value)},a.prototype.compareAbs=function(t){var r=K(t),e=Math.abs(this.value),n=r.value;return r.isSmall?e===(n=Math.abs(n))?0:e>n?1:-1:-1},u.prototype.compareTo=u.prototype.compare=function(t){if(Infinity===t)return-1;if(-Infinity===t)return 1;var r=K(t);return this.sign!==r.sign?r.sign?1:-1:r.isSmall?this.sign?-1:1:S(this.value,r.value)*(this.sign?-1:1)},a.prototype.compareTo=a.prototype.compare=function(t){if(Infinity===t)return-1;if(-Infinity===t)return 1;var r=K(t),e=this.value,n=r.value;return r.isSmall?e==n?0:e>n?1:-1:e<0!==r.sign?e<0?-1:1:e<0?1:-1},a.prototype.eq=a.prototype.equals=u.prototype.eq=u.prototype.equals=function(t){return 0===this.compare(t)},a.prototype.neq=a.prototype.notEquals=u.prototype.neq=u.prototype.notEquals=function(t){return 0!==this.compare(t)},a.prototype.gt=a.prototype.greater=u.prototype.gt=u.prototype.greater=function(t){return this.compare(t)>0},a.prototype.lt=a.prototype.lesser=u.prototype.lt=u.prototype.lesser=function(t){return this.compare(t)<0},a.prototype.geq=a.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},a.prototype.leq=a.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},u.prototype.isEven=function(){return 0==(1&this.value[0])},a.prototype.isEven=function(){return 0==(1&this.value)},u.prototype.isOdd=function(){return 1==(1&this.value[0])},a.prototype.isOdd=function(){return 1==(1&this.value)},u.prototype.isPositive=function(){return!this.sign},a.prototype.isPositive=function(){return this.value>0},u.prototype.isNegative=function(){return this.sign},a.prototype.isNegative=function(){return this.value<0},u.prototype.isUnit=function(){return!1},a.prototype.isUnit=function(){return 1===Math.abs(this.value)},u.prototype.isZero=function(){return!1},a.prototype.isZero=function(){return 0===this.value},a.prototype.isDivisibleBy=u.prototype.isDivisibleBy=function(t){var r=K(t),e=r.value;return 0!==e&&(1===e||(2===e?this.isEven():this.mod(r).equals(f[0])))},a.prototype.isPrime=u.prototype.isPrime=function(t){var e=x(this);if(void 0!==e)return e;var n=this.abs(),i=n.bitLength();if(i<=64)return k(n,[2,325,9375,28178,450775,9780504,1795265022]);for(var o=Math.log(2)*i,f=Math.ceil(!0===t?2*Math.pow(o,2):o),u=[],a=0;a<f;a++)u.push(r(a+2));return k(n,u)},a.prototype.isProbablePrime=u.prototype.isProbablePrime=function(t){var e=x(this);if(void 0!==e)return e;for(var n=this.abs(),i=void 0===t?5:t,o=[],f=0;f<i;f++)o.push(r.randBetween(2,n.minus(2)));return k(n,o)},a.prototype.modInv=u.prototype.modInv=function(t){for(var e,n,i,o=r.zero,f=r.one,u=K(t),a=this.abs();!a.equals(r.zero);)e=u.divide(a),n=o,i=u,o=f,u=a,f=n.subtract(e.multiply(f)),a=i.subtract(e.multiply(a));if(!u.equals(1))throw new Error(this.toString()+" and "+t.toString()+" are not co-prime");return-1===o.compare(0)&&(o=o.add(t)),this.isNegative()?o.negate():o},u.prototype.next=function(){var t=this.value;return this.sign?b(t,1,this.sign):new u(v(t,1),this.sign)},a.prototype.next=function(){var t=this.value;return t+1<n?new a(t+1):new u(i,!1)},u.prototype.prev=function(){var t=this.value;return this.sign?new u(v(t,1),!0):b(t,1,this.sign)},a.prototype.prev=function(){var t=this.value;return t-1>-n?new a(t-1):new u(i,!0)};for(var O=[1];2*O[O.length-1]<=e;)O.push(2*O[O.length-1]);var C=O.length,M=O[C-1];function T(t){return("number"==typeof t||"string"==typeof t)&&+Math.abs(t)<=e||t instanceof u&&t.value.length<=1}function L(t,e,n){e=K(e);for(var i=t.isNegative(),o=e.isNegative(),f=i?t.not():t,u=o?e.not():e,a=0,s=0,h=null,c=null,l=[];!f.isZero()||!u.isZero();)a=(h=_(f,M))[1].toJSNumber(),i&&(a=M-1-a),s=(c=_(u,M))[1].toJSNumber(),o&&(s=M-1-s),f=h[0],u=c[0],l.push(n(a,s));for(var p=0!==n(i?1:0,o?1:0)?r(-1):r(0),d=l.length-1;d>=0;d-=1)p=p.multiply(M).add(r(l[d]));return p}function P(t){var r=t.value,n="number"==typeof r?r|1<<30:r[0]+r[1]*e|1073758208;return n&-n}function z(t,r){return t=K(t),r=K(r),t.greater(r)?t:r}function R(t,r){return t=K(t),r=K(r),t.lesser(r)?t:r}function N(t,r){if(t=K(t).abs(),r=K(r).abs(),t.equals(r))return t;if(t.isZero())return r;if(r.isZero())return t;for(var e,n,i=f[1];t.isEven()&&r.isEven();)e=Math.min(P(t),P(r)),t=t.divide(e),r=r.divide(e),i=i.multiply(e);for(;t.isEven();)t=t.divide(P(t));do{for(;r.isEven();)r=r.divide(P(r));t.greater(r)&&(n=r,r=t,t=n),r=r.subtract(t)}while(!r.isZero());return i.isUnit()?t:t.multiply(i)}a.prototype.shiftLeft=u.prototype.shiftLeft=function(t){if(!T(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=C;)r=r.multiply(M),t-=C-1;return r.multiply(O[t])},a.prototype.shiftRight=u.prototype.shiftRight=function(t){var r;if(!T(t))throw new Error(String(t)+" is too large for shifting.");if((t=+t)<0)return this.shiftLeft(-t);for(var e=this;t>=C;){if(e.isZero()||e.isNegative()&&e.isUnit())return e;e=(r=_(e,M))[1].isNegative()?r[0].prev():r[0],t-=C-1}return(r=_(e,O[t]))[1].isNegative()?r[0].prev():r[0]},a.prototype.not=u.prototype.not=function(){return this.negate().prev()},a.prototype.and=u.prototype.and=function(t){return L(this,t,function(t,r){return t&r})},a.prototype.or=u.prototype.or=function(t){return L(this,t,function(t,r){return t|r})},a.prototype.xor=u.prototype.xor=function(t){return L(this,t,function(t,r){return t^r})},a.prototype.bitLength=u.prototype.bitLength=function(){var t=this;return t.compareTo(r(0))<0&&(t=t.negate().subtract(r(1))),0===t.compareTo(r(0))?r(0):r(function t(e,n){if(n.compareTo(e)<=0){var i=t(e,n.square(n)),o=i.p,f=i.e,u=o.multiply(n);return u.compareTo(e)<=0?{p:u,e:2*f+1}:{p:o,e:2*f}}return{p:r(1),e:0}}(t,r(2)).e).add(r(1))};var q=function(t,r){for(var e=t.length,n=Math.abs(r),i=0;i<e;i++)if("-"!==(h=t[i].toLowerCase())&&/[a-z0-9]/.test(h)){if(/[0-9]/.test(h)&&+h>=n){if("1"===h&&1===n)continue;throw new Error(h+" is not a valid digit in base "+r+".")}if(h.charCodeAt(0)-87>=n)throw new Error(h+" is not a valid digit in base "+r+".")}if(2<=r&&r<=36&&e<=o/Math.log(r)){var f=parseInt(t,r);if(isNaN(f))throw new Error(h+" is not a valid digit in base "+r+".");return new a(parseInt(t,r))}r=K(r);var u=[],s="-"===t[0];for(i=s?1:0;i<t.length;i++){var h,c=(h=t[i].toLowerCase()).charCodeAt(0);if(48<=c&&c<=57)u.push(K(h));else if(97<=c&&c<=122)u.push(K(h.charCodeAt(0)-87));else{if("<"!==h)throw new Error(h+" is not a valid character");var l=i;do{i++}while(">"!==t[i]);u.push(K(t.slice(l+1,i)))}}return j(u,r,s)};function j(t,r,e){var n,i=f[0],o=f[1];for(n=t.length-1;n>=0;n--)i=i.add(t[n].times(o)),o=o.times(r);return e?i.negate():i}function D(t){return t<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t):"<"+t+">"}function H(t,e){if((e=r(e)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(e.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t)).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var n=Array.apply(null,Array(+t-1)).map(Array.prototype.valueOf,[0,1]);return n.unshift([1]),{value:[].concat.apply([],n),isNegative:!1}}var i=!1;if(t.isNegative()&&e.isPositive()&&(i=!0,t=t.abs()),e.equals(1))return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(+t)).map(Number.prototype.valueOf,1),isNegative:i};for(var o,f=[],u=t;u.isNegative()||u.compareAbs(e)>=0;){o=u.divmod(e),u=o.quotient;var a=o.remainder;a.isNegative()&&(a=e.minus(a).abs(),u=u.next()),f.push(a.toJSNumber())}return f.push(u.toJSNumber()),{value:f.reverse(),isNegative:i}}function F(t,r){var e=H(t,r);return(e.isNegative?"-":"")+e.value.map(D).join("")}function Z(t){if(s(+t)){var r=+t;if(r===d(r))return new a(r);throw new Error("Invalid integer: "+t)}var e="-"===t[0];e&&(t=t.slice(1));var n=t.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==d(i)||!s(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var o=n[0],f=o.indexOf(".");if(f>=0&&(i-=o.length-f-1,o=o.slice(0,f)+o.slice(f+1)),i<0)throw new Error("Cannot include negative exponent part for integers");t=o+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);for(var h=[],c=t.length,p=c-7;c>0;)h.push(+t.slice(p,c)),(p-=7)<0&&(p=0),c-=7;return l(h),new u(h,e)}function K(t){return"number"==typeof t?function(t){if(s(t)){if(t!==d(t))throw new Error(t+" is not an integer.");return new a(t)}return Z(t.toString())}(t):"string"==typeof t?Z(t):t}u.prototype.toArray=function(t){return H(this,t)},a.prototype.toArray=function(t){return H(this,t)},u.prototype.toString=function(t){if(void 0===t&&(t=10),10!==t)return F(this,t);for(var r,e=this.value,n=e.length,i=String(e[--n]);--n>=0;)r=String(e[n]),i+="0000000".slice(r.length)+r;return(this.sign?"-":"")+i},a.prototype.toString=function(t){return void 0===t&&(t=10),10!=t?F(this,t):String(this.value)},u.prototype.toJSON=a.prototype.toJSON=function(){return this.toString()},u.prototype.toJSNumber=u.prototype.valueOf=function(){return parseInt(this.toString(),10)},a.prototype.toJSNumber=a.prototype.valueOf=function(){return this.value};for(var X=0;X<1e3;X++)f[X]=new a(X),X>0&&(f[-X]=new a(-X));return f.one=f[1],f.zero=f[0],f.minusOne=f[-1],f.max=z,f.min=R,f.gcd=N,f.lcm=function(t,r){return t=K(t).abs(),r=K(r).abs(),t.divide(N(t,r)).multiply(r)},f.isInstance=function(t){return t instanceof u||t instanceof a},f.randBetween=function(t,r){var n=R(t=K(t),r=K(r)),i=z(t,r).subtract(n).add(1);if(i.isSmall)return n.add(Math.floor(Math.random()*i));for(var o=[],f=!0,s=i.value.length-1;s>=0;s--){var h=f?i.value[s]:e,l=d(Math.random()*h);o.unshift(l),l<h&&(f=!1)}return o=c(o),n.add("number"==typeof o?new a(o):new u(o,!1))},f.fromArray=function(t,r,e){return j(t.map(K),K(r||10),e)},f}();t.hasOwnProperty("exports")&&(t.exports=r)}),d=function(t){var r;if(t instanceof Uint8Array)r=t;else if(t instanceof Buffer)r=new Uint8Array(t);else{if("string"!=typeof t)throw new Error("Input must be an string, Buffer or Uint8Array");r=new Uint8Array(Buffer.from(t,"utf8"))}return r},g=function(t){return Array.prototype.map.call(t,function(t){return(t<16?"0":"")+t.toString(16)}).join("")};function y(t,r,e){var n=t[r]+t[e],i=t[r+1]+t[e+1];n>=4294967296&&i++,t[r]=n,t[r+1]=i}function v(t,r,e,n){var i=t[r]+e;e<0&&(i+=4294967296);var o=t[r+1]+n;i>=4294967296&&o++,t[r]=i,t[r+1]=o}function w(t,r){return t[r]^t[r+1]<<8^t[r+2]<<16^t[r+3]<<24}function b(t,r,e,n,i,o){var f=A[i],u=A[i+1],a=A[o],s=A[o+1];y(B,t,r),v(B,t,f,u);var h=B[n]^B[t],c=B[n+1]^B[t+1];B[n]=c,B[n+1]=h,y(B,e,n),B[r]=(h=B[r]^B[e])>>>24^(c=B[r+1]^B[e+1])<<8,B[r+1]=c>>>24^h<<8,y(B,t,r),v(B,t,a,s),B[n]=(h=B[n]^B[t])>>>16^(c=B[n+1]^B[t+1])<<16,B[n+1]=c>>>16^h<<16,y(B,e,n),B[r]=(c=B[r+1]^B[e+1])>>>31^(h=B[r]^B[e])<<1,B[r+1]=h>>>31^c<<1}var m=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),E=new Uint8Array([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].map(function(t){return 2*t})),B=new Uint32Array(32),A=new Uint32Array(32);function U(t,r){var e=0;for(e=0;e<16;e++)B[e]=t.h[e],B[e+16]=m[e];for(B[24]=B[24]^t.t,B[25]=B[25]^t.t/4294967296,r&&(B[28]=~B[28],B[29]=~B[29]),e=0;e<32;e++)A[e]=w(t.b,4*e);for(e=0;e<12;e++)b(0,8,16,24,E[16*e+0],E[16*e+1]),b(2,10,18,26,E[16*e+2],E[16*e+3]),b(4,12,20,28,E[16*e+4],E[16*e+5]),b(6,14,22,30,E[16*e+6],E[16*e+7]),b(0,10,20,30,E[16*e+8],E[16*e+9]),b(2,12,22,24,E[16*e+10],E[16*e+11]),b(4,14,16,26,E[16*e+12],E[16*e+13]),b(6,8,18,28,E[16*e+14],E[16*e+15]);for(e=0;e<16;e++)t.h[e]=t.h[e]^B[e]^B[e+16]}function I(t,r){if(0===t||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(r&&r.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var e={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t},n=0;n<16;n++)e.h[n]=m[n];return e.h[0]^=16842752^(r?r.length:0)<<8^t,r&&(_(e,r),e.c=128),e}function _(t,r){for(var e=0;e<r.length;e++)128===t.c&&(t.t+=t.c,U(t,!1),t.c=0),t.b[t.c++]=r[e]}function S(t){for(t.t+=t.c;t.c<128;)t.b[t.c++]=0;U(t,!0);for(var r=new Uint8Array(t.outlen),e=0;e<t.outlen;e++)r[e]=t.h[e>>2]>>8*(3&e);return r}function x(t,r,e){e=e||64,t=d(t);var n=I(e,r);return _(n,t),S(n)}var k={blake2b:x,blake2bHex:function(t,r,e){var n=x(t,r,e);return g(n)},blake2bInit:I,blake2bUpdate:_,blake2bFinal:S};function O(t,r){return t[r]^t[r+1]<<8^t[r+2]<<16^t[r+3]<<24}function C(t,r,e,n,i,o){P[t]=P[t]+P[r]+i,P[n]=M(P[n]^P[t],16),P[e]=P[e]+P[n],P[r]=M(P[r]^P[e],12),P[t]=P[t]+P[r]+o,P[n]=M(P[n]^P[t],8),P[e]=P[e]+P[n],P[r]=M(P[r]^P[e],7)}function M(t,r){return t>>>r^t<<32-r}var T=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),L=new Uint8Array([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]),P=new Uint32Array(16),z=new Uint32Array(16);function R(t,r){var e=0;for(e=0;e<8;e++)P[e]=t.h[e],P[e+8]=T[e];for(P[12]^=t.t,P[13]^=t.t/4294967296,r&&(P[14]=~P[14]),e=0;e<16;e++)z[e]=O(t.b,4*e);for(e=0;e<10;e++)C(0,4,8,12,z[L[16*e+0]],z[L[16*e+1]]),C(1,5,9,13,z[L[16*e+2]],z[L[16*e+3]]),C(2,6,10,14,z[L[16*e+4]],z[L[16*e+5]]),C(3,7,11,15,z[L[16*e+6]],z[L[16*e+7]]),C(0,5,10,15,z[L[16*e+8]],z[L[16*e+9]]),C(1,6,11,12,z[L[16*e+10]],z[L[16*e+11]]),C(2,7,8,13,z[L[16*e+12]],z[L[16*e+13]]),C(3,4,9,14,z[L[16*e+14]],z[L[16*e+15]]);for(e=0;e<8;e++)t.h[e]^=P[e]^P[e+8]}function N(t,r){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");var e=r?r.length:0;if(r&&!(e>0&&e<=32))throw new Error("Incorrect key length, should be in [1, 32]");var n={h:new Uint32Array(T),b:new Uint32Array(64),c:0,t:0,outlen:t};return n.h[0]^=16842752^e<<8^t,e>0&&(q(n,r),n.c=64),n}function q(t,r){for(var e=0;e<r.length;e++)64===t.c&&(t.t+=t.c,R(t,!1),t.c=0),t.b[t.c++]=r[e]}function j(t){for(t.t+=t.c;t.c<64;)t.b[t.c++]=0;R(t,!0);for(var r=new Uint8Array(t.outlen),e=0;e<t.outlen;e++)r[e]=t.h[e>>2]>>8*(3&e)&255;return r}function D(t,r,e){e=e||32,t=d(t);var n=N(e,r);return q(n,t),j(n)}for(var H={blake2s:D,blake2sHex:function(t,r,e){var n=D(t,r,e);return g(n)},blake2sInit:N,blake2sUpdate:q,blake2sFinal:j},F={blake2b:k.blake2b,blake2bHex:k.blake2bHex,blake2bInit:k.blake2bInit,blake2bUpdate:k.blake2bUpdate,blake2bFinal:k.blake2bFinal,blake2s:H.blake2s,blake2sHex:H.blake2sHex,blake2sInit:H.blake2sInit,blake2sUpdate:H.blake2sUpdate,blake2sFinal:H.blake2sFinal},Z=[],K=[],X="undefined"!=typeof Uint8Array?Uint8Array:Array,V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Y=0,W=V.length;Y<W;++Y)Z[Y]=V[Y],K[V.charCodeAt(Y)]=Y;function J(t,r,e){for(var n,i=[],o=r;o<e;o+=3)i.push(Z[(n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]))>>18&63]+Z[n>>12&63]+Z[n>>6&63]+Z[63&n]);return i.join("")}K["-".charCodeAt(0)]=62,K["_".charCodeAt(0)]=63;var G=function(t){var r,e,n=function(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}(t),i=n[0],o=n[1],f=new X(function(t,r,e){return 3*(r+e)/4-e}(0,i,o)),u=0,a=o>0?i-4:i;for(e=0;e<a;e+=4)r=K[t.charCodeAt(e)]<<18|K[t.charCodeAt(e+1)]<<12|K[t.charCodeAt(e+2)]<<6|K[t.charCodeAt(e+3)],f[u++]=r>>16&255,f[u++]=r>>8&255,f[u++]=255&r;return 2===o&&(r=K[t.charCodeAt(e)]<<2|K[t.charCodeAt(e+1)]>>4,f[u++]=255&r),1===o&&(r=K[t.charCodeAt(e)]<<10|K[t.charCodeAt(e+1)]<<4|K[t.charCodeAt(e+2)]>>2,f[u++]=r>>8&255,f[u++]=255&r),f},Q=function(t){for(var r,e=t.length,n=e%3,i=[],o=0,f=e-n;o<f;o+=16383)i.push(J(t,o,o+16383>f?f:o+16383));return 1===n?i.push(Z[(r=t[e-1])>>2]+Z[r<<4&63]+"=="):2===n&&i.push(Z[(r=(t[e-2]<<8)+t[e-1])>>10]+Z[r>>4&63]+Z[r<<2&63]+"="),i.join("")},$=function(t,r,e,n,i){var o,f,u=8*i-n-1,a=(1<<u)-1,s=a>>1,h=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=u;h>0;o=256*o+t[r+c],c+=l,h-=8);for(f=o&(1<<-h)-1,o>>=-h,h+=n;h>0;f=256*f+t[r+c],c+=l,h-=8);if(0===o)o=1-s;else{if(o===a)return f?NaN:Infinity*(p?-1:1);f+=Math.pow(2,n),o-=s}return(p?-1:1)*f*Math.pow(2,o-n)},tt=function(t,r,e,n,i,o){var f,u,a,s=8*o-i-1,h=(1<<s)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||Infinity===r?(u=isNaN(r)?1:0,f=h):(f=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-f))<1&&(f--,a*=2),(r+=f+c>=1?l/a:l*Math.pow(2,1-c))*a>=2&&(f++,a/=2),f+c>=h?(u=0,f=h):f+c>=1?(u=(r*a-1)*Math.pow(2,i),f+=c):(u=r*Math.pow(2,c-1)*Math.pow(2,i),f=0));i>=8;t[e+p]=255&u,p+=d,u/=256,i-=8);for(f=f<<i|u,s+=i;s>0;t[e+p]=255&f,p+=d,f/=256,s-=8);t[e+p-d]|=128*g},rt=l(function(t,r){var e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function n(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,i.prototype),r}function i(t,r,e){if("number"==typeof t){if("string"==typeof r)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return o(t,r,e)}function o(t,r,e){if("string"==typeof t)return function(t,r){if("string"==typeof r&&""!==r||(r="utf8"),!i.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=0|c(t,r),o=n(e),f=o.write(t,r);return f!==e&&(o=o.slice(0,f)),o}(t,r);if(ArrayBuffer.isView(t))return a(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(R(t,ArrayBuffer)||t&&R(t.buffer,ArrayBuffer))return s(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(R(t,SharedArrayBuffer)||t&&R(t.buffer,SharedArrayBuffer)))return s(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=t.valueOf&&t.valueOf();if(null!=o&&o!==t)return i.from(o,r,e);var f=function(t){if(i.isBuffer(t)){var r=0|h(t.length),e=n(r);return 0===e.length||t.copy(e,0,0,r),e}return void 0!==t.length?"number"!=typeof t.length||N(t.length)?n(0):a(t):"Buffer"===t.type&&Array.isArray(t.data)?a(t.data):void 0}(t);if(f)return f;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return i.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return f(t),n(t<0?0:0|h(t))}function a(t){for(var r=t.length<0?0:0|h(t.length),e=n(r),i=0;i<r;i+=1)e[i]=255&t[i];return e}function s(t,r,e){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(e||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===r&&void 0===e?new Uint8Array(t):void 0===e?new Uint8Array(t,r):new Uint8Array(t,r,e),Object.setPrototypeOf(n,i.prototype),n}function h(t){if(t>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function c(t,r){if(i.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||R(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return P(t).length;default:if(o)return n?-1:L(t).length;r=(""+r).toLowerCase(),o=!0}}function l(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return _(this,r,e);case"utf8":case"utf-8":return A(this,r,e);case"ascii":return U(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return B(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function p(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function d(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),N(e=+e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=i.from(r,n)),i.isBuffer(r))return 0===r.length?-1:g(t,r,e,n,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):g(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function g(t,r,e,n,i){var o,f=1,u=t.length,a=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;f=2,u/=2,a/=2,e/=2}function s(t,r){return 1===f?t[r]:t.readUInt16BE(r*f)}if(i){var h=-1;for(o=e;o<u;o++)if(s(t,o)===s(r,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===a)return h*f}else-1!==h&&(o-=o-h),h=-1}else for(e+a>u&&(e=u-a),o=e;o>=0;o--){for(var c=!0,l=0;l<a;l++)if(s(t,o+l)!==s(r,l)){c=!1;break}if(c)return o}return-1}function y(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;n>o/2&&(n=o/2);for(var f=0;f<n;++f){var u=parseInt(r.substr(2*f,2),16);if(N(u))return f;t[e+f]=u}return f}function v(t,r,e,n){return z(L(r,t.length-e),t,e,n)}function w(t,r,e,n){return z(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function b(t,r,e,n){return w(t,r,e,n)}function m(t,r,e,n){return z(P(r),t,e,n)}function E(t,r,e,n){return z(function(t,r){for(var e,n,i=[],o=0;o<t.length&&!((r-=2)<0);++o)n=(e=t.charCodeAt(o))>>8,i.push(e%256),i.push(n);return i}(r,t.length-e),t,e,n)}function B(t,r,e){return Q(0===r&&e===t.length?t:t.slice(r,e))}function A(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,f,u,a,s=t[i],h=null,c=s>239?4:s>223?3:s>191?2:1;if(i+c<=e)switch(c){case 1:s<128&&(h=s);break;case 2:128==(192&(o=t[i+1]))&&(a=(31&s)<<6|63&o)>127&&(h=a);break;case 3:f=t[i+2],128==(192&(o=t[i+1]))&&128==(192&f)&&(a=(15&s)<<12|(63&o)<<6|63&f)>2047&&(a<55296||a>57343)&&(h=a);break;case 4:f=t[i+2],u=t[i+3],128==(192&(o=t[i+1]))&&128==(192&f)&&128==(192&u)&&(a=(15&s)<<18|(63&o)<<12|(63&f)<<6|63&u)>65535&&a<1114112&&(h=a)}null===h?(h=65533,c=1):h>65535&&(n.push((h-=65536)>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(t){var r=t.length;if(r<=4096)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return e}(n)}function U(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function _(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=q[t[o]];return i}function S(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function x(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,o,f){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<f)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function O(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function C(t,r,e,n,i){return r=+r,e>>>=0,i||O(t,0,e,4),tt(t,r,e,n,23,4),e+4}function M(t,r,e,n,i){return r=+r,e>>>=0,i||O(t,0,e,8),tt(t,r,e,n,52,8),e+8}r.Buffer=i,r.SlowBuffer=function(t){return+t!=t&&(t=0),i.alloc(+t)},r.INSPECT_MAX_BYTES=50,r.kMaxLength=2147483647,(i.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(t,r),42===t.foo()}catch(t){return!1}}())||"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(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(t,r,e){return o(t,r,e)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array),i.alloc=function(t,r,e){return function(t,r,e){return f(t),t<=0?n(t):void 0!==r?"string"==typeof e?n(t).fill(r,e):n(t).fill(r):n(t)}(t,r,e)},i.allocUnsafe=function(t){return u(t)},i.allocUnsafeSlow=function(t){return u(t)},i.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==i.prototype},i.compare=function(t,r){if(R(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),R(r,Uint8Array)&&(r=i.from(r,r.offset,r.byteLength)),!i.isBuffer(t)||!i.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var e=t.length,n=r.length,o=0,f=Math.min(e,n);o<f;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},i.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}},i.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return i.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=i.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var f=t[e];if(R(f,Uint8Array)&&(f=i.from(f)),!i.isBuffer(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(n,o),o+=f.length}return n},i.byteLength=c,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)p(this,r,r+1);return this},i.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)p(this,r,r+3),p(this,r+1,r+2);return this},i.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)p(this,r,r+7),p(this,r+1,r+6),p(this,r+2,r+5),p(this,r+3,r+4);return this},i.prototype.toLocaleString=i.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):l.apply(this,arguments)},i.prototype.equals=function(t){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===i.compare(this,t)},i.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},e&&(i.prototype[e]=i.prototype.inspect),i.prototype.compare=function(t,r,e,n,o){if(R(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var f=(o>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),a=Math.min(f,u),s=this.slice(n,o),h=t.slice(r,e),c=0;c<a;++c)if(s[c]!==h[c]){f=s[c],u=h[c];break}return f<u?-1:u<f?1:0},i.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},i.prototype.indexOf=function(t,r,e){return d(this,t,r,e,!0)},i.prototype.lastIndexOf=function(t,r,e){return d(this,t,r,e,!1)},i.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(e)?(e>>>=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,t,r,e);case"utf8":case"utf-8":return v(this,t,r,e);case"ascii":return w(this,t,r,e);case"latin1":case"binary":return b(this,t,r,e);case"base64":return m(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},i.prototype.slice=function(t,r){var e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n=this.subarray(t,r);return Object.setPrototypeOf(n,i.prototype),n},i.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},i.prototype.readUIntBE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},i.prototype.readUInt8=function(t,r){return t>>>=0,r||x(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,r){return t>>>=0,r||x(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,r){return t>>>=0,r||x(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,r){return t>>>=0,r||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,r){return t>>>=0,r||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},i.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},i.prototype.readInt8=function(t,r){return t>>>=0,r||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,r){t>>>=0,r||x(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt16BE=function(t,r){t>>>=0,r||x(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt32LE=function(t,r){return t>>>=0,r||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,r){return t>>>=0,r||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,r){return t>>>=0,r||x(t,4,this.length),$(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,r){return t>>>=0,r||x(t,4,this.length),$(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,r){return t>>>=0,r||x(t,8,this.length),$(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,r){return t>>>=0,r||x(t,8,this.length),$(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},i.prototype.writeUIntBE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},i.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||k(this,t,r,1,255,0),this[r]=255&t,r+1},i.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||k(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},i.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||k(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},i.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||k(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},i.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||k(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},i.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,f=1,u=0;for(this[r]=255&t;++o<e&&(f*=256);)t<0&&0===u&&0!==this[r+o-1]&&(u=1),this[r+o]=(t/f>>0)-u&255;return r+e},i.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,f=1,u=0;for(this[r+o]=255&t;--o>=0&&(f*=256);)t<0&&0===u&&0!==this[r+o+1]&&(u=1),this[r+o]=(t/f>>0)-u&255;return r+e},i.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||k(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},i.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||k(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},i.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||k(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},i.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||k(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},i.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||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]=255&t,r+4},i.prototype.writeFloatLE=function(t,r,e){return C(this,t,r,!0,e)},i.prototype.writeFloatBE=function(t,r,e){return C(this,t,r,!1,e)},i.prototype.writeDoubleLE=function(t,r,e){return M(this,t,r,!0,e)},i.prototype.writeDoubleBE=function(t,r,e){return M(this,t,r,!1,e)},i.prototype.copy=function(t,r,e,n){if(!i.isBuffer(t))throw new TypeError("argument should be a Buffer");if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o=n-e;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,e,n);else if(this===t&&e<r&&r<n)for(var f=o-1;f>=0;--f)t[f+r]=this[f+e];else Uint8Array.prototype.set.call(t,this.subarray(e,n),r);return o},i.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var f;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(f=r;f<e;++f)this[f]=t;else{var u=i.isBuffer(t)?t:i.from(t,n),a=u.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(f=0;f<e-r;++f)this[f+r]=u[f%a]}return this};var T=/[^+/0-9A-Za-z-_]/g;function L(t,r){var e;r=r||Infinity;for(var n=t.length,i=null,o=[],f=0;f<n;++f){if((e=t.charCodeAt(f))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(f+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function P(t){return G(function(t){if((t=(t=t.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function R(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}function N(t){return t!=t}var q=function(){for(var t=new Array(256),r=0;r<16;++r)for(var e=16*r,n=0;n<16;++n)t[e+n]="0123456789abcdef"[r]+"0123456789abcdef"[n];return t}()}),et=l(function(t,r){var e=rt.Buffer;function n(t,r){for(var e in t)r[e]=t[e]}function i(t,r,n){return e(t,r,n)}e.from&&e.alloc&&e.allocUnsafe&&e.allocUnsafeSlow?t.exports=rt:(n(rt,r),r.Buffer=i),i.prototype=Object.create(e.prototype),n(e,i),i.from=function(t,r,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return e(t,r,n)},i.alloc=function(t,r,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=e(t);return void 0!==r?"string"==typeof n?i.fill(r,n):i.fill(r):i.fill(0),i},i.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return e(t)},i.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return rt.SlowBuffer(t)}}),nt=et.Buffer,it=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),e=0;e<r.length;e++)r[e]=255;for(var n=0;n<t.length;n++){var i=t.charAt(n),o=i.charCodeAt(0);if(255!==r[o])throw new TypeError(i+" is ambiguous");r[o]=n}var f=t.length,u=t.charAt(0),a=Math.log(f)/Math.log(256),s=Math.log(256)/Math.log(f);function h(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.