-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbitcoinjs.min.js
1 lines (1 loc) · 312 KB
/
bitcoinjs.min.js
1
!function(e){if(typeof exports==="object"&&typeof module!=="undefined")module.exports=e();else if(typeof define==="function"&&define.amd)define([],e);else{var t;typeof window!=="undefined"?(t=window):typeof global!=="undefined"?(t=global):typeof self!=="undefined"?(t=self):(t=this);t.Bitcoin=e()}}(function(){return(function(){function e(t,n,r){function u(o,f){if(!n[o]){if(!t[o]){var c="function"==typeof require&&require;if(!f&&c)return c(o,!0);if(i)return i(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return u(n||e)},d,d.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)u(r[o]);return u}return e})()({1:[function(e,t,n){"use strict";n.byteLength=d;n.toByteArray=l;n.fromByteArray=h;var r=[],u=[],i=typeof Uint8Array!=='undefined'?Uint8Array:Array,o='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var f=0,c=o.length;f<c;++f)r[f]=o[f],u[o.charCodeAt(f)]=f;u[45]=62;u[95]=63;function a(e){var t=e.length;if(t%4>0){throw new Error('Invalid string. Length must be a multiple of 4')}var n=e.indexOf('=');n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function d(e){var t=a(e),n=t[0],r=t[1];return(n+r)*3/4-r}function s(e,t,n){return(t+n)*3/4-n}function l(e){var t,n=a(e),r=n[0],o=n[1],f=new i(s(e,r,o)),c=0,d=o>0?r-4:r;for(var l=0;l<d;l+=4)t=u[e.charCodeAt(l)]<<18|u[e.charCodeAt(l+1)]<<12|u[e.charCodeAt(l+2)]<<6|u[e.charCodeAt(l+3)],f[c++]=t>>16&255,f[c++]=t>>8&255,f[c++]=t&255;o===2&&(t=u[e.charCodeAt(l)]<<2|u[e.charCodeAt(l+1)]>>4,f[c++]=t&255);o===1&&(t=u[e.charCodeAt(l)]<<10|u[e.charCodeAt(l+1)]<<4|u[e.charCodeAt(l+2)]>>2,f[c++]=t>>8&255,f[c++]=t&255);return f}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[e&63]}function b(e,t,n){var r,u=[];for(var i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),u.push(p(r));return u.join('')}function h(e){var t,n=e.length,u=n%3,i=[],o=16383;for(var f=0,c=n-u;f<c;f+=o)i.push(b(e,f,f+o>c?c:f+o));u===1?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+'==')):u===2&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+'='));return i.join('')}},{}],2:[function(e,t,n){},{}],3:[function(e,t,n){(function(t){"use strict";var r=e('base64-js'),u=e('ieee754');n.Buffer=t;n.SlowBuffer=g;n.INSPECT_MAX_BYTES=50;var i=2147483647;n.kMaxLength=i;t.TYPED_ARRAY_SUPPORT=o();!t.TYPED_ARRAY_SUPPORT&&typeof console!=='undefined'&&typeof console.error==='function'&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var e=new Uint8Array(1);e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return e.foo()===42}catch(e){return!1}}Object.defineProperty(t.prototype,'parent',{enumerable:!0,get:function(){if(!t.isBuffer(this))return void 0;return this.buffer}});Object.defineProperty(t.prototype,'offset',{enumerable:!0,get:function(){if(!t.isBuffer(this))return void 0;return this.byteOffset}});function f(e){if(e>i){throw new RangeError('The value "'+e+'" is invalid for option "size"')}var n=new Uint8Array(e);n.__proto__=t.prototype;return n}function t(e,t,n){if(typeof e==='number'){if(typeof t==='string'){throw new TypeError('The "string" argument must be of type string. Received type number')}return s(e)}return c(e,t,n)}typeof Symbol!=='undefined'&&Symbol.species!=null&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1});t.poolSize=8192;function c(e,n,r){if(typeof e==='string'){return l(e,n)}if(ArrayBuffer.isView(e)){return p(e)}if(e==null){throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer)){return b(e,n,r)}if(typeof e==='number'){throw new TypeError('The "value" argument must not be of type number. Received type number')}var u=e.valueOf&&e.valueOf();if(u!=null&&u!==e){return t.from(u,n,r)}var i=h(e);if(i)return i;if(typeof Symbol!=='undefined'&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==='function'){return t.from(e[Symbol.toPrimitive]('string'),n,r)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}t.from=function(e,t,n){return c(e,t,n)};t.prototype.__proto__=Uint8Array.prototype;t.__proto__=Uint8Array;function a(e){if(typeof e!=='number'){throw new TypeError('"size" argument must be of type number')}else if(e<0){throw new RangeError('The value "'+e+'" is invalid for option "size"')}}function d(e,t,n){a(e);if(e<=0){return f(e)}if(t!==void 0){return typeof n==='string'?f(e).fill(t,n):f(e).fill(t)}return f(e)}t.alloc=function(e,t,n){return d(e,t,n)};function s(e){a(e);return f(e<0?0:m(e)|0)}t.allocUnsafe=function(e){return s(e)};t.allocUnsafeSlow=function(e){return s(e)};function l(e,n){(typeof n!=='string'||n==='')&&(n='utf8');if(!t.isEncoding(n)){throw new TypeError('Unknown encoding: '+n)}var r=y(e,n)|0,u=f(r),i=u.write(e,n);i!==r&&(u=u.slice(0,i));return u}function p(e){var t=e.length<0?0:m(e.length)|0,n=f(t);for(var r=0;r<t;r+=1)n[r]=e[r]&255;return n}function b(e,n,r){if(n<0||e.byteLength<n){throw new RangeError('"offset" is outside of buffer bounds')}if(e.byteLength<n+(r||0)){throw new RangeError('"length" is outside of buffer bounds')}var u;n===void 0&&r===void 0?(u=new Uint8Array(e)):r===void 0?(u=new Uint8Array(e,n)):(u=new Uint8Array(e,n,r));u.__proto__=t.prototype;return u}function h(e){if(t.isBuffer(e)){var n=m(e.length)|0,r=f(n);if(r.length===0){return r}e.copy(r,0,0,n);return r}if(e.length!==void 0){if(typeof e.length!=='number'||Z(e.length)){return f(0)}return p(e)}if(e.type==='Buffer'&&Array.isArray(e.data)){return p(e.data)}}function m(e){if(e>=i){throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+' bytes')}return e|0}function g(e){+e!=e&&(e=0);return t.alloc(+e)}t.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==t.prototype};t.compare=function(e,n){Y(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength));Y(n,Uint8Array)&&(n=t.from(n,n.offset,n.byteLength));if(!t.isBuffer(e)||!t.isBuffer(n)){throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array')}if(e===n)return 0;var r=e.length,u=n.length;for(var i=0,o=Math.min(r,u);i<o;++i){if(e[i]!==n[i]){r=e[i];u=n[i];break}}if(r<u)return-1;if(u<r)return 1;return 0};t.isEncoding=function(e){switch(String(e).toLowerCase()){case 'hex':;case 'utf8':;case 'utf-8':;case 'ascii':;case 'latin1':;case 'binary':;case 'base64':;case 'ucs2':;case 'ucs-2':;case 'utf16le':;case 'utf-16le':return!0;default:return!1}};t.concat=function(e,n){if(!Array.isArray(e)){throw new TypeError('"list" argument must be an Array of Buffers')}if(e.length===0){return t.alloc(0)}var r;if(n===void 0){n=0;for(r=0;r<e.length;++r)n+=e[r].length}var u=t.allocUnsafe(n),i=0;for(r=0;r<e.length;++r){var o=e[r];Y(o,Uint8Array)&&(o=t.from(o));if(!t.isBuffer(o)){throw new TypeError('"list" argument must be an Array of Buffers')}o.copy(u,i);i+=o.length}return u};function y(e,n){if(t.isBuffer(e)){return e.length}if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer)){return e.byteLength}if(typeof e!=='string'){throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type "+typeof e)}var r=e.length,u=arguments.length>2&&arguments[2]===!0;if(!u&&r===0)return 0;var i=!1;for(;;){switch(n){case 'ascii':;case 'latin1':;case 'binary':return r;case 'utf8':;case 'utf-8':return F(e).length;case 'ucs2':;case 'ucs-2':;case 'utf16le':;case 'utf-16le':return r*2;case 'hex':return r>>>1;case 'base64':return X(e).length;default:if(i){return u?-1:F(e).length};n=(''+n).toLowerCase();i=!0}}}t.byteLength=y;function w(e,t,n){var r=!1;(t===void 0||t<0)&&(t=0);if(t>this.length){return''}(n===void 0||n>this.length)&&(n=this.length);if(n<=0){return''}n>>>=0;t>>>=0;if(n<=t){return''}e||(e='utf8');while(!0){switch(e){case 'hex':return R(this,t,n);case 'utf8':;case 'utf-8':return M(this,t,n);case 'ascii':return L(this,t,n);case 'latin1':;case 'binary':return T(this,t,n);case 'base64':return E(this,t,n);case 'ucs2':;case 'ucs-2':;case 'utf16le':;case 'utf-16le':return U(this,t,n);default:if(r)throw new TypeError('Unknown encoding: '+e);e=(e+'').toLowerCase();r=!0}}}t.prototype._isBuffer=!0;function _(e,t,n){var r=e[t];e[t]=e[n];e[n]=r}t.prototype.swap16=function(){var e=this.length;if(e%2!==0){throw new RangeError('Buffer size must be a multiple of 16-bits')}for(var t=0;t<e;t+=2)_(this,t,t+1);return this};t.prototype.swap32=function(){var e=this.length;if(e%4!==0){throw new RangeError('Buffer size must be a multiple of 32-bits')}for(var t=0;t<e;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this};t.prototype.swap64=function(){var e=this.length;if(e%8!==0){throw new RangeError('Buffer size must be a multiple of 64-bits')}for(var t=0;t<e;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this};t.prototype.toString=function(){var e=this.length;if(e===0)return'';if(arguments.length===0)return M(this,0,e);return w.apply(this,arguments)};t.prototype.toLocaleString=t.prototype.toString;t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError('Argument must be a Buffer');if(this===e)return!0;return t.compare(this,e)===0};t.prototype.inspect=function(){var e='',t=n.INSPECT_MAX_BYTES;e=this.toString('hex',0,t).replace(/(.{2})/g,'$1 ').trim();this.length>t&&(e+=' ... ');return'<Buffer '+e+'>'};t.prototype.compare=function(e,n,r,u,i){Y(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength));if(!t.isBuffer(e)){throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type "+typeof e)}n===void 0&&(n=0);r===void 0&&(r=e?e.length:0);u===void 0&&(u=0);i===void 0&&(i=this.length);if(n<0||r>e.length||u<0||i>this.length){throw new RangeError('out of range index')}if(u>=i&&n>=r){return 0}if(u>=i){return-1}if(n>=r){return 1}n>>>=0;r>>>=0;u>>>=0;i>>>=0;if(this===e)return 0;var o=i-u,f=r-n,c=Math.min(o,f),a=this.slice(u,i),d=e.slice(n,r);for(var s=0;s<c;++s){if(a[s]!==d[s]){o=a[s];f=d[s];break}}if(o<f)return-1;if(f<o)return 1;return 0};function S(e,n,r,u,i){if(e.length===0)return-1;typeof r==='string'?(u=r,r=0):r>2147483647?(r=2147483647):r<-2147483648&&(r=-2147483648);r=+r;Z(r)&&(r=i?0:e.length-1);r<0&&(r=e.length+r);if(r>=e.length){if(i)return-1;else r=e.length-1}else if(r<0){if(i)r=0;else return-1}typeof n==='string'&&(n=t.from(n,u));if(t.isBuffer(n)){if(n.length===0){return-1}return v(e,n,r,u,i)}else if(typeof n==='number'){n&=255;if(typeof Uint8Array.prototype.indexOf==='function'){if(i){return Uint8Array.prototype.indexOf.call(e,n,r)}else{return Uint8Array.prototype.lastIndexOf.call(e,n,r)}}return v(e,[n],r,u,i)}throw new TypeError('val must be string, number or Buffer')}function v(e,t,n,r,u){var i=1,o=e.length,f=t.length;if(r!==void 0){r=String(r).toLowerCase();if(r==='ucs2'||r==='ucs-2'||r==='utf16le'||r==='utf-16le'){if(e.length<2||t.length<2){return-1}i=2;o/=2;f/=2;n/=2}}function c(e,t){if(i===1){return e[t]}else{return e.readUInt16BE(t*i)}}var a;if(u){var d=-1;for(a=n;a<o;a++){if(c(e,a)===c(t,d===-1?0:a-d)){d===-1&&(d=a);if(a-d+1===f)return d*i}else d!==-1&&(a-=a-d),d=-1}}else{n+f>o&&(n=o-f);for(a=n;a>=0;a--){var s=!0;for(var l=0;l<f;l++){if(c(e,a+l)!==c(t,l)){s=!1;break}}if(s)return a}}return-1}t.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};t.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)};t.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)};function k(e,t,n,r){n=Number(n)||0;var u=e.length-n;r?(r=Number(r),r>u&&(r=u)):(r=u);var i=t.length;r>i/2&&(r=i/2);for(var o=0;o<r;++o){var f=parseInt(t.substr(o*2,2),16);if(Z(f))return o;e[n+o]=f}return o}function I(e,t,n,r){return G(F(t,e.length-n),e,n,r)}function P(e,t,n,r){return G(J(t),e,n,r)}function x(e,t,n,r){return P(e,t,n,r)}function A(e,t,n,r){return G(X(t),e,n,r)}function O(e,t,n,r){return G(V(t,e.length-n),e,n,r)}t.prototype.write=function(e,t,n,r){if(t===void 0)r='utf8',n=this.length,t=0;else if(n===void 0&&typeof t==='string')r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r='utf8')):(r=n,n=void 0);else{throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported')}var u=this.length-t;(n===void 0||n>u)&&(n=u);if(e.length>0&&(n<0||t<0)||t>this.length){throw new RangeError('Attempt to write outside buffer bounds')}r||(r='utf8');var i=!1;for(;;){switch(r){case 'hex':return k(this,e,t,n);case 'utf8':;case 'utf-8':return I(this,e,t,n);case 'ascii':return P(this,e,t,n);case 'latin1':;case 'binary':return x(this,e,t,n);case 'base64':return A(this,e,t,n);case 'ucs2':;case 'ucs-2':;case 'utf16le':;case 'utf-16le':return O(this,e,t,n);default:if(i)throw new TypeError('Unknown encoding: '+r);r=(''+r).toLowerCase();i=!0}}};t.prototype.toJSON=function(){return{type:'Buffer',data:Array.prototype.slice.call(this._arr||this,0)}};function E(e,t,n){if(t===0&&n===e.length){return r.fromByteArray(e)}else{return r.fromByteArray(e.slice(t,n))}}function M(e,t,n){n=Math.min(e.length,n);var r=[],u=t;while(u<n){var i=e[u],o=null,f=i>239?4:i>223?3:i>191?2:1;if(u+f<=n){var c,a,d,s;switch(f){case 1:i<128&&(o=i);break;case 2:c=e[u+1];(c&192)===128&&(s=(i&31)<<6|c&63,s>127&&(o=s));break;case 3:c=e[u+1];a=e[u+2];(c&192)===128&&(a&192)===128&&(s=(i&15)<<12|(c&63)<<6|a&63,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:c=e[u+1];a=e[u+2];d=e[u+3];(c&192)===128&&(a&192)===128&&(d&192)===128&&(s=(i&15)<<18|(c&63)<<12|(a&63)<<6|d&63,s>65535&&s<1114112&&(o=s))}}o===null?(o=65533,f=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|o&1023);r.push(o);u+=f}return N(r)}var B=4096;function N(e){var t=e.length;if(t<=B){return String.fromCharCode.apply(String,e)}var n='',r=0;while(r<t)n+=String.fromCharCode.apply(String,e.slice(r,r+=B));return n}function L(e,t,n){var r='';n=Math.min(e.length,n);for(var u=t;u<n;++u)r+=String.fromCharCode(e[u]&127);return r}function T(e,t,n){var r='';n=Math.min(e.length,n);for(var u=t;u<n;++u)r+=String.fromCharCode(e[u]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0);(!n||n<0||n>r)&&(n=r);var u='';for(var i=t;i<n;++i)u+=K(e[i]);return u}function U(e,t,n){var r=e.slice(t,n),u='';for(var i=0;i<r.length;i+=2)u+=String.fromCharCode(r[i]+r[i+1]*256);return u}t.prototype.slice=function(e,n){var r=this.length;e=~~e;n=n===void 0?r:~~n;e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r);n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r);n<e&&(n=e);var u=this.subarray(e,n);u.__proto__=t.prototype;return u};function q(e,t,n){if(e%1!==0||e<0)throw new RangeError('offset is not uint');if(e+t>n)throw new RangeError('Trying to access beyond buffer length')}t.prototype.readUIntLE=function(e,t,n){e>>>=0;t>>>=0;n||q(e,t,this.length);var r=this[e],u=1,i=0;while(++i<t&&(u*=256))r+=this[e+i]*u;return r};t.prototype.readUIntBE=function(e,t,n){e>>>=0;t>>>=0;n||q(e,t,this.length);var r=this[e+--t],u=1;while(t>0&&(u*=256))r+=this[e+--t]*u;return r};t.prototype.readUInt8=function(e,t){e>>>=0;t||q(e,1,this.length);return this[e]};t.prototype.readUInt16LE=function(e,t){e>>>=0;t||q(e,2,this.length);return this[e]|this[e+1]<<8};t.prototype.readUInt16BE=function(e,t){e>>>=0;t||q(e,2,this.length);return this[e]<<8|this[e+1]};t.prototype.readUInt32LE=function(e,t){e>>>=0;t||q(e,4,this.length);return(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};t.prototype.readUInt32BE=function(e,t){e>>>=0;t||q(e,4,this.length);return this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};t.prototype.readIntLE=function(e,t,n){e>>>=0;t>>>=0;n||q(e,t,this.length);var r=this[e],u=1,i=0;while(++i<t&&(u*=256))r+=this[e+i]*u;u*=128;r>=u&&(r-=Math.pow(2,8*t));return r};t.prototype.readIntBE=function(e,t,n){e>>>=0;t>>>=0;n||q(e,t,this.length);var r=t,u=1,i=this[e+--r];while(r>0&&(u*=256))i+=this[e+--r]*u;u*=128;i>=u&&(i-=Math.pow(2,8*t));return i};t.prototype.readInt8=function(e,t){e>>>=0;t||q(e,1,this.length);if(!(this[e]&128))return this[e];return(255-this[e]+1)*-1};t.prototype.readInt16LE=function(e,t){e>>>=0;t||q(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};t.prototype.readInt16BE=function(e,t){e>>>=0;t||q(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};t.prototype.readInt32LE=function(e,t){e>>>=0;t||q(e,4,this.length);return this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};t.prototype.readInt32BE=function(e,t){e>>>=0;t||q(e,4,this.length);return this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};t.prototype.readFloatLE=function(e,t){e>>>=0;t||q(e,4,this.length);return u.read(this,e,!0,23,4)};t.prototype.readFloatBE=function(e,t){e>>>=0;t||q(e,4,this.length);return u.read(this,e,!1,23,4)};t.prototype.readDoubleLE=function(e,t){e>>>=0;t||q(e,8,this.length);return u.read(this,e,!0,52,8)};t.prototype.readDoubleBE=function(e,t){e>>>=0;t||q(e,8,this.length);return u.read(this,e,!1,52,8)};function C(e,n,r,u,i,o){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>i||n<o)throw new RangeError('"value" argument is out of bounds');if(r+u>e.length)throw new RangeError('Index out of range')}t.prototype.writeUIntLE=function(e,t,n,r){e=+e;t>>>=0;n>>>=0;if(!r){var u=Math.pow(2,8*n)-1;C(this,e,t,n,u,0)}var i=1,o=0;this[t]=e&255;while(++o<n&&(i*=256))this[t+o]=e/i&255;return t+n};t.prototype.writeUIntBE=function(e,t,n,r){e=+e;t>>>=0;n>>>=0;if(!r){var u=Math.pow(2,8*n)-1;C(this,e,t,n,u,0)}var i=n-1,o=1;this[t+i]=e&255;while(--i>=0&&(o*=256))this[t+i]=e/o&255;return t+n};t.prototype.writeUInt8=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,1,255,0);this[t]=e&255;return t+1};t.prototype.writeUInt16LE=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,2,65535,0);this[t]=e&255;this[t+1]=e>>>8;return t+2};t.prototype.writeUInt16BE=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,2,65535,0);this[t]=e>>>8;this[t+1]=e&255;return t+2};t.prototype.writeUInt32LE=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,4,4294967295,0);this[t+3]=e>>>24;this[t+2]=e>>>16;this[t+1]=e>>>8;this[t]=e&255;return t+4};t.prototype.writeUInt32BE=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,4,4294967295,0);this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=e&255;return t+4};t.prototype.writeIntLE=function(e,t,n,r){e=+e;t>>>=0;if(!r){var u=Math.pow(2,8*n-1);C(this,e,t,n,u-1,-u)}var i=0,o=1,f=0;this[t]=e&255;while(++i<n&&(o*=256))e<0&&f===0&&this[t+i-1]!==0&&(f=1),this[t+i]=(e/o>>0)-f&255;return t+n};t.prototype.writeIntBE=function(e,t,n,r){e=+e;t>>>=0;if(!r){var u=Math.pow(2,8*n-1);C(this,e,t,n,u-1,-u)}var i=n-1,o=1,f=0;this[t+i]=e&255;while(--i>=0&&(o*=256))e<0&&f===0&&this[t+i+1]!==0&&(f=1),this[t+i]=(e/o>>0)-f&255;return t+n};t.prototype.writeInt8=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,1,127,-128);e<0&&(e=255+e+1);this[t]=e&255;return t+1};t.prototype.writeInt16LE=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,2,32767,-32768);this[t]=e&255;this[t+1]=e>>>8;return t+2};t.prototype.writeInt16BE=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,2,32767,-32768);this[t]=e>>>8;this[t+1]=e&255;return t+2};t.prototype.writeInt32LE=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,4,2147483647,-2147483648);this[t]=e&255;this[t+1]=e>>>8;this[t+2]=e>>>16;this[t+3]=e>>>24;return t+4};t.prototype.writeInt32BE=function(e,t,n){e=+e;t>>>=0;n||C(this,e,t,4,2147483647,-2147483648);e<0&&(e=4294967295+e+1);this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=e&255;return t+4};function H(e,t,n,r,u,i){if(n+r>e.length)throw new RangeError('Index out of range');if(n<0)throw new RangeError('Index out of range')}function j(e,t,n,r,i){t=+t;n>>>=0;i||H(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38);u.write(e,t,n,r,23,4);return n+4}t.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)};t.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)};function z(e,t,n,r,i){t=+t;n>>>=0;i||H(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308);u.write(e,t,n,r,52,8);return n+8}t.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)};t.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)};t.prototype.copy=function(e,n,r,u){if(!t.isBuffer(e))throw new TypeError('argument should be a Buffer');r||(r=0);!u&&u!==0&&(u=this.length);n>=e.length&&(n=e.length);n||(n=0);u>0&&u<r&&(u=r);if(u===r)return 0;if(e.length===0||this.length===0)return 0;if(n<0){throw new RangeError('targetStart out of bounds')}if(r<0||r>=this.length)throw new RangeError('Index out of range');if(u<0)throw new RangeError('sourceEnd out of bounds');u>this.length&&(u=this.length);e.length-n<u-r&&(u=e.length-n+r);var i=u-r;if(this===e&&typeof Uint8Array.prototype.copyWithin==='function')this.copyWithin(n,r,u);else if(this===e&&r<n&&n<u){for(var o=i-1;o>=0;--o)e[o+n]=this[o+r]}else Uint8Array.prototype.set.call(e,this.subarray(r,u),n);return i};t.prototype.fill=function(e,n,r,u){if(typeof e==='string'){typeof n==='string'?(u=n,n=0,r=this.length):typeof r==='string'&&(u=r,r=this.length);if(u!==void 0&&typeof u!=='string'){throw new TypeError('encoding must be a string')}if(typeof u==='string'&&!t.isEncoding(u)){throw new TypeError('Unknown encoding: '+u)}if(e.length===1){var i=e.charCodeAt(0);(u==='utf8'&&i<128||u==='latin1')&&(e=i)}}else typeof e==='number'&&(e&=255);if(n<0||this.length<n||this.length<r){throw new RangeError('Out of range index')}if(r<=n){return this}n>>>=0;r=r===void 0?this.length:r>>>0;e||(e=0);var o;if(typeof e==='number'){for(o=n;o<r;++o)this[o]=e}else{var f=t.isBuffer(e)?e:t.from(e,u),c=f.length;if(c===0){throw new TypeError('The value "'+e+'" is invalid for argument "value"')}for(o=0;o<r-n;++o)this[o+n]=f[o%c]}return this};var D=/[^+/0-9A-Za-z-_]/g;function W(e){e=e.split('=')[0];e=e.trim().replace(D,'');if(e.length<2)return'';while(e.length%4!==0)e+='=';return e}function K(e){if(e<16)return'0'+e.toString(16);return e.toString(16)}function F(e,t){t=t||1/0;var n,r=e.length,u=null,i=[];for(var o=0;o<r;++o){n=e.charCodeAt(o);if(n>55295&&n<57344){if(!u){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&i.push(239,191,189);continue}u=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189);u=n;continue}n=(u-55296<<10|n-56320)+65536}else u&&((t-=3)>-1&&i.push(239,191,189));u=null;if(n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else{throw new Error('Invalid code point')}}return i}function J(e){var t=[];for(var n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function V(e,t){var n,r,u,i=[];for(var o=0;o<e.length;++o){if((t-=2)<0)break;n=e.charCodeAt(o);r=n>>8;u=n%256;i.push(u);i.push(r)}return i}function X(e){return r.toByteArray(W(e))}function G(e,t,n,r){for(var u=0;u<r;++u){if(u+n>=t.length||u>=e.length)break;t[u+n]=e[u]}return u}function Y(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Z(e){return e!==e}}).call(this,e("buffer").Buffer)},{"base64-js":1,"buffer":3,"ieee754":6}],4:[function(e,t,n){(function(e){function t(e){if(Array.isArray){return Array.isArray(e)}return m(e)==='[object Array]'}n.isArray=t;function r(e){return typeof e==='boolean'}n.isBoolean=r;function u(e){return e===null}n.isNull=u;function i(e){return e==null}n.isNullOrUndefined=i;function o(e){return typeof e==='number'}n.isNumber=o;function f(e){return typeof e==='string'}n.isString=f;function c(e){return typeof e==='symbol'}n.isSymbol=c;function a(e){return e===void 0}n.isUndefined=a;function d(e){return m(e)==='[object RegExp]'}n.isRegExp=d;function s(e){return typeof e==='object'&&e!==null}n.isObject=s;function l(e){return m(e)==='[object Date]'}n.isDate=l;function p(e){return m(e)==='[object Error]'||e instanceof Error}n.isError=p;function b(e){return typeof e==='function'}n.isFunction=b;function h(e){return e===null||typeof e==='boolean'||typeof e==='number'||typeof e==='string'||typeof e==='symbol'||typeof e==='undefined'}n.isPrimitive=h;n.isBuffer=e.isBuffer;function m(e){return Object.prototype.toString.call(e)}}).call(this,{"isBuffer":e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":8}],5:[function(e,t,n){var r=Object.create||I,u=Object.keys||P,i=Function.prototype.bind||x;function o(){(!this._events||!Object.prototype.hasOwnProperty.call(this,'_events'))&&(this._events=r(null),this._eventsCount=0);this._maxListeners=this._maxListeners||void 0}t.exports=o;o.EventEmitter=o;o.prototype._events=void 0;o.prototype._maxListeners=void 0;var f=10,c;try{var a={};Object.defineProperty&&Object.defineProperty(a,'x',{value:0});c=a.x===0}catch(e){c=!1};c?Object.defineProperty(o,'defaultMaxListeners',{enumerable:!0,get:function(){return f},set:function(e){if(typeof e!=='number'||e<0||e!==e)throw new TypeError('"defaultMaxListeners" must be a positive number');f=e}}):(o.defaultMaxListeners=f);o.prototype.setMaxListeners=function(e){if(typeof e!=='number'||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');this._maxListeners=e;return this};function d(e){if(e._maxListeners===void 0)return o.defaultMaxListeners;return e._maxListeners}o.prototype.getMaxListeners=function(){return d(this)};function s(e,t,n){if(t)e.call(n);else{var r=e.length,u=v(e,r);for(var i=0;i<r;++i)u[i].call(n)}}function l(e,t,n,r){if(t)e.call(n,r);else{var u=e.length,i=v(e,u);for(var o=0;o<u;++o)i[o].call(n,r)}}function p(e,t,n,r,u){if(t)e.call(n,r,u);else{var i=e.length,o=v(e,i);for(var f=0;f<i;++f)o[f].call(n,r,u)}}function b(e,t,n,r,u,i){if(t)e.call(n,r,u,i);else{var o=e.length,f=v(e,o);for(var c=0;c<o;++c)f[c].call(n,r,u,i)}}function h(e,t,n,r){if(t)e.apply(n,r);else{var u=e.length,i=v(e,u);for(var o=0;o<u;++o)i[o].apply(n,r)}}o.prototype.emit=function(e){var t,n,r,u,i,o,f=e==='error';o=this._events;if(o)f=f&&o.error==null;else if(!f)return!1;if(f){arguments.length>1&&(t=arguments[1]);if(t instanceof Error){throw t}else{var c=new Error('Unhandled "error" event. ('+t+')');c.context=t;throw c}return!1}n=o[e];if(!n)return!1;var a=typeof n==='function';r=arguments.length;switch(r){case 1:s(n,a,this);break;case 2:l(n,a,this,arguments[1]);break;case 3:p(n,a,this,arguments[1],arguments[2]);break;case 4:b(n,a,this,arguments[1],arguments[2],arguments[3]);break;default:u=new Array(r-1);for(i=1;i<r;i++)u[i-1]=arguments[i];h(n,a,this,u)}return!0};function m(e,t,n,u){var i,o,f;if(typeof n!=='function')throw new TypeError('"listener" argument must be a function');o=e._events;o?(o.newListener&&(e.emit('newListener',t,n.listener?n.listener:n),o=e._events),f=o[t]):(o=e._events=r(null),e._eventsCount=0);if(!f)f=o[t]=n,++e._eventsCount;else{typeof f==='function'?(f=o[t]=u?[n,f]:[f,n]):(u?f.unshift(n):f.push(n));if(!f.warned){i=d(e);if(i&&i>0&&f.length>i){f.warned=!0;var c=new Error('Possible EventEmitter memory leak detected. '+f.length+' "'+String(t)+'" listeners '+'added. Use emitter.setMaxListeners() to '+'increase limit.');c.name='MaxListenersExceededWarning';c.emitter=e;c.type=t;c.count=f.length;typeof console==='object'&&console.warn&&console.warn('%s: %s',c.name,c.message)}}}return e}o.prototype.addListener=function(e,t){return m(this,e,t,!1)};o.prototype.on=o.prototype.addListener;o.prototype.prependListener=function(e,t){return m(this,e,t,!0)};function g(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=!0;switch(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:var t=new Array(arguments.length);for(var e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}}function y(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},u=i.call(g,r);u.listener=n;r.wrapFn=u;return u}o.prototype.once=function(e,t){if(typeof t!=='function')throw new TypeError('"listener" argument must be a function');this.on(e,y(this,e,t));return this};o.prototype.prependOnceListener=function(e,t){if(typeof t!=='function')throw new TypeError('"listener" argument must be a function');this.prependListener(e,y(this,e,t));return this};o.prototype.removeListener=function(e,t){var n,u,i,o,f;if(typeof t!=='function')throw new TypeError('"listener" argument must be a function');u=this._events;if(!u)return this;n=u[e];if(!n)return this;if(n===t||n.listener===t)--this._eventsCount===0?(this._events=r(null)):(delete u[e],u.removeListener&&this.emit('removeListener',e,n.listener||t));else if(typeof n!=='function'){i=-1;for(o=n.length-1;o>=0;o--){if(n[o]===t||n[o].listener===t){f=n[o].listener;i=o;break}}if(i<0)return this;i===0?n.shift():S(n,i);n.length===1&&(u[e]=n[0]);u.removeListener&&this.emit('removeListener',e,f||t)}return this};o.prototype.removeAllListeners=function(e){var t,n,i;n=this._events;if(!n)return this;if(!n.removeListener){arguments.length===0?(this._events=r(null),this._eventsCount=0):n[e]&&(--this._eventsCount===0?(this._events=r(null)):delete n[e]);return this}if(arguments.length===0){var o=u(n),f;for(i=0;i<o.length;++i){f=o[i];if(f==='removeListener')continue;this.removeAllListeners(f)}this.removeAllListeners('removeListener');this._events=r(null);this._eventsCount=0;return this}t=n[e];if(typeof t==='function')this.removeListener(e,t);else if(t){for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i])}return this};function w(e,t,n){var r=e._events;if(!r)return[];var u=r[t];if(!u)return[];if(typeof u==='function')return n?[u.listener||u]:[u];return n?k(u):v(u,u.length)}o.prototype.listeners=function(e){return w(this,e,!0)};o.prototype.rawListeners=function(e){return w(this,e,!1)};o.listenerCount=function(e,t){if(typeof e.listenerCount==='function'){return e.listenerCount(t)}else{return _.call(e,t)}};o.prototype.listenerCount=_;function _(e){var t=this._events;if(t){var n=t[e];if(typeof n==='function'){return 1}else if(n){return n.length}}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function S(e,t){for(var n=t,r=n+1,u=e.length;r<u;n+=1, r+=1)e[n]=e[r];e.pop()}function v(e,t){var n=new Array(t);for(var r=0;r<t;++r)n[r]=e[r];return n}function k(e){var t=new Array(e.length);for(var n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function I(e){var t=function(){};t.prototype=e;return new t}function P(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return n}function x(e){var t=this;return function(){return t.apply(e,arguments)}}},{}],6:[function(e,t,n){n.read=function(e,t,n,r,u){var i,o,f=u*8-r-1,c=(1<<f)-1,a=c>>1,d=-7,s=n?u-1:0,l=n?-1:1,p=e[t+s];s+=l;i=p&(1<<-d)-1;p>>=-d;d+=f;for(;d>0;i=i*256+e[t+s], s+=l, d-=8);;o=i&(1<<-d)-1;i>>=-d;d+=r;for(;d>0;o=o*256+e[t+s], s+=l, d-=8);;if(i===0)i=1-a;else if(i===c){return o?NaN:(p?-1:1)*1/0}else o+=Math.pow(2,r),i-=a;return(p?-1:1)*o*Math.pow(2,i-r)};n.write=function(e,t,n,r,u,i){var o,f,c,a=i*8-u-1,d=(1<<a)-1,s=d>>1,l=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,b=r?1:-1,h=t<0||t===0&&1/t<0?1:0;t=Math.abs(t);isNaN(t)||t===1/0?(f=isNaN(t)?1:0,o=d):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+s>=1?(t+=l/c):(t+=l*Math.pow(2,1-s)),t*c>=2&&(o++,c/=2),o+s>=d?(f=0,o=d):o+s>=1?(f=(t*c-1)*Math.pow(2,u),o+=s):(f=t*Math.pow(2,s-1)*Math.pow(2,u),o=0));for(;u>=8;e[n+p]=f&255, p+=b, f/=256, u-=8);;o=o<<u|f;a+=u;for(;a>0;e[n+p]=o&255, p+=b, o/=256, a-=8);;e[n+p-b]|=h*128}},{}],7:[function(e,t,n){typeof Object.create==='function'?(t.exports=function(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}):(t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype;e.prototype=new n;e.prototype.constructor=e})},{}],8:[function(e,t,n){t.exports=function(e){return e!=null&&(r(e)||u(e)||!!e._isBuffer)};function r(e){return!!e.constructor&&typeof e.constructor.isBuffer==='function'&&e.constructor.isBuffer(e)}function u(e){return typeof e.readFloatLE==='function'&&typeof e.slice==='function'&&r(e.slice(0,0))}},{}],9:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return r.call(e)=='[object Array]'}},{}],10:[function(e,t,n){(function(e){"use strict";!e.version||e.version.indexOf('v0.')===0||e.version.indexOf('v1.')===0&&e.version.indexOf('v1.8.')!==0?(t.exports={nextTick:n}):(t.exports=e);function n(t,n,r,u){if(typeof t!=='function'){throw new TypeError('"callback" argument must be a function')}var i=arguments.length,o,f;switch(i){case 0:;case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,r)});case 4:return e.nextTick(function(){t.call(null,n,r,u)});default:o=new Array(i-1);f=0;while(f<o.length)o[f++]=arguments[f];return e.nextTick(function(){t.apply(null,o)})}}}).call(this,e('_process'))},{"_process":11}],11:[function(e,t,n){var r=t.exports={},u,i;function o(){throw new Error('setTimeout has not been defined')}function f(){throw new Error('clearTimeout has not been defined')}!function(){try{typeof setTimeout==='function'?(u=setTimeout):(u=o)}catch(e){u=o};try{typeof clearTimeout==='function'?(i=clearTimeout):(i=f)}catch(e){i=f}}();function c(e){if(u===setTimeout){return setTimeout(e,0)}if((u===o||!u)&&setTimeout){u=setTimeout;return setTimeout(e,0)}try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function a(e){if(i===clearTimeout){return clearTimeout(e)}if((i===f||!i)&&clearTimeout){i=clearTimeout;return clearTimeout(e)}try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}var d=[],s=!1,l,p=-1;function b(){if(!s||!l){return}s=!1;l.length?(d=l.concat(d)):(p=-1);d.length&&h()}function h(){if(s){return}var e=c(b);s=!0;var t=d.length;while(t){l=d;d=[];while(++p<t)l&&l[p].run();p=-1;t=d.length}l=null;s=!1;a(e)}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n]}d.push(new m(e,t));d.length===1&&!s&&c(h)};function m(e,t){this.fun=e;this.array=t}m.prototype.run=function(){this.fun.apply(null,this.array)};r.title='browser';r.browser=!0;r.env={};r.argv=[];r.version='';r.versions={};function g(){}r.on=g;r.addListener=g;r.once=g;r.off=g;r.removeListener=g;r.removeAllListeners=g;r.emit=g;r.prependListener=g;r.prependOnceListener=g;r.listeners=function(e){return[]};r.binding=function(e){throw new Error('process.binding is not supported')};r.cwd=function(){return'/'};r.chdir=function(e){throw new Error('process.chdir is not supported')};r.umask=function(){return 0}},{}],12:[function(e,t,n){t.exports=e('./lib/_stream_duplex.js')},{"./lib/_stream_duplex.js":13}],13:[function(e,t,n){"use strict";var r=e('process-nextick-args'),u=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=s;var i=e('core-util-is');i.inherits=e('inherits');var o=e('./_stream_readable'),f=e('./_stream_writable');i.inherits(s,o);function s(e){if(!(this instanceof s))return new s(e);o.call(this,e);f.call(this,e);e&&e.readable===!1&&(this.readable=!1);e&&e.writable===!1&&(this.writable=!1);this.allowHalfOpen=!0;e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1);this.once('end',l)}Object.defineProperty(s.prototype,'writableHighWaterMark',{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l(){if(this.allowHalfOpen||this._writableState.ended)return;r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(s.prototype,'destroyed',{get:function(){if(this._readableState===void 0||this._writableState===void 0){return!1}return this._readableState.destroyed&&this._writableState.destroyed},set:function(e){if(this._readableState===void 0||this._writableState===void 0){return}this._readableState.destroyed=e;this._writableState.destroyed=e}});s.prototype._destroy=function(e,t){this.push(null);this.end();r.nextTick(t,e)}},{"./_stream_readable":15,"./_stream_writable":17,"core-util-is":4,"inherits":7,"process-nextick-args":10}],14:[function(e,t,n){"use strict";t.exports=i;var r=e('./_stream_transform'),u=e('core-util-is');u.inherits=e('inherits');u.inherits(i,r);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":16,"core-util-is":4,"inherits":7}],15:[function(e,t,n){(function(n,r){"use strict";var u=e('process-nextick-args');t.exports=v;var i=e('isarray'),o;v.ReadableState=S;e('events').EventEmitter;var f=function(e,t){return e.listeners(t).length},c=e('./internal/streams/stream'),a=e('safe-buffer').Buffer,d=r.Uint8Array||function(){};function s(e){return a.from(e)}function l(e){return a.isBuffer(e)||e instanceof d}var p=e('core-util-is');p.inherits=e('inherits');var b=e('util'),h=void 0;b&&b.debuglog?(h=b.debuglog('stream')):(h=function(){});var m=e('./internal/streams/BufferList'),g=e('./internal/streams/destroy'),y;p.inherits(v,c);var w=['error','close','destroy','pause','resume'];function _(e,t,n){if(typeof e.prependListener==='function')return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):i(e._events[t])?e._events[t].unshift(n):(e._events[t]=[n,e._events[t]])}function S(t,n){o=o||e('./_stream_duplex');t=t||{};var r=n instanceof o;this.objectMode=!!t.objectMode;r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var u=t.highWaterMark,i=t.readableHighWaterMark,f=this.objectMode?16:16384;u||u===0?(this.highWaterMark=u):r&&(i||i===0)?(this.highWaterMark=i):(this.highWaterMark=f);this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new m;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=!1;this.endEmitted=!1;this.reading=!1;this.sync=!0;this.needReadable=!1;this.emittedReadable=!1;this.readableListening=!1;this.resumeScheduled=!1;this.destroyed=!1;this.defaultEncoding=t.defaultEncoding||'utf8';this.awaitDrain=0;this.readingMore=!1;this.decoder=null;this.encoding=null;t.encoding&&(y||(y=e('string_decoder/').StringDecoder),this.decoder=new y(t.encoding),this.encoding=t.encoding)}function v(t){o=o||e('./_stream_duplex');if(!(this instanceof v))return new v(t);this._readableState=new S(t,this);this.readable=!0;t&&(typeof t.read==='function'&&(this._read=t.read),typeof t.destroy==='function'&&(this._destroy=t.destroy));c.call(this)}Object.defineProperty(v.prototype,'destroyed',{get:function(){if(this._readableState===void 0){return!1}return this._readableState.destroyed},set:function(e){if(!this._readableState){return}this._readableState.destroyed=e}});v.prototype.destroy=g.destroy;v.prototype._undestroy=g.undestroy;v.prototype._destroy=function(e,t){this.push(null);t(e)};v.prototype.push=function(e,t){var n=this._readableState,r;n.objectMode?(r=!0):(typeof e==='string'&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=a.from(e,t),t=''),r=!0));return k(this,e,t,!1,r)};v.prototype.unshift=function(e){return k(this,e,null,!0,!1)};function k(e,t,n,r,u){var i=e._readableState;if(t===null)i.reading=!1,M(e,i);else{var o;u||(o=P(i,t));o?e.emit('error',o):i.objectMode||t&&t.length>0?(typeof t!=='string'&&!i.objectMode&&Object.getPrototypeOf(t)!==a.prototype&&(t=s(t)),r?(i.endEmitted?e.emit('error',new Error('stream.unshift() after end event')):I(e,i,t,!0)):i.ended?e.emit('error',new Error('stream.push() after EOF')):(i.reading=!1,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||t.length!==0?I(e,i,t,!1):L(e,i)):I(e,i,t,!1))):r||(i.reading=!1)}return x(i)}function I(e,t,n,r){t.flowing&&t.length===0&&!t.sync?(e.emit('data',n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&B(e));L(e,t)}function P(e,t){var n;!l(t)&&typeof t!=='string'&&t!==void 0&&!e.objectMode&&(n=new TypeError('Invalid non-string/buffer chunk'));return n}function x(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}v.prototype.isPaused=function(){return this._readableState.flowing===!1};v.prototype.setEncoding=function(t){y||(y=e('string_decoder/').StringDecoder);this._readableState.decoder=new y(t);this._readableState.encoding=t;return this};var A=8388608;function O(e){e>=A?(e=A):(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++);return e}function E(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}e>t.highWaterMark&&(t.highWaterMark=O(e));if(e<=t.length)return e;if(!t.ended){t.needReadable=!0;return 0}return t.length}v.prototype.read=function(e){h('read',e);e=parseInt(e,10);var t=this._readableState,n=e;e!==0&&(t.emittedReadable=!1);if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){h('read: emitReadable',t.length,t.ended);t.length===0&&t.ended?K(this):B(this);return null}e=E(e,t);if(e===0&&t.ended){t.length===0&&K(this);return null}var r=t.needReadable;h('need readable',r);(t.length===0||t.length-e<t.highWaterMark)&&(r=!0,h('length less than watermark',r));t.ended||t.reading?(r=!1,h('reading or ended',r)):r&&(h('do read'),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(n,t)));var u;e>0?(u=j(e,t)):(u=null);u===null?(t.needReadable=!0,e=0):(t.length-=e);t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&K(this));u!==null&&this.emit('data',u);return u};function M(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0;B(e)}function B(e){var t=e._readableState;t.needReadable=!1;t.emittedReadable||(h('emitReadable',t.flowing),t.emittedReadable=!0,t.sync?u.nextTick(N,e):N(e))}function N(e){h('emit readable');e.emit('readable');H(e)}function L(e,t){t.readingMore||(t.readingMore=!0,u.nextTick(T,e,t))}function T(e,t){var n=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark){h('maybeReadMore read 0');e.read(0);if(n===t.length)break;else n=t.length}t.readingMore=!1}v.prototype._read=function(e){this.emit('error',new Error('_read() is not implemented'))};v.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1;h('pipe count=%d opts=%j',i.pipesCount,t);var o=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,c=o?d:S;i.endEmitted?u.nextTick(c):r.once('end',c);e.on('unpipe',a);function a(e,t){h('onunpipe');e===r&&(t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,p()))}function d(){h('onend');e.end()}var s=R(r);e.on('drain',s);var l=!1;function p(){h('cleanup');e.removeListener('close',y);e.removeListener('finish',w);e.removeListener('drain',s);e.removeListener('error',g);e.removeListener('unpipe',a);r.removeListener('end',d);r.removeListener('end',S);r.removeListener('data',m);l=!0;i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&s()}var b=!1;r.on('data',m);function m(t){h('ondata');b=!1;var n=e.write(t);!1===n&&!b&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&J(i.pipes,e)!==-1)&&!l&&(h('false write response, pause',r._readableState.awaitDrain),r._readableState.awaitDrain++,b=!0),r.pause())}function g(t){h('onerror',t);S();e.removeListener('error',g);f(e,'error')===0&&e.emit('error',t)}_(e,'error',g);function y(){e.removeListener('finish',w);S()}e.once('close',y);function w(){h('onfinish');e.removeListener('close',y);S()}e.once('finish',w);function S(){h('unpipe');r.unpipe(e)}e.emit('pipe',r);i.flowing||(h('pipe resume'),r.resume());return e};function R(e){return function(){var t=e._readableState;h('pipeOnDrain',t.awaitDrain);t.awaitDrain&&t.awaitDrain--;t.awaitDrain===0&&f(e,'data')&&(t.flowing=!0,H(e))}}v.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;e||(e=t.pipes);t.pipes=null;t.pipesCount=0;t.flowing=!1;e&&e.emit('unpipe',this,n);return this}if(!e){var r=t.pipes,u=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=!1;for(var i=0;i<u;i++)r[i].emit('unpipe',this,n);return this}var o=J(t.pipes,e);if(o===-1)return this;t.pipes.splice(o,1);t.pipesCount-=1;t.pipesCount===1&&(t.pipes=t.pipes[0]);e.emit('unpipe',this,n);return this};v.prototype.on=function(e,t){var n=c.prototype.on.call(this,e,t);if(e==='data')this._readableState.flowing!==!1&&this.resume();else if(e==='readable'){var r=this._readableState;!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&B(this):u.nextTick(U,this))}return n};v.prototype.addListener=v.prototype.on;function U(e){h('readable nexttick read 0');e.read(0)}v.prototype.resume=function(){var e=this._readableState;e.flowing||(h('resume'),e.flowing=!0,q(this,e));return this};function q(e,t){t.resumeScheduled||(t.resumeScheduled=!0,u.nextTick(C,e,t))}function C(e,t){t.reading||(h('resume read 0'),e.read(0));t.resumeScheduled=!1;t.awaitDrain=0;e.emit('resume');H(e);t.flowing&&!t.reading&&e.read(0)}v.prototype.pause=function(){h('call pause flowing=%j',this._readableState.flowing);!1!==this._readableState.flowing&&(h('pause'),this._readableState.flowing=!1,this.emit('pause'));return this};function H(e){var t=e._readableState;h('flow',t.flowing);while(t.flowing&&e.read()!==null);}v.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;e.on('end',function(){h('wrapped end');if(n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)});e.on('data',function(u){h('wrapped data');n.decoder&&(u=n.decoder.write(u));if(n.objectMode&&(u===null||u===void 0))return;else if(!n.objectMode&&(!u||!u.length))return;var i=t.push(u);i||(r=!0,e.pause())});for(var u in e)this[u]===void 0&&typeof e[u]==='function'&&(this[u]=function(t){return function(){return e[t].apply(e,arguments)}}(u));for(var i=0;i<w.length;i++)e.on(w[i],this.emit.bind(this,w[i]));this._read=function(t){h('wrapped _read',t);r&&(r=!1,e.resume())};return this};Object.defineProperty(v.prototype,'readableHighWaterMark',{enumerable:!1,get:function(){return this._readableState.highWaterMark}});v._fromList=j;function j(e,t){if(t.length===0)return null;var n;t.objectMode?(n=t.buffer.shift()):!e||e>=t.length?(t.decoder?(n=t.buffer.join('')):t.buffer.length===1?(n=t.buffer.head.data):(n=t.buffer.concat(t.length)),t.buffer.clear()):(n=z(e,t.buffer,t.decoder));return n}function z(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?(r=t.shift()):(r=n?D(e,t):W(e,t));return r}function D(e,t){var n=t.head,r=1,u=n.data;e-=u.length;while(n=n.next){var i=n.data,o=e>i.length?i.length:e;o===i.length?(u+=i):(u+=i.slice(0,e));e-=o;if(e===0){o===i.length?(++r,n.next?(t.head=n.next):(t.head=t.tail=null)):(t.head=n,n.data=i.slice(o));break}++r}t.length-=r;return u}function W(e,t){var n=a.allocUnsafe(e),r=t.head,u=1;r.data.copy(n);e-=r.data.length;while(r=r.next){var i=r.data,o=e>i.length?i.length:e;i.copy(n,n.length-e,0,o);e-=o;if(e===0){o===i.length?(++u,r.next?(t.head=r.next):(t.head=t.tail=null)):(t.head=r,r.data=i.slice(o));break}++u}t.length-=u;return n}function K(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,u.nextTick(F,t,e))}function F(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit('end'))}function J(e,t){for(var n=0,r=e.length;n<r;n++){if(e[n]===t)return n}return-1}}).call(this,e('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?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":26,"string_decoder/":21,"util":2}],16:[function(e,t,n){"use strict";t.exports=o;var r=e('./_stream_duplex'),u=e('core-util-is');u.inherits=e('inherits');u.inherits(o,r);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r){return this.emit('error',new Error('write callback called multiple times'))}n.writechunk=null;n.writecb=null;t!=null&&this.push(t);r(e);var u=this._readableState;u.reading=!1;(u.needReadable||u.length<u.highWaterMark)&&this._read(u.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);r.call(this,e);this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=!0;this._readableState.sync=!1;e&&(typeof e.transform==='function'&&(this._transform=e.transform),typeof e.flush==='function'&&(this._flush=e.flush));this.on('prefinish',f)}function f(){var e=this;typeof this._flush==='function'?this._flush(function(t,n){c(e,t,n)}):c(this,null,null)}o.prototype.push=function(e,t){this._transformState.needTransform=!1;return r.prototype.push.call(this,e,t)};o.prototype._transform=function(e,t,n){throw new Error('_transform() is not implemented')};o.prototype._write=function(e,t,n){var r=this._transformState;r.writecb=n;r.writechunk=e;r.writeencoding=t;if(!r.transforming){var u=this._readableState;(r.needTransform||u.needReadable||u.length<u.highWaterMark)&&this._read(u.highWaterMark)}};o.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):(t.needTransform=!0)};o.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e);n.emit('close')})};function c(e,t,n){if(t)return e.emit('error',t);n!=null&&e.push(n);if(e._writableState.length)throw new Error('Calling transform done when ws.length != 0');if(e._transformState.transforming)throw new Error('Calling transform done when still transforming');return e.push(null)}},{"./_stream_duplex":13,"core-util-is":4,"inherits":7}],17:[function(e,t,n){(function(n,r,u){"use strict";var i=e('process-nextick-args');t.exports=_;function o(e){var t=this;this.next=null;this.entry=null;this.finish=function(){q(t,e)}}var f=!n.browser&&['v0.10','v0.9.'].indexOf(n.version.slice(0,5))>-1?u:i.nextTick,c;_.WritableState=y;var a=e('core-util-is');a.inherits=e('inherits');var d={deprecate:e('util-deprecate')},s=e('./internal/streams/stream'),l=e('safe-buffer').Buffer,p=r.Uint8Array||function(){};function b(e){return l.from(e)}function h(e){return l.isBuffer(e)||e instanceof p}var m=e('./internal/streams/destroy');a.inherits(_,s);function g(){}function y(t,n){c=c||e('./_stream_duplex');t=t||{};var r=n instanceof c;this.objectMode=!!t.objectMode;r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,i=t.writableHighWaterMark,f=this.objectMode?16:16384;u||u===0?(this.highWaterMark=u):r&&(i||i===0)?(this.highWaterMark=i):(this.highWaterMark=f);this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=!1;this.needDrain=!1;this.ending=!1;this.ended=!1;this.finished=!1;this.destroyed=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a;this.defaultEncoding=t.defaultEncoding||'utf8';this.length=0;this.writing=!1;this.corked=0;this.sync=!0;this.bufferProcessing=!1;this.onwrite=function(e){O(n,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=!1;this.errorEmitted=!1;this.bufferedRequestCount=0;this.corkedRequestsFree=new o(this)}y.prototype.getBuffer=function(){var e=this.bufferedRequest,t=[];while(e)t.push(e),e=e.next;return t};!function(){try{Object.defineProperty(y.prototype,'buffer',{get:d.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.",'DEP0003')})}catch(e){}}();var w;typeof Symbol==='function'&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==='function'?(w=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(e){if(w.call(this,e))return!0;if(this!==_)return!1;return e&&e._writableState instanceof y}})):(w=function(e){return e instanceof this});function _(t){c=c||e('./_stream_duplex');if(!w.call(_,this)&&!(this instanceof c)){return new _(t)}this._writableState=new y(t,this);this.writable=!0;t&&(typeof t.write==='function'&&(this._write=t.write),typeof t.writev==='function'&&(this._writev=t.writev),typeof t.destroy==='function'&&(this._destroy=t.destroy),typeof t.final==='function'&&(this._final=t.final));s.call(this)}_.prototype.pipe=function(){this.emit('error',new Error('Cannot pipe, not readable'))};function S(e,t){var n=new Error('write after end');e.emit('error',n);i.nextTick(t,n)}function v(e,t,n,r){var u=!0,o=!1;n===null?(o=new TypeError('May not write null values to stream')):typeof n!=='string'&&n!==void 0&&!t.objectMode&&(o=new TypeError('Invalid non-string/buffer chunk'));o&&(e.emit('error',o),i.nextTick(r,o),u=!1);return u}_.prototype.write=function(e,t,n){var r=this._writableState,u=!1,i=!r.objectMode&&h(e);i&&!l.isBuffer(e)&&(e=b(e));typeof t==='function'&&(n=t,t=null);i?(t='buffer'):t||(t=r.defaultEncoding);typeof n!=='function'&&(n=g);r.ended?S(this,n):(i||v(this,r,e,n))&&(r.pendingcb++,u=I(this,r,i,e,t,n));return u};_.prototype.cork=function(){var e=this._writableState;e.corked++};_.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest&&B(this,e))};_.prototype.setDefaultEncoding=function(e){typeof e==='string'&&(e=e.toLowerCase());if(!(['hex','utf8','utf-8','ascii','binary','base64','ucs2','ucs-2','utf16le','utf-16le','raw'].indexOf((e+'').toLowerCase())>-1))throw new TypeError('Unknown encoding: '+e);this._writableState.defaultEncoding=e;return this};function k(e,t,n){!e.objectMode&&e.decodeStrings!==!1&&typeof t==='string'&&(t=l.from(t,n));return t}Object.defineProperty(_.prototype,'writableHighWaterMark',{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function I(e,t,n,r,u,i){if(!n){var o=k(t,r,u);r!==o&&(n=!0,u='buffer',r=o)}var f=t.objectMode?1:r.length;t.length+=f;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var a=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:u,isBuf:n,callback:i,next:null};a?(a.next=t.lastBufferedRequest):(t.bufferedRequest=t.lastBufferedRequest);t.bufferedRequestCount+=1}else P(e,t,!1,f,r,u,i);return c}function P(e,t,n,r,u,i,o){t.writelen=r;t.writecb=o;t.writing=!0;t.sync=!0;n?e._writev(u,t.onwrite):e._write(u,i,t.onwrite);t.sync=!1}function x(e,t,n,r,u){--t.pendingcb;n?(i.nextTick(u,r),i.nextTick(R,e,t),e._writableState.errorEmitted=!0,e.emit('error',r)):(u(r),e._writableState.errorEmitted=!0,e.emit('error',r),R(e,t))}function A(e){e.writing=!1;e.writecb=null;e.length-=e.writelen;e.writelen=0}function O(e,t){var n=e._writableState,r=n.sync,u=n.writecb;A(n);if(t)x(e,n,r,t,u);else{var i=N(n);!i&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&B(e,n);r?f(E,e,n,i,u):E(e,n,i,u)}}function E(e,t,n,r){n||M(e,t);t.pendingcb--;r();R(e,t)}function M(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit('drain'))}function B(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,u=new Array(r),i=t.corkedRequestsFree;i.entry=n;var f=0,c=!0;while(n)u[f]=n,n.isBuf||(c=!1),n=n.next,f+=1;u.allBuffers=c;P(e,t,!0,t.length,u,'',i.finish);t.pendingcb++;t.lastBufferedRequest=null;i.next?(t.corkedRequestsFree=i.next,i.next=null):(t.corkedRequestsFree=new o(t));t.bufferedRequestCount=0}else{while(n){var a=n.chunk,d=n.encoding,s=n.callback,l=t.objectMode?1:a.length;P(e,t,!1,l,a,d,s);n=n.next;t.bufferedRequestCount--;if(t.writing){break}}n===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=n;t.bufferProcessing=!1}_.prototype._write=function(e,t,n){n(new Error('_write() is not implemented'))};_.prototype._writev=null;_.prototype.end=function(e,t,n){var r=this._writableState;typeof e==='function'?(n=e,e=null,t=null):typeof t==='function'&&(n=t,t=null);e!==null&&e!==void 0&&this.write(e,t);r.corked&&(r.corked=1,this.uncork());!r.ending&&!r.finished&&U(this,r,n)};function N(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function L(e,t){e._final(function(n){t.pendingcb--;n&&e.emit('error',n);t.prefinished=!0;e.emit('prefinish');R(e,t)})}function T(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==='function'?(t.pendingcb++,t.finalCalled=!0,i.nextTick(L,e,t)):(t.prefinished=!0,e.emit('prefinish')))}function R(e,t){var n=N(t);n&&(T(e,t),t.pendingcb===0&&(t.finished=!0,e.emit('finish')));return n}function U(e,t,n){t.ending=!0;R(e,t);n&&(t.finished?i.nextTick(n):e.once('finish',n));t.ended=!0;e.writable=!1}function q(e,t,n){var r=e.entry;e.entry=null;while(r){var u=r.callback;t.pendingcb--;u(n);r=r.next}t.corkedRequestsFree?(t.corkedRequestsFree.next=e):(t.corkedRequestsFree=e)}Object.defineProperty(_.prototype,'destroyed',{get:function(){if(this._writableState===void 0){return!1}return this._writableState.destroyed},set:function(e){if(!this._writableState){return}this._writableState.destroyed=e}});_.prototype.destroy=m.destroy;_.prototype._undestroy=m.undestroy;_.prototype._destroy=function(e,t){this.end();t(e)}}).call(this,e('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},e("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":26,"timers":29,"util-deprecate":30}],18:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var u=e('safe-buffer').Buffer,i=e('util');function o(e,t,n){e.copy(t,n)}t.exports=function(){function e(){r(this,e);this.head=null;this.tail=null;this.length=0}e.prototype.push=function(e){var t={data:e,next:null};this.length>0?(this.tail.next=t):(this.head=t);this.tail=t;++this.length};e.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t);this.head=t;++this.length};e.prototype.shift=function(){if(this.length===0)return;var e=this.head.data;this.length===1?(this.head=this.tail=null):(this.head=this.head.next);--this.length;return e};e.prototype.clear=function(){this.head=this.tail=null;this.length=0};e.prototype.join=function(e){if(this.length===0)return'';var t=this.head,n=''+t.data;while(t=t.next)n+=e+t.data;return n};e.prototype.concat=function(e){if(this.length===0)return u.alloc(0);if(this.length===1)return this.head.data;var t=u.allocUnsafe(e>>>0),n=this.head,r=0;while(n)o(n.data,t,r),r+=n.data.length,n=n.next;return t};return e}();i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+' '+e})},{"safe-buffer":26,"util":2}],19:[function(e,t,n){"use strict";var r=e('process-nextick-args');function u(e,t){var n=this,u=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;if(u||i){t?t(e):e&&(!this._writableState||!this._writableState.errorEmitted)&&r.nextTick(o,this,e);return this}this._readableState&&(this._readableState.destroyed=!0);this._writableState&&(this._writableState.destroyed=!0);this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)});return this}function i(){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)}function o(e,t){e.emit('error',t)}t.exports={destroy:u,undestroy:i}},{"process-nextick-args":10}],20:[function(e,t,n){t.exports=e('events').EventEmitter},{"events":5}],21:[function(e,t,n){"use strict";var r=e('safe-buffer').Buffer,u=r.isEncoding||function(e){e=''+e;switch(e&&e.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}};function i(e){if(!e)return'utf8';var t;while(!0){switch(e){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 e;default:if(t)return;e=(''+e).toLowerCase();t=!0}}}function o(e){var t=i(e);if(typeof t!=='string'&&(r.isEncoding===u||!u(e)))throw new Error('Unknown encoding: '+e);return t||e}n.StringDecoder=f;function f(e){this.encoding=o(e);var t;switch(this.encoding){case 'utf16le':this.text=b;this.end=h;t=4;break;case 'utf8':this.fillLast=s;t=4;break;case 'base64':this.text=m;this.end=g;t=3;break;default:this.write=y;this.end=w;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=r.allocUnsafe(t)}f.prototype.write=function(e){if(e.length===0)return'';var t,n;if(this.lastNeed){t=this.fillLast(e);if(t===void 0)return'';n=this.lastNeed;this.lastNeed=0}else n=0;if(n<e.length)return t?t+this.text(e,n):this.text(e,n);return t||''};f.prototype.end=p;f.prototype.text=l;f.prototype.fillLast=function(e){if(this.lastNeed<=e.length){e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length);this.lastNeed-=e.length};function c(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function a(e,t,n){var r=t.length-1;if(r<n)return 0;var u=c(t[r]);if(u>=0){u>0&&(e.lastNeed=u-1);return u}if(--r<n||u===-2)return 0;u=c(t[r]);if(u>=0){u>0&&(e.lastNeed=u-2);return u}if(--r<n||u===-2)return 0;u=c(t[r]);if(u>=0){u>0&&(u===2?(u=0):(e.lastNeed=u-3));return u}return 0}function d(e,t,n){if((t[0]&192)!==128){e.lastNeed=0;return'\ufffd'}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return'\ufffd'}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return'\ufffd'}}}}function s(e){var t=this.lastTotal-this.lastNeed,n=d(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function l(e,t){var n=a(this,e,t);if(!this.lastNeed)return e.toString('utf8',t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);e.copy(this.lastChar,0,r);return e.toString('utf8',t,r)}function p(e){var t=e&&e.length?this.write(e):'';if(this.lastNeed)return t+'\ufffd';return t}function b(e,t){if((e.length-t)%2===0){var n=e.toString('utf16le',t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return n.slice(0,-1)}}return n}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString('utf16le',t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):'';if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString('utf16le',0,n)}return t}function m(e,t){var n=(e.length-t)%3;if(n===0)return e.toString('base64',t);this.lastNeed=3-n;this.lastTotal=3;n===1?(this.lastChar[0]=e[e.length-1]):(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]);return e.toString('base64',t,e.length-n)}function g(e){var t=e&&e.length?this.write(e):'';if(this.lastNeed)return t+this.lastChar.toString('base64',0,3-this.lastNeed);return t}function y(e){return e.toString(this.encoding)}function w(e){return e&&e.length?this.write(e):''}},{"safe-buffer":26}],22:[function(e,t,n){t.exports=e('./readable').PassThrough},{"./readable":23}],23:[function(e,t,n){n=t.exports=e('./lib/_stream_readable.js');n.Stream=n;n.Readable=n;n.Writable=e('./lib/_stream_writable.js');n.Duplex=e('./lib/_stream_duplex.js');n.Transform=e('./lib/_stream_transform.js');n.PassThrough=e('./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}],24:[function(e,t,n){t.exports=e('./readable').Transform},{"./readable":23}],25:[function(e,t,n){t.exports=e('./lib/_stream_writable.js')},{"./lib/_stream_writable.js":17}],26:[function(e,t,n){var r=e('buffer'),u=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?(t.exports=r):(i(r,n),n.Buffer=o);function o(e,t,n){return u(e,t,n)}i(u,o);o.from=function(e,t,n){if(typeof e==='number'){throw new TypeError('Argument must not be a number')}return u(e,t,n)};o.alloc=function(e,t,n){if(typeof e!=='number'){throw new TypeError('Argument must be a number')}var r=u(e);t!==void 0?(typeof n==='string'?r.fill(t,n):r.fill(t)):r.fill(0);return r};o.allocUnsafe=function(e){if(typeof e!=='number'){throw new TypeError('Argument must be a number')}return u(e)};o.allocUnsafeSlow=function(e){if(typeof e!=='number'){throw new TypeError('Argument must be a number')}return r.SlowBuffer(e)}},{"buffer":3}],27:[function(e,t,n){t.exports=i;var r=e('events').EventEmitter,u=e('inherits');u(i,r);i.Readable=e('readable-stream/readable.js');i.Writable=e('readable-stream/writable.js');i.Duplex=e('readable-stream/duplex.js');i.Transform=e('readable-stream/transform.js');i.PassThrough=e('readable-stream/passthrough.js');i.Stream=i;function i(){r.call(this)}i.prototype.pipe=function(e,t){var n=this;function u(t){e.writable&&(!1===e.write(t)&&n.pause&&n.pause())}n.on('data',u);function i(){n.readable&&n.resume&&n.resume()}e.on('drain',i);!e._isStdio&&(!t||t.end!==!1)&&(n.on('end',f),n.on('close',c));var o=!1;function f(){if(o)return;o=!0;e.end()}function c(){if(o)return;o=!0;typeof e.destroy==='function'&&e.destroy()}function a(e){d();if(r.listenerCount(this,'error')===0){throw e}}n.on('error',a);e.on('error',a);function d(){n.removeListener('data',u);e.removeListener('drain',i);n.removeListener('end',f);n.removeListener('close',c);n.removeListener('error',a);e.removeListener('error',a);n.removeListener('end',d);n.removeListener('close',d);e.removeListener('close',d)}n.on('end',d);n.on('close',d);e.on('close',d);e.emit('pipe',n);return e}},{"events":5,"inherits":7,"readable-stream/duplex.js":12,"readable-stream/passthrough.js":22,"readable-stream/readable.js":23,"readable-stream/transform.js":24,"readable-stream/writable.js":25}],28:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"dup":21,"safe-buffer":26}],29:[function(e,t,n){(function(t,r){var u=e('process/browser.js').nextTick,i=Function.prototype.apply,o=Array.prototype.slice,f={},c=0;n.setTimeout=function(){return new a(i.call(setTimeout,window,arguments),clearTimeout)};n.setInterval=function(){return new a(i.call(setInterval,window,arguments),clearInterval)};n.clearTimeout=n.clearInterval=function(e){e.close()};function a(e,t){this._id=e;this._clearFn=t}a.prototype.unref=a.prototype.ref=function(){};a.prototype.close=function(){this._clearFn.call(window,this._id)};n.enroll=function(e,t){clearTimeout(e._idleTimeoutId);e._idleTimeout=t};n.unenroll=function(e){clearTimeout(e._idleTimeoutId);e._idleTimeout=-1};n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))};n.setImmediate=typeof t==="function"?t:function(e){var t=c++,r=arguments.length<2?!1:o.call(arguments,1);f[t]=!0;u(function(){f[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))});return t};n.clearImmediate=typeof r==="function"?r:function(e){delete f[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":11,"timers":29}],30:[function(e,t,n){(function(e){t.exports=n;function n(e,t){if(r('noDeprecation')){return e}var n=!1;function u(){if(!n){if(r('throwDeprecation')){throw new Error(t)}else r('traceDeprecation')?console.trace(t):console.warn(t);n=!0}return e.apply(this,arguments)}return u}function r(t){try{if(!e.localStorage)return!1}catch(e){return!1};var n=e.localStorage[t];if(null==n)return!1;return String(n).toLowerCase()==='true'}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],31:[function(e,t,n){let r=e('safe-buffer').Buffer;t.exports=function(e){if(e.length>=255)throw new TypeError('Alphabet too long');let t=new Uint8Array(256);t.fill(255);for(let n=0;n<e.length;n++){let r=e.charAt(n),u=r.charCodeAt(0);if(t[u]!==255)throw new TypeError(r+' is ambiguous');t[u]=n}let n=e.length,u=e.charAt(0),i=Math.log(n)/Math.log(256),o=Math.log(256)/Math.log(n);function f(t){if(!r.isBuffer(t))throw new TypeError('Expected Buffer');if(t.length===0)return'';let i=0,f=0,c=0,a=t.length;while(c!==a&&t[c]===0)c++,i++;let d=(a-c)*o+1>>>0,s=new Uint8Array(d);while(c!==a){let e=t[c],r=0;for(let t=d-1;(e!==0||r<f)&&t!==-1;t--, r++)e+=256*s[t]>>>0,s[t]=e%n>>>0,e=e/n>>>0;if(e!==0)throw new Error('Non-zero carry');f=r;c++}let l=d-f;while(l!==d&&s[l]===0)l++;let p=u.repeat(i);for(;l<d;++l)p+=e.charAt(s[l]);return p}function c(e){if(typeof e!=='string')throw new TypeError('Expected String');if(e.length===0)return r.alloc(0);let o=0;if(e[o]===' ')return;let f=0,c=0;while(e[o]===u)f++,o++;let a=(e.length-o)*i+1>>>0,d=new Uint8Array(a);while(e[o]){let r=t[e.charCodeAt(o)];if(r===255)return;let u=0;for(let e=a-1;(r!==0||u<c)&&e!==-1;e--, u++)r+=n*d[e]>>>0,d[e]=r%256>>>0,r=r/256>>>0;if(r!==0)throw new Error('Non-zero carry');c=u;o++}if(e[o]===' ')return;let s=a-c;while(s!==a&&d[s]===0)s++;let l=r.allocUnsafe(f+(a-s));l.fill(0,0,f);let p=f;while(s!==a)l[p++]=d[s++];return l}function a(e){let t=c(e);if(t)return t;throw new Error('Non-base'+n+' character')}return{encode:f,decodeUnsafe:c,decode:a}}},{"safe-buffer":130}],32:[function(e,t,n){"use strict";var r='qpzry9x8gf2tvdw0s3jn54khce6mua7l',u={};for(var i=0;i<r.length;i++){var o=r.charAt(i);if(u[o]!==void 0)throw new TypeError(o+' is ambiguous');u[o]=i}function f(e){var t=e>>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function c(e){var t=1;for(var n=0;n<e.length;++n){var r=e.charCodeAt(n);if(r<33||r>126)throw new Error('Invalid prefix ('+e+')');t=f(t)^r>>5}t=f(t);for(n=0;n<e.length;++n){var u=e.charCodeAt(n);t=f(t)^u&31}return t}function a(e,t,n){n=n||90;if(e.length+7+t.length>n)throw new TypeError('Exceeds length limit');e=e.toLowerCase();var u=c(e),i=e+'1';for(var o=0;o<t.length;++o){var a=t[o];if(a>>5!==0)throw new Error('Non 5-bit word');u=f(u)^a;i+=r.charAt(a)}for(o=0;o<6;++o)u=f(u);u^=1;for(o=0;o<6;++o){var d=u>>(5-o)*5&31;i+=r.charAt(d)}return i}function d(e,t){t=t||90;if(e.length<8)throw new TypeError(e+' too short');if(e.length>t)throw new TypeError('Exceeds length limit');var n=e.toLowerCase(),r=e.toUpperCase();if(e!==n&&e!==r)throw new Error('Mixed-case string '+e);e=n;var i=e.lastIndexOf('1');if(i===-1)throw new Error('No separator character for '+e);if(i===0)throw new Error('Missing prefix for '+e);var o=e.slice(0,i),a=e.slice(i+1);if(a.length<6)throw new Error('Data too short');var d=c(o),s=[];for(var l=0;l<a.length;++l){var p=a.charAt(l),b=u[p];if(b===void 0)throw new Error('Unknown character '+p);d=f(d)^b;if(l+6>=a.length)continue;s.push(b)}if(d!==1)throw new Error('Invalid checksum for '+e);return{prefix:o,words:s}}function s(e,t,n,r){var u=0,i=0,o=(1<<n)-1,f=[];for(var c=0;c<e.length;++c){u=u<<t|e[c];i+=t;while(i>=n)i-=n,f.push(u>>i&o)}if(r)i>0&&f.push(u<<n-i&o);else{if(i>=t)throw new Error('Excess padding');if(u<<n-i&o)throw new Error('Non-zero padding')}return f}function l(e){return s(e,8,5,!0)}function p(e){return s(e,5,8,!1)}t.exports={decode:d,encode:a,toWords:l,fromWords:p}},{}],33:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./crypto"),u=e('bs58check'),i=e('tiny-secp256k1'),o=e('typeforce'),f=e('wif'),c=o.BufferN(32),a=o.compile({wif:o.UInt8,bip32:{public:o.UInt32,private:o.UInt32}}),d={wif:128,bip32:{public:76067358,private:76066276}},s=2147483648,l=Math.pow(2,31)-1;function p(e){return o.String(e)&&e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)!==null}function b(e){return o.UInt32(e)&&e<=l}class h{constructor(e,t,n,r,u = 0,i = 0,f = 0){this.__D=e;this.__Q=t;this.chainCode=n;this.network=r;this.__DEPTH=u;this.__INDEX=i;this.__PARENT_FINGERPRINT=f;o(a,r)}get depth(){return this.__DEPTH}get index(){return this.__INDEX}get parentFingerprint(){return this.__PARENT_FINGERPRINT}get publicKey(){this.__Q===void 0&&(this.__Q=i.pointFromScalar(this.__D,!0));return this.__Q}get privateKey(){return this.__D}get identifier(){return r.hash160(this.publicKey)}get fingerprint(){return this.identifier.slice(0,4)}isNeutered(){return this.__D===void 0}neutered(){return _(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}toBase58(){let e=this.network,n=!this.isNeutered()?e.bip32.private:e.bip32.public,r=t.allocUnsafe(78);r.writeUInt32BE(n,0);r.writeUInt8(this.depth,4);r.writeUInt32BE(this.parentFingerprint,5);r.writeUInt32BE(this.index,9);this.chainCode.copy(r,13);this.isNeutered()?this.publicKey.copy(r,45):(r.writeUInt8(0,45),this.privateKey.copy(r,46));return u.encode(r)}toWIF(){if(!this.privateKey)throw new TypeError('Missing private key');return f.encode(this.network.wif,this.privateKey,!0)}derive(e){o(o.UInt32,e);let n=e>=s,u=t.allocUnsafe(37);if(n){if(this.isNeutered())throw new TypeError('Missing private key for hardened child key');u[0]=0;this.privateKey.copy(u,1);u.writeUInt32BE(e,33)}else this.publicKey.copy(u,0),u.writeUInt32BE(e,33);let f=r.hmacSHA512(this.chainCode,u),c=f.slice(0,32),a=f.slice(32);if(!i.isPrivate(c))return this.derive(e+1);let d;if(!this.isNeutered()){let t=i.privateAdd(this.privateKey,c);if(t==null)return this.derive(e+1);d=y(t,a,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}else{let t=i.pointAddScalar(this.publicKey,c,!0);if(t===null)return this.derive(e+1);d=_(t,a,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}return d}deriveHardened(e){o(b,e);return this.derive(e+s)}derivePath(e){o(p,e);let t=e.split('/');if(t[0]==='m'){if(this.parentFingerprint)throw new TypeError('Expected master, got child');t=t.slice(1)}return t.reduce((e,t)=>{let n;if(t.slice(-1)==="'"){n=parseInt(t.slice(0,-1),10);return e.deriveHardened(n)}else{n=parseInt(t,10);return e.derive(n)}},this)}sign(e){return i.sign(e,this.privateKey)}verify(e,t){return i.verify(e,this.publicKey,t)}}function m(e,t){let n=u.decode(e);if(n.length!==78)throw new TypeError('Invalid buffer length');t=t||d;let r=n.readUInt32BE(0);if(r!==t.bip32.private&&r!==t.bip32.public)throw new TypeError('Invalid network version');let i=n[4],o=n.readUInt32BE(5);if(i===0){if(o!==0)throw new TypeError('Invalid parent fingerprint')}let f=n.readUInt32BE(9);if(i===0&&f!==0)throw new TypeError('Invalid index');let c=n.slice(13,45),a;if(r===t.bip32.private){if(n.readUInt8(45)!==0)throw new TypeError('Invalid private key');let e=n.slice(46,78);a=y(e,c,t,i,f,o)}else{let e=n.slice(45,78);a=_(e,c,t,i,f,o)}return a}n.fromBase58=m;function g(e,t,n){return y(e,t,n)}n.fromPrivateKey=g;function y(e,t,n,r,u,f){o({privateKey:c,chainCode:c},{privateKey:e,chainCode:t});n=n||d;if(!i.isPrivate(e))throw new TypeError('Private key not in range [1, n)');return new h(e,void 0,t,n,r,u,f)}function w(e,t,n){return _(e,t,n)}n.fromPublicKey=w;function _(e,t,n,r,u,f){o({publicKey:o.BufferN(33),chainCode:c},{publicKey:e,chainCode:t});n=n||d;if(!i.isPoint(e))throw new TypeError('Point is not on the curve');return new h(void 0,e,t,n,r,u,f)}function S(e,n){o(o.Buffer,e);if(e.length<16)throw new TypeError('Seed should be at least 128 bits');if(e.length>64)throw new TypeError('Seed should be at most 512 bits');n=n||d;let u=r.hmacSHA512(t.from('Bitcoin seed','utf8'),e),i=u.slice(0,32),f=u.slice(32);return g(i,f,n)}n.fromSeed=S}).call(this,e("buffer").Buffer)},{"./crypto":34,"bs58check":86,"buffer":3,"tiny-secp256k1":139,"typeforce":143,"wif":146}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e('create-hash'),u=e('create-hmac');function i(e){let t=r('sha256').update(e).digest();try{return r('rmd160').update(t).digest()}catch(e){return r('ripemd160').update(t).digest()}}n.hash160=i;function o(e,t){return u('sha512',e).update(t).digest()}n.hmacSHA512=o},{"create-hash":88,"create-hmac":90}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./bip32");n.fromSeed=r.fromSeed;n.fromBase58=r.fromBase58;n.fromPublicKey=r.fromPublicKey;n.fromPrivateKey=r.fromPrivateKey},{"./bip32":33}],36:[function(e,t,n){var r=e('safe-buffer').Buffer;function u(e){if(e.length<8)return!1;if(e.length>72)return!1;if(e[0]!==48)return!1;if(e[1]!==e.length-2)return!1;if(e[2]!==2)return!1;var t=e[3];if(t===0)return!1;if(5+t>=e.length)return!1;if(e[4+t]!==2)return!1;var n=e[5+t];if(n===0)return!1;if(6+t+n!==e.length)return!1;if(e[4]&128)return!1;if(t>1&&e[4]===0&&!(e[5]&128))return!1;if(e[t+6]&128)return!1;if(n>1&&e[t+6]===0&&!(e[t+7]&128))return!1;return!0}function i(e){if(e.length<8)throw new Error('DER sequence length is too short');if(e.length>72)throw new Error('DER sequence length is too long');if(e[0]!==48)throw new Error('Expected DER sequence');if(e[1]!==e.length-2)throw new Error('DER sequence length is invalid');if(e[2]!==2)throw new Error('Expected DER integer');var t=e[3];if(t===0)throw new Error('R length is zero');if(5+t>=e.length)throw new Error('R length is too long');if(e[4+t]!==2)throw new Error('Expected DER integer (2)');var n=e[5+t];if(n===0)throw new Error('S length is zero');if(6+t+n!==e.length)throw new Error('S length is invalid');if(e[4]&128)throw new Error('R value is negative');if(t>1&&e[4]===0&&!(e[5]&128))throw new Error('R value excessively padded');if(e[t+6]&128)throw new Error('S value is negative');if(n>1&&e[t+6]===0&&!(e[t+7]&128))throw new Error('S value excessively padded');return{r:e.slice(4,4+t),s:e.slice(6+t)}}function o(e,t){var n=e.length,u=t.length;if(n===0)throw new Error('R length is zero');if(u===0)throw new Error('S length is zero');if(n>33)throw new Error('R length is too long');if(u>33)throw new Error('S length is too long');if(e[0]&128)throw new Error('R value is negative');if(t[0]&128)throw new Error('S value is negative');if(n>1&&e[0]===0&&!(e[1]&128))throw new Error('R value excessively padded');if(u>1&&t[0]===0&&!(t[1]&128))throw new Error('S value excessively padded');var i=r.allocUnsafe(6+n+u);i[0]=48;i[1]=i.length-2;i[2]=2;i[3]=e.length;e.copy(i,4);i[4+n]=2;i[5+n]=t.length;t.copy(i,6+n);return i}t.exports={check:u,decode:i,encode:o}},{"safe-buffer":130}],37:[function(e,t,n){t.exports={"OP_FALSE":0,"OP_0":0,"OP_PUSHDATA1":76,"OP_PUSHDATA2":77,"OP_PUSHDATA4":78,"OP_1NEGATE":79,"OP_RESERVED":80,"OP_TRUE":81,"OP_1":81,"OP_2":82,"OP_3":83,"OP_4":84,"OP_5":85,"OP_6":86,"OP_7":87,"OP_8":88,"OP_9":89,"OP_10":90,"OP_11":91,"OP_12":92,"OP_13":93,"OP_14":94,"OP_15":95,"OP_16":96,"OP_NOP":97,"OP_VER":98,"OP_IF":99,"OP_NOTIF":100,"OP_VERIF":101,"OP_VERNOTIF":102,"OP_ELSE":103,"OP_ENDIF":104,"OP_VERIFY":105,"OP_RETURN":106,"OP_TOALTSTACK":107,"OP_FROMALTSTACK":108,"OP_2DROP":109,"OP_2DUP":110,"OP_3DUP":111,"OP_2OVER":112,"OP_2ROT":113,"OP_2SWAP":114,"OP_IFDUP":115,"OP_DEPTH":116,"OP_DROP":117,"OP_DUP":118,"OP_NIP":119,"OP_OVER":120,"OP_PICK":121,"OP_ROLL":122,"OP_ROT":123,"OP_SWAP":124,"OP_TUCK":125,"OP_CAT":126,"OP_SUBSTR":127,"OP_LEFT":128,"OP_RIGHT":129,"OP_SIZE":130,"OP_INVERT":131,"OP_AND":132,"OP_OR":133,"OP_XOR":134,"OP_EQUAL":135,"OP_EQUALVERIFY":136,"OP_RESERVED1":137,"OP_RESERVED2":138,"OP_1ADD":139,"OP_1SUB":140,"OP_2MUL":141,"OP_2DIV":142,"OP_NEGATE":143,"OP_ABS":144,"OP_NOT":145,"OP_0NOTEQUAL":146,"OP_ADD":147,"OP_SUB":148,"OP_MUL":149,"OP_DIV":150,"OP_MOD":151,"OP_LSHIFT":152,"OP_RSHIFT":153,"OP_BOOLAND":154,"OP_BOOLOR":155,"OP_NUMEQUAL":156,"OP_NUMEQUALVERIFY":157,"OP_NUMNOTEQUAL":158,"OP_LESSTHAN":159,"OP_GREATERTHAN":160,"OP_LESSTHANOREQUAL":161,"OP_GREATERTHANOREQUAL":162,"OP_MIN":163,"OP_MAX":164,"OP_WITHIN":165,"OP_RIPEMD160":166,"OP_SHA1":167,"OP_SHA256":168,"OP_HASH160":169,"OP_HASH256":170,"OP_CODESEPARATOR":171,"OP_CHECKSIG":172,"OP_CHECKSIGVERIFY":173,"OP_CHECKMULTISIG":174,"OP_CHECKMULTISIGVERIFY":175,"OP_NOP1":176,"OP_NOP2":177,"OP_CHECKLOCKTIMEVERIFY":177,"OP_NOP3":178,"OP_CHECKSEQUENCEVERIFY":178,"OP_NOP4":179,"OP_NOP5":180,"OP_NOP6":181,"OP_NOP7":182,"OP_NOP8":183,"OP_NOP9":184,"OP_NOP10":185,"OP_PUBKEYHASH":253,"OP_PUBKEY":254,"OP_INVALIDOPCODE":255}},{}],38:[function(e,t,n){var r=e('./index.json'),u={};for(var i in r){var o=r[i];u[o]=i}t.exports=u},{"./index.json":37}],39:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./networks"),u=e("./payments"),i=e("./script"),o=e("./types"),f=e('bech32'),c=e('bs58check'),a=e('typeforce');function d(e){let t=c.decode(e);if(t.length<21)throw new TypeError(e+' is too short');if(t.length>21)throw new TypeError(e+' is too long');let n=t.readUInt8(0),r=t.slice(1);return{version:n,hash:r}}n.fromBase58Check=d;function s(e){let n=f.decode(e),r=f.fromWords(n.words.slice(1));return{version:n.words[0],prefix:n.prefix,data:t.from(r)}}n.fromBech32=s;function l(e,n){a(o.tuple(o.Hash160bit,o.UInt8),arguments);let r=t.allocUnsafe(21);r.writeUInt8(n,0);e.copy(r,1);return c.encode(r)}n.toBase58Check=l;function p(e,t,n){let r=f.toWords(e);r.unshift(t);return f.encode(n,r)}n.toBech32=p;function b(e,t){t=t||r.bitcoin;try{return u.p2pkh({output:e,network:t}).address}catch(e){};try{return u.p2sh({output:e,network:t}).address}catch(e){};try{return u.p2wpkh({output:e,network:t}).address}catch(e){};try{return u.p2wsh({output:e,network:t}).address}catch(e){};throw new Error(i.toASM(e)+' has no matching Address')}n.fromOutputScript=b;function h(e,t){t=t||r.bitcoin;let n,i;try{n=d(e)}catch(e){};if(n){if(n.version===t.pubKeyHash)return u.p2pkh({hash:n.hash}).output;if(n.version===t.scriptHash)return u.p2sh({hash:n.hash}).output}else{try{i=s(e)}catch(e){};if(i){if(i.prefix!==t.bech32)throw new Error(e+' has an invalid prefix');if(i.version===0){if(i.data.length===20)return u.p2wpkh({hash:i.data}).output;if(i.data.length===32)return u.p2wsh({hash:i.data}).output}}}throw new Error(e+' has no matching Script')}n.toOutputScript=h}).call(this,e("buffer").Buffer)},{"./networks":45,"./payments":47,"./script":55,"./types":81,"bech32":32,"bs58check":86,"buffer":3,"typeforce":143}],40:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./bufferutils"),u=e("./crypto"),i=e("./transaction"),o=e("./types"),f=e('merkle-lib/fastRoot'),c=e('typeforce'),a=e('varuint-bitcoin'),d=new TypeError('Cannot compute merkle root for zero transactions'),s=new TypeError('Cannot compute witness commit for non-segwit block');class l{constructor(){this.version=1;this.prevHash=void 0;this.merkleRoot=void 0;this.timestamp=0;this.witnessCommit=void 0;this.bits=0;this.nonce=0;this.transactions=void 0}static fromBuffer(e){if(e.length<80)throw new Error('Buffer too small (< 80 bytes)');let t=0,n=n=>{t+=n;return e.slice(t-n,t)},r=()=>{let n=e.readUInt32LE(t);t+=4;return n},u=()=>{let n=e.readInt32LE(t);t+=4;return n},o=new l;o.version=u();o.prevHash=n(32);o.merkleRoot=n(32);o.timestamp=r();o.bits=r();o.nonce=r();if(e.length===80)return o;let f=()=>{let n=a.decode(e,t);t+=a.decode.bytes;return n},c=()=>{let n=i.Transaction.fromBuffer(e.slice(t),!0);t+=n.byteLength();return n},d=f();o.transactions=[];for(let e=0;e<d;++e){let e=c();o.transactions.push(e)}let s=o.getWitnessCommit();s&&(o.witnessCommit=s);return o}static fromHex(e){return l.fromBuffer(t.from(e,'hex'))}static calculateTarget(e){let n=((e&4278190080)>>24)-3,r=e&8388607,u=t.alloc(32,0);u.writeUIntBE(r,29-n,3);return u}static calculateMerkleRoot(e,n){c([{getHash:o.Function}],e);if(e.length===0)throw d;if(n&&!p(e))throw s;let r=e.map(e=>e.getHash(n)),i=f(r,u.hash256);return n?u.hash256(t.concat([i,e[0].ins[0].witness[0]])):i}getWitnessCommit(){if(!p(this.transactions))return null;let e=this.transactions[0].outs.filter(e=>e.script.slice(0,6).equals(t.from('6a24aa21a9ed','hex'))).map(e=>e.script.slice(6,38));if(e.length===0)return null;let n=e[e.length-1];if(!(n instanceof t&&n.length===32))return null;return n}hasWitnessCommit(){if(this.witnessCommit instanceof t&&this.witnessCommit.length===32)return!0;if(this.getWitnessCommit()!==null)return!0;return!1}hasWitness(){return b(this.transactions)}byteLength(e){if(e||!this.transactions)return 80;return 80+a.encodingLength(this.transactions.length)+this.transactions.reduce((e,t)=>e+t.byteLength(),0)}getHash(){return u.hash256(this.toBuffer(!0))}getId(){return r.reverseBuffer(this.getHash()).toString('hex')}getUTCDate(){let e=new Date(0);e.setUTCSeconds(this.timestamp);return e}toBuffer(e){let n=t.allocUnsafe(this.byteLength(e)),r=0,u=e=>{e.copy(n,r),r+=e.length},i=e=>{n.writeInt32LE(e,r),r+=4},o=e=>{n.writeUInt32LE(e,r),r+=4};i(this.version);u(this.prevHash);u(this.merkleRoot);o(this.timestamp);o(this.bits);o(this.nonce);if(e||!this.transactions)return n;a.encode(this.transactions.length,n,r);r+=a.encode.bytes;this.transactions.forEach(e=>{let t=e.byteLength();e.toBuffer(n,r);r+=t});return n}toHex(e){return this.toBuffer(e).toString('hex')}checkTxRoots(){let e=this.hasWitnessCommit();if(!e&&this.hasWitness())return!1;return this.__checkMerkleRoot()&&(e?this.__checkWitnessCommit():!0)}checkProofOfWork(){let e=r.reverseBuffer(this.getHash()),t=l.calculateTarget(this.bits);return e.compare(t)<=0}__checkMerkleRoot(){if(!this.transactions)throw d;let e=l.calculateMerkleRoot(this.transactions);return this.merkleRoot.compare(e)===0}__checkWitnessCommit(){if(!this.transactions)throw d;if(!this.hasWitnessCommit())throw s;let e=l.calculateMerkleRoot(this.transactions,!0);return this.witnessCommit.compare(e)===0}}n.Block=l;function p(e){return e instanceof Array&&e[0]&&e[0].ins&&e[0].ins instanceof Array&&e[0].ins[0]&&e[0].ins[0].witness&&e[0].ins[0].witness instanceof Array&&e[0].ins[0].witness.length>0}function b(e){return e instanceof Array&&e.some(e=>typeof e==='object'&&e.ins instanceof Array&&e.ins.some(e=>typeof e==='object'&&e.witness instanceof Array&&e.witness.length>0))}}).call(this,e("buffer").Buffer)},{"./bufferutils":41,"./crypto":43,"./transaction":79,"./types":81,"buffer":3,"merkle-lib/fastRoot":124,"typeforce":143,"varuint-bitcoin":145}],41:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(e,t){if(typeof e!=='number')throw new Error('cannot write a non-number as a number');if(e<0)throw new Error('specified a negative value for writing an unsigned value');if(e>t)throw new Error('RangeError: value out of range');if(Math.floor(e)!==e)throw new Error('value has a fractional component')}function u(e,t){let n=e.readUInt32LE(t),u=e.readUInt32LE(t+4);u*=4294967296;r(u+n,9007199254740991);return u+n}n.readUInt64LE=u;function i(e,t,n){r(t,9007199254740991);e.writeInt32LE(t&-1,n);e.writeUInt32LE(Math.floor(t/4294967296),n+4);return n+8}n.writeUInt64LE=i;function o(e){if(e.length<1)return e;let t=e.length-1,n=0;for(let r=0;r<e.length/2;r++)n=e[r],e[r]=e[t],e[t]=n,t--;return e}n.reverseBuffer=o},{}],42:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./script"),u=e("./templates/multisig"),i=e("./templates/nulldata"),o=e("./templates/pubkey"),f=e("./templates/pubkeyhash"),c=e("./templates/scripthash"),a=e("./templates/witnesscommitment"),d=e("./templates/witnesspubkeyhash"),s=e("./templates/witnessscripthash"),l={P2MS:'multisig',NONSTANDARD:'nonstandard',NULLDATA:'nulldata',P2PK:'pubkey',P2PKH:'pubkeyhash',P2SH:'scripthash',P2WPKH:'witnesspubkeyhash',P2WSH:'witnessscripthash',WITNESS_COMMITMENT:'witnesscommitment'};n.types=l;function p(e){if(d.output.check(e))return l.P2WPKH;if(s.output.check(e))return l.P2WSH;if(f.output.check(e))return l.P2PKH;if(c.output.check(e))return l.P2SH;let t=r.decompile(e);if(!t)throw new TypeError('Invalid script');if(u.output.check(t))return l.P2MS;if(o.output.check(t))return l.P2PK;if(a.output.check(t))return l.WITNESS_COMMITMENT;if(i.output.check(t))return l.NULLDATA;return l.NONSTANDARD}n.output=p;function b(e,t){let n=r.decompile(e);if(!n)throw new TypeError('Invalid script');if(f.input.check(n))return l.P2PKH;if(c.input.check(n,t))return l.P2SH;if(u.input.check(n,t))return l.P2MS;if(o.input.check(n))return l.P2PK;return l.NONSTANDARD}n.input=b;function h(e,t){let n=r.decompile(e);if(!n)throw new TypeError('Invalid script');if(d.input.check(n))return l.P2WPKH;if(s.input.check(n,t))return l.P2WSH;return l.NONSTANDARD}n.witness=h},{"./script":55,"./templates/multisig":58,"./templates/nulldata":61,"./templates/pubkey":62,"./templates/pubkeyhash":65,"./templates/scripthash":68,"./templates/witnesscommitment":71,"./templates/witnesspubkeyhash":73,"./templates/witnessscripthash":76}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e('create-hash');function u(e){try{return r('rmd160').update(e).digest()}catch(t){return r('ripemd160').update(e).digest()}}n.ripemd160=u;function i(e){return r('sha1').update(e).digest()}n.sha1=i;function o(e){return r('sha256').update(e).digest()}n.sha256=o;function f(e){return u(o(e))}n.hash160=f;function c(e){return o(o(e))}n.hash256=c},{"create-hash":88}],44:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./networks"),u=e("./types"),i=e('tiny-secp256k1'),o=e('randombytes'),f=e('typeforce'),c=e('wif'),a=f.maybe(f.compile({compressed:u.maybe(u.Boolean),network:u.maybe(u.Network)}));class d{constructor(e,t,n){this.__D=e;this.__Q=t;n===void 0&&(n={});this.compressed=n.compressed===void 0?!0:n.compressed;this.network=n.network||r.bitcoin;t!==void 0&&(this.__Q=i.pointCompress(t,this.compressed))}get privateKey(){return this.__D}get publicKey(){this.__Q||(this.__Q=i.pointFromScalar(this.__D,this.compressed));return this.__Q}toWIF(){if(!this.__D)throw new Error('Missing private key');return c.encode(this.network.wif,this.__D,this.compressed)}sign(e){if(!this.__D)throw new Error('Missing private key');return i.sign(e,this.__D)}verify(e,t){return i.verify(e,this.publicKey,t)}}function s(e,t){f(u.Buffer256bit,e);if(!i.isPrivate(e))throw new TypeError('Private key not in range [1, n)');f(a,t);return new d(e,void 0,t)}n.fromPrivateKey=s;function l(e,t){f(i.isPoint,e);f(a,t);return new d(void 0,e,t)}n.fromPublicKey=l;function p(e,t){let n=c.decode(e),i=n.version;if(u.Array(t)){t=t.filter(e=>{return i===e.wif}).pop();if(!t)throw new Error('Unknown network version')}else{t=t||r.bitcoin;if(i!==t.wif)throw new Error('Invalid network version')}return s(n.privateKey,{compressed:n.compressed,network:t})}n.fromWIF=p;function b(e){f(a,e);e===void 0&&(e={});let t=e.rng||o,n;do{n=t(32),f(u.Buffer256bit,n)}while(!i.isPrivate(n));return s(n,e)}n.makeRandom=b},{"./networks":45,"./types":81,"randombytes":128,"tiny-secp256k1":139,"typeforce":143,"wif":146}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.bitcoin={messagePrefix:'\x18Bitcoin Signed Message:\n',bech32:'bc',bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128};n.regtest={messagePrefix:'\x18Bitcoin Signed Message:\n',bech32:'bcrt',bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239};n.testnet={messagePrefix:'\x18Bitcoin Signed Message:\n',bech32:'tb',bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239}},{}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../networks"),u=e("../script"),i=e("./lazy"),o=e('typeforce'),f=u.OPS;function c(e,t){if(e.length!==t.length)return!1;return e.every((e,n)=>{return e.equals(t[n])})}function a(e,t){if(!e.data&&!e.output)throw new TypeError('Not enough data');t=Object.assign({validate:!0},t||{});o({network:o.maybe(o.Object),output:o.maybe(o.Buffer),data:o.maybe(o.arrayOf(o.Buffer))},e);let n=e.network||r.bitcoin,a={network:n};i.prop(a,'output',()=>{if(!e.data)return;return u.compile([f.OP_RETURN].concat(e.data))});i.prop(a,'data',()=>{if(!e.output)return;return u.decompile(e.output).slice(1)});if(t.validate){if(e.output){let t=u.decompile(e.output);if(t[0]!==f.OP_RETURN)throw new TypeError('Output is invalid');if(!t.slice(1).every(o.Buffer))throw new TypeError('Output is invalid');if(e.data&&!c(e.data,a.data))throw new TypeError('Data mismatch')}}return Object.assign(a,e)}n.p2data=a},{"../networks":45,"../script":55,"./lazy":48,"typeforce":143}],47:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./embed");n.embed=r.p2data;let u=e("./p2ms");n.p2ms=u.p2ms;let i=e("./p2pk");n.p2pk=i.p2pk;let o=e("./p2pkh");n.p2pkh=o.p2pkh;let f=e("./p2sh");n.p2sh=f.p2sh;let c=e("./p2wpkh");n.p2wpkh=c.p2wpkh;let a=e("./p2wsh");n.p2wsh=a.p2wsh},{"./embed":46,"./p2ms":49,"./p2pk":50,"./p2pkh":51,"./p2sh":52,"./p2wpkh":53,"./p2wsh":54}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let e=n.call(this);this[t]=e;return e},set(e){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:e,writable:!0})}})}n.prop=r;function u(e){let t;return()=>{if(t!==void 0)return t;t=e();return t}}n.value=u},{}],49:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../networks"),u=e("../script"),i=e("./lazy"),o=u.OPS,f=e('typeforce'),c=e('tiny-secp256k1'),a=o.OP_RESERVED;function d(e,t){if(e.length!==t.length)return!1;return e.every((e,n)=>{return e.equals(t[n])})}function s(e,t){if(!e.input&&!e.output&&!(e.pubkeys&&e.m!==void 0)&&!e.signatures)throw new TypeError('Not enough data');t=Object.assign({validate:!0},t||{});function n(e){return u.isCanonicalScriptSignature(e)||(t.allowIncomplete&&e===o.OP_0)!==void 0}f({network:f.maybe(f.Object),m:f.maybe(f.Number),n:f.maybe(f.Number),output:f.maybe(f.Buffer),pubkeys:f.maybe(f.arrayOf(c.isPoint)),signatures:f.maybe(f.arrayOf(n)),input:f.maybe(f.Buffer)},e);let s=e.network||r.bitcoin,l={network:s},p=[],b=!1;function h(e){if(b)return;b=!0;p=u.decompile(e);l.m=p[0]-a;l.n=p[p.length-2]-a;l.pubkeys=p.slice(1,-2)}i.prop(l,'output',()=>{if(!e.m)return;if(!l.n)return;if(!e.pubkeys)return;return u.compile([].concat(a+e.m,e.pubkeys,a+l.n,o.OP_CHECKMULTISIG))});i.prop(l,'m',()=>{if(!l.output)return;h(l.output);return l.m});i.prop(l,'n',()=>{if(!l.pubkeys)return;return l.pubkeys.length});i.prop(l,'pubkeys',()=>{if(!e.output)return;h(e.output);return l.pubkeys});i.prop(l,'signatures',()=>{if(!e.input)return;return u.decompile(e.input).slice(1)});i.prop(l,'input',()=>{if(!e.signatures)return;return u.compile([o.OP_0].concat(e.signatures))});i.prop(l,'witness',()=>{if(!l.input)return;return[]});if(t.validate){if(e.output){h(e.output);if(!f.Number(p[0]))throw new TypeError('Output is invalid');if(!f.Number(p[p.length-2]))throw new TypeError('Output is invalid');if(p[p.length-1]!==o.OP_CHECKMULTISIG)throw new TypeError('Output is invalid');if(l.m<=0||l.n>16||l.m>l.n||l.n!==p.length-3)throw new TypeError('Output is invalid');if(!l.pubkeys.every(e=>c.isPoint(e)))throw new TypeError('Output is invalid');if(e.m!==void 0&&e.m!==l.m)throw new TypeError('m mismatch');if(e.n!==void 0&&e.n!==l.n)throw new TypeError('n mismatch');if(e.pubkeys&&!d(e.pubkeys,l.pubkeys))throw new TypeError('Pubkeys mismatch')}if(e.pubkeys){if(e.n!==void 0&&e.n!==e.pubkeys.length)throw new TypeError('Pubkey count mismatch');l.n=e.pubkeys.length;if(l.n<l.m)throw new TypeError('Pubkey count cannot be less than m')}if(e.signatures){if(e.signatures.length<l.m)throw new TypeError('Not enough signatures provided');if(e.signatures.length>l.m)throw new TypeError('Too many signatures provided')}if(e.input){if(e.input[0]!==o.OP_0)throw new TypeError('Input is invalid');if(l.signatures.length===0||!l.signatures.every(n))throw new TypeError('Input has invalid signature(s)');if(e.signatures&&!d(e.signatures,l.signatures))throw new TypeError('Signature mismatch');if(e.m!==void 0&&e.m!==e.signatures.length)throw new TypeError('Signature count mismatch')}}return Object.assign(l,e)}n.p2ms=s},{"../networks":45,"../script":55,"./lazy":48,"tiny-secp256k1":139,"typeforce":143}],50:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../networks"),u=e("../script"),i=e("./lazy"),o=e('typeforce'),f=u.OPS,c=e('tiny-secp256k1');function a(e,t){if(!e.input&&!e.output&&!e.pubkey&&!e.input&&!e.signature)throw new TypeError('Not enough data');t=Object.assign({validate:!0},t||{});o({network:o.maybe(o.Object),output:o.maybe(o.Buffer),pubkey:o.maybe(c.isPoint),signature:o.maybe(u.isCanonicalScriptSignature),input:o.maybe(o.Buffer)},e);let n=i.value(()=>{return u.decompile(e.input)}),a=e.network||r.bitcoin,d={network:a};i.prop(d,'output',()=>{if(!e.pubkey)return;return u.compile([e.pubkey,f.OP_CHECKSIG])});i.prop(d,'pubkey',()=>{if(!e.output)return;return e.output.slice(1,-1)});i.prop(d,'signature',()=>{if(!e.input)return;return n()[0]});i.prop(d,'input',()=>{if(!e.signature)return;return u.compile([e.signature])});i.prop(d,'witness',()=>{if(!d.input)return;return[]});if(t.validate){if(e.output){if(e.output[e.output.length-1]!==f.OP_CHECKSIG)throw new TypeError('Output is invalid');if(!c.isPoint(d.pubkey))throw new TypeError('Output pubkey is invalid');if(e.pubkey&&!e.pubkey.equals(d.pubkey))throw new TypeError('Pubkey mismatch')}if(e.signature){if(e.input&&!e.input.equals(d.input))throw new TypeError('Signature mismatch')}if(e.input){if(n().length!==1)throw new TypeError('Input is invalid');if(!u.isCanonicalScriptSignature(d.signature))throw new TypeError('Input has invalid signature')}}return Object.assign(d,e)}n.p2pk=a},{"../networks":45,"../script":55,"./lazy":48,"tiny-secp256k1":139,"typeforce":143}],51:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../crypto"),u=e("../networks"),i=e("../script"),o=e("./lazy"),f=e('typeforce'),c=i.OPS,a=e('tiny-secp256k1'),d=e('bs58check');function s(e,n){if(!e.address&&!e.hash&&!e.output&&!e.pubkey&&!e.input)throw new TypeError('Not enough data');n=Object.assign({validate:!0},n||{});f({network:f.maybe(f.Object),address:f.maybe(f.String),hash:f.maybe(f.BufferN(20)),output:f.maybe(f.BufferN(25)),pubkey:f.maybe(a.isPoint),signature:f.maybe(i.isCanonicalScriptSignature),input:f.maybe(f.Buffer)},e);let s=o.value(()=>{let t=d.decode(e.address),n=t.readUInt8(0),r=t.slice(1);return{version:n,hash:r}}),l=o.value(()=>{return i.decompile(e.input)}),p=e.network||u.bitcoin,b={network:p};o.prop(b,'address',()=>{if(!b.hash)return;let e=t.allocUnsafe(21);e.writeUInt8(p.pubKeyHash,0);b.hash.copy(e,1);return d.encode(e)});o.prop(b,'hash',()=>{if(e.output)return e.output.slice(3,23);if(e.address)return s().hash;if(e.pubkey||b.pubkey)return r.hash160(e.pubkey||b.pubkey)});o.prop(b,'output',()=>{if(!b.hash)return;return i.compile([c.OP_DUP,c.OP_HASH160,b.hash,c.OP_EQUALVERIFY,c.OP_CHECKSIG])});o.prop(b,'pubkey',()=>{if(!e.input)return;return l()[1]});o.prop(b,'signature',()=>{if(!e.input)return;return l()[0]});o.prop(b,'input',()=>{if(!e.pubkey)return;if(!e.signature)return;return i.compile([e.signature,e.pubkey])});o.prop(b,'witness',()=>{if(!b.input)return;return[]});if(n.validate){let n=t.from([]);if(e.address){if(s().version!==p.pubKeyHash)throw new TypeError('Invalid version or Network mismatch');if(s().hash.length!==20)throw new TypeError('Invalid address');n=s().hash}if(e.hash){if(n.length>0&&!n.equals(e.hash))throw new TypeError('Hash mismatch');else n=e.hash}if(e.output){if(e.output.length!==25||e.output[0]!==c.OP_DUP||e.output[1]!==c.OP_HASH160||e.output[2]!==20||e.output[23]!==c.OP_EQUALVERIFY||e.output[24]!==c.OP_CHECKSIG)throw new TypeError('Output is invalid');let t=e.output.slice(3,23);if(n.length>0&&!n.equals(t))throw new TypeError('Hash mismatch');else n=t}if(e.pubkey){let t=r.hash160(e.pubkey);if(n.length>0&&!n.equals(t))throw new TypeError('Hash mismatch');else n=t}if(e.input){let t=l();if(t.length!==2)throw new TypeError('Input is invalid');if(!i.isCanonicalScriptSignature(t[0]))throw new TypeError('Input has invalid signature');if(!a.isPoint(t[1]))throw new TypeError('Input has invalid pubkey');if(e.signature&&!e.signature.equals(t[0]))throw new TypeError('Signature mismatch');if(e.pubkey&&!e.pubkey.equals(t[1]))throw new TypeError('Pubkey mismatch');let u=r.hash160(t[1]);if(n.length>0&&!n.equals(u))throw new TypeError('Hash mismatch')}}return Object.assign(b,e)}n.p2pkh=s}).call(this,e("buffer").Buffer)},{"../crypto":43,"../networks":45,"../script":55,"./lazy":48,"bs58check":86,"buffer":3,"tiny-secp256k1":139,"typeforce":143}],52:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../crypto"),u=e("../networks"),i=e("../script"),o=e("./lazy"),f=e('typeforce'),c=i.OPS,a=e('bs58check');function d(e,t){if(e.length!==t.length)return!1;return e.every((e,n)=>{return e.equals(t[n])})}function s(e,n){if(!e.address&&!e.hash&&!e.output&&!e.redeem&&!e.input)throw new TypeError('Not enough data');n=Object.assign({validate:!0},n||{});f({network:f.maybe(f.Object),address:f.maybe(f.String),hash:f.maybe(f.BufferN(20)),output:f.maybe(f.BufferN(23)),redeem:f.maybe({network:f.maybe(f.Object),output:f.maybe(f.Buffer),input:f.maybe(f.Buffer),witness:f.maybe(f.arrayOf(f.Buffer))}),input:f.maybe(f.Buffer),witness:f.maybe(f.arrayOf(f.Buffer))},e);let s=e.network;s||(s=e.redeem&&e.redeem.network||u.bitcoin);let l={network:s},p=o.value(()=>{let t=a.decode(e.address),n=t.readUInt8(0),r=t.slice(1);return{version:n,hash:r}}),b=o.value(()=>{return i.decompile(e.input)}),h=o.value(()=>{let t=b();return{network:s,output:t[t.length-1],input:i.compile(t.slice(0,-1)),witness:e.witness||[]}});o.prop(l,'address',()=>{if(!l.hash)return;let e=t.allocUnsafe(21);e.writeUInt8(l.network.scriptHash,0);l.hash.copy(e,1);return a.encode(e)});o.prop(l,'hash',()=>{if(e.output)return e.output.slice(2,22);if(e.address)return p().hash;if(l.redeem&&l.redeem.output)return r.hash160(l.redeem.output)});o.prop(l,'output',()=>{if(!l.hash)return;return i.compile([c.OP_HASH160,l.hash,c.OP_EQUAL])});o.prop(l,'redeem',()=>{if(!e.input)return;return h()});o.prop(l,'input',()=>{if(!e.redeem||!e.redeem.input||!e.redeem.output)return;return i.compile([].concat(i.decompile(e.redeem.input),e.redeem.output))});o.prop(l,'witness',()=>{if(l.redeem&&l.redeem.witness)return l.redeem.witness;if(l.input)return[]});if(n.validate){let n=t.from([]);if(e.address){if(p().version!==s.scriptHash)throw new TypeError('Invalid version or Network mismatch');if(p().hash.length!==20)throw new TypeError('Invalid address');n=p().hash}if(e.hash){if(n.length>0&&!n.equals(e.hash))throw new TypeError('Hash mismatch');else n=e.hash}if(e.output){if(e.output.length!==23||e.output[0]!==c.OP_HASH160||e.output[1]!==20||e.output[22]!==c.OP_EQUAL)throw new TypeError('Output is invalid');let t=e.output.slice(2,22);if(n.length>0&&!n.equals(t))throw new TypeError('Hash mismatch');else n=t}let u=e=>{if(e.output){let t=i.decompile(e.output);if(!t||t.length<1)throw new TypeError('Redeem.output too short');let u=r.hash160(e.output);if(n.length>0&&!n.equals(u))throw new TypeError('Hash mismatch');else n=u}if(e.input){let t=e.input.length>0,n=e.witness&&e.witness.length>0;if(!t&&!n)throw new TypeError('Empty input');if(t&&n)throw new TypeError('Input and witness provided');if(t){let t=i.decompile(e.input);if(!i.isPushOnly(t))throw new TypeError('Non push-only scriptSig')}}};if(e.input){let e=b();if(!e||e.length<1)throw new TypeError('Input too short');if(!t.isBuffer(h().output))throw new TypeError('Input is invalid');u(h())}if(e.redeem){if(e.redeem.network&&e.redeem.network!==s)throw new TypeError('Network mismatch');if(e.input){let t=h();if(e.redeem.output&&!e.redeem.output.equals(t.output))throw new TypeError('Redeem.output mismatch');if(e.redeem.input&&!e.redeem.input.equals(t.input))throw new TypeError('Redeem.input mismatch')}u(e.redeem)}if(e.witness){if(e.redeem&&e.redeem.witness&&!d(e.redeem.witness,e.witness))throw new TypeError('Witness and redeem.witness mismatch')}}return Object.assign(l,e)}n.p2sh=s}).call(this,e("buffer").Buffer)},{"../crypto":43,"../networks":45,"../script":55,"./lazy":48,"bs58check":86,"buffer":3,"typeforce":143}],53:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../crypto"),u=e("../networks"),i=e("../script"),o=e("./lazy"),f=e('typeforce'),c=i.OPS,a=e('tiny-secp256k1'),d=e('bech32'),s=t.alloc(0);function l(e,n){if(!e.address&&!e.hash&&!e.output&&!e.pubkey&&!e.witness)throw new TypeError('Not enough data');n=Object.assign({validate:!0},n||{});f({address:f.maybe(f.String),hash:f.maybe(f.BufferN(20)),input:f.maybe(f.BufferN(0)),network:f.maybe(f.Object),output:f.maybe(f.BufferN(22)),pubkey:f.maybe(a.isPoint),signature:f.maybe(i.isCanonicalScriptSignature),witness:f.maybe(f.arrayOf(f.Buffer))},e);let l=o.value(()=>{let n=d.decode(e.address),r=n.words.shift(),u=d.fromWords(n.words);return{version:r,prefix:n.prefix,data:t.from(u)}}),p=e.network||u.bitcoin,b={network:p};o.prop(b,'address',()=>{if(!b.hash)return;let e=d.toWords(b.hash);e.unshift(0);return d.encode(p.bech32,e)});o.prop(b,'hash',()=>{if(e.output)return e.output.slice(2,22);if(e.address)return l().data;if(e.pubkey||b.pubkey)return r.hash160(e.pubkey||b.pubkey)});o.prop(b,'output',()=>{if(!b.hash)return;return i.compile([c.OP_0,b.hash])});o.prop(b,'pubkey',()=>{if(e.pubkey)return e.pubkey;if(!e.witness)return;return e.witness[1]});o.prop(b,'signature',()=>{if(!e.witness)return;return e.witness[0]});o.prop(b,'input',()=>{if(!b.witness)return;return s});o.prop(b,'witness',()=>{if(!e.pubkey)return;if(!e.signature)return;return[e.signature,e.pubkey]});if(n.validate){let n=t.from([]);if(e.address){if(p&&p.bech32!==l().prefix)throw new TypeError('Invalid prefix or Network mismatch');if(l().version!==0)throw new TypeError('Invalid address version');if(l().data.length!==20)throw new TypeError('Invalid address data');n=l().data}if(e.hash){if(n.length>0&&!n.equals(e.hash))throw new TypeError('Hash mismatch');else n=e.hash}if(e.output){if(e.output.length!==22||e.output[0]!==c.OP_0||e.output[1]!==20)throw new TypeError('Output is invalid');if(n.length>0&&!n.equals(e.output.slice(2)))throw new TypeError('Hash mismatch');else n=e.output.slice(2)}if(e.pubkey){let t=r.hash160(e.pubkey);if(n.length>0&&!n.equals(t))throw new TypeError('Hash mismatch');else n=t}if(e.witness){if(e.witness.length!==2)throw new TypeError('Witness is invalid');if(!i.isCanonicalScriptSignature(e.witness[0]))throw new TypeError('Witness has invalid signature');if(!a.isPoint(e.witness[1]))throw new TypeError('Witness has invalid pubkey');if(e.signature&&!e.signature.equals(e.witness[0]))throw new TypeError('Signature mismatch');if(e.pubkey&&!e.pubkey.equals(e.witness[1]))throw new TypeError('Pubkey mismatch');let t=r.hash160(e.witness[1]);if(n.length>0&&!n.equals(t))throw new TypeError('Hash mismatch')}}return Object.assign(b,e)}n.p2wpkh=l}).call(this,e("buffer").Buffer)},{"../crypto":43,"../networks":45,"../script":55,"./lazy":48,"bech32":32,"buffer":3,"tiny-secp256k1":139,"typeforce":143}],54:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../crypto"),u=e("../networks"),i=e("../script"),o=e("./lazy"),f=e('typeforce'),c=i.OPS,a=e('bech32'),d=t.alloc(0);function s(e,t){if(e.length!==t.length)return!1;return e.every((e,n)=>{return e.equals(t[n])})}function l(e,n){if(!e.address&&!e.hash&&!e.output&&!e.redeem&&!e.witness)throw new TypeError('Not enough data');n=Object.assign({validate:!0},n||{});f({network:f.maybe(f.Object),address:f.maybe(f.String),hash:f.maybe(f.BufferN(32)),output:f.maybe(f.BufferN(34)),redeem:f.maybe({input:f.maybe(f.Buffer),network:f.maybe(f.Object),output:f.maybe(f.Buffer),witness:f.maybe(f.arrayOf(f.Buffer))}),input:f.maybe(f.BufferN(0)),witness:f.maybe(f.arrayOf(f.Buffer))},e);let l=o.value(()=>{let n=a.decode(e.address),r=n.words.shift(),u=a.fromWords(n.words);return{version:r,prefix:n.prefix,data:t.from(u)}}),p=o.value(()=>{return i.decompile(e.redeem.input)}),b=e.network;b||(b=e.redeem&&e.redeem.network||u.bitcoin);let h={network:b};o.prop(h,'address',()=>{if(!h.hash)return;let e=a.toWords(h.hash);e.unshift(0);return a.encode(b.bech32,e)});o.prop(h,'hash',()=>{if(e.output)return e.output.slice(2);if(e.address)return l().data;if(h.redeem&&h.redeem.output)return r.sha256(h.redeem.output)});o.prop(h,'output',()=>{if(!h.hash)return;return i.compile([c.OP_0,h.hash])});o.prop(h,'redeem',()=>{if(!e.witness)return;return{output:e.witness[e.witness.length-1],input:d,witness:e.witness.slice(0,-1)}});o.prop(h,'input',()=>{if(!h.witness)return;return d});o.prop(h,'witness',()=>{if(e.redeem&&e.redeem.input&&e.redeem.input.length>0&&e.redeem.output&&e.redeem.output.length>0){let t=i.toStack(p());h.redeem=Object.assign({witness:t},e.redeem);h.redeem.input=d;return[].concat(t,e.redeem.output)}if(!e.redeem)return;if(!e.redeem.output)return;if(!e.redeem.witness)return;return[].concat(e.redeem.witness,e.redeem.output)});if(n.validate){let n=t.from([]);if(e.address){if(l().prefix!==b.bech32)throw new TypeError('Invalid prefix or Network mismatch');if(l().version!==0)throw new TypeError('Invalid address version');if(l().data.length!==32)throw new TypeError('Invalid address data');n=l().data}if(e.hash){if(n.length>0&&!n.equals(e.hash))throw new TypeError('Hash mismatch');else n=e.hash}if(e.output){if(e.output.length!==34||e.output[0]!==c.OP_0||e.output[1]!==32)throw new TypeError('Output is invalid');let t=e.output.slice(2);if(n.length>0&&!n.equals(t))throw new TypeError('Hash mismatch');else n=t}if(e.redeem){if(e.redeem.network&&e.redeem.network!==b)throw new TypeError('Network mismatch');if(e.redeem.input&&e.redeem.input.length>0&&e.redeem.witness&&e.redeem.witness.length>0)throw new TypeError('Ambiguous witness source');if(e.redeem.output){if(i.decompile(e.redeem.output).length===0)throw new TypeError('Redeem.output is invalid');let t=r.sha256(e.redeem.output);if(n.length>0&&!n.equals(t))throw new TypeError('Hash mismatch');else n=t}if(e.redeem.input&&!i.isPushOnly(p()))throw new TypeError('Non push-only scriptSig');if(e.witness&&e.redeem.witness&&!s(e.witness,e.redeem.witness))throw new TypeError('Witness and redeem.witness mismatch')}if(e.witness){if(e.redeem&&e.redeem.output&&!e.redeem.output.equals(e.witness[e.witness.length-1]))throw new TypeError('Witness and redeem.output mismatch')}}return Object.assign(h,e)}n.p2wsh=l}).call(this,e("buffer").Buffer)},{"../crypto":43,"../networks":45,"../script":55,"./lazy":48,"bech32":32,"buffer":3,"typeforce":143}],55:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./script_number"),u=e("./script_signature"),i=e("./types"),o=e('bip66'),f=e('tiny-secp256k1'),c=e('pushdata-bitcoin'),a=e('typeforce');n.OPS=e('bitcoin-ops');let d=e('bitcoin-ops/map'),s=n.OPS.OP_RESERVED;function l(e){return i.Number(e)&&(e===n.OPS.OP_0||e>=n.OPS.OP_1&&e<=n.OPS.OP_16||e===n.OPS.OP_1NEGATE)}function p(e){return i.Buffer(e)||l(e)}function b(e){return i.Array(e)&&e.every(p)}n.isPushOnly=b;function h(e){if(e.length===0)return n.OPS.OP_0;if(e.length!==1)return;if(e[0]>=1&&e[0]<=16)return s+e[0];if(e[0]===129)return n.OPS.OP_1NEGATE}function m(e){return t.isBuffer(e)}function g(e){return i.Array(e)}function y(e){return t.isBuffer(e)}function w(e){if(m(e))return e;a(i.Array,e);let n=e.reduce((e,t)=>{if(y(t)){if(t.length===1&&h(t)!==void 0){return e+1}return e+c.encodingLength(t.length)+t.length}return e+1},0),r=t.allocUnsafe(n),u=0;e.forEach(e=>{if(y(e)){let t=h(e);if(t!==void 0){r.writeUInt8(t,u);u+=1;return}u+=c.encode(r,e.length,u);e.copy(r,u);u+=e.length}else r.writeUInt8(e,u),u+=1});if(u!==r.length)throw new Error('Could not decode chunks');return r}n.compile=w;function _(e){if(g(e))return e;a(i.Buffer,e);let t=[],r=0;while(r<e.length){let u=e[r];if(u>n.OPS.OP_0&&u<=n.OPS.OP_PUSHDATA4){let n=c.decode(e,r);if(n===null)return null;r+=n.size;if(r+n.number>e.length)return null;let u=e.slice(r,r+n.number);r+=n.number;let i=h(u);i!==void 0?t.push(i):t.push(u)}else t.push(u),r+=1}return t}n.decompile=_;function S(e){m(e)&&(e=_(e));return e.map(e=>{if(y(e)){let t=h(e);if(t===void 0)return e.toString('hex');e=t}return d[e]}).join(' ')}n.toASM=S;function v(e){a(i.String,e);return w(e.split(' ').map(e=>{if(n.OPS[e]!==void 0)return n.OPS[e];a(i.Hex,e);return t.from(e,'hex')}))}n.fromASM=v;function k(e){e=_(e);a(b,e);return e.map(e=>{if(y(e))return e;if(e===n.OPS.OP_0)return t.allocUnsafe(0);return r.encode(e-s)})}n.toStack=k;function I(e){return f.isPoint(e)}n.isCanonicalPubKey=I;function P(e){let t=e&-129;return t>0&&t<4}n.isDefinedHashType=P;function x(e){if(!t.isBuffer(e))return!1;if(!P(e[e.length-1]))return!1;return o.check(e.slice(0,-1))}n.isCanonicalScriptSignature=x;n.number=r;n.signature=u}).call(this,e("buffer").Buffer)},{"./script_number":56,"./script_signature":57,"./types":81,"bip66":36,"bitcoin-ops":37,"bitcoin-ops/map":38,"buffer":3,"pushdata-bitcoin":127,"tiny-secp256k1":139,"typeforce":143}],56:[function(e,t,n){(function(e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function t(e,t,n){t=t||4;n=n===void 0?!0:n;let r=e.length;if(r===0)return 0;if(r>t)throw new TypeError('Script number overflow');if(n){if((e[r-1]&127)===0){if(r<=1||(e[r-2]&128)===0)throw new Error('Non-minimally encoded script number')}}if(r===5){let t=e.readUInt32LE(0),n=e.readUInt8(4);if(n&128)return-((n&-129)*4294967296+t);return n*4294967296+t}let u=0;for(let t=0;t<r;++t)u|=e[t]<<8*t;if(e[r-1]&128)return-(u&~(128<<8*(r-1)));return u}n.decode=t;function r(e){return e>2147483647?5:e>8388607?4:e>32767?3:e>127?2:e>0?1:0}function u(t){let n=Math.abs(t),u=r(n),i=e.allocUnsafe(u),o=t<0;for(let e=0;e<u;++e)i.writeUInt8(n&255,e),n>>=8;i[u-1]&128?i.writeUInt8(o?128:0,u-1):o&&(i[u-1]|=128);return i}n.encode=u}).call(this,e("buffer").Buffer)},{"buffer":3}],57:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./types"),u=e('bip66'),i=e('typeforce'),o=t.alloc(1,0);function f(e){let n=0;while(e[n]===0)++n;if(n===e.length)return o;e=e.slice(n);if(e[0]&128)return t.concat([o,e],1+e.length);return e}function c(e){e[0]===0&&(e=e.slice(1));let n=t.alloc(32,0),r=Math.max(0,32-e.length);e.copy(n,r);return n}function a(e){let n=e.readUInt8(e.length-1),r=n&-129;if(r<=0||r>=4)throw new Error('Invalid hashType '+n);let i=u.decode(e.slice(0,-1)),o=c(i.r),f=c(i.s),a=t.concat([o,f],64);return{signature:a,hashType:n}}n.decode=a;function d(e,n){i({signature:r.BufferN(64),hashType:r.UInt8},{signature:e,hashType:n});let o=n&-129;if(o<=0||o>=4)throw new Error('Invalid hashType '+n);let c=t.allocUnsafe(1);c.writeUInt8(n,0);let a=f(e.slice(0,32)),d=f(e.slice(32,64));return t.concat([u.encode(a,d),c])}n.encode=d}).call(this,e("buffer").Buffer)},{"./types":81,"bip66":36,"buffer":3,"typeforce":143}],58:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./input");n.input=r;let u=e("./output");n.output=u},{"./input":59,"./output":60}],59:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e("../../script");function i(e){return e===u.OPS.OP_0||r.isCanonicalScriptSignature(e)}function o(e,t){let n=r.decompile(e);if(n.length<2)return!1;if(n[0]!==u.OPS.OP_0)return!1;if(t){return n.slice(1).every(i)}return n.slice(1).every(r.isCanonicalScriptSignature)}n.check=o;o.toJSON=()=>{return'multisig input'}},{"../../script":55}],60:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e("../../script"),i=e("../../types"),o=u.OPS.OP_RESERVED;function f(e,t){let n=r.decompile(e);if(n.length<4)return!1;if(n[n.length-1]!==u.OPS.OP_CHECKMULTISIG)return!1;if(!i.Number(n[0]))return!1;if(!i.Number(n[n.length-2]))return!1;let f=n[0]-o,c=n[n.length-2]-o;if(f<=0)return!1;if(c>16)return!1;if(f>c)return!1;if(c!==n.length-3)return!1;if(t)return!0;let a=n.slice(1,-2);return a.every(r.isCanonicalPubKey)}n.check=f;f.toJSON=()=>{return'multi-sig output'}},{"../../script":55,"../../types":81}],61:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../script"),u=r.OPS;function i(e){let t=r.compile(e);return t.length>1&&t[0]===u.OP_RETURN}n.check=i;i.toJSON=()=>{return'null data output'};let o={check:i};n.output=o},{"../script":55}],62:[function(e,t,n){arguments[4][58][0].apply(n,arguments)},{"./input":63,"./output":64,"dup":58}],63:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script");function u(e){let t=r.decompile(e);return t.length===1&&r.isCanonicalScriptSignature(t[0])}n.check=u;u.toJSON=()=>{return'pubKey input'}},{"../../script":55}],64:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e("../../script");function i(e){let t=r.decompile(e);return t.length===2&&r.isCanonicalPubKey(t[0])&&t[1]===u.OPS.OP_CHECKSIG}n.check=i;i.toJSON=()=>{return'pubKey output'}},{"../../script":55}],65:[function(e,t,n){arguments[4][58][0].apply(n,arguments)},{"./input":66,"./output":67,"dup":58}],66:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script");function u(e){let t=r.decompile(e);return t.length===2&&r.isCanonicalScriptSignature(t[0])&&r.isCanonicalPubKey(t[1])}n.check=u;u.toJSON=()=>{return'pubKeyHash input'}},{"../../script":55}],67:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e("../../script");function i(e){let t=r.compile(e);return t.length===25&&t[0]===u.OPS.OP_DUP&&t[1]===u.OPS.OP_HASH160&&t[2]===20&&t[23]===u.OPS.OP_EQUALVERIFY&&t[24]===u.OPS.OP_CHECKSIG}n.check=i;i.toJSON=()=>{return'pubKeyHash output'}},{"../../script":55}],68:[function(e,t,n){arguments[4][58][0].apply(n,arguments)},{"./input":69,"./output":70,"dup":58}],69:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e("../multisig"),i=e("../pubkey"),o=e("../pubkeyhash"),f=e("../witnesspubkeyhash/output"),c=e("../witnessscripthash/output");function a(e,n){let a=r.decompile(e);if(a.length<1)return!1;let d=a[a.length-1];if(!t.isBuffer(d))return!1;let s=r.decompile(r.compile(a.slice(0,-1))),l=r.decompile(d);if(!l)return!1;if(!r.isPushOnly(s))return!1;if(a.length===1){return c.check(l)||f.check(l)}if(o.input.check(s)&&o.output.check(l))return!0;if(u.input.check(s,n)&&u.output.check(l))return!0;if(i.input.check(s)&&i.output.check(l))return!0;return!1}n.check=a;a.toJSON=()=>{return'scriptHash input'}}).call(this,{"isBuffer":e("../../../../../../../../../.nmv/versions/node/v8.15.1/lib/node_modules/browserify/node_modules/is-buffer/index.js")})},{"../../../../../../../../../.nmv/versions/node/v8.15.1/lib/node_modules/browserify/node_modules/is-buffer/index.js":8,"../../script":55,"../multisig":58,"../pubkey":62,"../pubkeyhash":65,"../witnesspubkeyhash/output":75,"../witnessscripthash/output":78}],70:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e("../../script");function i(e){let t=r.compile(e);return t.length===23&&t[0]===u.OPS.OP_HASH160&&t[1]===20&&t[22]===u.OPS.OP_EQUAL}n.check=i;i.toJSON=()=>{return'scriptHash output'}},{"../../script":55}],71:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./output");n.output=r},{"./output":72}],72:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e("../../script"),i=e("../../types"),o=e('typeforce'),f=t.from('aa21a9ed','hex');function c(e){let t=r.compile(e);return t.length>37&&t[0]===u.OPS.OP_RETURN&&t[1]===36&&t.slice(2,6).equals(f)}n.check=c;c.toJSON=()=>{return'Witness commitment output'};function a(e){o(i.Hash256bit,e);let n=t.allocUnsafe(36);f.copy(n,0);e.copy(n,4);return r.compile([u.OPS.OP_RETURN,n])}n.encode=a;function d(e){o(c,e);return r.decompile(e)[1].slice(4,36)}n.decode=d}).call(this,e("buffer").Buffer)},{"../../script":55,"../../types":81,"buffer":3,"typeforce":143}],73:[function(e,t,n){arguments[4][58][0].apply(n,arguments)},{"./input":74,"./output":75,"dup":58}],74:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script");function u(e){return r.isCanonicalPubKey(e)&&e.length===33}function i(e){let t=r.decompile(e);return t.length===2&&r.isCanonicalScriptSignature(t[0])&&u(t[1])}n.check=i;i.toJSON=()=>{return'witnessPubKeyHash input'}},{"../../script":55}],75:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e("../../script");function i(e){let t=r.compile(e);return t.length===22&&t[0]===u.OPS.OP_0&&t[1]===20}n.check=i;i.toJSON=()=>{return'Witness pubKeyHash output'}},{"../../script":55}],76:[function(e,t,n){arguments[4][58][0].apply(n,arguments)},{"./input":77,"./output":78,"dup":58}],77:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e('typeforce'),i=e("../multisig"),o=e("../pubkey"),f=e("../pubkeyhash");function c(e,n){u(u.Array,e);if(e.length<1)return!1;let c=e[e.length-1];if(!t.isBuffer(c))return!1;let a=r.decompile(c);if(!a||a.length===0)return!1;let d=r.compile(e.slice(0,-1));if(f.input.check(d)&&f.output.check(a))return!0;if(i.input.check(d,n)&&i.output.check(a))return!0;if(o.input.check(d)&&o.output.check(a))return!0;return!1}n.check=c;c.toJSON=()=>{return'witnessScriptHash input'}}).call(this,{"isBuffer":e("../../../../../../../../../.nmv/versions/node/v8.15.1/lib/node_modules/browserify/node_modules/is-buffer/index.js")})},{"../../../../../../../../../.nmv/versions/node/v8.15.1/lib/node_modules/browserify/node_modules/is-buffer/index.js":8,"../../script":55,"../multisig":58,"../pubkey":62,"../pubkeyhash":65,"typeforce":143}],78:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("../../script"),u=e("../../script");function i(e){let t=r.compile(e);return t.length===34&&t[0]===u.OPS.OP_0&&t[1]===32}n.check=i;i.toJSON=()=>{return'Witness scriptHash output'}},{"../../script":55}],79:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./bufferutils"),u=e("./bufferutils"),i=e("./crypto"),o=e("./script"),f=e("./script"),c=e("./types"),a=e('typeforce'),d=e('varuint-bitcoin');function s(e){let t=e.length;return d.encodingLength(t)+t}function l(e){let t=e.length;return d.encodingLength(t)+e.reduce((e,t)=>{return e+s(t)},0)}let p=t.allocUnsafe(0),b=[],h=t.from('0000000000000000000000000000000000000000000000000000000000000000','hex'),m=t.from('0000000000000000000000000000000000000000000000000000000000000001','hex'),g=t.from('ffffffffffffffff','hex'),y={script:p,valueBuffer:g};function w(e){return e.value!==void 0}class _{constructor(){this.version=1;this.locktime=0;this.ins=[];this.outs=[]}static fromBuffer(e,t){let n=0;function u(t){n+=t;return e.slice(n-t,n)}function i(){let t=e.readUInt32LE(n);n+=4;return t}function o(){let t=e.readInt32LE(n);n+=4;return t}function f(){let t=r.readUInt64LE(e,n);n+=8;return t}function c(){let t=d.decode(e,n);n+=d.decode.bytes;return t}function a(){return u(c())}function s(){let e=c(),t=[];for(let n=0;n<e;n++)t.push(a());return t}let l=new _;l.version=o();let p=e.readUInt8(n),h=e.readUInt8(n+1),m=!1;p===_.ADVANCED_TRANSACTION_MARKER&&h===_.ADVANCED_TRANSACTION_FLAG&&(n+=2,m=!0);let g=c();for(let e=0;e<g;++e)l.ins.push({hash:u(32),index:i(),script:a(),sequence:i(),witness:b});let y=c();for(let e=0;e<y;++e)l.outs.push({value:f(),script:a()});if(m){for(let e=0;e<g;++e)l.ins[e].witness=s();if(!l.hasWitnesses())throw new Error('Transaction has superfluous witness data')}l.locktime=i();if(t)return l;if(n!==e.length)throw new Error('Transaction has unexpected data');return l}static fromHex(e){return _.fromBuffer(t.from(e,'hex'),!1)}static isCoinbaseHash(e){a(c.Hash256bit,e);for(let t=0;t<32;++t){if(e[t]!==0)return!1}return!0}isCoinbase(){return this.ins.length===1&&_.isCoinbaseHash(this.ins[0].hash)}addInput(e,t,n,r){a(c.tuple(c.Hash256bit,c.UInt32,c.maybe(c.UInt32),c.maybe(c.Buffer)),arguments);c.Null(n)&&(n=_.DEFAULT_SEQUENCE);return this.ins.push({hash:e,index:t,script:r||p,sequence:n,witness:b})-1}addOutput(e,t){a(c.tuple(c.Buffer,c.Satoshi),arguments);return this.outs.push({script:e,value:t})-1}hasWitnesses(){return this.ins.some(e=>{return e.witness.length!==0})}weight(){let e=this.__byteLength(!1),t=this.__byteLength(!0);return e*3+t}virtualSize(){return Math.ceil(this.weight()/4)}byteLength(){return this.__byteLength(!0)}clone(){let e=new _;e.version=this.version;e.locktime=this.locktime;e.ins=this.ins.map(e=>{return{hash:e.hash,index:e.index,script:e.script,sequence:e.sequence,witness:e.witness}});e.outs=this.outs.map(e=>{return{script:e.script,value:e.value}});return e}hashForSignature(e,n,r){a(c.tuple(c.UInt32,c.Buffer,c.Number),arguments);if(e>=this.ins.length)return m;let u=o.compile(o.decompile(n).filter(e=>{return e!==f.OPS.OP_CODESEPARATOR})),d=this.clone();if((r&31)===_.SIGHASH_NONE)d.outs=[],d.ins.forEach((t,n)=>{if(n===e)return;t.sequence=0});else if((r&31)===_.SIGHASH_SINGLE){if(e>=this.outs.length)return m;d.outs.length=e+1;for(let t=0;t<e;t++)d.outs[t]=y;d.ins.forEach((t,n)=>{if(n===e)return;t.sequence=0})}r&_.SIGHASH_ANYONECANPAY?(d.ins=[d.ins[e]],d.ins[0].script=u):(d.ins.forEach(e=>{e.script=p}),d.ins[e].script=u);let s=t.allocUnsafe(d.__byteLength(!1)+4);s.writeInt32LE(r,s.length-4);d.__toBuffer(s,0,!1);return i.hash256(s)}hashForWitnessV0(e,n,u,o){a(c.tuple(c.UInt32,c.Buffer,c.Satoshi,c.UInt32),arguments);let f=t.from([]),l=0;function p(e){l+=e.copy(f,l)}function b(e){l=f.writeUInt32LE(e,l)}function m(e){l=r.writeUInt64LE(f,e,l)}function g(e){d.encode(e,f,l);l+=d.encode.bytes}function y(e){g(e.length);p(e)}let w=h,S=h,v=h;(o&_.SIGHASH_ANYONECANPAY)||(f=t.allocUnsafe(36*this.ins.length),l=0,this.ins.forEach(e=>{p(e.hash),b(e.index)}),S=i.hash256(f));!(o&_.SIGHASH_ANYONECANPAY)&&(o&31)!==_.SIGHASH_SINGLE&&(o&31)!==_.SIGHASH_NONE&&(f=t.allocUnsafe(4*this.ins.length),l=0,this.ins.forEach(e=>{b(e.sequence)}),v=i.hash256(f));if((o&31)!==_.SIGHASH_SINGLE&&(o&31)!==_.SIGHASH_NONE){let e=this.outs.reduce((e,t)=>{return e+8+s(t.script)},0);f=t.allocUnsafe(e);l=0;this.outs.forEach(e=>{m(e.value),y(e.script)});w=i.hash256(f)}else if((o&31)===_.SIGHASH_SINGLE&&e<this.outs.length){let n=this.outs[e];f=t.allocUnsafe(8+s(n.script));l=0;m(n.value);y(n.script);w=i.hash256(f)}f=t.allocUnsafe(156+s(n));l=0;let k=this.ins[e];b(this.version);p(S);p(v);p(k.hash);b(k.index);y(n);m(u);b(k.sequence);p(w);b(this.locktime);b(o);return i.hash256(f)}getHash(e){if(e&&this.isCoinbase())return t.alloc(32,0);return i.hash256(this.__toBuffer(void 0,void 0,e))}getId(){return u.reverseBuffer(this.getHash(!1)).toString('hex')}toBuffer(e,t){return this.__toBuffer(e,t,!0)}toHex(){return this.toBuffer(void 0,void 0).toString('hex')}setInputScript(e,t){a(c.tuple(c.Number,c.Buffer),arguments);this.ins[e].script=t}setWitness(e,t){a(c.tuple(c.Number,[c.Buffer]),arguments);this.ins[e].witness=t}__byteLength(e){let t=e&&this.hasWitnesses();return(t?10:8)+d.encodingLength(this.ins.length)+d.encodingLength(this.outs.length)+this.ins.reduce((e,t)=>{return e+40+s(t.script)},0)+this.outs.reduce((e,t)=>{return e+8+s(t.script)},0)+(t?this.ins.reduce((e,t)=>{return e+l(t.witness)},0):0)}__toBuffer(e,n,u){e||(e=t.allocUnsafe(this.__byteLength(u)));let i=n||0;function o(t){i+=t.copy(e,i)}function f(t){i=e.writeUInt8(t,i)}function c(t){i=e.writeUInt32LE(t,i)}function a(t){i=e.writeInt32LE(t,i)}function s(t){i=r.writeUInt64LE(e,t,i)}function l(t){d.encode(t,e,i);i+=d.encode.bytes}function p(e){l(e.length);o(e)}function b(e){l(e.length);e.forEach(p)}a(this.version);let h=u&&this.hasWitnesses();h&&(f(_.ADVANCED_TRANSACTION_MARKER),f(_.ADVANCED_TRANSACTION_FLAG));l(this.ins.length);this.ins.forEach(e=>{o(e.hash),c(e.index),p(e.script),c(e.sequence)});l(this.outs.length);this.outs.forEach(e=>{w(e)?s(e.value):o(e.valueBuffer),p(e.script)});h&&this.ins.forEach(e=>{b(e.witness)});c(this.locktime);if(n!==void 0)return e.slice(n,i);return e}}_.DEFAULT_SEQUENCE=4294967295;_.SIGHASH_ALL=1;_.SIGHASH_NONE=2;_.SIGHASH_SINGLE=3;_.SIGHASH_ANYONECANPAY=128;_.ADVANCED_TRANSACTION_MARKER=0;_.ADVANCED_TRANSACTION_FLAG=1;n.Transaction=_}).call(this,e("buffer").Buffer)},{"./bufferutils":41,"./crypto":43,"./script":55,"./types":81,"buffer":3,"typeforce":143,"varuint-bitcoin":145}],80:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("./address"),u=e("./bufferutils"),i=e("./classify"),o=e("./crypto"),f=e("./ecpair"),c=e("./networks"),a=e("./payments"),d=e("./script"),s=e("./script"),l=e("./transaction"),p=e("./types"),b=e('typeforce'),h=i.types;function m(e){return typeof e==='string'||e instanceof String}function g(e){return e instanceof l.Transaction}class y{constructor(e = c.bitcoin,t = 2500){this.network=e;this.maximumFeeRate=t;this.__PREV_TX_SET={};this.__INPUTS=[];this.__TX=new l.Transaction;this.__TX.version=2}static fromTransaction(e,t){let n=new y(t);n.setVersion(e.version);n.setLockTime(e.locktime);e.outs.forEach(e=>{n.addOutput(e.script,e.value)});e.ins.forEach(e=>{n.__addInputUnsafe(e.hash,e.index,{sequence:e.sequence,script:e.script,witness:e.witness})});n.__INPUTS.forEach((t,n)=>{_(t,e,n)});return n}setLockTime(e){b(p.UInt32,e);if(this.__INPUTS.some(e=>{if(!e.signatures)return!1;return e.signatures.some(e=>e!==void 0)})){throw new Error('No, this would invalidate signatures')}this.__TX.locktime=e}setVersion(e){b(p.UInt32,e);this.__TX.version=e}addInput(e,n,r,i){if(!this.__canModifyInputs()){throw new Error('No, this would invalidate signatures')}let o;if(m(e))e=u.reverseBuffer(t.from(e,'hex'));else if(g(e)){let t=e.outs[n];i=t.script;o=t.value;e=e.getHash(!1)}return this.__addInputUnsafe(e,n,{sequence:r,prevOutScript:i,value:o})}addOutput(e,t){if(!this.__canModifyOutputs()){throw new Error('No, this would invalidate signatures')}typeof e==='string'&&(e=r.toOutputScript(e,this.network));return this.__TX.addOutput(e,t)}build(){return this.__build(!1)}buildIncomplete(){return this.__build(!0)}sign(e,t,n,r,u,i){if(t.network&&t.network!==this.network)throw new TypeError('Inconsistent network');if(!this.__INPUTS[e])throw new Error('No input at index: '+e);r=r||l.Transaction.SIGHASH_ALL;if(this.__needsOutputs(r))throw new Error('Transaction needs outputs');let o=this.__INPUTS[e];if(o.redeemScript!==void 0&&n&&!o.redeemScript.equals(n)){throw new Error('Inconsistent redeemScript')}let f=t.publicKey||t.getPublicKey();if(!I(o)){if(u!==void 0){if(o.value!==void 0&&o.value!==u)throw new Error('Input did not match witnessValue');b(p.Satoshi,u);o.value=u}if(!I(o)){let e=v(o,f,n,i);Object.assign(o,e)}if(!I(o))throw Error(o.prevOutType+' not supported')}let c;o.hasWitness?(c=this.__TX.hashForWitnessV0(e,o.signScript,o.value,r)):(c=this.__TX.hashForSignature(e,o.signScript,r));let a=o.pubkeys.some((e,n)=>{if(!f.equals(e))return!1;if(o.signatures[n])throw new Error('Signature already exists');if(f.length!==33&&o.hasWitness){throw new Error('BIP143 rejects uncompressed public keys in P2WPKH or P2WSH')}let u=t.sign(c);o.signatures[n]=d.signature.encode(u,r);return!0});if(!a)throw new Error('Key pair cannot sign for this input')}__addInputUnsafe(e,t,n){if(l.Transaction.isCoinbaseHash(e)){throw new Error('coinbase inputs not supported')}let r=e.toString('hex')+':'+t;if(this.__PREV_TX_SET[r]!==void 0)throw new Error('Duplicate TxOut: '+r);let u={};n.script!==void 0&&(u=w(n.script,n.witness||[]));n.value!==void 0&&(u.value=n.value);if(!u.prevOutScript&&n.prevOutScript){let e;if(!u.pubkeys&&!u.signatures){let t=S(n.prevOutScript);t.pubkeys&&(u.pubkeys=t.pubkeys,u.signatures=t.signatures);e=t.type}u.prevOutScript=n.prevOutScript;u.prevOutType=e||i.output(n.prevOutScript)}let o=this.__TX.addInput(e,t,n.sequence,n.scriptSig);this.__INPUTS[o]=u;this.__PREV_TX_SET[r]=!0;return o}__build(e){if(!e){if(!this.__TX.ins.length)throw new Error('Transaction has no inputs');if(!this.__TX.outs.length)throw new Error('Transaction has no outputs')}let t=this.__TX.clone();this.__INPUTS.forEach((n,r)=>{if(!n.prevOutType&&!e)throw new Error('Transaction is not complete');let u=k(n.prevOutType,n,e);if(!u){if(!e&&n.prevOutType===h.NONSTANDARD)throw new Error('Unknown input type');if(!e)throw new Error('Not enough information');return}t.setInputScript(r,u.input);t.setWitness(r,u.witness)});if(!e){if(this.__overMaximumFees(t.virtualSize())){throw new Error('Transaction has absurd fees')}}return t}__canModifyInputs(){return this.__INPUTS.every(e=>{if(!e.signatures)return!0;return e.signatures.every(e=>{if(!e)return!0;let t=P(e);return(t&l.Transaction.SIGHASH_ANYONECANPAY)!==0})})}__needsOutputs(e){if(e===l.Transaction.SIGHASH_ALL){return this.__TX.outs.length===0}return this.__TX.outs.length===0&&this.__INPUTS.some(e=>{if(!e.signatures)return!1;return e.signatures.some(e=>{if(!e)return!1;let t=P(e);if(t&l.Transaction.SIGHASH_NONE)return!1;return!0})})}__canModifyOutputs(){let e=this.__TX.ins.length,t=this.__TX.outs.length;return this.__INPUTS.every(n=>{if(n.signatures===void 0)return!0;return n.signatures.every(n=>{if(!n)return!0;let r=P(n),u=r&31;if(u===l.Transaction.SIGHASH_NONE)return!0;if(u===l.Transaction.SIGHASH_SINGLE){return e<=t}return!1})})}__overMaximumFees(e){let t=this.__INPUTS.reduce((e,t)=>e+(t.value>>>0),0),n=this.__TX.outs.reduce((e,t)=>e+t.value,0),r=t-n,u=r/e;return u>this.maximumFeeRate}}n.TransactionBuilder=y;function w(e,t,n,r){if(e.length===0&&t.length===0)return{};if(!n){let r=i.input(e,!0),u=i.witness(t,!0);r===h.NONSTANDARD&&(r=void 0);u===h.NONSTANDARD&&(u=void 0);n=r||u}switch(n){case h.P2WPKH:{let{output:e,pubkey:n,signature:r}=a.p2wpkh({witness:t});return{prevOutScript:e,prevOutType:h.P2WPKH,pubkeys:[n],signatures:[r]}};case h.P2PKH:{let{output:t,pubkey:n,signature:r}=a.p2pkh({input:e});return{prevOutScript:t,prevOutType:h.P2PKH,pubkeys:[n],signatures:[r]}};case h.P2PK:{let{signature:t}=a.p2pk({input:e});return{prevOutType:h.P2PK,pubkeys:[void 0],signatures:[t]}};case h.P2MS:{let{m:t,pubkeys:n,signatures:u}=a.p2ms({input:e,output:r},{allowIncomplete:!0});return{prevOutType:h.P2MS,pubkeys:n,signatures:u,maxSignatures:t}}}if(n===h.P2SH){let{output:n,redeem:r}=a.p2sh({input:e,witness:t}),u=i.output(r.output),o=w(r.input,r.witness,u,r.output);if(!o.prevOutType)return{};return{prevOutScript:n,prevOutType:h.P2SH,redeemScript:r.output,redeemScriptType:o.prevOutType,witnessScript:o.witnessScript,witnessScriptType:o.witnessScriptType,pubkeys:o.pubkeys,signatures:o.signatures}}if(n===h.P2WSH){let{output:n,redeem:r}=a.p2wsh({input:e,witness:t}),u=i.output(r.output),o;u===h.P2WPKH?(o=w(r.input,r.witness,u)):(o=w(d.compile(r.witness),[],u,r.output));if(!o.prevOutType)return{};return{prevOutScript:n,prevOutType:h.P2WSH,witnessScript:r.output,witnessScriptType:o.prevOutType,pubkeys:o.pubkeys,signatures:o.signatures}}return{prevOutType:h.NONSTANDARD,prevOutScript:e}}function _(e,t,n){if(e.redeemScriptType!==h.P2MS||!e.redeemScript)return;if(e.pubkeys.length===e.signatures.length)return;let r=e.signatures.concat();e.signatures=e.pubkeys.map(u=>{let i=f.fromPublicKey(u),o;r.some((u,f)=>{if(!u)return!1;let c=d.signature.decode(u),a=t.hashForSignature(n,e.redeemScript,c.hashType);if(!i.verify(a,c.signature))return!1;r[f]=void 0;o=u;return!0});return o})}function S(e,t){b(p.Buffer,e);let n=i.output(e);switch(n){case h.P2PKH:{if(!t)return{type:n};let r=a.p2pkh({output:e}).hash,u=o.hash160(t);if(!r.equals(u))return{type:n};return{type:n,pubkeys:[t],signatures:[void 0]}};case h.P2WPKH:{if(!t)return{type:n};let r=a.p2wpkh({output:e}).hash,u=o.hash160(t);if(!r.equals(u))return{type:n};return{type:n,pubkeys:[t],signatures:[void 0]}};case h.P2PK:{let t=a.p2pk({output:e});return{type:n,pubkeys:[t.pubkey],signatures:[void 0]}};case h.P2MS:{let t=a.p2ms({output:e});return{type:n,pubkeys:t.pubkeys,signatures:t.pubkeys.map(()=>void 0),maxSignatures:t.m}}}return{type:n}}function v(e,t,n,r){if(n&&r){let u=a.p2wsh({redeem:{output:r}}),i=a.p2wsh({output:n}),o=a.p2sh({redeem:{output:n}}),f=a.p2sh({redeem:u});if(!u.hash.equals(i.hash))throw new Error('Witness script inconsistent with prevOutScript');if(!o.hash.equals(f.hash))throw new Error('Redeem script inconsistent with prevOutScript');let c=S(u.redeem.output,t);if(!c.pubkeys)throw new Error(c.type+' not supported as witnessScript ('+d.toASM(r)+')');e.signatures&&e.signatures.some(e=>e!==void 0)&&(c.signatures=e.signatures);let s=r;if(c.type===h.P2WPKH)throw new Error('P2SH(P2WSH(P2WPKH)) is a consensus failure');return{redeemScript:n,redeemScriptType:h.P2WSH,witnessScript:r,witnessScriptType:c.type,prevOutType:h.P2SH,prevOutScript:o.output,hasWitness:!0,signScript:s,signType:c.type,pubkeys:c.pubkeys,signatures:c.signatures,maxSignatures:c.maxSignatures}}if(n){let r=a.p2sh({redeem:{output:n}});if(e.prevOutScript){let t;try{t=a.p2sh({output:e.prevOutScript})}catch(e){throw new Error('PrevOutScript must be P2SH')};if(!r.hash.equals(t.hash))throw new Error('Redeem script inconsistent with prevOutScript')}let u=S(r.redeem.output,t);if(!u.pubkeys)throw new Error(u.type+' not supported as redeemScript ('+d.toASM(n)+')');e.signatures&&e.signatures.some(e=>e!==void 0)&&(u.signatures=e.signatures);let i=n;u.type===h.P2WPKH&&(i=a.p2pkh({pubkey:u.pubkeys[0]}).output);return{redeemScript:n,redeemScriptType:u.type,prevOutType:h.P2SH,prevOutScript:r.output,hasWitness:u.type===h.P2WPKH,signScript:i,signType:u.type,pubkeys:u.pubkeys,signatures:u.signatures,maxSignatures:u.maxSignatures}}if(r){let n=a.p2wsh({redeem:{output:r}});if(e.prevOutScript){let t=a.p2wsh({output:e.prevOutScript});if(!n.hash.equals(t.hash))throw new Error('Witness script inconsistent with prevOutScript')}let u=S(n.redeem.output,t);if(!u.pubkeys)throw new Error(u.type+' not supported as witnessScript ('+d.toASM(r)+')');e.signatures&&e.signatures.some(e=>e!==void 0)&&(u.signatures=e.signatures);let i=r;if(u.type===h.P2WPKH)throw new Error('P2WSH(P2WPKH) is a consensus failure');return{witnessScript:r,witnessScriptType:u.type,prevOutType:h.P2WSH,prevOutScript:n.output,hasWitness:!0,signScript:i,signType:u.type,pubkeys:u.pubkeys,signatures:u.signatures,maxSignatures:u.maxSignatures}}if(e.prevOutType&&e.prevOutScript){if(e.prevOutType===h.P2SH)throw new Error('PrevOutScript is '+e.prevOutType+', requires redeemScript');if(e.prevOutType===h.P2WSH)throw new Error('PrevOutScript is '+e.prevOutType+', requires witnessScript');if(!e.prevOutScript)throw new Error('PrevOutScript is missing');let n=S(e.prevOutScript,t);if(!n.pubkeys)throw new Error(n.type+' not supported ('+d.toASM(e.prevOutScript)+')');e.signatures&&e.signatures.some(e=>e!==void 0)&&(n.signatures=e.signatures);let r=e.prevOutScript;n.type===h.P2WPKH&&(r=a.p2pkh({pubkey:n.pubkeys[0]}).output);return{prevOutType:n.type,prevOutScript:e.prevOutScript,hasWitness:n.type===h.P2WPKH,signScript:r,signType:n.type,pubkeys:n.pubkeys,signatures:n.signatures,maxSignatures:n.maxSignatures}}let u=a.p2pkh({pubkey:t}).output;return{prevOutType:h.P2PKH,prevOutScript:u,hasWitness:!1,signScript:u,signType:h.P2PKH,pubkeys:[t],signatures:[void 0]}}function k(e,t,n){let r=t.pubkeys||[],u=t.signatures||[];switch(e){case h.P2PKH:{if(r.length===0)break;if(u.length===0)break;return a.p2pkh({pubkey:r[0],signature:u[0]})};case h.P2WPKH:{if(r.length===0)break;if(u.length===0)break;return a.p2wpkh({pubkey:r[0],signature:u[0]})};case h.P2PK:{if(r.length===0)break;if(u.length===0)break;return a.p2pk({signature:u[0]})};case h.P2MS:{let e=t.maxSignatures;n?(u=u.map(e=>e||s.OPS.OP_0)):(u=u.filter(e=>e));let i=!n||e===u.length;return a.p2ms({m:e,pubkeys:r,signatures:u},{allowIncomplete:n,validate:i})};case h.P2SH:{let e=k(t.redeemScriptType,t,n);if(!e)return;return a.p2sh({redeem:{output:e.output||t.redeemScript,input:e.input,witness:e.witness}})};case h.P2WSH:{let e=k(t.witnessScriptType,t,n);if(!e)return;return a.p2wsh({redeem:{output:t.witnessScript,input:e.input,witness:e.witness}})}}}function I(e){return e.signScript!==void 0&&e.signType!==void 0&&e.pubkeys!==void 0&&e.signatures!==void 0&&e.signatures.length===e.pubkeys.length&&e.pubkeys.length>0&&(e.hasWitness===!1||e.value!==void 0)}function P(e){return e.readUInt8(e.length-1)}}).call(this,e("buffer").Buffer)},{"./address":39,"./bufferutils":41,"./classify":42,"./crypto":43,"./ecpair":44,"./networks":45,"./payments":47,"./script":55,"./transaction":79,"./types":81,"buffer":3,"typeforce":143}],81:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e('typeforce'),u=Math.pow(2,31)-1;function i(e){return r.UInt32(e)&&e<=u}n.UInt31=i;function o(e){return r.String(e)&&!!e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}n.BIP32Path=o;o.toJSON=()=>{return'BIP32 derivation path'};let f=2.1e15;function c(e){return r.UInt53(e)&&e<=f}n.Satoshi=c;n.ECPoint=r.quacksLike('Point');n.Network=r.compile({messagePrefix:r.oneOf(r.Buffer,r.String),bip32:{public:r.UInt32,private:r.UInt32},pubKeyHash:r.UInt8,scriptHash:r.UInt8,wif:r.UInt8});n.Buffer256bit=r.BufferN(32);n.Hash160bit=r.BufferN(20);n.Hash256bit=r.BufferN(32);n.Number=r.Number;n.Array=r.Array;n.Boolean=r.Boolean;n.String=r.String;n.Buffer=r.Buffer;n.Hex=r.Hex;n.maybe=r.maybe;n.tuple=r.tuple;n.UInt8=r.UInt8;n.UInt32=r.UInt32;n.Function=r.Function;n.BufferN=r.BufferN;n.Null=r.Null;n.oneOf=r.oneOf},{"typeforce":143}],82:[function(e,t,n){!function(t,n){"use strict";function r(e,t){if(!e)throw new Error(t||'Assertion failed')}function u(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype;e.prototype=new n;e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e)){return e}this.negative=0;this.words=null;this.length=0;this.red=null;e!==null&&((t==='le'||t==='be')&&(n=t,t=10),this._init(e||0,t||10,n||'be'))}typeof t==='object'?(t.exports=i):(n.BN=i);i.BN=i;i.wordSize=26;var o;try{o=e('buffer').Buffer}catch(e){};i.isBN=function(e){if(e instanceof i){return!0}return e!==null&&typeof e==='object'&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)};i.max=function(e,t){if(e.cmp(t)>0)return e;return t};i.min=function(e,t){if(e.cmp(t)<0)return e;return t};i.prototype._init=function(e,t,n){if(typeof e==='number'){return this._initNumber(e,t,n)}if(typeof e==='object'){return this._initArray(e,t,n)}t==='hex'&&(t=16);r(t===(t|0)&&t>=2&&t<=36);e=e.toString().replace(/\s+/g,'');var u=0;e[0]==='-'&&u++;t===16?this._parseHex(e,u):this._parseBase(e,t,u);e[0]==='-'&&(this.negative=1);this.strip();if(n!=='le')return;this._initArray(this.toArray(),t,n)};i.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e);e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3);if(n!=='le')return;this._initArray(this.toArray(),t,n)};i.prototype._initArray=function(e,t,n){r(typeof e.length==='number');if(e.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(e.length/3);this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var i,o,f=0;if(n==='be'){for(u=e.length-1, i=0;u>=0;u-=3)o=e[u]|e[u-1]<<8|e[u-2]<<16,this.words[i]|=o<<f&67108863,this.words[i+1]=o>>>26-f&67108863,f+=24,f>=26&&(f-=26,i++)}else if(n==='le'){for(u=0, i=0;u<e.length;u+=3)o=e[u]|e[u+1]<<8|e[u+2]<<16,this.words[i]|=o<<f&67108863,this.words[i+1]=o>>>26-f&67108863,f+=24,f>=26&&(f-=26,i++)}return this.strip()};function f(e,t,n){var r=0,u=Math.min(e.length,n);for(var i=t;i<u;i++){var o=e.charCodeAt(i)-48;r<<=4;o>=49&&o<=54?(r|=o-49+10):o>=17&&o<=22?(r|=o-17+10):(r|=o&15)}return r}i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6);this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,u,i=0;for(n=e.length-6, r=0;n>=t;n-=6)u=f(e,n,n+6),this.words[r]|=u<<i&67108863,this.words[r+1]|=u>>>26-i&4194303,i+=24,i>=26&&(i-=26,r++);n+6!==t&&(u=f(e,t,n+6),this.words[r]|=u<<i&67108863,this.words[r+1]|=u>>>26-i&4194303);this.strip()};function c(e,t,n,r){var u=0,i=Math.min(e.length,n);for(var o=t;o<i;o++){var f=e.charCodeAt(o)-48;u*=r;f>=49?(u+=f-49+10):f>=17?(u+=f-17+10):(u+=f)}return u}i.prototype._parseBase=function(e,t,n){this.words=[0];this.length=1;for(var r=0,u=1;u<=67108863;u*=t)r++;r--;u=u/t|0;var i=e.length-n,o=i%r,f=Math.min(i,i-o)+n,a=0;for(var d=n;d<f;d+=r)a=c(e,d,d+r,t),this.imuln(u),this.words[0]+a<67108864?(this.words[0]+=a):this._iaddn(a);if(o!==0){var s=1;a=c(e,d,e.length,t);for(d=0;d<o;d++)s*=t;this.imuln(s);this.words[0]+a<67108864?(this.words[0]+=a):this._iaddn(a)}};i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length;e.negative=this.negative;e.red=this.red};i.prototype.clone=function(){var e=new i(null);this.copy(e);return e};i.prototype._expand=function(e){while(this.length<e)this.words[this.length++]=0;return this};i.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()};i.prototype._normSign=function(){this.length===1&&this.words[0]===0&&(this.negative=0);return this};i.prototype.inspect=function(){return(this.red?'<BN-R: ':'<BN: ')+this.toString(16)+'>'};var a=['','0','00','000','0000','00000','000000','0000000','00000000','000000000','0000000000','00000000000','000000000000','0000000000000','00000000000000','000000000000000','0000000000000000','00000000000000000','000000000000000000','0000000000000000000','00000000000000000000','000000000000000000000','0000000000000000000000','00000000000000000000000','000000000000000000000000','0000000000000000000000000'],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],s=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,6.4e7,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,2.43e7,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(e,t){e=e||10;t=t|0||1;var n;if(e===16||e==='hex'){n='';var u=0,i=0;for(var o=0;o<this.length;o++){var f=this.words[o],c=((f<<u|i)&16777215).toString(16);i=f>>>24-u&16777215;i!==0||o!==this.length-1?(n=a[6-c.length]+c+n):(n=c+n);u+=2;u>=26&&(u-=26,o--)}i!==0&&(n=i.toString(16)+n);while(n.length%t!==0)n='0'+n;this.negative!==0&&(n='-'+n);return n}if(e===(e|0)&&e>=2&&e<=36){var l=d[e],p=s[e];n='';var b=this.clone();b.negative=0;while(!b.isZero()){var h=b.modn(p).toString(e);b=b.idivn(p);b.isZero()?(n=h+n):(n=a[l-h.length]+h+n)}this.isZero()&&(n='0'+n);while(n.length%t!==0)n='0'+n;this.negative!==0&&(n='-'+n);return n}r(!1,'Base should be between 2 and 36')};i.prototype.toNumber=function(){var e=this.words[0];this.length===2?(e+=this.words[1]*67108864):this.length===3&&this.words[2]===1?(e+=4503599627370496+this.words[1]*67108864):this.length>2&&r(!1,'Number can only safely store up to 53 bits');return this.negative!==0?-e:e};i.prototype.toJSON=function(){return this.toString(16)};i.prototype.toBuffer=function(e,t){r(typeof o!=='undefined');return this.toArrayLike(o,e,t)};i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};i.prototype.toArrayLike=function(e,t,n){var u=this.byteLength(),i=n||Math.max(1,u);r(u<=i,'byte array longer than desired length');r(i>0,'Requested array length <= 0');this.strip();var o=t==='le',f=new e(i),c,a,d=this.clone();if(!o){for(a=0;a<i-u;a++)f[a]=0;for(a=0;!d.isZero();a++)c=d.andln(255),d.iushrn(8),f[i-a-1]=c}else{for(a=0;!d.isZero();a++)c=d.andln(255),d.iushrn(8),f[a]=c;for(;a<i;a++)f[a]=0}return f};Math.clz32?(i.prototype._countBits=function(e){return 32-Math.clz32(e)}):(i.prototype._countBits=function(e){var t=e,n=0;t>=4096&&(n+=13,t>>>=13);t>=64&&(n+=7,t>>>=7);t>=8&&(n+=4,t>>>=4);t>=2&&(n+=2,t>>>=2);return n+t});i.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;(t&8191)===0&&(n+=13,t>>>=13);(t&127)===0&&(n+=7,t>>>=7);(t&15)===0&&(n+=4,t>>>=4);(t&3)===0&&(n+=2,t>>>=2);(t&1)===0&&n++;return n};i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function l(e){var t=new Array(e.bitLength());for(var n=0;n<t.length;n++){var r=n/26|0,u=n%26;t[n]=(e.words[r]&1<<u)>>>u}return t}i.prototype.zeroBits=function(){if(this.isZero())return 0;var e=0;for(var t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);e+=n;if(n!==26)break}return e};i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)};i.prototype.toTwos=function(e){if(this.negative!==0){return this.abs().inotn(e).iaddn(1)}return this.clone()};i.prototype.fromTwos=function(e){if(this.testn(e-1)){return this.notn(e).iaddn(1).ineg()}return this.clone()};i.prototype.isNeg=function(){return this.negative!==0};i.prototype.neg=function(){return this.clone().ineg()};i.prototype.ineg=function(){this.isZero()||(this.negative^=1);return this};i.prototype.iuor=function(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()};i.prototype.ior=function(e){r((this.negative|e.negative)===0);return this.iuor(e)};i.prototype.or=function(e){if(this.length>e.length)return this.clone().ior(e);return e.clone().ior(this)};i.prototype.uor=function(e){if(this.length>e.length)return this.clone().iuor(e);return e.clone().iuor(this)};i.prototype.iuand=function(e){var t;this.length>e.length?(t=e):(t=this);for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];this.length=t.length;return this.strip()};i.prototype.iand=function(e){r((this.negative|e.negative)===0);return this.iuand(e)};i.prototype.and=function(e){if(this.length>e.length)return this.clone().iand(e);return e.clone().iand(this)};i.prototype.uand=function(e){if(this.length>e.length)return this.clone().iuand(e);return e.clone().iuand(this)};i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t){for(;r<t.length;r++)this.words[r]=t.words[r]}this.length=t.length;return this.strip()};i.prototype.ixor=function(e){r((this.negative|e.negative)===0);return this.iuxor(e)};i.prototype.xor=function(e){if(this.length>e.length)return this.clone().ixor(e);return e.clone().ixor(this)};i.prototype.uxor=function(e){if(this.length>e.length)return this.clone().iuxor(e);return e.clone().iuxor(this)};i.prototype.inotn=function(e){r(typeof e==='number'&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t);n>0&&t--;for(var u=0;u<t;u++)this.words[u]=~this.words[u]&67108863;n>0&&(this.words[u]=~this.words[u]&67108863>>26-n);return this.strip()};i.prototype.notn=function(e){return this.clone().inotn(e)};i.prototype.setn=function(e,t){r(typeof e==='number'&&e>=0);var n=e/26|0,u=e%26;this._expand(n+1);t?(this.words[n]=this.words[n]|1<<u):(this.words[n]=this.words[n]&~(1<<u));return this.strip()};i.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0){this.negative=0;t=this.isub(e);this.negative^=1;return this._normSign()}else if(this.negative===0&&e.negative!==0){e.negative=0;t=this.isub(e);e.negative=1;return t._normSign()}var n,r;this.length>e.length?(n=this,r=e):(n=e,r=this);var u=0;for(var i=0;i<r.length;i++)t=(n.words[i]|0)+(r.words[i]|0)+u,this.words[i]=t&67108863,u=t>>>26;for(;u!==0&&i<n.length;i++)t=(n.words[i]|0)+u,this.words[i]=t&67108863,u=t>>>26;this.length=n.length;if(u!==0)this.words[this.length]=u,this.length++;else if(n!==this){for(;i<n.length;i++)this.words[i]=n.words[i]}return this};i.prototype.add=function(e){var t;if(e.negative!==0&&this.negative===0){e.negative=0;t=this.sub(e);e.negative^=1;return t}else if(e.negative===0&&this.negative!==0){this.negative=0;t=e.sub(this);this.negative=1;return t}if(this.length>e.length)return this.clone().iadd(e);return e.clone().iadd(this)};i.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);e.negative=1;return t._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(e);this.negative=1;return this._normSign()}var n=this.cmp(e);if(n===0){this.negative=0;this.length=1;this.words[0]=0;return this}var r,u;n>0?(r=this,u=e):(r=e,u=this);var i=0;for(var o=0;o<u.length;o++)t=(r.words[o]|0)-(u.words[o]|0)+i,i=t>>26,this.words[o]=t&67108863;for(;i!==0&&o<r.length;o++)t=(r.words[o]|0)+i,i=t>>26,this.words[o]=t&67108863;if(i===0&&o<r.length&&r!==this){for(;o<r.length;o++)this.words[o]=r.words[o]}this.length=Math.max(this.length,o);r!==this&&(this.negative=1);return this.strip()};i.prototype.sub=function(e){return this.clone().isub(e)};function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r;r=r-1|0;var u=e.words[0]|0,i=t.words[0]|0,o=u*i,f=o&67108863,c=o/67108864|0;n.words[0]=f;for(var a=1;a<r;a++){var d=c>>>26,s=c&67108863,l=Math.min(a,t.length-1);for(var p=Math.max(0,a-e.length+1);p<=l;p++){var b=a-p|0;u=e.words[b]|0;i=t.words[p]|0;o=u*i+s;d+=o/67108864|0;s=o&67108863}n.words[a]=s|0;c=d|0}c!==0?(n.words[a]=c|0):n.length--;return n.strip()}var b=function(e,t,n){var r=e.words,u=t.words,i=n.words,o=0,f,c,a,d=r[0]|0,s=d&8191,l=d>>>13,p=r[1]|0,b=p&8191,h=p>>>13,m=r[2]|0,g=m&8191,y=m>>>13,w=r[3]|0,_=w&8191,S=w>>>13,v=r[4]|0,k=v&8191,I=v>>>13,P=r[5]|0,x=P&8191,A=P>>>13,O=r[6]|0,E=O&8191,M=O>>>13,B=r[7]|0,N=B&8191,L=B>>>13,T=r[8]|0,R=T&8191,U=T>>>13,q=r[9]|0,C=q&8191,H=q>>>13,j=u[0]|0,z=j&8191,D=j>>>13,W=u[1]|0,K=W&8191,F=W>>>13,J=u[2]|0,V=J&8191,X=J>>>13,G=u[3]|0,Y=G&8191,Z=G>>>13,Q=u[4]|0,$=Q&8191,ee=Q>>>13,te=u[5]|0,ne=te&8191,re=te>>>13,ue=u[6]|0,ie=ue&8191,oe=ue>>>13,fe=u[7]|0,ce=fe&8191,ae=fe>>>13,de=u[8]|0,se=de&8191,le=de>>>13,pe=u[9]|0,be=pe&8191,he=pe>>>13;n.negative=e.negative^t.negative;n.length=19;f=Math.imul(s,z);c=Math.imul(s,D);c=c+Math.imul(l,z)|0;a=Math.imul(l,D);var me=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(me>>>26)|0;me&=67108863;f=Math.imul(b,z);c=Math.imul(b,D);c=c+Math.imul(h,z)|0;a=Math.imul(h,D);f=f+Math.imul(s,K)|0;c=c+Math.imul(s,F)|0;c=c+Math.imul(l,K)|0;a=a+Math.imul(l,F)|0;var ge=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(ge>>>26)|0;ge&=67108863;f=Math.imul(g,z);c=Math.imul(g,D);c=c+Math.imul(y,z)|0;a=Math.imul(y,D);f=f+Math.imul(b,K)|0;c=c+Math.imul(b,F)|0;c=c+Math.imul(h,K)|0;a=a+Math.imul(h,F)|0;f=f+Math.imul(s,V)|0;c=c+Math.imul(s,X)|0;c=c+Math.imul(l,V)|0;a=a+Math.imul(l,X)|0;var ye=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(ye>>>26)|0;ye&=67108863;f=Math.imul(_,z);c=Math.imul(_,D);c=c+Math.imul(S,z)|0;a=Math.imul(S,D);f=f+Math.imul(g,K)|0;c=c+Math.imul(g,F)|0;c=c+Math.imul(y,K)|0;a=a+Math.imul(y,F)|0;f=f+Math.imul(b,V)|0;c=c+Math.imul(b,X)|0;c=c+Math.imul(h,V)|0;a=a+Math.imul(h,X)|0;f=f+Math.imul(s,Y)|0;c=c+Math.imul(s,Z)|0;c=c+Math.imul(l,Y)|0;a=a+Math.imul(l,Z)|0;var we=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(we>>>26)|0;we&=67108863;f=Math.imul(k,z);c=Math.imul(k,D);c=c+Math.imul(I,z)|0;a=Math.imul(I,D);f=f+Math.imul(_,K)|0;c=c+Math.imul(_,F)|0;c=c+Math.imul(S,K)|0;a=a+Math.imul(S,F)|0;f=f+Math.imul(g,V)|0;c=c+Math.imul(g,X)|0;c=c+Math.imul(y,V)|0;a=a+Math.imul(y,X)|0;f=f+Math.imul(b,Y)|0;c=c+Math.imul(b,Z)|0;c=c+Math.imul(h,Y)|0;a=a+Math.imul(h,Z)|0;f=f+Math.imul(s,$)|0;c=c+Math.imul(s,ee)|0;c=c+Math.imul(l,$)|0;a=a+Math.imul(l,ee)|0;var _e=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(_e>>>26)|0;_e&=67108863;f=Math.imul(x,z);c=Math.imul(x,D);c=c+Math.imul(A,z)|0;a=Math.imul(A,D);f=f+Math.imul(k,K)|0;c=c+Math.imul(k,F)|0;c=c+Math.imul(I,K)|0;a=a+Math.imul(I,F)|0;f=f+Math.imul(_,V)|0;c=c+Math.imul(_,X)|0;c=c+Math.imul(S,V)|0;a=a+Math.imul(S,X)|0;f=f+Math.imul(g,Y)|0;c=c+Math.imul(g,Z)|0;c=c+Math.imul(y,Y)|0;a=a+Math.imul(y,Z)|0;f=f+Math.imul(b,$)|0;c=c+Math.imul(b,ee)|0;c=c+Math.imul(h,$)|0;a=a+Math.imul(h,ee)|0;f=f+Math.imul(s,ne)|0;c=c+Math.imul(s,re)|0;c=c+Math.imul(l,ne)|0;a=a+Math.imul(l,re)|0;var Se=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Se>>>26)|0;Se&=67108863;f=Math.imul(E,z);c=Math.imul(E,D);c=c+Math.imul(M,z)|0;a=Math.imul(M,D);f=f+Math.imul(x,K)|0;c=c+Math.imul(x,F)|0;c=c+Math.imul(A,K)|0;a=a+Math.imul(A,F)|0;f=f+Math.imul(k,V)|0;c=c+Math.imul(k,X)|0;c=c+Math.imul(I,V)|0;a=a+Math.imul(I,X)|0;f=f+Math.imul(_,Y)|0;c=c+Math.imul(_,Z)|0;c=c+Math.imul(S,Y)|0;a=a+Math.imul(S,Z)|0;f=f+Math.imul(g,$)|0;c=c+Math.imul(g,ee)|0;c=c+Math.imul(y,$)|0;a=a+Math.imul(y,ee)|0;f=f+Math.imul(b,ne)|0;c=c+Math.imul(b,re)|0;c=c+Math.imul(h,ne)|0;a=a+Math.imul(h,re)|0;f=f+Math.imul(s,ie)|0;c=c+Math.imul(s,oe)|0;c=c+Math.imul(l,ie)|0;a=a+Math.imul(l,oe)|0;var ve=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(ve>>>26)|0;ve&=67108863;f=Math.imul(N,z);c=Math.imul(N,D);c=c+Math.imul(L,z)|0;a=Math.imul(L,D);f=f+Math.imul(E,K)|0;c=c+Math.imul(E,F)|0;c=c+Math.imul(M,K)|0;a=a+Math.imul(M,F)|0;f=f+Math.imul(x,V)|0;c=c+Math.imul(x,X)|0;c=c+Math.imul(A,V)|0;a=a+Math.imul(A,X)|0;f=f+Math.imul(k,Y)|0;c=c+Math.imul(k,Z)|0;c=c+Math.imul(I,Y)|0;a=a+Math.imul(I,Z)|0;f=f+Math.imul(_,$)|0;c=c+Math.imul(_,ee)|0;c=c+Math.imul(S,$)|0;a=a+Math.imul(S,ee)|0;f=f+Math.imul(g,ne)|0;c=c+Math.imul(g,re)|0;c=c+Math.imul(y,ne)|0;a=a+Math.imul(y,re)|0;f=f+Math.imul(b,ie)|0;c=c+Math.imul(b,oe)|0;c=c+Math.imul(h,ie)|0;a=a+Math.imul(h,oe)|0;f=f+Math.imul(s,ce)|0;c=c+Math.imul(s,ae)|0;c=c+Math.imul(l,ce)|0;a=a+Math.imul(l,ae)|0;var ke=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(ke>>>26)|0;ke&=67108863;f=Math.imul(R,z);c=Math.imul(R,D);c=c+Math.imul(U,z)|0;a=Math.imul(U,D);f=f+Math.imul(N,K)|0;c=c+Math.imul(N,F)|0;c=c+Math.imul(L,K)|0;a=a+Math.imul(L,F)|0;f=f+Math.imul(E,V)|0;c=c+Math.imul(E,X)|0;c=c+Math.imul(M,V)|0;a=a+Math.imul(M,X)|0;f=f+Math.imul(x,Y)|0;c=c+Math.imul(x,Z)|0;c=c+Math.imul(A,Y)|0;a=a+Math.imul(A,Z)|0;f=f+Math.imul(k,$)|0;c=c+Math.imul(k,ee)|0;c=c+Math.imul(I,$)|0;a=a+Math.imul(I,ee)|0;f=f+Math.imul(_,ne)|0;c=c+Math.imul(_,re)|0;c=c+Math.imul(S,ne)|0;a=a+Math.imul(S,re)|0;f=f+Math.imul(g,ie)|0;c=c+Math.imul(g,oe)|0;c=c+Math.imul(y,ie)|0;a=a+Math.imul(y,oe)|0;f=f+Math.imul(b,ce)|0;c=c+Math.imul(b,ae)|0;c=c+Math.imul(h,ce)|0;a=a+Math.imul(h,ae)|0;f=f+Math.imul(s,se)|0;c=c+Math.imul(s,le)|0;c=c+Math.imul(l,se)|0;a=a+Math.imul(l,le)|0;var Ie=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Ie>>>26)|0;Ie&=67108863;f=Math.imul(C,z);c=Math.imul(C,D);c=c+Math.imul(H,z)|0;a=Math.imul(H,D);f=f+Math.imul(R,K)|0;c=c+Math.imul(R,F)|0;c=c+Math.imul(U,K)|0;a=a+Math.imul(U,F)|0;f=f+Math.imul(N,V)|0;c=c+Math.imul(N,X)|0;c=c+Math.imul(L,V)|0;a=a+Math.imul(L,X)|0;f=f+Math.imul(E,Y)|0;c=c+Math.imul(E,Z)|0;c=c+Math.imul(M,Y)|0;a=a+Math.imul(M,Z)|0;f=f+Math.imul(x,$)|0;c=c+Math.imul(x,ee)|0;c=c+Math.imul(A,$)|0;a=a+Math.imul(A,ee)|0;f=f+Math.imul(k,ne)|0;c=c+Math.imul(k,re)|0;c=c+Math.imul(I,ne)|0;a=a+Math.imul(I,re)|0;f=f+Math.imul(_,ie)|0;c=c+Math.imul(_,oe)|0;c=c+Math.imul(S,ie)|0;a=a+Math.imul(S,oe)|0;f=f+Math.imul(g,ce)|0;c=c+Math.imul(g,ae)|0;c=c+Math.imul(y,ce)|0;a=a+Math.imul(y,ae)|0;f=f+Math.imul(b,se)|0;c=c+Math.imul(b,le)|0;c=c+Math.imul(h,se)|0;a=a+Math.imul(h,le)|0;f=f+Math.imul(s,be)|0;c=c+Math.imul(s,he)|0;c=c+Math.imul(l,be)|0;a=a+Math.imul(l,he)|0;var Pe=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Pe>>>26)|0;Pe&=67108863;f=Math.imul(C,K);c=Math.imul(C,F);c=c+Math.imul(H,K)|0;a=Math.imul(H,F);f=f+Math.imul(R,V)|0;c=c+Math.imul(R,X)|0;c=c+Math.imul(U,V)|0;a=a+Math.imul(U,X)|0;f=f+Math.imul(N,Y)|0;c=c+Math.imul(N,Z)|0;c=c+Math.imul(L,Y)|0;a=a+Math.imul(L,Z)|0;f=f+Math.imul(E,$)|0;c=c+Math.imul(E,ee)|0;c=c+Math.imul(M,$)|0;a=a+Math.imul(M,ee)|0;f=f+Math.imul(x,ne)|0;c=c+Math.imul(x,re)|0;c=c+Math.imul(A,ne)|0;a=a+Math.imul(A,re)|0;f=f+Math.imul(k,ie)|0;c=c+Math.imul(k,oe)|0;c=c+Math.imul(I,ie)|0;a=a+Math.imul(I,oe)|0;f=f+Math.imul(_,ce)|0;c=c+Math.imul(_,ae)|0;c=c+Math.imul(S,ce)|0;a=a+Math.imul(S,ae)|0;f=f+Math.imul(g,se)|0;c=c+Math.imul(g,le)|0;c=c+Math.imul(y,se)|0;a=a+Math.imul(y,le)|0;f=f+Math.imul(b,be)|0;c=c+Math.imul(b,he)|0;c=c+Math.imul(h,be)|0;a=a+Math.imul(h,he)|0;var xe=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(xe>>>26)|0;xe&=67108863;f=Math.imul(C,V);c=Math.imul(C,X);c=c+Math.imul(H,V)|0;a=Math.imul(H,X);f=f+Math.imul(R,Y)|0;c=c+Math.imul(R,Z)|0;c=c+Math.imul(U,Y)|0;a=a+Math.imul(U,Z)|0;f=f+Math.imul(N,$)|0;c=c+Math.imul(N,ee)|0;c=c+Math.imul(L,$)|0;a=a+Math.imul(L,ee)|0;f=f+Math.imul(E,ne)|0;c=c+Math.imul(E,re)|0;c=c+Math.imul(M,ne)|0;a=a+Math.imul(M,re)|0;f=f+Math.imul(x,ie)|0;c=c+Math.imul(x,oe)|0;c=c+Math.imul(A,ie)|0;a=a+Math.imul(A,oe)|0;f=f+Math.imul(k,ce)|0;c=c+Math.imul(k,ae)|0;c=c+Math.imul(I,ce)|0;a=a+Math.imul(I,ae)|0;f=f+Math.imul(_,se)|0;c=c+Math.imul(_,le)|0;c=c+Math.imul(S,se)|0;a=a+Math.imul(S,le)|0;f=f+Math.imul(g,be)|0;c=c+Math.imul(g,he)|0;c=c+Math.imul(y,be)|0;a=a+Math.imul(y,he)|0;var Ae=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Ae>>>26)|0;Ae&=67108863;f=Math.imul(C,Y);c=Math.imul(C,Z);c=c+Math.imul(H,Y)|0;a=Math.imul(H,Z);f=f+Math.imul(R,$)|0;c=c+Math.imul(R,ee)|0;c=c+Math.imul(U,$)|0;a=a+Math.imul(U,ee)|0;f=f+Math.imul(N,ne)|0;c=c+Math.imul(N,re)|0;c=c+Math.imul(L,ne)|0;a=a+Math.imul(L,re)|0;f=f+Math.imul(E,ie)|0;c=c+Math.imul(E,oe)|0;c=c+Math.imul(M,ie)|0;a=a+Math.imul(M,oe)|0;f=f+Math.imul(x,ce)|0;c=c+Math.imul(x,ae)|0;c=c+Math.imul(A,ce)|0;a=a+Math.imul(A,ae)|0;f=f+Math.imul(k,se)|0;c=c+Math.imul(k,le)|0;c=c+Math.imul(I,se)|0;a=a+Math.imul(I,le)|0;f=f+Math.imul(_,be)|0;c=c+Math.imul(_,he)|0;c=c+Math.imul(S,be)|0;a=a+Math.imul(S,he)|0;var Oe=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Oe>>>26)|0;Oe&=67108863;f=Math.imul(C,$);c=Math.imul(C,ee);c=c+Math.imul(H,$)|0;a=Math.imul(H,ee);f=f+Math.imul(R,ne)|0;c=c+Math.imul(R,re)|0;c=c+Math.imul(U,ne)|0;a=a+Math.imul(U,re)|0;f=f+Math.imul(N,ie)|0;c=c+Math.imul(N,oe)|0;c=c+Math.imul(L,ie)|0;a=a+Math.imul(L,oe)|0;f=f+Math.imul(E,ce)|0;c=c+Math.imul(E,ae)|0;c=c+Math.imul(M,ce)|0;a=a+Math.imul(M,ae)|0;f=f+Math.imul(x,se)|0;c=c+Math.imul(x,le)|0;c=c+Math.imul(A,se)|0;a=a+Math.imul(A,le)|0;f=f+Math.imul(k,be)|0;c=c+Math.imul(k,he)|0;c=c+Math.imul(I,be)|0;a=a+Math.imul(I,he)|0;var Ee=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Ee>>>26)|0;Ee&=67108863;f=Math.imul(C,ne);c=Math.imul(C,re);c=c+Math.imul(H,ne)|0;a=Math.imul(H,re);f=f+Math.imul(R,ie)|0;c=c+Math.imul(R,oe)|0;c=c+Math.imul(U,ie)|0;a=a+Math.imul(U,oe)|0;f=f+Math.imul(N,ce)|0;c=c+Math.imul(N,ae)|0;c=c+Math.imul(L,ce)|0;a=a+Math.imul(L,ae)|0;f=f+Math.imul(E,se)|0;c=c+Math.imul(E,le)|0;c=c+Math.imul(M,se)|0;a=a+Math.imul(M,le)|0;f=f+Math.imul(x,be)|0;c=c+Math.imul(x,he)|0;c=c+Math.imul(A,be)|0;a=a+Math.imul(A,he)|0;var Me=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Me>>>26)|0;Me&=67108863;f=Math.imul(C,ie);c=Math.imul(C,oe);c=c+Math.imul(H,ie)|0;a=Math.imul(H,oe);f=f+Math.imul(R,ce)|0;c=c+Math.imul(R,ae)|0;c=c+Math.imul(U,ce)|0;a=a+Math.imul(U,ae)|0;f=f+Math.imul(N,se)|0;c=c+Math.imul(N,le)|0;c=c+Math.imul(L,se)|0;a=a+Math.imul(L,le)|0;f=f+Math.imul(E,be)|0;c=c+Math.imul(E,he)|0;c=c+Math.imul(M,be)|0;a=a+Math.imul(M,he)|0;var Be=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Be>>>26)|0;Be&=67108863;f=Math.imul(C,ce);c=Math.imul(C,ae);c=c+Math.imul(H,ce)|0;a=Math.imul(H,ae);f=f+Math.imul(R,se)|0;c=c+Math.imul(R,le)|0;c=c+Math.imul(U,se)|0;a=a+Math.imul(U,le)|0;f=f+Math.imul(N,be)|0;c=c+Math.imul(N,he)|0;c=c+Math.imul(L,be)|0;a=a+Math.imul(L,he)|0;var Ne=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Ne>>>26)|0;Ne&=67108863;f=Math.imul(C,se);c=Math.imul(C,le);c=c+Math.imul(H,se)|0;a=Math.imul(H,le);f=f+Math.imul(R,be)|0;c=c+Math.imul(R,he)|0;c=c+Math.imul(U,be)|0;a=a+Math.imul(U,he)|0;var Le=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Le>>>26)|0;Le&=67108863;f=Math.imul(C,be);c=Math.imul(C,he);c=c+Math.imul(H,be)|0;a=Math.imul(H,he);var Te=(o+f|0)+((c&8191)<<13)|0;o=(a+(c>>>13)|0)+(Te>>>26)|0;Te&=67108863;i[0]=me;i[1]=ge;i[2]=ye;i[3]=we;i[4]=_e;i[5]=Se;i[6]=ve;i[7]=ke;i[8]=Ie;i[9]=Pe;i[10]=xe;i[11]=Ae;i[12]=Oe;i[13]=Ee;i[14]=Me;i[15]=Be;i[16]=Ne;i[17]=Le;i[18]=Te;o!==0&&(i[19]=o,n.length++);return n};Math.imul||(b=p);function h(e,t,n){n.negative=t.negative^e.negative;n.length=e.length+t.length;var r=0,u=0;for(var i=0;i<n.length-1;i++){var o=u;u=0;var f=r&67108863,c=Math.min(i,t.length-1);for(var a=Math.max(0,i-e.length+1);a<=c;a++){var d=i-a,s=e.words[d]|0,l=t.words[a]|0,p=s*l,b=p&67108863;o=o+(p/67108864|0)|0;b=b+f|0;f=b&67108863;o=o+(b>>>26)|0;u+=o>>>26;o&=67108863}n.words[i]=f;r=o;o=u}r!==0?(n.words[i]=r):n.length--;return n.strip()}function m(e,t,n){var r=new g;return r.mulp(e,t,n)}i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;this.length===10&&e.length===10?(n=b(this,e,t)):r<63?(n=p(this,e,t)):r<1024?(n=h(this,e,t)):(n=m(this,e,t));return n};function g(e,t){this.x=e;this.y=t}g.prototype.makeRBT=function(e){var t=new Array(e),n=i.prototype._countBits(e)-1;for(var r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t};g.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;var r=0;for(var u=0;u<t;u++)r|=(e&1)<<t-u-1,e>>=1;return r};g.prototype.permute=function(e,t,n,r,u,i){for(var o=0;o<i;o++)r[o]=t[e[o]],u[o]=n[e[o]]};g.prototype.transform=function(e,t,n,r,u,i){this.permute(i,e,t,n,r,u);for(var o=1;o<u;o<<=1){var f=o<<1,c=Math.cos(2*Math.PI/f),a=Math.sin(2*Math.PI/f);for(var d=0;d<u;d+=f){var s=c,l=a;for(var p=0;p<o;p++){var b=n[d+p],h=r[d+p],m=n[d+p+o],g=r[d+p+o],y=s*m-l*g;g=s*g+l*m;m=y;n[d+p]=b+m;r[d+p]=h+g;n[d+p+o]=b-m;r[d+p+o]=h-g;p!==f&&(y=c*s-a*l,l=c*l+a*s,s=y)}}}};g.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,r=n&1,u=0;for(n=n/2|0;n;n>>>=1)u++;return 1<<u+1+r};g.prototype.conjugate=function(e,t,n){if(n<=1)return;for(var r=0;r<n/2;r++){var u=e[r];e[r]=e[n-r-1];e[n-r-1]=u;u=t[r];t[r]=-t[n-r-1];t[n-r-1]=-u}};g.prototype.normalize13b=function(e,t){var n=0;for(var r=0;r<t/2;r++){var u=Math.round(e[2*r+1]/t)*8192+Math.round(e[2*r]/t)+n;e[r]=u&67108863;u<67108864?(n=0):(n=u/67108864|0)}return e};g.prototype.convert13b=function(e,t,n,u){var i=0;for(var o=0;o<t;o++)i+=(e[o]|0),n[2*o]=i&8191,i>>>=13,n[2*o+1]=i&8191,i>>>=13;for(o=2*t;o<u;++o)n[o]=0;r(i===0);r((i&-8192)===0)};g.prototype.stub=function(e){var t=new Array(e);for(var n=0;n<e;n++)t[n]=0;return t};g.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),u=this.makeRBT(r),i=this.stub(r),o=new Array(r),f=new Array(r),c=new Array(r),a=new Array(r),d=new Array(r),s=new Array(r),l=n.words;l.length=r;this.convert13b(e.words,e.length,o,r);this.convert13b(t.words,t.length,a,r);this.transform(o,i,f,c,r,u);this.transform(a,i,d,s,r,u);for(var p=0;p<r;p++){var b=f[p]*d[p]-c[p]*s[p];c[p]=f[p]*s[p]+c[p]*d[p];f[p]=b}this.conjugate(f,c,r);this.transform(f,c,l,i,r,u);this.conjugate(l,i,r);this.normalize13b(l,r);n.negative=e.negative^t.negative;n.length=e.length+t.length;return n.strip()};i.prototype.mul=function(e){var t=new i(null);t.words=new Array(this.length+e.length);return this.mulTo(e,t)};i.prototype.mulf=function(e){var t=new i(null);t.words=new Array(this.length+e.length);return m(this,e,t)};i.prototype.imul=function(e){return this.clone().mulTo(e,this)};i.prototype.imuln=function(e){r(typeof e==='number');r(e<67108864);var t=0;for(var n=0;n<this.length;n++){var u=(this.words[n]|0)*e,i=(u&67108863)+(t&67108863);t>>=26;t+=u/67108864|0;t+=i>>>26;this.words[n]=i&67108863}t!==0&&(this.words[n]=t,this.length++);return this};i.prototype.muln=function(e){return this.clone().imuln(e)};i.prototype.sqr=function(){return this.mul(this)};i.prototype.isqr=function(){return this.imul(this.clone())};i.prototype.pow=function(e){var t=l(e);if(t.length===0)return new i(1);var n=this;for(var r=0;r<t.length;r++, n=n.sqr()){if(t[r]!==0)break}if(++r<t.length){for(var u=n.sqr();r<t.length;r++, u=u.sqr()){if(t[r]===0)continue;n=n.mul(u)}}return n};i.prototype.iushln=function(e){r(typeof e==='number'&&e>=0);var t=e%26,n=(e-t)/26,u=67108863>>>26-t<<26-t,i;if(t!==0){var o=0;for(i=0;i<this.length;i++){var f=this.words[i]&u,c=(this.words[i]|0)-f<<t;this.words[i]=c|o;o=f>>>26-t}o&&(this.words[i]=o,this.length++)}if(n!==0){for(i=this.length-1;i>=0;i--)this.words[i+n]=this.words[i];for(i=0;i<n;i++)this.words[i]=0;this.length+=n}return this.strip()};i.prototype.ishln=function(e){r(this.negative===0);return this.iushln(e)};i.prototype.iushrn=function(e,t,n){r(typeof e==='number'&&e>=0);var u;t?(u=(t-t%26)/26):(u=0);var i=e%26,o=Math.min((e-i)/26,this.length),f=67108863^67108863>>>i<<i,c=n;u-=o;u=Math.max(0,u);if(c){for(var a=0;a<o;a++)c.words[a]=this.words[a];c.length=o}if(!(o===0))if(this.length>o){this.length-=o;for(a=0;a<this.length;a++)this.words[a]=this.words[a+o]}else this.words[0]=0,this.length=1;var d=0;for(a=this.length-1;a>=0&&(d!==0||a>=u);a--){var s=this.words[a]|0;this.words[a]=d<<26-i|s>>>i;d=s&f}c&&d!==0&&(c.words[c.length++]=d);this.length===0&&(this.words[0]=0,this.length=1);return this.strip()};i.prototype.ishrn=function(e,t,n){r(this.negative===0);return this.iushrn(e,t,n)};i.prototype.shln=function(e){return this.clone().ishln(e)};i.prototype.ushln=function(e){return this.clone().iushln(e)};i.prototype.shrn=function(e){return this.clone().ishrn(e)};i.prototype.ushrn=function(e){return this.clone().iushrn(e)};i.prototype.testn=function(e){r(typeof e==='number'&&e>=0);var t=e%26,n=(e-t)/26,u=1<<t;if(this.length<=n)return!1;var i=this.words[n];return!!(i&u)};i.prototype.imaskn=function(e){r(typeof e==='number'&&e>=0);var t=e%26,n=(e-t)/26;r(this.negative===0,'imaskn works only with positive numbers');if(this.length<=n){return this}t!==0&&n++;this.length=Math.min(n,this.length);if(t!==0){var u=67108863^67108863>>>t<<t;this.words[this.length-1]&=u}return this.strip()};i.prototype.maskn=function(e){return this.clone().imaskn(e)};i.prototype.iaddn=function(e){r(typeof e==='number');r(e<67108864);if(e<0)return this.isubn(-e);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<e){this.words[0]=e-(this.words[0]|0);this.negative=0;return this}this.negative=0;this.isubn(e);this.negative=1;return this}return this._iaddn(e)};i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?(this.words[t+1]=1):this.words[t+1]++;this.length=Math.max(this.length,t+1);return this};i.prototype.isubn=function(e){r(typeof e==='number');r(e<67108864);if(e<0)return this.iaddn(-e);if(this.negative!==0){this.negative=0;this.iaddn(e);this.negative=1;return this}this.words[0]-=e;if(this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else{for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1}return this.strip()};i.prototype.addn=function(e){return this.clone().iaddn(e)};i.prototype.subn=function(e){return this.clone().isubn(e)};i.prototype.iabs=function(){this.negative=0;return this};i.prototype.abs=function(){return this.clone().iabs()};i.prototype._ishlnsubmul=function(e,t,n){var u=e.length+n,i;this._expand(u);var o,f=0;for(i=0;i<e.length;i++){o=(this.words[i+n]|0)+f;var c=(e.words[i]|0)*t;o-=c&67108863;f=(o>>26)-(c/67108864|0);this.words[i+n]=o&67108863}for(;i<this.length-n;i++)o=(this.words[i+n]|0)+f,f=o>>26,this.words[i+n]=o&67108863;if(f===0)return this.strip();r(f===-1);f=0;for(i=0;i<this.length;i++)o=-(this.words[i]|0)+f,f=o>>26,this.words[i]=o&67108863;this.negative=1;return this.strip()};i.prototype._wordDiv=function(e,t){var n=this.length-e.length,r=this.clone(),u=e,o=u.words[u.length-1]|0,f=this._countBits(o);n=26-f;n!==0&&(u=u.ushln(n),r.iushln(n),o=u.words[u.length-1]|0);var c=r.length-u.length,a;if(t!=='mod'){a=new i(null);a.length=c+1;a.words=new Array(a.length);for(var d=0;d<a.length;d++)a.words[d]=0}var s=r.clone()._ishlnsubmul(u,1,c);s.negative===0&&(r=s,a&&(a.words[c]=1));for(var l=c-1;l>=0;l--){var p=(r.words[u.length+l]|0)*67108864+(r.words[u.length+l-1]|0);p=Math.min(p/o|0,67108863);r._ishlnsubmul(u,p,l);while(r.negative!==0)p--,r.negative=0,r._ishlnsubmul(u,1,l),r.isZero()||(r.negative^=1);a&&(a.words[l]=p)}a&&a.strip();r.strip();t!=='div'&&n!==0&&r.iushrn(n);return{div:a||null,mod:r}};i.prototype.divmod=function(e,t,n){r(!e.isZero());if(this.isZero()){return{div:new i(0),mod:new i(0)}}var u,o,f;if(this.negative!==0&&e.negative===0){f=this.neg().divmod(e,t);t!=='mod'&&(u=f.div.neg());t!=='div'&&(o=f.mod.neg(),n&&o.negative!==0&&o.iadd(e));return{div:u,mod:o}}if(this.negative===0&&e.negative!==0){f=this.divmod(e.neg(),t);t!=='mod'&&(u=f.div.neg());return{div:u,mod:f.mod}}if((this.negative&e.negative)!==0){f=this.neg().divmod(e.neg(),t);t!=='div'&&(o=f.mod.neg(),n&&o.negative!==0&&o.isub(e));return{div:f.div,mod:o}}if(e.length>this.length||this.cmp(e)<0){return{div:new i(0),mod:this}}if(e.length===1){if(t==='div'){return{div:this.divn(e.words[0]),mod:null}}if(t==='mod'){return{div:null,mod:new i(this.modn(e.words[0]))}}return{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}}return this._wordDiv(e,t)};i.prototype.div=function(e){return this.divmod(e,'div',!1).div};i.prototype.mod=function(e){return this.divmod(e,'mod',!1).mod};i.prototype.umod=function(e){return this.divmod(e,'mod',!0).mod};i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,r=e.ushrn(1),u=e.andln(1),i=n.cmp(r);if(i<0||u===1&&i===0)return t.div;return t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)};i.prototype.modn=function(e){r(e<=67108863);var t=67108864%e,n=0;for(var u=this.length-1;u>=0;u--)n=(t*n+(this.words[u]|0))%e;return n};i.prototype.idivn=function(e){r(e<=67108863);var t=0;for(var n=this.length-1;n>=0;n--){var u=(this.words[n]|0)+t*67108864;this.words[n]=u/e|0;t=u%e}return this.strip()};i.prototype.divn=function(e){return this.clone().idivn(e)};i.prototype.egcd=function(e){r(e.negative===0);r(!e.isZero());var t=this,n=e.clone();t.negative!==0?(t=t.umod(e)):(t=t.clone());var u=new i(1),o=new i(0),f=new i(0),c=new i(1),a=0;while(t.isEven()&&n.isEven())t.iushrn(1),n.iushrn(1),++a;var d=n.clone(),s=t.clone();while(!t.isZero()){for(var l=0,p=1;(t.words[0]&p)===0&&l<26;++l, p<<=1);;if(l>0){t.iushrn(l);while(l-->0)(u.isOdd()||o.isOdd())&&(u.iadd(d),o.isub(s)),u.iushrn(1),o.iushrn(1)}for(var b=0,h=1;(n.words[0]&h)===0&&b<26;++b, h<<=1);;if(b>0){n.iushrn(b);while(b-->0)(f.isOdd()||c.isOdd())&&(f.iadd(d),c.isub(s)),f.iushrn(1),c.iushrn(1)}t.cmp(n)>=0?(t.isub(n),u.isub(f),o.isub(c)):(n.isub(t),f.isub(u),c.isub(o))}return{a:f,b:c,gcd:n.iushln(a)}};i.prototype._invmp=function(e){r(e.negative===0);r(!e.isZero());var t=this,n=e.clone();t.negative!==0?(t=t.umod(e)):(t=t.clone());var u=new i(1),o=new i(0),f=n.clone();while(t.cmpn(1)>0&&n.cmpn(1)>0){for(var c=0,a=1;(t.words[0]&a)===0&&c<26;++c, a<<=1);;if(c>0){t.iushrn(c);while(c-->0)u.isOdd()&&u.iadd(f),u.iushrn(1)}for(var d=0,s=1;(n.words[0]&s)===0&&d<26;++d, s<<=1);;if(d>0){n.iushrn(d);while(d-->0)o.isOdd()&&o.iadd(f),o.iushrn(1)}t.cmp(n)>=0?(t.isub(n),u.isub(o)):(n.isub(t),o.isub(u))}var l;t.cmpn(1)===0?(l=u):(l=o);l.cmpn(0)<0&&l.iadd(e);return l};i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0;n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);do{while(t.isEven())t.iushrn(1);while(n.isEven())n.iushrn(1);var u=t.cmp(n);if(u<0){var i=t;t=n;n=i}else if(u===0||n.cmpn(1)===0){break}t.isub(n)}while(!0);return n.iushln(r)};i.prototype.invm=function(e){return this.egcd(e).a.umod(e)};i.prototype.isEven=function(){return(this.words[0]&1)===0};i.prototype.isOdd=function(){return(this.words[0]&1)===1};i.prototype.andln=function(e){return this.words[0]&e};i.prototype.bincn=function(e){r(typeof e==='number');var t=e%26,n=(e-t)/26,u=1<<t;if(this.length<=n){this._expand(n+1);this.words[n]|=u;return this}var i=u;for(var o=n;i!==0&&o<this.length;o++){var f=this.words[o]|0;f+=i;i=f>>>26;f&=67108863;this.words[o]=f}i!==0&&(this.words[o]=i,this.length++);return this};i.prototype.isZero=function(){return this.length===1&&this.words[0]===0};i.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e);r(e<=67108863,'Number is too big');var u=this.words[0]|0;n=u===e?0:u<e?-1:1}if(this.negative!==0)return-n|0;return n};i.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);if(this.negative!==0)return-t|0;return t};i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;var t=0;for(var n=this.length-1;n>=0;n--){var r=this.words[n]|0,u=e.words[n]|0;if(r===u)continue;r<u?(t=-1):r>u&&(t=1);break}return t};i.prototype.gtn=function(e){return this.cmpn(e)===1};i.prototype.gt=function(e){return this.cmp(e)===1};i.prototype.gten=function(e){return this.cmpn(e)>=0};i.prototype.gte=function(e){return this.cmp(e)>=0};i.prototype.ltn=function(e){return this.cmpn(e)===-1};i.prototype.lt=function(e){return this.cmp(e)===-1};i.prototype.lten=function(e){return this.cmpn(e)<=0};i.prototype.lte=function(e){return this.cmp(e)<=0};i.prototype.eqn=function(e){return this.cmpn(e)===0};i.prototype.eq=function(e){return this.cmp(e)===0};i.red=function(e){return new I(e)};i.prototype.toRed=function(e){r(!this.red,'Already a number in reduction context');r(this.negative===0,'red works only with positives');return e.convertTo(this)._forceRed(e)};i.prototype.fromRed=function(){r(this.red,'fromRed works only with numbers in reduction context');return this.red.convertFrom(this)};i.prototype._forceRed=function(e){this.red=e;return this};i.prototype.forceRed=function(e){r(!this.red,'Already a number in reduction context');return this._forceRed(e)};i.prototype.redAdd=function(e){r(this.red,'redAdd works only with red numbers');return this.red.add(this,e)};i.prototype.redIAdd=function(e){r(this.red,'redIAdd works only with red numbers');return this.red.iadd(this,e)};i.prototype.redSub=function(e){r(this.red,'redSub works only with red numbers');return this.red.sub(this,e)};i.prototype.redISub=function(e){r(this.red,'redISub works only with red numbers');return this.red.isub(this,e)};i.prototype.redShl=function(e){r(this.red,'redShl works only with red numbers');return this.red.shl(this,e)};i.prototype.redMul=function(e){r(this.red,'redMul works only with red numbers');this.red._verify2(this,e);return this.red.mul(this,e)};i.prototype.redIMul=function(e){r(this.red,'redMul works only with red numbers');this.red._verify2(this,e);return this.red.imul(this,e)};i.prototype.redSqr=function(){r(this.red,'redSqr works only with red numbers');this.red._verify1(this);return this.red.sqr(this)};i.prototype.redISqr=function(){r(this.red,'redISqr works only with red numbers');this.red._verify1(this);return this.red.isqr(this)};i.prototype.redSqrt=function(){r(this.red,'redSqrt works only with red numbers');this.red._verify1(this);return this.red.sqrt(this)};i.prototype.redInvm=function(){r(this.red,'redInvm works only with red numbers');this.red._verify1(this);return this.red.invm(this)};i.prototype.redNeg=function(){r(this.red,'redNeg works only with red numbers');this.red._verify1(this);return this.red.neg(this)};i.prototype.redPow=function(e){r(this.red&&!e.red,'redPow(normalNum)');this.red._verify1(this);return this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e;this.p=new i(t,16);this.n=this.p.bitLength();this.k=new i(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}w.prototype._tmp=function(){var e=new i(null);e.words=new Array(Math.ceil(this.n/13));return e};w.prototype.ireduce=function(e){var t=e,n;do{this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength()}while(n>this.n);var r=n<this.n?-1:t.ucmp(this.p);r===0?(t.words[0]=0,t.length=1):r>0?t.isub(this.p):t.strip();return t};w.prototype.split=function(e,t){e.iushrn(this.n,0,t)};w.prototype.imulK=function(e){return e.imul(this.k)};function _(){w.call(this,'k256','ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f')}u(_,w);_.prototype.split=function(e,t){var n=4194303,r=Math.min(e.length,9);for(var u=0;u<r;u++)t.words[u]=e.words[u];t.length=r;if(e.length<=9){e.words[0]=0;e.length=1;return}var i=e.words[9];t.words[t.length++]=i&n;for(u=10;u<e.length;u++){var o=e.words[u]|0;e.words[u-10]=(o&n)<<4|i>>>22;i=o}i>>>=22;e.words[u-10]=i;i===0&&e.length>10?(e.length-=10):(e.length-=9)};_.prototype.imulK=function(e){e.words[e.length]=0;e.words[e.length+1]=0;e.length+=2;var t=0;for(var n=0;n<e.length;n++){var r=e.words[n]|0;t+=r*977;e.words[n]=t&67108863;t=r*64+(t/67108864|0)}e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--);return e};function S(){w.call(this,'p224','ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001')}u(S,w);function v(){w.call(this,'p192','ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff')}u(v,w);function k(){w.call(this,'25519','7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed')}u(k,w);k.prototype.imulK=function(e){var t=0;for(var n=0;n<e.length;n++){var r=(e.words[n]|0)*19+t,u=r&67108863;r>>>=26;e.words[n]=u;t=r}t!==0&&(e.words[e.length++]=t);return e};i._prime=function(t){if(y[t])return y[t];var e;if(t==='k256')e=new _;else if(t==='p224')e=new S;else if(t==='p192')e=new v;else if(t==='p25519')e=new k;else{throw new Error('Unknown prime '+t)}y[t]=e;return e};function I(e){if(typeof e==='string'){var t=i._prime(e);this.m=t.p;this.prime=t}else r(e.gtn(1),'modulus must be greater than 1'),this.m=e,this.prime=null}I.prototype._verify1=function(e){r(e.negative===0,'red works only with positives');r(e.red,'red works only with red numbers')};I.prototype._verify2=function(e,t){r((e.negative|t.negative)===0,'red works only with positives');r(e.red&&e.red===t.red,'red works only with red numbers')};I.prototype.imod=function(e){if(this.prime)return this.prime.ireduce(e)._forceRed(this);return e.umod(this.m)._forceRed(this)};I.prototype.neg=function(e){if(e.isZero()){return e.clone()}return this.m.sub(e)._forceRed(this)};I.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);n.cmp(this.m)>=0&&n.isub(this.m);return n._forceRed(this)};I.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);n.cmp(this.m)>=0&&n.isub(this.m);return n};I.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);n.cmpn(0)<0&&n.iadd(this.m);return n._forceRed(this)};I.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);n.cmpn(0)<0&&n.iadd(this.m);return n};I.prototype.shl=function(e,t){this._verify1(e);return this.imod(e.ushln(t))};I.prototype.imul=function(e,t){this._verify2(e,t);return this.imod(e.imul(t))};I.prototype.mul=function(e,t){this._verify2(e,t);return this.imod(e.mul(t))};I.prototype.isqr=function(e){return this.imul(e,e.clone())};I.prototype.sqr=function(e){return this.mul(e,e)};I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);r(t%2===1);if(t===3){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}var u=this.m.subn(1),o=0;while(!u.isZero()&&u.andln(1)===0)o++,u.iushrn(1);r(!u.isZero());var f=new i(1).toRed(this),c=f.redNeg(),a=this.m.subn(1).iushrn(1),d=this.m.bitLength();d=new i(2*d*d).toRed(this);while(this.pow(d,a).cmp(c)!==0)d.redIAdd(c);var s=this.pow(d,u),l=this.pow(e,u.addn(1).iushrn(1)),p=this.pow(e,u),b=o;while(p.cmp(f)!==0){var h=p;for(var m=0;h.cmp(f)!==0;m++)h=h.redSqr();r(m<b);var g=this.pow(s,new i(1).iushln(b-m-1));l=l.redMul(g);s=g.redSqr();p=p.redMul(s);b=m}return l};I.prototype.invm=function(e){var t=e._invmp(this.m);if(t.negative!==0){t.negative=0;return this.imod(t).redNeg()}else{return this.imod(t)}};I.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,r=new Array(1<<n);r[0]=new i(1).toRed(this);r[1]=e;for(var u=2;u<r.length;u++)r[u]=this.mul(r[u-1],e);var o=r[0],f=0,c=0,a=t.bitLength()%26;a===0&&(a=26);for(u=t.length-1;u>=0;u--){var d=t.words[u];for(var s=a-1;s>=0;s--){var l=d>>s&1;o!==r[0]&&(o=this.sqr(o));if(l===0&&f===0){c=0;continue}f<<=1;f|=l;c++;if(c!==n&&(u!==0||s!==0))continue;o=this.mul(o,r[f]);c=0;f=0}a=26}return o};I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t};I.prototype.convertFrom=function(e){var t=e.clone();t.red=null;return t};i.mont=function(e){return new P(e)};function P(e){I.call(this,e);this.shift=this.m.bitLength();this.shift%26!==0&&(this.shift+=26-this.shift%26);this.r=new i(1).iushln(this.shift);this.r2=this.imod(this.r.sqr());this.rinv=this.r._invmp(this.m);this.minv=this.rinv.mul(this.r).isubn(1).div(this.m);this.minv=this.minv.umod(this.r);this.minv=this.r.sub(this.minv)}u(P,I);P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))};P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));t.red=null;return t};P.prototype.imul=function(e,t){if(e.isZero()||t.isZero()){e.words[0]=0;e.length=1;return e}var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=n.isub(r).iushrn(this.shift),i=u;u.cmp(this.m)>=0?(i=u.isub(this.m)):u.cmpn(0)<0&&(i=u.iadd(this.m));return i._forceRed(this)};P.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=n.isub(r).iushrn(this.shift),o=u;u.cmp(this.m)>=0?(o=u.isub(this.m)):u.cmpn(0)<0&&(o=u.iadd(this.m));return o._forceRed(this)};P.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}(typeof t==='undefined'||t,this)},{"buffer":2}],83:[function(e,t,n){var r;t.exports=function(e){r||(r=new u(null));return r.generate(e)};function u(e){this.rand=e}t.exports.Rand=u;u.prototype.generate=function(e){return this._rand(e)};u.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);var t=new Uint8Array(e);for(var n=0;n<t.length;n++)t[n]=this.rand.getByte();return t};if(typeof self==='object')self.crypto&&self.crypto.getRandomValues?(u.prototype._rand=function(e){var t=new Uint8Array(e);self.crypto.getRandomValues(t);return t}):self.msCrypto&&self.msCrypto.getRandomValues?(u.prototype._rand=function(e){var t=new Uint8Array(e);self.msCrypto.getRandomValues(t);return t}):typeof window==='object'&&(u.prototype._rand=function(){throw new Error('Not implemented yet')});else{try{var i=e('crypto');if(typeof i.randomBytes!=='function')throw new Error('Not supported');u.prototype._rand=function(e){return i.randomBytes(e)}}catch(e){}}},{"crypto":2}],84:[function(e,t,n){var r=e('base-x'),u='123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';t.exports=r(u)},{"base-x":31}],85:[function(e,t,n){"use strict";var r=e('bs58'),u=e('safe-buffer').Buffer;t.exports=function(e){function t(t){var n=e(t);return r.encode(u.concat([t,n],t.length+4))}function n(t){var n=t.slice(0,-4),r=t.slice(-4),u=e(n);if(r[0]^u[0]|r[1]^u[1]|r[2]^u[2]|r[3]^u[3])return;return n}function i(e){var t=r.decodeUnsafe(e);if(!t)return;return n(t)}function o(t){var u=r.decode(t),i=n(u,e);if(!i)throw new Error('Invalid checksum');return i}return{encode:t,decode:o,decodeUnsafe:i}}},{"bs58":84,"safe-buffer":130}],86:[function(e,t,n){"use strict";var r=e('create-hash'),u=e('./base');function i(e){var t=r('sha256').update(e).digest();return r('sha256').update(t).digest()}t.exports=u(i)},{"./base":85,"create-hash":88}],87:[function(e,t,n){var r=e('safe-buffer').Buffer,u=e('stream').Transform,i=e('string_decoder').StringDecoder,o=e('inherits');function f(e){u.call(this);this.hashMode=typeof e==='string';this.hashMode?(this[e]=this._finalOrDigest):(this.final=this._finalOrDigest);this._final&&(this.__final=this._final,this._final=null);this._decoder=null;this._encoding=null}o(f,u);f.prototype.update=function(e,t,n){typeof e==='string'&&(e=r.from(e,t));var u=this._update(e);if(this.hashMode)return this;n&&(u=this._toString(u,n));return u};f.prototype.setAutoPadding=function(){};f.prototype.getAuthTag=function(){throw new Error('trying to get auth tag in unsupported state')};f.prototype.setAuthTag=function(){throw new Error('trying to set auth tag in unsupported state')};f.prototype.setAAD=function(){throw new Error('trying to set aad in unsupported state')};f.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}};f.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e};e(t)};f.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);e&&(t=this._toString(t,e,!0));return t};f.prototype._toString=function(e,t,n){this._decoder||(this._decoder=new i(t),this._encoding=t);if(this._encoding!==t)throw new Error('can\'t switch encodings');var r=this._decoder.write(e);n&&(r+=this._decoder.end());return r};t.exports=f},{"inherits":122,"safe-buffer":130,"stream":27,"string_decoder":28}],88:[function(e,t,n){"use strict";var r=e('inherits'),u=e('md5.js'),i=e('ripemd160'),o=e('sha.js'),f=e('cipher-base');function c(e){f.call(this,'digest');this._hash=e}r(c,f);c.prototype._update=function(e){this._hash.update(e)};c.prototype._final=function(){return this._hash.digest()};t.exports=function(e){e=e.toLowerCase();if(e==='md5')return new u;if(e==='rmd160'||e==='ripemd160')return new i;return new c(o(e))}},{"cipher-base":87,"inherits":122,"md5.js":123,"ripemd160":129,"sha.js":132}],89:[function(e,t,n){var r=e('md5.js');t.exports=function(e){return new r.update(e).digest()}},{"md5.js":123}],90:[function(e,t,n){"use strict";var r=e('inherits'),u=e('./legacy'),i=e('cipher-base'),o=e('safe-buffer').Buffer,f=e('create-hash/md5'),c=e('ripemd160'),a=e('sha.js'),d=o.alloc(128);function s(e,t){i.call(this,'digest');typeof t==='string'&&(t=o.from(t));var n=e==='sha512'||e==='sha384'?128:64;this._alg=e;this._key=t;if(t.length>n){var r=e==='rmd160'?new c:a(e);t=r.update(t).digest()}else t.length<n&&(t=o.concat([t,d],n));var u=this._ipad=o.allocUnsafe(n),f=this._opad=o.allocUnsafe(n);for(var s=0;s<n;s++)u[s]=t[s]^54,f[s]=t[s]^92;this._hash=e==='rmd160'?new c:a(e);this._hash.update(u)}r(s,i);s.prototype._update=function(e){this._hash.update(e)};s.prototype._final=function(){var e=this._hash.digest(),t=this._alg==='rmd160'?new c:a(this._alg);return t.update(this._opad).update(e).digest()};t.exports=function(e,t){e=e.toLowerCase();if(e==='rmd160'||e==='ripemd160'){return new s('rmd160',t)}if(e==='md5'){return new u(f,t)}return new s(e,t)}},{"./legacy":91,"cipher-base":87,"create-hash/md5":89,"inherits":122,"ripemd160":129,"safe-buffer":130,"sha.js":132}],91:[function(e,t,n){"use strict";var r=e('inherits'),u=e('safe-buffer').Buffer,i=e('cipher-base'),o=u.alloc(128),f=64;function c(e,t){i.call(this,'digest');typeof t==='string'&&(t=u.from(t));this._alg=e;this._key=t;t.length>f?(t=e(t)):t.length<f&&(t=u.concat([t,o],f));var n=this._ipad=u.allocUnsafe(f),r=this._opad=u.allocUnsafe(f);for(var c=0;c<f;c++)n[c]=t[c]^54,r[c]=t[c]^92;this._hash=[n]}r(c,i);c.prototype._update=function(e){this._hash.push(e)};c.prototype._final=function(){var e=this._alg(u.concat(this._hash));return this._alg(u.concat([this._opad,e]))};t.exports=c},{"cipher-base":87,"inherits":122,"safe-buffer":130}],92:[function(e,t,n){"use strict";var r=n;r.version=e('../package.json').version;r.utils=e('./elliptic/utils');r.rand=e('brorand');r.curve=e('./elliptic/curve');r.curves=e('./elliptic/curves');r.ec=e('./elliptic/ec');r.eddsa=e('./elliptic/eddsa')},{"../package.json":107,"./elliptic/curve":95,"./elliptic/curves":98,"./elliptic/ec":99,"./elliptic/eddsa":102,"./elliptic/utils":106,"brorand":83}],93:[function(e,t,n){"use strict";var r=e('bn.js'),u=e('../../elliptic'),i=u.utils,o=i.getNAF,f=i.getJSF,c=i.assert;function a(e,t){this.type=e;this.p=new r(t.p,16);this.red=t.prime?r.red(t.prime):r.mont(this.p);this.zero=new r(0).toRed(this.red);this.one=new r(1).toRed(this.red);this.two=new r(2).toRed(this.red);this.n=t.n&&new r(t.n,16);this.g=t.g&&this.pointFromJSON(t.g,t.gRed);this._wnafT1=new Array(4);this._wnafT2=new Array(4);this._wnafT3=new Array(4);this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?(this.redN=null):(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}t.exports=a;a.prototype.point=function(){throw new Error('Not implemented')};a.prototype.validate=function(){throw new Error('Not implemented')};a.prototype._fixedNafMul=function(e,t){c(e.precomputed);var n=e._getDoubles(),r=o(t,1),u=(1<<n.step+1)-(n.step%2===0?2:1);u/=3;var i=[];for(var f=0;f<r.length;f+=n.step){var a=0;for(t=f+n.step-1;t>=f;t--)a=(a<<1)+r[t];i.push(a)}var d=this.jpoint(null,null,null),s=this.jpoint(null,null,null);for(var l=u;l>0;l--){for(f=0;f<i.length;f++){a=i[f];a===l?(s=s.mixedAdd(n.points[f])):a===-l&&(s=s.mixedAdd(n.points[f].neg()))}d=d.add(s)}return d.toP()};a.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;var u=r.points,i=o(t,n),f=this.jpoint(null,null,null);for(var a=i.length-1;a>=0;a--){for(t=0;a>=0&&i[a]===0;a--)t++;a>=0&&t++;f=f.dblp(t);if(a<0)break;var d=i[a];c(d!==0);e.type==='affine'?(d>0?(f=f.mixedAdd(u[d-1>>1])):(f=f.mixedAdd(u[-d-1>>1].neg()))):(d>0?(f=f.add(u[d-1>>1])):(f=f.add(u[-d-1>>1].neg())))}return e.type==='affine'?f.toP():f};a.prototype._wnafMulAdd=function(e,t,n,r,u){var i=this._wnafT1,c=this._wnafT2,a=this._wnafT3,d=0;for(var s=0;s<r;s++){var l=t[s],p=l._getNAFPoints(e);i[s]=p.wnd;c[s]=p.points}for(s=r-1;s>=1;s-=2){var b=s-1,h=s;if(i[b]!==1||i[h]!==1){a[b]=o(n[b],i[b]);a[h]=o(n[h],i[h]);d=Math.max(a[b].length,d);d=Math.max(a[h].length,d);continue}var m=[t[b],null,null,t[h]];t[b].y.cmp(t[h].y)===0?(m[1]=t[b].add(t[h]),m[2]=t[b].toJ().mixedAdd(t[h].neg())):t[b].y.cmp(t[h].y.redNeg())===0?(m[1]=t[b].toJ().mixedAdd(t[h]),m[2]=t[b].add(t[h].neg())):(m[1]=t[b].toJ().mixedAdd(t[h]),m[2]=t[b].toJ().mixedAdd(t[h].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=f(n[b],n[h]);d=Math.max(y[0].length,d);a[b]=new Array(d);a[h]=new Array(d);for(var w=0;w<d;w++){var _=y[0][w]|0,S=y[1][w]|0;a[b][w]=g[(_+1)*3+(S+1)];a[h][w]=0;c[b]=m}}var v=this.jpoint(null,null,null),k=this._wnafT4;for(s=d;s>=0;s--){var I=0;while(s>=0){var P=!0;for(w=0;w<r;w++)k[w]=a[w][s]|0,k[w]!==0&&(P=!1);if(!P)break;I++;s--}s>=0&&I++;v=v.dblp(I);if(s<0)break;for(w=0;w<r;w++){var x=k[w],l;if(x===0)continue;else x>0?(l=c[w][x-1>>1]):x<0&&(l=c[w][-x-1>>1].neg());l.type==='affine'?(v=v.mixedAdd(l)):(v=v.add(l))}}for(s=0;s<r;s++)c[s]=null;if(u)return v;else return v.toP()};function d(e,t){this.curve=e;this.type=t;this.precomputed=null}a.BasePoint=d;d.prototype.eq=function(){throw new Error('Not implemented')};d.prototype.validate=function(){return this.curve.validate(this)};a.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?c(e[e.length-1]%2===0):e[0]===7&&c(e[e.length-1]%2===1);var r=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return r}else if((e[0]===2||e[0]===3)&&e.length-1===n){return this.pointFromX(e.slice(1,1+n),e[0]===3)}throw new Error('Unknown point format')};d.prototype.encodeCompressed=function(e){return this.encode(e,!0)};d.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray('be',t);if(e)return[this.getY().isEven()?2:3].concat(n);return[4].concat(n,this.getY().toArray('be',t)) };d.prototype.encode=function(e,t){return i.encode(this._encode(t),e)};d.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};t.naf=this._getNAFPoints(8);t.doubles=this._getDoubles(4,e);t.beta=this._getBeta();this.precomputed=t;return this};d.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;if(!t)return!1;return t.points.length>=Math.ceil((e.bitLength()+1)/t.step)};d.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var n=[this],r=this;for(var u=0;u<t;u+=e){for(var i=0;i<e;i++)r=r.dbl();n.push(r)}return{step:e,points:n}};d.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var t=[this],n=(1<<e)-1,r=n===1?null:this.dbl();for(var u=1;u<n;u++)t[u]=t[u-1].add(r);return{wnd:e,points:t}};d.prototype._getBeta=function(){return null};d.prototype.dblp=function(e){var t=this;for(var n=0;n<e;n++)t=t.dbl();return t}},{"../../elliptic":92,"bn.js":82}],94:[function(e,t,n){"use strict";var r=e('../curve'),u=e('../../elliptic'),i=e('bn.js'),o=e('inherits'),f=r.base,c=u.utils.assert;function a(e){this.twisted=(e.a|0)!==1;this.mOneA=this.twisted&&(e.a|0)===-1;this.extended=this.mOneA;f.call(this,'edwards',e);this.a=new i(e.a,16).umod(this.red.m);this.a=this.a.toRed(this.red);this.c=new i(e.c,16).toRed(this.red);this.c2=this.c.redSqr();this.d=new i(e.d,16).toRed(this.red);this.dd=this.d.redAdd(this.d);c(!this.twisted||this.c.fromRed().cmpn(1)===0);this.oneC=(e.c|0)===1}o(a,f);t.exports=a;a.prototype._mulA=function(e){if(this.mOneA)return e.redNeg();else return this.a.redMul(e)};a.prototype._mulC=function(e){if(this.oneC)return e;else return this.c.redMul(e)};a.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)};a.prototype.pointFromX=function(e,t){e=new i(e,16);e.red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),u=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=r.redMul(u.redInvm()),f=o.redSqrt();if(f.redSqr().redSub(o).cmp(this.zero)!==0)throw new Error('invalid point');var c=f.fromRed().isOdd();(t&&!c||!t&&c)&&(f=f.redNeg());return this.point(e,f)};a.prototype.pointFromY=function(e,t){e=new i(e,16);e.red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),u=n.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(u.redInvm());if(o.cmp(this.zero)===0){if(t)throw new Error('invalid point');else return this.point(this.zero,e)}var f=o.redSqrt();if(f.redSqr().redSub(o).cmp(this.zero)!==0)throw new Error('invalid point');f.fromRed().isOdd()!==t&&(f=f.redNeg());return this.point(f,e)};a.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),u=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return r.cmp(u)===0};function d(e,t,n,r,u){f.BasePoint.call(this,e,'projective');t===null&&n===null&&r===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=u&&new i(u,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(d,f.BasePoint);a.prototype.pointFromJSON=function(e){return d.fromJSON(this,e)};a.prototype.point=function(e,t,n,r){return new d(this,e,t,n,r)};d.fromJSON=function(e,t){return new d(e,t[0],t[1],t[2])};d.prototype.inspect=function(){if(this.isInfinity())return'<EC Point Infinity>';return'<EC Point x: '+this.x.fromRed().toString(16,2)+' y: '+this.y.fromRed().toString(16,2)+' z: '+this.z.fromRed().toString(16,2)+'>'};d.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};d.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),u=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=r.redAdd(t),o=i.redSub(n),f=r.redSub(t),c=u.redMul(o),a=i.redMul(f),d=u.redMul(f),s=o.redMul(i);return this.curve.point(c,a,s,d)};d.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),t=this.x.redSqr(),n=this.y.redSqr(),r,u,i;if(this.curve.twisted){var o=this.curve._mulA(t),f=o.redAdd(n);if(this.zOne)r=e.redSub(t).redSub(n).redMul(f.redSub(this.curve.two)),u=f.redMul(o.redSub(n)),i=f.redSqr().redSub(f).redSub(f);else{var c=this.z.redSqr(),a=f.redSub(c).redISub(c);r=e.redSub(t).redISub(n).redMul(a);u=f.redMul(o.redSub(n));i=f.redMul(a)}}else{o=t.redAdd(n),c=this.curve._mulC(this.z).redSqr(),a=o.redSub(c).redSub(c);r=this.curve._mulC(e.redISub(o)).redMul(a);u=this.curve._mulC(o).redMul(t.redISub(n));i=o.redMul(a)}return this.curve.point(r,u,i)};d.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()};d.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),u=this.z.redMul(e.z.redAdd(e.z)),i=n.redSub(t),o=u.redSub(r),f=u.redAdd(r),c=n.redAdd(t),a=i.redMul(o),d=f.redMul(c),s=i.redMul(c),l=o.redMul(f);return this.curve.point(a,d,l,s)};d.prototype._projAdd=function(e){var t=this.z.redMul(e.z),n=t.redSqr(),r=this.x.redMul(e.x),u=this.y.redMul(e.y),i=this.curve.d.redMul(r).redMul(u),o=n.redSub(i),f=n.redAdd(i),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(r).redISub(u),a=t.redMul(o).redMul(c),d,s;this.curve.twisted?(d=t.redMul(f).redMul(u.redSub(this.curve._mulA(r))),s=o.redMul(f)):(d=t.redMul(f).redMul(u.redSub(r)),s=this.curve._mulC(o).redMul(f));return this.curve.point(a,d,s)};d.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;if(this.curve.extended)return this._extAdd(e);else return this._projAdd(e)};d.prototype.mul=function(e){if(this._hasDoubles(e))return this.curve._fixedNafMul(this,e);else return this.curve._wnafMul(this,e)};d.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)};d.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)};d.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();this.x=this.x.redMul(e);this.y=this.y.redMul(e);this.t&&(this.t=this.t.redMul(e));this.z=this.curve.one;this.zOne=!0;return this};d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};d.prototype.getX=function(){this.normalize();return this.x.fromRed()};d.prototype.getY=function(){this.normalize();return this.y.fromRed()};d.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};d.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return!0;var n=e.clone(),r=this.curve.redN.redMul(this.z);for(;;){n.iadd(this.curve.n);if(n.cmp(this.curve.p)>=0)return!1;t.redIAdd(r);if(this.x.cmp(t)===0)return!0}};d.prototype.toP=d.prototype.normalize;d.prototype.mixedAdd=d.prototype.add},{"../../elliptic":92,"../curve":95,"bn.js":82,"inherits":122}],95:[function(e,t,n){"use strict";var r=n;r.base=e('./base');r.short=e('./short');r.mont=e('./mont');r.edwards=e('./edwards')},{"./base":93,"./edwards":94,"./mont":96,"./short":97}],96:[function(e,t,n){"use strict";var r=e('../curve'),u=e('bn.js'),i=e('inherits'),o=r.base,f=e('../../elliptic'),c=f.utils;function a(e){o.call(this,'mont',e);this.a=new u(e.a,16).toRed(this.red);this.b=new u(e.b,16).toRed(this.red);this.i4=new u(4).toRed(this.red).redInvm();this.two=new u(2).toRed(this.red);this.a24=this.i4.redMul(this.a.redAdd(this.two))}i(a,o);t.exports=a;a.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t),u=r.redSqrt();return u.redSqr().cmp(r)===0};function d(e,t,n){o.BasePoint.call(this,e,'projective');t===null&&n===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new u(t,16),this.z=new u(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(d,o.BasePoint);a.prototype.decodePoint=function(e,t){return this.point(c.toArray(e,t),1)};a.prototype.point=function(e,t){return new d(this,e,t)};a.prototype.pointFromJSON=function(e){return d.fromJSON(this,e)};d.prototype.precompute=function(){};d.prototype._encode=function(){return this.getX().toArray('be',this.curve.p.byteLength())};d.fromJSON=function(e,t){return new d(e,t[0],t[1]||e.one)};d.prototype.inspect=function(){if(this.isInfinity())return'<EC Point Infinity>';return'<EC Point x: '+this.x.fromRed().toString(16,2)+' z: '+this.z.fromRed().toString(16,2)+'>'};d.prototype.isInfinity=function(){return this.z.cmpn(0)===0};d.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),n=this.x.redSub(this.z),r=n.redSqr(),u=t.redSub(r),i=t.redMul(r),o=u.redMul(r.redAdd(this.curve.a24.redMul(u)));return this.curve.point(i,o)};d.prototype.add=function(){throw new Error('Not supported on Montgomery curve')};d.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),u=e.x.redAdd(e.z),i=e.x.redSub(e.z),o=i.redMul(n),f=u.redMul(r),c=t.z.redMul(o.redAdd(f).redSqr()),a=t.x.redMul(o.redISub(f).redSqr());return this.curve.point(c,a)};d.prototype.mul=function(e){var t=e.clone(),n=this,r=this.curve.point(null,null),u=this;for(var i=[];t.cmpn(0)!==0;t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)i[o]===0?(n=n.diffAdd(r,u),r=r.dbl()):(r=n.diffAdd(r,u),n=n.dbl());return r};d.prototype.mulAdd=function(){throw new Error('Not supported on Montgomery curve')};d.prototype.jumlAdd=function(){throw new Error('Not supported on Montgomery curve')};d.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};d.prototype.normalize=function(){this.x=this.x.redMul(this.z.redInvm());this.z=this.curve.one;return this};d.prototype.getX=function(){this.normalize();return this.x.fromRed()}},{"../../elliptic":92,"../curve":95,"bn.js":82,"inherits":122}],97:[function(e,t,n){"use strict";var r=e('../curve'),u=e('../../elliptic'),i=e('bn.js'),o=e('inherits'),f=r.base,c=u.utils.assert;function a(e){f.call(this,'short',e);this.a=new i(e.a,16).toRed(this.red);this.b=new i(e.b,16).toRed(this.red);this.tinv=this.two.redInvm();this.zeroA=this.a.fromRed().cmpn(0)===0;this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0;this.endo=this._getEndomorphism(e);this._endoWnafT1=new Array(4);this._endoWnafT2=new Array(4)}o(a,f);t.exports=a;a.prototype._getEndomorphism=function(e){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var t,n;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=r[0].cmp(r[1])<0?r[0]:r[1];t=t.toRed(this.red)}if(e.lambda)n=new i(e.lambda,16);else{var u=this._getEndoRoots(this.n);this.g.mul(u[0]).x.cmp(this.g.x.redMul(t))===0?(n=u[0]):(n=u[1],c(this.g.mul(n).x.cmp(this.g.x.redMul(t))===0))}var o;e.basis?(o=e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):(o=this._getEndoBasis(n));return{beta:t,lambda:n,basis:o}};a.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),n=new i(2).toRed(t).redInvm(),r=n.redNeg(),u=new i(3).toRed(t).redNeg().redSqrt().redMul(n),o=r.redAdd(u).fromRed(),f=r.redSub(u).fromRed();return[o,f]};a.prototype._getEndoBasis=function(e){var t=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,r=this.n.clone(),u=new i(1),o=new i(0),f=new i(0),c=new i(1),a,d,s,l,p,b,h,m=0,g,y;while(n.cmpn(0)!==0){var w=r.div(n);g=r.sub(w.mul(n));y=f.sub(w.mul(u));var _=c.sub(w.mul(o));if(!s&&g.cmp(t)<0)a=h.neg(),d=u,s=g.neg(),l=y;else if(s&&++m===2){break}h=g;r=n;n=g;f=u;u=y;c=o;o=_}p=g.neg();b=y;var S=s.sqr().add(l.sqr()),v=p.sqr().add(b.sqr());v.cmp(S)>=0&&(p=a,b=d);s.negative&&(s=s.neg(),l=l.neg());p.negative&&(p=p.neg(),b=b.neg());return[{a:s,b:l},{a:p,b:b}]};a.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],u=r.b.mul(e).divRound(this.n),i=n.b.neg().mul(e).divRound(this.n),o=u.mul(n.a),f=i.mul(r.a),c=u.mul(n.b),a=i.mul(r.b),d=e.sub(o).sub(f),s=c.add(a).neg();return{k1:d,k2:s}};a.prototype.pointFromX=function(e,t){e=new i(e,16);e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(r.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error('invalid point');var u=r.fromRed().isOdd();(t&&!u||!t&&u)&&(r=r.redNeg());return this.point(e,r)};a.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),u=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(u).cmpn(0)===0};a.prototype._endoWnafMulAdd=function(e,t,n){var r=this._endoWnafT1,u=this._endoWnafT2;for(var i=0;i<e.length;i++){var o=this._endoSplit(t[i]),f=e[i],c=f._getBeta();o.k1.negative&&(o.k1.ineg(),f=f.neg(!0));o.k2.negative&&(o.k2.ineg(),c=c.neg(!0));r[i*2]=f;r[i*2+1]=c;u[i*2]=o.k1;u[i*2+1]=o.k2}var a=this._wnafMulAdd(1,r,u,i*2,n);for(var d=0;d<i*2;d++)r[d]=null,u[d]=null;return a};function d(e,t,n,r){f.BasePoint.call(this,e,'affine');t===null&&n===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}o(d,f.BasePoint);a.prototype.point=function(e,t,n){return new d(this,e,t,n)};a.prototype.pointFromJSON=function(e,t){return d.fromJSON(this,e,t)};d.prototype._getBeta=function(){if(!this.curve.endo)return;var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t;t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t};d.prototype.toJSON=function(){if(!this.precomputed)return[this.x,this.y];return[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]};d.fromJSON=function(e,t,n){typeof t==='string'&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function u(t){return e.point(t[0],t[1],n)}var i=t[2];r.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[r].concat(i.doubles.points.map(u))},naf:i.naf&&{wnd:i.naf.wnd,points:[r].concat(i.naf.points.map(u))}};return r};d.prototype.inspect=function(){if(this.isInfinity())return'<EC Point Infinity>';return'<EC Point x: '+this.x.fromRed().toString(16,2)+' y: '+this.y.fromRed().toString(16,2)+'>'};d.prototype.isInfinity=function(){return this.inf};d.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)};d.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),u=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),i=u.redSqr().redISub(this.x.redAdd(this.x)),o=u.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,o)};d.prototype.getX=function(){return this.x.fromRed()};d.prototype.getY=function(){return this.y.fromRed()};d.prototype.mul=function(e){e=new i(e,16);if(this._hasDoubles(e))return this.curve._fixedNafMul(this,e);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[e]);else return this.curve._wnafMul(this,e)};d.prototype.mulAdd=function(e,t,n){var r=[this,t],u=[e,n];if(this.curve.endo)return this.curve._endoWnafMulAdd(r,u);else return this.curve._wnafMulAdd(1,r,u,2)};d.prototype.jmulAdd=function(e,t,n){var r=[this,t],u=[e,n];if(this.curve.endo)return this.curve._endoWnafMulAdd(r,u,!0);else return this.curve._wnafMulAdd(1,r,u,2,!0)};d.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};d.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t};d.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function s(e,t,n,r){f.BasePoint.call(this,e,'jacobian');t===null&&n===null&&r===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(n,16),this.z=new i(r,16));this.x.red||(this.x=this.x.toRed(this.curve.red));this.y.red||(this.y=this.y.toRed(this.curve.red));this.z.red||(this.z=this.z.toRed(this.curve.red));this.zOne=this.z===this.curve.one}o(s,f.BasePoint);a.prototype.jpoint=function(e,t,n){return new s(this,e,t,n)};s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)};s.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};s.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),u=e.x.redMul(n),i=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),f=r.redSub(u),c=i.redSub(o);if(f.cmpn(0)===0){if(c.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var a=f.redSqr(),d=a.redMul(f),s=r.redMul(a),l=c.redSqr().redIAdd(d).redISub(s).redISub(s),p=c.redMul(s.redISub(l)).redISub(i.redMul(d)),b=this.z.redMul(e.z).redMul(f);return this.curve.jpoint(l,p,b)};s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),u=this.y,i=e.y.redMul(t).redMul(this.z),o=n.redSub(r),f=u.redSub(i);if(o.cmpn(0)===0){if(f.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var c=o.redSqr(),a=c.redMul(o),d=n.redMul(c),s=f.redSqr().redIAdd(a).redISub(d).redISub(d),l=f.redMul(d.redISub(s)).redISub(u.redMul(a)),p=this.z.redMul(o);return this.curve.jpoint(s,l,p)};s.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var t=this;for(var n=0;n<e;n++)t=t.dbl();return t}var r=this.curve.a,u=this.curve.tinv,i=this.x,o=this.y,f=this.z,c=f.redSqr().redSqr(),a=o.redAdd(o);for(n=0;n<e;n++){var d=i.redSqr(),s=a.redSqr(),l=s.redSqr(),p=d.redAdd(d).redIAdd(d).redIAdd(r.redMul(c)),b=i.redMul(s),h=p.redSqr().redISub(b.redAdd(b)),m=b.redISub(h),g=p.redMul(m);g=g.redIAdd(g).redISub(l);var y=a.redMul(f);n+1<e&&(c=c.redMul(l));i=h;f=y;a=g}return this.curve.jpoint(i,a.redMul(u),f)};s.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()};s.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),u=this.y.redSqr(),i=u.redSqr(),o=this.x.redAdd(u).redSqr().redISub(r).redISub(i);o=o.redIAdd(o);var f=r.redAdd(r).redIAdd(r),c=f.redSqr().redISub(o).redISub(o),a=i.redIAdd(i);a=a.redIAdd(a);a=a.redIAdd(a);e=c;t=f.redMul(o.redISub(c)).redISub(a);n=this.y.redAdd(this.y)}else{var d=this.x.redSqr(),s=this.y.redSqr(),l=s.redSqr(),p=this.x.redAdd(s).redSqr().redISub(d).redISub(l);p=p.redIAdd(p);var b=d.redAdd(d).redIAdd(d),h=b.redSqr(),m=l.redIAdd(l);m=m.redIAdd(m);m=m.redIAdd(m);e=h.redISub(p).redISub(p);t=b.redMul(p.redISub(e)).redISub(m);n=this.y.redMul(this.z);n=n.redIAdd(n)}return this.curve.jpoint(e,t,n)};s.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),u=this.y.redSqr(),i=u.redSqr(),o=this.x.redAdd(u).redSqr().redISub(r).redISub(i);o=o.redIAdd(o);var f=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=f.redSqr().redISub(o).redISub(o);e=c;var a=i.redIAdd(i);a=a.redIAdd(a);a=a.redIAdd(a);t=f.redMul(o.redISub(c)).redISub(a);n=this.y.redAdd(this.y)}else{var d=this.z.redSqr(),s=this.y.redSqr(),l=this.x.redMul(s),p=this.x.redSub(d).redMul(this.x.redAdd(d));p=p.redAdd(p).redIAdd(p);var b=l.redIAdd(l);b=b.redIAdd(b);var h=b.redAdd(b);e=p.redSqr().redISub(h);n=this.y.redAdd(this.z).redSqr().redISub(s).redISub(d);var m=s.redSqr();m=m.redIAdd(m);m=m.redIAdd(m);m=m.redIAdd(m);t=p.redMul(b.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,n)};s.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,u=r.redSqr().redSqr(),i=t.redSqr(),o=n.redSqr(),f=i.redAdd(i).redIAdd(i).redIAdd(e.redMul(u)),c=t.redAdd(t);c=c.redIAdd(c);var a=c.redMul(o),d=f.redSqr().redISub(a.redAdd(a)),s=a.redISub(d),l=o.redSqr();l=l.redIAdd(l);l=l.redIAdd(l);l=l.redIAdd(l);var p=f.redMul(s).redISub(l),b=n.redAdd(n).redMul(r);return this.curve.jpoint(d,p,b)};s.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),u=e.redAdd(e).redIAdd(e),i=u.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(r);o=o.redIAdd(o);o=o.redAdd(o).redIAdd(o);o=o.redISub(i);var f=o.redSqr(),c=r.redIAdd(r);c=c.redIAdd(c);c=c.redIAdd(c);c=c.redIAdd(c);var a=u.redIAdd(o).redSqr().redISub(i).redISub(f).redISub(c),d=t.redMul(a);d=d.redIAdd(d);d=d.redIAdd(d);var s=this.x.redMul(f).redISub(d);s=s.redIAdd(s);s=s.redIAdd(s);var l=this.y.redMul(a.redMul(c.redISub(a)).redISub(o.redMul(f)));l=l.redIAdd(l);l=l.redIAdd(l);l=l.redIAdd(l);var p=this.z.redAdd(o).redSqr().redISub(n).redISub(f);return this.curve.jpoint(s,l,p)};s.prototype.mul=function(e,t){e=new i(e,t);return this.curve._wnafMul(this,e)};s.prototype.eq=function(e){if(e.type==='affine')return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0)!==0)return!1;var r=t.redMul(this.z),u=n.redMul(e.z);return this.y.redMul(u).redISub(e.y.redMul(r)).cmpn(0)===0};s.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(this.x.cmp(n)===0)return!0;var r=e.clone(),u=this.curve.redN.redMul(t);for(;;){r.iadd(this.curve.n);if(r.cmp(this.curve.p)>=0)return!1;n.redIAdd(u);if(this.x.cmp(n)===0)return!0}};s.prototype.inspect=function(){if(this.isInfinity())return'<EC JPoint Infinity>';return'<EC JPoint x: '+this.x.toString(16,2)+' y: '+this.y.toString(16,2)+' z: '+this.z.toString(16,2)+'>'};s.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},{"../../elliptic":92,"../curve":95,"bn.js":82,"inherits":122}],98:[function(e,t,n){"use strict";var r=n,u=e('hash.js'),i=e('../elliptic'),o=i.utils.assert;function f(e){e.type==='short'?(this.curve=new i.curve.short(e)):e.type==='edwards'?(this.curve=new i.curve.edwards(e)):(this.curve=new i.curve.mont(e));this.g=this.curve.g;this.n=this.curve.n;this.hash=e.hash;o(this.g.validate(),'Invalid curve');o(this.g.mul(this.n).isInfinity(),'Invalid curve, G*N != O')}r.PresetCurve=f;function c(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new f(t);Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n});return n}})}c('p192',{type:'short',prime:'p192',p:'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',a:'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',b:'64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',n:'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',hash:u.sha256,gRed:!1,g:['188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012','07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811']});c('p224',{type:'short',prime:'p224',p:'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',a:'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',b:'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',n:'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',hash:u.sha256,gRed:!1,g:['b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21','bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34']});c('p256',{type:'short',prime:null,p:'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',a:'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',b:'5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',n:'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',hash:u.sha256,gRed:!1,g:['6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296','4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5']});c('p384',{type:'short',prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:u.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});c('p521',{type:'short',prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:u.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});c('curve25519',{type:'mont',prime:'p25519',p:'7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',a:'76d06',b:'1',n:'1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',hash:u.sha256,gRed:!1,g:['9']});c('ed25519',{type:'edwards',prime:'p25519',p:'7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',a:'-1',c:'1',d:'52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',n:'1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',hash:u.sha256,gRed:!1,g:['216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a','6666666666666666666666666666666666666666666666666666666666666658']});var a;try{a=e('./precomputed/secp256k1')}catch(e){a=void 0};c('secp256k1',{type:'short',prime:'k256',p:'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',a:'0',b:'7',n:'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',h:'1',hash:u.sha256,beta:'7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',lambda:'5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',basis:[{a:'3086d221a7d46bcde86c90e49284eb15',b:'-e4437ed6010e88286f547fa90abfe4c3'},{a:'114ca50f7a8e2f3f657c1108d9d44cfd8',b:'3086d221a7d46bcde86c90e49284eb15'}],gRed:!1,g:['79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798','483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',a]})},{"../elliptic":92,"./precomputed/secp256k1":105,"hash.js":109}],99:[function(e,t,n){"use strict";var r=e('bn.js'),u=e('hmac-drbg'),i=e('../../elliptic'),o=i.utils,f=o.assert,c=e('./key'),a=e('./signature');function d(e){if(!(this instanceof d))return new d(e);typeof e==='string'&&(f(i.curves.hasOwnProperty(e),'Unknown curve '+e),e=i.curves[e]);e instanceof i.curves.PresetCurve&&(e={curve:e});this.curve=e.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=e.curve.g;this.g.precompute(e.curve.n.bitLength()+1);this.hash=e.hash||e.curve.hash}t.exports=d;d.prototype.keyPair=function(e){return new c(this,e)};d.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)};d.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)};d.prototype.genKeyPair=function(e){e||(e={});var t=new u({hash:this.hash,pers:e.pers,persEnc:e.persEnc||'utf8',entropy:e.entropy||i.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||'utf8',nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new r(2));do{var f=new r(t.generate(n));if(f.cmp(o)>0)continue;f.iaddn(1);return this.keyFromPrivate(f)}while(!0)};d.prototype._truncateToN=function(e,t){var n=e.byteLength()*8-this.n.bitLength();n>0&&(e=e.ushrn(n));if(!t&&e.cmp(this.n)>=0)return e.sub(this.n);else return e};d.prototype.sign=function(e,t,n,i){typeof n==='object'&&(i=n,n=null);i||(i={});t=this.keyFromPrivate(t,n);e=this._truncateToN(new r(e,16));var o=this.n.byteLength(),f=t.getPrivate().toArray('be',o),c=e.toArray('be',o),d=new u({hash:this.hash,entropy:f,nonce:c,pers:i.pers,persEnc:i.persEnc||'utf8'}),s=this.n.sub(new r(1));for(var l=0;!0;l++){var p=i.k?i.k(l):new r(d.generate(this.n.byteLength()));p=this._truncateToN(p,!0);if(p.cmpn(1)<=0||p.cmp(s)>=0)continue;var b=this.g.mul(p);if(b.isInfinity())continue;var h=b.getX(),m=h.umod(this.n);if(m.cmpn(0)===0)continue;var g=p.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));g=g.umod(this.n);if(g.cmpn(0)===0)continue;var y=(b.getY().isOdd()?1:0)|(h.cmp(m)!==0?2:0);i.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1);return new a({r:m,s:g,recoveryParam:y})}};d.prototype.verify=function(e,t,n,u){e=this._truncateToN(new r(e,16));n=this.keyFromPublic(n,u);t=new a(t,'hex');var i=t.r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var f=o.invm(this.n),c=f.mul(e).umod(this.n),d=f.mul(i).umod(this.n);if(!this.curve._maxwellTrick){var s=this.g.mulAdd(c,n.getPublic(),d);if(s.isInfinity())return!1;return s.getX().umod(this.n).cmp(i)===0}s=this.g.jmulAdd(c,n.getPublic(),d);if(s.isInfinity())return!1;return s.eqXToP(i)};d.prototype.recoverPubKey=function(e,t,n,u){f((3&n)===n,'The recovery param is more than two bits');t=new a(t,u);var i=this.n,o=new r(e),c=t.r,d=t.s,s=n&1,l=n>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error('Unable to find sencond key candinate');l?(c=this.curve.pointFromX(c.add(this.curve.n),s)):(c=this.curve.pointFromX(c,s));var p=t.r.invm(i),b=i.sub(o).mul(p).umod(i),h=d.mul(p).umod(i);return this.g.mulAdd(b,c,h)};d.prototype.getKeyRecoveryParam=function(e,t,n,r){t=new a(t,r);if(t.recoveryParam!==null)return t.recoveryParam;for(var u=0;u<4;u++){var i;try{i=this.recoverPubKey(e,t,u)}catch(e){continue};if(i.eq(n))return u}throw new Error('Unable to find valid recovery factor')}},{"../../elliptic":92,"./key":100,"./signature":101,"bn.js":82,"hmac-drbg":121}],100:[function(e,t,n){"use strict";var r=e('bn.js'),u=e('../../elliptic'),i=u.utils,o=i.assert;function f(e,t){this.ec=e;this.priv=null;this.pub=null;t.priv&&this._importPrivate(t.priv,t.privEnc);t.pub&&this._importPublic(t.pub,t.pubEnc)}t.exports=f;f.fromPublic=function(e,t,n){if(t instanceof f)return t;return new f(e,{pub:t,pubEnc:n})};f.fromPrivate=function(e,t,n){if(t instanceof f)return t;return new f(e,{priv:t,privEnc:n})};f.prototype.validate=function(){var e=this.getPublic();if(e.isInfinity())return{result:!1,reason:'Invalid public key'};if(!e.validate())return{result:!1,reason:'Public key is not a point'};if(!e.mul(this.ec.curve.n).isInfinity())return{result:!1,reason:'Public key * N != O'};return{result:!0,reason:null}};f.prototype.getPublic=function(e,t){typeof e==='string'&&(t=e,e=null);this.pub||(this.pub=this.ec.g.mul(this.priv));if(!t)return this.pub;return this.pub.encode(t,e)};f.prototype.getPrivate=function(e){if(e==='hex')return this.priv.toString(16,2);else return this.priv};f.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16);this.priv=this.priv.umod(this.ec.curve.n)};f.prototype._importPublic=function(e,t){if(e.x||e.y){this.ec.curve.type==='mont'?o(e.x,'Need x coordinate'):(this.ec.curve.type==='short'||this.ec.curve.type==='edwards')&&o(e.x&&e.y,'Need both x and y coordinate');this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)};f.prototype.derive=function(e){return e.mul(this.priv).getX()};f.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)};f.prototype.verify=function(e,t){return this.ec.verify(e,t,this)};f.prototype.inspect=function(){return'<Key priv: '+(this.priv&&this.priv.toString(16,2))+' pub: '+(this.pub&&this.pub.inspect())+' >'}},{"../../elliptic":92,"bn.js":82}],101:[function(e,t,n){"use strict";var r=e('bn.js'),u=e('../../elliptic'),i=u.utils,o=i.assert;function f(e,t){if(e instanceof f)return e;if(this._importDER(e,t))return;o(e.r&&e.s,'Signature without r or s');this.r=new r(e.r,16);this.s=new r(e.s,16);e.recoveryParam===void 0?(this.recoveryParam=null):(this.recoveryParam=e.recoveryParam)}t.exports=f;function c(){this.place=0}function a(e,t){var n=e[t.place++];if(!(n&128)){return n}var r=n&15,u=0;for(var i=0,o=t.place;i<r;i++, o++)u<<=8,u|=e[o];t.place=o;return u}function d(e){var t=0,n=e.length-1;while(!e[t]&&!(e[t+1]&128)&&t<n)t++;if(t===0){return e}return e.slice(t)}f.prototype._importDER=function(e,t){e=i.toArray(e,t);var n=new c;if(e[n.place++]!==48){return!1}var u=a(e,n);if(u+n.place!==e.length){return!1}if(e[n.place++]!==2){return!1}var o=a(e,n),f=e.slice(n.place,o+n.place);n.place+=o;if(e[n.place++]!==2){return!1}var d=a(e,n);if(e.length!==d+n.place){return!1}var s=e.slice(n.place,d+n.place);f[0]===0&&f[1]&128&&(f=f.slice(1));s[0]===0&&s[1]&128&&(s=s.slice(1));this.r=new r(f);this.s=new r(s);this.recoveryParam=null;return!0};function s(e,t){if(t<128){e.push(t);return}var n=1+(Math.log(t)/Math.LN2>>>3);e.push(n|128);while(--n)e.push(t>>>(n<<3)&255);e.push(t)}f.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();t[0]&128&&(t=[0].concat(t));n[0]&128&&(n=[0].concat(n));t=d(t);n=d(n);while(!n[0]&&!(n[1]&128))n=n.slice(1);var r=[2];s(r,t.length);r=r.concat(t);r.push(2);s(r,n.length);var u=r.concat(n),o=[48];s(o,u.length);o=o.concat(u);return i.encode(o,e)}},{"../../elliptic":92,"bn.js":82}],102:[function(e,t,n){"use strict";var r=e('hash.js'),u=e('../../elliptic'),i=u.utils,o=i.assert,f=i.parseBytes,c=e('./key'),a=e('./signature');function d(e){o(e==='ed25519','only tested with ed25519 so far');if(!(this instanceof d))return new d(e);e=u.curves[e].curve;this.curve=e;this.g=e.g;this.g.precompute(e.n.bitLength()+1);this.pointClass=e.point().constructor;this.encodingLength=Math.ceil(e.n.bitLength()/8);this.hash=r.sha512}t.exports=d;d.prototype.sign=function(e,t){e=f(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),u=this.g.mul(r),i=this.encodePoint(u),o=this.hashInt(i,n.pubBytes(),e).mul(n.priv()),c=r.add(o).umod(this.curve.n);return this.makeSignature({R:u,S:c,Rencoded:i})};d.prototype.verify=function(e,t,n){e=f(e);t=this.makeSignature(t);var r=this.keyFromPublic(n),u=this.hashInt(t.Rencoded(),r.pubBytes(),e),i=this.g.mul(t.S()),o=t.R().add(r.pub().mul(u));return o.eq(i)};d.prototype.hashInt=function(){var e=this.hash();for(var t=0;t<arguments.length;t++)e.update(arguments[t]);return i.intFromLE(e.digest()).umod(this.curve.n)};d.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)};d.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)};d.prototype.makeSignature=function(e){if(e instanceof a)return e;return new a(this,e)};d.prototype.encodePoint=function(e){var t=e.getY().toArray('le',this.encodingLength);t[this.encodingLength-1]|=e.getX().isOdd()?128:0;return t};d.prototype.decodePoint=function(e){e=i.parseBytes(e);var t=e.length-1,n=e.slice(0,t).concat(e[t]&-129),r=(e[t]&128)!==0,u=i.intFromLE(n);return this.curve.pointFromY(u,r)};d.prototype.encodeInt=function(e){return e.toArray('le',this.encodingLength)};d.prototype.decodeInt=function(e){return i.intFromLE(e)};d.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../../elliptic":92,"./key":103,"./signature":104,"hash.js":109}],103:[function(e,t,n){"use strict";var r=e('../../elliptic'),u=r.utils,i=u.assert,o=u.parseBytes,f=u.cachedProperty;function c(e,t){this.eddsa=e;this._secret=o(t.secret);e.isPoint(t.pub)?(this._pub=t.pub):(this._pubBytes=o(t.pub))}c.fromPublic=function(e,t){if(t instanceof c)return t;return new c(e,{pub:t})};c.fromSecret=function(e,t){if(t instanceof c)return t;return new c(e,{secret:t})};c.prototype.secret=function(){return this._secret};f(c,'pubBytes',function(){return this.eddsa.encodePoint(this.pub())});f(c,'pub',function(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())});f(c,'privBytes',function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);r[0]&=248;r[n]&=127;r[n]|=64;return r});f(c,'priv',function(){return this.eddsa.decodeInt(this.privBytes())});f(c,'hash',function(){return this.eddsa.hash().update(this.secret()).digest()});f(c,'messagePrefix',function(){return this.hash().slice(this.eddsa.encodingLength)});c.prototype.sign=function(e){i(this._secret,'KeyPair can only verify');return this.eddsa.sign(e,this)};c.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)};c.prototype.getSecret=function(e){i(this._secret,'KeyPair is public only');return u.encode(this.secret(),e)};c.prototype.getPublic=function(e){return u.encode(this.pubBytes(),e)};t.exports=c},{"../../elliptic":92}],104:[function(e,t,n){"use strict";var r=e('bn.js'),u=e('../../elliptic'),i=u.utils,o=i.assert,f=i.cachedProperty,c=i.parseBytes;function a(e,t){this.eddsa=e;typeof t!=='object'&&(t=c(t));Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)});o(t.R&&t.S,'Signature without R or S');e.isPoint(t.R)&&(this._R=t.R);t.S instanceof r&&(this._S=t.S);this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded;this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}f(a,'S',function(){return this.eddsa.decodeInt(this.Sencoded())});f(a,'R',function(){return this.eddsa.decodePoint(this.Rencoded())});f(a,'Rencoded',function(){return this.eddsa.encodePoint(this.R())});f(a,'Sencoded',function(){return this.eddsa.encodeInt(this.S())});a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};a.prototype.toHex=function(){return i.encode(this.toBytes(),'hex').toUpperCase()};t.exports=a},{"../../elliptic":92,"bn.js":82}],105:[function(e,t,n){t.exports={doubles:{step:4,points:[['e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a','f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821'],['8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508','11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf'],['175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739','d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695'],['363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640','4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9'],['8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c','4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36'],['723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda','96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f'],['eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa','5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999'],['100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0','cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09'],['e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d','9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d'],['feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d','e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088'],['da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1','9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d'],['53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0','5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8'],['8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047','10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a'],['385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862','283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453'],['6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7','7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160'],['3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd','56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0'],['85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83','7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6'],['948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a','53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589'],['6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8','bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17'],['e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d','4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda'],['e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725','7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd'],['213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754','4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2'],['4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c','17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6'],['fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6','6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f'],['76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39','c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01'],['c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891','893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3'],['d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b','febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f'],['b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03','2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7'],['e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d','eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78'],['a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070','7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1'],['90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4','e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150'],['8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da','662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82'],['e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11','1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc'],['8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e','efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b'],['e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41','2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51'],['b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef','67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45'],['d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8','db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120'],['324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d','648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84'],['4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96','35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d'],['9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd','ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d'],['6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5','9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8'],['a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266','40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8'],['7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71','34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac'],['928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac','c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f'],['85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751','1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962'],['ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e','493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907'],['827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241','c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec'],['eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3','be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d'],['e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f','4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414'],['1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19','aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd'],['146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be','b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0'],['fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9','6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811'],['da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2','8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1'],['a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13','7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c'],['174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c','ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73'],['959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba','2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd'],['d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151','e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405'],['64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073','d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589'],['8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458','38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e'],['13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b','69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27'],['bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366','d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1'],['8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa','40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482'],['8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0','620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945'],['dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787','7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573'],['f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e','ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82']]},naf:{wnd:7,points:[['f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9','388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672'],['2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4','d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6'],['5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc','6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da'],['acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe','cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37'],['774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb','d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b'],['f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8','ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81'],['d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e','581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58'],['defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34','4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77'],['2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c','85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a'],['352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5','321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c'],['2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f','2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67'],['9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714','73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402'],['daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729','a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55'],['c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db','2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482'],['6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4','e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82'],['1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5','b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396'],['605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479','2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49'],['62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d','80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf'],['80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f','1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a'],['7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb','d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7'],['d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9','eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933'],['49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963','758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a'],['77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74','958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6'],['f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530','e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37'],['463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b','5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e'],['f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247','cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6'],['caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1','cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476'],['2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120','4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40'],['7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435','91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61'],['754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18','673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683'],['e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8','59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5'],['186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb','3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b'],['df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f','55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417'],['5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143','efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868'],['290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba','e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a'],['af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45','f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6'],['766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a','744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996'],['59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e','c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e'],['f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8','e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d'],['7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c','30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2'],['948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519','e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e'],['7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab','100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437'],['3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca','ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311'],['d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf','8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4'],['1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610','68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575'],['733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4','f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d'],['15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c','d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d'],['a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940','edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629'],['e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980','a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06'],['311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3','66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374'],['34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf','9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee'],['f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63','4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1'],['d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448','fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b'],['32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf','5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661'],['7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5','8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6'],['ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6','8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e'],['16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5','5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d'],['eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99','f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc'],['78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51','f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4'],['494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5','42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c'],['a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5','204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b'],['c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997','4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913'],['841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881','73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154'],['5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5','39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865'],['36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66','d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc'],['336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726','ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224'],['8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede','6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e'],['1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94','60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6'],['85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31','3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511'],['29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51','b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b'],['a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252','ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2'],['4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5','cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c'],['d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b','6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3'],['ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4','322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d'],['af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f','6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700'],['e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889','2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4'],['591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246','b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196'],['11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984','998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4'],['3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a','b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257'],['cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030','bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13'],['c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197','6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096'],['c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593','c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38'],['a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef','21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f'],['347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38','60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448'],['da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a','49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a'],['c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111','5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4'],['4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502','7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437'],['3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea','be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7'],['cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26','8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d'],['b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986','39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a'],['d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e','62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54'],['48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4','25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77'],['dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda','ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517'],['6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859','cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10'],['e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f','f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125'],['eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c','6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e'],['13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942','fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1'],['ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a','1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2'],['b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80','5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423'],['ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d','438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8'],['8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1','cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758'],['52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63','c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375'],['e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352','6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d'],['7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193','ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec'],['5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00','9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0'],['32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58','ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c'],['e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7','d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4'],['8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8','c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f'],['4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e','67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649'],['3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d','cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826'],['674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b','299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5'],['d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f','f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87'],['30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6','462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b'],['be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297','62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc'],['93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a','7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c'],['b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c','ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f'],['d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52','4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a'],['d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb','bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46'],['463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065','bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f'],['7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917','603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03'],['74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9','cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08'],['30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3','553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8'],['9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57','712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373'],['176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66','ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3'],['75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8','9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8'],['809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721','9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1'],['1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180','4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9']]}}},{}],106:[function(e,t,n){"use strict";var r=n,u=e('bn.js'),i=e('minimalistic-assert'),o=e('minimalistic-crypto-utils');r.assert=i;r.toArray=o.toArray;r.zero2=o.zero2;r.toHex=o.toHex;r.encode=o.encode;function f(e,t){var n=[],r=1<<t+1,u=e.clone();while(u.cmpn(1)>=0){var i;if(u.isOdd()){var o=u.andln(r-1);o>(r>>1)-1?(i=(r>>1)-o):(i=o);u.isubn(i)}else i=0;n.push(i);var f=u.cmpn(0)!==0&&u.andln(r-1)===0?t+1:1;for(var c=1;c<f;c++)n.push(0);u.iushrn(f)}return n}r.getNAF=f;function c(e,t){var n=[[],[]];e=e.clone();t=t.clone();var r=0,u=0;while(e.cmpn(-r)>0||t.cmpn(-u)>0){var i=e.andln(3)+r&3,o=t.andln(3)+u&3;i===3&&(i=-1);o===3&&(o=-1);var f;if((i&1)===0)f=0;else{var c=e.andln(7)+r&7;(c===3||c===5)&&o===2?(f=-i):(f=i)}n[0].push(f);var a;if((o&1)===0)a=0;else{c=t.andln(7)+u&7;(c===3||c===5)&&i===2?(a=-o):(a=o)}n[1].push(a);2*r===f+1&&(r=1-r);2*u===a+1&&(u=1-u);e.iushrn(1);t.iushrn(1)}return n}r.getJSF=c;function a(e,t,n){var r='_'+t;e.prototype[t]=function(){return this[r]!==void 0?this[r]:this[r]=n.call(this)}}r.cachedProperty=a;function d(e){return typeof e==='string'?r.toArray(e,'hex'):e}r.parseBytes=d;function s(e){return new u(e,'hex','le')}r.intFromLE=s},{"bn.js":82,"minimalistic-assert":125,"minimalistic-crypto-utils":126}],107:[function(e,t,n){t.exports={"_from":"elliptic@^6.4.0","_id":"[email protected]","_inBundle":!1,"_integrity":"sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"range","registry":!0,"raw":"elliptic@^6.4.0","name":"elliptic","escapedName":"elliptic","rawSpec":"^6.4.0","saveSpec":null,"fetchSpec":"^6.4.0"},"_requiredBy":["/browserify-sign","/create-ecdh","/tiny-secp256k1"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz","_shasum":"c2d0b7776911b86722c632c3c06c60f2f819939a","_spec":"elliptic@^6.4.0","_where":"/Users/coreyphillips/Documents/testing/bitimage/minifier/node_modules/tiny-secp256k1","author":{"name":"Fedor Indutny","email":"[email protected]"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"bundleDependencies":!1,"dependencies":{"bn.js":"^4.4.0","brorand":"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0","inherits":"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},"deprecated":!1,"description":"EC cryptography","devDependencies":{"brfs":"^1.4.3","coveralls":"^2.11.3","grunt":"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2","istanbul":"^0.4.2","jscs":"^2.9.0","jshint":"^2.6.0","mocha":"^2.1.0"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://[email protected]/indutny/elliptic.git"},"scripts":{"jscs":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","jshint":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","lint":"npm run jscs && npm run jshint","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.4.1"}},{}],108:[function(e,t,n){"use strict";var r=e('safe-buffer').Buffer,u=e('stream').Transform,i=e('inherits');function o(e,t){if(!r.isBuffer(e)&&typeof e!=='string'){throw new TypeError(t+' must be a string or a buffer')}}function f(e){u.call(this);this._block=r.allocUnsafe(e);this._blockSize=e;this._blockOffset=0;this._length=[0,0,0,0];this._finalized=!1}i(f,u);f.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e};n(r)};f.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e};e(t)};f.prototype.update=function(e,t){o(e,'Data');if(this._finalized)throw new Error('Digest already called');r.isBuffer(e)||(e=r.from(e,t));var n=this._block,u=0;while(this._blockOffset+e.length-u>=this._blockSize){for(var i=this._blockOffset;i<this._blockSize;)n[i++]=e[u++];this._update();this._blockOffset=0}while(u<e.length)n[this._blockOffset++]=e[u++];for(var f=0,c=e.length*8;c>0;++f)this._length[f]+=c,c=this._length[f]/4294967296|0,c>0&&(this._length[f]-=4294967296*c);return this};f.prototype._update=function(){throw new Error('_update is not implemented')};f.prototype.digest=function(e){if(this._finalized)throw new Error('Digest already called');this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e));this._block.fill(0);this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t};f.prototype._digest=function(){throw new Error('_digest is not implemented')};t.exports=f},{"inherits":122,"safe-buffer":130,"stream":27}],109:[function(e,t,n){var r=n;r.utils=e('./hash/utils');r.common=e('./hash/common');r.sha=e('./hash/sha');r.ripemd=e('./hash/ripemd');r.hmac=e('./hash/hmac');r.sha1=r.sha.sha1;r.sha256=r.sha.sha256;r.sha224=r.sha.sha224;r.sha384=r.sha.sha384;r.sha512=r.sha.sha512;r.ripemd160=r.ripemd.ripemd160},{"./hash/common":110,"./hash/hmac":111,"./hash/ripemd":112,"./hash/sha":113,"./hash/utils":120}],110:[function(e,t,n){"use strict";var r=e('./utils'),u=e('minimalistic-assert');function i(){this.pending=null;this.pendingTotal=0;this.blockSize=this.constructor.blockSize;this.outSize=this.constructor.outSize;this.hmacStrength=this.constructor.hmacStrength;this.padLength=this.constructor.padLength/8;this.endian='big';this._delta8=this.blockSize/8;this._delta32=this.blockSize/32}n.BlockHash=i;i.prototype.update=function(e,t){e=r.toArray(e,t);this.pending?(this.pending=this.pending.concat(e)):(this.pending=e);this.pendingTotal+=e.length;if(this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length);this.pending.length===0&&(this.pending=null);e=r.join32(e,0,e.length-n,this.endian);for(var u=0;u<e.length;u+=this._delta32)this._update(e,u,u+this._delta32)}return this};i.prototype.digest=function(e){this.update(this._pad());u(this.pending===null);return this._digest(e)};i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var u=1;u<n;u++)r[u]=0;e<<=3;if(this.endian==='big'){for(var i=8;i<this.padLength;i++)r[u++]=0;r[u++]=0;r[u++]=0;r[u++]=0;r[u++]=0;r[u++]=e>>>24&255;r[u++]=e>>>16&255;r[u++]=e>>>8&255;r[u++]=e&255}else{r[u++]=e&255;r[u++]=e>>>8&255;r[u++]=e>>>16&255;r[u++]=e>>>24&255;r[u++]=0;r[u++]=0;r[u++]=0;r[u++]=0;for(i=8;i<this.padLength;i++)r[u++]=0}return r}},{"./utils":120,"minimalistic-assert":125}],111:[function(e,t,n){"use strict";var r=e('./utils'),u=e('minimalistic-assert');function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);this.Hash=e;this.blockSize=e.blockSize/8;this.outSize=e.outSize/8;this.inner=null;this.outer=null;this._init(r.toArray(t,n))}t.exports=i;i.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash.update(e).digest());u(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;this.inner=new this.Hash.update(e);for(t=0;t<e.length;t++)e[t]^=106;this.outer=new this.Hash.update(e)};i.prototype.update=function(e,t){this.inner.update(e,t);return this};i.prototype.digest=function(e){this.outer.update(this.inner.digest());return this.outer.digest(e)}},{"./utils":120,"minimalistic-assert":125}],112:[function(e,t,n){"use strict";var r=e('./utils'),u=e('./common'),i=r.rotl32,o=r.sum32,f=r.sum32_3,c=r.sum32_4,a=u.BlockHash;function d(){if(!(this instanceof d))return new d;a.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.endian='little'}r.inherits(d,a);n.ripemd160=d;d.blockSize=512;d.outSize=160;d.hmacStrength=192;d.padLength=64;d.prototype._update=function(e,t){var n=this.h[0],r=this.h[1],u=this.h[2],a=this.h[3],d=this.h[4],y=n,w=r,_=u,S=a,v=d;for(var k=0;k<80;k++){var I=o(i(c(n,s(k,r,u,a),e[b[k]+t],l(k)),m[k]),d);n=d;d=a;a=i(u,10);u=r;r=I;I=o(i(c(y,s(79-k,w,_,S),e[h[k]+t],p(k)),g[k]),v);y=v;v=S;S=i(_,10);_=w;w=I}I=f(this.h[1],u,S);this.h[1]=f(this.h[2],a,v);this.h[2]=f(this.h[3],d,y);this.h[3]=f(this.h[4],n,w);this.h[4]=f(this.h[0],r,_);this.h[0]=I};d.prototype._digest=function(e){if(e==='hex')return r.toHex32(this.h,'little');else return r.split32(this.h,'little')};function s(e,t,n,r){if(e<=15)return t^n^r;else if(e<=31)return t&n|~t&r;else if(e<=47)return(t|~n)^r;else if(e<=63)return t&r|n&~r;else return t^(n|~r)}function l(e){if(e<=15)return 0;else if(e<=31)return 1518500249;else if(e<=47)return 1859775393;else if(e<=63)return 2400959708;else return 2840853838}function p(e){if(e<=15)return 1352829926;else if(e<=31)return 1548603684;else if(e<=47)return 1836072691;else if(e<=63)return 2053994217;else return 0}var 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],h=[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],m=[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],g=[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]},{"./common":110,"./utils":120}],113:[function(e,t,n){"use strict";n.sha1=e('./sha/1');n.sha224=e('./sha/224');n.sha256=e('./sha/256');n.sha384=e('./sha/384');n.sha512=e('./sha/512')},{"./sha/1":114,"./sha/224":115,"./sha/256":116,"./sha/384":117,"./sha/512":118}],114:[function(e,t,n){"use strict";var r=e('../utils'),u=e('../common'),i=e('./common'),o=r.rotl32,f=r.sum32,c=r.sum32_5,a=i.ft_1,d=u.BlockHash,s=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;d.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.W=new Array(80)}r.inherits(l,d);t.exports=l;l.blockSize=512;l.outSize=160;l.hmacStrength=80;l.padLength=64;l.prototype._update=function(e,t){var n=this.W;for(var r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=o(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var u=this.h[0],i=this.h[1],d=this.h[2],l=this.h[3],p=this.h[4];for(r=0;r<n.length;r++){var b=~~(r/20),h=c(o(u,5),a(b,i,d,l),p,n[r],s[b]);p=l;l=d;d=o(i,30);i=u;u=h}this.h[0]=f(this.h[0],u);this.h[1]=f(this.h[1],i);this.h[2]=f(this.h[2],d);this.h[3]=f(this.h[3],l);this.h[4]=f(this.h[4],p)};l.prototype._digest=function(e){if(e==='hex')return r.toHex32(this.h,'big');else return r.split32(this.h,'big')}},{"../common":110,"../utils":120,"./common":119}],115:[function(e,t,n){"use strict";var r=e('../utils'),u=e('./256');function i(){if(!(this instanceof i))return new i;u.call(this);this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(i,u);t.exports=i;i.blockSize=512;i.outSize=224;i.hmacStrength=192;i.padLength=64;i.prototype._digest=function(e){if(e==='hex')return r.toHex32(this.h.slice(0,7),'big');else return r.split32(this.h.slice(0,7),'big')}},{"../utils":120,"./256":116}],116:[function(e,t,n){"use strict";var r=e('../utils'),u=e('../common'),i=e('./common'),o=e('minimalistic-assert'),f=r.sum32,c=r.sum32_4,a=r.sum32_5,d=i.ch32,s=i.maj32,l=i.s0_256,p=i.s1_256,b=i.g0_256,h=i.g1_256,m=u.BlockHash,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];function y(){if(!(this instanceof y))return new y;m.call(this);this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];this.k=g;this.W=new Array(64)}r.inherits(y,m);t.exports=y;y.blockSize=512;y.outSize=256;y.hmacStrength=192;y.padLength=64;y.prototype._update=function(e,t){var n=this.W;for(var r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(h(n[r-2]),n[r-7],b(n[r-15]),n[r-16]);var u=this.h[0],i=this.h[1],m=this.h[2],g=this.h[3],y=this.h[4],w=this.h[5],_=this.h[6],S=this.h[7];o(this.k.length===n.length);for(r=0;r<n.length;r++){var v=a(S,p(y),d(y,w,_),this.k[r],n[r]),k=f(l(u),s(u,i,m));S=_;_=w;w=y;y=f(g,v);g=m;m=i;i=u;u=f(v,k)}this.h[0]=f(this.h[0],u);this.h[1]=f(this.h[1],i);this.h[2]=f(this.h[2],m);this.h[3]=f(this.h[3],g);this.h[4]=f(this.h[4],y);this.h[5]=f(this.h[5],w);this.h[6]=f(this.h[6],_);this.h[7]=f(this.h[7],S)};y.prototype._digest=function(e){if(e==='hex')return r.toHex32(this.h,'big');else return r.split32(this.h,'big')}},{"../common":110,"../utils":120,"./common":119,"minimalistic-assert":125}],117:[function(e,t,n){"use strict";var r=e('../utils'),u=e('./512');function i(){if(!(this instanceof i))return new i;u.call(this);this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(i,u);t.exports=i;i.blockSize=1024;i.outSize=384;i.hmacStrength=192;i.padLength=128;i.prototype._digest=function(e){if(e==='hex')return r.toHex32(this.h.slice(0,12),'big');else return r.split32(this.h.slice(0,12),'big')}},{"../utils":120,"./512":118}],118:[function(e,t,n){"use strict";var r=e('../utils'),u=e('../common'),i=e('minimalistic-assert'),o=r.rotr64_hi,f=r.rotr64_lo,c=r.shr64_hi,a=r.shr64_lo,d=r.sum64,s=r.sum64_hi,l=r.sum64_lo,p=r.sum64_4_hi,b=r.sum64_4_lo,h=r.sum64_5_hi,m=r.sum64_5_lo,g=u.BlockHash,y=[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];function w(){if(!(this instanceof w))return new w;g.call(this);this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209];this.k=y;this.W=new Array(160)}r.inherits(w,g);t.exports=w;w.blockSize=1024;w.outSize=512;w.hmacStrength=192;w.padLength=128;w.prototype._prepareBlock=function(e,t){var n=this.W;for(var r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var u=M(n[r-4],n[r-3]),i=B(n[r-4],n[r-3]),o=n[r-14],f=n[r-13],c=O(n[r-30],n[r-29]),a=E(n[r-30],n[r-29]),d=n[r-32],s=n[r-31];n[r]=p(u,i,o,f,c,a,d,s);n[r+1]=b(u,i,o,f,c,a,d,s)}};w.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],u=this.h[1],o=this.h[2],f=this.h[3],c=this.h[4],a=this.h[5],p=this.h[6],b=this.h[7],g=this.h[8],y=this.h[9],w=this.h[10],O=this.h[11],E=this.h[12],M=this.h[13],B=this.h[14],N=this.h[15];i(this.k.length===n.length);for(var L=0;L<n.length;L+=2){var T=B,R=N,U=x(g,y),q=A(g,y),C=_(g,y,w,O,E,M),H=S(g,y,w,O,E,M),j=this.k[L],z=this.k[L+1],D=n[L],W=n[L+1],K=h(T,R,U,q,C,H,j,z,D,W),F=m(T,R,U,q,C,H,j,z,D,W);T=I(r,u);R=P(r,u);U=v(r,u,o,f,c,a);q=k(r,u,o,f,c,a);var J=s(T,R,U,q),V=l(T,R,U,q);B=E;N=M;E=w;M=O;w=g;O=y;g=s(p,b,K,F);y=l(b,b,K,F);p=c;b=a;c=o;a=f;o=r;f=u;r=s(K,F,J,V);u=l(K,F,J,V)}d(this.h,0,r,u);d(this.h,2,o,f);d(this.h,4,c,a);d(this.h,6,p,b);d(this.h,8,g,y);d(this.h,10,w,O);d(this.h,12,E,M);d(this.h,14,B,N)};w.prototype._digest=function(e){if(e==='hex')return r.toHex32(this.h,'big');else return r.split32(this.h,'big')};function _(e,t,n,r,u){var i=e&n^~e&u;i<0&&(i+=4294967296);return i}function S(e,t,n,r,u,i){var o=t&r^~t&i;o<0&&(o+=4294967296);return o}function v(e,t,n,r,u){var i=e&n^e&u^n&u;i<0&&(i+=4294967296);return i}function k(e,t,n,r,u,i){var o=t&r^t&i^r&i;o<0&&(o+=4294967296);return o}function I(e,t){var n=o(e,t,28),r=o(t,e,2),u=o(t,e,7),i=n^r^u;i<0&&(i+=4294967296);return i}function P(e,t){var n=f(e,t,28),r=f(t,e,2),u=f(t,e,7),i=n^r^u;i<0&&(i+=4294967296);return i}function x(e,t){var n=o(e,t,14),r=o(e,t,18),u=o(t,e,9),i=n^r^u;i<0&&(i+=4294967296);return i}function A(e,t){var n=f(e,t,14),r=f(e,t,18),u=f(t,e,9),i=n^r^u;i<0&&(i+=4294967296);return i}function O(e,t){var n=o(e,t,1),r=o(e,t,8),u=c(e,t,7),i=n^r^u;i<0&&(i+=4294967296);return i}function E(e,t){var n=f(e,t,1),r=f(e,t,8),u=a(e,t,7),i=n^r^u;i<0&&(i+=4294967296);return i}function M(e,t){var n=o(e,t,19),r=o(t,e,29),u=c(e,t,6),i=n^r^u;i<0&&(i+=4294967296);return i}function B(e,t){var n=f(e,t,19),r=f(t,e,29),u=a(e,t,6),i=n^r^u;i<0&&(i+=4294967296);return i}},{"../common":110,"../utils":120,"minimalistic-assert":125}],119:[function(e,t,n){"use strict";var r=e('../utils'),u=r.rotr32;function i(e,t,n,r){if(e===0)return o(t,n,r);if(e===1||e===3)return c(t,n,r);if(e===2)return f(t,n,r)}n.ft_1=i;function o(e,t,n){return e&t^~e&n}n.ch32=o;function f(e,t,n){return e&t^e&n^t&n}n.maj32=f;function c(e,t,n){return e^t^n}n.p32=c;function a(e){return u(e,2)^u(e,13)^u(e,22)}n.s0_256=a;function d(e){return u(e,6)^u(e,11)^u(e,25)}n.s1_256=d;function s(e){return u(e,7)^u(e,18)^e>>>3}n.g0_256=s;function l(e){return u(e,17)^u(e,19)^e>>>10}n.g1_256=l},{"../utils":120}],120:[function(e,t,n){"use strict";var r=e('minimalistic-assert'),u=e('inherits');n.inherits=u;function i(e,t){if((e.charCodeAt(t)&64512)!==55296){return!1}if(t<0||t+1>=e.length){return!1}return(e.charCodeAt(t+1)&64512)===56320}function o(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e==='string'){if(!t){var r=0;for(var u=0;u<e.length;u++){var o=e.charCodeAt(u);o<128?(n[r++]=o):o<2048?(n[r++]=o>>6|192,n[r++]=o&63|128):i(e,u)?(o=65536+((o&1023)<<10)+(e.charCodeAt(++u)&1023),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=o&63|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=o&63|128)}}else if(t==='hex'){e=e.replace(/[^a-z0-9]+/ig,'');e.length%2!==0&&(e='0'+e);for(u=0;u<e.length;u+=2)n.push(parseInt(e[u]+e[u+1],16))}}else{for(u=0;u<e.length;u++)n[u]=e[u]|0}return n}n.toArray=o;function f(e){var t='';for(var n=0;n<e.length;n++)t+=d(e[n].toString(16));return t}n.toHex=f;function c(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}n.htonl=c;function a(e,t){var n='';for(var r=0;r<e.length;r++){var u=e[r];t==='little'&&(u=c(u));n+=s(u.toString(16))}return n}n.toHex32=a;function d(e){if(e.length===1)return'0'+e;else return e}n.zero2=d;function s(e){if(e.length===7)return'0'+e;else if(e.length===6)return'00'+e;else if(e.length===5)return'000'+e;else if(e.length===4)return'0000'+e;else if(e.length===3)return'00000'+e;else if(e.length===2)return'000000'+e;else if(e.length===1)return'0000000'+e;else return e}n.zero8=s;function l(e,t,n,u){var i=n-t;r(i%4===0);var o=new Array(i/4);for(var f=0,c=t;f<o.length;f++, c+=4){var a;u==='big'?(a=e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]):(a=e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c]);o[f]=a>>>0}return o}n.join32=l;function p(e,t){var n=new Array(e.length*4);for(var r=0,u=0;r<e.length;r++, u+=4){var i=e[r];t==='big'?(n[u]=i>>>24,n[u+1]=i>>>16&255,n[u+2]=i>>>8&255,n[u+3]=i&255):(n[u+3]=i>>>24,n[u+2]=i>>>16&255,n[u+1]=i>>>8&255,n[u]=i&255)}return n}n.split32=p;function b(e,t){return e>>>t|e<<32-t}n.rotr32=b;function h(e,t){return e<<t|e>>>32-t}n.rotl32=h;function m(e,t){return e+t>>>0}n.sum32=m;function g(e,t,n){return e+t+n>>>0}n.sum32_3=g;function y(e,t,n,r){return e+t+n+r>>>0}n.sum32_4=y;function w(e,t,n,r,u){return e+t+n+r+u>>>0}n.sum32_5=w;function _(e,t,n,r){var u=e[t],i=e[t+1],o=r+i>>>0,f=(o<r?1:0)+n+u;e[t]=f>>>0;e[t+1]=o}n.sum64=_;function S(e,t,n,r){var u=t+r>>>0,i=(u<t?1:0)+e+n;return i>>>0}n.sum64_hi=S;function v(e,t,n,r){var u=t+r;return u>>>0}n.sum64_lo=v;function k(e,t,n,r,u,i,o,f){var c=0,a=t;a=a+r>>>0;c+=a<t?1:0;a=a+i>>>0;c+=a<i?1:0;a=a+f>>>0;c+=a<f?1:0;var d=e+n+u+o+c;return d>>>0}n.sum64_4_hi=k;function I(e,t,n,r,u,i,o,f){var c=t+r+i+f;return c>>>0}n.sum64_4_lo=I;function P(e,t,n,r,u,i,o,f,c,a){var d=0,s=t;s=s+r>>>0;d+=s<t?1:0;s=s+i>>>0;d+=s<i?1:0;s=s+f>>>0;d+=s<f?1:0;s=s+a>>>0;d+=s<a?1:0;var l=e+n+u+o+c+d;return l>>>0}n.sum64_5_hi=P;function x(e,t,n,r,u,i,o,f,c,a){var d=t+r+i+f+a;return d>>>0}n.sum64_5_lo=x;function A(e,t,n){var r=t<<32-n|e>>>n;return r>>>0}n.rotr64_hi=A;function O(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}n.rotr64_lo=O;function E(e,t,n){return e>>>n}n.shr64_hi=E;function M(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}n.shr64_lo=M},{"inherits":122,"minimalistic-assert":125}],121:[function(e,t,n){"use strict";var r=e('hash.js'),u=e('minimalistic-crypto-utils'),i=e('minimalistic-assert');function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash;this.predResist=!!e.predResist;this.outLen=this.hash.outSize;this.minEntropy=e.minEntropy||this.hash.hmacStrength;this._reseed=null;this.reseedInterval=null;this.K=null;this.V=null;var t=u.toArray(e.entropy,e.entropyEnc||'hex'),n=u.toArray(e.nonce,e.nonceEnc||'hex'),r=u.toArray(e.pers,e.persEnc||'hex');i(t.length>=this.minEntropy/8,'Not enough entropy. Minimum is: '+this.minEntropy+' bits');this._init(t,n,r)}t.exports=o;o.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var u=0;u<this.V.length;u++)this.K[u]=0,this.V[u]=1;this._update(r);this._reseed=1;this.reseedInterval=281474976710656};o.prototype._hmac=function(){return new r.hmac(this.hash,this.K)};o.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e));this.K=t.digest();this.V=this._hmac().update(this.V).digest();if(!e)return;this.K=this._hmac().update(this.V).update([1]).update(e).digest();this.V=this._hmac().update(this.V).digest()};o.prototype.reseed=function(e,t,n,r){typeof t!=='string'&&(r=n,n=t,t=null);e=u.toArray(e,t);n=u.toArray(n,r);i(e.length>=this.minEntropy/8,'Not enough entropy. Minimum is: '+this.minEntropy+' bits');this._update(e.concat(n||[]));this._reseed=1};o.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error('Reseed is required');typeof t!=='string'&&(r=n,n=t,t=null);n&&(n=u.toArray(n,r||'hex'),this._update(n));var i=[];while(i.length<e)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);this._update(n);this._reseed++;return u.encode(o,t)}},{"hash.js":109,"minimalistic-assert":125,"minimalistic-crypto-utils":126}],122:[function(e,t,n){arguments[4][7][0].apply(n,arguments)},{"dup":7}],123:[function(e,t,n){"use strict";var r=e('inherits'),u=e('hash-base'),i=e('safe-buffer').Buffer,o=new Array(16);function f(){u.call(this,64);this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878}r(f,u);f.prototype._update=function(){var e=o;for(var t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var n=this._a,r=this._b,u=this._c,i=this._d;n=a(n,r,u,i,e[0],3614090360,7);i=a(i,n,r,u,e[1],3905402710,12);u=a(u,i,n,r,e[2],606105819,17);r=a(r,u,i,n,e[3],3250441966,22);n=a(n,r,u,i,e[4],4118548399,7);i=a(i,n,r,u,e[5],1200080426,12);u=a(u,i,n,r,e[6],2821735955,17);r=a(r,u,i,n,e[7],4249261313,22);n=a(n,r,u,i,e[8],1770035416,7);i=a(i,n,r,u,e[9],2336552879,12);u=a(u,i,n,r,e[10],4294925233,17);r=a(r,u,i,n,e[11],2304563134,22);n=a(n,r,u,i,e[12],1804603682,7);i=a(i,n,r,u,e[13],4254626195,12);u=a(u,i,n,r,e[14],2792965006,17);r=a(r,u,i,n,e[15],1236535329,22);n=d(n,r,u,i,e[1],4129170786,5);i=d(i,n,r,u,e[6],3225465664,9);u=d(u,i,n,r,e[11],643717713,14);r=d(r,u,i,n,e[0],3921069994,20);n=d(n,r,u,i,e[5],3593408605,5);i=d(i,n,r,u,e[10],38016083,9);u=d(u,i,n,r,e[15],3634488961,14);r=d(r,u,i,n,e[4],3889429448,20);n=d(n,r,u,i,e[9],568446438,5);i=d(i,n,r,u,e[14],3275163606,9);u=d(u,i,n,r,e[3],4107603335,14);r=d(r,u,i,n,e[8],1163531501,20);n=d(n,r,u,i,e[13],2850285829,5);i=d(i,n,r,u,e[2],4243563512,9);u=d(u,i,n,r,e[7],1735328473,14);r=d(r,u,i,n,e[12],2368359562,20);n=s(n,r,u,i,e[5],4294588738,4);i=s(i,n,r,u,e[8],2272392833,11);u=s(u,i,n,r,e[11],1839030562,16);r=s(r,u,i,n,e[14],4259657740,23);n=s(n,r,u,i,e[1],2763975236,4);i=s(i,n,r,u,e[4],1272893353,11);u=s(u,i,n,r,e[7],4139469664,16);r=s(r,u,i,n,e[10],3200236656,23);n=s(n,r,u,i,e[13],681279174,4);i=s(i,n,r,u,e[0],3936430074,11);u=s(u,i,n,r,e[3],3572445317,16);r=s(r,u,i,n,e[6],76029189,23);n=s(n,r,u,i,e[9],3654602809,4);i=s(i,n,r,u,e[12],3873151461,11);u=s(u,i,n,r,e[15],530742520,16);r=s(r,u,i,n,e[2],3299628645,23);n=l(n,r,u,i,e[0],4096336452,6);i=l(i,n,r,u,e[7],1126891415,10);u=l(u,i,n,r,e[14],2878612391,15);r=l(r,u,i,n,e[5],4237533241,21);n=l(n,r,u,i,e[12],1700485571,6);i=l(i,n,r,u,e[3],2399980690,10);u=l(u,i,n,r,e[10],4293915773,15);r=l(r,u,i,n,e[1],2240044497,21);n=l(n,r,u,i,e[8],1873313359,6);i=l(i,n,r,u,e[15],4264355552,10);u=l(u,i,n,r,e[6],2734768916,15);r=l(r,u,i,n,e[13],1309151649,21);n=l(n,r,u,i,e[4],4149444226,6);i=l(i,n,r,u,e[11],3174756917,10);u=l(u,i,n,r,e[2],718787259,15);r=l(r,u,i,n,e[9],3951481745,21);this._a=this._a+n|0;this._b=this._b+r|0;this._c=this._c+u|0;this._d=this._d+i|0};f.prototype._digest=function(){this._block[this._blockOffset++]=128;this._blockOffset>56&&(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 e=i.allocUnsafe(16);e.writeInt32LE(this._a,0);e.writeInt32LE(this._b,4);e.writeInt32LE(this._c,8);e.writeInt32LE(this._d,12);return e};function c(e,t){return e<<t|e>>>32-t}function a(e,t,n,r,u,i,o){return c(e+(t&n|~t&r)+u+i|0,o)+t|0}function d(e,t,n,r,u,i,o){return c(e+(t&r|n&~r)+u+i|0,o)+t|0}function s(e,t,n,r,u,i,o){return c(e+(t^n^r)+u+i|0,o)+t|0}function l(e,t,n,r,u,i,o){return c(e+(n^(t|~r))+u+i|0,o)+t|0}t.exports=f},{"hash-base":108,"inherits":122,"safe-buffer":130}],124:[function(e,t,n){(function(e){t.exports=function(t,n){if(!Array.isArray(t))throw TypeError('Expected values Array');if(typeof n!=='function')throw TypeError('Expected digest Function');var r=t.length,u=t.concat();while(r>1){var i=0;for(var o=0;o<r;o+=2, ++i){var f=u[o],c=o+1===r?f:u[o+1],a=e.concat([f,c]);u[i]=n(a)}r=i}return u[0]}}).call(this,e("buffer").Buffer)},{"buffer":3}],125:[function(e,t,n){t.exports=r;function r(e,t){if(!e)throw new Error(t||'Assertion failed')}r.equal=function(e,t,n){if(e!=t)throw new Error(n||'Assertion failed: '+e+' != '+t)}},{}],126:[function(e,t,n){"use strict";var r=n;function u(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e!=='string'){for(var r=0;r<e.length;r++)n[r]=e[r]|0;return n}if(t==='hex'){e=e.replace(/[^a-z0-9]+/ig,'');e.length%2!==0&&(e='0'+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else{for(r=0;r<e.length;r++){var u=e.charCodeAt(r),i=u>>8,o=u&255;i?n.push(i,o):n.push(o)}}return n}r.toArray=u;function i(e){if(e.length===1)return'0'+e;else return e}r.zero2=i;function o(e){var t='';for(var n=0;n<e.length;n++)t+=i(e[n].toString(16));return t}r.toHex=o;r.encode=function(e,t){if(t==='hex')return o(e);else return e}},{}],127:[function(e,t,n){var r=e('bitcoin-ops');function u(e){return e<r.OP_PUSHDATA1?1:e<=255?2:e<=65535?3:5}function i(e,t,n){var i=u(t);i===1?e.writeUInt8(t,n):i===2?(e.writeUInt8(r.OP_PUSHDATA1,n),e.writeUInt8(t,n+1)):i===3?(e.writeUInt8(r.OP_PUSHDATA2,n),e.writeUInt16LE(t,n+1)):(e.writeUInt8(r.OP_PUSHDATA4,n),e.writeUInt32LE(t,n+1));return i}function o(e,t){var n=e.readUInt8(t),u,i;if(n<r.OP_PUSHDATA1)u=n,i=1;else if(n===r.OP_PUSHDATA1){if(t+2>e.length)return null;u=e.readUInt8(t+1);i=2}else if(n===r.OP_PUSHDATA2){if(t+3>e.length)return null;u=e.readUInt16LE(t+1);i=3}else{if(t+5>e.length)return null;if(n!==r.OP_PUSHDATA4)throw new Error('Unexpected opcode');u=e.readUInt32LE(t+1);i=5}return{opcode:n,number:u,size:i}}t.exports={encodingLength:u,encode:i,decode:o}},{"bitcoin-ops":37}],128:[function(e,t,n){(function(n,r){"use strict";var u=65536,i=4294967295;function o(){throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11')}var f=e('safe-buffer').Buffer,c=r.crypto||r.msCrypto;c&&c.getRandomValues?(t.exports=a):(t.exports=o);function a(e,t){if(e>i)throw new RangeError('requested too many random bytes');var r=f.allocUnsafe(e);if(e>0){if(e>u){for(var o=0;o<e;o+=u)c.getRandomValues(r.slice(o,o+u))}else c.getRandomValues(r)}if(typeof t==='function'){return n.nextTick(function(){t(null,r)})}return r}}).call(this,e('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"_process":11,"safe-buffer":130}],129:[function(e,t,n){"use strict";var r=e('buffer').Buffer,u=e('inherits'),i=e('hash-base'),o=new Array(16),f=[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],c=[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],a=[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],d=[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],s=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function p(){i.call(this,64);this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520}u(p,i);p.prototype._update=function(){var e=o;for(var t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var n=this._a|0,r=this._b|0,u=this._c|0,i=this._d|0,p=this._e|0,_=this._a|0,S=this._b|0,v=this._c|0,k=this._d|0,I=this._e|0;for(var P=0;P<80;P+=1){var x,A;P<16?(x=h(n,r,u,i,p,e[f[P]],s[0],a[P]),A=w(_,S,v,k,I,e[c[P]],l[0],d[P])):P<32?(x=m(n,r,u,i,p,e[f[P]],s[1],a[P]),A=y(_,S,v,k,I,e[c[P]],l[1],d[P])):P<48?(x=g(n,r,u,i,p,e[f[P]],s[2],a[P]),A=g(_,S,v,k,I,e[c[P]],l[2],d[P])):P<64?(x=y(n,r,u,i,p,e[f[P]],s[3],a[P]),A=m(_,S,v,k,I,e[c[P]],l[3],d[P])):(x=w(n,r,u,i,p,e[f[P]],s[4],a[P]),A=h(_,S,v,k,I,e[c[P]],l[4],d[P]));n=p;p=i;i=b(u,10);u=r;r=x;_=I;I=k;k=b(v,10);v=S;S=A}var O=this._b+u+k|0;this._b=this._c+i+I|0;this._c=this._d+p+_|0;this._d=this._e+n+S|0;this._e=this._a+r+v|0;this._a=O};p.prototype._digest=function(){this._block[this._blockOffset++]=128;this._blockOffset>56&&(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 e=r.alloc?r.alloc(20):new r(20);e.writeInt32LE(this._a,0);e.writeInt32LE(this._b,4);e.writeInt32LE(this._c,8);e.writeInt32LE(this._d,12);e.writeInt32LE(this._e,16);return e};function b(e,t){return e<<t|e>>>32-t}function h(e,t,n,r,u,i,o,f){return b(e+(t^n^r)+i+o|0,f)+u|0}function m(e,t,n,r,u,i,o,f){return b(e+(t&n|~t&r)+i+o|0,f)+u|0}function g(e,t,n,r,u,i,o,f){return b(e+((t|~n)^r)+i+o|0,f)+u|0}function y(e,t,n,r,u,i,o,f){return b(e+(t&r|n&~r)+i+o|0,f)+u|0}function w(e,t,n,r,u,i,o,f){return b(e+(t^(n|~r))+i+o|0,f)+u|0}t.exports=p},{"buffer":3,"hash-base":108,"inherits":122}],130:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{"buffer":3,"dup":26}],131:[function(e,t,n){var r=e('safe-buffer').Buffer;function u(e,t){this._block=r.alloc(e);this._finalSize=t;this._blockSize=e;this._len=0}u.prototype.update=function(e,t){typeof e==='string'&&(t=t||'utf8',e=r.from(e,t));var n=this._block,u=this._blockSize,i=e.length,o=this._len;for(var f=0;f<i;){var c=o%u,a=Math.min(i-f,u-c);for(var d=0;d<a;d++)n[c+d]=e[f+d];o+=a;f+=a;o%u===0&&this._update(n)}this._len+=i;return this};u.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128;this._block.fill(0,t+1);t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=this._len*8;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(n&4294967295)>>>0,u=(n-r)/4294967296;this._block.writeUInt32BE(u,this._blockSize-8);this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i};u.prototype._update=function(){throw new Error('_update must be implemented by subclass')};t.exports=u},{"safe-buffer":130}],132:[function(e,t,n){n=t.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+' is not supported (we accept pull requests)');return new t};n.sha=e('./sha');n.sha1=e('./sha1');n.sha224=e('./sha224');n.sha256=e('./sha256');n.sha384=e('./sha384');n.sha512=e('./sha512')},{"./sha":133,"./sha1":134,"./sha224":135,"./sha256":136,"./sha384":137,"./sha512":138}],133:[function(e,t,n){var r=e('inherits'),u=e('./hash'),i=e('safe-buffer').Buffer,o=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);function c(){this.init();this._w=f;u.call(this,64,56)}r(c,u);c.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function a(e){return e<<5|e>>>27}function d(e){return e<<30|e>>>2}function s(e,t,n,r){if(e===0)return t&n|~t&r;if(e===2)return t&n|t&r|n&r;return t^n^r}c.prototype._update=function(e){var t=this._w,n=this._a|0,r=this._b|0,u=this._c|0,i=this._d|0,f=this._e|0;for(var c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=t[c-3]^t[c-8]^t[c-14]^t[c-16];for(var l=0;l<80;++l){var p=~~(l/20),b=a(n)+s(p,r,u,i)+f+t[l]+o[p]|0;f=i;i=u;u=d(r);r=n;n=b}this._a=n+this._a|0;this._b=r+this._b|0;this._c=u+this._c|0;this._d=i+this._d|0;this._e=f+this._e|0};c.prototype._hash=function(){var e=i.allocUnsafe(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};t.exports=c},{"./hash":131,"inherits":122,"safe-buffer":130}],134:[function(e,t,n){var r=e('inherits'),u=e('./hash'),i=e('safe-buffer').Buffer,o=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);function c(){this.init();this._w=f;u.call(this,64,56)}r(c,u);c.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function a(e){return e<<1|e>>>31}function d(e){return e<<5|e>>>27}function s(e){return e<<30|e>>>2}function l(e,t,n,r){if(e===0)return t&n|~t&r;if(e===2)return t&n|t&r|n&r;return t^n^r}c.prototype._update=function(e){var t=this._w,n=this._a|0,r=this._b|0,u=this._c|0,i=this._d|0,f=this._e|0;for(var c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=a(t[c-3]^t[c-8]^t[c-14]^t[c-16]);for(var p=0;p<80;++p){var b=~~(p/20),h=d(n)+l(b,r,u,i)+f+t[p]+o[b]|0;f=i;i=u;u=s(r);r=n;n=h}this._a=n+this._a|0;this._b=r+this._b|0;this._c=u+this._c|0;this._d=i+this._d|0;this._e=f+this._e|0};c.prototype._hash=function(){var e=i.allocUnsafe(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};t.exports=c},{"./hash":131,"inherits":122,"safe-buffer":130}],135:[function(e,t,n){var r=e('inherits'),u=e('./sha256'),i=e('./hash'),o=e('safe-buffer').Buffer,f=new Array(64);function c(){this.init();this._w=f;i.call(this,64,56)}r(c,u);c.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};c.prototype._hash=function(){var e=o.allocUnsafe(28);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);return e};t.exports=c},{"./hash":131,"./sha256":136,"inherits":122,"safe-buffer":130}],136:[function(e,t,n){var r=e('inherits'),u=e('./hash'),i=e('safe-buffer').Buffer,o=[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],f=new Array(64);function c(){this.init();this._w=f;u.call(this,64,56)}r(c,u);c.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};function a(e,t,n){return n^e&(t^n)}function d(e,t,n){return e&t|n&(e|t)}function s(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function b(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}c.prototype._update=function(e){var t=this._w,n=this._a|0,r=this._b|0,u=this._c|0,i=this._d|0,f=this._e|0,c=this._f|0,h=this._g|0,m=this._h|0;for(var g=0;g<16;++g)t[g]=e.readInt32BE(g*4);for(;g<64;++g)t[g]=b(t[g-2])+t[g-7]+p(t[g-15])+t[g-16]|0;for(var y=0;y<64;++y){var w=m+l(f)+a(f,c,h)+o[y]+t[y]|0,_=s(n)+d(n,r,u)|0;m=h;h=c;c=f;f=i+w|0;i=u;u=r;r=n;n=w+_|0}this._a=n+this._a|0;this._b=r+this._b|0;this._c=u+this._c|0;this._d=i+this._d|0;this._e=f+this._e|0;this._f=c+this._f|0;this._g=h+this._g|0;this._h=m+this._h|0};c.prototype._hash=function(){var e=i.allocUnsafe(32);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);e.writeInt32BE(this._h,28);return e};t.exports=c},{"./hash":131,"inherits":122,"safe-buffer":130}],137:[function(e,t,n){var r=e('inherits'),u=e('./sha512'),i=e('./hash'),o=e('safe-buffer').Buffer,f=new Array(160);function c(){this.init();this._w=f;i.call(this,128,112)}r(c,u);c.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};c.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r);e.writeInt32BE(n,r+4)}t(this._ah,this._al,0);t(this._bh,this._bl,8);t(this._ch,this._cl,16);t(this._dh,this._dl,24);t(this._eh,this._el,32);t(this._fh,this._fl,40);return e};t.exports=c},{"./hash":131,"./sha512":138,"inherits":122,"safe-buffer":130}],138:[function(e,t,n){var r=e('inherits'),u=e('./hash'),i=e('safe-buffer').Buffer,o=[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],f=new Array(160);function c(){this.init();this._w=f;u.call(this,128,112)}r(c,u);c.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};function a(e,t,n){return n^e&(t^n)}function d(e,t,n){return e&t|n&(e|t)}function s(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function b(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function h(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}c.prototype._update=function(e){var t=this._w,n=this._ah|0,r=this._bh|0,u=this._ch|0,i=this._dh|0,f=this._eh|0,c=this._fh|0,y=this._gh|0,w=this._hh|0,_=this._al|0,S=this._bl|0,v=this._cl|0,k=this._dl|0,I=this._el|0,P=this._fl|0,x=this._gl|0,A=this._hl|0;for(var O=0;O<32;O+=2)t[O]=e.readInt32BE(O*4),t[O+1]=e.readInt32BE(O*4+4);for(;O<160;O+=2){var E=t[O-30],M=t[O-30+1],B=p(E,M),N=b(M,E);E=t[O-4];M=t[O-4+1];var L=h(E,M),T=m(M,E),R=t[O-14],U=t[O-14+1],q=t[O-32],C=t[O-32+1],H=N+U|0,j=B+R+g(H,N)|0;H=H+T|0;j=j+L+g(H,T)|0;H=H+C|0;j=j+q+g(H,C)|0;t[O]=j;t[O+1]=H}for(var z=0;z<160;z+=2){j=t[z];H=t[z+1];var D=d(n,r,u),W=d(_,S,v),K=s(n,_),F=s(_,n),J=l(f,I),V=l(I,f),X=o[z],G=o[z+1],Y=a(f,c,y),Z=a(I,P,x),Q=A+V|0,$=w+J+g(Q,A)|0;Q=Q+Z|0;$=$+Y+g(Q,Z)|0;Q=Q+G|0;$=$+X+g(Q,G)|0;Q=Q+H|0;$=$+j+g(Q,H)|0;var ee=F+W|0,te=K+D+g(ee,F)|0;w=y;A=x;y=c;x=P;c=f;P=I;I=k+Q|0;f=i+$+g(I,k)|0;i=u;k=v;u=r;v=S;r=n;S=_;_=Q+ee|0;n=$+te+g(_,Q)|0}this._al=this._al+_|0;this._bl=this._bl+S|0;this._cl=this._cl+v|0;this._dl=this._dl+k|0;this._el=this._el+I|0;this._fl=this._fl+P|0;this._gl=this._gl+x|0;this._hl=this._hl+A|0;this._ah=this._ah+n+g(this._al,_)|0;this._bh=this._bh+r+g(this._bl,S)|0;this._ch=this._ch+u+g(this._cl,v)|0;this._dh=this._dh+i+g(this._dl,k)|0;this._eh=this._eh+f+g(this._el,I)|0;this._fh=this._fh+c+g(this._fl,P)|0;this._gh=this._gh+y+g(this._gl,x)|0;this._hh=this._hh+w+g(this._hl,A)|0};c.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r);e.writeInt32BE(n,r+4)}t(this._ah,this._al,0);t(this._bh,this._bl,8);t(this._ch,this._cl,16);t(this._dh,this._dl,24);t(this._eh,this._el,32);t(this._fh,this._fl,40);t(this._gh,this._gl,48);t(this._hh,this._hl,56);return e};t.exports=c},{"./hash":131,"inherits":122,"safe-buffer":130}],139:[function(e,t,n){(function(n){let r=e('bn.js'),u=e('elliptic').ec,i=new u('secp256k1'),o=e('./rfc6979'),f=n.alloc(32,0),c=n.from('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141','hex'),a=n.from('fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f','hex'),d=i.curve.n,s=d.shrn(1),l=i.curve.g,p='Expected Private',b='Expected Point',h='Expected Tweak',m='Expected Hash',g='Expected Signature',y='Expected Extra Data (32 bytes)';function w(e){return n.isBuffer(e)&&e.length===32}function _(e){if(!w(e))return!1;return e.compare(c)<0}function S(e){if(!n.isBuffer(e))return!1;if(e.length<33)return!1;let t=e[0],r=e.slice(1,33);if(r.compare(f)===0)return!1;if(r.compare(a)>=0)return!1;if((t===2||t===3)&&e.length===33){try{E(e)}catch(e){return!1};return!0}let u=e.slice(33);if(u.compare(f)===0)return!1;if(u.compare(a)>=0)return!1;if(t===4&&e.length===65)return!0;return!1}function v(e){return e[0]!==4}function k(e){if(!S(e))return!1;return v(e)}function I(e){if(!w(e))return!1;return e.compare(f)>0&&e.compare(c)<0}function P(e){let t=e.slice(0,32),r=e.slice(32,64);return n.isBuffer(e)&&e.length===64&&t.compare(c)<0&&r.compare(c)<0}function x(e,t){if(e===void 0&&t!==void 0)return v(t);if(e===void 0)return!0;return e}function A(e){return new r(e)}function O(e){return e.toArrayLike(n,'be',32)}function E(e){return i.curve.decodePoint(e)}function M(e,t){return n.from(e._encode(t))}function B(e,t,n){if(!S(e))throw new TypeError(b);if(!S(t))throw new TypeError(b);let r=E(e),u=E(t),i=r.add(u);if(i.isInfinity())return null;let o=x(n,e);return M(i,o)}function N(e,t,n){if(!S(e))throw new TypeError(b);if(!_(t))throw new TypeError(h);let r=x(n,e),u=E(e);if(t.compare(f)===0)return M(u,r);let i=A(t),o=l.mul(i),c=u.add(o);if(c.isInfinity())return null;return M(c,r)}function L(e,t){if(!S(e))throw new TypeError(b);let n=E(e);if(n.isInfinity())throw new TypeError(b);return M(n,t)}function T(e,t){if(!I(e))throw new TypeError(p);let n=A(e),r=l.mul(n);if(r.isInfinity())return null;let u=x(t);return M(r,u)}function R(e,t,n){if(!S(e))throw new TypeError(b);if(!_(t))throw new TypeError(h);let r=x(n,e),u=E(e),i=A(t),o=u.mul(i);if(o.isInfinity())return null;return M(o,r)}function U(e,t){if(!I(e))throw new TypeError(p);if(!_(t))throw new TypeError(h);let n=A(e),r=A(t),u=O(n.add(r).umod(d));if(!I(u))return null;return u}function q(e,t){if(!I(e))throw new TypeError(p);if(!_(t))throw new TypeError(h);let n=A(e),r=A(t),u=O(n.sub(r).umod(d));if(!I(u))return null;return u}function C(e,t){return j(e,t)}function H(e,t,n){return j(e,t,n)}function j(e,t,r){if(!w(e))throw new TypeError(m);if(!I(t))throw new TypeError(p);if(r!==void 0&&!w(r))throw new TypeError(y);let u=A(t),i=A(e),f,c,a=function(e){let t=A(e),n=l.mul(t);if(n.isInfinity())return!1;f=n.x.umod(d);if(f.isZero()===0)return!1;c=t.invm(d).mul(i.add(u.mul(f))).umod(d);if(c.isZero()===0)return!1;return!0};o(e,t,a,I,r);c.cmp(s)>0&&(c=d.sub(c));let b=n.allocUnsafe(64);O(f).copy(b,0);O(c).copy(b,32);return b}function z(e,t,n){if(!w(e))throw new TypeError(m);if(!S(t))throw new TypeError(b);if(!P(n))throw new TypeError(g);let r=E(t),u=A(n.slice(0,32)),i=A(n.slice(32,64));if(u.gtn(0)<=0)return!1;if(i.gtn(0)<=0)return!1;let o=A(e),f=i.invm(d),c=o.mul(f).umod(d),a=u.mul(f).umod(d),s=l.mulAdd(c,r,a);if(s.isInfinity())return!1;let p=s.x,h=p.umod(d);return h.eq(u)}t.exports={isPoint:S,isPointCompressed:k,isPrivate:I,pointAdd:B,pointAddScalar:N,pointCompress:L,pointFromScalar:T,pointMultiply:R,privateAdd:U,privateSub:q,sign:C,signWithEntropy:H,verify:z}}).call(this,e("buffer").Buffer)},{"./rfc6979":140,"bn.js":82,"buffer":3,"elliptic":92}],140:[function(e,t,n){(function(n){let r=e('create-hmac'),u=n.alloc(1,1),i=n.alloc(1,0);function o(e,t,o,f,c){let a=n.alloc(32,0),d=n.alloc(32,1);a=r('sha256',a).update(d).update(i).update(t).update(e).update(c||'').digest();d=r('sha256',a).update(d).digest();a=r('sha256',a).update(d).update(u).update(t).update(e).update(c||'').digest();d=r('sha256',a).update(d).digest();d=r('sha256',a).update(d).digest();let s=d;while(!f(s)||!o(s))a=r('sha256',a).update(d).update(i).digest(),d=r('sha256',a).update(d).digest(),d=r('sha256',a).update(d).digest(),s=d;return s}t.exports=o}).call(this,e("buffer").Buffer)},{"buffer":3,"create-hmac":90}],141:[function(e,t,n){var r=e('./native');function u(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function i(e){return r.Nil(e)?'':u(e.constructor)}function o(e){if(r.Function(e))return'';if(r.String(e))return JSON.stringify(e);if(e&&r.Object(e))return'';return e}function f(e,t){Error.captureStackTrace&&Error.captureStackTrace(e,t)}function c(e){if(r.Function(e))return e.toJSON?e.toJSON():u(e);if(r.Array(e))return'Array';if(e&&r.Object(e))return'Object';return e!==void 0?e:''}function a(e,t,n){var r=o(t);return'Expected '+c(e)+', got'+(n!==''?' '+n:'')+(r!==''?' '+r:'')}function d(e,t,n){n=n||i(t);this.message=a(e,t,n);f(this,d);this.__type=e;this.__value=t;this.__valueTypeName=n}d.prototype=Object.create(Error.prototype);d.prototype.constructor=d;function s(e,t,n,r,u){var i='" of type ';t==='key'&&(i='" with key type ');return a('property "'+c(n)+i+c(e),r,u)}function l(e,t,n,r,u){e?(u=u||i(r),this.message=s(e,n,t,r,u)):(this.message='Unexpected property "'+t+'"');f(this,d);this.__label=n;this.__property=t;this.__type=e;this.__value=r;this.__valueTypeName=u}l.prototype=Object.create(Error.prototype);l.prototype.constructor=d;function p(e,t){return new d(e,{},t)}function b(e,t,n){e instanceof l?(t=t+'.'+e.__property,e=new l(e.__type,t,e.__label,e.__value,e.__valueTypeName)):e instanceof d&&(e=new l(e.__type,t,n,e.__value,e.__valueTypeName));f(e);return e}t.exports={TfTypeError:d,TfPropertyTypeError:l,tfCustomError:p,tfSubError:b,tfJSON:c,getValueTypeName:i}},{"./native":144}],142:[function(e,t,n){(function(n){var r=e('./native'),u=e('./errors');function i(e){return n.isBuffer(e)}function o(e){return typeof e==='string'&&/^([0-9a-f]{2})+$/i.test(e)}function f(e,t){var n=e.toJSON();function r(r){if(!e(r))return!1;if(r.length===t)return!0;throw u.tfCustomError(n+'(Length: '+t+')',n+'(Length: '+r.length+')')}r.toJSON=function(){return n};return r}var c=f.bind(null,r.Array),a=f.bind(null,i),d=f.bind(null,o),s=f.bind(null,r.String);function l(e,t,n){n=n||r.Number;function u(r,u){return n(r,u)&&r>e&&r<t}u.toJSON=function(){return`${n.toJSON()} between [${e}, ${t}]`};return u}var p=Math.pow(2,53)-1;function b(e){return typeof e==='number'&&isFinite(e)}function h(e){return e<<24>>24===e}function m(e){return e<<16>>16===e}function g(e){return(e|0)===e}function y(e){return typeof e==='number'&&e>=-p&&e<=p&&Math.floor(e)===e}function w(e){return(e&255)===e}function _(e){return(e&65535)===e}function S(e){return e>>>0===e}function v(e){return typeof e==='number'&&e>=0&&e<=p&&Math.floor(e)===e}var k={ArrayN:c,Buffer:i,BufferN:a,Finite:b,Hex:o,HexN:d,Int8:h,Int16:m,Int32:g,Int53:y,Range:l,StringN:s,UInt8:w,UInt16:_,UInt32:S,UInt53:v};for(var I in k)k[I].toJSON=function(e){return e}.bind(null,I);t.exports=k}).call(this,{"isBuffer":e("../../../../../../.nmv/versions/node/v8.15.1/lib/node_modules/browserify/node_modules/is-buffer/index.js")})},{"../../../../../../.nmv/versions/node/v8.15.1/lib/node_modules/browserify/node_modules/is-buffer/index.js":8,"./errors":141,"./native":144}],143:[function(e,t,n){var r=e('./errors'),u=e('./native'),i=r.tfJSON,o=r.TfTypeError,f=r.TfPropertyTypeError,c=r.tfSubError,a=r.getValueTypeName,d={arrayOf:function(e,t){e=s(e);t=t||{};function n(n,r){if(!u.Array(n))return!1;if(u.Nil(n))return!1;if(t.minLength!==void 0&&n.length<t.minLength)return!1;if(t.maxLength!==void 0&&n.length>t.maxLength)return!1;if(t.length!==void 0&&n.length!==t.length)return!1;return n.every(function(t,n){try{return l(e,t,r)}catch(e){throw c(e,n)}})}n.toJSON=function(){var n='['+i(e)+']';t.length!==void 0?(n+='{'+t.length+'}'):(t.minLength!==void 0||t.maxLength!==void 0)&&(n+='{'+(t.minLength===void 0?0:t.minLength)+','+(t.maxLength===void 0?1/0:t.maxLength)+'}');return n};return n},maybe:function e(t){t=s(t);function n(n,r){return u.Nil(n)||t(n,r,e)}n.toJSON=function(){return'?'+i(t)};return n},map:function(e,t){e=s(e);t&&(t=s(t));function n(n,r){if(!u.Object(n))return!1;if(u.Nil(n))return!1;for(var i in n){try{t&&l(t,i,r)}catch(e){throw c(e,i,'key')};try{var o=n[i];l(e,o,r)}catch(e){throw c(e,i)}}return!0}t?(n.toJSON=function(){return'{'+i(t)+': '+i(e)+'}'}):(n.toJSON=function(){return'{'+i(e)+'}'});return n},object:function(e){var t={};for(var n in e)t[n]=s(e[n]);function r(e,n){if(!u.Object(e))return!1;if(u.Nil(e))return!1;var r;try{for(r in t){var i=t[r],o=e[r];l(i,o,n)}}catch(e){throw c(e,r)};if(n){for(r in e){if(t[r])continue;throw new f(void 0,r)}}return!0}r.toJSON=function(){return i(t)};return r},anyOf:function(){var e=[].slice.call(arguments).map(s);function t(t,n){return e.some(function(e){try{return l(e,t,n)}catch(e){return!1}})}t.toJSON=function(){return e.map(i).join('|')};return t},allOf:function(){var e=[].slice.call(arguments).map(s);function t(t,n){return e.every(function(e){try{return l(e,t,n)}catch(e){return!1}})}t.toJSON=function(){return e.map(i).join(' & ')};return t},quacksLike:function(e){function t(t){return e===a(t)}t.toJSON=function(){return e};return t},tuple:function(){var e=[].slice.call(arguments).map(s);function t(t,n){if(u.Nil(t))return!1;if(u.Nil(t.length))return!1;if(n&&t.length!==e.length)return!1;return e.every(function(e,r){try{return l(e,t[r],n)}catch(e){throw c(e,r)}})}t.toJSON=function(){return'('+e.map(i).join(', ')+')'};return t},value:function(e){function t(t){return t===e}t.toJSON=function(){return e};return t}};d.oneOf=d.anyOf;function s(e){if(u.String(e)){if(e[0]==='?')return d.maybe(e.slice(1));return u[e]||d.quacksLike(e)}else if(e&&u.Object(e)){if(u.Array(e)){if(e.length!==1)throw new TypeError('Expected compile() parameter of type Array of length 1');return d.arrayOf(e[0])}return d.object(e)}else if(u.Function(e)){return e}return d.value(e)}function l(e,t,n,r){if(u.Function(e)){if(e(t,n))return!0;throw new o(r||e,t)}return l(s(e),t,n)}for(var p in u)l[p]=u[p];for(p in d)l[p]=d[p];var b=e('./extra');for(p in b)l[p]=b[p];l.compile=s;l.TfTypeError=o;l.TfPropertyTypeError=f;t.exports=l},{"./errors":141,"./extra":142,"./native":144}],144:[function(e,t,n){var r={Array:function(e){return e!==null&&e!==void 0&&e.constructor===Array},Boolean:function(e){return typeof e==='boolean'},Function:function(e){return typeof e==='function'},Nil:function(e){return e===void 0||e===null},Number:function(e){return typeof e==='number'},Object:function(e){return typeof e==='object'},String:function(e){return typeof e==='string'},'':function(){return!0}};r.Null=r.Nil;for(var u in r)r[u].toJSON=function(e){return e}.bind(null,u);t.exports=r},{}],145:[function(e,t,n){"use strict";var r=e('safe-buffer').Buffer,u=9007199254740991;function i(e){if(e<0||e>u||e%1!==0)throw new RangeError('value out of range')}function o(e,t,n){i(e);t||(t=r.allocUnsafe(c(e)));if(!r.isBuffer(t))throw new TypeError('buffer must be a Buffer instance');n||(n=0);e<253?(t.writeUInt8(e,n),o.bytes=1):e<=65535?(t.writeUInt8(253,n),t.writeUInt16LE(e,n+1),o.bytes=3):e<=4294967295?(t.writeUInt8(254,n),t.writeUInt32LE(e,n+1),o.bytes=5):(t.writeUInt8(255,n),t.writeUInt32LE(e>>>0,n+1),t.writeUInt32LE(e/4294967296|0,n+5),o.bytes=9);return t}function f(e,t){if(!r.isBuffer(e))throw new TypeError('buffer must be a Buffer instance');t||(t=0);var n=e.readUInt8(t);if(n<253){f.bytes=1;return n}else if(n===253){f.bytes=3;return e.readUInt16LE(t+1)}else if(n===254){f.bytes=5;return e.readUInt32LE(t+1)}else{f.bytes=9;var u=e.readUInt32LE(t+1),o=e.readUInt32LE(t+5),c=o*4294967296+u;i(c);return c}}function c(e){i(e);return e<253?1:e<=65535?3:e<=4294967295?5:9}t.exports={encode:o,decode:f,encodingLength:c}},{"safe-buffer":130}],146:[function(e,t,n){(function(n){var r=e('bs58check');function u(e,t){if(t!==void 0&&e[0]!==t)throw new Error('Invalid network version');if(e.length===33){return{version:e[0],privateKey:e.slice(1,33),compressed:!1}}if(e.length!==34)throw new Error('Invalid WIF length');if(e[33]!==1)throw new Error('Invalid compression flag');return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function i(e,t,r){var u=new n(r?34:33);u.writeUInt8(e,0);t.copy(u,1);r&&(u[33]=1);return u}function o(e,t){return u(r.decode(e),t)}function f(e,t,n){if(typeof e==='number')return r.encode(i(e,t,n));return r.encode(i(e.version,e.privateKey,e.compressed))}t.exports={decode:o,decodeRaw:u,encode:f,encodeRaw:i}}).call(this,e("buffer").Buffer)},{"bs58check":86,"buffer":3}],"bitcoinjs-lib":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e("bip32");n.bip32=r;let u=e("./address");n.address=u;let i=e("./crypto");n.crypto=i;let o=e("./ecpair");n.ECPair=o;let f=e("./networks");n.networks=f;let c=e("./payments");n.payments=c;let a=e("./script");n.script=a;var d=e("./block");n.Block=d.Block;var s=e("./script");n.opcodes=s.OPS;var l=e("./transaction");n.Transaction=l.Transaction;var p=e("./transaction_builder");n.TransactionBuilder=p.TransactionBuilder},{"./address":39,"./block":40,"./crypto":43,"./ecpair":44,"./networks":45,"./payments":47,"./script":55,"./transaction":79,"./transaction_builder":80,"bip32":35}]},{},[])("bitcoinjs-lib")})