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