1
0
Fork 0
tera/Source/HTML/JS/sign-lib-min.js

250 lines
120 KiB
JavaScript

/*
The buffer module from node.js, for the browser.
@author Feross Aboukhadijeh <https://feross.org>
@license MIT
Determine if an object is a Buffer
@author Feross Aboukhadijeh <https://feross.org>
@license MIT
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(f){var k=0;return function(){return k<f.length?{done:!1,value:f[k++]}:{done:!0}}};$jscomp.arrayIterator=function(f){return{next:$jscomp.arrayIteratorImpl(f)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(f,k,h){f!=Array.prototype&&f!=Object.prototype&&(f[k]=h.value)};
$jscomp.getGlobal=function(f){return"undefined"!=typeof window&&window===f?f:"undefined"!=typeof global&&null!=global?global:f};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var f=0;return function(k){return $jscomp.SYMBOL_PREFIX+(k||"")+f++}}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var f=$jscomp.global.Symbol.iterator;f||(f=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[f]&&$jscomp.defineProperty(Array.prototype,f,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var f=$jscomp.global.Symbol.asyncIterator;f||(f=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(f){$jscomp.initSymbolIterator();f={next:f};f[$jscomp.global.Symbol.iterator]=function(){return this};return f};
(function(){function f(k,h,d){function e(a,b){if(!h[a]){if(!k[a]){var m="function"==typeof require&&require;if(!b&&m)return m(a,!0);if(c)return c(a,!0);m=Error("Cannot find module '"+a+"'");throw m.code="MODULE_NOT_FOUND",m;}m=h[a]={exports:{}};k[a][0].call(m.exports,function(b){return e(k[a][1][b]||b)},m,m.exports,f,k,h,d)}return h[a].exports}for(var c="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}return f})()({1:[function(f,k,h){function d(a){var b=a.length;if(0<b%4)throw Error("Invalid string. Length must be a multiple of 4");
a=a.indexOf("=");-1===a&&(a=b);return[a,a===b?0:4-a%4]}function e(a,d,g){for(var b=[],e=d;e<g;e+=3)d=(a[e]<<16&16711680)+(a[e+1]<<8&65280)+(a[e+2]&255),b.push(c[d>>18&63]+c[d>>12&63]+c[d>>6&63]+c[d&63]);return b.join("")}h.byteLength=function(a){a=d(a);var b=a[1];return 3*(a[0]+b)/4-b};h.toByteArray=function(b){var c=d(b);var e=c[0];c=c[1];for(var t=new a(3*(e+c)/4-c),n=0,q=0<c?e-4:e,f=0;f<q;f+=4)e=g[b.charCodeAt(f)]<<18|g[b.charCodeAt(f+1)]<<12|g[b.charCodeAt(f+2)]<<6|g[b.charCodeAt(f+3)],t[n++]=
e>>16&255,t[n++]=e>>8&255,t[n++]=e&255;2===c&&(e=g[b.charCodeAt(f)]<<2|g[b.charCodeAt(f+1)]>>4,t[n++]=e&255);1===c&&(e=g[b.charCodeAt(f)]<<10|g[b.charCodeAt(f+1)]<<4|g[b.charCodeAt(f+2)]>>2,t[n++]=e>>8&255,t[n++]=e&255);return t};h.fromByteArray=function(a){for(var b=a.length,d=b%3,g=[],n=0,q=b-d;n<q;n+=16383)g.push(e(a,n,n+16383>q?q:n+16383));1===d?(a=a[b-1],g.push(c[a>>2]+c[a<<4&63]+"==")):2===d&&(a=(a[b-2]<<8)+a[b-1],g.push(c[a>>10]+c[a>>4&63]+c[a<<2&63]+"="));return g.join("")};var c=[],g=[],
a="undefined"!==typeof Uint8Array?Uint8Array:Array;for(f=0;64>f;++f)c[f]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f],g["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(f)]=f;g[45]=62;g[95]=63},{}],2:[function(f,k,h){},{}],3:[function(f,k,h){function d(a){if(a>J)throw new RangeError("Invalid typed array length");a=new Uint8Array(a);a.__proto__=e.prototype;return a}function e(w,b,l){if("number"===typeof w){if("string"===typeof b)throw Error("If encoding is specified then the first argument must be a string");
return a(w)}return c(w,b,l)}function c(a,b,l){if("number"===typeof a)throw new TypeError('"value" argument must not be a number');if(K(a)||a&&K(a.buffer)){if(0>b||a.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(a.byteLength<b+(l||0))throw new RangeError('"length" is outside of buffer bounds');a=void 0===b&&void 0===l?new Uint8Array(a):void 0===l?new Uint8Array(a,b):new Uint8Array(a,b,l);a.__proto__=e.prototype;return a}if("string"===typeof a){var w=b;if("string"!==typeof w||
""===w)w="utf8";if(!e.isEncoding(w))throw new TypeError("Unknown encoding: "+w);b=t(a,w)|0;l=d(b);a=l.write(a,w);a!==b&&(l=l.slice(0,a));return l}return m(a)}function g(a){if("number"!==typeof a)throw new TypeError('"size" argument must be of type number');if(0>a)throw new RangeError('"size" argument must not be negative');}function a(a){g(a);return d(0>a?0:p(a)|0)}function b(a){for(var w=0>a.length?0:p(a.length)|0,l=d(w),b=0;b<w;b+=1)l[b]=a[b]&255;return l}function m(a){if(e.isBuffer(a)){var w=p(a.length)|
0,l=d(w);if(0===l.length)return l;a.copy(l,0,0,w);return l}if(a){if(ArrayBuffer.isView(a)||"length"in a)return(w="number"!==typeof a.length)||(w=a.length,w=w!==w),w?d(0):b(a);if("Buffer"===a.type&&Array.isArray(a.data))return b(a.data)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.");}function p(a){if(a>=J)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+J.toString(16)+" bytes");return a|0}function t(a,
b){if(e.isBuffer(a))return a.length;if(ArrayBuffer.isView(a)||K(a))return a.byteLength;"string"!==typeof a&&(a=""+a);var l=a.length;if(0===l)return 0;for(var w=!1;;)switch(b){case "ascii":case "latin1":case "binary":return l;case "utf8":case "utf-8":case void 0:return C(a).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2*l;case "hex":return l>>>1;case "base64":return D.toByteArray(G(a)).length;default:if(w)return C(a).length;b=(""+b).toLowerCase();w=!0}}function n(a,b,l){var c=
!1;if(void 0===b||0>b)b=0;if(b>this.length)return"";if(void 0===l||l>this.length)l=this.length;if(0>=l)return"";l>>>=0;b>>>=0;if(l<=b)return"";for(a||(a="utf8");;)switch(a){case "hex":a=b;b=l;l=this.length;if(!a||0>a)a=0;if(!b||0>b||b>l)b=l;c="";for(l=a;l<b;++l)a=c,c=this[l],c=16>c?"0"+c.toString(16):c.toString(16),c=a+c;return c;case "utf8":case "utf-8":return v(this,b,l);case "ascii":a="";for(l=Math.min(this.length,l);b<l;++b)a+=String.fromCharCode(this[b]&127);return a;case "latin1":case "binary":a=
"";for(l=Math.min(this.length,l);b<l;++b)a+=String.fromCharCode(this[b]);return a;case "base64":return b=0===b&&l===this.length?D.fromByteArray(this):D.fromByteArray(this.slice(b,l)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,l);l="";for(a=0;a<b.length;a+=2)l+=String.fromCharCode(b[a]+256*b[a+1]);return l;default:if(c)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase();c=!0}}function q(a,b,l){var c=a[b];a[b]=a[l];a[l]=c}function Q(a,b,l,c,d){if(0===a.length)return-1;
"string"===typeof l?(c=l,l=0):2147483647<l?l=2147483647:-2147483648>l&&(l=-2147483648);l=+l;l!==l&&(l=d?0:a.length-1);0>l&&(l=a.length+l);if(l>=a.length){if(d)return-1;l=a.length-1}else if(0>l)if(d)l=0;else return-1;"string"===typeof b&&(b=e.from(b,c));if(e.isBuffer(b))return 0===b.length?-1:N(a,b,l,c,d);if("number"===typeof b)return b&=255,"function"===typeof Uint8Array.prototype.indexOf?d?Uint8Array.prototype.indexOf.call(a,b,l):Uint8Array.prototype.lastIndexOf.call(a,b,l):N(a,[b],l,c,d);throw new TypeError("val must be string, number or Buffer");
}function N(a,b,l,c,d){function w(a,b){return 1===e?a[b]:a.readUInt16BE(b*e)}var e=1,g=a.length,m=b.length;if(void 0!==c&&(c=String(c).toLowerCase(),"ucs2"===c||"ucs-2"===c||"utf16le"===c||"utf-16le"===c)){if(2>a.length||2>b.length)return-1;e=2;g/=2;m/=2;l/=2}if(d)for(c=-1;l<g;l++)if(w(a,l)===w(b,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===m)return c*e}else-1!==c&&(l-=l-c),c=-1;else for(l+m>g&&(l=g-m);0<=l;l--){g=!0;for(c=0;c<m;c++)if(w(a,l+c)!==w(b,c)){g=!1;break}if(g)return l}return-1}function v(a,
b,l){l=Math.min(a.length,l);for(var c=[];b<l;){var d=a[b],e=null,w=239<d?4:223<d?3:191<d?2:1;if(b+w<=l)switch(w){case 1:128>d&&(e=d);break;case 2:var g=a[b+1];128===(g&192)&&(d=(d&31)<<6|g&63,127<d&&(e=d));break;case 3:g=a[b+1];var m=a[b+2];128===(g&192)&&128===(m&192)&&(d=(d&15)<<12|(g&63)<<6|m&63,2047<d&&(55296>d||57343<d)&&(e=d));break;case 4:g=a[b+1];m=a[b+2];var M=a[b+3];128===(g&192)&&128===(m&192)&&128===(M&192)&&(d=(d&15)<<18|(g&63)<<12|(m&63)<<6|M&63,65535<d&&1114112>d&&(e=d))}null===e?(e=
65533,w=1):65535<e&&(e-=65536,c.push(e>>>10&1023|55296),e=56320|e&1023);c.push(e);b+=w}a=c.length;if(a<=y)c=String.fromCharCode.apply(String,c);else{l="";for(b=0;b<a;)l+=String.fromCharCode.apply(String,c.slice(b,b+=y));c=l}return c}function B(a,b,l){if(0!==a%1||0>a)throw new RangeError("offset is not uint");if(a+b>l)throw new RangeError("Trying to access beyond buffer length");}function z(a,b,l,c,d,g){if(!e.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>d||b<
g)throw new RangeError('"value" argument is out of bounds');if(l+c>a.length)throw new RangeError("Index out of range");}function x(a,b,l,c,d,e){if(l+c>a.length)throw new RangeError("Index out of range");if(0>l)throw new RangeError("Index out of range");}function H(a,b,l,c,d){b=+b;l>>>=0;d||x(a,b,l,4,3.4028234663852886E38,-3.4028234663852886E38);I.write(a,b,l,c,23,4);return l+4}function F(a,b,l,c,d){b=+b;l>>>=0;d||x(a,b,l,8,1.7976931348623157E308,-1.7976931348623157E308);I.write(a,b,l,c,52,8);return l+
8}function G(a){a=a.split("=")[0];a=a.trim().replace(L,"");if(2>a.length)return"";for(;0!==a.length%4;)a+="=";return a}function C(a,b){b=b||Infinity;for(var l,c=a.length,d=null,e=[],g=0;g<c;++g){l=a.charCodeAt(g);if(55295<l&&57344>l){if(!d){if(56319<l){-1<(b-=3)&&e.push(239,191,189);continue}else if(g+1===c){-1<(b-=3)&&e.push(239,191,189);continue}d=l;continue}if(56320>l){-1<(b-=3)&&e.push(239,191,189);d=l;continue}l=(d-55296<<10|l-56320)+65536}else d&&-1<(b-=3)&&e.push(239,191,189);d=null;if(128>
l){if(0>--b)break;e.push(l)}else if(2048>l){if(0>(b-=2))break;e.push(l>>6|192,l&63|128)}else if(65536>l){if(0>(b-=3))break;e.push(l>>12|224,l>>6&63|128,l&63|128)}else if(1114112>l){if(0>(b-=4))break;e.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw Error("Invalid code point");}return e}function A(a){for(var b=[],l=0;l<a.length;++l)b.push(a.charCodeAt(l)&255);return b}function E(a,b,l,c){for(var d=0;d<c&&!(d+l>=b.length||d>=a.length);++d)b[d+l]=a[d];return d}function K(a){return a instanceof
ArrayBuffer||null!=a&&null!=a.constructor&&"ArrayBuffer"===a.constructor.name&&"number"===typeof a.byteLength}var D=f("base64-js"),I=f("ieee754");h.Buffer=e;h.SlowBuffer=function(a){+a!=a&&(a=0);return e.alloc(+a)};h.INSPECT_MAX_BYTES=50;var J=2147483647;h.kMaxLength=J;e.TYPED_ARRAY_SUPPORT=function(){try{var a=new Uint8Array(1);a.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return 42===a.foo()}catch(M){return!1}}();e.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==
typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");Object.defineProperty(e.prototype,"parent",{get:function(){if(this instanceof e)return this.buffer}});Object.defineProperty(e.prototype,"offset",{get:function(){if(this instanceof e)return this.byteOffset}});$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbol();"undefined"!==typeof Symbol&&Symbol.species&&e[Symbol.species]===
e&&($jscomp.initSymbol(),Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));e.poolSize=8192;e.from=function(a,b,l){return c(a,b,l)};e.prototype.__proto__=Uint8Array.prototype;e.__proto__=Uint8Array;e.alloc=function(a,b,l){g(a);a=0>=a?d(a):void 0!==b?"string"===typeof l?d(a).fill(b,l):d(a).fill(b):d(a);return a};e.allocUnsafe=function(b){return a(b)};e.allocUnsafeSlow=function(b){return a(b)};e.isBuffer=function(a){return null!=a&&!0===a._isBuffer};e.compare=
function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var l=a.length,c=b.length,d=0,g=Math.min(l,c);d<g;++d)if(a[d]!==b[d]){l=a[d];c=b[d];break}return l<c?-1:c<l?1:0};e.isEncoding=function(a){switch(String(a).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}};e.concat=function(a,b){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');
if(0===a.length)return e.alloc(0);var c;if(void 0===b)for(c=b=0;c<a.length;++c)b+=a[c].length;var d=e.allocUnsafe(b),g=0;for(c=0;c<a.length;++c){var m=a[c];ArrayBuffer.isView(m)&&(m=e.from(m));if(!e.isBuffer(m))throw new TypeError('"list" argument must be an Array of Buffers');m.copy(d,g);g+=m.length}return d};e.byteLength=t;e.prototype._isBuffer=!0;e.prototype.swap16=function(){var a=this.length;if(0!==a%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var b=0;b<a;b+=2)q(this,
b,b+1);return this};e.prototype.swap32=function(){var a=this.length;if(0!==a%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var b=0;b<a;b+=4)q(this,b,b+3),q(this,b+1,b+2);return this};e.prototype.swap64=function(){var a=this.length;if(0!==a%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var b=0;b<a;b+=8)q(this,b,b+7),q(this,b+1,b+6),q(this,b+2,b+5),q(this,b+3,b+4);return this};e.prototype.toString=function(){var a=this.length;return 0===a?"":0===arguments.length?
v(this,0,a):n.apply(this,arguments)};e.prototype.toLocaleString=e.prototype.toString;e.prototype.equals=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:0===e.compare(this,a)};e.prototype.inspect=function(){var a="",b=h.INSPECT_MAX_BYTES;0<this.length&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... "));return"<Buffer "+a+">"};e.prototype.compare=function(a,b,c,d,g){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");
void 0===b&&(b=0);void 0===c&&(c=a?a.length:0);void 0===d&&(d=0);void 0===g&&(g=this.length);if(0>b||c>a.length||0>d||g>this.length)throw new RangeError("out of range index");if(d>=g&&b>=c)return 0;if(d>=g)return-1;if(b>=c)return 1;b>>>=0;c>>>=0;d>>>=0;g>>>=0;if(this===a)return 0;var l=g-d,m=c-b,p=Math.min(l,m);d=this.slice(d,g);a=a.slice(b,c);for(b=0;b<p;++b)if(d[b]!==a[b]){l=d[b];m=a[b];break}return l<m?-1:m<l?1:0};e.prototype.includes=function(a,b,c){return-1!==this.indexOf(a,b,c)};e.prototype.indexOf=
function(a,b,c){return Q(this,a,b,c,!0)};e.prototype.lastIndexOf=function(a,b,c){return Q(this,a,b,c,!1)};e.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"===typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b>>>=0,isFinite(c)?(c>>>=0,void 0===d&&(d="utf8")):(d=c,c=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var l=this.length-b;if(void 0===c||c>l)c=l;if(0<a.length&&(0>c||0>b)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");
d||(d="utf8");for(l=!1;;)switch(d){case "hex":a:{b=Number(b)||0;d=this.length-b;c?(c=Number(c),c>d&&(c=d)):c=d;d=a.length;c>d/2&&(c=d/2);for(d=0;d<c;++d){l=parseInt(a.substr(2*d,2),16);if(l!==l){a=d;break a}this[b+d]=l}a=d}return a;case "utf8":case "utf-8":return E(C(a,this.length-b),this,b,c);case "ascii":return E(A(a),this,b,c);case "latin1":case "binary":return E(A(a),this,b,c);case "base64":return E(D.toByteArray(G(a)),this,b,c);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":d=a;l=this.length-
b;for(var e=[],g=0;g<d.length&&!(0>(l-=2));++g){var m=d.charCodeAt(g);a=m>>8;m%=256;e.push(m);e.push(a)}return E(e,this,b,c);default:if(l)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase();l=!0}};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var y=4096;e.prototype.slice=function(a,b){var c=this.length;a=~~a;b=void 0===b?c:~~b;0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c);0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c);b<a&&(b=a);c=this.subarray(a,b);c.__proto__=
e.prototype;return c};e.prototype.readUIntLE=function(a,b,c){a>>>=0;b>>>=0;c||B(a,b,this.length);c=this[a];for(var d=1,l=0;++l<b&&(d*=256);)c+=this[a+l]*d;return c};e.prototype.readUIntBE=function(a,b,c){a>>>=0;b>>>=0;c||B(a,b,this.length);c=this[a+--b];for(var d=1;0<b&&(d*=256);)c+=this[a+--b]*d;return c};e.prototype.readUInt8=function(a,b){a>>>=0;b||B(a,1,this.length);return this[a]};e.prototype.readUInt16LE=function(a,b){a>>>=0;b||B(a,2,this.length);return this[a]|this[a+1]<<8};e.prototype.readUInt16BE=
function(a,b){a>>>=0;b||B(a,2,this.length);return this[a]<<8|this[a+1]};e.prototype.readUInt32LE=function(a,b){a>>>=0;b||B(a,4,this.length);return(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]};e.prototype.readUInt32BE=function(a,b){a>>>=0;b||B(a,4,this.length);return 16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])};e.prototype.readIntLE=function(a,b,c){a>>>=0;b>>>=0;c||B(a,b,this.length);c=this[a];for(var d=1,l=0;++l<b&&(d*=256);)c+=this[a+l]*d;c>=128*d&&(c-=Math.pow(2,8*b));return c};
e.prototype.readIntBE=function(a,b,c){a>>>=0;b>>>=0;c||B(a,b,this.length);c=b;for(var d=1,l=this[a+--c];0<c&&(d*=256);)l+=this[a+--c]*d;l>=128*d&&(l-=Math.pow(2,8*b));return l};e.prototype.readInt8=function(a,b){a>>>=0;b||B(a,1,this.length);return this[a]&128?-1*(255-this[a]+1):this[a]};e.prototype.readInt16LE=function(a,b){a>>>=0;b||B(a,2,this.length);var c=this[a]|this[a+1]<<8;return c&32768?c|4294901760:c};e.prototype.readInt16BE=function(a,b){a>>>=0;b||B(a,2,this.length);var c=this[a+1]|this[a]<<
8;return c&32768?c|4294901760:c};e.prototype.readInt32LE=function(a,b){a>>>=0;b||B(a,4,this.length);return this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24};e.prototype.readInt32BE=function(a,b){a>>>=0;b||B(a,4,this.length);return this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};e.prototype.readFloatLE=function(a,b){a>>>=0;b||B(a,4,this.length);return I.read(this,a,!0,23,4)};e.prototype.readFloatBE=function(a,b){a>>>=0;b||B(a,4,this.length);return I.read(this,a,!1,23,4)};e.prototype.readDoubleLE=
function(a,b){a>>>=0;b||B(a,8,this.length);return I.read(this,a,!0,52,8)};e.prototype.readDoubleBE=function(a,b){a>>>=0;b||B(a,8,this.length);return I.read(this,a,!1,52,8)};e.prototype.writeUIntLE=function(a,b,c,d){a=+a;b>>>=0;c>>>=0;d||z(this,a,b,c,Math.pow(2,8*c)-1,0);d=1;var e=0;for(this[b]=a&255;++e<c&&(d*=256);)this[b+e]=a/d&255;return b+c};e.prototype.writeUIntBE=function(a,b,c,d){a=+a;b>>>=0;c>>>=0;d||z(this,a,b,c,Math.pow(2,8*c)-1,0);d=c-1;var e=1;for(this[b+d]=a&255;0<=--d&&(e*=256);)this[b+
d]=a/e&255;return b+c};e.prototype.writeUInt8=function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,1,255,0);this[b]=a&255;return b+1};e.prototype.writeUInt16LE=function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,2,65535,0);this[b]=a&255;this[b+1]=a>>>8;return b+2};e.prototype.writeUInt16BE=function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,2,65535,0);this[b]=a>>>8;this[b+1]=a&255;return b+2};e.prototype.writeUInt32LE=function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,4,4294967295,0);this[b+3]=a>>>24;this[b+2]=a>>>16;this[b+1]=a>>>8;this[b]=
a&255;return b+4};e.prototype.writeUInt32BE=function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,4,4294967295,0);this[b]=a>>>24;this[b+1]=a>>>16;this[b+2]=a>>>8;this[b+3]=a&255;return b+4};e.prototype.writeIntLE=function(a,b,c,d){a=+a;b>>>=0;d||(d=Math.pow(2,8*c-1),z(this,a,b,c,d-1,-d));d=0;var e=1,g=0;for(this[b]=a&255;++d<c&&(e*=256);)0>a&&0===g&&0!==this[b+d-1]&&(g=1),this[b+d]=(a/e>>0)-g&255;return b+c};e.prototype.writeIntBE=function(a,b,c,d){a=+a;b>>>=0;d||(d=Math.pow(2,8*c-1),z(this,a,b,c,d-1,-d));d=
c-1;var e=1,g=0;for(this[b+d]=a&255;0<=--d&&(e*=256);)0>a&&0===g&&0!==this[b+d+1]&&(g=1),this[b+d]=(a/e>>0)-g&255;return b+c};e.prototype.writeInt8=function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,1,127,-128);0>a&&(a=255+a+1);this[b]=a&255;return b+1};e.prototype.writeInt16LE=function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,2,32767,-32768);this[b]=a&255;this[b+1]=a>>>8;return b+2};e.prototype.writeInt16BE=function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,2,32767,-32768);this[b]=a>>>8;this[b+1]=a&255;return b+2};e.prototype.writeInt32LE=
function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,4,2147483647,-2147483648);this[b]=a&255;this[b+1]=a>>>8;this[b+2]=a>>>16;this[b+3]=a>>>24;return b+4};e.prototype.writeInt32BE=function(a,b,c){a=+a;b>>>=0;c||z(this,a,b,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);this[b]=a>>>24;this[b+1]=a>>>16;this[b+2]=a>>>8;this[b+3]=a&255;return b+4};e.prototype.writeFloatLE=function(a,b,c){return H(this,a,b,!0,c)};e.prototype.writeFloatBE=function(a,b,c){return H(this,a,b,!1,c)};e.prototype.writeDoubleLE=function(a,
b,c){return F(this,a,b,!0,c)};e.prototype.writeDoubleBE=function(a,b,c){return F(this,a,b,!1,c)};e.prototype.copy=function(a,b,c,d){if(!e.isBuffer(a))throw new TypeError("argument should be a Buffer");c||(c=0);d||0===d||(d=this.length);b>=a.length&&(b=a.length);b||(b=0);0<d&&d<c&&(d=c);if(d===c||0===a.length||0===this.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>c||c>=this.length)throw new RangeError("Index out of range");if(0>d)throw new RangeError("sourceEnd out of bounds");
d>this.length&&(d=this.length);a.length-b<d-c&&(d=a.length-b+c);var g=d-c;if(this===a&&"function"===typeof Uint8Array.prototype.copyWithin)this.copyWithin(b,c,d);else if(this===a&&c<b&&b<d)for(d=g-1;0<=d;--d)a[d+b]=this[d+c];else Uint8Array.prototype.set.call(a,this.subarray(c,d),b);return g};e.prototype.fill=function(a,b,c,d){if("string"===typeof a){"string"===typeof b?(d=b,b=0,c=this.length):"string"===typeof c&&(d=c,c=this.length);if(void 0!==d&&"string"!==typeof d)throw new TypeError("encoding must be a string");
if("string"===typeof d&&!e.isEncoding(d))throw new TypeError("Unknown encoding: "+d);if(1===a.length){var g=a.charCodeAt(0);if("utf8"===d&&128>g||"latin1"===d)a=g}}else"number"===typeof a&&(a&=255);if(0>b||this.length<b||this.length<c)throw new RangeError("Out of range index");if(c<=b)return this;b>>>=0;c=void 0===c?this.length:c>>>0;a||(a=0);if("number"===typeof a)for(d=b;d<c;++d)this[d]=a;else{g=e.isBuffer(a)?a:new e(a,d);var m=g.length;if(0===m)throw new TypeError('The value "'+a+'" is invalid for argument "value"');
for(d=0;d<c-b;++d)this[d+b]=g[d%m]}return this};var L=/[^+/0-9A-Za-z-_]/g},{"base64-js":1,ieee754:6}],4:[function(f,k,h){(function(d){h.isArray=function(d){return Array.isArray?Array.isArray(d):"[object Array]"===Object.prototype.toString.call(d)};h.isBoolean=function(d){return"boolean"===typeof d};h.isNull=function(d){return null===d};h.isNullOrUndefined=function(d){return null==d};h.isNumber=function(d){return"number"===typeof d};h.isString=function(d){return"string"===typeof d};h.isSymbol=function(d){return"symbol"===
typeof d};h.isUndefined=function(d){return void 0===d};h.isRegExp=function(d){return"[object RegExp]"===Object.prototype.toString.call(d)};h.isObject=function(d){return"object"===typeof d&&null!==d};h.isDate=function(d){return"[object Date]"===Object.prototype.toString.call(d)};h.isError=function(d){return"[object Error]"===Object.prototype.toString.call(d)||d instanceof Error};h.isFunction=function(d){return"function"===typeof d};h.isPrimitive=function(d){return null===d||"boolean"===typeof d||"number"===
typeof d||"string"===typeof d||"symbol"===typeof d||"undefined"===typeof d};h.isBuffer=d.isBuffer}).call(this,{isBuffer:f("../../is-buffer/index.js")})},{"../../is-buffer/index.js":8}],5:[function(f,k,h){function d(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=q(null),this._eventsCount=0);this._maxListeners=this._maxListeners||void 0}function e(a,b,c,g){var e;if("function"!==typeof c)throw new TypeError('"listener" argument must be a function');if(e=a._events){e.newListener&&
(a.emit("newListener",b,c.listener?c.listener:c),e=a._events);var m=e[b]}else e=a._events=q(null),a._eventsCount=0;m?("function"===typeof m?m=e[b]=g?[c,m]:[m,c]:g?m.unshift(c):m.push(c),m.warned||(c=void 0===a._maxListeners?d.defaultMaxListeners:a._maxListeners)&&0<c&&m.length>c&&(m.warned=!0,c=Error("Possible EventEmitter memory leak detected. "+m.length+' "'+String(b)+'" listeners added. Use emitter.setMaxListeners() to increase limit.'),c.name="MaxListenersExceededWarning",c.emitter=a,c.type=b,
c.count=m.length,"object"===typeof console&&console.warn&&console.warn("%s: %s",c.name,c.message))):(e[b]=c,++a._eventsCount);return a}function c(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);
default:for(var a=Array(arguments.length),b=0;b<a.length;++b)a[b]=arguments[b];this.listener.apply(this.target,a)}}function g(a,b,d){a={fired:!1,wrapFn:void 0,target:a,type:b,listener:d};b=N.call(c,a);b.listener=d;return a.wrapFn=b}function a(a,b,c){a=a._events;if(!a)return[];b=a[b];if(!b)return[];if("function"===typeof b)return c?[b.listener||b]:[b];if(c)for(c=Array(b.length),a=0;a<c.length;++a)c[a]=b[a].listener||b[a];else c=m(b,b.length);return c}function b(a){var b=this._events;if(b){a=b[a];if("function"===
typeof a)return 1;if(a)return a.length}return 0}function m(a,b){for(var c=Array(b),d=0;d<b;++d)c[d]=a[d];return c}function p(a){var b=function(){};b.prototype=a;return new b}function t(a){var b=[],c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return c}function n(a){var b=this;return function(){return b.apply(a,arguments)}}var q=Object.create||p,Q=Object.keys||t,N=Function.prototype.bind||n;k.exports=d;d.EventEmitter=d;d.prototype._events=void 0;d.prototype._maxListeners=void 0;
var v=10;try{f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0});var B=0===f.x}catch(z){B=!1}B?Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return v},set:function(a){if("number"!==typeof a||0>a||a!==a)throw new TypeError('"defaultMaxListeners" must be a positive number');v=a}}):d.defaultMaxListeners=v;d.prototype.setMaxListeners=function(a){if("number"!==typeof a||0>a||isNaN(a))throw new TypeError('"n" argument must be a positive number');this._maxListeners=
a;return this};d.prototype.getMaxListeners=function(){return void 0===this._maxListeners?d.defaultMaxListeners:this._maxListeners};d.prototype.emit=function(a){var b,c,d;var g="error"===a;if(d=this._events)g=g&&null==d.error;else if(!g)return!1;if(g){1<arguments.length&&(b=arguments[1]);if(b instanceof Error)throw b;d=Error('Unhandled "error" event. ('+b+")");d.context=b;throw d;}b=d[a];if(!b)return!1;d="function"===typeof b;var e=arguments.length;switch(e){case 1:if(d)b.call(this);else for(d=b.length,
b=m(b,d),g=0;g<d;++g)b[g].call(this);break;case 2:g=arguments[1];if(d)b.call(this,g);else for(d=b.length,b=m(b,d),e=0;e<d;++e)b[e].call(this,g);break;case 3:g=arguments[1];e=arguments[2];if(d)b.call(this,g,e);else for(d=b.length,b=m(b,d),c=0;c<d;++c)b[c].call(this,g,e);break;case 4:g=arguments[1];e=arguments[2];c=arguments[3];if(d)b.call(this,g,e,c);else{d=b.length;b=m(b,d);for(var p=0;p<d;++p)b[p].call(this,g,e,c)}break;default:g=Array(e-1);for(c=1;c<e;c++)g[c-1]=arguments[c];if(d)b.apply(this,g);
else for(d=b.length,b=m(b,d),e=0;e<d;++e)b[e].apply(this,g)}return!0};d.prototype.addListener=function(a,b){return e(this,a,b,!1)};d.prototype.on=d.prototype.addListener;d.prototype.prependListener=function(a,b){return e(this,a,b,!0)};d.prototype.once=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');this.on(a,g(this,a,b));return this};d.prototype.prependOnceListener=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');
this.prependListener(a,g(this,a,b));return this};d.prototype.removeListener=function(a,b){var c;if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');var d=this._events;if(!d)return this;var g=d[a];if(!g)return this;if(g===b||g.listener===b)0===--this._eventsCount?this._events=q(null):(delete d[a],d.removeListener&&this.emit("removeListener",a,g.listener||b));else if("function"!==typeof g){var e=-1;for(c=g.length-1;0<=c;c--)if(g[c]===b||g[c].listener===b){var m=g[c].listener;
e=c;break}if(0>e)return this;if(0===e)g.shift();else{c=e+1;for(var p=g.length;c<p;e+=1,c+=1)g[e]=g[c];g.pop()}1===g.length&&(d[a]=g[0]);d.removeListener&&this.emit("removeListener",a,m||b)}return this};d.prototype.removeAllListeners=function(a){var b=this._events;if(!b)return this;if(!b.removeListener)return 0===arguments.length?(this._events=q(null),this._eventsCount=0):b[a]&&(0===--this._eventsCount?this._events=q(null):delete b[a]),this;if(0===arguments.length){var c=Q(b);for(b=0;b<c.length;++b){var d=
c[b];"removeListener"!==d&&this.removeAllListeners(d)}this.removeAllListeners("removeListener");this._events=q(null);this._eventsCount=0;return this}c=b[a];if("function"===typeof c)this.removeListener(a,c);else if(c)for(b=c.length-1;0<=b;b--)this.removeListener(a,c[b]);return this};d.prototype.listeners=function(b){return a(this,b,!0)};d.prototype.rawListeners=function(b){return a(this,b,!1)};d.listenerCount=function(a,c){return"function"===typeof a.listenerCount?a.listenerCount(c):b.call(a,c)};d.prototype.listenerCount=
b;d.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}],6:[function(f,k,h){h.read=function(d,e,c,g,a){var b=8*a-g-1;var m=(1<<b)-1,p=m>>1,t=-7;a=c?a-1:0;var n=c?-1:1,q=d[e+a];a+=n;c=q&(1<<-t)-1;q>>=-t;for(t+=b;0<t;c=256*c+d[e+a],a+=n,t-=8);b=c&(1<<-t)-1;c>>=-t;for(t+=g;0<t;b=256*b+d[e+a],a+=n,t-=8);if(0===c)c=1-p;else{if(c===m)return b?NaN:Infinity*(q?-1:1);b+=Math.pow(2,g);c-=p}return(q?-1:1)*b*Math.pow(2,c-g)};h.write=function(d,e,c,g,a,b){var m,p=8*
b-a-1,t=(1<<p)-1,n=t>>1,q=23===a?Math.pow(2,-24)-Math.pow(2,-77):0;b=g?0:b-1;var f=g?1:-1,N=0>e||0===e&&0>1/e?1:0;e=Math.abs(e);isNaN(e)||Infinity===e?(e=isNaN(e)?1:0,g=t):(g=Math.floor(Math.log(e)/Math.LN2),1>e*(m=Math.pow(2,-g))&&(g--,m*=2),e=1<=g+n?e+q/m:e+q*Math.pow(2,1-n),2<=e*m&&(g++,m/=2),g+n>=t?(e=0,g=t):1<=g+n?(e=(e*m-1)*Math.pow(2,a),g+=n):(e=e*Math.pow(2,n-1)*Math.pow(2,a),g=0));for(;8<=a;d[c+b]=e&255,b+=f,e/=256,a-=8);g=g<<a|e;for(p+=a;0<p;d[c+b]=g&255,b+=f,g/=256,p-=8);d[c+b-f]|=128*
N}},{}],7:[function(f,k,h){k.exports="function"===typeof Object.create?function(d,e){d.super_=e;d.prototype=Object.create(e.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})}:function(d,e){d.super_=e;var c=function(){};c.prototype=e.prototype;d.prototype=new c;d.prototype.constructor=d}},{}],8:[function(f,k,h){function d(d){return!!d.constructor&&"function"===typeof d.constructor.isBuffer&&d.constructor.isBuffer(d)}k.exports=function(e){return null!=e&&(d(e)||"function"===
typeof e.readFloatLE&&"function"===typeof e.slice&&d(e.slice(0,0))||!!e._isBuffer)}},{}],9:[function(f,k,h){var d={}.toString;k.exports=Array.isArray||function(e){return"[object Array]"==d.call(e)}},{}],10:[function(f,k,h){(function(d){function e(c,g,a,b){if("function"!==typeof c)throw new TypeError('"callback" argument must be a function');var e=arguments.length;switch(e){case 0:case 1:return d.nextTick(c);case 2:return d.nextTick(function(){c.call(null,g)});case 3:return d.nextTick(function(){c.call(null,
g,a)});case 4:return d.nextTick(function(){c.call(null,g,a,b)});default:var p=Array(e-1);for(e=0;e<p.length;)p[e++]=arguments[e];return d.nextTick(function(){c.apply(null,p)})}}!d.version||0===d.version.indexOf("v0.")||0===d.version.indexOf("v1.")&&0!==d.version.indexOf("v1.8.")?k.exports={nextTick:e}:k.exports=d}).call(this,f("_process"))},{_process:11}],11:[function(f,k,h){function d(){throw Error("setTimeout has not been defined");}function e(){throw Error("clearTimeout has not been defined");
}function c(a){if(t===setTimeout)return setTimeout(a,0);if((t===d||!t)&&setTimeout)return t=setTimeout,setTimeout(a,0);try{return t(a,0)}catch(z){try{return t.call(null,a,0)}catch(x){return t.call(this,a,0)}}}function g(a){if(n===clearTimeout)return clearTimeout(a);if((n===e||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(a);try{return n(a)}catch(z){try{return n.call(null,a)}catch(x){return n.call(this,a)}}}function a(){Q&&N&&(Q=!1,N.length?q=N.concat(q):v=-1,q.length&&b())}function b(){if(!Q){var b=
c(a);Q=!0;for(var d=q.length;d;){N=q;for(q=[];++v<d;)N&&N[v].run();v=-1;d=q.length}N=null;Q=!1;g(b)}}function m(a,b){this.fun=a;this.array=b}function p(){}f=k.exports={};try{var t="function"===typeof setTimeout?setTimeout:d}catch(B){t=d}try{var n="function"===typeof clearTimeout?clearTimeout:e}catch(B){n=e}var q=[],Q=!1,N,v=-1;f.nextTick=function(a){var d=Array(arguments.length-1);if(1<arguments.length)for(var g=1;g<arguments.length;g++)d[g-1]=arguments[g];q.push(new m(a,d));1!==q.length||Q||c(b)};
m.prototype.run=function(){this.fun.apply(null,this.array)};f.title="browser";f.browser=!0;f.env={};f.argv=[];f.version="";f.versions={};f.on=p;f.addListener=p;f.once=p;f.off=p;f.removeListener=p;f.removeAllListeners=p;f.emit=p;f.prependListener=p;f.prependOnceListener=p;f.listeners=function(a){return[]};f.binding=function(a){throw Error("process.binding is not supported");};f.cwd=function(){return"/"};f.chdir=function(a){throw Error("process.chdir is not supported");};f.umask=function(){return 0}},
{}],12:[function(f,k,h){k.exports=f("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":13}],13:[function(f,k,h){function d(c){if(!(this instanceof d))return new d(c);a.call(this,c);b.call(this,c);c&&!1===c.readable&&(this.readable=!1);c&&!1===c.writable&&(this.writable=!1);this.allowHalfOpen=!0;c&&!1===c.allowHalfOpen&&(this.allowHalfOpen=!1);this.once("end",e)}function e(){this.allowHalfOpen||this._writableState.ended||g.nextTick(c,this)}function c(a){a.end()}var g=f("process-nextick-args");
h=Object.keys||function(a){var b=[],c;for(c in a)b.push(c);return b};k.exports=d;k=f("core-util-is");k.inherits=f("inherits");var a=f("./_stream_readable"),b=f("./_stream_writable");k.inherits(d,a);f=h(b.prototype);for(k=0;k<f.length;k++)h=f[k],d.prototype[h]||(d.prototype[h]=b.prototype[h]);Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0===
this._readableState||void 0===this._writableState?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(a){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=a,this._writableState.destroyed=a)}});d.prototype._destroy=function(a,b){this.push(null);this.end();g.nextTick(b,a)}},{"./_stream_readable":15,"./_stream_writable":17,"core-util-is":4,inherits:7,"process-nextick-args":10}],14:[function(f,k,h){function d(c){if(!(this instanceof d))return new d(c);
e.call(this,c)}k.exports=d;var e=f("./_stream_transform");k=f("core-util-is");k.inherits=f("inherits");k.inherits(d,e);d.prototype._transform=function(c,d,a){a(null,c)}},{"./_stream_transform":16,"core-util-is":4,inherits:7}],15:[function(f,k,h){(function(d,e){function c(a,b,c){if("function"===typeof a.prependListener)return a.prependListener(b,c);if(a._events&&a._events[b])C(a._events[b])?a._events[b].unshift(c):a._events[b]=[c,a._events[b]];else a.on(b,c)}function g(a,b){A=A||f("./_stream_duplex");
a=a||{};var c=b instanceof A;this.objectMode=!!a.objectMode;c&&(this.objectMode=this.objectMode||!!a.readableObjectMode);var d=a.highWaterMark,g=a.readableHighWaterMark,e=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:c&&(g||0===g)?g:e;this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new L;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.reading=this.endEmitted=this.ended=!1;this.sync=!0;this.destroyed=this.resumeScheduled=this.readableListening=this.emittedReadable=
this.needReadable=!1;this.defaultEncoding=a.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=!1;this.encoding=this.decoder=null;a.encoding&&(w||(w=f("string_decoder/").StringDecoder),this.decoder=new w(a.encoding),this.encoding=a.encoding)}function a(b){A=A||f("./_stream_duplex");if(!(this instanceof a))return new a(b);this._readableState=new g(b,this);this.readable=!0;b&&("function"===typeof b.read&&(this._read=b.read),"function"===typeof b.destroy&&(this._destroy=b.destroy));E.call(this)}
function b(a,b,c,d,g){var e=a._readableState;if(null===b)e.reading=!1,e.ended||(e.decoder&&(b=e.decoder.end())&&b.length&&(e.buffer.push(b),e.length+=e.objectMode?1:b.length),e.ended=!0,t(a));else{if(!g){g=b;var l;K.isBuffer(g)||g instanceof D||"string"===typeof g||void 0===g||e.objectMode||(l=new TypeError("Invalid non-string/buffer chunk"));var p=l}p?a.emit("error",p):e.objectMode||b&&0<b.length?("string"===typeof b||e.objectMode||Object.getPrototypeOf(b)===K.prototype||(b=K.from(b)),d?e.endEmitted?
a.emit("error",Error("stream.unshift() after end event")):m(a,e,b,!0):e.ended?a.emit("error",Error("stream.push() after EOF")):(e.reading=!1,e.decoder&&!c?(b=e.decoder.write(b),e.objectMode||0!==b.length?m(a,e,b,!1):e.readingMore||(e.readingMore=!0,G.nextTick(q,a,e))):m(a,e,b,!1))):d||(e.reading=!1)}return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function m(a,b,c,d){b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,d?b.buffer.unshift(c):
b.buffer.push(c),b.needReadable&&t(a));b.readingMore||(b.readingMore=!0,G.nextTick(q,a,b))}function p(a,b){if(0>=a||0===b.length&&b.ended)return 0;if(b.objectMode)return 1;if(a!==a)return b.flowing&&b.length?b.buffer.head.data.length:b.length;if(a>b.highWaterMark){var c=a;8388608<=c?c=8388608:(c--,c|=c>>>1,c|=c>>>2,c|=c>>>4,c|=c>>>8,c|=c>>>16,c++);b.highWaterMark=c}return a<=b.length?a:b.ended?b.length:(b.needReadable=!0,0)}function t(a){var b=a._readableState;b.needReadable=!1;b.emittedReadable||
(y("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?G.nextTick(n,a):n(a))}function n(a){y("emit readable");a.emit("readable");h(a)}function q(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length<b.highWaterMark&&(y("maybeReadMore read 0"),a.read(0),c!==b.length);)c=b.length;b.readingMore=!1}function Q(a){return function(){var b=a._readableState;y("pipeOnDrain",b.awaitDrain);b.awaitDrain&&b.awaitDrain--;0===b.awaitDrain&&a.listeners("data").length&&(b.flowing=!0,h(a))}}function N(a){y("readable nexttick read 0");
a.read(0)}function v(a,b){b.reading||(y("resume read 0"),a.read(0));b.resumeScheduled=!1;b.awaitDrain=0;a.emit("resume");h(a);b.flowing&&!b.reading&&a.read(0)}function h(a){var b=a._readableState;for(y("flow",b.flowing);b.flowing&&null!==a.read(););}function z(a,b){if(0===b.length)return null;if(b.objectMode)var c=b.buffer.shift();else if(!a||a>=b.length)c=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.head.data:b.buffer.concat(b.length),b.buffer.clear();else{c=b.buffer;var d=b.decoder;
if(a<c.head.data.length)d=c.head.data.slice(0,a),c.head.data=c.head.data.slice(a);else{if(a===c.head.data.length)c=c.shift();else if(d){var g=c.head,e=1,m=g.data;for(d=a-m.length;g=g.next;){var p=g.data,l=d>p.length?p.length:d;m=l===p.length?m+p:m+p.slice(0,d);d-=l;if(0===d){l===p.length?(++e,c.head=g.next?g.next:c.tail=null):(c.head=g,g.data=p.slice(l));break}++e}c.length-=e;c=m}else{d=a;g=K.allocUnsafe(d);e=c.head;m=1;e.data.copy(g);for(d-=e.data.length;e=e.next;){p=e.data;l=d>p.length?p.length:
d;p.copy(g,g.length-d,0,l);d-=l;if(0===d){l===p.length?(++m,c.head=e.next?e.next:c.tail=null):(c.head=e,e.data=p.slice(l));break}++m}c.length-=m;c=g}d=c}c=d}return c}function x(a){var b=a._readableState;if(0<b.length)throw Error('"endReadable()" called on non-empty stream');b.endEmitted||(b.ended=!0,G.nextTick(H,b,a))}function H(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function F(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}var G=f("process-nextick-args");
k.exports=a;var C=f("isarray"),A;a.ReadableState=g;f("events");var E=f("./internal/streams/stream"),K=f("safe-buffer").Buffer,D=e.Uint8Array||function(){},I=f("core-util-is");I.inherits=f("inherits");var J=f("util"),y=void 0;y=J&&J.debuglog?J.debuglog("stream"):function(){};var L=f("./internal/streams/BufferList");J=f("./internal/streams/destroy");var w;I.inherits(a,E);var M=["error","close","destroy","pause","resume"];Object.defineProperty(a.prototype,"destroyed",{get:function(){return void 0===
this._readableState?!1:this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}});a.prototype.destroy=J.destroy;a.prototype._undestroy=J.undestroy;a.prototype._destroy=function(a,b){this.push(null);b(a)};a.prototype.push=function(a,c){var d=this._readableState;if(d.objectMode)var g=!0;else"string"===typeof a&&(c=c||d.defaultEncoding,c!==d.encoding&&(a=K.from(a,c),c=""),g=!0);return b(this,a,c,!1,g)};a.prototype.unshift=function(a){return b(this,a,null,
!0,!1)};a.prototype.isPaused=function(){return!1===this._readableState.flowing};a.prototype.setEncoding=function(a){w||(w=f("string_decoder/").StringDecoder);this._readableState.decoder=new w(a);this._readableState.encoding=a;return this};a.prototype.read=function(a){y("read",a);a=parseInt(a,10);var b=this._readableState,c=a;0!==a&&(b.emittedReadable=!1);if(0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return y("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?x(this):t(this),
null;a=p(a,b);if(0===a&&b.ended)return 0===b.length&&x(this),null;var d=b.needReadable;y("need readable",d);if(0===b.length||b.length-a<b.highWaterMark)d=!0,y("length less than watermark",d);b.ended||b.reading?y("reading or ended",!1):d&&(y("do read"),b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1,b.reading||(a=p(c,b)));d=0<a?z(a,b):null;null===d?(b.needReadable=!0,a=0):b.length-=a;0===b.length&&(b.ended||(b.needReadable=!0),c!==a&&b.ended&&x(this));
null!==d&&this.emit("data",d);return d};a.prototype._read=function(a){this.emit("error",Error("_read() is not implemented"))};a.prototype.pipe=function(a,b){function g(b,c){y("onunpipe");b===f&&c&&!1===c.hasUnpiped&&(c.hasUnpiped=!0,y("cleanup"),a.removeListener("close",t),a.removeListener("finish",n),a.removeListener("drain",N),a.removeListener("error",p),a.removeListener("unpipe",g),f.removeListener("end",e),f.removeListener("end",q),f.removeListener("data",m),h=!0,!v.awaitDrain||a._writableState&&
!a._writableState.needDrain||N())}function e(){y("onend");a.end()}function m(b){y("ondata");A=!1;!1!==a.write(b)||A||((1===v.pipesCount&&v.pipes===a||1<v.pipesCount&&-1!==F(v.pipes,a))&&!h&&(y("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,A=!0),f.pause())}function p(b){y("onerror",b);q();a.removeListener("error",p);0===a.listeners("error").length&&a.emit("error",b)}function t(){a.removeListener("finish",n);q()}function n(){y("onfinish");a.removeListener("close",
t);q()}function q(){y("unpipe");f.unpipe(a)}var f=this,v=this._readableState;switch(v.pipesCount){case 0:v.pipes=a;break;case 1:v.pipes=[v.pipes,a];break;default:v.pipes.push(a)}v.pipesCount+=1;y("pipe count=%d opts=%j",v.pipesCount,b);var l=b&&!1===b.end||a===d.stdout||a===d.stderr?q:e;if(v.endEmitted)G.nextTick(l);else f.once("end",l);a.on("unpipe",g);var N=Q(f);a.on("drain",N);var h=!1,A=!1;f.on("data",m);c(a,"error",p);a.once("close",t);a.once("finish",n);a.emit("pipe",f);v.flowing||(y("pipe resume"),
f.resume());return a};a.prototype.unpipe=function(a){var b=this._readableState,c={hasUnpiped:!1};if(0===b.pipesCount)return this;if(1===b.pipesCount){if(a&&a!==b.pipes)return this;a||(a=b.pipes);b.pipes=null;b.pipesCount=0;b.flowing=!1;a&&a.emit("unpipe",this,c);return this}if(!a){a=b.pipes;var d=b.pipesCount;b.pipes=null;b.pipesCount=0;b.flowing=!1;for(b=0;b<d;b++)a[b].emit("unpipe",this,c);return this}d=F(b.pipes,a);if(-1===d)return this;b.pipes.splice(d,1);--b.pipesCount;1===b.pipesCount&&(b.pipes=
b.pipes[0]);a.emit("unpipe",this,c);return this};a.prototype.on=function(a,b){var c=E.prototype.on.call(this,a,b);if("data"===a)!1!==this._readableState.flowing&&this.resume();else if("readable"===a){var d=this._readableState;d.endEmitted||d.readableListening||(d.readableListening=d.needReadable=!0,d.emittedReadable=!1,d.reading?d.length&&t(this):G.nextTick(N,this))}return c};a.prototype.addListener=a.prototype.on;a.prototype.resume=function(){var a=this._readableState;a.flowing||(y("resume"),a.flowing=
!0,a.resumeScheduled||(a.resumeScheduled=!0,G.nextTick(v,this,a)));return this};a.prototype.pause=function(){y("call pause flowing=%j",this._readableState.flowing);!1!==this._readableState.flowing&&(y("pause"),this._readableState.flowing=!1,this.emit("pause"));return this};a.prototype.wrap=function(a){var b=this,c=this._readableState,d=!1;a.on("end",function(){y("wrapped end");if(c.decoder&&!c.ended){var a=c.decoder.end();a&&a.length&&b.push(a)}b.push(null)});a.on("data",function(g){y("wrapped data");
c.decoder&&(g=c.decoder.write(g));c.objectMode&&(null===g||void 0===g)||!(c.objectMode||g&&g.length)||b.push(g)||(d=!0,a.pause())});for(var g in a)void 0===this[g]&&"function"===typeof a[g]&&(this[g]=function(b){return function(){return a[b].apply(a,arguments)}}(g));for(g=0;g<M.length;g++)a.on(M[g],this.emit.bind(this,M[g]));this._read=function(b){y("wrapped _read",b);d&&(d=!1,a.resume())};return this};Object.defineProperty(a.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});
a._fromList=z}).call(this,f("_process"),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./_stream_duplex":13,"./internal/streams/BufferList":18,"./internal/streams/destroy":19,"./internal/streams/stream":20,_process:11,"core-util-is":4,events:5,inherits:7,isarray:9,"process-nextick-args":10,"safe-buffer":25,"string_decoder/":27,util:2}],16:[function(f,k,h){function d(a,c){var b=this._transformState;b.transforming=!1;var d=b.writecb;if(!d)return this.emit("error",
Error("write callback called multiple times"));b.writechunk=null;b.writecb=null;null!=c&&this.push(c);d(a);b=this._readableState;b.reading=!1;(b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}function e(b){if(!(this instanceof e))return new e(b);a.call(this,b);this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=!0;this._readableState.sync=!1;b&&("function"===typeof b.transform&&
(this._transform=b.transform),"function"===typeof b.flush&&(this._flush=b.flush));this.on("prefinish",c)}function c(){var a=this;"function"===typeof this._flush?this._flush(function(b,c){g(a,b,c)}):g(this,null,null)}function g(a,c,d){if(c)return a.emit("error",c);null!=d&&a.push(d);if(a._writableState.length)throw Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw Error("Calling transform done when still transforming");return a.push(null)}k.exports=e;var a=
f("./_stream_duplex");k=f("core-util-is");k.inherits=f("inherits");k.inherits(e,a);e.prototype.push=function(b,c){this._transformState.needTransform=!1;return a.prototype.push.call(this,b,c)};e.prototype._transform=function(a,c,d){throw Error("_transform() is not implemented");};e.prototype._write=function(a,c,d){var b=this._transformState;b.writecb=d;b.writechunk=a;b.writeencoding=c;b.transforming||(a=this._readableState,(b.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark))};
e.prototype._read=function(a){a=this._transformState;null!==a.writechunk&&a.writecb&&!a.transforming?(a.transforming=!0,this._transform(a.writechunk,a.writeencoding,a.afterTransform)):a.needTransform=!0};e.prototype._destroy=function(b,c){var d=this;a.prototype._destroy.call(this,b,function(a){c(a);d.emit("close")})}},{"./_stream_duplex":13,"core-util-is":4,inherits:7}],17:[function(f,k,h){(function(d,e,c){function g(a){var b=this;this.entry=this.next=null;this.finish=function(){var c=b.entry;for(b.entry=
null;c;){var d=c.callback;a.pendingcb--;d(void 0);c=c.next}a.corkedRequestsFree?a.corkedRequestsFree.next=b:a.corkedRequestsFree=b}}function a(){}function b(a,b){z=z||f("./_stream_duplex");a=a||{};var c=b instanceof z;this.objectMode=!!a.objectMode;c&&(this.objectMode=this.objectMode||!!a.writableObjectMode);var d=a.highWaterMark,e=a.writableHighWaterMark,m=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:c&&(e||0===e)?e:m;this.highWaterMark=Math.floor(this.highWaterMark);this.destroyed=this.finished=
this.ended=this.ending=this.needDrain=this.finalCalled=!1;this.decodeStrings=!1!==a.decodeStrings;this.defaultEncoding=a.defaultEncoding||"utf8";this.length=0;this.writing=!1;this.corked=0;this.sync=!0;this.bufferProcessing=!1;this.onwrite=function(a){var c=b._writableState,d=c.sync,g=c.writecb;c.writing=!1;c.writecb=null;c.length-=c.writelen;c.writelen=0;a?(--c.pendingcb,d?(v.nextTick(g,a),v.nextTick(N,b,c),b._writableState.errorEmitted=!0,b.emit("error",a)):(g(a),b._writableState.errorEmitted=!0,
b.emit("error",a),N(b,c))):((a=q(c))||c.corked||c.bufferProcessing||!c.bufferedRequest||n(b,c),d?h(t,b,c,a,g):t(b,c,a,g))};this.writecb=null;this.writelen=0;this.lastBufferedRequest=this.bufferedRequest=null;this.pendingcb=0;this.errorEmitted=this.prefinished=!1;this.bufferedRequestCount=0;this.corkedRequestsFree=new g(this)}function m(a){z=z||f("./_stream_duplex");if(!(C.call(m,this)||this instanceof z))return new m(a);this._writableState=new b(a,this);this.writable=!0;a&&("function"===typeof a.write&&
(this._write=a.write),"function"===typeof a.writev&&(this._writev=a.writev),"function"===typeof a.destroy&&(this._destroy=a.destroy),"function"===typeof a["final"]&&(this._final=a["final"]));H.call(this)}function p(a,b,c,d,g,e,m){b.writelen=d;b.writecb=m;b.writing=!0;b.sync=!0;c?a._writev(g,b.onwrite):a._write(g,e,b.onwrite);b.sync=!1}function t(a,b,c,d){!c&&0===b.length&&b.needDrain&&(b.needDrain=!1,a.emit("drain"));b.pendingcb--;d();N(a,b)}function n(a,b){b.bufferProcessing=!0;var c=b.bufferedRequest;
if(a._writev&&c&&c.next){var d=Array(b.bufferedRequestCount),e=b.corkedRequestsFree;e.entry=c;for(var m=0,n=!0;c;)d[m]=c,c.isBuf||(n=!1),c=c.next,m+=1;d.allBuffers=n;p(a,b,!0,b.length,d,"",e.finish);b.pendingcb++;b.lastBufferedRequest=null;e.next?(b.corkedRequestsFree=e.next,e.next=null):b.corkedRequestsFree=new g(b);b.bufferedRequestCount=0}else{for(;c&&(d=c.chunk,p(a,b,!1,b.objectMode?1:d.length,d,c.encoding,c.callback),c=c.next,b.bufferedRequestCount--,!b.writing););null===c&&(b.lastBufferedRequest=
null)}b.bufferedRequest=c;b.bufferProcessing=!1}function q(a){return a.ending&&0===a.length&&null===a.bufferedRequest&&!a.finished&&!a.writing}function Q(a,b){a._final(function(c){b.pendingcb--;c&&a.emit("error",c);b.prefinished=!0;a.emit("prefinish");N(a,b)})}function N(a,b){var c=q(b);c&&(b.prefinished||b.finalCalled||("function"===typeof a._final?(b.pendingcb++,b.finalCalled=!0,v.nextTick(Q,a,b)):(b.prefinished=!0,a.emit("prefinish"))),0===b.pendingcb&&(b.finished=!0,a.emit("finish")));return c}
var v=f("process-nextick-args");k.exports=m;var h=!d.browser&&-1<["v0.10","v0.9."].indexOf(d.version.slice(0,5))?c:v.nextTick,z;m.WritableState=b;d=f("core-util-is");d.inherits=f("inherits");var x={deprecate:f("util-deprecate")},H=f("./internal/streams/stream"),F=f("safe-buffer").Buffer,G=e.Uint8Array||function(){};e=f("./internal/streams/destroy");d.inherits(m,H);b.prototype.getBuffer=function(){for(var a=this.bufferedRequest,b=[];a;)b.push(a),a=a.next;return b};(function(){try{Object.defineProperty(b.prototype,
"buffer",{get:x.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(A){}})();$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbol();if("function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]){$jscomp.initSymbol();var C=Function.prototype[Symbol.hasInstance];$jscomp.initSymbol();Object.defineProperty(m,Symbol.hasInstance,{value:function(a){return C.call(this,
a)?!0:this!==m?!1:a&&a._writableState instanceof b}})}else C=function(a){return a instanceof this};m.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};m.prototype.write=function(b,c,d){var g=this._writableState,e=!1,m;if(m=!g.objectMode)m=b,m=F.isBuffer(m)||m instanceof G;m&&!F.isBuffer(b)&&(b=F.from(b));"function"===typeof c&&(d=c,c=null);m?c="buffer":c||(c=g.defaultEncoding);"function"!==typeof d&&(d=a);if(g.ended)g=d,d=Error("write after end"),this.emit("error",d),
v.nextTick(g,d);else{var n;if(!(n=m)){n=b;var q=d,t=!0,f=!1;null===n?f=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||g.objectMode||(f=new TypeError("Invalid non-string/buffer chunk"));f&&(this.emit("error",f),v.nextTick(q,f),t=!1);n=t}n&&(g.pendingcb++,e=m,e||(m=b,g.objectMode||!1===g.decodeStrings||"string"!==typeof m||(m=F.from(m,c)),b!==m&&(e=!0,c="buffer",b=m)),n=g.objectMode?1:b.length,g.length+=n,m=g.length<g.highWaterMark,m||(g.needDrain=!0),g.writing||
g.corked?(n=g.lastBufferedRequest,g.lastBufferedRequest={chunk:b,encoding:c,isBuf:e,callback:d,next:null},n?n.next=g.lastBufferedRequest:g.bufferedRequest=g.lastBufferedRequest,g.bufferedRequestCount+=1):p(this,g,!1,n,b,c,d),e=m)}return e};m.prototype.cork=function(){this._writableState.corked++};m.prototype.uncork=function(){var a=this._writableState;a.corked&&(a.corked--,a.writing||a.corked||a.finished||a.bufferProcessing||!a.bufferedRequest||n(this,a))};m.prototype.setDefaultEncoding=function(a){"string"===
typeof a&&(a=a.toLowerCase());if(!(-1<"hex utf8 utf-8 ascii binary base64 ucs2 ucs-2 utf16le utf-16le raw".split(" ").indexOf((a+"").toLowerCase())))throw new TypeError("Unknown encoding: "+a);this._writableState.defaultEncoding=a;return this};Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});m.prototype._write=function(a,b,c){c(Error("_write() is not implemented"))};m.prototype._writev=null;m.prototype.end=function(a,
b,c){var d=this._writableState;"function"===typeof a?(c=a,b=a=null):"function"===typeof b&&(c=b,b=null);null!==a&&void 0!==a&&this.write(a,b);d.corked&&(d.corked=1,this.uncork());if(!d.ending&&!d.finished){a=c;d.ending=!0;N(this,d);if(a)if(d.finished)v.nextTick(a);else this.once("finish",a);d.ended=!0;this.writable=!1}};Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0===this._writableState?!1:this._writableState.destroyed},set:function(a){this._writableState&&(this._writableState.destroyed=
a)}});m.prototype.destroy=e.destroy;m.prototype._undestroy=e.undestroy;m.prototype._destroy=function(a,b){this.end();b(a)}}).call(this,f("_process"),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},f("timers").setImmediate)},{"./_stream_duplex":13,"./internal/streams/destroy":19,"./internal/streams/stream":20,_process:11,"core-util-is":4,inherits:7,"process-nextick-args":10,"safe-buffer":25,timers:28,"util-deprecate":29}],18:[function(f,k,h){var d=
f("safe-buffer").Buffer,e=f("util");k.exports=function(){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this.tail=this.head=null;this.length=0}c.prototype.push=function(c){c={data:c,next:null};0<this.length?this.tail.next=c:this.head=c;this.tail=c;++this.length};c.prototype.unshift=function(c){c={data:c,next:this.head};0===this.length&&(this.tail=c);this.head=c;++this.length};c.prototype.shift=function(){if(0!==this.length){var c=this.head.data;this.head=
1===this.length?this.tail=null:this.head.next;--this.length;return c}};c.prototype.clear=function(){this.head=this.tail=null;this.length=0};c.prototype.join=function(c){if(0===this.length)return"";for(var a=this.head,b=""+a.data;a=a.next;)b+=c+a.data;return b};c.prototype.concat=function(c){if(0===this.length)return d.alloc(0);if(1===this.length)return this.head.data;c=d.allocUnsafe(c>>>0);for(var a=this.head,b=0;a;)a.data.copy(c,b),b+=a.data.length,a=a.next;return c};return c}();e&&e.inspect&&e.inspect.custom&&
(k.exports.prototype[e.inspect.custom]=function(){var c=e.inspect({length:this.length});return this.constructor.name+" "+c})},{"safe-buffer":25,util:2}],19:[function(f,k,h){function d(c,d){c.emit("error",d)}var e=f("process-nextick-args");k.exports={destroy:function(c,g){var a=this,b=this._writableState&&this._writableState.destroyed;if(this._readableState&&this._readableState.destroyed||b)return g?g(c):!c||this._writableState&&this._writableState.errorEmitted||e.nextTick(d,this,c),this;this._readableState&&
(this._readableState.destroyed=!0);this._writableState&&(this._writableState.destroyed=!0);this._destroy(c||null,function(b){!g&&b?(e.nextTick(d,a,b),a._writableState&&(a._writableState.errorEmitted=!0)):g&&g(b)});return this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1);this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=
!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":10}],20:[function(f,k,h){k.exports=f("events").EventEmitter},{events:5}],21:[function(f,k,h){k.exports=f("./readable").PassThrough},{"./readable":22}],22:[function(f,k,h){h=k.exports=f("./lib/_stream_readable.js");h.Stream=h;h.Readable=h;h.Writable=f("./lib/_stream_writable.js");h.Duplex=f("./lib/_stream_duplex.js");h.Transform=f("./lib/_stream_transform.js");h.PassThrough=f("./lib/_stream_passthrough.js")},
{"./lib/_stream_duplex.js":13,"./lib/_stream_passthrough.js":14,"./lib/_stream_readable.js":15,"./lib/_stream_transform.js":16,"./lib/_stream_writable.js":17}],23:[function(f,k,h){k.exports=f("./readable").Transform},{"./readable":22}],24:[function(f,k,h){k.exports=f("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":17}],25:[function(f,k,h){function d(a,b){for(var c in a)b[c]=a[c]}function e(a,b,c){return g(a,b,c)}var c=f("buffer"),g=c.Buffer;g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?
k.exports=c:(d(c,h),h.Buffer=e);d(g,e);e.from=function(a,b,c){if("number"===typeof a)throw new TypeError("Argument must not be a number");return g(a,b,c)};e.alloc=function(a,b,c){if("number"!==typeof a)throw new TypeError("Argument must be a number");a=g(a);void 0!==b?"string"===typeof c?a.fill(b,c):a.fill(b):a.fill(0);return a};e.allocUnsafe=function(a){if("number"!==typeof a)throw new TypeError("Argument must be a number");return g(a)};e.allocUnsafeSlow=function(a){if("number"!==typeof a)throw new TypeError("Argument must be a number");
return c.SlowBuffer(a)}},{buffer:3}],26:[function(f,k,h){function d(){e.call(this)}k.exports=d;var e=f("events").EventEmitter;f("inherits")(d,e);d.Readable=f("readable-stream/readable.js");d.Writable=f("readable-stream/writable.js");d.Duplex=f("readable-stream/duplex.js");d.Transform=f("readable-stream/transform.js");d.PassThrough=f("readable-stream/passthrough.js");d.Stream=d;d.prototype.pipe=function(c,d){function a(a){c.writable&&!1===c.write(a)&&q.pause&&q.pause()}function b(){q.readable&&q.resume&&
q.resume()}function g(){f||(f=!0,c.end())}function p(){f||(f=!0,"function"===typeof c.destroy&&c.destroy())}function t(a){n();if(0===e.listenerCount(this,"error"))throw a;}function n(){q.removeListener("data",a);c.removeListener("drain",b);q.removeListener("end",g);q.removeListener("close",p);q.removeListener("error",t);c.removeListener("error",t);q.removeListener("end",n);q.removeListener("close",n);c.removeListener("close",n)}var q=this;q.on("data",a);c.on("drain",b);c._isStdio||d&&!1===d.end||
(q.on("end",g),q.on("close",p));var f=!1;q.on("error",t);c.on("error",t);q.on("end",n);q.on("close",n);c.on("close",n);c.emit("pipe",q);return c}},{events:5,inherits:7,"readable-stream/duplex.js":12,"readable-stream/passthrough.js":21,"readable-stream/readable.js":22,"readable-stream/transform.js":23,"readable-stream/writable.js":24}],27:[function(f,k,h){function d(a){if(!a)return"utf8";for(var b;;)switch(a){case "utf8":case "utf-8":return"utf8";case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return"utf16le";
case "latin1":case "binary":return"latin1";case "base64":case "ascii":case "hex":return a;default:if(b)return;a=(""+a).toLowerCase();b=!0}}function e(c){var g=d(c);if("string"!==typeof g&&(Q.isEncoding===N||!N(c)))throw Error("Unknown encoding: "+c);this.encoding=g||c;switch(this.encoding){case "utf16le":this.text=b;this.end=m;c=4;break;case "utf8":this.fillLast=a;c=4;break;case "base64":this.text=p;this.end=t;c=3;break;default:this.write=n;this.end=q;return}this.lastTotal=this.lastNeed=0;this.lastChar=
Q.allocUnsafe(c)}function c(a){return 127>=a?0:6===a>>5?2:14===a>>4?3:30===a>>3?4:2===a>>6?-1:-2}function g(a,b,d){var g=b.length-1;if(g<d)return 0;var e=c(b[g]);if(0<=e)return 0<e&&(a.lastNeed=e-1),e;if(--g<d||-2===e)return 0;e=c(b[g]);if(0<=e)return 0<e&&(a.lastNeed=e-2),e;if(--g<d||-2===e)return 0;e=c(b[g]);return 0<=e?(0<e&&(2===e?e=0:a.lastNeed=e-3),e):0}function a(a){var b=this.lastTotal-this.lastNeed;a:if(128!==(a[0]&192)){this.lastNeed=0;var c="\ufffd"}else{if(1<this.lastNeed&&1<a.length){if(128!==
(a[1]&192)){this.lastNeed=1;c="\ufffd";break a}if(2<this.lastNeed&&2<a.length&&128!==(a[2]&192)){this.lastNeed=2;c="\ufffd";break a}}c=void 0}if(void 0!==c)return c;if(this.lastNeed<=a.length)return a.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,b,0,a.length);this.lastNeed-=a.length}function b(a,b){if(0===(a.length-b)%2){var c=a.toString("utf16le",b);if(c){var d=c.charCodeAt(c.length-1);if(55296<=d&&56319>=d)return this.lastNeed=
2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],c.slice(0,-1)}return c}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=a[a.length-1];return a.toString("utf16le",b,a.length-1)}function m(a){a=a&&a.length?this.write(a):"";return this.lastNeed?a+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):a}function p(a,b){var c=(a.length-b)%3;if(0===c)return a.toString("base64",b);this.lastNeed=3-c;this.lastTotal=3;1===c?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=
a[a.length-2],this.lastChar[1]=a[a.length-1]);return a.toString("base64",b,a.length-c)}function t(a){a=a&&a.length?this.write(a):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function n(a){return a.toString(this.encoding)}function q(a){return a&&a.length?this.write(a):""}var Q=f("safe-buffer").Buffer,N=Q.isEncoding||function(a){a=""+a;switch(a&&a.toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":case "raw":return!0;
default:return!1}};h.StringDecoder=e;e.prototype.write=function(a){if(0===a.length)return"";if(this.lastNeed){var b=this.fillLast(a);if(void 0===b)return"";var c=this.lastNeed;this.lastNeed=0}else c=0;return c<a.length?b?b+this.text(a,c):this.text(a,c):b||""};e.prototype.end=function(a){a=a&&a.length?this.write(a):"";return this.lastNeed?a+"\ufffd":a};e.prototype.text=function(a,b){var c=g(this,a,b);if(!this.lastNeed)return a.toString("utf8",b);this.lastTotal=c;c=a.length-(c-this.lastNeed);a.copy(this.lastChar,
0,c);return a.toString("utf8",b,c)};e.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length);this.lastNeed-=a.length}},{"safe-buffer":25}],28:[function(f,k,h){(function(d,e){function c(a,b){this._id=a;this._clearFn=b}var g=f("process/browser.js").nextTick,a=Function.prototype.apply,b=Array.prototype.slice,
m={},p=0;h.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)};h.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)};h.clearTimeout=h.clearInterval=function(a){a.close()};c.prototype.unref=c.prototype.ref=function(){};c.prototype.close=function(){this._clearFn.call(window,this._id)};h.enroll=function(a,b){clearTimeout(a._idleTimeoutId);a._idleTimeout=b};h.unenroll=function(a){clearTimeout(a._idleTimeoutId);a._idleTimeout=-1};h._unrefActive=
h.active=function(a){clearTimeout(a._idleTimeoutId);var b=a._idleTimeout;0<=b&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},b))};h.setImmediate="function"===typeof d?d:function(a){var c=p++,d=2>arguments.length?!1:b.call(arguments,1);m[c]=!0;g(function(){m[c]&&(d?a.apply(null,d):a.call(null),h.clearImmediate(c))});return c};h.clearImmediate="function"===typeof e?e:function(a){delete m[a]}}).call(this,f("timers").setImmediate,f("timers").clearImmediate)},{"process/browser.js":11,
timers:28}],29:[function(f,k,h){(function(d){function e(c){try{if(!d.localStorage)return!1}catch(g){return!1}c=d.localStorage[c];return null==c?!1:"true"===String(c).toLowerCase()}k.exports=function(c,d){if(e("noDeprecation"))return c;var a=!1;return function(){if(!a){if(e("throwDeprecation"))throw Error(d);e("traceDeprecation")?console.trace(d):console.warn(d);a=!0}return c.apply(this,arguments)}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?
window:{})},{}],30:[function(f,k,h){window.SignLib=f("secp256k1/lib/js");window.Buffer=f("safe-buffer").Buffer},{"safe-buffer":42,"secp256k1/lib/js":48}],31:[function(f,k,h){function d(a){c.call(this);(this.hashMode="string"===typeof a)?this[a]=this._finalOrDigest:this["final"]=this._finalOrDigest;this._final&&(this.__final=this._final,this._final=null);this._encoding=this._decoder=null}var e=f("safe-buffer").Buffer,c=f("stream").Transform,g=f("string_decoder").StringDecoder;f("inherits")(d,c);d.prototype.update=
function(a,b,c){"string"===typeof a&&(a=e.from(a,b));a=this._update(a);if(this.hashMode)return this;c&&(a=this._toString(a,c));return a};d.prototype.setAutoPadding=function(){};d.prototype.getAuthTag=function(){throw Error("trying to get auth tag in unsupported state");};d.prototype.setAuthTag=function(){throw Error("trying to set auth tag in unsupported state");};d.prototype.setAAD=function(){throw Error("trying to set aad in unsupported state");};d.prototype._transform=function(a,b,c){try{this.hashMode?
this._update(a):this.push(this._update(a))}catch(t){var d=t}finally{c(d)}};d.prototype._flush=function(a){try{this.push(this.__final())}catch(m){var b=m}a(b)};d.prototype._finalOrDigest=function(a){var b=this.__final()||e.alloc(0);a&&(b=this._toString(b,a,!0));return b};d.prototype._toString=function(a,b,c){this._decoder||(this._decoder=new g(b),this._encoding=b);if(this._encoding!==b)throw Error("can't switch encodings");a=this._decoder.write(a);c&&(a+=this._decoder.end());return a};k.exports=d},
{inherits:39,"safe-buffer":42,stream:26,string_decoder:27}],32:[function(f,k,h){function d(b){a.call(this,"digest");this._hash=b}h=f("inherits");var e=f("md5.js"),c=f("ripemd160"),g=f("sha.js"),a=f("cipher-base");h(d,a);d.prototype._update=function(a){this._hash.update(a)};d.prototype._final=function(){return this._hash.digest()};k.exports=function(a){a=a.toLowerCase();return"md5"===a?new e:"rmd160"===a||"ripemd160"===a?new c:new d(g(a))}},{"cipher-base":31,inherits:39,"md5.js":40,ripemd160:41,"sha.js":51}],
33:[function(f,k,h){var d=f("md5.js");k.exports=function(e){return(new d).update(e).digest()}},{"md5.js":40}],34:[function(f,k,h){function d(a,d){c.call(this,"digest");"string"===typeof d&&(d=g.from(d));var e="sha512"===a||"sha384"===a?128:64;this._alg=a;this._key=d;d.length>e?d=("rmd160"===a?new b:m(a)).update(d).digest():d.length<e&&(d=g.concat([d,p],e));for(var f=this._ipad=g.allocUnsafe(e),n=this._opad=g.allocUnsafe(e),t=0;t<e;t++)f[t]=d[t]^54,n[t]=d[t]^92;this._hash="rmd160"===a?new b:m(a);this._hash.update(f)}
h=f("inherits");var e=f("./legacy"),c=f("cipher-base"),g=f("safe-buffer").Buffer,a=f("create-hash/md5"),b=f("ripemd160"),m=f("sha.js"),p=g.alloc(128);h(d,c);d.prototype._update=function(a){this._hash.update(a)};d.prototype._final=function(){var a=this._hash.digest();return("rmd160"===this._alg?new b:m(this._alg)).update(this._opad).update(a).digest()};k.exports=function(b,c){b=b.toLowerCase();return"rmd160"===b||"ripemd160"===b?new d("rmd160",c):"md5"===b?new e(a,c):new d(b,c)}},{"./legacy":35,"cipher-base":31,
"create-hash/md5":33,inherits:39,ripemd160:41,"safe-buffer":42,"sha.js":51}],35:[function(f,k,h){function d(a,b){c.call(this,"digest");"string"===typeof b&&(b=e.from(b));this._alg=a;this._key=b;64<b.length?b=a(b):64>b.length&&(b=e.concat([b,g],64));for(var d=this._ipad=e.allocUnsafe(64),p=this._opad=e.allocUnsafe(64),f=0;64>f;f++)d[f]=b[f]^54,p[f]=b[f]^92;this._hash=[d]}h=f("inherits");var e=f("safe-buffer").Buffer,c=f("cipher-base"),g=e.alloc(128);h(d,c);d.prototype._update=function(a){this._hash.push(a)};
d.prototype._final=function(){var a=this._alg(e.concat(this._hash));return this._alg(e.concat([this._opad,a]))};k.exports=d},{"cipher-base":31,inherits:39,"safe-buffer":42}],36:[function(f,k,h){(function(d){function e(a,b,c,d){var e=g[a];if(void 0===e)throw Error("hash "+a+" is not supported");this._algo=a;this._securityStrength=e.securityStrength/8;this._outlen=e.outlen/8;this._reseedInterval=281474976710656;this._init(b,c,d)}var c=f("create-hmac"),g=f("./lib/hash-info.json"),a=new d(0),b=new d([0]),
m=new d([1]);e.prototype._update=function(a){var d=c(this._algo,this._K).update(this._V).update(b);a&&d.update(a);this._K=d.digest();this._V=c(this._algo,this._K).update(this._V).digest();a&&(this._K=c(this._algo,this._K).update(this._V).update(m).update(a).digest(),this._V=c(this._algo,this._K).update(this._V).digest())};e.prototype._init=function(b,c,g){if(b.length<this._securityStrength)throw Error("Not enough entropy");this._K=new d(this._outlen);this._V=new d(this._outlen);for(var e=0;e<this._K.length;++e)this._K[e]=
0,this._V[e]=1;this._update(d.concat([b,c,g||a]));this._reseed=1};e.prototype.reseed=function(b,c){if(b.length<this._securityStrength)throw Error("Not enough entropy");this._update(d.concat([b,c||a]));this._reseed=1};e.prototype.generate=function(a,b){if(this._reseed>this._reseedInterval)throw Error("Reseed is required");b&&0===b.length&&(b=void 0);b&&this._update(b);for(var g=new d(0);g.length<a;)this._V=c(this._algo,this._K).update(this._V).digest(),g=d.concat([g,this._V]);this._update(b);this._reseed+=
1;return g.slice(0,a)};k.exports=e}).call(this,f("buffer").Buffer)},{"./lib/hash-info.json":37,buffer:3,"create-hmac":34}],37:[function(f,k,h){k.exports={sha1:{securityStrength:128,outlen:160,seedlen:440},sha224:{securityStrength:192,outlen:224,seedlen:440},sha256:{securityStrength:256,outlen:256,seedlen:440},sha384:{securityStrength:256,outlen:384,seedlen:888},sha512:{securityStrength:256,outlen:512,seedlen:888}}},{}],38:[function(f,k,h){function d(d){c.call(this);this._block=e.allocUnsafe(d);this._blockSize=
d;this._blockOffset=0;this._length=[0,0,0,0];this._finalized=!1}var e=f("safe-buffer").Buffer,c=f("stream").Transform;f("inherits")(d,c);d.prototype._transform=function(c,a,b){var d=null;try{this.update(c,a)}catch(p){d=p}b(d)};d.prototype._flush=function(c){var a=null;try{this.push(this.digest())}catch(b){a=b}c(a)};d.prototype.update=function(c,a){var b=c;if(!e.isBuffer(b)&&"string"!==typeof b)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw Error("Digest already called");
e.isBuffer(c)||(c=e.from(c,a));b=this._block;for(var d=0;this._blockOffset+c.length-d>=this._blockSize;){for(var g=this._blockOffset;g<this._blockSize;)b[g++]=c[d++];this._update();this._blockOffset=0}for(;d<c.length;)b[this._blockOffset++]=c[d++];b=0;for(d=8*c.length;0<d;++b)this._length[b]+=d,d=this._length[b]/4294967296|0,0<d&&(this._length[b]-=4294967296*d);return this};d.prototype._update=function(){throw Error("_update is not implemented");};d.prototype.digest=function(c){if(this._finalized)throw Error("Digest already called");
this._finalized=!0;var a=this._digest();void 0!==c&&(a=a.toString(c));this._block.fill(0);for(c=this._blockOffset=0;4>c;++c)this._length[c]=0;return a};d.prototype._digest=function(){throw Error("_digest is not implemented");};k.exports=d},{inherits:39,"safe-buffer":42,stream:26}],39:[function(f,k,h){arguments[4][7][0].apply(h,arguments)},{dup:7}],40:[function(f,k,h){(function(d){function e(){t.call(this,64);this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878}function c(a,b){return a<<
b|a>>>32-b}function g(a,b,d,e,g,m,f){return c(a+(b&d|~b&e)+g+m|0,f)+b|0}function a(a,b,d,e,g,m,f){return c(a+(b&e|d&~e)+g+m|0,f)+b|0}function b(a,b,d,e,g,m,f){return c(a+(b^d^e)+g+m|0,f)+b|0}function m(a,b,d,e,g,m,f){return c(a+(d^(b|~e))+g+m|0,f)+b|0}var p=f("inherits"),t=f("hash-base"),n=Array(16);p(e,t);e.prototype._update=function(){for(var c=0;16>c;++c)n[c]=this._block.readInt32LE(4*c);c=this._a;var d=this._b,e=this._c,f=this._d;c=g(c,d,e,f,n[0],3614090360,7);f=g(f,c,d,e,n[1],3905402710,12);
e=g(e,f,c,d,n[2],606105819,17);d=g(d,e,f,c,n[3],3250441966,22);c=g(c,d,e,f,n[4],4118548399,7);f=g(f,c,d,e,n[5],1200080426,12);e=g(e,f,c,d,n[6],2821735955,17);d=g(d,e,f,c,n[7],4249261313,22);c=g(c,d,e,f,n[8],1770035416,7);f=g(f,c,d,e,n[9],2336552879,12);e=g(e,f,c,d,n[10],4294925233,17);d=g(d,e,f,c,n[11],2304563134,22);c=g(c,d,e,f,n[12],1804603682,7);f=g(f,c,d,e,n[13],4254626195,12);e=g(e,f,c,d,n[14],2792965006,17);d=g(d,e,f,c,n[15],1236535329,22);c=a(c,d,e,f,n[1],4129170786,5);f=a(f,c,d,e,n[6],3225465664,
9);e=a(e,f,c,d,n[11],643717713,14);d=a(d,e,f,c,n[0],3921069994,20);c=a(c,d,e,f,n[5],3593408605,5);f=a(f,c,d,e,n[10],38016083,9);e=a(e,f,c,d,n[15],3634488961,14);d=a(d,e,f,c,n[4],3889429448,20);c=a(c,d,e,f,n[9],568446438,5);f=a(f,c,d,e,n[14],3275163606,9);e=a(e,f,c,d,n[3],4107603335,14);d=a(d,e,f,c,n[8],1163531501,20);c=a(c,d,e,f,n[13],2850285829,5);f=a(f,c,d,e,n[2],4243563512,9);e=a(e,f,c,d,n[7],1735328473,14);d=a(d,e,f,c,n[12],2368359562,20);c=b(c,d,e,f,n[5],4294588738,4);f=b(f,c,d,e,n[8],2272392833,
11);e=b(e,f,c,d,n[11],1839030562,16);d=b(d,e,f,c,n[14],4259657740,23);c=b(c,d,e,f,n[1],2763975236,4);f=b(f,c,d,e,n[4],1272893353,11);e=b(e,f,c,d,n[7],4139469664,16);d=b(d,e,f,c,n[10],3200236656,23);c=b(c,d,e,f,n[13],681279174,4);f=b(f,c,d,e,n[0],3936430074,11);e=b(e,f,c,d,n[3],3572445317,16);d=b(d,e,f,c,n[6],76029189,23);c=b(c,d,e,f,n[9],3654602809,4);f=b(f,c,d,e,n[12],3873151461,11);e=b(e,f,c,d,n[15],530742520,16);d=b(d,e,f,c,n[2],3299628645,23);c=m(c,d,e,f,n[0],4096336452,6);f=m(f,c,d,e,n[7],1126891415,
10);e=m(e,f,c,d,n[14],2878612391,15);d=m(d,e,f,c,n[5],4237533241,21);c=m(c,d,e,f,n[12],1700485571,6);f=m(f,c,d,e,n[3],2399980690,10);e=m(e,f,c,d,n[10],4293915773,15);d=m(d,e,f,c,n[1],2240044497,21);c=m(c,d,e,f,n[8],1873313359,6);f=m(f,c,d,e,n[15],4264355552,10);e=m(e,f,c,d,n[6],2734768916,15);d=m(d,e,f,c,n[13],1309151649,21);c=m(c,d,e,f,n[4],4149444226,6);f=m(f,c,d,e,n[11],3174756917,10);e=m(e,f,c,d,n[2],718787259,15);d=m(d,e,f,c,n[9],3951481745,21);this._a=this._a+c|0;this._b=this._b+d|0;this._c=
this._c+e|0;this._d=this._d+f|0};e.prototype._digest=function(){this._block[this._blockOffset++]=128;56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0);this._block.fill(0,this._blockOffset,56);this._block.writeUInt32LE(this._length[0],56);this._block.writeUInt32LE(this._length[1],60);this._update();var a=new d(16);a.writeInt32LE(this._a,0);a.writeInt32LE(this._b,4);a.writeInt32LE(this._c,8);a.writeInt32LE(this._d,12);return a};k.exports=e}).call(this,
f("buffer").Buffer)},{buffer:3,"hash-base":38,inherits:39}],41:[function(f,k,h){function d(){g.call(this,64);this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520}function e(a,b){return a<<b|a>>>32-b}var c=f("buffer").Buffer;h=f("inherits");var g=f("hash-base"),a=Array(16),b=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,
15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],t=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,
6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],n=[0,1518500249,1859775393,2400959708,2840853838],q=[1352829926,1548603684,1836072691,2053994217,0];h(d,g);d.prototype._update=function(){for(var c=0;16>c;++c)a[c]=this._block.readInt32LE(4*c);var d=this._a|0;c=this._b|0;for(var g=this._c|0,f=this._d|0,h=this._e|0,k=this._a|0,H=this._b|0,F=this._c|0,G=this._d|0,C=this._e|0,A=0;80>A;A+=1){if(16>A){var E=h;E=e(d+(c^g^f)+a[b[A]]+n[0]|0,p[A])+E|
0;d=C;var K=e(k+(H^(F|~G))+a[m[A]]+q[0]|0,t[A])+d|0}else 32>A?(E=h,E=e(d+(c&g|~c&f)+a[b[A]]+n[1]|0,p[A])+E|0,d=C,K=e(k+(H&G|F&~G)+a[m[A]]+q[1]|0,t[A])+d|0):48>A?(E=h,E=e(d+((c|~g)^f)+a[b[A]]+n[2]|0,p[A])+E|0,d=C,K=e(k+((H|~F)^G)+a[m[A]]+q[2]|0,t[A])+d|0):64>A?(E=h,E=e(d+(c&f|g&~f)+a[b[A]]+n[3]|0,p[A])+E|0,d=C,K=e(k+(H&F|~H&G)+a[m[A]]+q[3]|0,t[A])+d|0):(E=h,E=e(d+(c^(g|~f))+a[b[A]]+n[4]|0,p[A])+E|0,d=C,K=e(k+(H^F^G)+a[m[A]]+q[4]|0,t[A])+d|0);d=h;h=f;f=e(g,10);g=c;c=E;k=C;C=G;G=e(F,10);F=H;H=K}g=this._b+
g+G|0;this._b=this._c+f+C|0;this._c=this._d+h+k|0;this._d=this._e+d+H|0;this._e=this._a+c+F|0;this._a=g};d.prototype._digest=function(){this._block[this._blockOffset++]=128;56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0);this._block.fill(0,this._blockOffset,56);this._block.writeUInt32LE(this._length[0],56);this._block.writeUInt32LE(this._length[1],60);this._update();var a=c.alloc?c.alloc(20):new c(20);a.writeInt32LE(this._a,0);a.writeInt32LE(this._b,
4);a.writeInt32LE(this._c,8);a.writeInt32LE(this._d,12);a.writeInt32LE(this._e,16);return a};k.exports=d},{buffer:3,"hash-base":38,inherits:39}],42:[function(f,k,h){arguments[4][25][0].apply(h,arguments)},{buffer:3,dup:25}],43:[function(f,k,h){function d(){this.negative=0;this.words=null;this.length=0}var e=f("safe-buffer").Buffer;f=f("./optimized");d.fromNumber=function(c){var e=new d;e.words=[c&67108863];e.length=1;return e};d.fromBuffer=function(c){var e=new d;e.words=Array(10);e.words[0]=(c[28]&
3)<<24|c[29]<<16|c[30]<<8|c[31];e.words[1]=(c[25]&15)<<22|c[26]<<14|c[27]<<6|c[28]>>>2;e.words[2]=(c[22]&63)<<20|c[23]<<12|c[24]<<4|c[25]>>>4;e.words[3]=(c[19]&255)<<18|c[20]<<10|c[21]<<2|c[22]>>>6;e.words[4]=(c[15]&3)<<24|c[16]<<16|c[17]<<8|c[18];e.words[5]=(c[12]&15)<<22|c[13]<<14|c[14]<<6|c[15]>>>2;e.words[6]=(c[9]&63)<<20|c[10]<<12|c[11]<<4|c[12]>>>4;e.words[7]=(c[6]&255)<<18|c[7]<<10|c[8]<<2|c[9]>>>6;e.words[8]=(c[2]&3)<<24|c[3]<<16|c[4]<<8|c[5];e.words[9]=c[0]<<14|c[1]<<6|c[2]>>>2;e.length=
10;return e.strip()};d.prototype.toBuffer=function(){for(var c=this.words,d=this.length;10>d;++d)c[d]=0;return e.from([c[9]>>>14&255,c[9]>>>6&255,(c[9]&63)<<2|c[8]>>>24&3,c[8]>>>16&255,c[8]>>>8&255,c[8]&255,c[7]>>>18&255,c[7]>>>10&255,c[7]>>>2&255,(c[7]&3)<<6|c[6]>>>20&63,c[6]>>>12&255,c[6]>>>4&255,(c[6]&15)<<4|c[5]>>>22&15,c[5]>>>14&255,c[5]>>>6&255,(c[5]&63)<<2|c[4]>>>24&3,c[4]>>>16&255,c[4]>>>8&255,c[4]&255,c[3]>>>18&255,c[3]>>>10&255,c[3]>>>2&255,(c[3]&3)<<6|c[2]>>>20&63,c[2]>>>12&255,c[2]>>>
4&255,(c[2]&15)<<4|c[1]>>>22&15,c[1]>>>14&255,c[1]>>>6&255,(c[1]&63)<<2|c[0]>>>24&3,c[0]>>>16&255,c[0]>>>8&255,c[0]&255])};d.prototype.clone=function(){var c=new d;c.words=Array(this.length);for(var e=0;e<this.length;e++)c.words[e]=this.words[e];c.length=this.length;c.negative=this.negative;return c};d.prototype.strip=function(){for(;1<this.length&&0===(this.words[this.length-1]|0);)this.length--;return this};d.prototype.normSign=function(){1===this.length&&0===this.words[0]&&(this.negative=0);return this};
d.prototype.isEven=function(){return 0===(this.words[0]&1)};d.prototype.isOdd=function(){return 1===(this.words[0]&1)};d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]};d.prototype.ucmp=function(c){if(this.length!==c.length)return this.length>c.length?1:-1;for(var d=this.length-1;0<=d;--d)if(this.words[d]!==c.words[d])return this.words[d]>c.words[d]?1:-1;return 0};d.prototype.gtOne=function(){return 1<this.length||1<this.words[0]};d.prototype.isOverflow=function(){return 0<=
this.ucmp(d.n)};d.prototype.isHigh=function(){return 1===this.ucmp(d.nh)};d.prototype.bitLengthGT256=function(){return 10<this.length||10===this.length&&4194303<this.words[9]};d.prototype.iuaddn=function(c){this.words[0]+=c;for(c=0;67108863<this.words[c]&&c<this.length;++c)this.words[c]-=67108864,this.words[c+1]+=1;c===this.length&&(this.words[c]=1,this.length+=1);return this};d.prototype.iadd=function(c){if(this.negative!==c.negative)return 0!==this.negative?(this.negative=0,this.isub(c),this.negative^=
1):(c.negative=0,this.isub(c),c.negative=1),this.normSign();if(this.length>c.length)var d=this;else d=c,c=this;for(var a=0,b=0;a<c.length;++a)b=d.words[a]+c.words[a]+b,this.words[a]=b&67108863,b>>>=26;for(;0!==b&&a<d.length;++a)b=d.words[a]+b,this.words[a]=b&67108863,b>>>=26;this.length=d.length;if(0!==b)this.words[this.length++]=b;else if(d!==this)for(;a<d.length;++a)this.words[a]=d.words[a];return this};d.prototype.add=function(c){return this.clone().iadd(c)};d.prototype.isub=function(c){if(this.negative!==
c.negative)return 0!==this.negative?(this.negative=0,this.iadd(c),this.negative=1):(c.negative=0,this.iadd(c),c.negative=1),this.normSign();var d=this.ucmp(c);if(0===d)return this.negative=0,this.words[0]=0,this.length=1,this;0<d?d=this:(d=c,c=this);for(var a=0,b=0;a<c.length;++a){var e=d.words[a]-c.words[a]+b;b=e>>26;this.words[a]=e&67108863}for(;0!==b&&a<d.length;++a)e=d.words[a]+b,b=e>>26,this.words[a]=e&67108863;if(0===b&&a<d.length&&d!==this)for(;a<d.length;++a)this.words[a]=d.words[a];this.length=
Math.max(this.length,a);d!==this&&(this.negative^=1);return this.strip().normSign()};d.prototype.sub=function(c){return this.clone().isub(c)};d.umulTo=function(c,d,a){a.length=c.length+d.length-1;var b=c.words[0]*d.words[0],e=b/67108864|0;a.words[0]=b&67108863;b=1;for(var g=a.length;b<g;b++){var f=e>>>26,n=e&67108863;e=Math.max(0,b-c.length+1);for(var q=Math.min(b,d.length-1);e<=q;e++)n=c.words[b-e]*d.words[e]+n,f+=n/67108864|0,n&=67108863;a.words[b]=n;e=f}0!==e&&(a.words[a.length++]=e);return a.strip()};
d.umulTo10x10=Math.imul?f.umulTo10x10:d.umulTo;d.umulnTo=function(c,d,a){if(0===d)return a.words=[0],a.length=1,a;for(var b=0,e=0;b<c.length;++b)e=c.words[b]*d+e,a.words[b]=e&67108863,e=e/67108864|0;0<e?(a.words[b]=e,a.length=c.length+1):a.length=c.length;return a};d.prototype.umul=function(c){var e=new d;e.words=Array(this.length+c.length);return 10===this.length&&10===c.length?d.umulTo10x10(this,c,e):1===this.length?d.umulnTo(c,this.words[0],e):1===c.length?d.umulnTo(this,c.words[0],e):d.umulTo(this,
c,e)};d.prototype.isplit=function(c){c.length=Math.min(this.length,9);for(var d=0;d<c.length;++d)c.words[d]=this.words[d];if(9>=this.length)return this.words[0]=0,this.length=1,this;var a=this.words[9];c.words[c.length++]=a&4194303;for(d=10;d<this.length;++d)c=this.words[d],this.words[d-10]=(c&4194303)<<4|a>>>22,a=c;a>>>=22;this.words[d-10]=a;this.length=0===a&&10<this.length?this.length-10:this.length-9;return this};d.prototype.fireduce=function(){this.isOverflow()&&this.isub(d.n);return this};d.prototype.ureduce=
function(){var c=this.clone().isplit(d.tmp).umul(d.nc).iadd(d.tmp);c.bitLengthGT256()&&(c=c.isplit(d.tmp).umul(d.nc).iadd(d.tmp),c.bitLengthGT256()&&(c=c.isplit(d.tmp).umul(d.nc).iadd(d.tmp)));return c.fireduce()};d.prototype.ishrn=function(c){for(var d=(1<<c)-1,a=26-c,b=this.length-1,e=0;0<=b;--b){var f=this.words[b];this.words[b]=e<<a|f>>>c;e=f&d}1<this.length&&0===this.words[this.length-1]&&--this.length;return this};d.prototype.uinvm=function(){for(var c=this.clone(),e=d.n.clone(),a=d.fromNumber(1),
b=d.fromNumber(0),f=d.fromNumber(0),p=d.fromNumber(1);c.isEven()&&e.isEven();){for(var t=1,n=1;0===(c.words[0]&n)&&0===(e.words[0]&n)&&26>t;++t,n<<=1);c.ishrn(t);e.ishrn(t)}t=e.clone();for(n=c.clone();!c.isZero();){for(var q=0,h=1;0===(c.words[0]&h)&&26>q;++q,h<<=1);if(0<q)for(c.ishrn(q);0<q--;){if(a.isOdd()||b.isOdd())a.iadd(t),b.isub(n);a.ishrn(1);b.ishrn(1)}q=0;for(h=1;0===(e.words[0]&h)&&26>q;++q,h<<=1);if(0<q)for(e.ishrn(q);0<q--;){if(f.isOdd()||p.isOdd())f.iadd(t),p.isub(n);f.ishrn(1);p.ishrn(1)}0<=
c.ucmp(e)?(c.isub(e),a.isub(f),b.isub(p)):(e.isub(c),f.isub(a),p.isub(b))}return 1===f.negative?(f.negative=0,c=f.ureduce(),c.negative^=1,c.normSign().iadd(d.n)):f.ureduce()};d.prototype.imulK=function(){this.words[this.length]=0;this.words[this.length+1]=0;this.length+=2;for(var c=0,d=0;c<this.length;++c){var a=this.words[c]|0;d+=977*a;this.words[c]=d&67108863;d=64*a+(d/67108864|0)}0===this.words[this.length-1]&&(--this.length,0===this.words[this.length-1]&&--this.length);return this};d.prototype.redIReduce=
function(){this.isplit(d.tmp).imulK().iadd(d.tmp);this.bitLengthGT256()&&this.isplit(d.tmp).imulK().iadd(d.tmp);var c=this.ucmp(d.p);0===c?(this.words[0]=0,this.length=1):0<c?this.isub(d.p):this.strip();return this};d.prototype.redNeg=function(){return this.isZero()?d.fromNumber(0):d.p.sub(this)};d.prototype.redAdd=function(c){return this.clone().redIAdd(c)};d.prototype.redIAdd=function(c){this.iadd(c);0<=this.ucmp(d.p)&&this.isub(d.p);return this};d.prototype.redIAdd7=function(){this.iuaddn(7);0<=
this.ucmp(d.p)&&this.isub(d.p);return this};d.prototype.redSub=function(c){return this.clone().redISub(c)};d.prototype.redISub=function(c){this.isub(c);0!==this.negative&&this.iadd(d.p);return this};d.prototype.redMul=function(c){return this.umul(c).redIReduce()};d.prototype.redSqr=function(){return this.umul(this).redIReduce()};d.prototype.redSqrt=function(){if(this.isZero())return this.clone();var c=this.redSqr(),d=c.redSqr();d=d.redSqr().redMul(d);c=d.redMul(c);for(var a=c.redMul(this),b=a,e=0;54>
e;++e)b=b.redSqr().redSqr().redSqr().redSqr().redMul(a);b=b.redSqr().redSqr().redSqr().redSqr().redMul(c);for(e=0;5>e;++e)b=b.redSqr().redSqr().redSqr().redSqr().redMul(a);b=b.redSqr().redSqr().redSqr().redSqr().redMul(d);b=b.redSqr().redSqr().redSqr().redSqr().redSqr().redSqr().redMul(d);return 0===b.redSqr().ucmp(this)?b:null};d.prototype.redInvm=function(){for(var c=this.clone(),e=d.p.clone(),a=d.fromNumber(1),b=d.fromNumber(0);c.gtOne()&&e.gtOne();){for(var f=0,p=1;0===(c.words[0]&p)&&26>f;++f,
p<<=1);if(0<f)for(c.ishrn(f);0<f--;)a.isOdd()&&a.iadd(d.p),a.ishrn(1);f=0;for(p=1;0===(e.words[0]&p)&&26>f;++f,p<<=1);if(0<f)for(e.ishrn(f);0<f--;)b.isOdd()&&b.iadd(d.p),b.ishrn(1);0<=c.ucmp(e)?(c.isub(e),a.isub(b)):(e.isub(c),b.isub(a))}c=1===c.length&&1===c.words[0]?a:b;0!==c.negative&&c.iadd(d.p);return 0!==c.negative?(c.negative=0,c.redIReduce().redNeg()):c.redIReduce()};d.prototype.getNAF=function(c){var d=[],a=1<<c+1,b=a-1;a>>=1;for(var e=this.clone();!e.isZero();){for(var f=0,t=1;0===(e.words[0]&
t)&&26>f;++f,t<<=1)d.push(0);if(0!==f)e.ishrn(f);else if(f=e.words[0]&b,f>=a)d.push(a-f),e.iuaddn(f-a).ishrn(1);else if(d.push(f),e.words[0]-=f,!e.isZero()){for(f=c-1;0<f;--f)d.push(0);e.ishrn(c)}}return d};d.prototype.inspect=function(){if(this.isZero())return"0";for(var c=this.toBuffer().toString("hex"),d=0;"0"===c[d];++d);return c.slice(d)};d.n=d.fromBuffer(e.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex"));d.nh=d.n.clone().ishrn(1);d.nc=d.fromBuffer(e.from("000000000000000000000000000000014551231950B75FC4402DA1732FC9BEBF",
"hex"));d.p=d.fromBuffer(e.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex"));d.psn=d.p.sub(d.n);d.tmp=new d;d.tmp.words=Array(10);d.fromNumber(1).words[3]=0;k.exports=d},{"./optimized":44,"safe-buffer":42}],44:[function(f,k,h){h.umulTo10x10=function(d,e,c){var g=d.words,a=e.words;e=c.words;d=0;var b=g[0]|0,f=b&8191,p=b>>>13,t=g[1]|0;b=t&8191;var n=t>>>13,q=g[2]|0;t=q&8191;var h=q>>>13,k=g[3]|0;q=k&8191;var v=k>>>13,B=g[4]|0;k=B&8191;var z=B>>>13,x=g[5]|0;B=x&8191;var H=
x>>>13,F=g[6]|0;x=F&8191;var G=F>>>13,C=g[7]|0;F=C&8191;var A=C>>>13,E=g[8]|0;C=E&8191;E>>>=13;var K=g[9]|0;g=K&8191;K>>>=13;var D=a[0]|0,I=D&8191,J=D>>>13,y=a[1]|0;D=y&8191;var L=y>>>13,w=a[2]|0;y=w&8191;var M=w>>>13,l=a[3]|0;w=l&8191;var T=l>>>13,O=a[4]|0;l=O&8191;var U=O>>>13,P=a[5]|0;O=P&8191;var W=P>>>13,S=a[6]|0;P=S&8191;var V=S>>>13,R=a[7]|0;S=R&8191;var X=R>>>13;var r=a[8]|0;R=r&8191;var aa=r>>>13;a=a[9]|0;var Y=a&8191,Z=a>>>13;c.length=19;var u=Math.imul(f,I);a=Math.imul(f,J);a+=Math.imul(p,
I);r=Math.imul(p,J);var ba=d+u+((a&8191)<<13);d=r+(a>>>13)+(ba>>>26);ba&=67108863;u=Math.imul(b,I);a=Math.imul(b,J);a+=Math.imul(n,I);r=Math.imul(n,J);u+=Math.imul(f,D);a+=Math.imul(f,L);a+=Math.imul(p,D);r+=Math.imul(p,L);var ca=d+u+((a&8191)<<13);d=r+(a>>>13)+(ca>>>26);ca&=67108863;u=Math.imul(t,I);a=Math.imul(t,J);a+=Math.imul(h,I);r=Math.imul(h,J);u+=Math.imul(b,D);a+=Math.imul(b,L);a+=Math.imul(n,D);r+=Math.imul(n,L);u+=Math.imul(f,y);a+=Math.imul(f,M);a+=Math.imul(p,y);r+=Math.imul(p,M);var da=
d+u+((a&8191)<<13);d=r+(a>>>13)+(da>>>26);da&=67108863;u=Math.imul(q,I);a=Math.imul(q,J);a+=Math.imul(v,I);r=Math.imul(v,J);u+=Math.imul(t,D);a+=Math.imul(t,L);a+=Math.imul(h,D);r+=Math.imul(h,L);u+=Math.imul(b,y);a+=Math.imul(b,M);a+=Math.imul(n,y);r+=Math.imul(n,M);u+=Math.imul(f,w);a+=Math.imul(f,T);a+=Math.imul(p,w);r+=Math.imul(p,T);var ea=d+u+((a&8191)<<13);d=r+(a>>>13)+(ea>>>26);ea&=67108863;u=Math.imul(k,I);a=Math.imul(k,J);a+=Math.imul(z,I);r=Math.imul(z,J);u+=Math.imul(q,D);a+=Math.imul(q,
L);a+=Math.imul(v,D);r+=Math.imul(v,L);u+=Math.imul(t,y);a+=Math.imul(t,M);a+=Math.imul(h,y);r+=Math.imul(h,M);u+=Math.imul(b,w);a+=Math.imul(b,T);a+=Math.imul(n,w);r+=Math.imul(n,T);u+=Math.imul(f,l);a+=Math.imul(f,U);a+=Math.imul(p,l);r+=Math.imul(p,U);var fa=d+u+((a&8191)<<13);d=r+(a>>>13)+(fa>>>26);fa&=67108863;u=Math.imul(B,I);a=Math.imul(B,J);a+=Math.imul(H,I);r=Math.imul(H,J);u+=Math.imul(k,D);a+=Math.imul(k,L);a+=Math.imul(z,D);r+=Math.imul(z,L);u+=Math.imul(q,y);a+=Math.imul(q,M);a+=Math.imul(v,
y);r+=Math.imul(v,M);u+=Math.imul(t,w);a+=Math.imul(t,T);a+=Math.imul(h,w);r+=Math.imul(h,T);u+=Math.imul(b,l);a+=Math.imul(b,U);a+=Math.imul(n,l);r+=Math.imul(n,U);u+=Math.imul(f,O);a+=Math.imul(f,W);a+=Math.imul(p,O);r+=Math.imul(p,W);var ha=d+u+((a&8191)<<13);d=r+(a>>>13)+(ha>>>26);ha&=67108863;u=Math.imul(x,I);a=Math.imul(x,J);a+=Math.imul(G,I);r=Math.imul(G,J);u+=Math.imul(B,D);a+=Math.imul(B,L);a+=Math.imul(H,D);r+=Math.imul(H,L);u+=Math.imul(k,y);a+=Math.imul(k,M);a+=Math.imul(z,y);r+=Math.imul(z,
M);u+=Math.imul(q,w);a+=Math.imul(q,T);a+=Math.imul(v,w);r+=Math.imul(v,T);u+=Math.imul(t,l);a+=Math.imul(t,U);a+=Math.imul(h,l);r+=Math.imul(h,U);u+=Math.imul(b,O);a+=Math.imul(b,W);a+=Math.imul(n,O);r+=Math.imul(n,W);u+=Math.imul(f,P);a+=Math.imul(f,V);a+=Math.imul(p,P);r+=Math.imul(p,V);var ia=d+u+((a&8191)<<13);d=r+(a>>>13)+(ia>>>26);ia&=67108863;u=Math.imul(F,I);a=Math.imul(F,J);a+=Math.imul(A,I);r=Math.imul(A,J);u+=Math.imul(x,D);a+=Math.imul(x,L);a+=Math.imul(G,D);r+=Math.imul(G,L);u+=Math.imul(B,
y);a+=Math.imul(B,M);a+=Math.imul(H,y);r+=Math.imul(H,M);u+=Math.imul(k,w);a+=Math.imul(k,T);a+=Math.imul(z,w);r+=Math.imul(z,T);u+=Math.imul(q,l);a+=Math.imul(q,U);a+=Math.imul(v,l);r+=Math.imul(v,U);u+=Math.imul(t,O);a+=Math.imul(t,W);a+=Math.imul(h,O);r+=Math.imul(h,W);u+=Math.imul(b,P);a+=Math.imul(b,V);a+=Math.imul(n,P);r+=Math.imul(n,V);u+=Math.imul(f,S);a+=Math.imul(f,X);a+=Math.imul(p,S);r+=Math.imul(p,X);var ja=d+u+((a&8191)<<13);d=r+(a>>>13)+(ja>>>26);ja&=67108863;u=Math.imul(C,I);a=Math.imul(C,
J);a+=Math.imul(E,I);r=Math.imul(E,J);u+=Math.imul(F,D);a+=Math.imul(F,L);a+=Math.imul(A,D);r+=Math.imul(A,L);u+=Math.imul(x,y);a+=Math.imul(x,M);a+=Math.imul(G,y);r+=Math.imul(G,M);u+=Math.imul(B,w);a+=Math.imul(B,T);a+=Math.imul(H,w);r+=Math.imul(H,T);u+=Math.imul(k,l);a+=Math.imul(k,U);a+=Math.imul(z,l);r+=Math.imul(z,U);u+=Math.imul(q,O);a+=Math.imul(q,W);a+=Math.imul(v,O);r+=Math.imul(v,W);u+=Math.imul(t,P);a+=Math.imul(t,V);a+=Math.imul(h,P);r+=Math.imul(h,V);u+=Math.imul(b,S);a+=Math.imul(b,
X);a+=Math.imul(n,S);r+=Math.imul(n,X);u+=Math.imul(f,R);a+=Math.imul(f,aa);a+=Math.imul(p,R);r+=Math.imul(p,aa);var ka=d+u+((a&8191)<<13);d=r+(a>>>13)+(ka>>>26);ka&=67108863;u=Math.imul(g,I);a=Math.imul(g,J);a+=Math.imul(K,I);r=Math.imul(K,J);u+=Math.imul(C,D);a+=Math.imul(C,L);a+=Math.imul(E,D);r+=Math.imul(E,L);u+=Math.imul(F,y);a+=Math.imul(F,M);a+=Math.imul(A,y);r+=Math.imul(A,M);u+=Math.imul(x,w);a+=Math.imul(x,T);a+=Math.imul(G,w);r+=Math.imul(G,T);u+=Math.imul(B,l);a+=Math.imul(B,U);a+=Math.imul(H,
l);r+=Math.imul(H,U);u+=Math.imul(k,O);a+=Math.imul(k,W);a+=Math.imul(z,O);r+=Math.imul(z,W);u+=Math.imul(q,P);a+=Math.imul(q,V);a+=Math.imul(v,P);r+=Math.imul(v,V);u+=Math.imul(t,S);a+=Math.imul(t,X);a+=Math.imul(h,S);r+=Math.imul(h,X);u+=Math.imul(b,R);a+=Math.imul(b,aa);a+=Math.imul(n,R);r+=Math.imul(n,aa);u+=Math.imul(f,Y);a+=Math.imul(f,Z);a+=Math.imul(p,Y);r+=Math.imul(p,Z);f=d+u+((a&8191)<<13);d=r+(a>>>13)+(f>>>26);f&=67108863;u=Math.imul(g,D);a=Math.imul(g,L);a+=Math.imul(K,D);r=Math.imul(K,
L);u+=Math.imul(C,y);a+=Math.imul(C,M);a+=Math.imul(E,y);r+=Math.imul(E,M);u+=Math.imul(F,w);a+=Math.imul(F,T);a+=Math.imul(A,w);r+=Math.imul(A,T);u+=Math.imul(x,l);a+=Math.imul(x,U);a+=Math.imul(G,l);r+=Math.imul(G,U);u+=Math.imul(B,O);a+=Math.imul(B,W);a+=Math.imul(H,O);r+=Math.imul(H,W);u+=Math.imul(k,P);a+=Math.imul(k,V);a+=Math.imul(z,P);r+=Math.imul(z,V);u+=Math.imul(q,S);a+=Math.imul(q,X);a+=Math.imul(v,S);r+=Math.imul(v,X);u+=Math.imul(t,R);a+=Math.imul(t,aa);a+=Math.imul(h,R);r+=Math.imul(h,
aa);u+=Math.imul(b,Y);a+=Math.imul(b,Z);a+=Math.imul(n,Y);r+=Math.imul(n,Z);b=d+u+((a&8191)<<13);d=r+(a>>>13)+(b>>>26);b&=67108863;u=Math.imul(g,y);a=Math.imul(g,M);a+=Math.imul(K,y);r=Math.imul(K,M);u+=Math.imul(C,w);a+=Math.imul(C,T);a+=Math.imul(E,w);r+=Math.imul(E,T);u+=Math.imul(F,l);a+=Math.imul(F,U);a+=Math.imul(A,l);r+=Math.imul(A,U);u+=Math.imul(x,O);a+=Math.imul(x,W);a+=Math.imul(G,O);r+=Math.imul(G,W);u+=Math.imul(B,P);a+=Math.imul(B,V);a+=Math.imul(H,P);r+=Math.imul(H,V);u+=Math.imul(k,
S);a+=Math.imul(k,X);a+=Math.imul(z,S);r+=Math.imul(z,X);u+=Math.imul(q,R);a+=Math.imul(q,aa);a+=Math.imul(v,R);r+=Math.imul(v,aa);u+=Math.imul(t,Y);a+=Math.imul(t,Z);a+=Math.imul(h,Y);r+=Math.imul(h,Z);t=d+u+((a&8191)<<13);d=r+(a>>>13)+(t>>>26);t&=67108863;u=Math.imul(g,w);a=Math.imul(g,T);a+=Math.imul(K,w);r=Math.imul(K,T);u+=Math.imul(C,l);a+=Math.imul(C,U);a+=Math.imul(E,l);r+=Math.imul(E,U);u+=Math.imul(F,O);a+=Math.imul(F,W);a+=Math.imul(A,O);r+=Math.imul(A,W);u+=Math.imul(x,P);a+=Math.imul(x,
V);a+=Math.imul(G,P);r+=Math.imul(G,V);u+=Math.imul(B,S);a+=Math.imul(B,X);a+=Math.imul(H,S);r+=Math.imul(H,X);u+=Math.imul(k,R);a+=Math.imul(k,aa);a+=Math.imul(z,R);r+=Math.imul(z,aa);u+=Math.imul(q,Y);a+=Math.imul(q,Z);a+=Math.imul(v,Y);r+=Math.imul(v,Z);q=d+u+((a&8191)<<13);d=r+(a>>>13)+(q>>>26);q&=67108863;u=Math.imul(g,l);a=Math.imul(g,U);a+=Math.imul(K,l);r=Math.imul(K,U);u+=Math.imul(C,O);a+=Math.imul(C,W);a+=Math.imul(E,O);r+=Math.imul(E,W);u+=Math.imul(F,P);a+=Math.imul(F,V);a+=Math.imul(A,
P);r+=Math.imul(A,V);u+=Math.imul(x,S);a+=Math.imul(x,X);a+=Math.imul(G,S);r+=Math.imul(G,X);u+=Math.imul(B,R);a+=Math.imul(B,aa);a+=Math.imul(H,R);r+=Math.imul(H,aa);u+=Math.imul(k,Y);a+=Math.imul(k,Z);a+=Math.imul(z,Y);r+=Math.imul(z,Z);k=d+u+((a&8191)<<13);d=r+(a>>>13)+(k>>>26);k&=67108863;u=Math.imul(g,O);a=Math.imul(g,W);a+=Math.imul(K,O);r=Math.imul(K,W);u+=Math.imul(C,P);a+=Math.imul(C,V);a+=Math.imul(E,P);r+=Math.imul(E,V);u+=Math.imul(F,S);a+=Math.imul(F,X);a+=Math.imul(A,S);r+=Math.imul(A,
X);u+=Math.imul(x,R);a+=Math.imul(x,aa);a+=Math.imul(G,R);r+=Math.imul(G,aa);u+=Math.imul(B,Y);a+=Math.imul(B,Z);a+=Math.imul(H,Y);r+=Math.imul(H,Z);B=d+u+((a&8191)<<13);d=r+(a>>>13)+(B>>>26);B&=67108863;u=Math.imul(g,P);a=Math.imul(g,V);a+=Math.imul(K,P);r=Math.imul(K,V);u+=Math.imul(C,S);a+=Math.imul(C,X);a+=Math.imul(E,S);r+=Math.imul(E,X);u+=Math.imul(F,R);a+=Math.imul(F,aa);a+=Math.imul(A,R);r+=Math.imul(A,aa);u+=Math.imul(x,Y);a+=Math.imul(x,Z);a+=Math.imul(G,Y);r+=Math.imul(G,Z);x=d+u+((a&
8191)<<13);d=r+(a>>>13)+(x>>>26);x&=67108863;u=Math.imul(g,S);a=Math.imul(g,X);a+=Math.imul(K,S);r=Math.imul(K,X);u+=Math.imul(C,R);a+=Math.imul(C,aa);a+=Math.imul(E,R);r+=Math.imul(E,aa);u+=Math.imul(F,Y);a+=Math.imul(F,Z);a+=Math.imul(A,Y);r+=Math.imul(A,Z);F=d+u+((a&8191)<<13);d=r+(a>>>13)+(F>>>26);F&=67108863;u=Math.imul(g,R);a=Math.imul(g,aa);a+=Math.imul(K,R);r=Math.imul(K,aa);u+=Math.imul(C,Y);a+=Math.imul(C,Z);a+=Math.imul(E,Y);r+=Math.imul(E,Z);C=d+u+((a&8191)<<13);d=r+(a>>>13)+(C>>>26);
C&=67108863;u=Math.imul(g,Y);a=Math.imul(g,Z);a+=Math.imul(K,Y);r=Math.imul(K,Z);p=d+u+((a&8191)<<13);d=r+(a>>>13)+(p>>>26);e[0]=ba;e[1]=ca;e[2]=da;e[3]=ea;e[4]=fa;e[5]=ha;e[6]=ia;e[7]=ja;e[8]=ka;e[9]=f;e[10]=b;e[11]=t;e[12]=q;e[13]=k;e[14]=B;e[15]=x;e[16]=F;e[17]=C;e[18]=p&67108863;0!==d&&(e[19]=d,c.length++);return c}},{}],45:[function(f,k,h){function d(e,c,f){null===e&&null===c&&null===f?(this.y=this.x=d.one,this.z=d.zero):(this.x=e,this.y=c,this.z=f);this.zOne=this.z===d.one}f=f("./bn");d.zero=
f.fromNumber(0);d.one=f.fromNumber(1);d.prototype.neg=function(){return this.inf?this:new d(this.x,this.y.redNeg(),this.z)};d.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;var c=e.z.redSqr(),f=this.z.redSqr(),a=this.x.redMul(c),b=e.x.redMul(f);c=this.y.redMul(c).redMul(e.z);f=e.y.redMul(f).redMul(this.z);b=a.redSub(b);f=c.redSub(f);if(b.isZero())return f.isZero()?this.dbl():new d(null,null,null);var m=b.redSqr(),p=a.redMul(m);m=m.redMul(b);a=f.redSqr().redIAdd(m).redISub(p).redISub(p);
c=f.redMul(p.redISub(a)).redISub(c.redMul(m));e=this.z.redMul(e.z).redMul(b);return new d(a,c,e)};d.prototype.mixedAdd=function(e){if(this.inf)return e.toECJPoint();if(e.inf)return this;var c=this.z.redSqr(),f=this.x,a=e.x.redMul(c),b=this.y;e=e.y.redMul(c).redMul(this.z);a=f.redSub(a);e=b.redSub(e);if(a.isZero())return e.isZero()?this.dbl():new d(null,null,null);var m=a.redSqr();c=f.redMul(m);m=m.redMul(a);f=e.redSqr().redIAdd(m).redISub(c).redISub(c);b=e.redMul(c.redISub(f)).redISub(b.redMul(m));
a=this.z.redMul(a);return new d(f,b,a)};d.prototype.dbl=function(){if(this.inf)return this;if(this.zOne){var e=this.x.redSqr();var c=this.y.redSqr();var f=c.redSqr();c=this.x.redAdd(c).redSqr().redISub(e).redISub(f);c=c.redIAdd(c);e=e.redAdd(e).redIAdd(e);var a=e.redSqr().redISub(c).redISub(c),b=f.redIAdd(f).redIAdd(f).redIAdd(f);f=a;c=e.redMul(c.redISub(a)).redISub(b);e=this.y.redAdd(this.y)}else e=this.x.redSqr(),c=this.y.redSqr(),f=c.redSqr(),c=this.x.redAdd(c).redSqr().redISub(e).redISub(f),c=
c.redIAdd(c),e=e.redAdd(e).redIAdd(e),a=e.redSqr(),b=f.redIAdd(f).redIAdd(f).redIAdd(f),f=a.redISub(c).redISub(c),c=e.redMul(c.redISub(f)).redISub(b),e=this.y.redMul(this.z),e=e.redIAdd(e);return new d(f,c,e)};d.prototype.dblp=function(d){if(0===d||this.inf)return this;for(var c=this,e=0;e<d;e++)c=c.dbl();return c};Object.defineProperty(d.prototype,"inf",{enumerable:!0,get:function(){return this.z.isZero()}});k.exports=d},{"./bn":43}],46:[function(f,k,h){function d(a,b){null===a&&null===b?(this.x=
this.y=null,this.inf=!0):(this.x=a,this.y=b,this.inf=!1)}var e=f("safe-buffer").Buffer,c=f("./bn"),g=f("./ecjpoint");d.fromPublicKey=function(a){var b=a[0];if(33===a.length&&(2===b||3===b)){var e=c.fromBuffer(a.slice(1,33));if(0<=e.ucmp(c.p))return null;a=e.redSqr().redMul(e).redIAdd7().redSqrt();if(null===a)return null;3===b!==a.isOdd()&&(a=a.redNeg());return new d(e,a)}return 65!==a.length||4!==b&&6!==b&&7!==b?null:(e=c.fromBuffer(a.slice(1,33)),a=c.fromBuffer(a.slice(33,65)),0<=e.ucmp(c.p)||0<=
a.ucmp(c.p)||(6===b||7===b)&&a.isOdd()!==(7===b)||0!==e.redSqr().redMul(e).redIAdd7().ucmp(a.redSqr())?null:new d(e,a))};d.prototype.toPublicKey=function(a){var b=this.x,c=this.y;a?(a=e.alloc(33),a[0]=c.isOdd()?3:2,b.toBuffer().copy(a,1)):(a=e.alloc(65),a[0]=4,b.toBuffer().copy(a,1),c.toBuffer().copy(a,33));return a};d.fromECJPoint=function(a){if(a.inf)return new d(null,null);var b=a.z.redInvm(),c=b.redSqr(),e=a.x.redMul(c);a=a.y.redMul(c).redMul(b);return new d(e,a)};d.prototype.toECJPoint=function(){return this.inf?
new g(null,null,null):new g(this.x,this.y,g.one)};d.prototype.neg=function(){return this.inf?this:new d(this.x,this.y.redNeg())};d.prototype.add=function(a){if(this.inf)return a;if(a.inf)return this;if(0===this.x.ucmp(a.x))return 0===this.y.ucmp(a.y)?this.dbl():new d(null,null);var b=this.y.redSub(a.y);b.isZero()||(b=b.redMul(this.x.redSub(a.x).redInvm()));a=b.redSqr().redISub(this.x).redISub(a.x);b=b.redMul(this.x.redSub(a)).redISub(this.y);return new d(a,b)};d.prototype.dbl=function(){if(this.inf)return this;
var a=this.y.redAdd(this.y);if(a.isZero())return new d(null,null);var b=this.x.redSqr();b=b.redAdd(b).redIAdd(b).redMul(a.redInvm());a=b.redSqr().redISub(this.x.redAdd(this.x));b=b.redMul(this.x.redSub(a)).redISub(this.y);return new d(a,b)};d.prototype.mul=function(a){var b=this._getNAFPoints(4),c=b.points;a=a.getNAF(b.wnd);b=new g(null,null,null);for(var e=a.length-1;0<=e;e--){for(var f=0;0<=e&&0===a[e];e--,++f);0<=e&&(f+=1);b=b.dblp(f);if(0>e)break;f=a[e];b=0<f?b.mixedAdd(c[f-1>>1]):b.mixedAdd(c[-f-
1>>1].neg())}return d.fromECJPoint(b)};d.prototype._getNAFPoints1=function(){return{wnd:1,points:[this]}};d.prototype._getNAFPoints=function(a){var b=Array((1<<a)-1);b[0]=this;for(var c=this.dbl(),d=1;d<b.length;++d)b[d]=b[d-1].add(c);return{wnd:a,points:b}};k.exports=d},{"./bn":43,"./ecjpoint":45,"safe-buffer":42}],47:[function(f,k,h){function d(){this.x=c.fromBuffer(e.from("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","hex"));this.y=c.fromBuffer(e.from("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",
"hex"));this.inf=!1;this._precompute()}var e=f("safe-buffer").Buffer,c=f("./bn"),g=f("./ecpoint"),a=f("./ecjpoint");d.prototype._precompute=function(){for(var a=new g(this.x,this.y),c=Array(66),d=c[0]=a,e=1;e<c.length;++e){for(var f=0;4>f;f++)d=d.dbl();c[e]=d}this.precomputed={naf:a._getNAFPoints(7),doubles:{step:4,points:c,negpoints:c.map(function(a){return a.neg()})}}};d.prototype.mul=function(b){var c=this.precomputed.doubles.step,d=this.precomputed.doubles.points,e=this.precomputed.doubles.negpoints,
f=b.getNAF(1),h=((1<<c+1)-(0===c%2?2:1))/3;b=[];for(var k=0;k<f.length;k+=c){for(var N=0,v=k+c-1;v>=k;v--)N=(N<<1)+f[v];b.push(N)}c=new a(null,null,null);for(f=new a(null,null,null);0<h;h--){for(k=0;k<b.length;k++)b[k]===h?f=f.mixedAdd(d[k]):b[k]===-h&&(f=f.mixedAdd(e[k]));c=c.add(f)}return g.fromECJPoint(c)};d.prototype.mulAdd=function(b,c,d){var e=this.precomputed.naf,f=c._getNAFPoints1();c=[e.points,f.points];b=[b.getNAF(e.wnd),d.getNAF(f.wnd)];d=new a(null,null,null);e=[null,null];for(f=Math.max(b[0].length,
b[1].length);0<=f;f--){for(var g=0;0<=f&&(e[0]=b[0][f]|0,e[1]=b[1][f]|0,0===e[0]&&0===e[1]);++g,--f);0<=f&&(g+=1);d=d.dblp(g);if(0>f)break;for(g=0;2>g;g++){var m=e[g],p;0!==m&&(0<m?p=c[g][m>>1]:0>m&&(p=c[g][-m>>1].neg()),d=void 0===p.z?d.mixedAdd(p):d.add(p))}}return d};k.exports=new d},{"./bn":43,"./ecjpoint":45,"./ecpoint":46,"safe-buffer":42}],48:[function(f,k,h){var d=f("safe-buffer").Buffer,e=f("create-hash"),c=f("drbg.js/hmac"),g=f("../messages.json"),a=f("./bn"),b=f("./ecpoint"),m=f("./ecpointg");
h.privateKeyVerify=function(b){b=a.fromBuffer(b);return!(b.isOverflow()||b.isZero())};h.privateKeyExport=function(b,c){var d=a.fromBuffer(b);if(d.isOverflow()||d.isZero())throw Error(g.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return m.mul(d).toPublicKey(c)};h.privateKeyNegate=function(b){b=a.fromBuffer(b);if(b.isZero())return d.alloc(32);0<b.ucmp(a.n)&&b.isub(a.n);return a.n.sub(b).toBuffer()};h.privateKeyModInverse=function(b){b=a.fromBuffer(b);if(b.isOverflow()||b.isZero())throw Error(g.EC_PRIVATE_KEY_RANGE_INVALID);
return b.uinvm().toBuffer()};h.privateKeyTweakAdd=function(b,c){var d=a.fromBuffer(c);if(d.isOverflow())throw Error(g.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);d.iadd(a.fromBuffer(b));d.isOverflow()&&d.isub(a.n);if(d.isZero())throw Error(g.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return d.toBuffer()};h.privateKeyTweakMul=function(b,c){var d=a.fromBuffer(c);if(d.isOverflow()||d.isZero())throw Error(g.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);var e=a.fromBuffer(b);return d.umul(e).ureduce().toBuffer()};h.publicKeyCreate=function(b,
c){var d=a.fromBuffer(b);if(d.isOverflow()||d.isZero())throw Error(g.EC_PUBLIC_KEY_CREATE_FAIL);return m.mul(d).toPublicKey(c)};h.publicKeyConvert=function(a,c){var d=b.fromPublicKey(a);if(null===d)throw Error(g.EC_PUBLIC_KEY_PARSE_FAIL);return d.toPublicKey(c)};h.publicKeyVerify=function(a){return null!==b.fromPublicKey(a)};h.publicKeyTweakAdd=function(c,d,e){c=b.fromPublicKey(c);if(null===c)throw Error(g.EC_PUBLIC_KEY_PARSE_FAIL);d=a.fromBuffer(d);if(d.isOverflow())throw Error(g.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);
return m.mul(d).add(c).toPublicKey(e)};h.publicKeyTweakMul=function(c,d,e){c=b.fromPublicKey(c);if(null===c)throw Error(g.EC_PUBLIC_KEY_PARSE_FAIL);d=a.fromBuffer(d);if(d.isOverflow()||d.isZero())throw Error(g.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return c.mul(d).toPublicKey(e)};h.publicKeyCombine=function(a,c){for(var d=Array(a.length),e=0;e<a.length;++e)if(d[e]=b.fromPublicKey(a[e]),null===d[e])throw Error(g.EC_PUBLIC_KEY_PARSE_FAIL);e=d[0];for(var f=1;f<d.length;++f)e=e.add(d[f]);if(e.inf)throw Error(g.EC_PUBLIC_KEY_COMBINE_FAIL);
return e.toPublicKey(c)};h.signatureNormalize=function(b){var c=a.fromBuffer(b.slice(0,32)),e=a.fromBuffer(b.slice(32,64));if(c.isOverflow()||e.isOverflow())throw Error(g.ECDSA_SIGNATURE_PARSE_FAIL);b=d.from(b);e.isHigh()&&a.n.sub(e).toBuffer().copy(b,32);return b};h.signatureExport=function(b){var c=b.slice(0,32);b=b.slice(32,64);if(a.fromBuffer(c).isOverflow()||a.fromBuffer(b).isOverflow())throw Error(g.ECDSA_SIGNATURE_PARSE_FAIL);return{r:c,s:b}};h.signatureImport=function(b){var c=a.fromBuffer(b.r);
c.isOverflow()&&(c=a.fromNumber(0));b=a.fromBuffer(b.s);b.isOverflow()&&(b=a.fromNumber(0));return d.concat([c.toBuffer(),b.toBuffer()])};h.sign=function(b,e,f,h){var n=a.fromBuffer(e);if(n.isOverflow()||n.isZero())throw Error(g.ECDSA_SIGN_FAIL);if(null===f){var p=new c("sha256",e,b,h);f=function(){return p.generate(32)}}for(var t=a.fromBuffer(b),k=0;;++k){var q=f(b,e,null,h,k);if(!d.isBuffer(q)||32!==q.length)throw Error(g.ECDSA_SIGN_FAIL);var x=a.fromBuffer(q);if(!x.isOverflow()&&!x.isZero()){var H=
m.mul(x);q=H.x.fireduce();if(!q.isZero()&&(x=x.uinvm().umul(q.umul(n).ureduce().iadd(t).fireduce()).ureduce(),!x.isZero()))return b=(0!==H.x.ucmp(q)?2:0)|(H.y.isOdd()?1:0),x.isHigh()&&(x=a.n.sub(x),b^=1),{signature:d.concat([q.toBuffer(),x.toBuffer()]),recovery:b}}}};h.verify=function(c,d,e){var f=a.fromBuffer(d.slice(0,32));d=a.fromBuffer(d.slice(32,64));if(f.isOverflow()||d.isOverflow())throw Error(g.ECDSA_SIGNATURE_PARSE_FAIL);if(d.isHigh()||f.isZero()||d.isZero())return!1;e=b.fromPublicKey(e);
if(null===e)throw Error(g.EC_PUBLIC_KEY_PARSE_FAIL);d=d.uinvm();c=d.umul(a.fromBuffer(c)).ureduce();d=d.umul(f).ureduce();c=m.mulAdd(c,e,d);if(c.inf)return!1;e=c.z.redSqr();return 0===f.redMul(e).ucmp(c.x)?!0:0<=f.ucmp(a.psn)?!1:0===f.iadd(a.psn).redMul(e).ucmp(c.x)};h.recover=function(c,e,f,h){var n=a.fromBuffer(e.slice(0,32));e=a.fromBuffer(e.slice(32,64));if(n.isOverflow()||e.isOverflow())throw Error(g.ECDSA_SIGNATURE_PARSE_FAIL);do if(!n.isZero()&&!e.isZero()){var p=n;if(f>>1){if(0<=p.ucmp(a.psn))break;
p=n.add(a.n)}p=d.concat([d.from([2+(f&1)]),p.toBuffer()]);p=b.fromPublicKey(p);if(null!==p)return f=n.uinvm(),c=a.n.sub(a.fromBuffer(c)).umul(f).ureduce(),e=e.umul(f).ureduce(),b.fromECJPoint(m.mulAdd(c,p,e)).toPublicKey(h)}while(0);throw Error(g.ECDSA_RECOVER_FAIL);};h.ecdh=function(a,b){var c=h.ecdhUnsafe(a,b,!0);return e("sha256").update(c).digest()};h.ecdhUnsafe=function(c,d,e){c=b.fromPublicKey(c);if(null===c)throw Error(g.EC_PUBLIC_KEY_PARSE_FAIL);d=a.fromBuffer(d);if(d.isOverflow()||d.isZero())throw Error(g.ECDH_FAIL);
return c.mul(d).toPublicKey(e)}},{"../messages.json":49,"./bn":43,"./ecpoint":46,"./ecpointg":47,"create-hash":32,"drbg.js/hmac":36,"safe-buffer":42}],49:[function(f,k,h){k.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",
EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",
EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",
ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",
RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}},{}],50:[function(f,k,h){function d(c,d){this._block=e.alloc(c);this._finalSize=d;this._blockSize=c;this._len=0}var e=f("safe-buffer").Buffer;d.prototype.update=function(c,d){"string"===typeof c&&(c=e.from(c,d||"utf8"));for(var a=this._block,b=this._blockSize,f=c.length,g=this._len,
h=0;h<f;){for(var n=g%b,k=Math.min(f-h,b-n),Q=0;Q<k;Q++)a[n+Q]=c[h+Q];g+=k;h+=k;0===g%b&&this._update(a)}this._len+=f;return this};d.prototype.digest=function(c){var d=this._len%this._blockSize;this._block[d]=128;this._block.fill(0,d+1);d>=this._finalSize&&(this._update(this._block),this._block.fill(0));d=8*this._len;if(4294967295>=d)this._block.writeUInt32BE(d,this._blockSize-4);else{var a=(d&4294967295)>>>0;this._block.writeUInt32BE((d-a)/4294967296,this._blockSize-8);this._block.writeUInt32BE(a,
this._blockSize-4)}this._update(this._block);d=this._hash();return c?d.toString(c):d};d.prototype._update=function(){throw Error("_update must be implemented by subclass");};k.exports=d},{"safe-buffer":42}],51:[function(f,k,h){h=k.exports=function(d){d=d.toLowerCase();var e=h[d];if(!e)throw Error(d+" is not supported (we accept pull requests)");return new e};h.sha=f("./sha");h.sha1=f("./sha1");h.sha224=f("./sha224");h.sha256=f("./sha256");h.sha384=f("./sha384");h.sha512=f("./sha512")},{"./sha":52,
"./sha1":53,"./sha224":54,"./sha256":55,"./sha384":56,"./sha512":57}],52:[function(f,k,h){function d(){this.init();this._w=a;e.call(this,64,56)}h=f("inherits");var e=f("./hash"),c=f("safe-buffer").Buffer,g=[1518500249,1859775393,-1894007588,-899497514],a=Array(80);h(d,e);d.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};d.prototype._update=function(a){for(var b=this._w,c=this._a|0,d=this._b|0,e=this._c|0,f=this._d|
0,h=this._e|0,k=0;16>k;++k)b[k]=a.readInt32BE(4*k);for(;80>k;++k)b[k]=b[k-3]^b[k-8]^b[k-14]^b[k-16];for(a=0;80>a;++a){k=~~(a/20);var v=c<<5|c>>>27;var B=0===k?d&e|~d&f:2===k?d&e|d&f|e&f:d^e^f;k=v+B+h+b[a]+g[k]|0;h=f;f=e;e=d<<30|d>>>2;d=c;c=k}this._a=c+this._a|0;this._b=d+this._b|0;this._c=e+this._c|0;this._d=f+this._d|0;this._e=h+this._e|0};d.prototype._hash=function(){var a=c.allocUnsafe(20);a.writeInt32BE(this._a|0,0);a.writeInt32BE(this._b|0,4);a.writeInt32BE(this._c|0,8);a.writeInt32BE(this._d|
0,12);a.writeInt32BE(this._e|0,16);return a};k.exports=d},{"./hash":50,inherits:39,"safe-buffer":42}],53:[function(f,k,h){function d(){this.init();this._w=a;e.call(this,64,56)}h=f("inherits");var e=f("./hash"),c=f("safe-buffer").Buffer,g=[1518500249,1859775393,-1894007588,-899497514],a=Array(80);h(d,e);d.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};d.prototype._update=function(a){for(var b=this._w,c=this._a|0,
d=this._b|0,e=this._c|0,f=this._d|0,h=this._e|0,k=0;16>k;++k)b[k]=a.readInt32BE(4*k);for(;80>k;++k)a=b[k-3]^b[k-8]^b[k-14]^b[k-16],b[k]=a<<1|a>>>31;for(k=0;80>k;++k){a=~~(k/20);var v=c<<5|c>>>27;var B=0===a?d&e|~d&f:2===a?d&e|d&f|e&f:d^e^f;a=v+B+h+b[k]+g[a]|0;h=f;f=e;e=d<<30|d>>>2;d=c;c=a}this._a=c+this._a|0;this._b=d+this._b|0;this._c=e+this._c|0;this._d=f+this._d|0;this._e=h+this._e|0};d.prototype._hash=function(){var a=c.allocUnsafe(20);a.writeInt32BE(this._a|0,0);a.writeInt32BE(this._b|0,4);a.writeInt32BE(this._c|
0,8);a.writeInt32BE(this._d|0,12);a.writeInt32BE(this._e|0,16);return a};k.exports=d},{"./hash":50,inherits:39,"safe-buffer":42}],54:[function(f,k,h){function d(){this.init();this._w=a;c.call(this,64,56)}h=f("inherits");var e=f("./sha256"),c=f("./hash"),g=f("safe-buffer").Buffer,a=Array(64);h(d,e);d.prototype.init=function(){this._a=3238371032;this._b=914150663;this._c=812702999;this._d=4144912697;this._e=4290775857;this._f=1750603025;this._g=1694076839;this._h=3204075428;return this};d.prototype._hash=
function(){var a=g.allocUnsafe(28);a.writeInt32BE(this._a,0);a.writeInt32BE(this._b,4);a.writeInt32BE(this._c,8);a.writeInt32BE(this._d,12);a.writeInt32BE(this._e,16);a.writeInt32BE(this._f,20);a.writeInt32BE(this._g,24);return a};k.exports=d},{"./hash":50,"./sha256":55,inherits:39,"safe-buffer":42}],55:[function(f,k,h){function d(){this.init();this._w=a;e.call(this,64,56)}h=f("inherits");var e=f("./hash"),c=f("safe-buffer").Buffer,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,
2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,
1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=Array(64);h(d,e);d.prototype.init=function(){this._a=1779033703;this._b=3144134277;this._c=1013904242;this._d=2773480762;this._e=1359893119;this._f=2600822924;this._g=528734635;this._h=1541459225;return this};d.prototype._update=function(a){for(var b=this._w,c=this._a|0,d=this._b|0,e=this._c|0,f=this._d|0,h=this._e|0,k=this._f|0,v=this._g|0,B=this._h|0,z=0;16>z;++z)b[z]=a.readInt32BE(4*
z);for(;64>z;++z){a=b[z-2];var x=b[z-15];b[z]=((a>>>17|a<<15)^(a>>>19|a<<13)^a>>>10)+b[z-7]+((x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3)+b[z-16]|0}for(z=0;64>z;++z)a=B+((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(v^h&(k^v))+g[z]+b[z]|0,x=((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+(c&d|e&(c|d))|0,B=v,v=k,k=h,h=f+a|0,f=e,e=d,d=c,c=a+x|0;this._a=c+this._a|0;this._b=d+this._b|0;this._c=e+this._c|0;this._d=f+this._d|0;this._e=h+this._e|0;this._f=k+this._f|0;this._g=v+this._g|0;this._h=B+this._h|0};d.prototype._hash=
function(){var a=c.allocUnsafe(32);a.writeInt32BE(this._a,0);a.writeInt32BE(this._b,4);a.writeInt32BE(this._c,8);a.writeInt32BE(this._d,12);a.writeInt32BE(this._e,16);a.writeInt32BE(this._f,20);a.writeInt32BE(this._g,24);a.writeInt32BE(this._h,28);return a};k.exports=d},{"./hash":50,inherits:39,"safe-buffer":42}],56:[function(f,k,h){function d(){this.init();this._w=a;c.call(this,128,112)}h=f("inherits");var e=f("./sha512"),c=f("./hash"),g=f("safe-buffer").Buffer,a=Array(160);h(d,e);d.prototype.init=
function(){this._ah=3418070365;this._bh=1654270250;this._ch=2438529370;this._dh=355462360;this._eh=1731405415;this._fh=2394180231;this._gh=3675008525;this._hh=1203062813;this._al=3238371032;this._bl=914150663;this._cl=812702999;this._dl=4144912697;this._el=4290775857;this._fl=1750603025;this._gl=1694076839;this._hl=3204075428;return this};d.prototype._hash=function(){function a(a,b,d){c.writeInt32BE(a,d);c.writeInt32BE(b,d+4)}var c=g.allocUnsafe(48);a(this._ah,this._al,0);a(this._bh,this._bl,8);a(this._ch,
this._cl,16);a(this._dh,this._dl,24);a(this._eh,this._el,32);a(this._fh,this._fl,40);return c};k.exports=d},{"./hash":50,"./sha512":57,inherits:39,"safe-buffer":42}],57:[function(f,k,h){function d(){this.init();this._w=b;c.call(this,128,112)}function e(a,b){return a>>>0<b>>>0?1:0}h=f("inherits");var c=f("./hash"),g=f("safe-buffer").Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,
3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,
338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,
2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,
1607167915,987167468,1816402316,1246189591],b=Array(160);h(d,c);d.prototype.init=function(){this._ah=1779033703;this._bh=3144134277;this._ch=1013904242;this._dh=2773480762;this._eh=1359893119;this._fh=2600822924;this._gh=528734635;this._hh=1541459225;this._al=4089235720;this._bl=2227873595;this._cl=4271175723;this._dl=1595750129;this._el=2917565137;this._fl=725511199;this._gl=4215389547;this._hl=327033209;return this};d.prototype._update=function(b){for(var c=this._w,d=this._ah|0,f=this._bh|0,g=this._ch|
0,h=this._dh|0,k=this._eh|0,m=this._fh|0,B=this._gh|0,z=this._hh|0,x=this._al|0,H=this._bl|0,F=this._cl|0,G=this._dl|0,C=this._el|0,A=this._fl|0,E=this._gl|0,K=this._hl|0,D=0;32>D;D+=2)c[D]=b.readInt32BE(4*D),c[D+1]=b.readInt32BE(4*D+4);for(;160>D;D+=2){b=c[D-30];var I=c[D-30+1],J=(b>>>1|I<<31)^(b>>>8|I<<24)^b>>>7,y=(I>>>1|b<<31)^(I>>>8|b<<24)^(I>>>7|b<<25);b=c[D-4];I=c[D-4+1];var L=(b>>>19|I<<13)^(I>>>29|b<<3)^b>>>6;I=(I>>>19|b<<13)^(b>>>29|I<<3)^(I>>>6|b<<26);var w=c[D-32],M=c[D-32+1];b=y+c[D-14+
1]|0;J=J+c[D-14]+e(b,y)|0;b=b+I|0;J=J+L+e(b,I)|0;b=b+M|0;J=J+w+e(b,M)|0;c[D]=J;c[D+1]=b}for(D=0;160>D;D+=2){J=c[D];b=c[D+1];I=d&f|g&(d|f);var l=x&H|F&(x|H);w=(d>>>28|x<<4)^(x>>>2|d<<30)^(x>>>7|d<<25);M=(x>>>28|d<<4)^(d>>>2|x<<30)^(d>>>7|x<<25);var T=a[D],O=a[D+1],U=B^k&(m^B),P=E^C&(A^E);L=K+((C>>>14|k<<18)^(C>>>18|k<<14)^(k>>>9|C<<23))|0;y=z+((k>>>14|C<<18)^(k>>>18|C<<14)^(C>>>9|k<<23))+e(L,K)|0;L=L+P|0;y=y+U+e(L,P)|0;L=L+O|0;y=y+T+e(L,O)|0;L=L+b|0;y=y+J+e(L,b)|0;b=M+l|0;J=w+I+e(b,M)|0;z=B;K=E;B=
m;E=A;m=k;A=C;C=G+L|0;k=h+y+e(C,G)|0;h=g;G=F;g=f;F=H;f=d;H=x;x=L+b|0;d=y+J+e(x,L)|0}this._al=this._al+x|0;this._bl=this._bl+H|0;this._cl=this._cl+F|0;this._dl=this._dl+G|0;this._el=this._el+C|0;this._fl=this._fl+A|0;this._gl=this._gl+E|0;this._hl=this._hl+K|0;this._ah=this._ah+d+e(this._al,x)|0;this._bh=this._bh+f+e(this._bl,H)|0;this._ch=this._ch+g+e(this._cl,F)|0;this._dh=this._dh+h+e(this._dl,G)|0;this._eh=this._eh+k+e(this._el,C)|0;this._fh=this._fh+m+e(this._fl,A)|0;this._gh=this._gh+B+e(this._gl,
E)|0;this._hh=this._hh+z+e(this._hl,K)|0};d.prototype._hash=function(){function a(a,c,d){b.writeInt32BE(a,d);b.writeInt32BE(c,d+4)}var b=g.allocUnsafe(64);a(this._ah,this._al,0);a(this._bh,this._bl,8);a(this._ch,this._cl,16);a(this._dh,this._dl,24);a(this._eh,this._el,32);a(this._fh,this._fl,40);a(this._gh,this._gl,48);a(this._hh,this._hl,56);return b};k.exports=d},{"./hash":50,inherits:39,"safe-buffer":42}]},{},[30]);