Skip to content

Instantly share code, notes, and snippets.

@kendricktan
Created April 29, 2020 07:09
Show Gist options
  • Select an option

  • Save kendricktan/9e8aefd7569ebf37e70fd5c4d5b70d14 to your computer and use it in GitHub Desktop.

Select an option

Save kendricktan/9e8aefd7569ebf37e70fd5c4d5b70d14 to your computer and use it in GitHub Desktop.
Hegic.co index.js dump
This file has been truncated, but you can view the full file.
/*! For license information please see index.js.LICENSE.txt */
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/scripts/",n(n.s=349)}([function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";(function(e){var r=n(147),i=n(148),a=n(149);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(t,n),i=(e=o(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=o(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?o(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(c(t),e=o(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=o(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function h(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var a,s=1,o=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(a=n;a<o;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*s}else-1!==c&&(a-=a-c),c=-1}else for(n+u>o&&(n=o-u),a=n;a>=0;a--){for(var d=!0,f=0;f<u;f++)if(l(e,a+f)!==l(t,f)){d=!1;break}if(d)return a}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var s=0;s<r;++s){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))return s;e[n+s]=o}return s}function v(e,t,n,r){return q(U(t,e.length-n),e,n,r)}function w(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function T(e,t,n,r){return w(e,t,n,r)}function I(e,t,n,r){return q(z(t),e,n,r)}function S(e,t,n,r){return q(function(e,t){for(var n,r,i,a=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,s,o,u,l=e[i],c=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&(u=(15&l)<<12|(63&a)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],s=e[i+2],o=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(u=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.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}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=y,u.prototype._isBuffer=!0,u.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)m(this,t,t+1);return this},u.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)m(this,t,t+3),m(this,t+1,t+2);return this},u.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)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?D(this,0,e):h.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),o=Math.min(a,s),l=this.slice(r,i),c=e.slice(t,n),d=0;d<o;++d)if(l[d]!==c[d]){a=l[d],s=c[d];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=V(e[a]);return i}function M(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function k(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")}function N(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function R(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,a){return a||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=0,s=1,o=0;for(this[t]=255&e;++a<n&&(s*=256);)e<0&&0===o&&0!==this[t+a-1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=n-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=u.isBuffer(e)?e:U(new u(e,r).toString()),o=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%o]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(4))},function(e,t,n){var r=n(1),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),a(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function a(e,t,n){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{s=n(151).Buffer}catch(e){}function o(e,t,n){for(var r=0,i=Math.min(e.length,n),a=t;a<i;a++){var s=e.charCodeAt(a)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function u(e,t,n,r){for(var i=0,a=Math.min(e.length,n),s=t;s<a;s++){var o=e.charCodeAt(s)-48;i*=r,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===n)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===n)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.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,i,a=0;for(n=e.length-6,r=0;n>=t;n-=6)i=o(e,n,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);n+6!==t&&(i=o(e,t,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,l=0,c=n;c<o;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var d=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","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"],c=[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],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,u=s/67108864|0;n.words[0]=o;for(var l=1;l<r;l++){for(var c=u>>>26,d=67108863&u,f=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=f;p++){var y=l-p|0;c+=(s=(i=0|e.words[y])*(a=0|t.words[p])+d)/67108864|0,d=67108863&s}n.words[l]=0|d,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}a.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<i|a)).toString(16);n=0!==(a=o>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==a&&(n=a.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],p=d[e];n="";var y=this.clone();for(y.negative=0;!y.isZero();){var h=y.modn(p).toString(e);n=(y=y.idivn(p)).isZero()?h+n:l[f-h.length]+h+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return r(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===t,l=new e(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[o]=s;for(;o<a;o++)l[o]=0}else{for(o=0;o<a-i;o++)l[o]=0;for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[a-o-1]=s}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;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()},a.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.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];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,a,s=e.words,o=t.words,u=n.words,l=0,c=0|s[0],d=8191&c,f=c>>>13,p=0|s[1],y=8191&p,h=p>>>13,m=0|s[2],b=8191&m,g=m>>>13,_=0|s[3],v=8191&_,w=_>>>13,T=0|s[4],I=8191&T,S=T>>>13,A=0|s[5],D=8191&A,E=A>>>13,C=0|s[6],x=8191&C,M=C>>>13,k=0|s[7],N=8191&k,P=k>>>13,L=0|s[8],R=8191&L,O=L>>>13,B=0|s[9],j=8191&B,V=B>>>13,U=0|o[0],z=8191&U,q=U>>>13,$=0|o[1],F=8191&$,H=$>>>13,G=0|o[2],Y=8191&G,Q=G>>>13,Z=0|o[3],K=8191&Z,W=Z>>>13,J=0|o[4],X=8191&J,ee=J>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ue=8191&oe,le=oe>>>13,ce=0|o[8],de=8191&ce,fe=ce>>>13,pe=0|o[9],ye=8191&pe,he=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;l=((a=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(h,z)|0,a=Math.imul(h,q);var be=(l+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,F)|0))<<13)|0;l=((a=a+Math.imul(f,H)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(g,z)|0,a=Math.imul(g,q),r=r+Math.imul(y,F)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(h,F)|0,a=a+Math.imul(h,H)|0;var ge=(l+(r=r+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(f,Y)|0))<<13)|0;l=((a=a+Math.imul(f,Q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(w,z)|0,a=Math.imul(w,q),r=r+Math.imul(b,F)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(g,F)|0,a=a+Math.imul(g,H)|0,r=r+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(h,Y)|0,a=a+Math.imul(h,Q)|0;var _e=(l+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,K)|0))<<13)|0;l=((a=a+Math.imul(f,W)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,z),i=(i=Math.imul(I,q))+Math.imul(S,z)|0,a=Math.imul(S,q),r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,F)|0,a=a+Math.imul(w,H)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,Q)|0,r=r+Math.imul(y,K)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(h,K)|0,a=a+Math.imul(h,W)|0;var ve=(l+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;l=((a=a+Math.imul(f,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(E,z)|0,a=Math.imul(E,q),r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(S,F)|0,a=a+Math.imul(S,H)|0,r=r+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,Q)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,W)|0,r=r+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(h,X)|0,a=a+Math.imul(h,ee)|0;var we=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;l=((a=a+Math.imul(f,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(M,z)|0,a=Math.imul(M,q),r=r+Math.imul(D,F)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(E,F)|0,a=a+Math.imul(E,H)|0,r=r+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,Q)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,W)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,X)|0,a=a+Math.imul(g,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(h,ne)|0,a=a+Math.imul(h,re)|0;var Te=(l+(r=r+Math.imul(d,ae)|0)|0)+((8191&(i=(i=i+Math.imul(d,se)|0)+Math.imul(f,ae)|0))<<13)|0;l=((a=a+Math.imul(f,se)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(N,z),i=(i=Math.imul(N,q))+Math.imul(P,z)|0,a=Math.imul(P,q),r=r+Math.imul(x,F)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(M,F)|0,a=a+Math.imul(M,H)|0,r=r+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,Q)|0,r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,W)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(g,ne)|0,a=a+Math.imul(g,re)|0,r=r+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(h,ae)|0,a=a+Math.imul(h,se)|0;var Ie=(l+(r=r+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ue)|0))<<13)|0;l=((a=a+Math.imul(f,le)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,a=Math.imul(O,q),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(P,F)|0,a=a+Math.imul(P,H)|0,r=r+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,Q)|0,r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,W)|0,r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(w,ne)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,se)|0,r=r+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(h,ue)|0,a=a+Math.imul(h,le)|0;var Se=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((a=a+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(V,z)|0,a=Math.imul(V,q),r=r+Math.imul(R,F)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(O,F)|0,a=a+Math.imul(O,H)|0,r=r+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,Q)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(M,K)|0,a=a+Math.imul(M,W)|0,r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(E,X)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(S,ne)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(v,ae)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,le)|0)+Math.imul(g,ue)|0,a=a+Math.imul(g,le)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(h,de)|0,a=a+Math.imul(h,fe)|0;var Ae=(l+(r=r+Math.imul(d,ye)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(f,ye)|0))<<13)|0;l=((a=a+Math.imul(f,he)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(V,F)|0,a=Math.imul(V,H),r=r+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(O,Y)|0,a=a+Math.imul(O,Q)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,W)|0,r=r+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(w,ue)|0,a=a+Math.imul(w,le)|0,r=r+Math.imul(b,de)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(g,de)|0,a=a+Math.imul(g,fe)|0;var De=(l+(r=r+Math.imul(y,ye)|0)|0)+((8191&(i=(i=i+Math.imul(y,he)|0)+Math.imul(h,ye)|0))<<13)|0;l=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Q))+Math.imul(V,Y)|0,a=Math.imul(V,Q),r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,W)|0,r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(M,ne)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(D,ae)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,le)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(w,de)|0,a=a+Math.imul(w,fe)|0;var Ee=(l+(r=r+Math.imul(b,ye)|0)|0)+((8191&(i=(i=i+Math.imul(b,he)|0)+Math.imul(g,ye)|0))<<13)|0;l=((a=a+Math.imul(g,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,W))+Math.imul(V,K)|0,a=Math.imul(V,W),r=r+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,a=a+Math.imul(P,re)|0,r=r+Math.imul(x,ae)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,se)|0,r=r+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(E,ue)|0,a=a+Math.imul(E,le)|0,r=r+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(S,de)|0,a=a+Math.imul(S,fe)|0;var Ce=(l+(r=r+Math.imul(v,ye)|0)|0)+((8191&(i=(i=i+Math.imul(v,he)|0)+Math.imul(w,ye)|0))<<13)|0;l=((a=a+Math.imul(w,he)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(V,X)|0,a=Math.imul(V,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,se)|0,r=r+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(M,ue)|0,a=a+Math.imul(M,le)|0,r=r+Math.imul(D,de)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(E,de)|0,a=a+Math.imul(E,fe)|0;var xe=(l+(r=r+Math.imul(I,ye)|0)|0)+((8191&(i=(i=i+Math.imul(I,he)|0)+Math.imul(S,ye)|0))<<13)|0;l=((a=a+Math.imul(S,he)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(V,ne)|0,a=Math.imul(V,re),r=r+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,se)|0,r=r+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(P,ue)|0,a=a+Math.imul(P,le)|0,r=r+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(M,de)|0,a=a+Math.imul(M,fe)|0;var Me=(l+(r=r+Math.imul(D,ye)|0)|0)+((8191&(i=(i=i+Math.imul(D,he)|0)+Math.imul(E,ye)|0))<<13)|0;l=((a=a+Math.imul(E,he)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ae),i=(i=Math.imul(j,se))+Math.imul(V,ae)|0,a=Math.imul(V,se),r=r+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(O,ue)|0,a=a+Math.imul(O,le)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(P,de)|0,a=a+Math.imul(P,fe)|0;var ke=(l+(r=r+Math.imul(x,ye)|0)|0)+((8191&(i=(i=i+Math.imul(x,he)|0)+Math.imul(M,ye)|0))<<13)|0;l=((a=a+Math.imul(M,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(V,ue)|0,a=Math.imul(V,le),r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(O,de)|0,a=a+Math.imul(O,fe)|0;var Ne=(l+(r=r+Math.imul(N,ye)|0)|0)+((8191&(i=(i=i+Math.imul(N,he)|0)+Math.imul(P,ye)|0))<<13)|0;l=((a=a+Math.imul(P,he)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(V,de)|0,a=Math.imul(V,fe);var Pe=(l+(r=r+Math.imul(R,ye)|0)|0)+((8191&(i=(i=i+Math.imul(R,he)|0)+Math.imul(O,ye)|0))<<13)|0;l=((a=a+Math.imul(O,he)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(l+(r=Math.imul(j,ye))|0)+((8191&(i=(i=Math.imul(j,he))+Math.imul(V,ye)|0))<<13)|0;return l=((a=Math.imul(V,he))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=me,u[1]=be,u[2]=ge,u[3]=_e,u[4]=ve,u[5]=we,u[6]=Te,u[7]=Ie,u[8]=Se,u[9]=Ae,u[10]=De,u[11]=Ee,u[12]=Ce,u[13]=xe,u[14]=Me,u[15]=ke,u[16]=Ne,u[17]=Pe,u[18]=Le,0!==l&&(u[19]=l,n.length++),n};function y(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(p=f),a.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,u=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=u;l++){var c=a-l,d=(0|e.words[c])*(0|t.words[l]),f=67108863&d;o=67108863&(f=f+o|0),i+=(s=(s=s+(d/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,e,t):y(this,e,t)},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},h.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},h.prototype.permute=function(e,t,n,r,i,a){for(var s=0;s<a;s++)r[s]=t[e[s]],i[s]=n[e[s]]},h.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),l=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var d=u,f=l,p=0;p<s;p++){var y=n[c+p],h=r[c+p],m=n[c+p+s],b=r[c+p+s],g=d*m-f*b;b=d*b+f*m,m=g,n[c+p]=y+m,r[c+p]=h+b,n[c+p+s]=y-m,r[c+p+s]=h-b,p!==o&&(g=u*d-l*f,f=u*f+l*d,d=g)}},h.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},h.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},h.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},h.prototype.convert13b=function(e,t,n,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],n[2*s]=8191&a,a>>>=13,n[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===a),r(0==(-8192&a))},h.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},h.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),u=new Array(r),l=new Array(r),c=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,l,r),this.transform(s,a,o,u,r,i),this.transform(l,a,c,d,r,i);for(var p=0;p<r;p++){var y=o[p]*c[p]-u[p]*d[p];u[p]=o[p]*d[p]+u[p]*c[p],o[p]=y}return this.conjugate(o,u,r),this.transform(o,u,f,a,r,i),this.conjugate(f,a,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),y(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[n]=67108863&a}return 0!==t&&(this.words[n]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},a.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,u=(0|this.words[t])-o<<n;this.words[t]=u|s,s=o>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,u=n;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var d=0|this.words[l];this.words[l]=c<<26-a|d>>>a,c=d&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},a.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.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]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&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()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var i,a,s=e.length+n;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+n])+o;var u=(0|e.words[i])*t;o=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&a}for(;i<this.length-n;i++)o=(a=(0|this.words[i+n])+o)>>26,this.words[i+n]=67108863&a;if(0===o)return this.strip();for(r(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,s=0|i.words[i.length-1];0!==(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var o,u=r.length-i.length;if("mod"!==t){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var l=0;l<o.length;l++)o.words[l]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,o&&(o.words[u]=1));for(var d=u-1;d>=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=f)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,o},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),d=t.clone();!t.isZero();){for(var f=0,p=1;0==(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var y=0,h=1;0==(n.words[0]&h)&&y<26;++y,h<<=1);if(y>0)for(n.iushrn(y);y-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(d)),o.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o),s.isub(u)):(n.isub(t),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:n.iushln(l)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new a(1),o=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(o)):(n.isub(t),o.isub(s))}return(i=0===t.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(e),i},a.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);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var a=i,s=n;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new T(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=a._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}function I(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(g,b),g.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var a=0|e.words[r];e.words[r-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(_,b),i(v,b),i(w,b),w.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new _;else if("p192"===e)t=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},T.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},T.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,i),f=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),y=s;0!==p.cmp(o);){for(var h=p,m=0;0!==h.cmp(o);m++)h=h.redSqr();r(m<y);var b=this.pow(d,new a(1).iushln(y-m-1));f=f.redMul(b),d=b.redSqr(),p=p.redMul(d),y=m}return f},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new a(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var d=l>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4===++o||0===r&&0===c)&&(i=this.mul(i,n[s]),o=0,s=0)):o=0}u=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new I(e)},i(I,T),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(22)(e))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},a=i._,s=Array.prototype,o=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,l=s.push,c=s.slice,d=o.toString,f=o.hasOwnProperty,p=Array.isArray,y=Object.keys,h=Object.create,m=function(){},b=function(e){return e instanceof b?e:this instanceof b?void(this._wrapped=e):new b(e)};t.nodeType?i._=b:(!n.nodeType&&n.exports&&(t=n.exports=b),t._=b),b.VERSION="1.9.1";var g,_=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}},v=function(e,t,n){return b.iteratee!==g?b.iteratee(e,t):null==e?b.identity:b.isFunction(e)?_(e,t,n):b.isObject(e)&&!b.isArray(e)?b.matcher(e):b.property(e)};b.iteratee=g=function(e,t){return v(e,t,1/0)};var w=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var a=Array(t+1);for(i=0;i<t;i++)a[i]=arguments[i];return a[t]=r,e.apply(this,a)}},T=function(e){if(!b.isObject(e))return{};if(h)return h(e);m.prototype=e;var t=new m;return m.prototype=null,t},I=function(e){return function(t){return null==t?void 0:t[e]}},S=function(e,t){return null!=e&&f.call(e,t)},A=function(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0},D=Math.pow(2,53)-1,E=I("length"),C=function(e){var t=E(e);return"number"==typeof t&&t>=0&&t<=D};b.each=b.forEach=function(e,t,n){var r,i;if(t=_(t,n),C(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var a=b.keys(e);for(r=0,i=a.length;r<i;r++)t(e[a[r]],a[r],e)}return e},b.map=b.collect=function(e,t,n){t=v(t,n);for(var r=!C(e)&&b.keys(e),i=(r||e).length,a=Array(i),s=0;s<i;s++){var o=r?r[s]:s;a[s]=t(e[o],o,e)}return a};var x=function(e){var t=function(t,n,r,i){var a=!C(t)&&b.keys(t),s=(a||t).length,o=e>0?0:s-1;for(i||(r=t[a?a[o]:o],o+=e);o>=0&&o<s;o+=e){var u=a?a[o]:o;r=n(r,t[u],u,t)}return r};return function(e,n,r,i){var a=arguments.length>=3;return t(e,_(n,i,4),r,a)}};b.reduce=b.foldl=b.inject=x(1),b.reduceRight=b.foldr=x(-1),b.find=b.detect=function(e,t,n){var r=(C(e)?b.findIndex:b.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},b.filter=b.select=function(e,t,n){var r=[];return t=v(t,n),b.each(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r},b.reject=function(e,t,n){return b.filter(e,b.negate(v(t)),n)},b.every=b.all=function(e,t,n){t=v(t,n);for(var r=!C(e)&&b.keys(e),i=(r||e).length,a=0;a<i;a++){var s=r?r[a]:a;if(!t(e[s],s,e))return!1}return!0},b.some=b.any=function(e,t,n){t=v(t,n);for(var r=!C(e)&&b.keys(e),i=(r||e).length,a=0;a<i;a++){var s=r?r[a]:a;if(t(e[s],s,e))return!0}return!1},b.contains=b.includes=b.include=function(e,t,n,r){return C(e)||(e=b.values(e)),("number"!=typeof n||r)&&(n=0),b.indexOf(e,t,n)>=0},b.invoke=w((function(e,t,n){var r,i;return b.isFunction(t)?i=t:b.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),b.map(e,(function(e){var a=i;if(!a){if(r&&r.length&&(e=A(e,r)),null==e)return;a=e[t]}return null==a?a:a.apply(e,n)}))})),b.pluck=function(e,t){return b.map(e,b.property(t))},b.where=function(e,t){return b.filter(e,b.matcher(t))},b.findWhere=function(e,t){return b.find(e,b.matcher(t))},b.max=function(e,t,n){var r,i,a=-1/0,s=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var o=0,u=(e=C(e)?e:b.values(e)).length;o<u;o++)null!=(r=e[o])&&r>a&&(a=r);else t=v(t,n),b.each(e,(function(e,n,r){((i=t(e,n,r))>s||i===-1/0&&a===-1/0)&&(a=e,s=i)}));return a},b.min=function(e,t,n){var r,i,a=1/0,s=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var o=0,u=(e=C(e)?e:b.values(e)).length;o<u;o++)null!=(r=e[o])&&r<a&&(a=r);else t=v(t,n),b.each(e,(function(e,n,r){((i=t(e,n,r))<s||i===1/0&&a===1/0)&&(a=e,s=i)}));return a},b.shuffle=function(e){return b.sample(e,1/0)},b.sample=function(e,t,n){if(null==t||n)return C(e)||(e=b.values(e)),e[b.random(e.length-1)];var r=C(e)?b.clone(e):b.values(e),i=E(r);t=Math.max(Math.min(t,i),0);for(var a=i-1,s=0;s<t;s++){var o=b.random(s,a),u=r[s];r[s]=r[o],r[o]=u}return r.slice(0,t)},b.sortBy=function(e,t,n){var r=0;return t=v(t,n),b.pluck(b.map(e,(function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),"value")};var M=function(e,t){return function(n,r,i){var a=t?[[],[]]:{};return r=v(r,i),b.each(n,(function(t,i){var s=r(t,i,n);e(a,t,s)})),a}};b.groupBy=M((function(e,t,n){S(e,n)?e[n].push(t):e[n]=[t]})),b.indexBy=M((function(e,t,n){e[n]=t})),b.countBy=M((function(e,t,n){S(e,n)?e[n]++:e[n]=1}));var k=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;b.toArray=function(e){return e?b.isArray(e)?c.call(e):b.isString(e)?e.match(k):C(e)?b.map(e,b.identity):b.values(e):[]},b.size=function(e){return null==e?0:C(e)?e.length:b.keys(e).length},b.partition=M((function(e,t,n){e[n?0:1].push(t)}),!0),b.first=b.head=b.take=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[0]:b.initial(e,e.length-t)},b.initial=function(e,t,n){return c.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},b.last=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[e.length-1]:b.rest(e,Math.max(0,e.length-t))},b.rest=b.tail=b.drop=function(e,t,n){return c.call(e,null==t||n?1:t)},b.compact=function(e){return b.filter(e,Boolean)};var N=function(e,t,n,r){for(var i=(r=r||[]).length,a=0,s=E(e);a<s;a++){var o=e[a];if(C(o)&&(b.isArray(o)||b.isArguments(o)))if(t)for(var u=0,l=o.length;u<l;)r[i++]=o[u++];else N(o,t,n,r),i=r.length;else n||(r[i++]=o)}return r};b.flatten=function(e,t){return N(e,t,!1)},b.without=w((function(e,t){return b.difference(e,t)})),b.uniq=b.unique=function(e,t,n,r){b.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=v(n,r));for(var i=[],a=[],s=0,o=E(e);s<o;s++){var u=e[s],l=n?n(u,s,e):u;t&&!n?(s&&a===l||i.push(u),a=l):n?b.contains(a,l)||(a.push(l),i.push(u)):b.contains(i,u)||i.push(u)}return i},b.union=w((function(e){return b.uniq(N(e,!0,!0))})),b.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=E(e);r<i;r++){var a=e[r];if(!b.contains(t,a)){var s;for(s=1;s<n&&b.contains(arguments[s],a);s++);s===n&&t.push(a)}}return t},b.difference=w((function(e,t){return t=N(t,!0,!0),b.filter(e,(function(e){return!b.contains(t,e)}))})),b.unzip=function(e){for(var t=e&&b.max(e,E).length||0,n=Array(t),r=0;r<t;r++)n[r]=b.pluck(e,r);return n},b.zip=w(b.unzip),b.object=function(e,t){for(var n={},r=0,i=E(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n};var P=function(e){return function(t,n,r){n=v(n,r);for(var i=E(t),a=e>0?0:i-1;a>=0&&a<i;a+=e)if(n(t[a],a,t))return a;return-1}};b.findIndex=P(1),b.findLastIndex=P(-1),b.sortedIndex=function(e,t,n,r){for(var i=(n=v(n,r,1))(t),a=0,s=E(e);a<s;){var o=Math.floor((a+s)/2);n(e[o])<i?a=o+1:s=o}return a};var L=function(e,t,n){return function(r,i,a){var s=0,o=E(r);if("number"==typeof a)e>0?s=a>=0?a:Math.max(a+o,s):o=a>=0?Math.min(a+1,o):a+o+1;else if(n&&a&&o)return r[a=n(r,i)]===i?a:-1;if(i!=i)return(a=t(c.call(r,s,o),b.isNaN))>=0?a+s:-1;for(a=e>0?s:o-1;a>=0&&a<o;a+=e)if(r[a]===i)return a;return-1}};b.indexOf=L(1,b.findIndex,b.sortedIndex),b.lastIndexOf=L(-1,b.findLastIndex),b.range=function(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),a=0;a<r;a++,e+=n)i[a]=e;return i},b.chunk=function(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(c.call(e,r,r+=t));return n};var R=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var a=T(e.prototype),s=e.apply(a,i);return b.isObject(s)?s:a};b.bind=w((function(e,t,n){if(!b.isFunction(e))throw new TypeError("Bind must be called on a function");var r=w((function(i){return R(e,r,t,this,n.concat(i))}));return r})),b.partial=w((function(e,t){var n=b.partial.placeholder,r=function(){for(var i=0,a=t.length,s=Array(a),o=0;o<a;o++)s[o]=t[o]===n?arguments[i++]:t[o];for(;i<arguments.length;)s.push(arguments[i++]);return R(e,r,this,this,s)};return r})),b.partial.placeholder=b,b.bindAll=w((function(e,t){var n=(t=N(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=b.bind(e[r],e)}})),b.memoize=function(e,t){var n=function(r){var i=n.cache,a=""+(t?t.apply(this,arguments):r);return S(i,a)||(i[a]=e.apply(this,arguments)),i[a]};return n.cache={},n},b.delay=w((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})),b.defer=b.partial(b.delay,b,1),b.throttle=function(e,t,n){var r,i,a,s,o=0;n||(n={});var u=function(){o=!1===n.leading?0:b.now(),r=null,s=e.apply(i,a),r||(i=a=null)},l=function(){var l=b.now();o||!1!==n.leading||(o=l);var c=t-(l-o);return i=this,a=arguments,c<=0||c>t?(r&&(clearTimeout(r),r=null),o=l,s=e.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(u,c)),s};return l.cancel=function(){clearTimeout(r),o=0,r=i=a=null},l},b.debounce=function(e,t,n){var r,i,a=function(t,n){r=null,n&&(i=e.apply(t,n))},s=w((function(s){if(r&&clearTimeout(r),n){var o=!r;r=setTimeout(a,t),o&&(i=e.apply(this,s))}else r=b.delay(a,t,this,s);return i}));return s.cancel=function(){clearTimeout(r),r=null},s},b.wrap=function(e,t){return b.partial(t,e)},b.negate=function(e){return function(){return!e.apply(this,arguments)}},b.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},b.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},b.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},b.once=b.partial(b.before,2),b.restArguments=w;var O=!{toString:null}.propertyIsEnumerable("toString"),B=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],j=function(e,t){var n=B.length,r=e.constructor,i=b.isFunction(r)&&r.prototype||o,a="constructor";for(S(e,a)&&!b.contains(t,a)&&t.push(a);n--;)(a=B[n])in e&&e[a]!==i[a]&&!b.contains(t,a)&&t.push(a)};b.keys=function(e){if(!b.isObject(e))return[];if(y)return y(e);var t=[];for(var n in e)S(e,n)&&t.push(n);return O&&j(e,t),t},b.allKeys=function(e){if(!b.isObject(e))return[];var t=[];for(var n in e)t.push(n);return O&&j(e,t),t},b.values=function(e){for(var t=b.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},b.mapObject=function(e,t,n){t=v(t,n);for(var r=b.keys(e),i=r.length,a={},s=0;s<i;s++){var o=r[s];a[o]=t(e[o],o,e)}return a},b.pairs=function(e){for(var t=b.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},b.invert=function(e){for(var t={},n=b.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},b.functions=b.methods=function(e){var t=[];for(var n in e)b.isFunction(e[n])&&t.push(n);return t.sort()};var V=function(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var a=arguments[i],s=e(a),o=s.length,u=0;u<o;u++){var l=s[u];t&&void 0!==n[l]||(n[l]=a[l])}return n}};b.extend=V(b.allKeys),b.extendOwn=b.assign=V(b.keys),b.findKey=function(e,t,n){t=v(t,n);for(var r,i=b.keys(e),a=0,s=i.length;a<s;a++)if(t(e[r=i[a]],r,e))return r};var U,z,q=function(e,t,n){return t in n};b.pick=w((function(e,t){var n={},r=t[0];if(null==e)return n;b.isFunction(r)?(t.length>1&&(r=_(r,t[1])),t=b.allKeys(e)):(r=q,t=N(t,!1,!1),e=Object(e));for(var i=0,a=t.length;i<a;i++){var s=t[i],o=e[s];r(o,s,e)&&(n[s]=o)}return n})),b.omit=w((function(e,t){var n,r=t[0];return b.isFunction(r)?(r=b.negate(r),t.length>1&&(n=t[1])):(t=b.map(N(t,!1,!1),String),r=function(e,n){return!b.contains(t,n)}),b.pick(e,r,n)})),b.defaults=V(b.allKeys,!0),b.create=function(e,t){var n=T(e);return t&&b.extendOwn(n,t),n},b.clone=function(e){return b.isObject(e)?b.isArray(e)?e.slice():b.extend({},e):e},b.tap=function(e,t){return t(e),e},b.isMatch=function(e,t){var n=b.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;a<r;a++){var s=n[a];if(t[s]!==i[s]||!(s in i))return!1}return!0},U=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&z(e,t,n,r)},z=function(e,t,n,r){e instanceof b&&(e=e._wrapped),t instanceof b&&(t=t._wrapped);var i=d.call(e);if(i!==d.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return u.valueOf.call(e)===u.valueOf.call(t)}var a="[object Array]"===i;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var s=e.constructor,o=t.constructor;if(s!==o&&!(b.isFunction(s)&&s instanceof s&&b.isFunction(o)&&o instanceof o)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var l=(n=n||[]).length;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),a){if((l=e.length)!==t.length)return!1;for(;l--;)if(!U(e[l],t[l],n,r))return!1}else{var c,f=b.keys(e);if(l=f.length,b.keys(t).length!==l)return!1;for(;l--;)if(c=f[l],!S(t,c)||!U(e[c],t[c],n,r))return!1}return n.pop(),r.pop(),!0},b.isEqual=function(e,t){return U(e,t)},b.isEmpty=function(e){return null==e||(C(e)&&(b.isArray(e)||b.isString(e)||b.isArguments(e))?0===e.length:0===b.keys(e).length)},b.isElement=function(e){return!(!e||1!==e.nodeType)},b.isArray=p||function(e){return"[object Array]"===d.call(e)},b.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},b.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],(function(e){b["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}})),b.isArguments(arguments)||(b.isArguments=function(e){return S(e,"callee")});var $=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof $&&(b.isFunction=function(e){return"function"==typeof e||!1}),b.isFinite=function(e){return!b.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},b.isNaN=function(e){return b.isNumber(e)&&isNaN(e)},b.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===d.call(e)},b.isNull=function(e){return null===e},b.isUndefined=function(e){return void 0===e},b.has=function(e,t){if(!b.isArray(t))return S(e,t);for(var n=t.length,r=0;r<n;r++){var i=t[r];if(null==e||!f.call(e,i))return!1;e=e[i]}return!!n},b.noConflict=function(){return i._=a,this},b.identity=function(e){return e},b.constant=function(e){return function(){return e}},b.noop=function(){},b.property=function(e){return b.isArray(e)?function(t){return A(t,e)}:I(e)},b.propertyOf=function(e){return null==e?function(){}:function(t){return b.isArray(t)?A(e,t):e[t]}},b.matcher=b.matches=function(e){return e=b.extendOwn({},e),function(t){return b.isMatch(t,e)}},b.times=function(e,t,n){var r=Array(Math.max(0,e));t=_(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},b.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},b.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},H=b.invert(F),G=function(e){var t=function(t){return e[t]},n="(?:"+b.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};b.escape=G(F),b.unescape=G(H),b.result=function(e,t,n){b.isArray(t)||(t=[t]);var r=t.length;if(!r)return b.isFunction(n)?n.call(e):n;for(var i=0;i<r;i++){var a=null==e?void 0:e[t[i]];void 0===a&&(a=n,i=r),e=b.isFunction(a)?a.call(e):a}return e};var Y=0;b.uniqueId=function(e){var t=++Y+"";return e?e+t:t},b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Q=/(.)^/,Z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},K=/\\|'|\r|\n|\u2028|\u2029/g,W=function(e){return"\\"+Z[e]};b.template=function(e,t,n){!t&&n&&(t=n),t=b.defaults({},t,b.templateSettings);var r,i=RegExp([(t.escape||Q).source,(t.interpolate||Q).source,(t.evaluate||Q).source].join("|")+"|$","g"),a=0,s="__p+='";e.replace(i,(function(t,n,r,i,o){return s+=e.slice(a,o).replace(K,W),a=o+t.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?s+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(s+="';\n"+i+"\n__p+='"),t})),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{r=new Function(t.variable||"obj","_",s)}catch(e){throw e.source=s,e}var o=function(e){return r.call(this,e,b)},u=t.variable||"obj";return o.source="function("+u+"){\n"+s+"}",o},b.chain=function(e){var t=b(e);return t._chain=!0,t};var J=function(e,t){return e._chain?b(t).chain():t};b.mixin=function(e){return b.each(b.functions(e),(function(t){var n=b[t]=e[t];b.prototype[t]=function(){var e=[this._wrapped];return l.apply(e,arguments),J(this,n.apply(b,e))}})),b},b.mixin(b),b.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=s[e];b.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],J(this,n)}})),b.each(["concat","join","slice"],(function(e){var t=s[e];b.prototype[e]=function(){return J(this,t.apply(this._wrapped,arguments))}})),b.prototype.value=function(){return this._wrapped},b.prototype.valueOf=b.prototype.toJSON=b.prototype.value,b.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return b}.apply(t,[]))||(n.exports=r)}()}).call(this,n(4),n(22)(e))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!c){var e=o(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}i.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];l.push(new y(e,t)),1!==l.length||c||o(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(143),i=n(144);e.exports={errors:r,formatters:i}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";var r=t,i=n(3),a=n(8),s=n(108);r.assert=a,r.toArray=s.toArray,r.zero2=s.zero2,r.toHex=s.toHex,r.encode=s.encode,r.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,a=e.clone(),s=0;s<r.length;s++){var o,u=a.andln(i-1);a.isOdd()?(o=u>(i>>1)-1?(i>>1)-u:u,a.isubn(o)):o=0,r[s]=o,a.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0;e.cmpn(-r)>0||t.cmpn(-i)>0;){var a,s,o,u=e.andln(3)+r&3,l=t.andln(3)+i&3;if(3===u&&(u=-1),3===l&&(l=-1),0==(1&u))a=0;else a=3!==(o=e.andln(7)+r&7)&&5!==o||2!==l?u:-u;if(n[0].push(a),0==(1&l))s=0;else s=3!==(o=t.andln(7)+i&7)&&5!==o||2!==u?l:-l;n[1].push(s),2*r===a+1&&(r=1-r),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,n){var r=n(5),i=n(145),a=n(68),s=n(158),o=n(15),u=function(e,t){var n=[];return t.forEach((function(t){if("object"==typeof t.components){if("tuple"!==t.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var i="",a=t.type.indexOf("[");a>=0&&(i=t.type.substring(a));var s=u(e,t.components);r.isArray(s)&&e?n.push("tuple("+s.join(",")+")"+i):e?n.push("("+s+")"):n.push("("+s.join(",")+")"+i)}else n.push(t.type)})),n},l=function(e){if(!a.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);t+=String.fromCharCode(i)}return t},c=function(e){if(!e)return"0x00";for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n).toString(16);t+=r.length<2?"0"+r:r}return"0x"+t},d=function(e){if(e=e?e.toLowerCase():"ether",!i.unitMap[e])throw new Error('This unit "'+e+"\" doesn't exist, please use the one of the following units"+JSON.stringify(i.unitMap,null,2));return e};e.exports={_fireError:function(e,t,n,i,a){return!r.isObject(e)||e instanceof Error||!e.data||((r.isObject(e.data)||r.isArray(e.data))&&(e.data=JSON.stringify(e.data,null,2)),e=e.message+"\n"+e.data),r.isString(e)&&(e=new Error(e)),r.isFunction(i)&&i(e,a),r.isFunction(n)&&((t&&r.isFunction(t.listeners)&&t.listeners("error").length||r.isFunction(i))&&t.catch((function(){})),setTimeout((function(){n(e)}),1)),t&&r.isFunction(t.emit)&&setTimeout((function(){t.emit("error",e,a),t.removeAllListeners()}),1),t},_jsonInterfaceMethodToString:function(e){return r.isObject(e)&&e.name&&-1!==e.name.indexOf("(")?e.name:e.name+"("+u(!1,e.inputs).join(",")+")"},_flattenTypes:u,randomHex:function(e){return"0x"+o(e).toString("hex")},_:r,BN:a.BN,isBN:a.isBN,isBigNumber:a.isBigNumber,isHex:a.isHex,isHexStrict:a.isHexStrict,sha3:a.sha3,sha3Raw:a.sha3Raw,keccak256:a.sha3,soliditySha3:s.soliditySha3,soliditySha3Raw:s.soliditySha3Raw,isAddress:a.isAddress,checkAddressChecksum:a.checkAddressChecksum,toChecksumAddress:function(e){if(void 0===e)return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(e))throw new Error('Given address "'+e+'" is not a valid Ethereum address.');e=e.toLowerCase().replace(/^0x/i,"");for(var t=a.sha3(e).replace(/^0x/i,""),n="0x",r=0;r<e.length;r++)parseInt(t[r],16)>7?n+=e[r].toUpperCase():n+=e[r];return n},toHex:a.toHex,toBN:a.toBN,bytesToHex:a.bytesToHex,hexToBytes:a.hexToBytes,hexToNumberString:a.hexToNumberString,hexToNumber:a.hexToNumber,toDecimal:a.hexToNumber,numberToHex:a.numberToHex,fromDecimal:a.numberToHex,hexToUtf8:a.hexToUtf8,hexToString:a.hexToUtf8,toUtf8:a.hexToUtf8,utf8ToHex:a.utf8ToHex,stringToHex:a.utf8ToHex,fromUtf8:a.utf8ToHex,hexToAscii:l,toAscii:l,asciiToHex:c,fromAscii:c,unitMap:i.unitMap,toWei:function(e,t){if(t=d(t),!a.isBN(e)&&!r.isString(e))throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return a.isBN(e)?i.toWei(e,t):i.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=d(t),!a.isBN(e)&&!r.isString(e))throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return a.isBN(e)?i.fromWei(e,t):i.fromWei(e,t).toString(10)},padLeft:a.leftPad,leftPad:a.leftPad,padRight:a.rightPad,rightPad:a.rightPad,toTwosComplement:a.toTwosComplement,isBloom:a.isBloom,isUserEthereumAddressInBloom:a.isUserEthereumAddressInBloom,isContractAddressInBloom:a.isContractAddressInBloom,isTopic:a.isTopic,isTopicInBloom:a.isTopicInBloom,isInBloom:a.isInBloom}},function(e,t,n){"use strict";var r=n(8),i=n(0);function a(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):a(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=o(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=s(i)),n+=u(i.toString(16))}return n},t.zero2=o,t.zero8=u,t.join32=function(e,t,n,i){var a=n-t;r(a%4==0);for(var s=new Array(a/4),o=0,u=t;o<s.length;o++,u+=4){var l;l="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[o]=l>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var a=e[r];"big"===t?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0,s=(a<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=a},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,a,s,o){var u=0,l=t;return u+=(l=l+r>>>0)<t?1:0,u+=(l=l+a>>>0)<a?1:0,e+n+i+s+(u+=(l=l+o>>>0)<o?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,a,s,o){return t+r+a+o>>>0},t.sum64_5_hi=function(e,t,n,r,i,a,s,o,u,l){var c=0,d=t;return c+=(d=d+r>>>0)<t?1:0,c+=(d=d+a>>>0)<a?1:0,c+=(d=d+o>>>0)<o?1:0,e+n+i+s+u+(c+=(d=d+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,a,s,o,u,l){return t+r+a+o+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){var r=n(2).Buffer,i=n(26).Transform,a=n(48).StringDecoder;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(0)(s,i),s.prototype.update=function(e,t,n){"string"==typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.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)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=s},function(e,t,n){"use strict";var r=n(141).version,i=n(14),a=n(194),s=n(37),o=n(88),u=n(328),l=n(329),c=n(10),d=function(){var e=this;i.packageInit(this,arguments),this.version=r,this.utils=c,this.eth=new a(this),this.shh=new u(this),this.bzz=new l(this);var t=this.setProvider;this.setProvider=function(n,r){return t.apply(e,arguments),this.eth.setProvider(n,r),this.shh.setProvider(n,r),this.bzz.setProvider(n),!0}};d.version=r,d.utils=c,d.modules={Eth:a,Net:s,Personal:o,Shh:u,Bzz:l},i.addProviders(d),e.exports=d},function(e,t,n){"use strict";var r=n(142),i=n(190);e.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=new r.Manager(t[0].currentProvider):(e._requestManager=new r.Manager,e._requestManager.setProvider(t[0],t[1])),e.givenProvider=r.Manager.givenProvider,e.providers=r.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,n){return e._requestManager.setProvider(t,n),e._provider=e._requestManager.provider,!0}),e.BatchRequest=r.BatchManager.bind(null,e._requestManager),e.extend=i(e)},addProviders:function(e){e.givenProvider=r.Manager.givenProvider,e.providers=r.Manager.providers}}},function(e,t,n){"use strict";(function(t,r){var i=n(2).Buffer,a=t.crypto||t.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;s<e;s+=65536)a.getRandomValues(n.slice(s,s+65536));else a.getRandomValues(n);if("function"==typeof t)return r.nextTick((function(){t(null,n)}));return n}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,n(4),n(6))},function(e,t,n){"use strict";var r=n(34),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var a=Object.create(n(25));a.inherits=n(0);var s=n(74),o=n(46);a.inherits(d,s);for(var u=i(o.prototype),l=0;l<u.length;l++){var c=u[l];d.prototype[c]||(d.prototype[c]=o.prototype[c])}function d(e){if(!(this instanceof d))return new d(e);s.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(5),i=n(7).errors,a=n(7).formatters,s=n(10),o=n(35),u=n(36).subscriptions,l=function(e){if(!e.call||!e.name)throw new Error('When creating a method you need to provide at least the "name" and "call" property.');this.name=e.name,this.call=e.call,this.params=e.params||0,this.inputFormatter=e.inputFormatter,this.outputFormatter=e.outputFormatter,this.transformPayload=e.transformPayload,this.extraFormatters=e.extraFormatters,this.abiCoder=e.abiCoder,this.requestManager=e.requestManager,this.accounts=e.accounts,this.defaultBlock=e.defaultBlock||"latest",this.defaultAccount=e.defaultAccount||null,this.transactionBlockTimeout=e.transactionBlockTimeout||50,this.transactionConfirmationBlocks=e.transactionConfirmationBlocks||24,this.transactionPollingTimeout=e.transactionPollingTimeout||750,this.defaultCommon=e.defaultCommon,this.defaultChain=e.defaultChain,this.defaultHardfork=e.defaultHardfork,this.handleRevert=e.handleRevert};l.prototype.setRequestManager=function(e,t){this.requestManager=e,t&&(this.accounts=t)},l.prototype.createFunction=function(e,t){var n=this.buildCall();return n.call=this.call,this.setRequestManager(e||this.requestManager,t||this.accounts),n},l.prototype.attachToObject=function(e){var t=this.buildCall();t.call=this.call;var n=this.name.split(".");n.length>1?(e[n[0]]=e[n[0]]||{},e[n[0]][n[1]]=t):e[n[0]]=t},l.prototype.getCall=function(e){return r.isFunction(this.call)?this.call(e):this.call},l.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},l.prototype.validateArgs=function(e){if(e.length!==this.params)throw i.InvalidNumberOfParams(e.length,this.params,this.name)},l.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map((function(n,r){return n?n.call(t,e[r]):e[r]})):e},l.prototype.formatOutput=function(e){var t=this;return r.isArray(e)?e.map((function(e){return t.outputFormatter&&e?t.outputFormatter(e):e})):this.outputFormatter&&e?this.outputFormatter(e):e},l.prototype.toPayload=function(e){var t=this.getCall(e),n=this.extractCallback(e),r=this.formatInput(e);this.validateArgs(r);var i={method:t,params:r,callback:n};return this.transformPayload&&(i=this.transformPayload(i)),i},l.prototype._confirmTransaction=function(e,t,n){var c=this,d=!1,f=!0,p=0,y=0,h=null,m=null,b=r.isObject(n.params[0])&&n.params[0].gas?n.params[0].gas:null,g=r.isObject(n.params[0])&&n.params[0].data&&n.params[0].from&&!n.params[0].to,_=g&&n.params[0].data.length>2,v=[new l({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[a.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:a.outputBlockFormatter}),new l({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:a.outputTransactionReceiptFormatter}),new l({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[a.inputAddressFormatter,a.inputDefaultBlockNumberFormatter]}),new u({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:a.outputBlockFormatter}}})],w={};r.each(v,(function(e){e.attachToObject(w),e.requestManager=c.requestManager}));var T=function(r,a,u,l,v){if(!u)return v||(v={unsubscribe:function(){clearInterval(h)}}),(r?o.resolve(r):w.getTransactionReceipt(t)).catch((function(t){v.unsubscribe(),d=!0,s._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)})).then((async function(t){if(!t||!t.blockHash)throw new Error("Receipt missing or blockHash null");var n;(c.extraFormatters&&c.extraFormatters.receiptFormatter&&(t=c.extraFormatters.receiptFormatter(t)),e.eventEmitter.listeners("confirmation").length>0)&&(void 0!==r&&0===y||(a?m?(n=await w.getBlockByNumber(m.number+1))&&(m=n,e.eventEmitter.emit("confirmation",y,t)):(n=await w.getBlockByNumber(t.blockNumber),m=n,e.eventEmitter.emit("confirmation",y,t)):e.eventEmitter.emit("confirmation",y,t)),(a&&n||!a)&&y++,f=!1,y===c.transactionConfirmationBlocks+1&&(v.unsubscribe(),e.eventEmitter.removeAllListeners()));return t})).then((async function(t){if(g&&!d){if(!t.contractAddress)return f&&(v.unsubscribe(),d=!0),void s._fireError(i.NoContractAddressFoundError(t),e.eventEmitter,e.reject,null,t);var n;try{n=await w.getCode(t.contractAddress)}catch(e){}if(!n)return;!0===t.status&&_||n.length>2?(e.eventEmitter.emit("receipt",t),c.extraFormatters&&c.extraFormatters.contractDeployFormatter?e.resolve(c.extraFormatters.contractDeployFormatter(t)):e.resolve(t),f&&e.eventEmitter.removeAllListeners()):s._fireError(i.ContractCodeNotStoredError(t),e.eventEmitter,e.reject,null,t),f&&v.unsubscribe(),d=!0}return t})).then((async function(t){if(!g&&!d){if(t.outOfGas||b&&b===t.gasUsed||!0!==t.status&&"0x1"!==t.status&&void 0!==t.status)if(JSON.stringify(t,null,2),!1===t.status||"0x0"===t.status)try{var r=null;if(!c.handleRevert||"eth_sendTransaction"!==c.call)throw!1;if(!(r=await c.getRevertReason(n.params[0],t.blockNumber)))throw!1;s._fireError(i.TransactionRevertInstructionError(r.reason,r.signature,t),e.eventEmitter,e.reject,null,t)}catch(n){s._fireError(i.TransactionRevertedWithoutReasonError(t),e.eventEmitter,e.reject,null,t)}else s._fireError(i.TransactionOutOfGasError(t),e.eventEmitter,e.reject,null,t);else e.eventEmitter.emit("receipt",t),e.resolve(t),f&&e.eventEmitter.removeAllListeners();f&&v.unsubscribe(),d=!0}})).catch((function(){p++,a?p-1>=c.transactionPollingTimeout&&(v.unsubscribe(),d=!0,s._fireError(i.TransactionError("Transaction was not mined within "+c.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):p-1>=c.transactionBlockTimeout&&(v.unsubscribe(),d=!0,s._fireError(i.TransactionError("Transaction was not mined within "+c.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))}));v.unsubscribe(),d=!0,s._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:u},e.eventEmitter,e.reject)},I=function(e){r.isFunction(this.requestManager.provider.on)?w.subscribe("newBlockHeaders",T.bind(null,e,!1)):h=setInterval(T.bind(null,e,!0),1e3)}.bind(this);w.getTransactionReceipt(t).then((function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&I(t),T(t,!1)):d||I()})).catch((function(){d||I()}))};var c=function(e,t){return r.isNumber(e)?t.wallet[e]:r.isObject(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};l.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,n="eth_call"===e.call,a=function(){var a=o(!t),u=e.toPayload(Array.prototype.slice.call(arguments)),d=function(r,o){if(e.handleRevert&&!r&&n&&e.isRevertReasonString(o)&&e.abiCoder){var l=e.abiCoder.decodeParameter("string","0x"+o.substring(10));s._fireError(i.RevertInstructionError(l,"Error(String)"),a.eventEmitter,a.reject,u.callback,{reason:l,signature:"Error(String)"})}else{try{o=e.formatOutput(o)}catch(e){r=e}if(o instanceof Error&&(r=o),r)return r.error&&(r=r.error),s._fireError(r,a.eventEmitter,a.reject,u.callback);u.callback&&u.callback(null,o),t?(a.eventEmitter.emit("transactionHash",o),e._confirmTransaction(a,o,u)):r||a.resolve(o)}},f=function(t){var n=r.extend({},u,{method:"eth_sendRawTransaction",params:[t.rawTransaction]});e.requestManager.send(n,d)},p=function(e,t){var n;if(t&&t.accounts&&t.accounts.wallet&&t.accounts.wallet.length)if("eth_sendTransaction"===e.method){var i=e.params[0];if((n=c(r.isObject(i)?i.from:null,t.accounts))&&n.privateKey){var s=r.omit(i,"from");return t.defaultChain&&!s.chain&&(s.chain=t.defaultChain),t.defaultHardfork&&!s.hardfork&&(s.hardfork=t.defaultHardfork),t.defaultCommon&&!s.common&&(s.common=t.defaultCommon),t.accounts.signTransaction(s,n.privateKey).then(f).catch((function(e){r.isFunction(a.eventEmitter.listeners)&&a.eventEmitter.listeners("error").length&&(a.eventEmitter.emit("error",e),a.eventEmitter.removeAllListeners(),a.eventEmitter.catch((function(){}))),a.reject(e)}))}}else if("eth_sign"===e.method){var o=e.params[1];if((n=c(e.params[0],t.accounts))&&n.privateKey){var u=t.accounts.sign(o,n.privateKey);return e.callback&&e.callback(null,u.signature),void a.resolve(u.signature)}}return t.requestManager.send(e,d)};if(t&&r.isObject(u.params[0])&&void 0===u.params[0].gasPrice){var y=new l({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(e.requestManager);y((function(t,n){n&&(u.params[0].gasPrice=n),p(u,e)}))}else p(u,e);return a.eventEmitter};return a.method=e,a.request=this.request.bind(this),a},l.prototype.getRevertReason=function(e,t){var n=this;return new Promise((function(r,i){new l({name:"call",call:"eth_call",params:2,abiCoder:n.abiCoder,handleRevert:!0}).createFunction(n.requestManager)(e,s.numberToHex(t)).then((function(){r(!1)})).catch((function(e){e.reason?r({reason:e.reason,signature:e.signature}):i(e)}))}))},l.prototype.isRevertReasonString=function(e){return r.isString(e)&&(e.length-2)/2%32==4&&"0x08c379a0"===e.substring(0,10)},l.prototype.request=function(){var e=this.toPayload(Array.prototype.slice.call(arguments));return e.format=this.formatOutput.bind(this),e},e.exports=l},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(15),t.createHash=t.Hash=n(19),t.createHmac=t.Hmac=n(92);var r=n(222),i=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return a};var s=n(95);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var o=n(224);t.Cipher=o.Cipher,t.createCipher=o.createCipher,t.Cipheriv=o.Cipheriv,t.createCipheriv=o.createCipheriv,t.Decipher=o.Decipher,t.createDecipher=o.createDecipher,t.Decipheriv=o.Decipheriv,t.createDecipheriv=o.createDecipheriv,t.getCiphers=o.getCiphers,t.listCiphers=o.listCiphers;var u=n(239);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var l=n(243);t.createSign=l.createSign,t.Sign=l.Sign,t.createVerify=l.createVerify,t.Verify=l.Verify,t.createECDH=n(277);var c=n(278);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var d=n(281);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,n){"use strict";var r=n(0),i=n(51),a=n(52),s=n(53),o=n(12);function u(e){o.call(this,"digest"),this._hash=e}r(u,o),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new a:new u(s(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84),i=n(38);function a(e){return e instanceof r.BigNumber}function s(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return new Uint8Array(Array.prototype.slice.apply(e,t))}),e}function o(e){if(!e||parseInt(String(e.length))!=e.length||"string"==typeof e)return!1;for(var t=0;t<e.length;t++){var n=e[t];if(n<0||n>=256||parseInt(String(n))!=n)return!1}return!0}function u(e){if(null==e&&i.throwError("cannot convert null value to array",i.INVALID_ARGUMENT,{arg:"value",value:e}),a(e)&&(e=e.toHexString()),"string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);t||i.throwError("invalid hexidecimal string",i.INVALID_ARGUMENT,{arg:"value",value:e}),"0x"!==t[1]&&i.throwError("hex string must have 0x prefix",i.INVALID_ARGUMENT,{arg:"value",value:e}),(e=e.substring(2)).length%2&&(e="0"+e);for(var n=[],r=0;r<e.length;r+=2)n.push(parseInt(e.substr(r,2),16));return s(new Uint8Array(n))}return o(e)?s(new Uint8Array(e)):(i.throwError("invalid arrayify value",null,{arg:"value",value:e,type:typeof e}),null)}function l(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=u(e[r]);t.push(i),n+=i.length}var a=new Uint8Array(n),o=0;for(r=0;r<t.length;r++)a.set(t[r],o),o+=t[r].length;return s(a)}function c(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}t.AddressZero="0x0000000000000000000000000000000000000000",t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000",t.isArrayish=o,t.arrayify=u,t.concat=l,t.stripZeros=function(e){var t=u(e);if(0===t.length)return t;for(var n=0;0===t[n];)n++;return n&&(t=t.slice(n)),t},t.padZeros=function(e,t){if(t<(e=u(e)).length)throw new Error("cannot pad");var n=new Uint8Array(t);return n.set(e,t-e.length),s(n)},t.isHexString=c;function d(e){if(a(e))return e.toHexString();if("number"==typeof e){e<0&&i.throwError("cannot hexlify negative value",i.INVALID_ARGUMENT,{arg:"value",value:e});for(var t="";e;)t="0123456789abcdef"[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("string"==typeof e){var n=e.match(/^(0x)?[0-9a-fA-F]*$/);return n||i.throwError("invalid hexidecimal string",i.INVALID_ARGUMENT,{arg:"value",value:e}),"0x"!==n[1]&&i.throwError("hex string must have 0x prefix",i.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2&&(e="0x0"+e.substring(2)),e}if(o(e)){for(var r=[],s=0;s<e.length;s++){var u=e[s];r.push("0123456789abcdef"[(240&u)>>4]+"0123456789abcdef"[15&u])}return"0x"+r.join("")}return i.throwError("invalid hexlify value",null,{arg:"value",value:e}),"never"}function f(e,t){for(c(e)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:e});e.length<2*t+2;)e="0x0"+e.substring(2);return e}function p(e){var t,n=0,r="0x",a="0x";if((t=e)&&null!=t.r&&null!=t.s){null==e.v&&null==e.recoveryParam&&i.throwError("at least on of recoveryParam or v must be specified",i.INVALID_ARGUMENT,{argument:"signature",value:e}),r=f(e.r,32),a=f(e.s,32),"string"==typeof(n=e.v)&&(n=parseInt(n,16));var s=e.recoveryParam;null==s&&null!=e.v&&(s=1-n%2),n=27+s}else{var o=u(e);if(65!==o.length)throw new Error("invalid signature");r=d(o.slice(0,32)),a=d(o.slice(32,64)),27!==(n=o[64])&&28!==n&&(n=27+n%2)}return{r:r,s:a,recoveryParam:n-27,v:n}}t.hexlify=d,t.hexDataLength=function(e){return c(e)&&e.length%2==0?(e.length-2)/2:null},t.hexDataSlice=function(e,t,n){return c(e)||i.throwError("invalid hex data",i.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2!=0&&i.throwError("hex data length must be even",i.INVALID_ARGUMENT,{arg:"value",value:e}),t=2+2*t,null!=n?"0x"+e.substring(t,t+2*n):"0x"+e.substring(t)},t.hexStripZeros=function(e){for(c(e)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:e});e.length>3&&"0x0"===e.substring(0,3);)e="0x"+e.substring(3);return e},t.hexZeroPad=f,t.splitSignature=p,t.joinSignature=function(e){return d(l([(e=p(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,n){var r=n(2).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,a=e.length,s=this._len,o=0;o<a;){for(var u=s%i,l=Math.min(a-o,i-u),c=0;c<l;c++)n[u+c]=e[o+c];o+=l,(s+=l)%i==0&&this._update(n)}return this._len+=a,this},i.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=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(71),i=n(166);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=_,t.resolve=function(e,t){return _(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?_(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=_(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var s=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),d=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=n(167);function _(e,t,n){if(e&&i.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),o=-1!==a&&a<e.indexOf("#")?"?":"#",l=e.split(o);l[0]=l[0].replace(/\\/g,"/");var _=e=l.join(o);if(_=_.trim(),!n&&1===e.split("#").length){var v=u.exec(_);if(v)return this.path=_,this.href=_,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?g.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=s.exec(_);if(w){var T=(w=w[0]).toLowerCase();this.protocol=T,_=_.substr(w.length)}if(n||w||_.match(/^\/\/[^@\/]+@[^@\/]+/)){var I="//"===_.substr(0,2);!I||w&&m[w]||(_=_.substr(2),this.slashes=!0)}if(!m[w]&&(I||w&&!b[w])){for(var S,A,D=-1,E=0;E<f.length;E++){-1!==(C=_.indexOf(f[E]))&&(-1===D||C<D)&&(D=C)}-1!==(A=-1===D?_.lastIndexOf("@"):_.lastIndexOf("@",D))&&(S=_.slice(0,A),_=_.slice(A+1),this.auth=decodeURIComponent(S)),D=-1;for(E=0;E<d.length;E++){var C;-1!==(C=_.indexOf(d[E]))&&(-1===D||C<D)&&(D=C)}-1===D&&(D=_.length),this.host=_.slice(0,D),_=_.slice(D),this.parseHost(),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x)for(var M=this.hostname.split(/\./),k=(E=0,M.length);E<k;E++){var N=M[E];if(N&&!N.match(p)){for(var P="",L=0,R=N.length;L<R;L++)N.charCodeAt(L)>127?P+="x":P+=N[L];if(!P.match(p)){var O=M.slice(0,E),B=M.slice(E+1),j=N.match(y);j&&(O.push(j[1]),B.unshift(j[2])),B.length&&(_="/"+B.join(".")+_),this.hostname=O.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=r.toASCII(this.hostname));var V=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+V,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!h[T])for(E=0,k=c.length;E<k;E++){var z=c[E];if(-1!==_.indexOf(z)){var q=encodeURIComponent(z);q===z&&(q=escape(z)),_=_.split(z).join(q)}}var $=_.indexOf("#");-1!==$&&(this.hash=_.substr($),_=_.slice(0,$));var F=_.indexOf("?");if(-1!==F?(this.search=_.substr(F),this.query=_.substr(F+1),t&&(this.query=g.parse(this.query)),_=_.slice(0,F)):t&&(this.search="",this.query={}),_&&(this.pathname=_),b[T]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){V=this.pathname||"";var H=this.search||"";this.path=V+H}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,s="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=g.stringify(this.query));var o=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||b[t])&&!1!==a?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),o&&"?"!==o.charAt(0)&&(o="?"+o),t+a+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(o=o.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(_(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(i.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var n=new a,r=Object.keys(this),s=0;s<r.length;s++){var o=r[s];n[o]=this[o]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),l=0;l<u.length;l++){var c=u[l];"protocol"!==c&&(n[c]=e[c])}return b[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!b[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){var p=d[f];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||m[e.protocol])n.pathname=e.pathname;else{for(var y=(e.pathname||"").split("/");y.length&&!(e.host=y.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==y[0]&&y.unshift(""),y.length<2&&y.unshift(""),n.pathname=y.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var h=n.pathname||"",g=n.search||"";n.path=h+g}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var _=n.pathname&&"/"===n.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=v||_||n.host&&e.pathname,T=w,I=n.pathname&&n.pathname.split("/")||[],S=(y=e.pathname&&e.pathname.split("/")||[],n.protocol&&!b[n.protocol]);if(S&&(n.hostname="",n.port=null,n.host&&(""===I[0]?I[0]=n.host:I.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===y[0]?y[0]=e.host:y.unshift(e.host)),e.host=null),w=w&&(""===y[0]||""===I[0])),v)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,I=y;else if(y.length)I||(I=[]),I.pop(),I=I.concat(y),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(S)n.hostname=n.host=I.shift(),(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!I.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var A=I.slice(-1)[0],D=(n.host||e.host||I.length>1)&&("."===A||".."===A)||""===A,E=0,C=I.length;C>=0;C--)"."===(A=I[C])?I.splice(C,1):".."===A?(I.splice(C,1),E++):E&&(I.splice(C,1),E--);if(!w&&!T)for(;E--;E)I.unshift("..");!w||""===I[0]||I[0]&&"/"===I[0].charAt(0)||I.unshift(""),D&&"/"!==I.join("/").substr(-1)&&I.push("");var x,M=""===I[0]||I[0]&&"/"===I[0].charAt(0);S&&(n.hostname=n.host=M?"":I.length?I.shift():"",(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift()));return(w=w||n.host&&I.length)&&!M&&I.unshift(""),I.length?n.pathname=I.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(t=e.exports=n(74)).Stream=t,t.Readable=t,t.Writable=n(46),t.Duplex=n(16),t.Transform=n(77),t.PassThrough=n(180)},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(1).Buffer)},function(e,t,n){e.exports=i;var r=n(44).EventEmitter;function i(){r.call(this)}n(0)(i,r),i.Readable=n(24),i.Writable=n(213),i.Duplex=n(214),i.Transform=n(215),i.PassThrough=n(216),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",o),n.on("close",u));var s=!1;function o(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",o),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t,n){(function(t){e.exports=function(e,n){for(var r=Math.min(e.length,n.length),i=new t(r),a=0;a<r;++a)i[a]=e[a]^n[a];return i}}).call(this,n(1).Buffer)},function(e,t,n){"use strict";var r=t;r.version=n(245).version,r.utils=n(9),r.rand=n(57),r.curve=n(109),r.curves=n(59),r.ec=n(256),r.eddsa=n(260)},function(e,t,n){"use strict";var r=n(11),i=n(8);function a(){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}t.BlockHash=a,a.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},a.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},a.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 i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r}},function(e,t,n){var r=t;r.bignum=n(3),r.define=n(264).define,r.base=n(31),r.constants=n(114),r.decoders=n(269),r.encoders=n(271)},function(e,t,n){var r=t;r.Reporter=n(266).Reporter,r.DecoderBuffer=n(113).DecoderBuffer,r.EncoderBuffer=n(113).EncoderBuffer,r.Node=n(267)},function(e,t,n){"use strict";(function(t){var r=n(67),i=n(66);function a(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function s(e){return"0x"+e.toString(16)}e.exports={arrayContainsArray:function(e,t,n){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(n)?"some":"every"]((function(t){return e.indexOf(t)>=0}))},intToBuffer:function(e){var n=s(e);return new t(a(n.slice(2)),"hex")},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return t.byteLength(e,"utf8")},isHexPrefixed:r,stripHexPrefix:i,padToEven:a,intToHex:s,fromAscii:function(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n).toString(16);t+=r.length<2?"0"+r:r}return"0x"+t},fromUtf8:function(e){return"0x"+a(new t(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(e){var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);t+=String.fromCharCode(i)}return t},toUtf8:function(e){return new t(a(i(e).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(e,t,n){if(!Array.isArray(e))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof e+"'");if("string"!=typeof t)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof t+"'.");for(var r=[],i=0;i<e.length;i++){var a=e[i][t];if(n&&!a)a="";else if("string"!=typeof a)throw new Error("invalid abi");r.push(a)}return r},isHexString:function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}}}).call(this,n(1).Buffer)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(32),i=n(3);t.zeros=function(t){return e.allocUnsafe(t).fill(0)},t.setLengthLeft=function(e,n,r){void 0===r&&(r=!1);var i=t.zeros(n);return e=t.toBuffer(e),r?e.length<n?(e.copy(i),i):e.slice(0,n):e.length<n?(e.copy(i,n-e.length),i):e.slice(-n)},t.setLength=t.setLengthLeft,t.setLengthRight=function(e,n){return t.setLength(e,n,!0)},t.unpad=function(e){for(var t=(e=r.stripHexPrefix(e))[0];e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"==typeof t){if(!r.isHexString(t))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+t);t=e.from(r.padToEven(r.stripHexPrefix(t)),"hex")}else if("number"==typeof t)t=r.intToBuffer(t);else if(null==t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}return t},t.bufferToInt=function(e){return new i(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new i(e).fromTwos(256)},t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||r.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(n){if(e.isBuffer(n))return"0x"+n.toString("hex");if(n instanceof Array){for(var r=[],i=0;i<n.length;i++)r.push(t.baToJSON(n[i]));return r}}}).call(this,n(1).Buffer)},function(e,t,n){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,s,o=arguments.length;switch(o){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(a=new Array(o-1),s=0;s<a.length;)a[s++]=arguments[s];return t.nextTick((function(){e.apply(null,a)}))}}}:e.exports=t}).call(this,n(6))},function(e,t,n){"use strict";var r=n(80),i=n(81),a=function(e){var t,n,a=new i((function(){t=arguments[0],n=arguments[1]}));if(e)return{resolve:t,reject:n,eventEmitter:a};var s=new r;return a._events=s._events,a.emit=s.emit,a.on=s.on,a.once=s.once,a.off=s.off,a.listeners=s.listeners,a.addListener=s.addListener,a.removeListener=s.removeListener,a.removeAllListeners=s.removeAllListeners,{resolve:t,reject:n,eventEmitter:a}};a.resolve=function(e){var t=a(!0);return t.resolve(e),t.eventEmitter},e.exports=a},function(e,t,n){"use strict";var r=n(193),i=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.attachToObject=function(e){var t=this.buildCall(),n=this.name.split(".");n.length>1?(e[n[0]]=e[n[0]]||{},e[n[0]][n[1]]=t):e[n[0]]=t},i.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new r({subscription:e.subscriptions[arguments[0]],requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},e.exports={subscriptions:i,subscription:r}},function(e,t,n){"use strict";var r=n(14),i=n(17),a=n(10),s=function(){var e=this;r.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:a.hexToNumber})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};r.addProviders(s),e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.MISSING_NEW="MISSING_NEW",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.NUMERIC_FAULT="NUMERIC_FAULT",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION";var r=!1,i=!1;function a(e,n,r){if(i)throw new Error("unknown error");n||(n=t.UNKNOWN_ERROR),r||(r={});var a=[];Object.keys(r).forEach((function(e){try{a.push(e+"="+JSON.stringify(r[e]))}catch(t){a.push(e+"="+JSON.stringify(r[e].toString()))}}));var s=e;a.length&&(e+=" ("+a.join(", ")+")");var o=new Error(e);throw o.reason=s,o.code=n,Object.keys(r).forEach((function(e){o[e]=r[e]})),o}t.throwError=a,t.checkNew=function(e,n){e instanceof n||a("missing new",t.MISSING_NEW,{name:n.name})},t.checkArgumentCount=function(e,n,r){r||(r=""),e<n&&a("missing argument"+r,t.MISSING_ARGUMENT,{count:e,expectedCount:n}),e>n&&a("too many arguments"+r,t.UNEXPECTED_ARGUMENT,{count:e,expectedCount:n})},t.setCensorship=function(e,n){r&&a("error censorship permanent",t.UNSUPPORTED_OPERATION,{operation:"setCersorship"}),i=!!e,r=!!n}},function(e,t,n){var r=n(2).Buffer;function i(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,n=new Array(t),i=0;i<t;i++)n[i]=e.readUInt32BE(4*i);return n}function a(e){for(;0<e.length;e++)e[0]=0}function s(e,t,n,r,i){for(var a,s,o,u,l=n[0],c=n[1],d=n[2],f=n[3],p=e[0]^t[0],y=e[1]^t[1],h=e[2]^t[2],m=e[3]^t[3],b=4,g=1;g<i;g++)a=l[p>>>24]^c[y>>>16&255]^d[h>>>8&255]^f[255&m]^t[b++],s=l[y>>>24]^c[h>>>16&255]^d[m>>>8&255]^f[255&p]^t[b++],o=l[h>>>24]^c[m>>>16&255]^d[p>>>8&255]^f[255&y]^t[b++],u=l[m>>>24]^c[p>>>16&255]^d[y>>>8&255]^f[255&h]^t[b++],p=a,y=s,h=o,m=u;return a=(r[p>>>24]<<24|r[y>>>16&255]<<16|r[h>>>8&255]<<8|r[255&m])^t[b++],s=(r[y>>>24]<<24|r[h>>>16&255]<<16|r[m>>>8&255]<<8|r[255&p])^t[b++],o=(r[h>>>24]<<24|r[m>>>16&255]<<16|r[p>>>8&255]<<8|r[255&y])^t[b++],u=(r[m>>>24]<<24|r[p>>>16&255]<<16|r[y>>>8&255]<<8|r[255&h])^t[b++],[a>>>=0,s>>>=0,o>>>=0,u>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,u=0;u<256;++u){var l=o^o<<1^o<<2^o<<3^o<<4;l=l>>>8^255&l^99,n[s]=l,r[l]=s;var c=e[s],d=e[c],f=e[d],p=257*e[l]^16843008*l;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*f^65537*d^257*c^16843008*s,a[0][l]=p<<24|p>>>8,a[1][l]=p<<16|p>>>16,a[2][l]=p<<8|p>>>24,a[3][l]=p,0===s?s=o=1:(s=c^e[e[e[f^c]]],o^=e[e[o]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:a}}();function l(e){this._key=i(e),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],a=0;a<t;a++)i[a]=e[a];for(a=t;a<r;a++){var s=i[a-1];a%t==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=o[a/t|0]<<24):t>6&&a%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[a]=i[a-t]^s}for(var l=[],c=0;c<r;c++){var d=r-c,f=i[d-(c%4?0:4)];l[c]=c<4||d<=4?f:u.INV_SUB_MIX[0][u.SBOX[f>>>24]]^u.INV_SUB_MIX[1][u.SBOX[f>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[f>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&f]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},l.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},l.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(n[0],0),a.writeUInt32BE(n[3],4),a.writeUInt32BE(n[2],8),a.writeUInt32BE(n[1],12),a},l.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},e.exports.AES=l},function(e,t,n){var r=n(2).Buffer,i=n(51);e.exports=function(e,t,n,a){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=n/8,o=r.alloc(s),u=r.alloc(a||0),l=r.alloc(0);s>0||a>0;){var c=new i;c.update(l),c.update(e),t&&c.update(t),l=c.digest();var d=0;if(s>0){var f=o.length-s;d=Math.min(s,l.length),l.copy(o,f,0,d),s-=d}if(d<l.length&&a>0){var p=u.length-a,y=Math.min(a,l.length-d);l.copy(u,p,d,d+y),a-=y}}return l.fill(0),{key:o,iv:u}}},function(e,t,n){"use strict";var r=n(3),i=n(9),a=i.getNAF,s=i.getJSF,o=i.assert;function u(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),this._bitLength=this.n?this.n.bitLength():0;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))}function l(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){o(e.precomputed);var n=e._getDoubles(),r=a(t,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;for(var s=[],u=0;u<r.length;u+=n.step){var l=0;for(t=u+n.step-1;t>=u;t--)l=(l<<1)+r[t];s.push(l)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=i;f>0;f--){for(u=0;u<s.length;u++){(l=s[u])===f?d=d.mixedAdd(n.points[u]):l===-f&&(d=d.mixedAdd(n.points[u].neg()))}c=c.add(d)}return c.toP()},u.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,s=a(t,n,this._bitLength),u=this.jpoint(null,null,null),l=s.length-1;l>=0;l--){for(t=0;l>=0&&0===s[l];l--)t++;if(l>=0&&t++,u=u.dblp(t),l<0)break;var c=s[l];o(0!==c),u="affine"===e.type?c>0?u.mixedAdd(i[c-1>>1]):u.mixedAdd(i[-c-1>>1].neg()):c>0?u.add(i[c-1>>1]):u.add(i[-c-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,n,r,i){for(var o=this._wnafT1,u=this._wnafT2,l=this._wnafT3,c=0,d=0;d<r;d++){var f=(A=t[d])._getNAFPoints(e);o[d]=f.wnd,u[d]=f.points}for(d=r-1;d>=1;d-=2){var p=d-1,y=d;if(1===o[p]&&1===o[y]){var h=[t[p],null,null,t[y]];0===t[p].y.cmp(t[y].y)?(h[1]=t[p].add(t[y]),h[2]=t[p].toJ().mixedAdd(t[y].neg())):0===t[p].y.cmp(t[y].y.redNeg())?(h[1]=t[p].toJ().mixedAdd(t[y]),h[2]=t[p].add(t[y].neg())):(h[1]=t[p].toJ().mixedAdd(t[y]),h[2]=t[p].toJ().mixedAdd(t[y].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=s(n[p],n[y]);c=Math.max(b[0].length,c),l[p]=new Array(c),l[y]=new Array(c);for(var g=0;g<c;g++){var _=0|b[0][g],v=0|b[1][g];l[p][g]=m[3*(_+1)+(v+1)],l[y][g]=0,u[p]=h}}else l[p]=a(n[p],o[p],this._bitLength),l[y]=a(n[y],o[y],this._bitLength),c=Math.max(l[p].length,c),c=Math.max(l[y].length,c)}var w=this.jpoint(null,null,null),T=this._wnafT4;for(d=c;d>=0;d--){for(var I=0;d>=0;){var S=!0;for(g=0;g<r;g++)T[g]=0|l[g][d],0!==T[g]&&(S=!1);if(!S)break;I++,d--}if(d>=0&&I++,w=w.dblp(I),d<0)break;for(g=0;g<r;g++){var A,D=T[g];0!==D&&(D>0?A=u[g][D-1>>1]:D<0&&(A=u[g][-D-1>>1].neg()),w="affine"===A.type?w.mixedAdd(A):w.add(A))}}for(d=0;d<r;d++)u[d]=null;return i?w:w.toP()},u.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?o(e[e.length-1]%2==0):7===e[0]&&o(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(e){return this.encode(e,!0)},l.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},l.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},l.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},l.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},l.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)r=r.dbl();n.push(r)}return{step:e,points:n}},l.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},l.prototype._getBeta=function(){return null},l.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}},function(e,t,n){var r=n(263),i=n(274),a=n(275),s=n(55),o=n(95),u=n(2).Buffer;function l(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var n,l,c=a(e,t),d=c.tag,f=c.data;switch(d){case"CERTIFICATE":l=r.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(l||(l=r.PublicKey.decode(f,"der")),n=l.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=r.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+d);case"ENCRYPTED PRIVATE KEY":f=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=i[e.algorithm.decrypt.cipher.algo.join(".")],l=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,d=parseInt(a.split("-")[1],10)/8,f=o.pbkdf2Sync(t,n,r,d,"sha1"),p=s.createDecipheriv(a,f,l),y=[];return y.push(p.update(c)),y.push(p.final()),u.concat(y)}(f=r.EncryptedPrivateKey.decode(f,"der"),t);case"PRIVATE KEY":switch(n=(l=r.PrivateKey.decode(f,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:r.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=r.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+d);case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return{curve:(f=r.ECPrivateKey.decode(f,"der")).parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+d)}}e.exports=l,l.signature=r.signature},function(e,t,n){(function(e){var r=n(173),i=n(73),a=n(78),s=n(182),o=n(23),u=t;u.request=function(t,n){t="string"==typeof t?o.parse(t):a(t);var i=-1===e.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||i,u=t.hostname||t.host,l=t.port,c=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?s+"//"+u:"")+(l?":"+l:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new r(t);return n&&d.on("response",n),d},u.get=function(e,t){var n=u.request(e,t);return n.end(),n},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(4))},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var u=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a,s,o;if(l(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]),void 0===s)s=a[t]=n,++e._eventsCount;else if("function"==typeof s?s=a[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,o=u,console&&console.warn&&console.warn(o)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function y(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var l=u.length,c=m(u,l);for(n=0;n<l;++n)a(c[n],this,t)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,a,s;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return y(this,e,!0)},o.prototype.rawListeners=function(e){return y(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(1),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=s),a(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t,r,i){var a=n(34);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var o,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:a.nextTick;g.WritableState=b;var l=Object.create(n(25));l.inherits=n(0);var c={deprecate:n(179)},d=n(75),f=n(45).Buffer,p=i.Uint8Array||function(){};var y,h=n(76);function m(){}function b(e,t){o=o||n(16),e=e||{};var r=t instanceof o;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(l||0===l)?l:c,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 d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(a.nextTick(i,r),a.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,n,r,t,i);else{var s=T(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),r?u(v,e,n,s,i):v(e,n,s,i)}}(t,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 s(this)}function g(e){if(o=o||n(16),!(y.call(g,this)||this instanceof o))return new g(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function _(e,t,n,r,i,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function v(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0,u=!0;n;)i[o]=n,n.isBuf||(u=!1),n=n.next,o+=1;i.allBuffers=u,_(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,d=n.callback;if(_(e,t,!1,t.objectMode?1:l.length,l,c,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var n=T(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(I,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}l.inherits(g,d),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===g&&(e&&e._writableState instanceof b)}})):y=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,n){var r,i=this._writableState,s=!1,o=!i.objectMode&&(r=e,f.isBuffer(r)||r instanceof p);return o&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=m),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),a.nextTick(t,n)}(this,n):(o||function(e,t,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),a.nextTick(r,s),i=!1),i}(this,i,e,n))&&(i.pendingcb++,s=function(e,t,n,r,i,a){if(!n){var s=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,n));return t}(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var o=t.objectMode?1:r.length;t.length+=o;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,o,r,i,a);return u}(this,i,o,e,t,n)),s},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?a.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=h.destroy,g.prototype._undestroy=h.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(6),n(47).setImmediate,n(4))},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(178),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(4))},function(e,t,n){"use strict";var r=n(2).Buffer,i=r.isEncoding||function(e){switch((e=""+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 a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)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}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=c,this.end=d,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(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)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(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 c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=s(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=s(t[r]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=s(t[r]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.listeners={}}return e.prototype.addEventListener=function(e,t){e=e.toLowerCase(),this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t.handleEvent||t)},e.prototype.removeEventListener=function(e,t){if(e=e.toLowerCase(),this.listeners[e]){var n=this.listeners[e].indexOf(t.handleEvent||t);n<0||this.listeners[e].splice(n,1)}},e.prototype.dispatchEvent=function(e){var t=e.type.toLowerCase();if(e.target=this,this.listeners[t])for(var n=0,r=this.listeners[t];n<r.length;n++){r[n].call(this,e)}var i=this["on"+t];return i&&i.call(this,e),!0},e}();t.XMLHttpRequestEventTarget=r},function(e,t,n){n(212);const r=(e,t)=>parseInt(e.slice(2*t+2,2*t+4),16),i=e=>(e.length-2)/2,a=(e,t)=>t.length===2*e+2?t:a(e,"0x0"+t.slice(2)),s=(e,t)=>t.length===2*e+2?t:s(e,t+"0"),o=e=>{let t=[];for(let n=2,r=e.length;n<r;n+=2)t.push(parseInt(e.slice(n,n+2),16));return t},u=e=>{let t="0x";for(let n=0,r=e.length;n<r;++n){let r=e[n];t+=(r<16?"0":"")+r.toString(16)}return t};e.exports={random:e=>{let t;t="undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues?window.crypto.getRandomValues(new Uint8Array(e)):n(18).randomBytes(e);let r="0x";for(let n=0;n<e;++n)r+=("00"+t[n].toString(16)).slice(-2);return r},length:i,concat:(e,t)=>e.concat(t.slice(2)),flatten:e=>"0x"+e.reduce((e,t)=>e+t.slice(2),""),slice:(e,t,n)=>"0x"+n.slice(2*e+2,2*t+2),reverse:e=>{let t="0x";for(let n=0,r=i(e);n<r;++n)t+=e.slice(2*(r-n),2*(r-n+1));return t},pad:a,padRight:s,fromAscii:e=>{let t="0x";for(let n=0;n<e.length;++n)t+=("00"+e.charCodeAt(n).toString(16)).slice(-2);return t},toAscii:e=>{let t="";for(let n=2;n<e.length;n+=2)t+=String.fromCharCode(parseInt(e.slice(n,n+2),16));return t},fromString:e=>{const t=e=>{const t=e.toString(16);return t.length<2?"0"+t:t};let n="0x";for(let r=0;r!=e.length;r++){let i=e.charCodeAt(r);if(i<128)n+=t(i);else{if(i<2048)n+=t(i>>6|192);else{if(i>55295&&i<56320){if(++r==e.length)return null;let a=e.charCodeAt(r);if(a<56320||a>57343)return null;i=65536+((1023&i)<<10)+(1023&a),n+=t(i>>18|240),n+=t(i>>12&63|128)}else n+=t(i>>12|224);n+=t(i>>6&63|128)}n+=t(63&i|128)}}return n},toString:e=>{let t="",n=0,a=i(e);for(;n<a;){let i=r(e,n++);if(i>127){if(i>191&&i<224){if(n>=a)return null;i=(31&i)<<6|63&r(e,n)}else if(i>223&&i<240){if(n+1>=a)return null;i=(15&i)<<12|(63&r(e,n))<<6|63&r(e,++n)}else{if(!(i>239&&i<248))return null;if(n+2>=a)return null;i=(7&i)<<18|(63&r(e,n))<<12|(63&r(e,++n))<<6|63&r(e,++n)}++n}if(i<=65535)t+=String.fromCharCode(i);else{if(!(i<=1114111))return null;i-=65536,t+=String.fromCharCode(i>>10|55296),t+=String.fromCharCode(1023&i|56320)}}return t},fromNumber:e=>{let t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:e=>parseInt(e.slice(2),16),fromNat:e=>"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2),toNat:e=>"0"===e[2]?"0x"+e.slice(3):e,fromArray:u,toArray:o,fromUint8Array:e=>u([].slice.call(e,0)),toUint8Array:e=>new Uint8Array(o(e))}},function(e,t,n){"use strict";var r=n(0),i=n(89),a=n(2).Buffer,s=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function l(e,t,n,r,i,a,s){return u(e+(t&n|~t&r)+i+a|0,s)+t|0}function c(e,t,n,r,i,a,s){return u(e+(t&r|n&~r)+i+a|0,s)+t|0}function d(e,t,n,r,i,a,s){return u(e+(t^n^r)+i+a|0,s)+t|0}function f(e,t,n,r,i,a,s){return u(e+(n^(t|~r))+i+a|0,s)+t|0}r(o,i),o.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,a=this._d;n=l(n,r,i,a,e[0],3614090360,7),a=l(a,n,r,i,e[1],3905402710,12),i=l(i,a,n,r,e[2],606105819,17),r=l(r,i,a,n,e[3],3250441966,22),n=l(n,r,i,a,e[4],4118548399,7),a=l(a,n,r,i,e[5],1200080426,12),i=l(i,a,n,r,e[6],2821735955,17),r=l(r,i,a,n,e[7],4249261313,22),n=l(n,r,i,a,e[8],1770035416,7),a=l(a,n,r,i,e[9],2336552879,12),i=l(i,a,n,r,e[10],4294925233,17),r=l(r,i,a,n,e[11],2304563134,22),n=l(n,r,i,a,e[12],1804603682,7),a=l(a,n,r,i,e[13],4254626195,12),i=l(i,a,n,r,e[14],2792965006,17),n=c(n,r=l(r,i,a,n,e[15],1236535329,22),i,a,e[1],4129170786,5),a=c(a,n,r,i,e[6],3225465664,9),i=c(i,a,n,r,e[11],643717713,14),r=c(r,i,a,n,e[0],3921069994,20),n=c(n,r,i,a,e[5],3593408605,5),a=c(a,n,r,i,e[10],38016083,9),i=c(i,a,n,r,e[15],3634488961,14),r=c(r,i,a,n,e[4],3889429448,20),n=c(n,r,i,a,e[9],568446438,5),a=c(a,n,r,i,e[14],3275163606,9),i=c(i,a,n,r,e[3],4107603335,14),r=c(r,i,a,n,e[8],1163531501,20),n=c(n,r,i,a,e[13],2850285829,5),a=c(a,n,r,i,e[2],4243563512,9),i=c(i,a,n,r,e[7],1735328473,14),n=d(n,r=c(r,i,a,n,e[12],2368359562,20),i,a,e[5],4294588738,4),a=d(a,n,r,i,e[8],2272392833,11),i=d(i,a,n,r,e[11],1839030562,16),r=d(r,i,a,n,e[14],4259657740,23),n=d(n,r,i,a,e[1],2763975236,4),a=d(a,n,r,i,e[4],1272893353,11),i=d(i,a,n,r,e[7],4139469664,16),r=d(r,i,a,n,e[10],3200236656,23),n=d(n,r,i,a,e[13],681279174,4),a=d(a,n,r,i,e[0],3936430074,11),i=d(i,a,n,r,e[3],3572445317,16),r=d(r,i,a,n,e[6],76029189,23),n=d(n,r,i,a,e[9],3654602809,4),a=d(a,n,r,i,e[12],3873151461,11),i=d(i,a,n,r,e[15],530742520,16),n=f(n,r=d(r,i,a,n,e[2],3299628645,23),i,a,e[0],4096336452,6),a=f(a,n,r,i,e[7],1126891415,10),i=f(i,a,n,r,e[14],2878612391,15),r=f(r,i,a,n,e[5],4237533241,21),n=f(n,r,i,a,e[12],1700485571,6),a=f(a,n,r,i,e[3],2399980690,10),i=f(i,a,n,r,e[10],4293915773,15),r=f(r,i,a,n,e[1],2240044497,21),n=f(n,r,i,a,e[8],1873313359,6),a=f(a,n,r,i,e[15],4264355552,10),i=f(i,a,n,r,e[6],2734768916,15),r=f(r,i,a,n,e[13],1309151649,21),n=f(n,r,i,a,e[4],4149444226,6),a=f(a,n,r,i,e[11],3174756917,10),i=f(i,a,n,r,e[2],718787259,15),r=f(r,i,a,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+a|0},o.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=a.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=o},function(e,t,n){"use strict";var r=n(1).Buffer,i=n(0),a=n(89),s=new Array(16),o=[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],u=[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],l=[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],c=[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],d=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function p(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function y(e,t){return e<<t|e>>>32-t}function h(e,t,n,r,i,a,s,o){return y(e+(t^n^r)+a+s|0,o)+i|0}function m(e,t,n,r,i,a,s,o){return y(e+(t&n|~t&r)+a+s|0,o)+i|0}function b(e,t,n,r,i,a,s,o){return y(e+((t|~n)^r)+a+s|0,o)+i|0}function g(e,t,n,r,i,a,s,o){return y(e+(t&r|n&~r)+a+s|0,o)+i|0}function _(e,t,n,r,i,a,s,o){return y(e+(t^(n|~r))+a+s|0,o)+i|0}i(p,a),p.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,a=0|this._d,p=0|this._e,v=0|this._a,w=0|this._b,T=0|this._c,I=0|this._d,S=0|this._e,A=0;A<80;A+=1){var D,E;A<16?(D=h(n,r,i,a,p,e[o[A]],d[0],l[A]),E=_(v,w,T,I,S,e[u[A]],f[0],c[A])):A<32?(D=m(n,r,i,a,p,e[o[A]],d[1],l[A]),E=g(v,w,T,I,S,e[u[A]],f[1],c[A])):A<48?(D=b(n,r,i,a,p,e[o[A]],d[2],l[A]),E=b(v,w,T,I,S,e[u[A]],f[2],c[A])):A<64?(D=g(n,r,i,a,p,e[o[A]],d[3],l[A]),E=m(v,w,T,I,S,e[u[A]],f[3],c[A])):(D=_(n,r,i,a,p,e[o[A]],d[4],l[A]),E=h(v,w,T,I,S,e[u[A]],f[4],c[A])),n=p,p=a,a=y(i,10),i=r,r=D,v=S,S=I,I=y(T,10),T=w,w=E}var C=this._b+i+I|0;this._b=this._c+a+S|0,this._c=this._d+p+v|0,this._d=this._e+n+w|0,this._e=this._a+r+T|0,this._a=C},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);return 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),e},e.exports=p},function(e,t,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(217),t.sha1=n(218),t.sha224=n(219),t.sha256=n(90),t.sha384=n(220),t.sha512=n(91)},function(e,t,n){"use strict";var r=n(8);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,n){var r=n(229),i=n(237),a=n(103);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(a)}},function(e,t,n){var r={ECB:n(230),CBC:n(231),CFB:n(232),CFB8:n(233),CFB1:n(234),OFB:n(235),CTR:n(101),GCM:n(101)},i=n(103);for(var a in i)i[a].module=r[i[a].mode];e.exports=i},function(e,t,n){var r;function i(e){this.rand=e}if(e.exports=function(e){return r||(r=new i(null)),r.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=n(240);if("function"!=typeof a.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return a.randomBytes(e)}}catch(e){}},function(e,t,n){(function(t){var r=n(3),i=n(15);function a(e,n){var i=function(e){var t=s(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(n),a=n.modulus.byteLength(),o=(r.mont(n.modulus),new r(e).mul(i.blinder).umod(n.modulus)),u=o.toRed(r.mont(n.prime1)),l=o.toRed(r.mont(n.prime2)),c=n.coefficient,d=n.prime1,f=n.prime2,p=u.redPow(n.exponent1),y=l.redPow(n.exponent2);p=p.fromRed(),y=y.fromRed();var h=p.isub(y).imul(c).umod(d);return h.imul(f),y.iadd(h),new t(y.imul(i.unblinder).umod(n.modulus).toArray(!1,a))}function s(e){for(var t=e.modulus.byteLength(),n=new r(i(t));n.cmp(e.modulus)>=0||!n.umod(e.prime1)||!n.umod(e.prime2);)n=new r(i(t));return n}e.exports=a,a.getr=s}).call(this,n(1).Buffer)},function(e,t,n){"use strict";var r,i=t,a=n(60),s=n(109),o=n(9).assert;function u(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.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")}function l(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var n=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=u,l("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("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:a.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"]}),l("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:a.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"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),l("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(255)}catch(e){r=void 0}l("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:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(e,t,n){var r=t;r.utils=n(11),r.common=n(29),r.sha=n(249),r.ripemd=n(253),r.hmac=n(254),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},function(e,t,n){"use strict";e.exports=n(291)(n(295))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);function i(e,t){if("00"===e.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function a(t,n){if(t<56)return e.from([t+n]);var r=o(t),i=o(n+55+r.length/2);return e.from(i+r,"hex")}function s(e){return"0x"===e.slice(0,2)}function o(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function u(t){if(!e.isBuffer(t)){if("string"==typeof t)return s(t)?e.from((i="string"!=typeof(a=t)?a:s(a)?a.slice(2):a).length%2?"0"+i:i,"hex"):e.from(t);if("number"==typeof t)return t?(n=o(t),e.from(n,"hex")):e.from([]);if(null==t)return e.from([]);if(t instanceof Uint8Array)return e.from(t);if(r.isBN(t))return e.from(t.toArray());throw new Error("invalid type")}var n,i,a;return t}t.encode=function t(n){if(Array.isArray(n)){for(var r=[],i=0;i<n.length;i++)r.push(t(n[i]));var s=e.concat(r);return e.concat([a(s.length,192),s])}var o=u(n);return 1===o.length&&o[0]<128?o:e.concat([a(o.length,128),o])},t.decode=function(t,n){if(void 0===n&&(n=!1),!t||0===t.length)return e.from([]);var r=function t(n){var r,a,s,o,u,l=[],c=n[0];if(c<=127)return{data:n.slice(0,1),remainder:n.slice(1)};if(c<=183){if(r=c-127,s=128===c?e.from([]):n.slice(1,r),2===r&&s[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:s,remainder:n.slice(r)}}if(c<=191){if(a=c-182,r=i(n.slice(1,a).toString("hex"),16),(s=n.slice(a,r+a)).length<r)throw new Error("invalid RLP");return{data:s,remainder:n.slice(r+a)}}if(c<=247){for(r=c-191,o=n.slice(1,r);o.length;)u=t(o),l.push(u.data),o=u.remainder;return{data:l,remainder:n.slice(r)}}a=c-246,r=i(n.slice(1,a).toString("hex"),16);var d=a+r;if(d>n.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(o=n.slice(a,d)).length)throw new Error("invalid rlp, List has a invalid length");for(;o.length;)u=t(o),l.push(u.data),o=u.remainder;return{data:l,remainder:n.slice(d)}}(u(t));if(n)return r;if(0!==r.remainder.length)throw new Error("invalid remainder");return r.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var n=u(t),r=n[0];if(r<=127)return n.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;var a=r-246;return a+i(n.slice(1,a).toString("hex"),16)}}).call(this,n(1).Buffer)},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,u=s(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){o=r(n);for(var d=0;d<o.length;d++)a.call(n,o[d])&&(u[o[d]]=n[o[d]])}}return u}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(301),i=n(19),a=n(32),s=n(62),o=n(33);t.keccak=function(t,n){return void 0===n&&(n=256),t="string"!=typeof t||a.isHexString(t)?o.toBuffer(t):e.from(t,"utf8"),n||(n=256),r("keccak"+n).update(t).digest()},t.keccak256=function(e){return t.keccak(e)},t.sha256=function(e){return e=o.toBuffer(e),i("sha256").update(e).digest()},t.ripemd160=function(e,t){e=o.toBuffer(e);var n=i("rmd160").update(e).digest();return!0===t?o.setLength(n,32):n},t.rlphash=function(e){return t.keccak(s.encode(e))}}).call(this,n(1).Buffer)},function(e,t,n){var r=n(150),i=n(66);e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new r(1),n=String(e).toLowerCase().trim(),a="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),s=i(n);if("-"===s.substr(0,1)&&(s=i(s.slice(1)),t=new r(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===a&&s.match(/^[0-9A-Fa-f]+$/))return new r(s,16).mul(t);if((s.match(/^-?[0-9]+$/)||""===s)&&!1===a)return new r(s,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new r(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(e,t,n){var r=n(67);e.exports=function(e){return"string"!=typeof e?e:r(e)?e.slice(2):e}},function(e,t){e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},function(e,t,n){(function(t){var r=n(5),i=n(3),a=n(65),s=n(152),o=n(153),u=n(154),l=function(e){return i.isBN(e)},c=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},d=function(e){try{return a.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},f=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||p(e))},p=function(e){e=e.replace(/^0x/i,"");for(var t=_(e.toLowerCase()).replace(/^0x/i,""),n=0;n<40;n++)if(parseInt(t[n],16)>7&&e[n].toUpperCase()!==e[n]||parseInt(t[n],16)<=7&&e[n].toLowerCase()!==e[n])return!1;return!0},y=function(e){var t="";e=(e=(e=(e=(e=s.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var n=0;n<e.length;n++){var r=e.charCodeAt(n).toString(16);t+=r.length<2?"0"+r:r}return"0x"+t},h=function(e){if(r.isNull(e)||r.isUndefined(e))return e;if(!isFinite(e)&&!b(e))throw new Error('Given input "'+e+'" is not a number.');var t=d(e),n=t.toString(16);return t.lt(new i(0))?"-0x"+n.substr(1):"0x"+n},m=function(e){if(e=e.toString(16),!b(e))throw new Error('Given value "'+e+'" is not a valid hex string.');e=e.replace(/^0x/i,"");for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},b=function(e){return(r.isString(e)||r.isNumber(e))&&/^(-)?0x[0-9a-f]*$/i.test(e)},g="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",_=function(e){l(e)&&(e=e.toString()),b(e)&&/^0x/i.test(e.toString())&&(e=m(e));var t=o.keccak256(e);return t===g?null:t};_._Hash=o;e.exports={BN:i,isBN:l,isBigNumber:c,toBN:d,isAddress:f,isBloom:function(e){return u.isBloom(e)},isUserEthereumAddressInBloom:function(e,t){return u.isUserEthereumAddressInBloom(e,t)},isContractAddressInBloom:function(e,t){return u.isContractAddressInBloom(e,t)},isTopic:function(e){return u.isTopic(e)},isTopicInBloom:function(e,t){return u.isTopicInBloom(e,t)},isInBloom:function(e,t){return u.isInBloom(e,t)},checkAddressChecksum:p,utf8ToHex:y,hexToUtf8:function(e){if(!b(e))throw new Error('The parameter "'+e+'" must be a valid HEX string.');for(var t="",n=0,r=(e=(e=(e=(e=(e=e.replace(/^0x/i,"")).replace(/^(?:00)*/,"")).split("").reverse().join("")).replace(/^(?:00)*/,"")).split("").reverse().join("")).length,i=0;i<r;i+=2)n=parseInt(e.substr(i,2),16),t+=String.fromCharCode(n);return s.decode(t)},hexToNumber:function(e){if(!e)return e;if(r.isString(e)&&!b(e))throw new Error('Given value "'+e+'" is not a valid hex string.');return d(e).toNumber()},hexToNumberString:function(e){if(!e)return e;if(r.isString(e)&&!b(e))throw new Error('Given value "'+e+'" is not a valid hex string.');return d(e).toString(10)},numberToHex:h,toHex:function(e,n){if(f(e))return n?"address":"0x"+e.toLowerCase().replace(/^0x/i,"");if(r.isBoolean(e))return n?"bool":e?"0x01":"0x00";if(t.isBuffer(e))return"0x"+e.toString("hex");if(r.isObject(e)&&!c(e)&&!l(e))return n?"string":y(JSON.stringify(e));if(r.isString(e)){if(0===e.indexOf("-0x")||0===e.indexOf("-0X"))return n?"int256":h(e);if(0===e.indexOf("0x")||0===e.indexOf("0X"))return n?"bytes":e;if(!isFinite(e))return n?"string":y(e)}return n?e<0?"int256":"uint256":h(e)},hexToBytes:m,bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return"0x"+t.join("")},isHex:function(e){return(r.isString(e)||r.isNumber(e))&&/^(-0x|0x)?[0-9a-f]*$/i.test(e)},isHexStrict:b,leftPad:function(e,t,n){var r=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(i).join(n||"0")+e},rightPad:function(e,t,n){var r=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+e+new Array(i).join(n||"0")},toTwosComplement:function(e){return"0x"+d(e).toTwos(256).toString(16,64)},sha3:_,sha3Raw:function(e){return null===(e=_(e))?g:e}}}).call(this,n(1).Buffer)},function(e,t,n){"use strict";var r=n(10),i=n(3),a=function(e){var t="A".charCodeAt(0),n="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).substr(4)+e.substr(0,4)).split("").map((function(e){var r=e.charCodeAt(0);return r>=t&&r<=n?r-t+10:e})).join("")},s=function(e){for(var t,n=e;n.length>2;)t=n.slice(0,9),n=parseInt(t,10)%97+n.slice(t.length);return parseInt(n,10)%97},o=function(e){this._iban=e};o.toAddress=function(e){if(!(e=new o(e)).isDirect())throw new Error("IBAN is indirect and can't be converted");return e.toAddress()},o.toIban=function(e){return o.fromAddress(e).toString()},o.fromAddress=function(e){if(!r.isAddress(e))throw new Error("Provided address is not a valid address: "+e);e=e.replace("0x","").replace("0X","");var t=function(e,t){for(var n=e;n.length<2*t;)n="0"+n;return n}(new i(e,16).toString(36),15);return o.fromBban(t.toUpperCase())},o.fromBban=function(e){var t=("0"+(98-s(a("XE00"+e)))).slice(-2);return new o("XE"+t+e)},o.createIndirect=function(e){return o.fromBban("ETH"+e.institution+e.identifier)},o.isValid=function(e){return new o(e).isValid()},o.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===s(a(this._iban))},o.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},o.prototype.isIndirect=function(){return 20===this._iban.length},o.prototype.checksum=function(){return this._iban.substr(2,2)},o.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},o.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},o.prototype.toAddress=function(){if(this.isDirect()){var e=this._iban.substr(4),t=new i(e,36);return r.toChecksumAddress(t.toString(16,20))}return""},o.prototype.toString=function(){return this._iban},e.exports=o},function(e,t,n){"use strict";var r={messageId:0,toPayload:function(e,t){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(t)+'"!');return r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:e,params:t||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map((function(e){return r.toPayload(e.method,e.params)}))}};e.exports=r},function(e,t,n){(function(e,r){var i;!function(a){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var o,u=2147483647,l=/^xn--/,c=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,y=String.fromCharCode;function h(e){throw new RangeError(f[e])}function m(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function b(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+m((e=e.replace(d,".")).split("."),t).join(".")}function g(e){for(var t,n,r=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function _(e){return m(e,(function(e){var t="";return e>65535&&(t+=y((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=y(e)})).join("")}function v(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function T(e){var t,n,r,i,a,s,o,l,c,d,f,y=[],m=e.length,b=0,g=128,v=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&h("not-basic"),y.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<m;){for(a=b,s=1,o=36;i>=m&&h("invalid-input"),((l=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||l>p((u-b)/s))&&h("overflow"),b+=l*s,!(l<(c=o<=v?1:o>=v+26?26:o-v));o+=36)s>p(u/(d=36-c))&&h("overflow"),s*=d;v=w(b-a,t=y.length+1,0==a),p(b/t)>u-g&&h("overflow"),g+=p(b/t),b%=t,y.splice(b++,0,g)}return _(y)}function I(e){var t,n,r,i,a,s,o,l,c,d,f,m,b,_,T,I=[];for(m=(e=g(e)).length,t=128,n=0,a=72,s=0;s<m;++s)(f=e[s])<128&&I.push(y(f));for(r=i=I.length,i&&I.push("-");r<m;){for(o=u,s=0;s<m;++s)(f=e[s])>=t&&f<o&&(o=f);for(o-t>p((u-n)/(b=r+1))&&h("overflow"),n+=(o-t)*b,t=o,s=0;s<m;++s)if((f=e[s])<t&&++n>u&&h("overflow"),f==t){for(l=n,c=36;!(l<(d=c<=a?1:c>=a+26?26:c-a));c+=36)T=l-d,_=36-d,I.push(y(v(d+T%_,0))),l=p(T/_);I.push(y(v(l,0))),a=w(n,b,r==i),n=0,++r}++n,++t}return I.join("")}o={version:"1.4.1",ucs2:{decode:g,encode:_},decode:T,encode:I,toASCII:function(e){return b(e,(function(e){return c.test(e)?"xn--"+I(e):e}))},toUnicode:function(e){return b(e,(function(e){return l.test(e)?T(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return o}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(22)(e),n(4))},function(e,t,n){(function(e){t.fetch=o(e.fetch)&&o(e.ReadableStream),t.writableStream=o(e.WritableStream),t.abortController=o(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var n;function r(){if(void 0!==n)return n;if(e.XMLHttpRequest){n=new e.XMLHttpRequest;try{n.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var a=void 0!==e.ArrayBuffer,s=a&&o(e.ArrayBuffer.prototype.slice);function o(e){return"function"==typeof e}t.arraybuffer=t.fetch||a&&i("arraybuffer"),t.msstream=!t.fetch&&s&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&a&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&o(r().overrideMimeType),t.vbArray=o(e.VBArray),n=null}).call(this,n(4))},function(e,t,n){(function(e,r,i){var a=n(72),s=n(0),o=n(24),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(t,n,s,u){var l=this;if(o.Readable.call(l),l._mode=s,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){e.nextTick((function(){l.emit("close")}))})),"fetch"===s){if(l._fetchResponse=n,l.url=n.url,l.statusCode=n.status,l.statusMessage=n.statusText,n.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),a.writableStream){var c=new WritableStream({write:function(e){return new Promise((function(t,n){l._destroyed?n():l.push(new r(e))?t():l._resumeFetch=t}))},close:function(){i.clearTimeout(u),l._destroyed||l.push(null)},abort:function(e){l._destroyed||l.emit("error",e)}});try{return void n.body.pipeTo(c).catch((function(e){i.clearTimeout(u),l._destroyed||l.emit("error",e)}))}catch(e){}}var d=n.body.getReader();!function e(){d.read().then((function(t){if(!l._destroyed){if(t.done)return i.clearTimeout(u),void l.push(null);l.push(new r(t.value)),e()}})).catch((function(e){i.clearTimeout(u),l._destroyed||l.emit("error",e)}))}()}else{if(l._xhr=t,l._pos=0,l.url=t.responseURL,l.statusCode=t.status,l.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!a.overrideMimeType){var f=l.rawHeaders["mime-type"];if(f){var p=f.match(/;\s*charset=([^;])(;|$)/);p&&(l._charset=p[1].toLowerCase())}l._charset||(l._charset="utf-8")}}};s(l,o.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{n=new i.VBArray(t.responseBody).toArray()}catch(e){}if(null!==n){e.push(new r(n));break}case"text":try{n=t.responseText}catch(t){e._mode="text:vbarray";break}if(n.length>e._pos){var a=n.substr(e._pos);if("x-user-defined"===e._charset){for(var s=new r(a.length),o=0;o<a.length;o++)s[o]=255&a.charCodeAt(o);e.push(s)}else e.push(a,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;n=t.response,e.push(new r(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==u.LOADING||!n)break;e.push(new r(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==u.LOADING)break;var l=new i.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(new r(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){e.push(null)},l.readAsArrayBuffer(n)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,n(6),n(1).Buffer,n(4))},function(e,t,n){"use strict";(function(t,r){var i=n(34);e.exports=_;var a,s=n(174);_.ReadableState=g;n(44).EventEmitter;var o=function(e,t){return e.listeners(t).length},u=n(75),l=n(45).Buffer,c=t.Uint8Array||function(){};var d=Object.create(n(25));d.inherits=n(0);var f=n(175),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var y,h=n(176),m=n(76);d.inherits(_,u);var b=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var r=t instanceof(a=a||n(16));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(y||(y=n(48).StringDecoder),this.decoder=new y(e.encoding),this.encoding=e.encoding)}function _(e){if(a=a||n(16),!(this instanceof _))return new _(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function v(e,t,n,r,i){var a,s=e._readableState;null===t?(s.reading=!1,function(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,I(e)}(e,s)):(i||(a=function(e,t){var n;r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):A(e,s)):w(e,s,t,!1))):r||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function w(e,t,n,r){t.flowing&&0===t.length&&!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&&I(e)),A(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=m.destroy,_.prototype._undestroy=m.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),v(this,e,t,!1,n)},_.prototype.unshift=function(e){return v(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return y||(y=n(48).StringDecoder),this._readableState.decoder=new y(e),this._readableState.encoding=e,this};function T(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(S,e):S(e))}function S(e){p("emit readable"),e.emit("readable"),x(e)}function A(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(D,e,t))}function D(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function E(e){p("readable nexttick read 0"),e.read(0)}function C(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(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)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(s===a.length?i+=a:i+=a.slice(0,e),0===(e-=s)){s===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=l.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,s),0===(e-=s)){s===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var 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,i.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}_.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?k(this):I(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&k(this),null;var r,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",i=!0),t.ended||t.reading?p("reading or ended",i=!1):i&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=T(n,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&k(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,p("pipe count=%d opts=%j",a.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:_;function l(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",b),e.removeListener("finish",g),e.removeListener("drain",d),e.removeListener("error",m),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",_),n.removeListener("data",h),f=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function c(){p("onend"),e.end()}a.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",l);var d=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,x(e))}}(n);e.on("drain",d);var f=!1;var y=!1;function h(t){p("ondata"),y=!1,!1!==e.write(t)||y||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==P(a.pipes,e))&&!f&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,y=!0),n.pause())}function m(t){p("onerror",t),_(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",g),_()}function g(){p("onfinish"),e.removeListener("close",b),_()}function _(){p("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",m),e.once("close",b),e.once("finish",g),e.emit("pipe",n),a.flowing||(p("pipe resume"),n.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var s=P(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},_.prototype.on=function(e,t){var n=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&I(this):i.nextTick(E,this))}return n},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(C,e,t))}(this,e)),this},_.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(p("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(p("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<b.length;a++)e.on(b[a],this.emit.bind(this,b[a]));return this._read=function(t){p("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=M}).call(this,n(4),n(6))},function(e,t,n){e.exports=n(44).EventEmitter},function(e,t,n){"use strict";var r=n(34);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";e.exports=s;var r=n(16),i=Object.create(n(25));function a(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,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){u(e,t,n)})):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),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)}i.inherits=n(0),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){var r=n(43),i=n(23),a=e.exports;for(var s in r)r.hasOwnProperty(s)&&(a[s]=r[s]);function o(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}a.request=function(e,t){return e=o(e),r.request.call(this,e,t)},a.get=function(e,t){return e=o(e),r.get.call(this,e,t)}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function s(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var o=new s(n,r||e,a),u=i?i+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],o]:e._events[u].push(o):(e._events[u]=o,e._eventsCount++),e}function u(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function l(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),l.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},l.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,s=new Array(a);r<a;r++)s[r]=n[r].fn;return s},l.prototype.listenerCount=function(e){var t=i?i+e:e,n=this._events[t];return n?n.fn?1:n.length:0},l.prototype.emit=function(e,t,n,r,a,s){var o=i?i+e:e;if(!this._events[o])return!1;var u,l,c=this._events[o],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,a),!0;case 6:return c.fn.call(c.context,t,n,r,a,s),!0}for(l=1,u=new Array(d-1);l<d;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),d){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,r);break;default:if(!u)for(f=1,u=new Array(d-1);f<d;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},l.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,n,r){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return u(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||r&&!s.once||n&&s.context!==n||u(this,a);else{for(var o=0,l=[],c=s.length;o<c;o++)(s[o].fn!==t||r&&!s[o].once||n&&s[o].context!==n)&&l.push(s[o]);l.length?this._events[a]=1===l.length?l[0]:l:u(this,a)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&u(this,t)):(this._events=new a,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=i,l.EventEmitter=l,e.exports=l},function(e,t,n){e.exports=n(191)().Promise},function(e,t,n){"use strict";var r=n(5),i=n(14),a=n(17),s=n(10),o=n(36).subscription,u=n(7).formatters,l=n(7).errors,c=n(35),d=n(83),f=function e(t,n,a){var o=this,l=Array.prototype.slice.call(arguments);if(!(this instanceof e))throw new Error('Please use the "new" keyword to instantiate a web3.eth.contract() object!');if(i.packageInit(this,[this.constructor.currentProvider]),this.clearSubscriptions=this._requestManager.clearSubscriptions,!t||!Array.isArray(t))throw new Error("You must provide the json interface of the contract when instantiating a contract object.");this.options={};var c=l[l.length-1];r.isObject(c)&&!r.isArray(c)&&(a=c,this.options=r.extend(this.options,this._getOrSetDefaultOptions(a)),r.isObject(n)&&(n=null)),Object.defineProperty(this.options,"address",{set:function(e){e&&(o._address=s.toChecksumAddress(u.inputAddressFormatter(e)))},get:function(){return o._address},enumerable:!0}),Object.defineProperty(this.options,"jsonInterface",{set:function(e){return o.methods={},o.events={},o._jsonInterface=e.map((function(e){var t,n;if(e.constant="view"===e.stateMutability||"pure"===e.stateMutability||e.constant,e.payable="payable"===e.stateMutability||e.payable,e.name&&(n=s._jsonInterfaceMethodToString(e)),"function"===e.type){if(e.signature=d.encodeFunctionSignature(n),t=o._createTxObject.bind({method:e,parent:o}),o.methods[e.name]){var r=o._createTxObject.bind({method:e,parent:o,nextMethod:o.methods[e.name]});o.methods[e.name]=r}else o.methods[e.name]=t;o.methods[e.signature]=t,o.methods[n]=t}else if("event"===e.type){e.signature=d.encodeEventSignature(n);var i=o._on.bind(o,e.signature);o.events[e.name]&&"bound "!==o.events[e.name].name||(o.events[e.name]=i),o.events[e.signature]=i,o.events[n]=i}return e})),o.events.allEvents=o._on.bind(o,"allevents"),o._jsonInterface},get:function(){return o._jsonInterface},enumerable:!0});var f=this.constructor.defaultAccount,p=this.constructor.defaultBlock||"latest";Object.defineProperty(this,"handleRevert",{get:function(){return!1===o.options.handleRevert||!0===o.options.handleRevert?o.options.handleRevert:this.constructor.handleRevert},set:function(e){o.options.handleRevert=e},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return o.options.common||this.constructor.defaultCommon},set:function(e){o.options.common=e},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return o.options.hardfork||this.constructor.defaultHardfork},set:function(e){o.options.hardfork=e},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return o.options.chain||this.constructor.defaultChain},set:function(e){o.options.chain=e},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return 0===o.options.transactionPollingTimeout?o.options.transactionPollingTimeout:o.options.transactionPollingTimeout||this.constructor.transactionPollingTimeout},set:function(e){o.options.transactionPollingTimeout=e},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return 0===o.options.transactionConfirmationBlocks?o.options.transactionConfirmationBlocks:o.options.transactionConfirmationBlocks||this.constructor.transactionConfirmationBlocks},set:function(e){o.options.transactionConfirmationBlocks=e},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return 0===o.options.transactionBlockTimeout?o.options.transactionBlockTimeout:o.options.transactionBlockTimeout||this.constructor.transactionBlockTimeout},set:function(e){o.options.transactionBlockTimeout=e},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return f},set:function(e){return e&&(f=s.toChecksumAddress(u.inputAddressFormatter(e))),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return p},set:function(e){return p=e,e},enumerable:!0}),this.methods={},this.events={},this._address=null,this._jsonInterface=[],this.options.address=n,this.options.jsonInterface=t};f.setProvider=function(e,t){i.packageInit(this,[e]),this._ethAccounts=t},f.prototype._getCallback=function(e){if(e&&r.isFunction(e[e.length-1]))return e.pop()},f.prototype._checkListener=function(e,t){if(t===e)throw new Error('The event "'+e+"\" is a reserved event name, you can't use it.")},f.prototype._getOrSetDefaultOptions=function(e){var t=e.gasPrice?String(e.gasPrice):null,n=e.from?s.toChecksumAddress(u.inputAddressFormatter(e.from)):null;return e.data=e.data||this.options.data,e.from=n||this.options.from,e.gasPrice=t||this.options.gasPrice,e.gas=e.gas||e.gasLimit||this.options.gas,delete e.gasLimit,e},f.prototype._encodeEventABI=function(e,t){var n=(t=t||{}).filter||{},i={};if(["fromBlock","toBlock"].filter((function(e){return void 0!==t[e]})).forEach((function(e){i[e]=u.inputBlockNumberFormatter(t[e])})),r.isArray(t.topics))i.topics=t.topics;else{if(i.topics=[],e&&!e.anonymous&&"ALLEVENTS"!==e.name&&i.topics.push(e.signature),"ALLEVENTS"!==e.name){var a=e.inputs.filter((function(e){return!0===e.indexed})).map((function(e){var t=n[e.name];return t?r.isArray(t)?t.map((function(t){return d.encodeParameter(e.type,t)})):d.encodeParameter(e.type,t):null}));i.topics=i.topics.concat(a)}i.topics.length||delete i.topics}return this.options.address&&(i.address=this.options.address.toLowerCase()),i},f.prototype._decodeEventABI=function(e){var t=this;e.data=e.data||"",e.topics=e.topics||[];var n=u.outputLogFormatter(e);if("ALLEVENTS"===t.name&&(t=t.jsonInterface.find((function(t){return t.signature===e.topics[0]}))||{anonymous:!0}),t.inputs=t.inputs||[],!t.anonymous){let n=0;t.inputs.forEach(e=>e.indexed?n++:null),n>0&&e.topics.length!==n+1&&(t={anonymous:!0,inputs:[]})}var r=t.anonymous?e.topics:e.topics.slice(1);return n.returnValues=d.decodeLog(t.inputs,e.data,r),delete n.returnValues.__length__,n.event=t.name,n.signature=t.anonymous||!e.topics[0]?null:e.topics[0],n.raw={data:n.data,topics:n.topics},delete n.data,delete n.topics,n},f.prototype._encodeMethodABI=function(){var e=this._method.signature,t=this.arguments||[],n=!1,i=this._parent.options.jsonInterface.filter((function(t){return"constructor"===e&&t.type===e||(t.signature===e||t.signature===e.replace("0x","")||t.name===e)&&"function"===t.type})).map((function(e){var i=r.isArray(e.inputs)?e.inputs.length:0;if(i!==t.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+i+" arguments.");return"function"===e.type&&(n=e.signature),r.isArray(e.inputs)?e.inputs:[]})).map((function(e){return d.encodeParameters(e,t).replace("0x","")}))[0]||"";if("constructor"===e){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData+i}var a=n?n+i:i;if(a)return a;throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".')},f.prototype._decodeMethodReturn=function(e,t){if(!t)return null;t=t.length>=2?t.slice(2):t;var n=d.decodeParameters(e,t);return 1===n.__length__?n[0]:(delete n.__length__,n)},f.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data)return s._fireError(new Error('No "data" specified in neither the given options, nor the default options.'),null,null,t);var n=r.find(this.options.jsonInterface,(function(e){return"constructor"===e.type}))||{};return n.signature="constructor",this._createTxObject.apply({method:n,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},f.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),n=r.isObject(e[e.length-1])?e.pop():{},i=r.isString(e[0])?e[0]:"allevents",a="allevents"===i.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find((function(e){return"event"===e.type&&(e.name===i||e.signature==="0x"+i.replace("0x",""))}));if(!a)throw new Error('Event "'+i+"\" doesn't exist in this contract.");if(!s.isAddress(this.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return{params:this._encodeEventABI(a,n),event:a,callback:t}},f.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},f.prototype.once=function(e,t,n){var i=Array.prototype.slice.call(arguments);if(!(n=this._getCallback(i)))throw new Error("Once requires a callback as the second parameter.");t&&delete t.fromBlock,this._on(e,t,(function(e,t,i){i.unsubscribe(),r.isFunction(n)&&n(e,t,i)}))},f.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);this._checkListener("newListener",e.event.name,e.callback),this._checkListener("removeListener",e.event.name,e.callback);var t=new o({subscription:{params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),r.isFunction(this.callback)&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t},f.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new a({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var n=t.buildCall();return t=null,n(e.params,e.callback)},f.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw l.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},f.prototype._processExecuteArguments=function(e,t){var n={};if(n.type=e.shift(),n.callback=this._parent._getCallback(e),"call"===n.type&&!0!==e[e.length-1]&&(r.isString(e[e.length-1])||isFinite(e[e.length-1]))&&(n.defaultBlock=e.pop()),n.options=r.isObject(e[e.length-1])?e.pop():{},n.generateRequest=!0===e[e.length-1]&&e.pop(),n.options=this._parent._getOrSetDefaultOptions(n.options),n.options.data=this.encodeABI(),!this._deployData&&!s.isAddress(this._parent.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return this._deployData||(n.options.to=this._parent.options.address),n.options.data?n:s._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,n.callback)},f.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),n),n=c("send"!==t.type),i=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var o={params:[u.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(o.params.push(u.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),o.method="eth_call",o.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):o.method="eth_sendTransaction",o}switch(t.type){case"estimate":var l=new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[u.inputCallFormatter],outputFormatter:s.hexToNumber,requestManager:e._parent._requestManager,accounts:i,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction();return l(t.options,t.callback);case"call":var f=new a({name:"call",call:"eth_call",params:2,inputFormatter:[u.inputCallFormatter,u.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:i,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,handleRevert:e._parent.handleRevert,abiCoder:d}).createFunction();return f(t.options,t.defaultBlock,t.callback);case"send":if(!s.isAddress(t.options.from))return s._fireError(new Error('No "from" address specified in neither the given options, nor the default options.'),n.eventEmitter,n.reject,t.callback);if(r.isBoolean(this._method.payable)&&!this._method.payable&&t.options.value&&t.options.value>0)return s._fireError(new Error("Can not send value to non-payable contract method or constructor"),n.eventEmitter,n.reject,t.callback);var p={receiptFormatter:function(t){if(r.isArray(t.logs)){var n=r.map(t.logs,(function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)}));t.events={};var i=0;n.forEach((function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[i]=e,i++)})),delete t.logs}return t},contractDeployFormatter:function(t){var n=e._parent.clone();return n.options.address=t.contractAddress,n}},y=new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[u.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,transactionBlockTimeout:e._parent.transactionBlockTimeout,transactionConfirmationBlocks:e._parent.transactionConfirmationBlocks,transactionPollingTimeout:e._parent.transactionPollingTimeout,defaultCommon:e._parent.defaultCommon,defaultChain:e._parent.defaultChain,defaultHardfork:e._parent.defaultHardfork,handleRevert:e._parent.handleRevert,extraFormatters:p,abiCoder:d}).createFunction();return y(t.options,t.callback)}},e.exports=f},function(e,t,n){var r=n(5),i=n(10),a=new(0,n(199).AbiCoder)((function(e,t){return!e.match(/^u?int/)||r.isArray(t)||r.isObject(t)&&"BN"===t.constructor.name?t:t.toString()}));function s(){}var o=function(){};o.prototype.encodeFunctionSignature=function(e){return r.isObject(e)&&(e=i._jsonInterfaceMethodToString(e)),i.sha3(e).slice(0,10)},o.prototype.encodeEventSignature=function(e){return r.isObject(e)&&(e=i._jsonInterfaceMethodToString(e)),i.sha3(e)},o.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},o.prototype.encodeParameters=function(e,t){return a.encode(this.mapTypes(e),t.map((function(e){return i.isBN(e)||i.isBigNumber(e)?e.toString(10):e})))},o.prototype.mapTypes=function(e){var t=this,n=[];return e.forEach((function(e){if(t.isSimplifiedStructFormat(e)){var r=Object.keys(e)[0];n.push(Object.assign(t.mapStructNameAndType(r),{components:t.mapStructToCoderFormat(e[r])}))}else n.push(e)})),n},o.prototype.isSimplifiedStructFormat=function(e){return"object"==typeof e&&void 0===e.components&&void 0===e.name},o.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},o.prototype.mapStructToCoderFormat=function(e){var t=this,n=[];return Object.keys(e).forEach((function(r){"object"!=typeof e[r]?n.push({name:r,type:e[r]}):n.push(Object.assign(t.mapStructNameAndType(r),{components:t.mapStructToCoderFormat(e[r])}))})),n},o.prototype.encodeFunctionCall=function(e,t){return this.encodeFunctionSignature(e)+this.encodeParameters(e.inputs,t).replace("0x","")},o.prototype.decodeParameter=function(e,t){return this.decodeParameters([e],t)[0]},o.prototype.decodeParameters=function(e,t){if(e.length>0&&(!t||"0x"===t||"0X"===t))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var n=a.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,"")),i=new s;return i.__length__=0,e.forEach((function(e,t){var a=n[i.__length__];a="0x"===a?null:a,i[t]=a,r.isObject(e)&&e.name&&(i[e.name]=a),i.__length__++})),i},o.prototype.decodeLog=function(e,t,n){var i=this;n=r.isArray(n)?n:[n],t=t||"";var a=[],o=[],u=0;e.forEach((function(e,t){e.indexed?(o[t]=["bool","int","uint","address","fixed","ufixed"].find((function(t){return-1!==e.type.indexOf(t)}))?i.decodeParameter(e.type,n[u]):n[u],u++):a[t]=e}));var l=t,c=l?this.decodeParameters(a,l):[],d=new s;return d.__length__=0,e.forEach((function(e,t){d[t]="string"===e.type?"":null,void 0!==c[t]&&(d[t]=c[t]),void 0!==o[t]&&(d[t]=o[t]),e.name&&(d[e.name]=d[t]),d.__length__++})),d};var u=new o;e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.BigNumber=r;var i=function(){};t.Indexed=i;var a=function(){};t.MinimalProvider=a;var s=function(){};t.Signer=s;var o=function(){};t.HDNode=o},function(e,t,n){(function(t,n){!function(){"use strict";var r="object"==typeof window?window:{};!r.JS_SHA3_NO_NODE_JS&&"object"==typeof t&&t.versions&&t.versions.node&&(r=n);for(var i=!r.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],o=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],l=["hex","buffer","arrayBuffer","array"],c=function(e,t,n){return function(r){return new w(e,t,e).update(r)[n]()}},d=function(e,t,n){return function(r,i){return new w(e,t,i).update(r)[n]()}},f=function(e,t){var n=c(e,t,"hex");n.create=function(){return new w(e,t,e)},n.update=function(e){return n.create().update(e)};for(var r=0;r<l.length;++r){var i=l[r];n[i]=c(e,t,i)}return n},p=[{name:"keccak",padding:[1,256,65536,16777216],bits:u,createMethod:f},{name:"sha3",padding:[6,1536,393216,100663296],bits:u,createMethod:f},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(e,t){var n=d(e,t,"hex");n.create=function(n){return new w(e,t,n)},n.update=function(e,t){return n.create(t).update(e)};for(var r=0;r<l.length;++r){var i=l[r];n[i]=d(e,t,i)}return n}}],y={},h=[],m=0;m<p.length;++m)for(var b=p[m],g=b.bits,_=0;_<g.length;++_){var v=b.name+"_"+g[_];h.push(v),y[v]=b.createMethod(g[_],b.padding)}function w(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}w.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var n,r,i=e.length,a=this.blocks,o=this.byteCount,u=this.blockCount,l=0,c=this.s;l<i;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<u+1;++n)a[n]=0;if(t)for(n=this.start;l<i&&n<o;++l)a[n>>2]|=e[l]<<s[3&n++];else for(n=this.start;l<i&&n<o;++l)(r=e.charCodeAt(l))<128?a[n>>2]|=r<<s[3&n++]:r<2048?(a[n>>2]|=(192|r>>6)<<s[3&n++],a[n>>2]|=(128|63&r)<<s[3&n++]):r<55296||r>=57344?(a[n>>2]|=(224|r>>12)<<s[3&n++],a[n>>2]|=(128|r>>6&63)<<s[3&n++],a[n>>2]|=(128|63&r)<<s[3&n++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++l)),a[n>>2]|=(240|r>>18)<<s[3&n++],a[n>>2]|=(128|r>>12&63)<<s[3&n++],a[n>>2]|=(128|r>>6&63)<<s[3&n++],a[n>>2]|=(128|63&r)<<s[3&n++]);if(this.lastByteIndex=n,n>=o){for(this.start=n-o,this.block=a[u],n=0;n<u;++n)c[n]^=a[n];T(c),this.reset=!0}else this.start=n}return this},w.prototype.finalize=function(){var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];T(r)},w.prototype.toString=w.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,s=0,o=0,u="";o<r;){for(s=0;s<t&&o<r;++s,++o)e=n[s],u+=a[e>>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];o%t==0&&(T(n),s=0)}return i&&(e=n[s],i>0&&(u+=a[e>>4&15]+a[15&e]),i>1&&(u+=a[e>>12&15]+a[e>>8&15]),i>2&&(u+=a[e>>20&15]+a[e>>16&15])),u},w.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,a=0,s=0,o=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(o);for(var u=new Uint32Array(e);s<r;){for(a=0;a<t&&s<r;++a,++s)u[s]=n[a];s%t==0&&T(n)}return i&&(u[a]=n[a],e=e.slice(0,o)),e},w.prototype.buffer=w.prototype.arrayBuffer,w.prototype.digest=w.prototype.array=function(){this.finalize();for(var e,t,n=this.blockCount,r=this.s,i=this.outputBlocks,a=this.extraBytes,s=0,o=0,u=[];o<i;){for(s=0;s<n&&o<i;++s,++o)e=o<<2,t=r[s],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;o%n==0&&T(r)}return a&&(e=o<<2,t=r[s],a>0&&(u[e]=255&t),a>1&&(u[e+1]=t>>8&255),a>2&&(u[e+2]=t>>16&255)),u};var T=function(e){var t,n,r,i,a,s,u,l,c,d,f,p,y,h,m,b,g,_,v,w,T,I,S,A,D,E,C,x,M,k,N,P,L,R,O,B,j,V,U,z,q,$,F,H,G,Y,Q,Z,K,W,J,X,ee,te,ne,re,ie,ae,se,oe,ue,le,ce;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),n=(y=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(l<<1|c>>>31),n=a^(c<<1|l>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=s^(d<<1|f>>>31),n=u^(f<<1|d>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=l^(p<<1|y>>>31),n=c^(y<<1|p>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=d^(i<<1|a>>>31),n=f^(a<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,h=e[0],m=e[1],Y=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,x=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,$=e[40]<<18|e[41]>>>14,F=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,b=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,K=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,_=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,W=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,D=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,V=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,T=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,E=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,ae=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,I=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=h^~b&_,e[1]=m^~g&v,e[10]=A^~E&x,e[11]=D^~C&M,e[20]=R^~B&V,e[21]=O^~j&U,e[30]=H^~Y&Z,e[31]=G^~Q&K,e[40]=te^~re&ae,e[41]=ne^~ie&se,e[2]=b^~_&w,e[3]=g^~v&T,e[12]=E^~x&k,e[13]=C^~M&N,e[22]=B^~V&z,e[23]=j^~U&q,e[32]=Y^~Z&W,e[33]=Q^~K&J,e[42]=re^~ae&oe,e[43]=ie^~se&ue,e[4]=_^~w&I,e[5]=v^~T&S,e[14]=x^~k&P,e[15]=M^~N&L,e[24]=V^~z&$,e[25]=U^~q&F,e[34]=Z^~W&X,e[35]=K^~J&ee,e[44]=ae^~oe&le,e[45]=se^~ue&ce,e[6]=w^~I&h,e[7]=T^~S&m,e[16]=k^~P&A,e[17]=N^~L&D,e[26]=z^~$&R,e[27]=q^~F&O,e[36]=W^~X&H,e[37]=J^~ee&G,e[46]=oe^~le&te,e[47]=ue^~ce&ne,e[8]=I^~h&b,e[9]=S^~m&g,e[18]=P^~A&E,e[19]=L^~D&C,e[28]=$^~R&B,e[29]=F^~O&j,e[38]=X^~H&Y,e[39]=ee^~G&Q,e[48]=le^~te&re,e[49]=ce^~ne&ie,e[0]^=o[r],e[1]^=o[r+1]};if(i)e.exports=y;else for(m=0;m<h.length;++m)r[h[m]]=y[h[m]]}()}).call(this,n(6),n(4))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineReadOnly=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,value:n,writable:!1})},t.defineFrozen=function(e,t,n){var r=JSON.stringify(n);Object.defineProperty(e,t,{enumerable:!0,get:function(){return JSON.parse(r)}})},t.resolveProperties=function(e){var t={},n=[];return Object.keys(e).forEach((function(r){var i=e[r];i instanceof Promise?n.push(i.then((function(e){return t[r]=e,null}))):t[r]=i})),Promise.all(n).then((function(){return t}))},t.shallowCopy=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.jsonCopy=function(e){return JSON.parse(JSON.stringify(e))}},function(e,t,n){(function(e){var r=n(85).keccak_256,i=n(205);function a(e){return e?i.toUnicode(e,{useStd3ASCII:!0,transitional:!1}):e}t.hash=function(t){for(var n="",i=0;i<32;i++)n+="00";if(name=a(t),name){var s=name.split(".");for(i=s.length-1;i>=0;i--){var o=r(s[i]);n=r(new e(n+o,"hex"))}}return"0x"+n},t.normalize=a}).call(this,n(1).Buffer)},function(e,t,n){"use strict";var r=n(14),i=n(17),a=n(10),s=n(37),o=n(7).formatters,u=function(){var e=this;r.packageInit(this,arguments),this.net=new s(this.currentProvider);var t=null,n="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return t},set:function(e){return e&&(t=a.toChecksumAddress(o.inputAddressFormatter(e))),u.forEach((function(e){e.defaultAccount=t})),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return n},set:function(e){return n=e,u.forEach((function(e){e.defaultBlock=n})),e},enumerable:!0});var u=[new i({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:a.toChecksumAddress}),new i({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:a.toChecksumAddress}),new i({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[o.inputAddressFormatter,null,null]}),new i({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[o.inputAddressFormatter]}),new i({name:"importRawKey",call:"personal_importRawKey",params:2}),new i({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[o.inputTransactionFormatter,null]}),new i({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[o.inputTransactionFormatter,null]}),new i({name:"sign",call:"personal_sign",params:3,inputFormatter:[o.inputSignFormatter,o.inputAddressFormatter,null]}),new i({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[o.inputSignFormatter,null]})];u.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount}))};r.addProviders(u),e.exports=u},function(e,t,n){"use strict";var r=n(2).Buffer,i=n(26).Transform;function a(e){i.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(0)(a,i),a.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)n[a++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)n[this._blockOffset++]=e[i++];for(var s=0,o=8*e.length;o>0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=a},function(e,t,n){var r=n(0),i=n(21),a=n(2).Buffer,s=[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],o=new Array(64);function u(){this.init(),this._w=o,i.call(this,64,56)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(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}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,u=0|this._e,y=0|this._f,h=0|this._g,m=0|this._h,b=0;b<16;++b)n[b]=e.readInt32BE(4*b);for(;b<64;++b)n[b]=0|(((t=n[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[b-7]+p(n[b-15])+n[b-16];for(var g=0;g<64;++g){var _=m+f(u)+l(u,y,h)+s[g]+n[g]|0,v=d(r)+c(r,i,a)|0;m=h,h=y,y=u,u=o+_|0,o=a,a=i,i=r,r=_+v|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0,this._f=y+this._f|0,this._g=h+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=a.allocUnsafe(32);return 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),e},e.exports=u},function(e,t,n){var r=n(0),i=n(21),a=n(2).Buffer,s=[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],o=new Array(160);function u(){this.init(),this._w=o,i.call(this,128,112)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(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 y(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 b(e,t){return e>>>0<t>>>0?1:0}r(u,i),u.prototype.init=function(){return 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,this},u.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,a=0|this._dh,o=0|this._eh,u=0|this._fh,g=0|this._gh,_=0|this._hh,v=0|this._al,w=0|this._bl,T=0|this._cl,I=0|this._dl,S=0|this._el,A=0|this._fl,D=0|this._gl,E=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var x=t[C-30],M=t[C-30+1],k=p(x,M),N=y(M,x),P=h(x=t[C-4],M=t[C-4+1]),L=m(M,x),R=t[C-14],O=t[C-14+1],B=t[C-32],j=t[C-32+1],V=N+O|0,U=k+R+b(V,N)|0;U=(U=U+P+b(V=V+L|0,L)|0)+B+b(V=V+j|0,j)|0,t[C]=U,t[C+1]=V}for(var z=0;z<160;z+=2){U=t[z],V=t[z+1];var q=c(n,r,i),$=c(v,w,T),F=d(n,v),H=d(v,n),G=f(o,S),Y=f(S,o),Q=s[z],Z=s[z+1],K=l(o,u,g),W=l(S,A,D),J=E+Y|0,X=_+G+b(J,E)|0;X=(X=(X=X+K+b(J=J+W|0,W)|0)+Q+b(J=J+Z|0,Z)|0)+U+b(J=J+V|0,V)|0;var ee=H+$|0,te=F+q+b(ee,H)|0;_=g,E=D,g=u,D=A,u=o,A=S,o=a+X+b(S=I+J|0,I)|0,a=i,I=T,i=r,T=w,r=n,w=v,n=X+te+b(v=J+ee|0,J)|0}this._al=this._al+v|0,this._bl=this._bl+w|0,this._cl=this._cl+T|0,this._dl=this._dl+I|0,this._el=this._el+S|0,this._fl=this._fl+A|0,this._gl=this._gl+D|0,this._hl=this._hl+E|0,this._ah=this._ah+n+b(this._al,v)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+i+b(this._cl,T)|0,this._dh=this._dh+a+b(this._dl,I)|0,this._eh=this._eh+o+b(this._el,S)|0,this._fh=this._fh+u+b(this._fl,A)|0,this._gh=this._gh+g+b(this._gl,D)|0,this._hh=this._hh+_+b(this._hl,E)|0},u.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return 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),e},e.exports=u},function(e,t,n){"use strict";var r=n(0),i=n(221),a=n(12),s=n(2).Buffer,o=n(93),u=n(52),l=n(53),c=s.alloc(128);function d(e,t){a.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new u:l(e)).update(t).digest():t.length<n&&(t=s.concat([t,c],n));for(var r=this._ipad=s.allocUnsafe(n),i=this._opad=s.allocUnsafe(n),o=0;o<n;o++)r[o]=54^t[o],i[o]=92^t[o];this._hash="rmd160"===e?new u:l(e),this._hash.update(r)}r(d,a),d.prototype._update=function(e){this._hash.update(e)},d.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:l(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new d("rmd160",t):"md5"===e?new i(o,t):new d(e,t)}},function(e,t,n){var r=n(51);e.exports=function(e){return(new r).update(e).digest()}},function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(e,t,n){t.pbkdf2=n(223),t.pbkdf2Sync=n(98)},function(e,t,n){(function(t){var n=Math.pow(2,30)-1;function r(e,n){if("string"!=typeof e&&!t.isBuffer(e))throw new TypeError(n+" must be a buffer or string")}e.exports=function(e,t,i,a){if(r(e,"Password"),r(t,"Salt"),"number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof a)throw new TypeError("Key length not a number");if(a<0||a>n||a!=a)throw new TypeError("Bad key length")}}).call(this,n(1).Buffer)},function(e,t,n){(function(t){var n;t.browser?n="utf-8":n=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=n}).call(this,n(6))},function(e,t,n){var r=n(93),i=n(52),a=n(53),s=n(96),o=n(97),u=n(2).Buffer,l=u.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,n){var s=function(e){function t(t){return a(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?r:t}(e),o="sha512"===e||"sha384"===e?128:64;t.length>o?t=s(t):t.length<o&&(t=u.concat([t,l],o));for(var d=u.allocUnsafe(o+c[e]),f=u.allocUnsafe(o+c[e]),p=0;p<o;p++)d[p]=54^t[p],f[p]=92^t[p];var y=u.allocUnsafe(o+n+4);d.copy(y,0,0,o),this.ipad1=y,this.ipad2=d,this.opad=f,this.alg=e,this.blocksize=o,this.hash=s,this.size=c[e]}d.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,n,r,i){s(e,t,n,r),u.isBuffer(e)||(e=u.from(e,o)),u.isBuffer(t)||(t=u.from(t,o));var a=new d(i=i||"sha1",e,t.length),l=u.allocUnsafe(r),f=u.allocUnsafe(t.length+4);t.copy(f,0,0,t.length);for(var p=0,y=c[i],h=Math.ceil(r/y),m=1;m<=h;m++){f.writeUInt32BE(m,t.length);for(var b=a.run(f,a.ipad1),g=b,_=1;_<n;_++){g=a.run(g,a.ipad2);for(var v=0;v<y;v++)b[v]^=g[v]}b.copy(l,p),p+=y}return l}},function(e,t,n){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var i=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1}n[r+0]=i>>>0,n[r+1]=a>>>0},t.rip=function(e,t,n,r){for(var i=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)i<<=1,i|=t>>>o+s&1,i<<=1,i|=e>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=t>>>o+s&1,a<<=1,a|=e>>>o+s&1;n[r+0]=i>>>0,n[r+1]=a>>>0},t.pc1=function(e,t,n,r){for(var i=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+s&1}for(o=0;o<=24;o+=8)i<<=1,i|=t>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;n[r+0]=i>>>0,n[r+1]=a>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var a=0,s=0,o=r.length>>>1,u=0;u<o;u++)a<<=1,a|=e>>>r[u]&1;for(u=o;u<r.length;u++)s<<=1,s|=t>>>r[u]&1;n[i+0]=a>>>0,n[i+1]=s>>>0},t.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)r<<=6,r|=e>>>a&63;for(a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(t>>>18-6*r&63)]}return n>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n<a.length;n++)t<<=1,t|=e>>>a[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var i=[],a=0;a<t;a+=n)i.push(r.slice(a,a+n));return i.join(" ")}},function(e,t,n){"use strict";var r=n(8),i=n(0),a=n(99),s=n(54);function o(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new o;this._desState=t,this.deriveKeys(t,e.key)}i(u,s),e.exports=u,u.create=function(e){return new u(e)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),r.equal(t.length,this.blockSize,"Invalid key length");var n=a.readUInt32BE(t,0),i=a.readUInt32BE(t,4);a.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var o=l[s>>>1];n=a.r28shl(n,o),i=a.r28shl(i,o),a.pc2(n,i,e.keys,s)}},u.prototype._update=function(e,t,n,r){var i=this._desState,s=a.readUInt32BE(e,t),o=a.readUInt32BE(e,t+4);a.ip(s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,o,i.tmp,0):this._decrypt(i,s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],a.writeUInt32BE(n,s,r),a.writeUInt32BE(n,o,r+4)},u.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)r.equal(e[n],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,n,r,i){for(var s=t,o=n,u=0;u<e.keys.length;u+=2){var l=e.keys[u],c=e.keys[u+1];a.expand(o,e.tmp,0),l^=e.tmp[0],c^=e.tmp[1];var d=a.substitute(l,c),f=o;o=(s^a.permute(d))>>>0,s=f}a.rip(o,s,r,i)},u.prototype._decrypt=function(e,t,n,r,i){for(var s=n,o=t,u=e.keys.length-2;u>=0;u-=2){var l=e.keys[u],c=e.keys[u+1];a.expand(s,e.tmp,0),l^=e.tmp[0],c^=e.tmp[1];var d=a.substitute(l,c),f=s;s=(o^a.permute(d))>>>0,o=f}a.rip(s,o,r,i)}},function(e,t,n){var r=n(27),i=n(2).Buffer,a=n(102);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return a(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),a=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var o=0;o<n;o++){var u=s(e),l=a+16*o;e._cache.writeUInt32BE(u[0],l+0),e._cache.writeUInt32BE(u[1],l+4),e._cache.writeUInt32BE(u[2],l+8),e._cache.writeUInt32BE(u[3],l+12)}var c=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,c)}},function(e,t){e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(e,t,n){var r=n(39),i=n(2).Buffer,a=n(12),s=n(0),o=n(236),u=n(27),l=n(102);function c(e,t,n,s){a.call(this);var u=i.alloc(4,0);this._cipher=new r.AES(t);var c=this._cipher.encryptBlock(u);this._ghash=new o(c),n=function(e,t,n){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var r=new o(n),a=t.length,s=a%16;r.update(t),s&&(s=16-s,r.update(i.alloc(s,0))),r.update(i.alloc(8,0));var u=8*a,c=i.alloc(8);c.writeUIntBE(u,0,8),r.update(c),e._finID=r.state;var d=i.from(e._finID);return l(d),d}(this,n,c),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(c,a),c.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},c.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},c.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=c},function(e,t,n){var r=n(39),i=n(2).Buffer,a=n(12);function s(e,t,n,s){a.call(this),this._cipher=new r.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=e}n(0)(s,a),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},function(e,t,n){var r=n(15);e.exports=g,g.simpleSieve=m,g.fermatTest=b;var i=n(3),a=new i(24),s=new(n(107)),o=new i(1),u=new i(2),l=new i(5),c=(new i(16),new i(8),new i(10)),d=new i(3),f=(new i(7),new i(11)),p=new i(4),y=(new i(12),null);function h(){if(null!==y)return y;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<t&&e[i]<=r&&n%e[i]!=0;i++);t!==i&&e[i]<=r||(e[t++]=n)}return y=e,e}function m(e){for(var t=h(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function b(e){var t=i.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function g(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var n,y;for(t=new i(t);;){for(n=new i(r(Math.ceil(e/8)));n.bitLength()>e;)n.ishrn(1);if(n.isEven()&&n.iadd(o),n.testn(1)||n.iadd(u),t.cmp(u)){if(!t.cmp(l))for(;n.mod(c).cmp(d);)n.iadd(p)}else for(;n.mod(a).cmp(f);)n.iadd(p);if(m(y=n.shrn(1))&&m(n)&&b(y)&&b(n)&&s.test(y)&&s.test(n))return n}}},function(e,t,n){var r=n(3),i=n(57);function a(e){this.rand=e||new i.Rand}e.exports=a,a.create=function(e){return new a(e)},a.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(e)>=0);return i},a.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},a.prototype.test=function(e,t,n){var i=e.bitLength(),a=r.mont(e),s=new r(1).toRed(a);t||(t=Math.max(1,i/48|0));for(var o=e.subn(1),u=0;!o.testn(u);u++);for(var l=e.shrn(u),c=o.toRed(a);t>0;t--){var d=this._randrange(new r(2),o);n&&n(d);var f=d.toRed(a).redPow(l);if(0!==f.cmp(s)&&0!==f.cmp(c)){for(var p=1;p<u;p++){if(0===(f=f.redSqr()).cmp(s))return!1;if(0===f.cmp(c))break}if(p===u)return!1}}return!0},a.prototype.getDivisor=function(e,t){var n=e.bitLength(),i=r.mont(e),a=new r(1).toRed(i);t||(t=Math.max(1,n/48|0));for(var s=e.subn(1),o=0;!s.testn(o);o++);for(var u=e.shrn(o),l=s.toRed(i);t>0;t--){var c=this._randrange(new r(2),s),d=e.gcd(c);if(0!==d.cmpn(1))return d;var f=c.toRed(i).redPow(u);if(0!==f.cmp(a)&&0!==f.cmp(l)){for(var p=1;p<o;p++){if(0===(f=f.redSqr()).cmp(a))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(l))break}if(p===o)return(f=f.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,n){"use strict";var r=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).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 i=e.charCodeAt(r),a=i>>8,s=255&i;a?n.push(a,s):n.push(s)}return n},r.zero2=i,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t,n){"use strict";var r=t;r.base=n(41),r.short=n(246),r.mont=n(247),r.edwards=n(248)},function(e,t,n){"use strict";var r=n(11).rotr32;function i(e,t,n){return e&t^~e&n}function a(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?s(t,n,r):2===e?a(t,n,r):void 0},t.ch32=i,t.maj32=a,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";var r=n(11),i=n(29),a=n(110),s=n(8),o=r.sum32,u=r.sum32_4,l=r.sum32_5,c=a.ch32,d=a.maj32,f=a.s0_256,p=a.s1_256,y=a.g0_256,h=a.g1_256,m=i.BlockHash,b=[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 g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}r.inherits(g,m),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=u(h(n[r-2]),n[r-7],y(n[r-15]),n[r-16]);var i=this.h[0],a=this.h[1],m=this.h[2],b=this.h[3],g=this.h[4],_=this.h[5],v=this.h[6],w=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var T=l(w,p(g),c(g,_,v),this.k[r],n[r]),I=o(f(i),d(i,a,m));w=v,v=_,_=g,g=o(b,T),b=m,m=a,a=i,i=o(T,I)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],m),this.h[3]=o(this.h[3],b),this.h[4]=o(this.h[4],g),this.h[5]=o(this.h[5],_),this.h[6]=o(this.h[6],v),this.h[7]=o(this.h[7],w)},g.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(11),i=n(29),a=n(8),s=r.rotr64_hi,o=r.rotr64_lo,u=r.shr64_hi,l=r.shr64_lo,c=r.sum64,d=r.sum64_hi,f=r.sum64_lo,p=r.sum64_4_hi,y=r.sum64_4_lo,h=r.sum64_5_hi,m=r.sum64_5_lo,b=i.BlockHash,g=[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 _(){if(!(this instanceof _))return new _;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function v(e,t,n,r,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function w(e,t,n,r,i,a){var s=t&r^~t&a;return s<0&&(s+=4294967296),s}function T(e,t,n,r,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function I(e,t,n,r,i,a){var s=t&r^t&a^r&a;return s<0&&(s+=4294967296),s}function S(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function A(e,t){var n=o(e,t,28)^o(t,e,2)^o(t,e,7);return n<0&&(n+=4294967296),n}function D(e,t){var n=s(e,t,14)^s(e,t,18)^s(t,e,9);return n<0&&(n+=4294967296),n}function E(e,t){var n=o(e,t,14)^o(e,t,18)^o(t,e,9);return n<0&&(n+=4294967296),n}function C(e,t){var n=s(e,t,1)^s(e,t,8)^u(e,t,7);return n<0&&(n+=4294967296),n}function x(e,t){var n=o(e,t,1)^o(e,t,8)^l(e,t,7);return n<0&&(n+=4294967296),n}function M(e,t){var n=s(e,t,19)^s(t,e,29)^u(e,t,6);return n<0&&(n+=4294967296),n}function k(e,t){var n=o(e,t,19)^o(t,e,29)^l(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(_,b),e.exports=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=M(n[r-4],n[r-3]),a=k(n[r-4],n[r-3]),s=n[r-14],o=n[r-13],u=C(n[r-30],n[r-29]),l=x(n[r-30],n[r-29]),c=n[r-32],d=n[r-31];n[r]=p(i,a,s,o,u,l,c,d),n[r+1]=y(i,a,s,o,u,l,c,d)}},_.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],u=this.h[4],l=this.h[5],p=this.h[6],y=this.h[7],b=this.h[8],g=this.h[9],_=this.h[10],C=this.h[11],x=this.h[12],M=this.h[13],k=this.h[14],N=this.h[15];a(this.k.length===n.length);for(var P=0;P<n.length;P+=2){var L=k,R=N,O=D(b,g),B=E(b,g),j=v(b,g,_,C,x),V=w(b,g,_,C,x,M),U=this.k[P],z=this.k[P+1],q=n[P],$=n[P+1],F=h(L,R,O,B,j,V,U,z,q,$),H=m(L,R,O,B,j,V,U,z,q,$);L=S(r,i),R=A(r,i),O=T(r,i,s,o,u),B=I(r,i,s,o,u,l);var G=d(L,R,O,B),Y=f(L,R,O,B);k=x,N=M,x=_,M=C,_=b,C=g,b=d(p,y,F,H),g=f(y,y,F,H),p=u,y=l,u=s,l=o,s=r,o=i,r=d(F,H,G,Y),i=f(F,H,G,Y)}c(this.h,0,r,i),c(this.h,2,s,o),c(this.h,4,u,l),c(this.h,6,p,y),c(this.h,8,b,g),c(this.h,10,_,C),c(this.h,12,x,M),c(this.h,14,k,N)},_.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){var r=n(0),i=n(31).Reporter,a=n(1).Buffer;function s(e,t){i.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof o||(e=new o(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(s,i),t.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var n=new s(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=o,o.prototype.join=function(e,t){return e||(e=new a(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,n){var r=t;r._reverse=function(e){var t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);var r=e[n];t[r]=n})),t},r.der=n(268)},function(e,t,n){var r=n(0),i=n(30),a=i.base,s=i.bignum,o=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){a.Node.call(this,"der",e)}function c(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var r=o.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){var a=n;for(n=0;128==(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;n<<=7,n|=127&a}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:o.tag[n]}}function d(e,t,n){var r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;var i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(var a=0;a<i;a++){r<<=8;var s=e.readUInt8(n);if(e.isError(s))return s;r|=s}return r}e.exports=u,u.prototype.decode=function(e,t){return e instanceof a.DecoderBuffer||(e=new a.DecoderBuffer(e,t)),this.tree._decode(e,t)},r(l,a.Node),l.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;var r=e.save(),i=c(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(r),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||n)},l.prototype._decodeTag=function(e,t,n){var r=c(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;var i=d(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var a=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(i=e.offset-a.offset,e.restore(a),e.skip(i,'Failed to match body of: "'+t+'"'))},l.prototype._skipUntilEnd=function(e,t){for(;;){var n=c(e,t);if(e.isError(n))return n;var r,i=d(e,n.primitive,t);if(e.isError(i))return i;if(r=n.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(r))return r;if("end"===n.tagStr)break}},l.prototype._decodeList=function(e,t,n,r){for(var i=[];!e.isEmpty();){var a=this._peekTag(e,"end");if(e.isError(a))return a;var s=n.decode(e,"der",r);if(e.isError(s)&&a)break;i.push(s)}return i},l.prototype._decodeStr=function(e,t){if("bitstr"===t){var n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}if("bmpstr"===t){var r=e.raw();if(r.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",a=0;a<r.length/2;a++)i+=String.fromCharCode(r.readUInt16BE(2*a));return i}if("numstr"===t){var s=e.raw().toString("ascii");return this._isNumstr(s)?s:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var o=e.raw().toString("ascii");return this._isPrintstr(o)?o:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},l.prototype._decodeObjid=function(e,t,n){for(var r,i=[],a=0;!e.isEmpty();){var s=e.readUInt8();a<<=7,a|=127&s,0==(128&s)&&(i.push(a),a=0)}128&s&&i.push(a);var o=i[0]/40|0,u=i[0]%40;if(r=n?i:[o,u].concat(i.slice(1)),t){var l=t[r.join(" ")];void 0===l&&(l=t[r.join(".")]),void 0!==l&&(r=l)}return r},l.prototype._decodeTime=function(e,t){var n=e.raw().toString();if("gentime"===t)var r=0|n.slice(0,4),i=0|n.slice(4,6),a=0|n.slice(6,8),s=0|n.slice(8,10),o=0|n.slice(10,12),u=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),a=0|n.slice(4,6),s=0|n.slice(6,8),o=0|n.slice(8,10),u=0|n.slice(10,12);r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,a,s,o,u,0)},l.prototype._decodeNull=function(e){return null},l.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},l.prototype._decodeInt=function(e,t){var n=e.raw(),r=new s(n);return t&&(r=t[r.toString(10)]||r),r},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e,t,n){var r=n(0),i=n(1).Buffer,a=n(30),s=a.base,o=a.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){s.Node.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(l,s.Node),l.prototype._encodeComposite=function(e,t,n,r){var a,s=function(e,t,n,r){var i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(o.tagByName.hasOwnProperty(e))i=o.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}if(i>=31)return r.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=o.tagClassByName[n||"universal"]<<6}(e,t,n,this.reporter);if(r.length<128)return(a=new i(2))[0]=s,a[1]=r.length,this._createEncoderBuffer([a,r]);for(var u=1,l=r.length;l>=256;l>>=8)u++;(a=new i(2+u))[0]=s,a[1]=128|u;l=1+u;for(var c=r.length;c>0;l--,c>>=8)a[l]=255&c;return this._createEncoderBuffer([a,r])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new i(2*e.length),r=0;r<e.length;r++)n.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(n)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},l.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var r=0;r<e.length;r++)e[r]|=0}else if(Array.isArray(e)){e=e.slice();for(r=0;r<e.length;r++)e[r]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var a=0;for(r=0;r<e.length;r++){var s=e[r];for(a++;s>=128;s>>=7)a++}var o=new i(a),u=o.length-1;for(r=e.length-1;r>=0;r--){s=e[r];for(o[u--]=127&s;(s>>=7)>0;)o[u--]=128|127&s}return this._createEncoderBuffer(o)},l.prototype._encodeTime=function(e,t){var n,r=new Date(e);return"gentime"===t?n=[c(r.getFullYear()),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[c(r.getFullYear()%100),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new i(n)}if(i.isBuffer(e)){var r=e.length;0===e.length&&r++;var a=new i(r);return e.copy(a),0===e.length&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);r=1;for(var s=e;s>=256;s>>=8)r++;for(s=(a=new Array(r)).length-1;s>=0;s--)a[s]=255&e,e>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new i(a))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,n){var r,i=this._baseState;if(null===i.default)return!1;var a=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,n).join()),a.length!==i.defaultBuffer.length)return!1;for(r=0;r<a.length;r++)if(a[r]!==i.defaultBuffer[r])return!1;return!0}},function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(e,t,n){var r=n(19),i=n(2).Buffer;function a(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,s=i.alloc(0),o=0;s.length<t;)n=a(o++),s=i.concat([s,r("sha1").update(e).update(n).digest()]);return s.slice(0,t)}},function(e,t){e.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}},function(e,t,n){var r=n(3),i=n(2).Buffer;e.exports=function(e,t){return i.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},function(e,t){e.exports={encode:e=>{const t=e=>{return(t=e.toString(16)).length%2==0?t:"0"+t;var t},n=(e,n)=>e<56?t(n+e):t(n+t(e).length/2+55)+t(e),r=e=>{if("string"==typeof e){const t=e.slice(2);return(2!=t.length||t>="80"?n(t.length/2,128):"")+t}{const t=e.map(r).join("");return n(t.length/2,192)+t}};return"0x"+r(e)},decode:e=>{let t=2;const n=()=>{if(t>=e.length)throw"";const n=e.slice(t,t+2);return n<"80"?(t+=2,"0x"+n):n<"c0"?i():a()},r=()=>{const n=parseInt(e.slice(t,t+=2),16)%64;return n<56?n:parseInt(e.slice(t,t+=2*(n-55)),16)},i=()=>{const n=r();return"0x"+e.slice(t,t+=2*n)},a=()=>{const e=2*r()+t;let i=[];for(;t<e;)i.push(n());return i};try{return n()}catch(e){return[]}}}},function(e,t){const n="0123456789abcdef".split(""),r=[1,256,65536,16777216],i=[0,8,16,24],a=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=e=>{var t,n,r,i,s,o,u,l,c,d,f,p,y,h,m,b,g,_,v,w,T,I,S,A,D,E,C,x,M,k,N,P,L,R,O,B,j,V,U,z,q,$,F,H,G,Y,Q,Z,K,W,J,X,ee,te,ne,re,ie,ae,se,oe,ue,le,ce;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],s=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|u>>>31),n=(y=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|o>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(l<<1|c>>>31),n=s^(c<<1|l>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=o^(d<<1|f>>>31),n=u^(f<<1|d>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=l^(p<<1|y>>>31),n=c^(y<<1|p>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=d^(i<<1|s>>>31),n=f^(s<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,h=e[0],m=e[1],Y=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,x=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,$=e[40]<<18|e[41]>>>14,F=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,b=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,K=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,_=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,W=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,D=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,V=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,T=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,E=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,ae=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,I=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=h^~b&_,e[1]=m^~g&v,e[10]=A^~E&x,e[11]=D^~C&M,e[20]=R^~B&V,e[21]=O^~j&U,e[30]=H^~Y&Z,e[31]=G^~Q&K,e[40]=te^~re&ae,e[41]=ne^~ie&se,e[2]=b^~_&w,e[3]=g^~v&T,e[12]=E^~x&k,e[13]=C^~M&N,e[22]=B^~V&z,e[23]=j^~U&q,e[32]=Y^~Z&W,e[33]=Q^~K&J,e[42]=re^~ae&oe,e[43]=ie^~se&ue,e[4]=_^~w&I,e[5]=v^~T&S,e[14]=x^~k&P,e[15]=M^~N&L,e[24]=V^~z&$,e[25]=U^~q&F,e[34]=Z^~W&X,e[35]=K^~J&ee,e[44]=ae^~oe&le,e[45]=se^~ue&ce,e[6]=w^~I&h,e[7]=T^~S&m,e[16]=k^~P&A,e[17]=N^~L&D,e[26]=z^~$&R,e[27]=q^~F&O,e[36]=W^~X&H,e[37]=J^~ee&G,e[46]=oe^~le&te,e[47]=ue^~ce&ne,e[8]=I^~h&b,e[9]=S^~m&g,e[18]=P^~A&E,e[19]=L^~D&C,e[28]=$^~R&B,e[29]=F^~O&j,e[38]=X^~H&Y,e[39]=ee^~G&Q,e[48]=le^~te&re,e[49]=ce^~ne&ie,e[0]^=a[r],e[1]^=a[r+1]},o=e=>t=>{var a;if("0x"===t.slice(0,2)){a=[];for(var o=2,u=t.length;o<u;o+=2)a.push(parseInt(t.slice(o,o+2),16))}else a=t;return((e,t)=>{for(var a,o=t.length,u=e.blocks,l=e.blockCount<<2,c=e.blockCount,d=e.outputBlocks,f=e.s,p=0;p<o;){if(e.reset)for(e.reset=!1,u[0]=e.block,m=1;m<c+1;++m)u[m]=0;if("string"!=typeof t)for(m=e.start;p<o&&m<l;++p)u[m>>2]|=t[p]<<i[3&m++];else for(m=e.start;p<o&&m<l;++p)(a=t.charCodeAt(p))<128?u[m>>2]|=a<<i[3&m++]:a<2048?(u[m>>2]|=(192|a>>6)<<i[3&m++],u[m>>2]|=(128|63&a)<<i[3&m++]):a<55296||a>=57344?(u[m>>2]|=(224|a>>12)<<i[3&m++],u[m>>2]|=(128|a>>6&63)<<i[3&m++],u[m>>2]|=(128|63&a)<<i[3&m++]):(a=65536+((1023&a)<<10|1023&t.charCodeAt(++p)),u[m>>2]|=(240|a>>18)<<i[3&m++],u[m>>2]|=(128|a>>12&63)<<i[3&m++],u[m>>2]|=(128|a>>6&63)<<i[3&m++],u[m>>2]|=(128|63&a)<<i[3&m++]);if(e.lastByteIndex=m,m>=l){for(e.start=m-l,e.block=u[c],m=0;m<c;++m)f[m]^=u[m];s(f),e.reset=!0}else e.start=m}if(u[(m=e.lastByteIndex)>>2]|=r[3&m],e.lastByteIndex===l)for(u[0]=u[c],m=1;m<c+1;++m)u[m]=0;for(u[c-1]|=2147483648,m=0;m<c;++m)f[m]^=u[m];s(f);for(var y,h="",m=0,b=0;b<d;){for(m=0;m<c&&b<d;++m,++b)y=f[m],h+=n[y>>4&15]+n[15&y]+n[y>>12&15]+n[y>>8&15]+n[y>>20&15]+n[y>>16&15]+n[y>>28&15]+n[y>>24&15];b%c==0&&(s(f),m=0)}return"0x"+h})((e=>{return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t})(e),a)};e.exports={keccak256:o(256),keccak512:o(512),keccak256s:o(256),keccak512s:o(512)}},function(e,t,n){(function(t,r){const i=n(18);function a(e,t,n,r,i,a,s){let c;for(l(e,t+64*(2*r-1),i,0,64),c=0;c<2*r;c++)u(e,64*c,i,0,64),o(i,a,s),l(i,0,e,n+64*c,64);for(c=0;c<r;c++)l(e,n+2*c*64,e,t+64*c,64);for(c=0;c<r;c++)l(e,n+64*(2*c+1),e,t+64*(c+r),64)}function s(e,t){return e<<t|e>>>32-t}function o(e,t,n){let r;for(r=0;r<16;r++)t[r]=(255&e[4*r+0])<<0,t[r]|=(255&e[4*r+1])<<8,t[r]|=(255&e[4*r+2])<<16,t[r]|=(255&e[4*r+3])<<24;for(l(t,0,n,0,16),r=8;r>0;r-=2)n[4]^=s(n[0]+n[12],7),n[8]^=s(n[4]+n[0],9),n[12]^=s(n[8]+n[4],13),n[0]^=s(n[12]+n[8],18),n[9]^=s(n[5]+n[1],7),n[13]^=s(n[9]+n[5],9),n[1]^=s(n[13]+n[9],13),n[5]^=s(n[1]+n[13],18),n[14]^=s(n[10]+n[6],7),n[2]^=s(n[14]+n[10],9),n[6]^=s(n[2]+n[14],13),n[10]^=s(n[6]+n[2],18),n[3]^=s(n[15]+n[11],7),n[7]^=s(n[3]+n[15],9),n[11]^=s(n[7]+n[3],13),n[15]^=s(n[11]+n[7],18),n[1]^=s(n[0]+n[3],7),n[2]^=s(n[1]+n[0],9),n[3]^=s(n[2]+n[1],13),n[0]^=s(n[3]+n[2],18),n[6]^=s(n[5]+n[4],7),n[7]^=s(n[6]+n[5],9),n[4]^=s(n[7]+n[6],13),n[5]^=s(n[4]+n[7],18),n[11]^=s(n[10]+n[9],7),n[8]^=s(n[11]+n[10],9),n[9]^=s(n[8]+n[11],13),n[10]^=s(n[9]+n[8],18),n[12]^=s(n[15]+n[14],7),n[13]^=s(n[12]+n[15],9),n[14]^=s(n[13]+n[12],13),n[15]^=s(n[14]+n[13],18);for(r=0;r<16;++r)t[r]=n[r]+t[r];for(r=0;r<16;r++){let n=4*r;e[n+0]=t[r]>>0&255,e[n+1]=t[r]>>8&255,e[n+2]=t[r]>>16&255,e[n+3]=t[r]>>24&255}}function u(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]^=e[t+a]}function l(e,n,r,i,a){if(t.isBuffer(e)&&t.isBuffer(r))e.copy(r,i,n,n+a);else for(;a--;)r[i++]=e[n++]}e.exports={checkAndInit:function(e,n,r,a,s,o,u){if(0===r||0!=(r&r-1))throw Error("N must be > 0 and a power of 2");if(r>2147483647/128/a)throw Error("Parameter N is too large");if(a>2147483647/128/s)throw Error("Parameter r is too large");let l,c=t.alloc(256*a),d=t.alloc(128*a*r),f=new Int32Array(16),p=new Int32Array(16),y=t.alloc(64),h=i.pbkdf2Sync(e,n,1,128*s*a,"sha256");if(u){let e=s*r*2,t=0;l=function(){++t,t%1e3==0&&u({current:t,total:e,percent:t/e*100})}}return{XY:c,V:d,B32:f,x:p,_X:y,B:h,tickCallback:l}},smix:async function(e,t,n,i,s,o,l,c,d,f,p){p=p||5e3;let y,h=128*n;for(e.copy(o,0,t,t+h),y=0;y<i;y++)o.copy(s,y*h,0,0+h),y%p==0&&await new Promise(e=>r(e)),a(o,0,h,n,l,c,d),f&&f();for(y=0;y<i;y++){let e=0+64*(2*n-1);u(s,(o.readUInt32LE(e)&i-1)*h,o,0,h),y%p==0&&await new Promise(e=>r(e)),a(o,0,h,n,l,c,d),f&&f()}o.copy(e,t,0,0+h)},smixSync:function(e,t,n,r,i,s,o,l,c,d){let f,p=128*n;for(e.copy(s,0,t,t+p),f=0;f<r;f++)s.copy(i,f*p,0,0+p),a(s,0,p,n,o,l,c),d&&d();for(f=0;f<r;f++){let e=0+64*(2*n-1);u(i,(s.readUInt32LE(e)&r-1)*p,s,0,p),a(s,0,p,n,o,l,c),d&&d()}s.copy(e,t,0,0+p)}}}).call(this,n(1).Buffer,n(47).setImmediate)},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(127),a=n(130),s=n(1),o=new i.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=function(){function e(e,t){if(void 0===e&&(e={}),void 0===t&&(t={}),t.common){if(t.chain||t.hardfork)throw new Error("Instantiation with both opts.common, and opts.chain and opts.hardfork parameter not allowed!");this._common=t.common}else{var n=t.chain?t.chain:"mainnet",r=t.hardfork?t.hardfork:"petersburg";this._common=new a.default(n,r)}var o=[{name:"nonce",length:32,allowLess:!0,default:new s.Buffer([])},{name:"gasPrice",length:32,allowLess:!0,default:new s.Buffer([])},{name:"gasLimit",alias:"gas",length:32,allowLess:!0,default:new s.Buffer([])},{name:"to",allowZero:!0,length:20,default:new s.Buffer([])},{name:"value",length:32,allowLess:!0,default:new s.Buffer([])},{name:"data",alias:"input",allowZero:!0,default:new s.Buffer([])},{name:"v",allowZero:!0,default:new s.Buffer([])},{name:"r",length:32,allowZero:!0,allowLess:!0,default:new s.Buffer([])},{name:"s",length:32,allowZero:!0,allowLess:!0,default:new s.Buffer([])}];i.defineProperties(this,o,e),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,get:this.getSenderAddress.bind(this)}),this._validateV(this.v),this._overrideVSetterWithValidation()}return e.prototype.toCreationAddress=function(){return""===this.to.toString("hex")},e.prototype.hash=function(e){var t;return void 0===e&&(e=!0),t=e?this.raw:this._implementsEIP155()?this.raw.slice(0,6).concat([i.toBuffer(this.getChainId()),i.stripZeros(i.toBuffer(0)),i.stripZeros(i.toBuffer(0))]):this.raw.slice(0,6),i.rlphash(t)},e.prototype.getChainId=function(){return this._common.chainId()},e.prototype.getSenderAddress=function(){if(this._from)return this._from;var e=this.getSenderPublicKey();return this._from=i.publicToAddress(e),this._from},e.prototype.getSenderPublicKey=function(){if(!this.verifySignature())throw new Error("Invalid Signature");return this._senderPubKey},e.prototype.verifySignature=function(){var e=this.hash(!1);if(this._common.gteHardfork("homestead")&&1===new i.BN(this.s).cmp(o))return!1;try{var t=i.bufferToInt(this.v),n=t>=2*this.getChainId()+35&&this._common.gteHardfork("spuriousDragon");this._senderPubKey=i.ecrecover(e,t,this.r,this.s,n?this.getChainId():void 0)}catch(e){return!1}return!!this._senderPubKey},e.prototype.sign=function(e){this.v=new s.Buffer([]),this.s=new s.Buffer([]),this.r=new s.Buffer([]);var t=this.hash(!1),n=i.ecsign(t,e);this._implementsEIP155()&&(n.v+=2*this.getChainId()+8),Object.assign(this,n)},e.prototype.getDataFee=function(){for(var e=this.raw[5],t=new i.BN(0),n=0;n<e.length;n++)0===e[n]?t.iaddn(this._common.param("gasPrices","txDataZero")):t.iaddn(this._common.param("gasPrices","txDataNonZero"));return t},e.prototype.getBaseFee=function(){var e=this.getDataFee().iaddn(this._common.param("gasPrices","tx"));return this._common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this._common.param("gasPrices","txCreation")),e},e.prototype.getUpfrontCost=function(){return new i.BN(this.gasLimit).imul(new i.BN(this.gasPrice)).iadd(new i.BN(this.value))},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.verifySignature()||t.push("Invalid Signature"),this.getBaseFee().cmp(new i.BN(this.gasLimit))>0&&t.push(["gas limit is too low. Need at least "+this.getBaseFee()]),!1===e?0===t.length:t.join(" ")},e.prototype.serialize=function(){return i.rlp.encode(this.raw)},e.prototype.toJSON=function(e){return void 0===e&&(e=!1),{}},e.prototype._validateV=function(e){if(void 0!==e&&0!==e.length&&this._common.gteHardfork("spuriousDragon")){var t=i.bufferToInt(e);if(27!==t&&28!==t)if(!(t===2*this.getChainId()+35||t===2*this.getChainId()+36))throw new Error("Incompatible EIP155-based V "+t+" and chain id "+this.getChainId()+". See the second parameter of the Transaction constructor to set the chain id.")}},e.prototype._isSigned=function(){return this.v.length>0&&this.r.length>0&&this.s.length>0},e.prototype._overrideVSetterWithValidation=function(){var e=this,t=Object.getOwnPropertyDescriptor(this,"v");Object.defineProperty(this,"v",r({},t,{set:function(n){void 0!==n&&e._validateV(i.toBuffer(n)),t.set(n)}}))},e.prototype._implementsEIP155=function(){var e=this._common.gteHardfork("spuriousDragon");if(!this._isSigned())return e;var t=i.bufferToInt(this.v);return(t===2*this.getChainId()+35||t===2*this.getChainId()+36)&&e},e}();t.default=u},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var i=n(61);t.secp256k1=i;var a=n(32),s=n(3);t.BN=s;var o=n(62);t.rlp=o,Object.assign(t,a),r(n(296)),r(n(297)),r(n(64)),r(n(307)),r(n(33)),r(n(308))},function(e){e.exports=JSON.parse('{"COMPRESSED_TYPE_INVALID":"compressed should be a boolean","EC_PRIVATE_KEY_TYPE_INVALID":"private key should be a Buffer","EC_PRIVATE_KEY_LENGTH_INVALID":"private key length is invalid","EC_PRIVATE_KEY_RANGE_INVALID":"private key range is invalid","EC_PRIVATE_KEY_TWEAK_ADD_FAIL":"tweak out of range or resulting private key is invalid","EC_PRIVATE_KEY_TWEAK_MUL_FAIL":"tweak out of range","EC_PRIVATE_KEY_EXPORT_DER_FAIL":"couldn\'t export to DER format","EC_PRIVATE_KEY_IMPORT_DER_FAIL":"couldn\'t import from DER format","EC_PUBLIC_KEYS_TYPE_INVALID":"public keys should be an Array","EC_PUBLIC_KEYS_LENGTH_INVALID":"public keys Array should have at least 1 element","EC_PUBLIC_KEY_TYPE_INVALID":"public key should be a Buffer","EC_PUBLIC_KEY_LENGTH_INVALID":"public key length is invalid","EC_PUBLIC_KEY_PARSE_FAIL":"the public key could not be parsed or is invalid","EC_PUBLIC_KEY_CREATE_FAIL":"private was invalid, try again","EC_PUBLIC_KEY_TWEAK_ADD_FAIL":"tweak out of range or resulting public key is invalid","EC_PUBLIC_KEY_TWEAK_MUL_FAIL":"tweak out of range","EC_PUBLIC_KEY_COMBINE_FAIL":"the sum of the public keys is not valid","ECDH_FAIL":"scalar was invalid (zero or overflow)","ECDSA_SIGNATURE_TYPE_INVALID":"signature should be a Buffer","ECDSA_SIGNATURE_LENGTH_INVALID":"signature length is invalid","ECDSA_SIGNATURE_PARSE_FAIL":"couldn\'t parse signature","ECDSA_SIGNATURE_PARSE_DER_FAIL":"couldn\'t parse DER signature","ECDSA_SIGNATURE_SERIALIZE_DER_FAIL":"couldn\'t serialize signature to DER format","ECDSA_SIGN_FAIL":"nonce generation function failed or private key is invalid","ECDSA_RECOVER_FAIL":"couldn\'t recover public key from signature","MSG32_TYPE_INVALID":"message should be a Buffer","MSG32_LENGTH_INVALID":"message length is invalid","OPTIONS_TYPE_INVALID":"options should be an Object","OPTIONS_DATA_TYPE_INVALID":"options.data should be a Buffer","OPTIONS_DATA_LENGTH_INVALID":"options.data length is invalid","OPTIONS_NONCEFN_TYPE_INVALID":"options.noncefn should be a Function","RECOVERY_ID_TYPE_INVALID":"recovery should be a Number","RECOVERY_ID_VALUE_INVALID":"recovery should have value between -1 and 4","TWEAK_TYPE_INVALID":"tweak should be a Buffer","TWEAK_LENGTH_INVALID":"tweak length is invalid"}')},function(e,t,n){"use strict";(function(t){var r=n(63);function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function a(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var s=n(298),o=Object.prototype.hasOwnProperty,u=Array.prototype.slice,l="foo"===function(){}.name;function c(e){return Object.prototype.toString.call(e)}function d(e){return!a(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var f=e.exports=g,p=/\s*function\s+([^\(\s]*)\s*/;function y(e){if(s.isFunction(e)){if(l)return e.name;var t=e.toString().match(p);return t&&t[1]}}function h(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function m(e){if(l||!s.isFunction(e))return s.inspect(e);var t=y(e);return"[Function"+(t?": "+t:"")+"]"}function b(e,t,n,r,i){throw new f.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function g(e,t){e||b(e,!0,t,"==",f.ok)}function _(e,t,n,r){if(e===t)return!0;if(a(e)&&a(t))return 0===i(e,t);if(s.isDate(e)&&s.isDate(t))return e.getTime()===t.getTime();if(s.isRegExp(e)&&s.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(d(e)&&d(t)&&c(e)===c(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(a(e)!==a(t))return!1;var o=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==o&&o===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(s.isPrimitive(e)||s.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=v(e),a=v(t);if(i&&!a||!i&&a)return!1;if(i)return e=u.call(e),t=u.call(t),_(e,t,n);var o,l,c=I(e),d=I(t);if(c.length!==d.length)return!1;for(c.sort(),d.sort(),l=c.length-1;l>=0;l--)if(c[l]!==d[l])return!1;for(l=c.length-1;l>=0;l--)if(o=c[l],!_(e[o],t[o],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function T(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&b(i,n,"Missing expected exception"+r);var a="string"==typeof r,o=!e&&i&&!n;if((!e&&s.isError(i)&&a&&w(i,n)||o)&&b(i,n,"Got unwanted exception"+r),e&&i&&n&&!w(i,n)||!e&&i)throw i}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return h(m(e.actual),128)+" "+e.operator+" "+h(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=y(t),a=r.indexOf("\n"+i);if(a>=0){var s=r.indexOf("\n",a+1);r=r.substring(s+1)}this.stack=r}}},s.inherits(f.AssertionError,Error),f.fail=b,f.ok=g,f.equal=function(e,t,n){e!=t&&b(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&b(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){_(e,t,!1)||b(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){_(e,t,!0)||b(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){_(e,t,!1)&&b(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){_(t,n,!0)&&b(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&b(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&b(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){T(!0,e,t,n)},f.doesNotThrow=function(e,t,n){T(!1,e,t,n)},f.ifError=function(e){if(e)throw e},f.strict=r((function e(t,n){t||b(t,!0,n,"==",e)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var I=Object.keys||function(e){var t=[];for(var n in e)o.call(e,n)&&t.push(n);return t}}).call(this,n(4))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(309),a=n(315),s=function(){function e(e,t,n){this._chainParams=this.setChain(e),this._hardfork=null,this._supportedHardforks=void 0===n?[]:n,t&&this.setHardfork(t)}return e.forCustomChain=function(t,n,i,a){var s=e._getChainParams(t);return new e(r({},s,n),i,a)},e._getChainParams=function(e){if("number"==typeof e){if(i.chains.names[e])return i.chains[i.chains.names[e]];throw new Error("Chain with ID "+e+" not supported")}if(i.chains[e])return i.chains[e];throw new Error("Chain with name "+e+" not supported")},e.prototype.setChain=function(t){if("number"==typeof t||"string"==typeof t)this._chainParams=e._getChainParams(t);else{if("object"!=typeof t)throw new Error("Wrong input format");for(var n=0,r=["networkId","genesis","hardforks","bootstrapNodes"];n<r.length;n++){var i=r[n];if(void 0===t[i])throw new Error("Missing required chain parameter: "+i)}this._chainParams=t}return this._chainParams},e.prototype.setHardfork=function(e){if(!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks");for(var t=!1,n=0,r=a.hardforks;n<r.length;n++){r[n][0]===e&&(this._hardfork=e,t=!0)}if(!t)throw new Error("Hardfork with name "+e+" not supported")},e.prototype._chooseHardfork=function(e,t){if(t=void 0===t||t,e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks")}else{if(!this._hardfork)throw new Error("Method called with neither a hardfork set nor provided by param");e=this._hardfork}return e},e.prototype._getHardfork=function(e){for(var t=0,n=this.hardforks();t<n.length;t++){var r=n[t];if(r.name===e)return r}throw new Error("Hardfork "+e+" not defined for chain "+this.chainName())},e.prototype._isSupportedHardfork=function(e){if(!(this._supportedHardforks.length>0))return!0;for(var t=0,n=this._supportedHardforks;t<n.length;t++){if(e===n[t])return!0}return!1},e.prototype.param=function(e,t,n){var r;n=this._chooseHardfork(n);for(var i=0,s=a.hardforks;i<s.length;i++){var o=s[i];if(!o[1][e])throw new Error("Topic "+e+" not defined");if(void 0!==o[1][e][t]&&(r=o[1][e][t].v),o[0]===n)break}if(void 0===r)throw new Error(e+" value for "+t+" not found");return r},e.prototype.paramByBlock=function(e,t,n){var r=this.activeHardforks(n),i=r[r.length-1].name;return this.param(e,t,i)},e.prototype.hardforkIsActiveOnBlock=function(e,t,n){var r=void 0!==(n=void 0!==n?n:{}).onlySupported&&n.onlySupported;e=this._chooseHardfork(e,r);var i=this.hardforkBlock(e);return null!==i&&t>=i},e.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},e.prototype.hardforkGteHardfork=function(e,t,n){var r=void 0!==(n=void 0!==n?n:{}).onlyActive&&n.onlyActive;e=this._chooseHardfork(e,n.onlySupported);for(var i=-1,a=-1,s=0,o=0,u=r?this.activeHardforks(null,n):this.hardforks();o<u.length;o++){var l=u[o];l.name===e&&(i=s),l.name===t&&(a=s),s+=1}return i>=a},e.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},e.prototype.hardforkIsActiveOnChain=function(e,t){var n=void 0!==(t=void 0!==t?t:{}).onlySupported&&t.onlySupported;e=this._chooseHardfork(e,n);for(var r=0,i=this.hardforks();r<i.length;r++){var a=i[r];if(a.name===e&&null!==a.block)return!0}return!1},e.prototype.activeHardforks=function(e,t){t=void 0!==t?t:{};for(var n=[],r=0,i=this.hardforks();r<i.length;r++){var a=i[r];if(null!==a.block){if(null!=e&&e<a.block)break;t.onlySupported&&!this._isSupportedHardfork(a.name)||n.push(a)}}return n},e.prototype.activeHardfork=function(e,t){t=void 0!==t?t:{};var n=this.activeHardforks(e,t);if(n.length>0)return n[n.length-1].name;throw new Error("No (supported) active hardfork found")},e.prototype.hardforkBlock=function(e){return e=this._chooseHardfork(e,!1),this._getHardfork(e).block},e.prototype.isHardforkBlock=function(e,t){return t=this._chooseHardfork(t,!1),this.hardforkBlock(t)===e},e.prototype.consensus=function(e){return e=this._chooseHardfork(e),this._getHardfork(e).consensus},e.prototype.finality=function(e){return e=this._chooseHardfork(e),this._getHardfork(e).finality},e.prototype.genesis=function(){return this._chainParams.genesis},e.prototype.hardforks=function(){return this._chainParams.hardforks},e.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},e.prototype.hardfork=function(){return this._hardfork},e.prototype.chainId=function(){return this._chainParams.chainId},e.prototype.chainName=function(){return i.chains.names[this.chainId()]||this._chainParams.name},e.prototype.networkId=function(){return this._chainParams.networkId},e}();t.default=s},function(e,t,n){n(344);var r=function(e,t){return parseInt(e.slice(2*t+2,2*t+4),16)},i=function(e){return(e.length-2)/2},a=function(e){for(var t=[],n=2,r=e.length;n<r;n+=2)t.push(parseInt(e.slice(n,n+2),16));return t},s=function(e){for(var t="0x",n=0,r=e.length;n<r;++n){var i=e[n];t+=(i<16?"0":"")+i.toString(16)}return t};e.exports={random:function(e){var t=void 0;t="undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues?window.crypto.getRandomValues(new Uint8Array(e)):n(18).randomBytes(e);for(var r="0x",i=0;i<e;++i)r+=("00"+t[i].toString(16)).slice(-2);return r},length:i,concat:function(e,t){return e.concat(t.slice(2))},flatten:function(e){return"0x"+e.reduce((function(e,t){return e+t.slice(2)}),"")},slice:function(e,t,n){return"0x"+n.slice(2*e+2,2*t+2)},reverse:function(e){for(var t="0x",n=0,r=i(e);n<r;++n)t+=e.slice(2*(r-n),2*(r-n+1));return t},pad:function e(t,n){return n.length===2*t+2?n:e(t,"0x0"+n.slice(2))},padRight:function e(t,n){return n.length===2*t+2?n:e(t,n+"0")},fromAscii:function(e){for(var t="0x",n=0;n<e.length;++n)t+=("00"+e.charCodeAt(n).toString(16)).slice(-2);return t},toAscii:function(e){for(var t="",n=2;n<e.length;n+=2)t+=String.fromCharCode(parseInt(e.slice(n,n+2),16));return t},fromString:function(e){for(var t=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},n="0x",r=0;r!=e.length;r++){var i=e.charCodeAt(r);if(i<128)n+=t(i);else{if(i<2048)n+=t(i>>6|192);else{if(i>55295&&i<56320){if(++r==e.length)return null;var a=e.charCodeAt(r);if(a<56320||a>57343)return null;n+=t((i=65536+((1023&i)<<10)+(1023&a))>>18|240),n+=t(i>>12&63|128)}else n+=t(i>>12|224);n+=t(i>>6&63|128)}n+=t(63&i|128)}}return n},toString:function(e){for(var t="",n=0,a=i(e);n<a;){var s=r(e,n++);if(s>127){if(s>191&&s<224){if(n>=a)return null;s=(31&s)<<6|63&r(e,n)}else if(s>223&&s<240){if(n+1>=a)return null;s=(15&s)<<12|(63&r(e,n))<<6|63&r(e,++n)}else{if(!(s>239&&s<248))return null;if(n+2>=a)return null;s=(7&s)<<18|(63&r(e,n))<<12|(63&r(e,++n))<<6|63&r(e,++n)}++n}if(s<=65535)t+=String.fromCharCode(s);else{if(!(s<=1114111))return null;s-=65536,t+=String.fromCharCode(s>>10|55296),t+=String.fromCharCode(1023&s|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:s,toArray:a,fromUint8Array:function(e){return s([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(a(e))}}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=244)}([function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(2),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=s),a(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(e){var r=n(104),i=n(105),a=n(54);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(t,n),i=(e=o(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=o(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?o(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(c(t),e=o(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=o(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function h(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var a,s=1,o=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(a=n;a<o;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*s}else-1!==c&&(a-=a-c),c=-1}else for(n+u>o&&(n=o-u),a=n;a>=0;a--){for(var d=!0,f=0;f<u;f++)if(l(e,a+f)!==l(t,f)){d=!1;break}if(d)return a}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var s=0;s<r;++s){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))return s;e[n+s]=o}return s}function v(e,t,n,r){return q(U(t,e.length-n),e,n,r)}function w(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function T(e,t,n,r){return w(e,t,n,r)}function I(e,t,n,r){return q(z(t),e,n,r)}function S(e,t,n,r){return q(function(e,t){for(var n,r,i,a=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,s,o,u,l=e[i],c=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&(u=(15&l)<<12|(63&a)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],s=e[i+2],o=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(u=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=V(e[a]);return i}function M(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function k(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")}function N(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function R(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,a){return a||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.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}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=y,u.prototype._isBuffer=!0,u.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)m(this,t,t+1);return this},u.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)m(this,t,t+3),m(this,t+1,t+2);return this},u.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)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?D(this,0,e):h.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),o=Math.min(a,s),l=this.slice(r,i),c=e.slice(t,n),d=0;d<o;++d)if(l[d]!==c[d]){a=l[d],s=c[d];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=0,s=1,o=0;for(this[t]=255&e;++a<n&&(s*=256);)e<0&&0===o&&0!==this[t+a-1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=n-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=u.isBuffer(e)?e:U(new u(e,r).toString()),o=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%o]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(4))},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function a(e,t,n){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{s=n(132).Buffer}catch(e){}function o(e,t,n){for(var r=0,i=Math.min(e.length,n),a=t;a<i;a++){var s=e.charCodeAt(a)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function u(e,t,n,r){for(var i=0,a=Math.min(e.length,n),s=t;s<a;s++){var o=e.charCodeAt(s)-48;i*=r,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===n)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===n)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.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,i,a=0;for(n=e.length-6,r=0;n>=t;n-=6)i=o(e,n,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);n+6!==t&&(i=o(e,t,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,l=0,c=n;c<o;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var d=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","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"],c=[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],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,u=s/67108864|0;n.words[0]=o;for(var l=1;l<r;l++){for(var c=u>>>26,d=67108863&u,f=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=f;p++){var y=l-p|0;c+=(s=(i=0|e.words[y])*(a=0|t.words[p])+d)/67108864|0,d=67108863&s}n.words[l]=0|d,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}a.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<i|a)).toString(16);n=0!=(a=o>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==a&&(n=a.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],p=d[e];n="";var y=this.clone();for(y.negative=0;!y.isZero();){var h=y.modn(p).toString(e);n=(y=y.idivn(p)).isZero()?h+n:l[f-h.length]+h+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return r(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===t,l=new e(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[o]=s;for(;o<a;o++)l[o]=0}else{for(o=0;o<a-i;o++)l[o]=0;for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[a-o-1]=s}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;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()},a.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.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];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,a,s=e.words,o=t.words,u=n.words,l=0,c=0|s[0],d=8191&c,f=c>>>13,p=0|s[1],y=8191&p,h=p>>>13,m=0|s[2],b=8191&m,g=m>>>13,_=0|s[3],v=8191&_,w=_>>>13,T=0|s[4],I=8191&T,S=T>>>13,A=0|s[5],D=8191&A,E=A>>>13,C=0|s[6],x=8191&C,M=C>>>13,k=0|s[7],N=8191&k,P=k>>>13,L=0|s[8],R=8191&L,O=L>>>13,B=0|s[9],j=8191&B,V=B>>>13,U=0|o[0],z=8191&U,q=U>>>13,$=0|o[1],F=8191&$,H=$>>>13,G=0|o[2],Y=8191&G,Q=G>>>13,Z=0|o[3],K=8191&Z,W=Z>>>13,J=0|o[4],X=8191&J,ee=J>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ue=8191&oe,le=oe>>>13,ce=0|o[8],de=8191&ce,fe=ce>>>13,pe=0|o[9],ye=8191&pe,he=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;l=((a=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(h,z)|0,a=Math.imul(h,q);var be=(l+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,F)|0))<<13)|0;l=((a=a+Math.imul(f,H)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(g,z)|0,a=Math.imul(g,q),r=r+Math.imul(y,F)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(h,F)|0,a=a+Math.imul(h,H)|0;var ge=(l+(r=r+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(f,Y)|0))<<13)|0;l=((a=a+Math.imul(f,Q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(w,z)|0,a=Math.imul(w,q),r=r+Math.imul(b,F)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(g,F)|0,a=a+Math.imul(g,H)|0,r=r+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(h,Y)|0,a=a+Math.imul(h,Q)|0;var _e=(l+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,K)|0))<<13)|0;l=((a=a+Math.imul(f,W)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,z),i=(i=Math.imul(I,q))+Math.imul(S,z)|0,a=Math.imul(S,q),r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,F)|0,a=a+Math.imul(w,H)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,Q)|0,r=r+Math.imul(y,K)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(h,K)|0,a=a+Math.imul(h,W)|0;var ve=(l+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;l=((a=a+Math.imul(f,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(E,z)|0,a=Math.imul(E,q),r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(S,F)|0,a=a+Math.imul(S,H)|0,r=r+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,Q)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,W)|0,r=r+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(h,X)|0,a=a+Math.imul(h,ee)|0;var we=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;l=((a=a+Math.imul(f,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(M,z)|0,a=Math.imul(M,q),r=r+Math.imul(D,F)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(E,F)|0,a=a+Math.imul(E,H)|0,r=r+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,Q)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,W)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,X)|0,a=a+Math.imul(g,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(h,ne)|0,a=a+Math.imul(h,re)|0;var Te=(l+(r=r+Math.imul(d,ae)|0)|0)+((8191&(i=(i=i+Math.imul(d,se)|0)+Math.imul(f,ae)|0))<<13)|0;l=((a=a+Math.imul(f,se)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(N,z),i=(i=Math.imul(N,q))+Math.imul(P,z)|0,a=Math.imul(P,q),r=r+Math.imul(x,F)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(M,F)|0,a=a+Math.imul(M,H)|0,r=r+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,Q)|0,r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,W)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(g,ne)|0,a=a+Math.imul(g,re)|0,r=r+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(h,ae)|0,a=a+Math.imul(h,se)|0;var Ie=(l+(r=r+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ue)|0))<<13)|0;l=((a=a+Math.imul(f,le)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,a=Math.imul(O,q),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(P,F)|0,a=a+Math.imul(P,H)|0,r=r+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,Q)|0,r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,W)|0,r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(w,ne)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,se)|0,r=r+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(h,ue)|0,a=a+Math.imul(h,le)|0;var Se=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((a=a+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(V,z)|0,a=Math.imul(V,q),r=r+Math.imul(R,F)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(O,F)|0,a=a+Math.imul(O,H)|0,r=r+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,Q)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(M,K)|0,a=a+Math.imul(M,W)|0,r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(E,X)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(S,ne)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(v,ae)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,le)|0)+Math.imul(g,ue)|0,a=a+Math.imul(g,le)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(h,de)|0,a=a+Math.imul(h,fe)|0;var Ae=(l+(r=r+Math.imul(d,ye)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(f,ye)|0))<<13)|0;l=((a=a+Math.imul(f,he)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(V,F)|0,a=Math.imul(V,H),r=r+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(O,Y)|0,a=a+Math.imul(O,Q)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,W)|0,r=r+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(w,ue)|0,a=a+Math.imul(w,le)|0,r=r+Math.imul(b,de)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(g,de)|0,a=a+Math.imul(g,fe)|0;var De=(l+(r=r+Math.imul(y,ye)|0)|0)+((8191&(i=(i=i+Math.imul(y,he)|0)+Math.imul(h,ye)|0))<<13)|0;l=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Q))+Math.imul(V,Y)|0,a=Math.imul(V,Q),r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,W)|0,r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(M,ne)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(D,ae)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,le)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(w,de)|0,a=a+Math.imul(w,fe)|0;var Ee=(l+(r=r+Math.imul(b,ye)|0)|0)+((8191&(i=(i=i+Math.imul(b,he)|0)+Math.imul(g,ye)|0))<<13)|0;l=((a=a+Math.imul(g,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,W))+Math.imul(V,K)|0,a=Math.imul(V,W),r=r+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,a=a+Math.imul(P,re)|0,r=r+Math.imul(x,ae)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,se)|0,r=r+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(E,ue)|0,a=a+Math.imul(E,le)|0,r=r+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(S,de)|0,a=a+Math.imul(S,fe)|0;var Ce=(l+(r=r+Math.imul(v,ye)|0)|0)+((8191&(i=(i=i+Math.imul(v,he)|0)+Math.imul(w,ye)|0))<<13)|0;l=((a=a+Math.imul(w,he)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(V,X)|0,a=Math.imul(V,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,se)|0,r=r+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(M,ue)|0,a=a+Math.imul(M,le)|0,r=r+Math.imul(D,de)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(E,de)|0,a=a+Math.imul(E,fe)|0;var xe=(l+(r=r+Math.imul(I,ye)|0)|0)+((8191&(i=(i=i+Math.imul(I,he)|0)+Math.imul(S,ye)|0))<<13)|0;l=((a=a+Math.imul(S,he)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(V,ne)|0,a=Math.imul(V,re),r=r+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,se)|0,r=r+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(P,ue)|0,a=a+Math.imul(P,le)|0,r=r+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(M,de)|0,a=a+Math.imul(M,fe)|0;var Me=(l+(r=r+Math.imul(D,ye)|0)|0)+((8191&(i=(i=i+Math.imul(D,he)|0)+Math.imul(E,ye)|0))<<13)|0;l=((a=a+Math.imul(E,he)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ae),i=(i=Math.imul(j,se))+Math.imul(V,ae)|0,a=Math.imul(V,se),r=r+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(O,ue)|0,a=a+Math.imul(O,le)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(P,de)|0,a=a+Math.imul(P,fe)|0;var ke=(l+(r=r+Math.imul(x,ye)|0)|0)+((8191&(i=(i=i+Math.imul(x,he)|0)+Math.imul(M,ye)|0))<<13)|0;l=((a=a+Math.imul(M,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(V,ue)|0,a=Math.imul(V,le),r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(O,de)|0,a=a+Math.imul(O,fe)|0;var Ne=(l+(r=r+Math.imul(N,ye)|0)|0)+((8191&(i=(i=i+Math.imul(N,he)|0)+Math.imul(P,ye)|0))<<13)|0;l=((a=a+Math.imul(P,he)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(V,de)|0,a=Math.imul(V,fe);var Pe=(l+(r=r+Math.imul(R,ye)|0)|0)+((8191&(i=(i=i+Math.imul(R,he)|0)+Math.imul(O,ye)|0))<<13)|0;l=((a=a+Math.imul(O,he)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(l+(r=Math.imul(j,ye))|0)+((8191&(i=(i=Math.imul(j,he))+Math.imul(V,ye)|0))<<13)|0;return l=((a=Math.imul(V,he))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=me,u[1]=be,u[2]=ge,u[3]=_e,u[4]=ve,u[5]=we,u[6]=Te,u[7]=Ie,u[8]=Se,u[9]=Ae,u[10]=De,u[11]=Ee,u[12]=Ce,u[13]=xe,u[14]=Me,u[15]=ke,u[16]=Ne,u[17]=Pe,u[18]=Le,0!==l&&(u[19]=l,n.length++),n};function y(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(p=f),a.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,u=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=u;l++){var c=a-l,d=(0|e.words[c])*(0|t.words[l]),f=67108863&d;o=67108863&(f=f+o|0),i+=(s=(s=s+(d/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,e,t):y(this,e,t)},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},h.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},h.prototype.permute=function(e,t,n,r,i,a){for(var s=0;s<a;s++)r[s]=t[e[s]],i[s]=n[e[s]]},h.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),l=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var d=u,f=l,p=0;p<s;p++){var y=n[c+p],h=r[c+p],m=n[c+p+s],b=r[c+p+s],g=d*m-f*b;b=d*b+f*m,m=g,n[c+p]=y+m,r[c+p]=h+b,n[c+p+s]=y-m,r[c+p+s]=h-b,p!==o&&(g=u*d-l*f,f=u*f+l*d,d=g)}},h.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},h.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},h.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},h.prototype.convert13b=function(e,t,n,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],n[2*s]=8191&a,a>>>=13,n[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===a),r(0==(-8192&a))},h.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},h.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),u=new Array(r),l=new Array(r),c=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,l,r),this.transform(s,a,o,u,r,i),this.transform(l,a,c,d,r,i);for(var p=0;p<r;p++){var y=o[p]*c[p]-u[p]*d[p];u[p]=o[p]*d[p]+u[p]*c[p],o[p]=y}return this.conjugate(o,u,r),this.transform(o,u,f,a,r,i),this.conjugate(f,a,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),y(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[n]=67108863&a}return 0!==t&&(this.words[n]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},a.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,u=(0|this.words[t])-o<<n;this.words[t]=u|s,s=o>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,u=n;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var d=0|this.words[l];this.words[l]=c<<26-a|d>>>a,c=d&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},a.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.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]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&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()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var i,a,s=e.length+n;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+n])+o;var u=(0|e.words[i])*t;o=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&a}for(;i<this.length-n;i++)o=(a=(0|this.words[i+n])+o)>>26,this.words[i+n]=67108863&a;if(0===o)return this.strip();for(r(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var o,u=r.length-i.length;if("mod"!==t){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var l=0;l<o.length;l++)o.words[l]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,o&&(o.words[u]=1));for(var d=u-1;d>=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=f)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,o},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),d=t.clone();!t.isZero();){for(var f=0,p=1;0==(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var y=0,h=1;0==(n.words[0]&h)&&y<26;++y,h<<=1);if(y>0)for(n.iushrn(y);y-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(d)),o.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o),s.isub(u)):(n.isub(t),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:n.iushln(l)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new a(1),o=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(o)):(n.isub(t),o.isub(s))}return(i=0===t.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(e),i},a.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);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var a=i,s=n;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new T(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=a._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}function I(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(g,b),g.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var a=0|e.words[r];e.words[r-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(_,b),i(v,b),i(w,b),w.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new _;else if("p192"===e)t=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},T.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},T.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,i),f=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),y=s;0!==p.cmp(o);){for(var h=p,m=0;0!==h.cmp(o);m++)h=h.redSqr();r(m<y);var b=this.pow(d,new a(1).iushln(y-m-1));f=f.redMul(b),d=b.redSqr(),p=p.redMul(d),y=m}return f},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new a(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var d=l>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4==++o||0===r&&0===c)&&(i=this.mul(i,n[s]),o=0,s=0)):o=0}u=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new I(e)},i(I,T),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(19)(e))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=t,i=n(3),a=n(11),s=n(63);r.assert=a,r.toArray=s.toArray,r.zero2=s.zero2,r.toHex=s.toHex,r.encode=s.encode,r.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,a=e.clone(),s=0;s<r.length;s++){var o,u=a.andln(i-1);a.isOdd()?(o=u>(i>>1)-1?(i>>1)-u:u,a.isubn(o)):o=0,r[s]=o,a.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0;e.cmpn(-r)>0||t.cmpn(-i)>0;){var a,s,o,u=e.andln(3)+r&3,l=t.andln(3)+i&3;3===u&&(u=-1),3===l&&(l=-1),a=0==(1&u)?0:3!=(o=e.andln(7)+r&7)&&5!==o||2!==l?u:-u,n[0].push(a),s=0==(1&l)?0:3!=(o=t.andln(7)+i&7)&&5!==o||2!==u?l:-l,n[1].push(s),2*r===a+1&&(r=1-r),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!c){var e=o(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}i.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];l.push(new y(e,t)),1!==l.length||c||o(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(11),i=n(0);function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function o(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(var r=0;r<e.length;r++){var i=e.charCodeAt(r),a=i>>8,s=255&i;a?n.push(a,s):n.push(s)}else for(r=0;r<e.length;r++)n[r]=0|e[r];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=a(i)),n+=o(i.toString(16))}return n},t.zero2=s,t.zero8=o,t.join32=function(e,t,n,i){var a=n-t;r(a%4==0);for(var s=new Array(a/4),o=0,u=t;o<s.length;o++,u+=4){var l;l="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[o]=l>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var a=e[r];"big"===t?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0,s=(a<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=a},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,a,s,o){var u=0,l=t;return u+=(l=l+r>>>0)<t?1:0,u+=(l=l+a>>>0)<a?1:0,e+n+i+s+(u+=(l=l+o>>>0)<o?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,a,s,o){return t+r+a+o>>>0},t.sum64_5_hi=function(e,t,n,r,i,a,s,o,u,l){var c=0,d=t;return c+=(d=d+r>>>0)<t?1:0,c+=(d=d+a>>>0)<a?1:0,c+=(d=d+o>>>0)<o?1:0,e+n+i+s+u+(c+=(d=d+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,a,s,o,u,l){return t+r+a+o+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var u=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a,s,o;if(l(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]),void 0===s)s=a[t]=n,++e._eventsCount;else if("function"==typeof s?s=a[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,o=u,console&&console.warn&&console.warn(o)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function y(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var l=u.length,c=m(u,l);for(n=0;n<l;++n)a(c[n],this,t)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,a,s;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return y(this,e,!0)},o.prototype.rawListeners=function(e){return y(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(o(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,a=r.length,s=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),u=r[n];n<a;u=r[++n])h(u)||!v(u)?s+=" "+u:s+=" "+o(u);return s},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var a,s={};function o(e,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(n)?r.showHidden=n:n&&t._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,e,r.depth)}function u(e,t){var n=o.styles[t];return n?"["+o.colors[n][0]+"m"+e+"["+o.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&I(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return b(i)||(i=c(e,i,r)),i}var a=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):h(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var s=Object.keys(n),o=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),T(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(n);if(0===s.length){if(I(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(_(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(T(n))return d(n)}var l,v="",S=!1,A=["{","}"];return p(n)&&(S=!0,A=["[","]"]),I(n)&&(v=" [Function"+(n.name?": "+n.name:"")+"]"),_(n)&&(v=" "+RegExp.prototype.toString.call(n)),w(n)&&(v=" "+Date.prototype.toUTCString.call(n)),T(n)&&(v=" "+d(n)),0!==s.length||S&&0!=n.length?r<0?_(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=S?function(e,t,n,r,i){for(var a=[],s=0,o=t.length;s<o;++s)C(t,String(s))?a.push(f(e,t,n,r,String(s),!0)):a.push("");return i.forEach((function(i){i.match(/^\d+$/)||a.push(f(e,t,n,r,i,!0))})),a}(e,n,r,o,s):s.map((function(t){return f(e,n,r,o,t,S)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,v,A)):A[0]+v+A[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i,a){var s,o,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?o=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(o=e.stylize("[Setter]","special")),C(r,i)||(s="["+i+"]"),o||(e.seen.indexOf(u.value)<0?(o=h(n)?c(e,u.value,null):c(e,u.value,n-1)).indexOf("\n")>-1&&(o=a?o.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+o.split("\n").map((function(e){return" "+e})).join("\n")):o=e.stylize("[Circular]","special")),g(s)){if(a&&i.match(/^\d+$/))return o;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+o}function p(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function h(e){return null===e}function m(e){return"number"==typeof e}function b(e){return"string"==typeof e}function g(e){return void 0===e}function _(e){return v(e)&&"[object RegExp]"===S(e)}function v(e){return"object"==typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===S(e)}function T(e){return v(e)&&("[object Error]"===S(e)||e instanceof Error)}function I(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(g(a)&&(a=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(a)){var r=e.pid;s[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else s[n]=function(){};return s[n]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=y,t.isNull=h,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=_,t.isObject=v,t.isDate=w,t.isError=T,t.isFunction=I,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(100);var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),D[e.getMonth()],t].join(" ")}function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",E(),t.format.apply(t,arguments))},t.inherits=n(0),t._extend=function(e,t){if(!t||!v(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var x="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(x&&e[x]){var t;if("function"!=typeof(t=e[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],a=0;a<arguments.length;a++)i.push(arguments[a]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),x&&Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=x,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var a=this,s=function(){return i.apply(a,arguments)};t.apply(this,n).then((function(t){e.nextTick(s,null,t)}),(function(t){e.nextTick(M,t,s)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(6))},function(e,t,n){"use strict";var r=n(24),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var a=n(18);a.inherits=n(0);var s=n(55),o=n(33);a.inherits(d,s);for(var u=i(o.prototype),l=0;l<u.length;l++){var c=u[l];d.prototype[c]||(d.prototype[c]=o.prototype[c])}function d(e){if(!(this instanceof d))return new d(e);s.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=void 0;var r,i=(r=n(182))&&r.__esModule?r:{default:r},a="function"==typeof Symbol;function s(e){return a&&"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){return s(e)?(0,i.default)(e):e},t.isAsync=s},function(e,t,n){e.exports=i;var r=n(8).EventEmitter;function i(){r.call(this)}n(0)(i,r),i.Readable=n(17),i.Writable=n(112),i.Duplex=n(113),i.Transform=n(114),i.PassThrough=n(115),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",o),n.on("close",u));var s=!1;function o(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",o),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t,n){var r=n(1).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,a=e.length,s=this._len,o=0;o<a;){for(var u=s%i,l=Math.min(a-o,i-u),c=0;c<l;c++)n[u+c]=e[o+c];o+=l,(s+=l)%i==0&&this._update(n)}return this._len+=a,this},i.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=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){"use strict";(function(t){var r=n(69),i=n(154);function a(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function s(e){return"0x"+e.toString(16)}e.exports={arrayContainsArray:function(e,t,n){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(n)?"some":"every"]((function(t){return e.indexOf(t)>=0}))},intToBuffer:function(e){var n=s(e);return new t(a(n.slice(2)),"hex")},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return t.byteLength(e,"utf8")},isHexPrefixed:r,stripHexPrefix:i,padToEven:a,intToHex:s,fromAscii:function(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n).toString(16);t+=r.length<2?"0"+r:r}return"0x"+t},fromUtf8:function(e){return"0x"+a(new t(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(e){var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);t+=String.fromCharCode(i)}return t},toUtf8:function(e){return new t(a(i(e).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(e,t,n){if(!Array.isArray(e))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof e+"'");if("string"!=typeof t)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof t+"'.");for(var r=[],i=0;i<e.length;i++){var a=e[i][t];if(n&&!a)a="";else if("string"!=typeof a)throw new Error("invalid abi");r.push(a)}return r},isHexString:function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}}}).call(this,n(2).Buffer)},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(101),a=n(26),s=n(38),o=n(28),u=n(3),l=n(35),c=n(1).Buffer;Object.assign(t,n(15)),t.MAX_INTEGER=new u("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new u("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=c.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=c.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=c.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=u,t.rlp=o,t.secp256k1=a,t.zeros=function(e){return c.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=t.zeros(20);return t.bufferToHex(e)},t.setLengthLeft=t.setLength=function(e,n,r){var i=t.zeros(n);return e=t.toBuffer(e),r?e.length<n?(e.copy(i),i):e.slice(0,n):e.length<n?(e.copy(i,n-e.length),i):e.slice(-n)},t.setLengthRight=function(e,n){return t.setLength(e,n,!0)},t.unpad=t.stripZeros=function(e){for(var n=(e=t.stripHexPrefix(e))[0];e.length>0&&"0"===n.toString();)n=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!c.isBuffer(e))if(Array.isArray(e))e=c.from(e);else if("string"==typeof e)e=t.isHexString(e)?c.from(t.padToEven(t.stripHexPrefix(e)),"hex"):c.from(e);else if("number"==typeof e)e=t.intToBuffer(e);else if(null==e)e=c.allocUnsafe(0);else if(u.isBN(e))e=e.toArrayLike(c);else{if(!e.toArray)throw new Error("invalid type");e=c.from(e.toArray())}return e},t.bufferToInt=function(e){return new u(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new u(e).fromTwos(256)},t.toUnsigned=function(e){return c.from(e.toTwos(256).toArray())},t.keccak=function(e,n){return e=t.toBuffer(e),n||(n=256),i("keccak"+n).update(e).digest()},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),l("sha256").update(e).digest()},t.ripemd160=function(e,n){e=t.toBuffer(e);var r=l("rmd160").update(e).digest();return!0===n?t.setLength(r,32):r},t.rlphash=function(e){return t.keccak(o.encode(e))},t.isValidPrivate=function(e){return a.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?a.publicKeyVerify(c.concat([c.from([4]),e])):!!t&&a.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,n){return e=t.toBuffer(e),n&&64!==e.length&&(e=a.publicKeyConvert(e,!1).slice(1)),s(64===e.length),t.keccak(e).slice(-20)};var d=t.privateToPublic=function(e){return e=t.toBuffer(e),a.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=a.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var n=a.sign(e,t),r={};return r.r=n.signature.slice(0,32),r.s=n.signature.slice(32,64),r.v=n.recovery+27,r},t.hashPersonalMessage=function(e){var n=t.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return t.keccak(c.concat([n,e]))},t.ecrecover=function(e,n,r,i){var s=c.concat([t.setLength(r,32),t.setLength(i,32)],64),o=n-27;if(0!==o&&1!==o)throw new Error("Invalid signature v value");var u=a.recover(e,s,o);return a.publicKeyConvert(u,!1).slice(1)},t.toRpcSig=function(e,n,r){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(c.concat([t.setLengthLeft(n,32),t.setLengthLeft(r,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var n=e[64];return n<27&&(n+=27),{v:n,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(d(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var n=t.keccak(e).toString("hex"),r="0x",i=0;i<e.length;i++)parseInt(n[i],16)>=8?r+=e[i].toUpperCase():r+=e[i];return r},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,n){return e=t.toBuffer(e),n=(n=new u(n)).isZero()?null:c.from(n.toArray()),t.rlphash([e,n]).slice(-20)},t.isPrecompiled=function(e){var n=t.unpad(e);return 1===n.length&&n[0]>=1&&n[0]<=8},t.addHexPrefix=function(e){return"string"!=typeof e||t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,n,r){var i=new u("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),a=new u("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(32!==t.length||32!==n.length||27!==e&&28!==e||(t=new u(t),n=new u(n),t.isZero()||t.gt(a)||n.isZero()||n.gt(a)||!1===r&&1===new u(n).cmp(i)))},t.baToJSON=function(e){if(c.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var n=[],r=0;r<e.length;r++)n.push(t.baToJSON(e[r]));return n}},t.defineProperties=function(e,n,i){if(e.raw=[],e._fields=[],e.toJSON=function(n){if(n){var r={};return e._fields.forEach((function(t){r[t]="0x"+e[t].toString("hex")})),r}return t.baToJSON(this.raw)},e.serialize=function(){return o.encode(e.raw)},n.forEach((function(n,r){function i(){return e.raw[r]}function a(i){"00"!==(i=t.toBuffer(i)).toString("hex")||n.allowZero||(i=c.allocUnsafe(0)),n.allowLess&&n.length?(i=t.stripZeros(i),s(n.length>=i.length,"The field "+n.name+" must not have more "+n.length+" bytes")):n.allowZero&&0===i.length||!n.length||s(n.length===i.length,"The field "+n.name+" must have byte length of "+n.length),e.raw[r]=i}e._fields.push(n.name),Object.defineProperty(e,n.name,{enumerable:!0,configurable:!0,get:i,set:a}),n.default&&(e[n.name]=n.default),n.alias&&Object.defineProperty(e,n.alias,{enumerable:!1,configurable:!0,set:a,get:i})})),i)if("string"==typeof i&&(i=c.from(t.stripHexPrefix(i),"hex")),c.isBuffer(i)&&(i=o.decode(i)),Array.isArray(i)){if(i.length>e._fields.length)throw new Error("wrong number of fields in data");i.forEach((function(n,r){e[e._fields[r]]=t.toBuffer(n)}))}else{if("object"!==(void 0===i?"undefined":r(i)))throw new Error("invalid data");var a=Object.keys(i);n.forEach((function(t){-1!==a.indexOf(t.name)&&(e[t.name]=i[t.name]),-1!==a.indexOf(t.alias)&&(e[t.alias]=i[t.alias])}))}}},function(e,t,n){(t=e.exports=n(55)).Stream=t,t.Readable=t,t.Writable=n(33),t.Duplex=n(10),t.Transform=n(58),t.PassThrough=n(111)},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(2).Buffer)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(7),i=n(11);function a(){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}t.BlockHash=a,a.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},a.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},a.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 i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r}},function(e,t){e.exports=function(){}},function(e,t){function n(e){return e.sort((e,t)=>"latest"===e||"earliest"===t?1:"latest"===t||"earliest"===e?-1:r(e)-r(t))}function r(e){return null==e?e:Number.parseInt(e,16)}function i(e){if(null==e)return e;let t=e.toString(16);return t.length%2&&(t="0"+t),"0x"+t}function a(){return Math.floor(16*Math.random()).toString(16)}e.exports={minBlockRef:function(...e){return n(e)[0]},maxBlockRef:function(...e){const t=n(e);return t[t.length-1]},sortBlockRefs:n,bnToHex:function(e){return"0x"+e.toString(16)},blockRefIsNumber:function(e){return e&&!["earliest","latest","pending"].includes(e)},hexToInt:r,incrementHexInt:function(e){return null==e?e:i(r(e)+1)},intToHex:i,unsafeRandomBytes:function(e){let t="0x";for(let n=0;n<e;n++)t+=a(),t+=a();return t}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),i=n(3);t.zeros=function(t){return e.allocUnsafe(t).fill(0)},t.setLengthLeft=function(e,n,r){void 0===r&&(r=!1);var i=t.zeros(n);return e=t.toBuffer(e),r?e.length<n?(e.copy(i),i):e.slice(0,n):e.length<n?(e.copy(i,n-e.length),i):e.slice(-n)},t.setLength=t.setLengthLeft,t.setLengthRight=function(e,n){return t.setLength(e,n,!0)},t.unpad=function(e){for(var t=(e=r.stripHexPrefix(e))[0];e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"==typeof t){if(!r.isHexString(t))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+t);t=e.from(r.padToEven(r.stripHexPrefix(t)),"hex")}else if("number"==typeof t)t=r.intToBuffer(t);else if(null==t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}return t},t.bufferToInt=function(e){return new i(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new i(e).fromTwos(256)},t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e||r.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(n){if(e.isBuffer(n))return"0x"+n.toString("hex");if(n instanceof Array){for(var r=[],i=0;i<n.length;i++)r.push(t.baToJSON(n[i]));return r}}}).call(this,n(2).Buffer)},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,s,o=arguments.length;switch(o){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(a=new Array(o-1),s=0;s<a.length;)a[s++]=arguments[s];return t.nextTick((function(){e.apply(null,a)}))}}}:e.exports=t}).call(this,n(6))},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(109),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(4))},function(e,t,n){"use strict";e.exports=n(119)(n(123))},function(e,t,n){"use strict";var r=n(3),i=n(5),a=i.getNAF,s=i.getJSF,o=i.assert;function u(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),this._bitLength=this.n?this.n.bitLength():0;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))}function l(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){o(e.precomputed);var n=e._getDoubles(),r=a(t,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;for(var s=[],u=0;u<r.length;u+=n.step){var l=0;for(t=u+n.step-1;t>=u;t--)l=(l<<1)+r[t];s.push(l)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=i;f>0;f--){for(u=0;u<s.length;u++)(l=s[u])===f?d=d.mixedAdd(n.points[u]):l===-f&&(d=d.mixedAdd(n.points[u].neg()));c=c.add(d)}return c.toP()},u.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,s=a(t,n,this._bitLength),u=this.jpoint(null,null,null),l=s.length-1;l>=0;l--){for(t=0;l>=0&&0===s[l];l--)t++;if(l>=0&&t++,u=u.dblp(t),l<0)break;var c=s[l];o(0!==c),u="affine"===e.type?c>0?u.mixedAdd(i[c-1>>1]):u.mixedAdd(i[-c-1>>1].neg()):c>0?u.add(i[c-1>>1]):u.add(i[-c-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,n,r,i){for(var o=this._wnafT1,u=this._wnafT2,l=this._wnafT3,c=0,d=0;d<r;d++){var f=(A=t[d])._getNAFPoints(e);o[d]=f.wnd,u[d]=f.points}for(d=r-1;d>=1;d-=2){var p=d-1,y=d;if(1===o[p]&&1===o[y]){var h=[t[p],null,null,t[y]];0===t[p].y.cmp(t[y].y)?(h[1]=t[p].add(t[y]),h[2]=t[p].toJ().mixedAdd(t[y].neg())):0===t[p].y.cmp(t[y].y.redNeg())?(h[1]=t[p].toJ().mixedAdd(t[y]),h[2]=t[p].add(t[y].neg())):(h[1]=t[p].toJ().mixedAdd(t[y]),h[2]=t[p].toJ().mixedAdd(t[y].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=s(n[p],n[y]);c=Math.max(b[0].length,c),l[p]=new Array(c),l[y]=new Array(c);for(var g=0;g<c;g++){var _=0|b[0][g],v=0|b[1][g];l[p][g]=m[3*(_+1)+(v+1)],l[y][g]=0,u[p]=h}}else l[p]=a(n[p],o[p],this._bitLength),l[y]=a(n[y],o[y],this._bitLength),c=Math.max(l[p].length,c),c=Math.max(l[y].length,c)}var w=this.jpoint(null,null,null),T=this._wnafT4;for(d=c;d>=0;d--){for(var I=0;d>=0;){var S=!0;for(g=0;g<r;g++)T[g]=0|l[g][d],0!==T[g]&&(S=!1);if(!S)break;I++,d--}if(d>=0&&I++,w=w.dblp(I),d<0)break;for(g=0;g<r;g++){var A,D=T[g];0!==D&&(D>0?A=u[g][D-1>>1]:D<0&&(A=u[g][-D-1>>1].neg()),w="affine"===A.type?w.mixedAdd(A):w.add(A))}}for(d=0;d<r;d++)u[d]=null;return i?w:w.toP()},u.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?o(e[e.length-1]%2==0):7===e[0]&&o(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(e){return this.encode(e,!0)},l.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},l.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},l.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},l.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},l.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)r=r.dbl();n.push(r)}return{step:e,points:n}},l.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},l.prototype._getBeta=function(){return null},l.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);function i(e,t){if("00"===e.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function a(t,n){if(t<56)return e.from([t+n]);var r=o(t),i=o(n+55+r.length/2);return e.from(i+r,"hex")}function s(e){return"0x"===e.slice(0,2)}function o(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function u(t){if(!e.isBuffer(t)){if("string"==typeof t)return s(t)?e.from((i="string"!=typeof(a=t)?a:s(a)?a.slice(2):a).length%2?"0"+i:i,"hex"):e.from(t);if("number"==typeof t)return t?(n=o(t),e.from(n,"hex")):e.from([]);if(null==t)return e.from([]);if(t instanceof Uint8Array)return e.from(t);if(r.isBN(t))return e.from(t.toArray());throw new Error("invalid type")}var n,i,a;return t}t.encode=function t(n){if(Array.isArray(n)){for(var r=[],i=0;i<n.length;i++)r.push(t(n[i]));var s=e.concat(r);return e.concat([a(s.length,192),s])}var o=u(n);return 1===o.length&&o[0]<128?o:e.concat([a(o.length,128),o])},t.decode=function(t,n){if(void 0===n&&(n=!1),!t||0===t.length)return e.from([]);var r=function t(n){var r,a,s,o,u,l=[],c=n[0];if(c<=127)return{data:n.slice(0,1),remainder:n.slice(1)};if(c<=183){if(r=c-127,s=128===c?e.from([]):n.slice(1,r),2===r&&s[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:s,remainder:n.slice(r)}}if(c<=191){if(a=c-182,r=i(n.slice(1,a).toString("hex"),16),(s=n.slice(a,r+a)).length<r)throw new Error("invalid RLP");return{data:s,remainder:n.slice(r+a)}}if(c<=247){for(r=c-191,o=n.slice(1,r);o.length;)u=t(o),l.push(u.data),o=u.remainder;return{data:l,remainder:n.slice(r)}}var d=(a=c-246)+(r=i(n.slice(1,a).toString("hex"),16));if(d>n.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(o=n.slice(a,d)).length)throw new Error("invalid rlp, List has a invalid length");for(;o.length;)u=t(o),l.push(u.data),o=u.remainder;return{data:l,remainder:n.slice(d)}}(u(t));if(n)return r;if(0!==r.remainder.length)throw new Error("invalid remainder");return r.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var n=u(t),r=n[0];if(r<=127)return n.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;var a=r-246;return a+i(n.slice(1,a).toString("hex"),16)}}).call(this,n(2).Buffer)},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){var r=n(160),i=n(77);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t|=0;for(var n=Math.max(e.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=e[t+i];return r},e.exports=t.default},function(e,t,n){const r=n(44);function i(){}e.exports=i,i.prototype.setEngine=function(e){const t=this;t.engine||(t.engine=e,e.on("block",(function(e){t.currentBlock=e})),e.on("start",(function(){t.start()})),e.on("stop",(function(){t.stop()})))},i.prototype.handleRequest=function(e,t,n){throw new Error("Subproviders should override `handleRequest`.")},i.prototype.emitPayload=function(e,t){this.engine.sendAsync(r(e),t)},i.prototype.stop=function(){},i.prototype.start=function(){}},function(e,t,n){"use strict";(function(t,r,i){var a=n(24);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(void 0),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var o,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:a.nextTick;g.WritableState=b;var l=n(18);l.inherits=n(0);var c,d={deprecate:n(110)},f=n(56),p=n(1).Buffer,y=i.Uint8Array||function(){},h=n(57);function m(){}function b(e,t){o=o||n(10),e=e||{};var r=t instanceof o;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(l||0===l)?l:c,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 d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(a.nextTick(i,r),a.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,n,r,t,i);else{var s=T(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),r?u(v,e,n,s,i):v(e,n,s,i)}}(t,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 s(this)}function g(e){if(o=o||n(10),!(c.call(g,this)||this instanceof o))return new g(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t,n,r,i,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function v(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0,u=!0;n;)i[o]=n,n.isBuf||(u=!1),n=n.next,o+=1;i.allBuffers=u,_(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,d=n.callback;if(_(e,t,!1,t.objectMode?1:l.length,l,c,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var n=T(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(I,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}l.inherits(g,f),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:d.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===g&&e&&e._writableState instanceof b}})):c=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,n){var r,i=this._writableState,s=!1,o=!i.objectMode&&(r=e,p.isBuffer(r)||r instanceof y);return o&&!p.isBuffer(e)&&(e=function(e){return p.from(e)}(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=m),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),a.nextTick(t,n)}(this,n):(o||function(e,t,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),a.nextTick(r,s),i=!1),i}(this,i,e,n))&&(i.pendingcb++,s=function(e,t,n,r,i,a){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=p.from(t,n)),t}(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var o=t.objectMode?1:r.length;t.length+=o;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,o,r,i,a);return u}(this,i,o,e,t,n)),s},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?a.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=h.destroy,g.prototype._undestroy=h.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(6),n(25).setImmediate,n(4))},function(e,t,n){"use strict";var r=n(1).Buffer,i=r.isEncoding||function(e){switch((e=""+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 a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)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}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=c,this.end=d,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(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)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(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 c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=s(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=s(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=s(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";var r=n(0),i=n(124),a=n(125),s=n(126),o=n(131);function u(e){o.call(this,"digest"),this._hash=e}r(u,o),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new a:new u(s(e))}},function(e,t,n){"use strict";var r,i=t,a=n(37),s=n(65),o=n(5).assert;function u(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.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")}function l(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var n=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=u,l("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("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:a.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"]}),l("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:a.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"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),l("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(145)}catch(e){r=void 0}l("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:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(e,t,n){var r=t;r.utils=n(7),r.common=n(20),r.sha=n(139),r.ripemd=n(143),r.hmac=n(144),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},function(e,t,n){"use strict";(function(t){var r=n(153);function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function a(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var s=n(9),o=Object.prototype.hasOwnProperty,u=Array.prototype.slice,l="foo"===function(){}.name;function c(e){return Object.prototype.toString.call(e)}function d(e){return!a(e)&&"function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var f=e.exports=g,p=/\s*function\s+([^\(\s]*)\s*/;function y(e){if(s.isFunction(e)){if(l)return e.name;var t=e.toString().match(p);return t&&t[1]}}function h(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function m(e){if(l||!s.isFunction(e))return s.inspect(e);var t=y(e);return"[Function"+(t?": "+t:"")+"]"}function b(e,t,n,r,i){throw new f.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function g(e,t){e||b(e,!0,t,"==",f.ok)}function _(e,t,n,r){if(e===t)return!0;if(a(e)&&a(t))return 0===i(e,t);if(s.isDate(e)&&s.isDate(t))return e.getTime()===t.getTime();if(s.isRegExp(e)&&s.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(d(e)&&d(t)&&c(e)===c(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(a(e)!==a(t))return!1;var o=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==o&&o===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(s.isPrimitive(e)||s.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=v(e),a=v(t);if(i&&!a||!i&&a)return!1;if(i)return _(e=u.call(e),t=u.call(t),n);var o,l,c=I(e),d=I(t);if(c.length!==d.length)return!1;for(c.sort(),d.sort(),l=c.length-1;l>=0;l--)if(c[l]!==d[l])return!1;for(l=c.length-1;l>=0;l--)if(!_(e[o=c[l]],t[o],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function T(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&b(i,n,"Missing expected exception"+r);var a="string"==typeof r,o=!e&&i&&!n;if((!e&&s.isError(i)&&a&&w(i,n)||o)&&b(i,n,"Got unwanted exception"+r),e&&i&&n&&!w(i,n)||!e&&i)throw i}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return h(m(e.actual),128)+" "+e.operator+" "+h(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=y(t),a=r.indexOf("\n"+i);if(a>=0){var s=r.indexOf("\n",a+1);r=r.substring(s+1)}this.stack=r}}},s.inherits(f.AssertionError,Error),f.fail=b,f.ok=g,f.equal=function(e,t,n){e!=t&&b(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&b(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){_(e,t,!1)||b(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){_(e,t,!0)||b(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){_(e,t,!1)&&b(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){_(t,n,!0)&&b(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&b(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&b(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){T(!0,e,t,n)},f.doesNotThrow=function(e,t,n){T(!1,e,t,n)},f.ifError=function(e){if(e)throw e},f.strict=r((function e(t,n){t||b(t,!0,n,"==",e)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var I=Object.keys||function(e){var t=[];for(var n in e)o.call(e,n)&&t.push(n);return t}}).call(this,n(4))},function(e,t,n){const r=n(9),i=n(8);var a="object"==typeof Reflect?Reflect:null,s=a&&"function"==typeof a.apply?a.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};function o(){i.call(this)}function u(e,t,n){try{s(e,t,n)}catch(e){setTimeout(()=>{throw e})}}function l(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}e.exports=o,r.inherits(o,i),o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var o=i[e];if(void 0===o)return!1;if("function"==typeof o)u(o,this,t);else{var c=o.length,d=l(o,c);for(n=0;n<c;++n)u(d[n],this,t)}return!0}},function(e,t,n){var r=n(73),i=n(161),a=n(162),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):a(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}},e.exports=t.default},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}},e.exports=t.default},function(e,t,n){const r=n(193),i=n(29);e.exports=function(e){return i({id:r(),jsonrpc:"2.0",params:[]},e)}},function(e,t,n){const r=n(32);e.exports=class extends r{constructor(e){if(super(),!e)throw new Error("JsonRpcEngineMiddlewareSubprovider - no constructorFn specified");this._constructorFn=e}setEngine(e){if(this.middleware)throw new Error("JsonRpcEngineMiddlewareSubprovider - subprovider added to engine twice");const t=e._blockTracker,n=this._constructorFn({engine:e,provider:e,blockTracker:t});if(!n)throw new Error("JsonRpcEngineMiddlewareSubprovider - _constructorFn did not return middleware");if("function"!=typeof n)throw new Error("JsonRpcEngineMiddlewareSubprovider - specified middleware is not a function");this.middleware=n}handleRequest(e,t,n){const r={id:e.id};this.middleware(e,r,(function(e){t((t,n,i)=>{t?(delete r.result,r.error={message:t.message||t}):r.result=n,e?e(i):i()})}),(function(e){if(e)return n(e);n(null,r.result)}))}}},function(e,t,n){const r=n(196);e.exports=function(e){return(t,n,i,a)=>{let s=null;const o=e(t,n,(async function(){return s=new Promise(e=>{i(t=>e(t))}),void await s}));r(o)(e=>{s?r(s)((t,n)=>{if(t)return console.error(t),a(t);n(e)}):a(e)})}}},function(e,t,n){const r=n(39);e.exports=class extends r{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach(e=>this.emit("update",e))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}}},function(e,t){function n(e){return null==e?e:Number.parseInt(e,16)}function r(e){return null==e?e:"0x"+e.toString(16)}e.exports=async function({provider:e,fromBlock:t,toBlock:i}){t||(t=i);const a=n(t),s=n(i),o=Array(s-a+1).fill().map((e,t)=>a+t).map(r);return await Promise.all(o.map(t=>function(e,t,n){return new Promise((t,r)=>{e.sendAsync({id:1,jsonrpc:"2.0",method:"eth_getBlockByNumber",params:n},(e,n)=>{if(e)return r(e);t(n.result)})})}(e,0,[t,!1])))}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(216),i=n(35),a=n(15),s=n(28),o=n(23);t.keccak=function(t,n){return void 0===n&&(n=256),t="string"!=typeof t||a.isHexString(t)?o.toBuffer(t):e.from(t,"utf8"),n||(n=256),r("keccak"+n).update(t).digest()},t.keccak256=function(e){return t.keccak(e)},t.sha256=function(e){return e=o.toBuffer(e),i("sha256").update(e).digest()},t.ripemd160=function(e,t){e=o.toBuffer(e);var n=i("rmd160").update(e).digest();return!0===t?o.setLength(n,32):n},t.rlphash=function(e){return t.keccak(s.encode(e))}}).call(this,n(2).Buffer)},function(e,t,n){var r=n(2),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),a(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";var r=n(233),i=n(234);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=_,t.resolve=function(e,t){return _(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?_(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=_(e)),e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var s=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),d=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=n(235);function _(e,t,n){if(e&&i.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),o=-1!==a&&a<e.indexOf("#")?"?":"#",l=e.split(o);l[0]=l[0].replace(/\\/g,"/");var _=e=l.join(o);if(_=_.trim(),!n&&1===e.split("#").length){var v=u.exec(_);if(v)return this.path=_,this.href=_,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?g.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=s.exec(_);if(w){var T=(w=w[0]).toLowerCase();this.protocol=T,_=_.substr(w.length)}if(n||w||_.match(/^\/\/[^@\/]+@[^@\/]+/)){var I="//"===_.substr(0,2);!I||w&&m[w]||(_=_.substr(2),this.slashes=!0)}if(!m[w]&&(I||w&&!b[w])){for(var S,A,D=-1,E=0;E<f.length;E++)-1!==(C=_.indexOf(f[E]))&&(-1===D||C<D)&&(D=C);for(-1!==(A=-1===D?_.lastIndexOf("@"):_.lastIndexOf("@",D))&&(S=_.slice(0,A),_=_.slice(A+1),this.auth=decodeURIComponent(S)),D=-1,E=0;E<d.length;E++){var C;-1!==(C=_.indexOf(d[E]))&&(-1===D||C<D)&&(D=C)}-1===D&&(D=_.length),this.host=_.slice(0,D),_=_.slice(D),this.parseHost(),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x)for(var M=this.hostname.split(/\./),k=(E=0,M.length);E<k;E++){var N=M[E];if(N&&!N.match(p)){for(var P="",L=0,R=N.length;L<R;L++)N.charCodeAt(L)>127?P+="x":P+=N[L];if(!P.match(p)){var O=M.slice(0,E),B=M.slice(E+1),j=N.match(y);j&&(O.push(j[1]),B.unshift(j[2])),B.length&&(_="/"+B.join(".")+_),this.hostname=O.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=r.toASCII(this.hostname));var V=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+V,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!h[T])for(E=0,k=c.length;E<k;E++){var z=c[E];if(-1!==_.indexOf(z)){var q=encodeURIComponent(z);q===z&&(q=escape(z)),_=_.split(z).join(q)}}var $=_.indexOf("#");-1!==$&&(this.hash=_.substr($),_=_.slice(0,$));var F=_.indexOf("?");if(-1!==F?(this.search=_.substr(F),this.query=_.substr(F+1),t&&(this.query=g.parse(this.query)),_=_.slice(0,F)):t&&(this.search="",this.query={}),_&&(this.pathname=_),b[T]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){V=this.pathname||"";var H=this.search||"";this.path=V+H}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,s="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=g.stringify(this.query));var o=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||b[t])&&!1!==a?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),o&&"?"!==o.charAt(0)&&(o="?"+o),t+a+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(o=o.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(_(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(i.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var n=new a,r=Object.keys(this),s=0;s<r.length;s++){var o=r[s];n[o]=this[o]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),l=0;l<u.length;l++){var c=u[l];"protocol"!==c&&(n[c]=e[c])}return b[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!b[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){var p=d[f];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||m[e.protocol])n.pathname=e.pathname;else{for(var y=(e.pathname||"").split("/");y.length&&!(e.host=y.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==y[0]&&y.unshift(""),y.length<2&&y.unshift(""),n.pathname=y.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var h=n.pathname||"",g=n.search||"";n.path=h+g}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var _=n.pathname&&"/"===n.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=v||_||n.host&&e.pathname,T=w,I=n.pathname&&n.pathname.split("/")||[],S=(y=e.pathname&&e.pathname.split("/")||[],n.protocol&&!b[n.protocol]);if(S&&(n.hostname="",n.port=null,n.host&&(""===I[0]?I[0]=n.host:I.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===y[0]?y[0]=e.host:y.unshift(e.host)),e.host=null),w=w&&(""===y[0]||""===I[0])),v)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,I=y;else if(y.length)I||(I=[]),I.pop(),I=I.concat(y),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search))return S&&(n.hostname=n.host=I.shift(),(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift())),n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!I.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var A=I.slice(-1)[0],D=(n.host||e.host||I.length>1)&&("."===A||".."===A)||""===A,E=0,C=I.length;C>=0;C--)"."===(A=I[C])?I.splice(C,1):".."===A?(I.splice(C,1),E++):E&&(I.splice(C,1),E--);if(!w&&!T)for(;E--;E)I.unshift("..");!w||""===I[0]||I[0]&&"/"===I[0].charAt(0)||I.unshift(""),D&&"/"!==I.join("/").substr(-1)&&I.push("");var x,M=""===I[0]||I[0]&&"/"===I[0].charAt(0);return S&&(n.hostname=n.host=M?"":I.length?I.shift():"",(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift())),(w=w||n.host&&I.length)&&!M&&I.unshift(""),I.length?n.pathname=I.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.listeners={}}return e.prototype.addEventListener=function(e,t){e=e.toLowerCase(),this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t.handleEvent||t)},e.prototype.removeEventListener=function(e,t){if(e=e.toLowerCase(),this.listeners[e]){var n=this.listeners[e].indexOf(t.handleEvent||t);n<0||this.listeners[e].splice(n,1)}},e.prototype.dispatchEvent=function(e){var t=e.type.toLowerCase();if(e.target=this,this.listeners[t])for(var n=0,r=this.listeners[t];n<r.length;n++)r[n].call(this,e);var i=this["on"+t];return i&&i.call(this,e),!0},e}();t.XMLHttpRequestEventTarget=r},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=28)}([function(e,t,n){"use strict";(function(e){var r=n(31),i=n(32),a=n(13);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(t,n),i=(e=o(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=o(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?o(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(c(t),e=o(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=o(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function h(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var a,s=1,o=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(a=n;a<o;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*s}else-1!==c&&(a-=a-c),c=-1}else for(n+u>o&&(n=o-u),a=n;a>=0;a--){for(var d=!0,f=0;f<u;f++)if(l(e,a+f)!==l(t,f)){d=!1;break}if(d)return a}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var s=0;s<r;++s){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))return s;e[n+s]=o}return s}function v(e,t,n,r){return q(U(t,e.length-n),e,n,r)}function w(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function T(e,t,n,r){return w(e,t,n,r)}function I(e,t,n,r){return q(z(t),e,n,r)}function S(e,t,n,r){return q(function(e,t){for(var n,r,i,a=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,s,o,u,l=e[i],c=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&(u=(15&l)<<12|(63&a)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],s=e[i+2],o=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(u=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=V(e[a]);return i}function M(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function k(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")}function N(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function R(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,a){return a||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.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}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=y,u.prototype._isBuffer=!0,u.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)m(this,t,t+1);return this},u.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)m(this,t,t+3),m(this,t+1,t+2);return this},u.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)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?D(this,0,e):h.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),o=Math.min(a,s),l=this.slice(r,i),c=e.slice(t,n),d=0;d<o;++d)if(l[d]!==c[d]){a=l[d],s=c[d];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=0,s=1,o=0;for(this[t]=255&e;++a<n&&(s*=256);)e<0&&0===o&&0!==this[t+a-1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=n-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=u.isBuffer(e)?e:U(new u(e,r).toString()),o=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%o]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(2))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!c){var e=o(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}i.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];l.push(new y(e,t)),1!==l.length||c||o(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";var r=n(6),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var a=n(5);a.inherits=n(3);var s=n(15),o=n(11);a.inherits(d,s);for(var u=i(o.prototype),l=0;l<u.length;l++){var c=u[l];d.prototype[c]||(d.prototype[c]=o.prototype[c])}function d(e){if(!(this instanceof d))return new d(e);s.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,s,o=arguments.length;switch(o){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(a=new Array(o-1),s=0;s<a.length;)a[s++]=arguments[s];return t.nextTick((function(){e.apply(null,a)}))}}}:e.exports=t}).call(this,n(1))},function(e,t,n){var r=n(0),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=s),a(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(e[r]=n[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r,i,a,s;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(s=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],s.set(a,i),i+=a.length;return s}},s={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,a)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(r)},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var u=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a,s,o;if(l(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]),void 0===s)s=a[t]=n,++e._eventsCount;else if("function"==typeof s?s=a[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,o=u,console&&console.warn&&console.warn(o)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function y(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var l=u.length,c=m(u,l);for(n=0;n<l;++n)a(c[n],this,t)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,a,s;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return y(this,e,!0)},o.prototype.rawListeners=function(e){return y(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){(t=e.exports=n(15)).Stream=t,t.Readable=t,t.Writable=n(11),t.Duplex=n(4),t.Transform=n(19),t.PassThrough=n(39)},function(e,t,n){"use strict";(function(t,r,i){var a=n(6);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(void 0),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var o,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:a.nextTick;g.WritableState=b;var l=n(5);l.inherits=n(3);var c,d={deprecate:n(38)},f=n(16),p=n(7).Buffer,y=i.Uint8Array||function(){},h=n(17);function m(){}function b(e,t){o=o||n(4),e=e||{};var r=t instanceof o;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(l||0===l)?l:c,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 d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(a.nextTick(i,r),a.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,n,r,t,i);else{var s=T(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),r?u(v,e,n,s,i):v(e,n,s,i)}}(t,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 s(this)}function g(e){if(o=o||n(4),!(c.call(g,this)||this instanceof o))return new g(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t,n,r,i,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function v(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0,u=!0;n;)i[o]=n,n.isBuf||(u=!1),n=n.next,o+=1;i.allBuffers=u,_(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,d=n.callback;if(_(e,t,!1,t.objectMode?1:l.length,l,c,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var n=T(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(I,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}l.inherits(g,f),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:d.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===g&&e&&e._writableState instanceof b}})):c=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,n){var r,i=this._writableState,s=!1,o=!i.objectMode&&(r=e,p.isBuffer(r)||r instanceof y);return o&&!p.isBuffer(e)&&(e=function(e){return p.from(e)}(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=m),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),a.nextTick(t,n)}(this,n):(o||function(e,t,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),a.nextTick(r,s),i=!1),i}(this,i,e,n))&&(i.pendingcb++,s=function(e,t,n,r,i,a){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=p.from(t,n)),t}(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var o=t.objectMode?1:r.length;t.length+=o;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,o,r,i,a);return u}(this,i,o,e,t,n)),s},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?a.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=h.destroy,g.prototype._undestroy=h.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(1),n(36).setImmediate,n(2))},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return a})),n.d(t,"__rest",(function(){return s})),n.d(t,"__decorate",(function(){return o})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return l})),n.d(t,"__awaiter",(function(){return c})),n.d(t,"__generator",(function(){return d})),n.d(t,"__exportStar",(function(){return f})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return y})),n.d(t,"__spread",(function(){return h})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return g})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return v})),n.d(t,"__importStar",(function(){return w})),n.d(t,"__importDefault",(function(){return T}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n}function o(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(i,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,o)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}}function f(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||o(e,t)}))})}function o(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,l):c(a[0][2],n)}catch(e){c(a[0][3],e)}var n}function u(e){o("next",e)}function l(e){o("throw",e)}function c(e,t){e(t),a.shift(),a.length&&o(a[0][0],a[0][1])}}function g(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function T(e){return e&&e.__esModule?e:{default:e}}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=i;var r=n(9).EventEmitter;function i(){r.call(this)}n(3)(i,r),i.Readable=n(10),i.Writable=n(40),i.Duplex=n(41),i.Transform=n(42),i.PassThrough=n(43),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",o),n.on("close",u));var s=!1;function o(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",o),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t,n){"use strict";(function(t,r){var i=n(6);e.exports=_;var a,s=n(13);_.ReadableState=g,n(9).EventEmitter;var o=function(e,t){return e.listeners(t).length},u=n(16),l=n(7).Buffer,c=t.Uint8Array||function(){},d=n(5);d.inherits=n(3);var f=n(33),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var y,h=n(34),m=n(17);d.inherits(_,u);var b=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var r=t instanceof(a=a||n(4));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(y||(y=n(18).StringDecoder),this.decoder=new y(e.encoding),this.encoding=e.encoding)}function _(e){if(a=a||n(4),!(this instanceof _))return new _(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function v(e,t,n,r,i){var a,s=e._readableState;return null===t?(s.reading=!1,function(e,t){if(!t.ended){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,I(e)}}(e,s)):(i||(a=function(e,t){var n,r;return r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):A(e,s)):w(e,s,t,!1))):r||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function w(e,t,n,r){t.flowing&&0===t.length&&!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&&I(e)),A(e,t)}function T(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(S,e):S(e))}function S(e){p("emit readable"),e.emit("readable"),x(e)}function A(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(D,e,t))}function D(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function E(e){p("readable nexttick read 0"),e.read(0)}function C(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(s===a.length?i+=a:i+=a.slice(0,e),0==(e-=s)){s===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=l.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,s),0==(e-=s)){s===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var 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,i.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=m.destroy,_.prototype._undestroy=m.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),v(this,e,t,!1,n)},_.prototype.unshift=function(e){return v(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return y||(y=n(18).StringDecoder),this._readableState.decoder=new y(e),this._readableState.encoding=e,this},_.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?k(this):I(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&k(this),null;var r,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",i=!0),t.ended||t.reading?p("reading or ended",i=!1):i&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=T(n,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&k(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,p("pipe count=%d opts=%j",a.pipesCount,t);var u=t&&!1===t.end||e===r.stdout||e===r.stderr?g:l;function l(){p("onend"),e.end()}a.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",(function t(r,i){p("onunpipe"),r===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",t),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",y),d=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,x(e))}}(n);e.on("drain",c);var d=!1,f=!1;function y(t){p("ondata"),f=!1,!1!==e.write(t)||f||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==P(a.pipes,e))&&!d&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,f=!0),n.pause())}function h(t){p("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",b),g()}function b(){p("onfinish"),e.removeListener("close",m),g()}function g(){p("unpipe"),n.unpipe(e)}return n.on("data",y),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",m),e.once("finish",b),e.emit("pipe",n),a.flowing||(p("pipe resume"),n.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var s=P(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},_.prototype.on=function(e,t){var n=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&I(this):i.nextTick(E,this))}return n},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(C,e,t))}(this,e)),this},_.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(p("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){p("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<b.length;a++)e.on(b[a],this.emit.bind(this,b[a]));return this._read=function(t){p("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=M}).call(this,n(2),n(1))},function(e,t,n){e.exports=n(9).EventEmitter},function(e,t,n){"use strict";var r=n(6);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(7).Buffer,i=r.isEncoding||function(e){switch((e=""+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 a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)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}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=c,this.end=d,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(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)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(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 c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=s(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=s(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=s(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";e.exports=s;var r=n(4),i=n(5);function a(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,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){u(e,t,n)})):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),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)}i.inherits=n(3),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},function(e,t,n){"use strict";(function(t){var r=n(51);function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function a(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var s=n(21),o=Object.prototype.hasOwnProperty,u=Array.prototype.slice,l="foo"===function(){}.name;function c(e){return Object.prototype.toString.call(e)}function d(e){return!a(e)&&"function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var f=e.exports=g,p=/\s*function\s+([^\(\s]*)\s*/;function y(e){if(s.isFunction(e)){if(l)return e.name;var t=e.toString().match(p);return t&&t[1]}}function h(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function m(e){if(l||!s.isFunction(e))return s.inspect(e);var t=y(e);return"[Function"+(t?": "+t:"")+"]"}function b(e,t,n,r,i){throw new f.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function g(e,t){e||b(e,!0,t,"==",f.ok)}function _(e,t,n,r){if(e===t)return!0;if(a(e)&&a(t))return 0===i(e,t);if(s.isDate(e)&&s.isDate(t))return e.getTime()===t.getTime();if(s.isRegExp(e)&&s.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(d(e)&&d(t)&&c(e)===c(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(a(e)!==a(t))return!1;var o=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==o&&o===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(s.isPrimitive(e)||s.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=v(e),a=v(t);if(i&&!a||!i&&a)return!1;if(i)return _(e=u.call(e),t=u.call(t),n);var o,l,c=I(e),d=I(t);if(c.length!==d.length)return!1;for(c.sort(),d.sort(),l=c.length-1;l>=0;l--)if(c[l]!==d[l])return!1;for(l=c.length-1;l>=0;l--)if(!_(e[o=c[l]],t[o],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function T(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&b(i,n,"Missing expected exception"+r);var a="string"==typeof r,o=!e&&i&&!n;if((!e&&s.isError(i)&&a&&w(i,n)||o)&&b(i,n,"Got unwanted exception"+r),e&&i&&n&&!w(i,n)||!e&&i)throw i}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return h(m(e.actual),128)+" "+e.operator+" "+h(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=y(t),a=r.indexOf("\n"+i);if(a>=0){var s=r.indexOf("\n",a+1);r=r.substring(s+1)}this.stack=r}}},s.inherits(f.AssertionError,Error),f.fail=b,f.ok=g,f.equal=function(e,t,n){e!=t&&b(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&b(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){_(e,t,!1)||b(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){_(e,t,!0)||b(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){_(e,t,!1)&&b(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){_(t,n,!0)&&b(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&b(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&b(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){T(!0,e,t,n)},f.doesNotThrow=function(e,t,n){T(!1,e,t,n)},f.ifError=function(e){if(e)throw e},f.strict=r((function e(t,n){t||b(t,!0,n,"==",e)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var I=Object.keys||function(e){var t=[];for(var n in e)o.call(e,n)&&t.push(n);return t}}).call(this,n(2))},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(o(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,a=r.length,s=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),u=r[n];n<a;u=r[++n])h(u)||!v(u)?s+=" "+u:s+=" "+o(u);return s},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var a,s={};function o(e,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(n)?r.showHidden=n:n&&t._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,e,r.depth)}function u(e,t){var n=o.styles[t];return n?"["+o.colors[n][0]+"m"+e+"["+o.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&I(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return b(i)||(i=c(e,i,r)),i}var a=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):h(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var s=Object.keys(n),o=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),T(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(n);if(0===s.length){if(I(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(_(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(T(n))return d(n)}var l,v="",S=!1,A=["{","}"];return p(n)&&(S=!0,A=["[","]"]),I(n)&&(v=" [Function"+(n.name?": "+n.name:"")+"]"),_(n)&&(v=" "+RegExp.prototype.toString.call(n)),w(n)&&(v=" "+Date.prototype.toUTCString.call(n)),T(n)&&(v=" "+d(n)),0!==s.length||S&&0!=n.length?r<0?_(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=S?function(e,t,n,r,i){for(var a=[],s=0,o=t.length;s<o;++s)C(t,String(s))?a.push(f(e,t,n,r,String(s),!0)):a.push("");return i.forEach((function(i){i.match(/^\d+$/)||a.push(f(e,t,n,r,i,!0))})),a}(e,n,r,o,s):s.map((function(t){return f(e,n,r,o,t,S)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,v,A)):A[0]+v+A[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i,a){var s,o,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?o=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(o=e.stylize("[Setter]","special")),C(r,i)||(s="["+i+"]"),o||(e.seen.indexOf(u.value)<0?(o=h(n)?c(e,u.value,null):c(e,u.value,n-1)).indexOf("\n")>-1&&(o=a?o.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+o.split("\n").map((function(e){return" "+e})).join("\n")):o=e.stylize("[Circular]","special")),g(s)){if(a&&i.match(/^\d+$/))return o;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+o}function p(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function h(e){return null===e}function m(e){return"number"==typeof e}function b(e){return"string"==typeof e}function g(e){return void 0===e}function _(e){return v(e)&&"[object RegExp]"===S(e)}function v(e){return"object"==typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===S(e)}function T(e){return v(e)&&("[object Error]"===S(e)||e instanceof Error)}function I(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(g(a)&&(a=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(a)){var r=e.pid;s[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else s[n]=function(){};return s[n]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=y,t.isNull=h,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=_,t.isObject=v,t.isDate=w,t.isError=T,t.isFunction=I,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(52);var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),D[e.getMonth()],t].join(" ")}function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",E(),t.format.apply(t,arguments))},t.inherits=n(3),t._extend=function(e,t){if(!t||!v(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var x="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(x&&e[x]){var t;if("function"!=typeof(t=e[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],a=0;a<arguments.length;a++)i.push(arguments[a]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),x&&Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=x,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var a=this,s=function(){return i.apply(a,arguments)};t.apply(this,n).then((function(t){e.nextTick(s,null,t)}),(function(t){e.nextTick(M,t,s)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(1))},function(e,t,n){"use strict";e.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,s=0;0!==n;){n-=s=n>2e3?2e3:n;do{a=a+(i=i+t[r++]|0)|0}while(--s);i%=65521,a%=65521}return i|a<<16|0}},function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,t,n,i){var a=r,s=i+n;e^=-1;for(var o=i;o<s;o++)e=e>>>8^a[255&(e^t[o])];return-1^e}},function(e,t){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},function(e,t,n){var r=n(26);function i(e,t){if(void 0===e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0===e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}i.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var a=0;a<e.getLength();a++)t[n+a]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(a)));return new i(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),a=0;a<this.getLength();a++)n[a]=this.get(a);for(var s=0;s<e.getLength();s++)n[s]^=r.gexp(r.glog(e.get(s))+t);return new i(n,0).mod(e)}},e.exports=i},function(e,t){for(var n={glog:function(e){if(e<1)throw new Error("glog("+e+")");return n.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return n.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},r=0;r<8;r++)n.EXP_TABLE[r]=1<<r;for(r=8;r<256;r++)n.EXP_TABLE[r]=n.EXP_TABLE[r-4]^n.EXP_TABLE[r-5]^n.EXP_TABLE[r-6]^n.EXP_TABLE[r-8];for(r=0;r<255;r++)n.LOG_TABLE[n.EXP_TABLE[r]]=r;e.exports=n},function(e,t){e.exports={L:1,M:0,Q:3,H:2}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=r.__importDefault(n(29)),a=r.__importDefault(n(70));t.default={open:function(e,t,n){n?a.default.open(e,t):i.default.open(e,t)},close:function(e){e?a.default.close():i.default.close()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(12),a=i.__importStar(n(30)),s=i.__importDefault(n(64)),o=i.__importDefault(n(65));function u(){var e=r.getElementById("walletconnect-qrcode-modal");e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout((function(){var e=r.getElementById("walletconnect-wrapper");e&&r.body.removeChild(e)}),o.default.animationDuration))}n(66),"undefined"!=typeof window&&void 0!==window.document&&(r=window.document),t.default={close:u,open:function(e,t){var n=r.createElement("div");n.setAttribute("id","walletconnect-wrapper");var i,o,l,c=(i=e,o="","string"==typeof(l=a.imageSync(i,{type:"svg"}))&&(o=l.replace("<svg",'<svg class="walletconnect-qrcode__image"')),o);n.innerHTML=function(e){return'\n <div\n id="walletconnect-qrcode-modal"\n class="walletconnect-qrcode__base animated fadeIn"\n >\n <div class="walletconnect-modal__base">\n <div class="walletconnect-modal__header">\n <img src="'+s.default+'" class="walletconnect-modal__headerLogo" />\n <div class="walletconnect-modal__close__wrapper">\n <div\n id="walletconnect-qrcode-close"\n class="walletconnect-modal__close__icon"\n >\n <div class="walletconnect-modal__close__line1""></div>\n <div class="walletconnect-modal__close__line2"></div>\n </div>\n </div>\n </div>\n <div>\n <div>\n <p id="walletconnect-qrcode-text" class="walletconnect-qrcode__text">\n Scan QR code with a WalletConnect-compatible wallet\n </p>\n '+e+"\n </div>\n </div>\n </div>\n </div>\n"}(c),r.body.appendChild(n);var d=r.getElementById("walletconnect-qrcode-close");d&&d.addEventListener("click",(function(){u(),t&&t()}))}}},function(e,t,n){"use strict";(function(t,r){var i=n(14).Readable,a=n(44).QR,s=n(48),o=n(63),u=function(){},l={parse_url:!1,ec_level:"M",size:5,margin:4,customize:null},c={parse_url:!1,ec_level:"M",margin:1,size:0};function d(e,t){e="string"==typeof e?{ec_level:e}:e||{};var n={type:String(t||e.type||"png").toLowerCase()},r="png"==n.type?l:c;for(var i in r)n[i]=i in e?e[i]:r[i];return n}e.exports={matrix:a,image:function(e,n){n=d(n);var r=a(e,n.ec_level,n.parse_url),l=new i;switch(l._read=u,n.type){case"svg":case"pdf":case"eps":t.nextTick((function(){o[n.type](r,l,n.margin,n.size)}));break;case"svgpath":t.nextTick((function(){var e=o.svg_object(r,n.margin,n.size);l.push(e.path),l.push(null)}));break;case"png":default:t.nextTick((function(){var e=s.bitmap(r,n.size,n.margin);n.customize&&n.customize(e),s.png(e,l)}))}return l},imageSync:function(e,t){t=d(t);var n,i=a(e,t.ec_level,t.parse_url),u=[];switch(t.type){case"svg":case"pdf":case"eps":o[t.type](i,u,t.margin,t.size),n=u.filter(Boolean).join("");break;case"png":default:var l=s.bitmap(i,t.size,t.margin);t.customize&&t.customize(l),s.png(l,u),n=r.concat(u.filter(Boolean))}return n},svgObject:function(e,t){t=d(t,"svg");var n=a(e,t.ec_level);return o.svg_object(n,t.margin)}}}).call(this,n(1),n(0).Buffer)},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),s=r[0],o=r[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,o)),c=0,d=o>0?s-4:s;for(n=0;n<d;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===o&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===o&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],s=0,o=n-i;s<o;s+=16383)a.push(c(e,s,s+16383>o?o:s+16383));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)r[o]=s[o],i[s.charCodeAt(o)]=o;function l(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("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,a,s=[],o=t;o<n;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,s,o=8*i-r-1,u=(1<<o)-1,l=u>>1,c=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+e[t+d],d+=f,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=r;c>0;s=256*s+e[t+d],d+=f,c-=8);if(0===a)a=1-l;else{if(a===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),a-=l}return(p?-1:1)*s*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var s,o,u,l=8*a-i-1,c=(1<<l)-1,d=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,y=r?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*u-1)*Math.pow(2,i),s+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&o,p+=y,o/=256,i-=8);for(s=s<<i|o,l+=i;l>0;e[n+p]=255&s,p+=y,s/=256,l-=8);e[n+p-y]|=128*h}},function(e,t){},function(e,t,n){"use strict";var r=n(7).Buffer,i=n(35);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return 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};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=i,n=s,a.data.copy(t,n),s+=a.data.length,a=a.next;return i},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(37),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(2))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,a,s,o,u=1,l={},c=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(){var e=p(arguments);return t.nextTick(y(h,e)),e}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(s="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&h(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),r=function(){var t=p(arguments);return e.postMessage(s+t,"*"),t}):e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(){var e=p(arguments);return a.port2.postMessage(e),e}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(){var e=p(arguments),t=d.createElement("script");return t.onreadystatechange=function(){h(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t),e}):r=function(){var e=p(arguments);return setTimeout(y(h,e),0),e},f.setImmediate=r,f.clearImmediate=m}function p(e){return l[u]=y.apply(void 0,e),u++}function y(e){var t=[].slice.call(arguments,1);return function(){"function"==typeof e?e.apply(void 0,t):new Function(""+e)()}}function h(e){if(c)setTimeout(y(h,e),0);else{var t=l[e];if(t){c=!0;try{t()}finally{m(e),c=!1}}}}function m(e){delete l[e]}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(2),n(1))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(2))},function(e,t,n){"use strict";e.exports=a;var r=n(19),i=n(5);function a(e){if(!(this instanceof a))return new a(e);r.call(this,e)}i.inherits=n(3),i.inherits(a,r),a.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(11)},function(e,t,n){e.exports=n(4)},function(e,t,n){e.exports=n(10).Transform},function(e,t,n){e.exports=n(10).PassThrough},function(e,t,n){"use strict";(function(t){var r=n(45),i=n(46),a=n(47);function s(e){return JSON.parse(JSON.stringify(e))}var o=["L","M","Q","H"],u=[[],[26,7,1,10,1,13,1,17,1],[44,10,1,16,1,22,1,28,1],[70,15,1,26,1,36,2,44,2],[100,20,1,36,2,52,2,64,4],[134,26,1,48,2,72,4,88,4],[172,36,2,64,4,96,4,112,4],[196,40,2,72,4,108,6,130,5],[242,48,2,88,4,132,6,156,6],[292,60,2,110,5,160,8,192,8],[346,72,4,130,5,192,8,224,8],[404,80,4,150,5,224,8,264,11],[466,96,4,176,8,260,10,308,11],[532,104,4,198,9,288,12,352,16],[581,120,4,216,9,320,16,384,16],[655,132,6,240,10,360,12,432,18],[733,144,6,280,10,408,17,480,16],[815,168,6,308,11,448,16,532,19],[901,180,6,338,13,504,18,588,21],[991,196,7,364,14,546,21,650,25],[1085,224,8,416,16,600,20,700,25],[1156,224,8,442,17,644,23,750,25],[1258,252,9,476,17,690,23,816,34],[1364,270,9,504,18,750,25,900,30],[1474,300,10,560,20,810,27,960,32],[1588,312,12,588,21,870,29,1050,35],[1706,336,12,644,23,952,34,1110,37],[1828,360,12,700,25,1020,34,1200,40],[1921,390,13,728,26,1050,35,1260,42],[2051,420,14,784,28,1140,38,1350,45],[2185,450,15,812,29,1200,40,1440,48],[2323,480,16,868,31,1290,43,1530,51],[2465,510,17,924,33,1350,45,1620,54],[2611,540,18,980,35,1440,48,1710,57],[2761,570,19,1036,37,1530,51,1800,60],[2876,570,19,1064,38,1590,53,1890,63],[3034,600,20,1120,40,1680,56,1980,66],[3196,630,21,1204,43,1770,59,2100,70],[3362,660,22,1260,45,1860,62,2220,74],[3532,720,24,1316,47,1950,65,2310,77],[3706,750,25,1372,49,2040,68,2430,81]];function l(e,t){var n,r=1;for(e.data1?n=Math.ceil(e.data1.length/8):r=10;r<10;r++)if((i=u[r][t]).data_len>=n)return s(i);for(e.data10?n=Math.ceil(e.data10.length/8):r=27;r<27;r++)if((i=u[r][t]).data_len>=n)return s(i);for(n=Math.ceil(e.data27.length/8);r<41;r++){var i;if((i=u[r][t]).data_len>=n)return s(i)}throw new Error("Too much data")}function c(e,n){var r=new t(n.data_len);r.fill(0);for(var a=(e=n.version<10?e.data1:n.version<27?e.data10:e.data27).length,s=0;s<a;s+=8){for(var o=0,u=0;u<8;u++)o=o<<1|(e[s+u]?1:0);r[s/8]=o}var l=236;for(s=Math.ceil((a+4)/8);s<r.length;s++)r[s]=l,l=236==l?17:236;var c=0;return n.blocks=n.blocks.map((function(e){var t=r.slice(c,c+e);return c+=e,n.ec.push(i(t,n.ec_len)),t})),n}u=u.map((function(e,t){if(!t)return{};for(var n={},r=1;r<8;r+=2){for(var i=e[0]-e[r],a=e[r+1],s=o[r/2|0],u={version:t,ec_level:s,data_len:i,ec_len:e[r]/a,blocks:[],ec:[]},l=a,c=i;l>0;l--){var d=c/l|0;u.blocks.push(d),c-=d}n[s]=u}return n})),e.exports={QR:function(e,t,n){t=o.indexOf(t)>-1?t:"M";var i=r(e,n),s=c(i,l(i,t));return a.getMatrix(s)},getTemplate:l,fillTemplate:c}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){function n(e,t,n){for(var r=1<<t-1;r;r>>>=1)e.push(r&n?1:0)}var r=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=n;return t}("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:");e.exports=function e(i,a){var s,o=typeof i;if("string"==o||"number"==o)i=new t(s=""+i);else if(t.isBuffer(i))s=i.toString();else{if(!Array.isArray(i))throw new Error("Bad data");s=(i=new t(i)).toString()}if(/^[0-9]+$/.test(s)){if(i.length>7089)throw new Error("Too much data");return function(e){for(var t=e.length,r=[],i=0;i<t;i+=3){var a=e.substr(i,3);n(r,Math.ceil(10*a.length/3),parseInt(a,10))}var s,o={};return n(s=[0,0,0,1],14,t),o.data27=s.concat(r),t<4096&&(n(s=[0,0,0,1],12,t),o.data10=s.concat(r)),t<1024&&(n(s=[0,0,0,1],10,t),o.data1=s.concat(r)),o}(s)}if(/^[0-9A-Z \$%\*\+\.\/\:\-]+$/.test(s)){if(i.length>4296)throw new Error("Too much data");return function(e){for(var t=e.length,i=[],a=0;a<t;a+=2){var s=6,o=r[e[a]];e[a+1]&&(s=11,o=45*o+r[e[a+1]]),n(i,s,o)}var u,l={};return n(u=[0,0,1,0],13,t),l.data27=u.concat(i),t<2048&&(n(u=[0,0,1,0],11,t),l.data10=u.concat(i)),t<512&&(n(u=[0,0,1,0],9,t),l.data1=u.concat(i)),l}(s)}if(a&&/^https?:/i.test(s))return function(t){var n=t.indexOf("/",8)+1||t.length,r=e(t.slice(0,n).toUpperCase(),!1);if(n>=t.length)return r;var i=e(t.slice(n),!1);return r.data27=r.data27.concat(i.data27),r.data10&&i.data10&&(r.data10=r.data10.concat(i.data10)),r.data1&&i.data1&&(r.data1=r.data1.concat(i.data1)),r}(s);if(i.length>2953)throw new Error("Too much data");return function(e){for(var t=e.length,r=[],i=0;i<t;i++)n(r,8,e[i]);var a,s={};return n(a=[0,1,0,0],16,t),s.data10=s.data27=a.concat(r),t<256&&(n(a=[0,1,0,0],8,t),s.data1=a.concat(r)),s}(i)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){for(var n=[1],r=[],i=1;i<256;i++){var a=n[i-1]<<1;a>255&&(a^=285),n[i]=a}for(i=0;i<255;i++)r[n[i]]=i;function s(e){for(;e<0;)e+=255;for(;e>255;)e-=255;return n[e]}function o(e){if(e<1||e>255)throw Error("Bad log("+e+")");return r[e]}var u=[[0],[0,0],[0,25,1]];e.exports=function(e,n){e=[].slice.call(e);for(var r=function e(t){if(u[t])return u[t];var n=e(t-1),r=[];r[0]=n[0];for(var i=1;i<=t;i++)r[i]=o(s(n[i])^s(n[i-1]+t-1));return u[t]=r,r}(n),i=0;i<n;i++)e.push(0);for(;e.length>n;)if(e[0]){var a=o(e[0]);for(i=0;i<=n;i++)e[i]=e[i]^s(r[i]+a);e.shift()}else e.shift();return new t(e)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){function n(e){var n=4*e+17,r=[],i=new t(n);i.fill(0),i=[].slice.call(i);for(var a=0;a<n;a++)r[a]=i.slice();return r}function r(e){for(var t=e.length,n=-3;n<=3;n++)for(var r=-3;r<=3;r++){var i=Math.max(n,r),a=Math.min(n,r),s=2==i&&a>=-2||-2==a&&i<=2?128:129;e[3+n][3+r]=s,e[3+n][t-4+r]=s,e[t-4+n][3+r]=s}for(n=0;n<8;n++)e[7][n]=e[n][7]=e[7][t-n-1]=e[n][t-8]=e[t-8][n]=e[t-1-n][7]=128}function i(e){var t=e.length;if(t>21){var n=t-13,r=Math.round(n/Math.ceil(n/28));r%2&&r++;for(var i=[],a=n+6;a>10;a-=r)i.unshift(a);i.unshift(6);for(var s=0;s<i.length;s++)for(var o=0;o<i.length;o++){var u=i[s],l=i[o];if(!e[u][l])for(var c=-2;c<=2;c++)for(var d=-2;d<=2;d++){var f=Math.max(c,d),p=Math.min(c,d),y=1==f&&p>=-1||-1==p&&f<=1?128:129;e[u+c][l+d]=y}}}for(s=8;s<t-8;s++)e[6][s]=e[s][6]=s%2?128:129}function a(e){for(var t=e.length,n=0;n<8;n++)6!=n&&(e[8][n]=e[n][8]=128),e[8][t-1-n]=128,e[t-1-n][8]=128;if(e[8][8]=128,e[t-8][8]=129,!(t<45))for(n=t-11;n<t-8;n++)for(var r=0;r<6;r++)e[n][r]=e[r][n]=128}var s,o=function(){for(var e=Array(32),t=Array(40),n=0;n<32;n++){for(var r=n<<10,i=5;i>0;i--)r>>>9+i&&(r^=1335<<i-1);e[n]=21522^(r|n<<10)}for(var a=7;a<=40;a++){for(r=a<<12,i=6;i>0;i--)r>>>11+i&&(r^=7973<<i-1);t[a]=r|a<<12}var s={L:1,M:0,Q:3,H:2};return function(n,r,i){var a=n.length,o=e[s[r]<<3|i];function u(e){return o>>e&1?129:128}for(var l=0;l<8;l++)n[8][a-1-l]=u(l),l<6&&(n[l][8]=u(l));for(l=8;l<15;l++)n[a-15+l][8]=u(l),l>8&&(n[8][14-l]=u(l));n[7][8]=u(6),n[8][8]=u(7),n[8][7]=u(8);var c=t[(a-17)/4];if(c)for(l=0;l<6;l++)for(var d=0;d<3;d++)n[a-11+d][l]=n[l][a-11+d]=c>>3*l+d&1?129:128}}(),u=(s=[function(e,t){return(e+t)%2==0},function(e,t){return e%2==0},function(e,t){return t%3==0},function(e,t){return(e+t)%3==0},function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0},function(e,t){return e*t%2+e*t%3==0},function(e,t){return(e*t%2+e*t%3)%2==0},function(e,t){return(e*t%3+(e+t)%2)%2==0}],function(e,t,n){var r,i,a=e.length,o=-1;r=i=a-1;for(var u=s[n],l=t.blocks[t.blocks.length-1].length,c=0;c<l;c++)for(var d=0;d<t.blocks.length;d++)t.blocks[d].length<=c||f(t.blocks[d][c]);for(l=t.ec_len,c=0;c<l;c++)for(d=0;d<t.ec.length;d++)f(t.ec[d][c]);if(i>-1)do{e[r][i]=u(r,i)?1:0}while(p());function f(t){for(var n=128;n;n>>=1){var a=!!(n&t);u(r,i)&&(a=!a),e[r][i]=a?1:0,p()}}function p(){do{if(i%2^i<6?o<0&&0==r||o>0&&r==a-1?(i--,o=-o):(i++,r+=o):i--,6==i&&i--,i<0)return!1}while(240&e[r][i]);return!0}});function l(e){for(var t=e.length,n=0,r=0;r<t;r++){for(var i=1&e[r][0],a=1,s=1;s<t;s++)(o=1&e[r][s])!=i?(a>=5&&(n+=a-2),i=o,a=1):a++;a>=5&&(n+=a-2)}for(s=0;s<t;s++){for(i=1&e[0][s],a=1,r=1;r<t;r++){var o;(o=1&e[r][s])!=i?(a>=5&&(n+=a-2),i=o,a=1):a++}a>=5&&(n+=a-2)}for(r=0;r<t-1;r++)for(s=0;s<t-1;s++){var u=e[r][s]+e[r][s+1]+e[r+1][s]+e[r+1][s+1]&7;0!=u&&4!=u||(n+=3)}function l(t){return 1&e[r][s+t]}function c(t){return 1&e[r+t][s]}for(r=0;r<t;r++)for(s=0;s<t;s++)s<t-6&&l(0)&&!l(1)&&l(2)&&l(3)&&l(4)&&!l(5)&&l(6)&&(s>=4&&!(l(-4)||l(-3)||l(-2)||l(-1))&&(n+=40),s<t-10&&!(l(7)||l(8)||l(9)||l(10))&&(n+=40)),r<t-6&&c(0)&&!c(1)&&c(2)&&c(3)&&c(4)&&!c(5)&&c(6)&&(r>=4&&!(c(-4)||c(-3)||c(-2)||c(-1))&&(n+=40),r<t-10&&!(c(7)||c(8)||c(9)||c(10))&&(n+=40));var d=0;for(r=0;r<t;r++)for(s=0;s<t;s++)1&e[r][s]&&d++;return n+10*Math.floor(Math.abs(10-20*d/(t*t)))}e.exports={getMatrix:function(e){var t=n(e.version);r(t),i(t),a(t);for(var s=1/0,c=0,d=0;d<8;d++){u(t,e,d),o(t,e.ec_level,d);var f=l(t);f<s&&(s=f,c=d)}return u(t,e,c),o(t,e.ec_level,c),t.map((function(e){return e.map((function(e){return 1&e}))}))},init:n,fillFinders:r,fillAlignAndTiming:i,fillStub:a,fillReserved:o,fillData:u,calculatePenalty:l}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(49),i=n(61),a=new t([137,80,78,71,13,10,26,10]),s=new t([0,0,0,13,73,72,68,82,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0]),o=new t([0,0,0,0,73,68,65,84]),u=new t([0,0,0,0,73,69,78,68,174,66,96,130]);e.exports={bitmap:function(e,n,r){var i=e.length,a=(i+2*r)*n,s=new t((a+1)*a);s.fill(255);for(var o=0;o<a;o++)s[o*(a+1)]=0;for(o=0;o<i;o++)for(var u=0;u<i;u++)if(e[o][u]){var l=((r+o)*(a+1)+(r+u))*n+1;s.fill(0,l,l+n);for(var c=1;c<n;c++)s.copy(s,l+c*(a+1),l,l+n)}return{data:s,size:a}},png:function(e,n){n.push(a);var l=t.concat([s]);l.writeUInt32BE(e.size,8),l.writeUInt32BE(e.size,12),l.writeUInt32BE(i(l.slice(4,-4)),21),n.push(l);var c=t.concat([o,r.deflateSync(e.data,{level:9}),new t(4)]);c.writeUInt32BE(c.length-12,0),c.writeUInt32BE(i(c.slice(4,-4)),c.length-4),n.push(c),n.push(u),n.push(null)}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(e){var r=n(0).Buffer,i=n(14).Transform,a=n(50),s=n(21),o=n(20).ok,u=n(0).kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(a),d=0;d<c.length;d++){var f=c[d];f.match(/^Z/)&&Object.defineProperty(t,f,{enumerable:!0,value:a[f],writable:!1})}for(var p={Z_OK:a.Z_OK,Z_STREAM_END:a.Z_STREAM_END,Z_NEED_DICT:a.Z_NEED_DICT,Z_ERRNO:a.Z_ERRNO,Z_STREAM_ERROR:a.Z_STREAM_ERROR,Z_DATA_ERROR:a.Z_DATA_ERROR,Z_MEM_ERROR:a.Z_MEM_ERROR,Z_BUF_ERROR:a.Z_BUF_ERROR,Z_VERSION_ERROR:a.Z_VERSION_ERROR},y=Object.keys(p),h=0;h<y.length;h++){var m=y[h];p[p[m]]=m}function b(e,t,n){var i=[],a=0;function s(){for(var t;null!==(t=e.read());)i.push(t),a+=t.length;e.once("readable",s)}function o(){var t,s=null;a>=u?s=new RangeError(l):t=r.concat(i,a),i=[],e.close(),n(s,t)}e.on("error",(function(t){e.removeListener("end",o),e.removeListener("readable",s),n(t)})),e.on("end",o),e.end(t),s()}function g(e,t){if("string"==typeof t&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Not a string or buffer");var n=e._finishFlushFlag;return e._processChunk(t,n)}function _(e){if(!(this instanceof _))return new _(e);E.call(this,e,a.DEFLATE)}function v(e){if(!(this instanceof v))return new v(e);E.call(this,e,a.INFLATE)}function w(e){if(!(this instanceof w))return new w(e);E.call(this,e,a.GZIP)}function T(e){if(!(this instanceof T))return new T(e);E.call(this,e,a.GUNZIP)}function I(e){if(!(this instanceof I))return new I(e);E.call(this,e,a.DEFLATERAW)}function S(e){if(!(this instanceof S))return new S(e);E.call(this,e,a.INFLATERAW)}function A(e){if(!(this instanceof A))return new A(e);E.call(this,e,a.UNZIP)}function D(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function E(e,n){var s=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,i.call(this,e),e.flush&&!D(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!D(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!r.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(n);var o=this;this._hadError=!1,this._handle.onerror=function(e,n){C(o),o._hadError=!0;var r=new Error(e);r.errno=n,r.code=t.codes[n],o.emit("error",r)};var u=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(u=e.level);var l=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(l=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,u,e.memLevel||t.Z_DEFAULT_MEMLEVEL,l,e.dictionary),this._buffer=r.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=l,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!s._handle},configurable:!0,enumerable:!0})}function C(t,n){n&&e.nextTick(n),t._handle&&(t._handle.close(),t._handle=null)}function x(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=_,t.Inflate=v,t.Gzip=w,t.Gunzip=T,t.DeflateRaw=I,t.InflateRaw=S,t.Unzip=A,t.createDeflate=function(e){return new _(e)},t.createInflate=function(e){return new v(e)},t.createDeflateRaw=function(e){return new I(e)},t.createInflateRaw=function(e){return new S(e)},t.createGzip=function(e){return new w(e)},t.createGunzip=function(e){return new T(e)},t.createUnzip=function(e){return new A(e)},t.deflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),b(new _(t),e,n)},t.deflateSync=function(e,t){return g(new _(t),e)},t.gzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),b(new w(t),e,n)},t.gzipSync=function(e,t){return g(new w(t),e)},t.deflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),b(new I(t),e,n)},t.deflateRawSync=function(e,t){return g(new I(t),e)},t.unzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),b(new A(t),e,n)},t.unzipSync=function(e,t){return g(new A(t),e)},t.inflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),b(new v(t),e,n)},t.inflateSync=function(e,t){return g(new v(t),e)},t.gunzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),b(new T(t),e,n)},t.gunzipSync=function(e,t){return g(new T(t),e)},t.inflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),b(new S(t),e,n)},t.inflateRawSync=function(e,t){return g(new S(t),e)},s.inherits(E,i),E.prototype.params=function(n,r,i){if(n<t.Z_MIN_LEVEL||n>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+n);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==n||this._strategy!==r){var s=this;this.flush(a.Z_SYNC_FLUSH,(function(){o(s._handle,"zlib binding closed"),s._handle.params(n,r),s._hadError||(s._level=n,s._strategy=r,i&&i())}))}else e.nextTick(i)},E.prototype.reset=function(){return o(this._handle,"zlib binding closed"),this._handle.reset()},E.prototype._flush=function(e){this._transform(r.alloc(0),"",e)},E.prototype.flush=function(t,n){var i=this,s=this._writableState;("function"==typeof t||void 0===t&&!n)&&(n=t,t=a.Z_FULL_FLUSH),s.ended?n&&e.nextTick(n):s.ending?n&&this.once("end",n):s.needDrain?n&&this.once("drain",(function(){return i.flush(t,n)})):(this._flushFlag=t,this.write(r.alloc(0),"",n))},E.prototype.close=function(t){C(this,t),e.nextTick(x,this)},E.prototype._transform=function(e,t,n){var i,s=this._writableState,o=(s.ending||s.ended)&&(!e||s.length===e.length);return null===e||r.isBuffer(e)?this._handle?(o?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=s.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,i,n)):n(new Error("zlib binding closed")):n(new Error("invalid input"))},E.prototype._processChunk=function(e,t,n){var i=e&&e.length,a=this._chunkSize-this._offset,s=0,c=this,d="function"==typeof n;if(!d){var f,p=[],y=0;this.on("error",(function(e){f=e})),o(this._handle,"zlib binding closed");do{var h=this._handle.writeSync(t,e,s,i,this._buffer,this._offset,a)}while(!this._hadError&&g(h[0],h[1]));if(this._hadError)throw f;if(y>=u)throw C(this),new RangeError(l);var m=r.concat(p,y);return C(this),m}o(this._handle,"zlib binding closed");var b=this._handle.write(t,e,s,i,this._buffer,this._offset,a);function g(u,l){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var f=a-l;if(o(f>=0,"have should not go down"),f>0){var h=c._buffer.slice(c._offset,c._offset+f);c._offset+=f,d?c.push(h):(p.push(h),y+=h.length)}if((0===l||c._offset>=c._chunkSize)&&(a=c._chunkSize,c._offset=0,c._buffer=r.allocUnsafe(c._chunkSize)),0===l){if(s+=i-u,i=u,!d)return!0;var m=c._handle.write(t,e,s,i,c._buffer,c._offset,c._chunkSize);return m.callback=g,void(m.buffer=e)}if(!d)return!1;n()}}b.buffer=e,b.callback=g},s.inherits(_,E),s.inherits(v,E),s.inherits(w,E),s.inherits(T,E),s.inherits(I,E),s.inherits(S,E),s.inherits(A,E)}).call(this,n(1))},function(e,t,n){"use strict";(function(e,r){var i=n(20),a=n(53),s=n(54),o=n(57),u=n(60);for(var l in u)t[l]=u[l];function c(e){if("number"!=typeof e||e<t.DEFLATE||e>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||o.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},c.prototype.write=function(e,t,n,r,i,a,s){return this._write(!0,e,t,n,r,i,a,s)},c.prototype.writeSync=function(e,t,n,r,i,a,s){return this._write(!1,e,t,n,r,i,a,s)},c.prototype._write=function(n,a,s,o,u,l,c,d){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==t.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===a,"must provide flush value"),this.write_in_progress=!0,a!==t.Z_NO_FLUSH&&a!==t.Z_PARTIAL_FLUSH&&a!==t.Z_SYNC_FLUSH&&a!==t.Z_FULL_FLUSH&&a!==t.Z_FINISH&&a!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=e.alloc(0),u=0,o=0),this.strm.avail_in=u,this.strm.input=s,this.strm.next_in=o,this.strm.avail_out=d,this.strm.output=l,this.strm.next_out=c,this.flush=a,!n)return this._process(),this._checkError()?this._afterSync():void 0;var f=this;return r.nextTick((function(){f._process(),f._after()})),this},c.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},c.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=o.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=o.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=o.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=o.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},c.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(e,n,r,a,s){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(e>=8&&e<=15,"invalid windowBits"),i(n>=-1&&n<=9,"invalid compression level"),i(r>=1&&r<=9,"invalid memlevel"),i(a===t.Z_FILTERED||a===t.Z_HUFFMAN_ONLY||a===t.Z_RLE||a===t.Z_FIXED||a===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(n,e,r,a,s),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(e,n,r,i,u){switch(this.level=e,this.windowBits=n,this.memLevel=r,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=o.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=o.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=c}).call(this,n(0).Buffer,n(1))},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,u=s(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){o=r(n);for(var d=0;d<o.length;d++)a.call(n,o[d])&&(u[o[d]]=n[o[d]])}}return u}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,n){"use strict";var r,i=n(8),a=n(55),s=n(22),o=n(23),u=n(56);function l(e,t){return e.msg=u[t],t}function c(e){return(e<<1)-(e>4?9:0)}function d(e){for(var t=e.length;--t>=0;)e[t]=0}function f(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function p(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,f(e.strm)}function y(e,t){e.pending_buf[e.pending++]=t}function h(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function m(e,t){var n,r,i=e.max_chain_length,a=e.strstart,s=e.prev_length,o=e.nice_match,u=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,c=e.w_mask,d=e.prev,f=e.strstart+258,p=l[a+s-1],y=l[a+s];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(l[(n=t)+s]===y&&l[n+s-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do{}while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&a<f);if(r=258-(f-a),a=f-258,r>s){if(e.match_start=t,s=r,r>=o)break;p=l[a+s-1],y=l[a+s]}}}while((t=d[t&c])>u&&0!=--i);return s<=e.lookahead?s:e.lookahead}function b(e){var t,n,r,a,u,l,c,d,f,p,y=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=y+(y-262)){i.arraySet(e.window,e.window,y,y,0),e.match_start-=y,e.strstart-=y,e.block_start-=y,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=y?r-y:0}while(--n);t=n=y;do{r=e.prev[--t],e.prev[t]=r>=y?r-y:0}while(--n);a+=y}if(0===e.strm.avail_in)break;if(l=e.strm,c=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,(p=l.avail_in)>f&&(p=f),n=0===p?0:(l.avail_in-=p,i.arraySet(c,l.input,l.next_in,p,d),1===l.state.wrap?l.adler=s(l.adler,c,p,d):2===l.state.wrap&&(l.adler=o(l.adler,c,p,d)),l.next_in+=p,l.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=3)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+3-1])&e.hash_mask,e.prev[u&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=u,u++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function g(e,t){for(var n,r;;){if(e.lookahead<262){if(b(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=m(e,n)),e.match_length>=3)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}function _(e,t){for(var n,r,i;;){if(e.lookahead<262){if(b(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=m(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(p(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=a._tr_tally(e,0,e.window[e.strstart-1]))&&p(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=a._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}function v(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),d(this.dyn_ltree),d(this.dyn_dtree),d(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),d(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),d(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function T(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,a._tr_init(t),0):l(e,-2)}function I(e){var t,n=T(e);return 0===n&&((t=e.state).window_size=2*t.w_size,d(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function S(e,t,n,r,a,s){if(!e)return-2;var o=1;if(-1===t&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),a<1||a>9||8!==n||r<8||r>15||t<0||t>9||s<0||s>4)return l(e,-2);8===r&&(r=9);var u=new w;return e.state=u,u.strm=e,u.wrap=o,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=s,u.method=n,I(e)}r=[new v(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(b(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,p(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(p(e,!1),e.strm.avail_out),1)})),new v(4,4,8,4,g),new v(4,5,16,8,g),new v(4,6,32,32,g),new v(4,4,16,16,_),new v(8,16,32,32,_),new v(8,16,128,128,_),new v(8,32,128,256,_),new v(32,128,258,1024,_),new v(32,258,258,4096,_)],t.deflateInit=function(e,t){return S(e,t,8,15,8,0)},t.deflateInit2=S,t.deflateReset=I,t.deflateResetKeep=T,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var n,i,s,u;if(!e||!e.state||t>5||t<0)return e?l(e,-2):-2;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return l(e,0===e.avail_out?-5:-2);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,y(i,31),y(i,139),y(i,8),i.gzhead?(y(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),y(i,255&i.gzhead.time),y(i,i.gzhead.time>>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=o(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),y(i,3),i.status=113);else{var m=8+(i.w_bits-8<<4)<<8;m|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(m|=32),m+=31-m%31,i.status=113,h(i,m),0!==i.strstart&&(h(i,e.adler>>>16),h(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),f(e),s=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),f(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),f(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&f(e),i.pending+2<=i.pending_buf_size&&(y(i,255&e.adler),y(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(f(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&c(t)<=c(n)&&4!==t)return l(e,-5);if(666===i.status&&0!==e.avail_in)return l(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var g=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(b(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,s,o=e.window;;){if(e.lookahead<=258){if(b(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=o[i=e.strstart-1])===o[++i]&&r===o[++i]&&r===o[++i]){s=e.strstart+258;do{}while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<s);e.match_length=258-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=a._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==g&&4!==g||(i.status=666),1===g||3===g)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===g&&(1===t?a._tr_align(i):5!==t&&(a._tr_stored_block(i,0,0,!1),3===t&&(d(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),f(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&e.adler),y(i,e.adler>>8&255),y(i,e.adler>>16&255),y(i,e.adler>>24&255),y(i,255&e.total_in),y(i,e.total_in>>8&255),y(i,e.total_in>>16&255),y(i,e.total_in>>24&255)):(h(i,e.adler>>>16),h(i,65535&e.adler)),f(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?l(e,-2):(e.state=null,113===t?l(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var n,r,a,o,u,l,c,f,p=t.length;if(!e||!e.state)return-2;if(2===(o=(n=e.state).wrap)||1===o&&42!==n.status||n.lookahead)return-2;for(1===o&&(e.adler=s(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===o&&(d(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new i.Buf8(n.w_size),i.arraySet(f,t,p-n.w_size,n.w_size,0),t=f,p=n.w_size),u=e.avail_in,l=e.next_in,c=e.input,e.avail_in=p,e.next_in=0,e.input=t,b(n);n.lookahead>=3;){r=n.strstart,a=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--a);n.strstart=r,n.lookahead=2,b(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=l,e.input=c,e.avail_in=u,n.wrap=o,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,n){"use strict";var r=n(8);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var a=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);i(l);var c=new Array(60);i(c);var d=new Array(512);i(d);var f=new Array(256);i(f);var p=new Array(29);i(p);var y,h,m,b=new Array(30);function g(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function _(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function v(e){return e<256?d[e]:d[256+(e>>>7)]}function w(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function T(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,w(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function I(e,t,n){T(e,n[2*t],n[2*t+1])}function S(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function A(e,t,n){var r,i,a=new Array(16),s=0;for(r=1;r<=15;r++)a[r]=s=s+n[r-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=S(a[o]++,o))}}function D(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function E(e){e.bi_valid>8?w(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function C(e,t,n,r){var i=2*t,a=2*n;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function x(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&C(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!C(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function M(e,t,n){var r,i,o,u,l=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],i=e.pending_buf[e.l_buf+l],l++,0===r?I(e,i,t):(I(e,(o=f[i])+256+1,t),0!==(u=a[o])&&T(e,i-=p[o],u),I(e,o=v(--r),n),0!==(u=s[o])&&T(e,r-=b[o],u))}while(l<e.last_lit);I(e,256,t)}function k(e,t){var n,r,i,a=t.dyn_tree,s=t.stat_desc.static_tree,o=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==a[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):a[2*n+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=s[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)x(e,a,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],x(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,x(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,s,o,u=t.dyn_tree,l=t.max_code,c=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,y=t.stat_desc.max_length,h=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(a=u[2*u[2*(r=e.heap[n])+1]+1]+1)>y&&(a=y,h++),u[2*r+1]=a,r>l||(e.bl_count[a]++,s=0,r>=p&&(s=f[r-p]),o=u[2*r],e.opt_len+=o*(a+s),d&&(e.static_len+=o*(c[2*r+1]+s)));if(0!==h){do{for(a=y-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[y]--,h-=2}while(h>0);for(a=y;0!==a;a--)for(r=e.bl_count[a];0!==r;)(i=e.heap[--n])>l||(u[2*i+1]!==a&&(e.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),r--)}}(e,t),A(a,l,e.bl_count)}function N(e,t,n){var r,i,a=-1,s=t[1],o=0,u=7,l=4;for(0===s&&(u=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=s,s=t[2*(r+1)+1],++o<u&&i===s||(o<l?e.bl_tree[2*i]+=o:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=0,a=i,0===s?(u=138,l=3):i===s?(u=6,l=3):(u=7,l=4))}function P(e,t,n){var r,i,a=-1,s=t[1],o=0,u=7,l=4;for(0===s&&(u=138,l=3),r=0;r<=n;r++)if(i=s,s=t[2*(r+1)+1],!(++o<u&&i===s)){if(o<l)do{I(e,i,e.bl_tree)}while(0!=--o);else 0!==i?(i!==a&&(I(e,i,e.bl_tree),o--),I(e,16,e.bl_tree),T(e,o-3,2)):o<=10?(I(e,17,e.bl_tree),T(e,o-3,3)):(I(e,18,e.bl_tree),T(e,o-11,7));o=0,a=i,0===s?(u=138,l=3):i===s?(u=6,l=3):(u=7,l=4)}}i(b);var L=!1;function R(e,t,n,i){T(e,0+(i?1:0),3),function(e,t,n,i){E(e),w(e,n),w(e,~n),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}t._tr_init=function(e){L||(function(){var e,t,n,r,i,u=new Array(16);for(n=0,r=0;r<28;r++)for(p[r]=n,e=0;e<1<<a[r];e++)f[n++]=r;for(f[n-1]=r,i=0,r=0;r<16;r++)for(b[r]=i,e=0;e<1<<s[r];e++)d[i++]=r;for(i>>=7;r<30;r++)for(b[r]=i<<7,e=0;e<1<<s[r]-7;e++)d[256+i++]=r;for(t=0;t<=15;t++)u[t]=0;for(e=0;e<=143;)l[2*e+1]=8,e++,u[8]++;for(;e<=255;)l[2*e+1]=9,e++,u[9]++;for(;e<=279;)l[2*e+1]=7,e++,u[7]++;for(;e<=287;)l[2*e+1]=8,e++,u[8]++;for(A(l,287,u),e=0;e<30;e++)c[2*e+1]=5,c[2*e]=S(e,5);y=new g(l,a,257,286,15),h=new g(c,s,0,30,15),m=new g(new Array(0),o,0,19,7)}(),L=!0),e.l_desc=new _(e.dyn_ltree,y),e.d_desc=new _(e.dyn_dtree,h),e.bl_desc=new _(e.bl_tree,m),e.bi_buf=0,e.bi_valid=0,D(e)},t._tr_stored_block=R,t._tr_flush_block=function(e,t,n,r){var i,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),k(e,e.l_desc),k(e,e.d_desc),s=function(e){var t;for(N(e,e.dyn_ltree,e.l_desc.max_code),N(e,e.dyn_dtree,e.d_desc.max_code),k(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*u[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?R(e,t,n,r):4===e.strategy||a===i?(T(e,2+(r?1:0),3),M(e,l,c)):(T(e,4+(r?1:0),3),function(e,t,n,r){var i;for(T(e,t-257,5),T(e,n-1,5),T(e,r-4,4),i=0;i<r;i++)T(e,e.bl_tree[2*u[i]+1],3);P(e,e.dyn_ltree,t-1),P(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),M(e,e.dyn_ltree,e.dyn_dtree)),D(e),r&&E(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(f[n]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){T(e,2,3),I(e,256,l),function(e){16===e.bi_valid?(w(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){"use strict";var r=n(8),i=n(22),a=n(23),s=n(58),o=n(59);function u(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):-2}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,c(e)):-2}function f(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,d(e))):-2}function p(e,t){var n,r;return e?(r=new l,e.state=r,r.window=null,0!==(n=f(e,t))&&(e.state=null),n):-2}var y,h,m=!0;function b(e){if(m){var t;for(y=new r.Buf32(512),h=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(1,e.lens,0,288,y,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(2,e.lens,0,32,h,0,e.work,{bits:5}),m=!1}e.lencode=y,e.lenbits=9,e.distcode=h,e.distbits=5}function g(e,t,n,i){var a,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new r.Buf8(s.wsize)),i>=s.wsize?(r.arraySet(s.window,t,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((a=s.wsize-s.wnext)>i&&(a=i),r.arraySet(s.window,t,n-i,a,s.wnext),(i-=a)?(r.arraySet(s.window,t,n-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=a,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=a))),0}t.inflateReset=d,t.inflateReset2=f,t.inflateResetKeep=c,t.inflateInit=function(e){return p(e,15)},t.inflateInit2=p,t.inflate=function(e,t){var n,l,c,d,f,p,y,h,m,_,v,w,T,I,S,A,D,E,C,x,M,k,N,P,L=0,R=new r.Buf8(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),f=e.next_out,c=e.output,y=e.avail_out,d=e.next_in,l=e.input,p=e.avail_in,h=n.hold,m=n.bits,_=p,v=y,k=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;m<16;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if(2&n.wrap&&35615===h){n.check=0,R[0]=255&h,R[1]=h>>>8&255,n.check=a(n.check,R,2,0),h=0,m=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&h)){e.msg="unknown compression method",n.mode=30;break}if(m-=4,M=8+(15&(h>>>=4)),0===n.wbits)n.wbits=M;else if(M>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<M,e.adler=n.check=1,n.mode=512&h?10:12,h=0,m=0;break;case 2:for(;m<16;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if(n.flags=h,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=h>>8&1),512&n.flags&&(R[0]=255&h,R[1]=h>>>8&255,n.check=a(n.check,R,2,0)),h=0,m=0,n.mode=3;case 3:for(;m<32;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}n.head&&(n.head.time=h),512&n.flags&&(R[0]=255&h,R[1]=h>>>8&255,R[2]=h>>>16&255,R[3]=h>>>24&255,n.check=a(n.check,R,4,0)),h=0,m=0,n.mode=4;case 4:for(;m<16;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}n.head&&(n.head.xflags=255&h,n.head.os=h>>8),512&n.flags&&(R[0]=255&h,R[1]=h>>>8&255,n.check=a(n.check,R,2,0)),h=0,m=0,n.mode=5;case 5:if(1024&n.flags){for(;m<16;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}n.length=h,n.head&&(n.head.extra_len=h),512&n.flags&&(R[0]=255&h,R[1]=h>>>8&255,n.check=a(n.check,R,2,0)),h=0,m=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((w=n.length)>p&&(w=p),w&&(n.head&&(M=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,l,d,w,M)),512&n.flags&&(n.check=a(n.check,l,w,d)),p-=w,d+=w,n.length-=w),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===p)break e;w=0;do{M=l[d+w++],n.head&&M&&n.length<65536&&(n.head.name+=String.fromCharCode(M))}while(M&&w<p);if(512&n.flags&&(n.check=a(n.check,l,w,d)),p-=w,d+=w,M)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===p)break e;w=0;do{M=l[d+w++],n.head&&M&&n.length<65536&&(n.head.comment+=String.fromCharCode(M))}while(M&&w<p);if(512&n.flags&&(n.check=a(n.check,l,w,d)),p-=w,d+=w,M)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;m<16;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if(h!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}h=0,m=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;m<32;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}e.adler=n.check=u(h),h=0,m=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=f,e.avail_out=y,e.next_in=d,e.avail_in=p,n.hold=h,n.bits=m,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){h>>>=7&m,m-=7&m,n.mode=27;break}for(;m<3;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}switch(n.last=1&h,m-=1,3&(h>>>=1)){case 0:n.mode=14;break;case 1:if(b(n),n.mode=20,6===t){h>>>=2,m-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}h>>>=2,m-=2;break;case 14:for(h>>>=7&m,m-=7&m;m<32;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if((65535&h)!=(h>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&h,h=0,m=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(w=n.length){if(w>p&&(w=p),w>y&&(w=y),0===w)break e;r.arraySet(c,l,d,w,f),p-=w,d+=w,y-=w,f+=w,n.length-=w;break}n.mode=12;break;case 17:for(;m<14;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if(n.nlen=257+(31&h),h>>>=5,m-=5,n.ndist=1+(31&h),h>>>=5,m-=5,n.ncode=4+(15&h),h>>>=4,m-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;m<3;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}n.lens[O[n.have++]]=7&h,h>>>=3,m-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,N={bits:n.lenbits},k=o(0,n.lens,0,19,n.lencode,0,n.work,N),n.lenbits=N.bits,k){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;A=(L=n.lencode[h&(1<<n.lenbits)-1])>>>16&255,D=65535&L,!((S=L>>>24)<=m);){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if(D<16)h>>>=S,m-=S,n.lens[n.have++]=D;else{if(16===D){for(P=S+2;m<P;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if(h>>>=S,m-=S,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}M=n.lens[n.have-1],w=3+(3&h),h>>>=2,m-=2}else if(17===D){for(P=S+3;m<P;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}m-=S,M=0,w=3+(7&(h>>>=S)),h>>>=3,m-=3}else{for(P=S+7;m<P;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}m-=S,M=0,w=11+(127&(h>>>=S)),h>>>=7,m-=7}if(n.have+w>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;w--;)n.lens[n.have++]=M}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,N={bits:n.lenbits},k=o(1,n.lens,0,n.nlen,n.lencode,0,n.work,N),n.lenbits=N.bits,k){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,N={bits:n.distbits},k=o(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,N),n.distbits=N.bits,k){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(p>=6&&y>=258){e.next_out=f,e.avail_out=y,e.next_in=d,e.avail_in=p,n.hold=h,n.bits=m,s(e,v),f=e.next_out,c=e.output,y=e.avail_out,d=e.next_in,l=e.input,p=e.avail_in,h=n.hold,m=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;A=(L=n.lencode[h&(1<<n.lenbits)-1])>>>16&255,D=65535&L,!((S=L>>>24)<=m);){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if(A&&0==(240&A)){for(E=S,C=A,x=D;A=(L=n.lencode[x+((h&(1<<E+C)-1)>>E)])>>>16&255,D=65535&L,!(E+(S=L>>>24)<=m);){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}h>>>=E,m-=E,n.back+=E}if(h>>>=S,m-=S,n.back+=S,n.length=D,0===A){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(P=n.extra;m<P;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}n.length+=h&(1<<n.extra)-1,h>>>=n.extra,m-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(L=n.distcode[h&(1<<n.distbits)-1])>>>16&255,D=65535&L,!((S=L>>>24)<=m);){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if(0==(240&A)){for(E=S,C=A,x=D;A=(L=n.distcode[x+((h&(1<<E+C)-1)>>E)])>>>16&255,D=65535&L,!(E+(S=L>>>24)<=m);){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}h>>>=E,m-=E,n.back+=E}if(h>>>=S,m-=S,n.back+=S,64&A){e.msg="invalid distance code",n.mode=30;break}n.offset=D,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(P=n.extra;m<P;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}n.offset+=h&(1<<n.extra)-1,h>>>=n.extra,m-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===y)break e;if(w=v-y,n.offset>w){if((w=n.offset-w)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}w>n.wnext?(w-=n.wnext,T=n.wsize-w):T=n.wnext-w,w>n.length&&(w=n.length),I=n.window}else I=c,T=f-n.offset,w=n.length;w>y&&(w=y),y-=w,n.length-=w;do{c[f++]=I[T++]}while(--w);0===n.length&&(n.mode=21);break;case 26:if(0===y)break e;c[f++]=n.length,y--,n.mode=21;break;case 27:if(n.wrap){for(;m<32;){if(0===p)break e;p--,h|=l[d++]<<m,m+=8}if(v-=y,e.total_out+=v,n.total+=v,v&&(e.adler=n.check=n.flags?a(n.check,c,v,f-v):i(n.check,c,v,f-v)),v=y,(n.flags?h:u(h))!==n.check){e.msg="incorrect data check",n.mode=30;break}h=0,m=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;m<32;){if(0===p)break e;p--,h+=l[d++]<<m,m+=8}if(h!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}h=0,m=0}n.mode=29;case 29:k=1;break e;case 30:k=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=f,e.avail_out=y,e.next_in=d,e.avail_in=p,n.hold=h,n.bits=m,(n.wsize||v!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&g(e,e.output,e.next_out,v-e.avail_out)?(n.mode=31,-4):(_-=e.avail_in,v-=e.avail_out,e.total_in+=_,e.total_out+=v,n.total+=v,n.wrap&&v&&(e.adler=n.check=n.flags?a(n.check,c,v,e.next_out-v):i(n.check,c,v,e.next_out-v)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===_&&0===v||4===t)&&0===k&&(k=-5),k)},t.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&i(1,t,r,0)!==n.check?-3:g(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,i,a,s,o,u,l,c,d,f,p,y,h,m,b,g,_,v,w,T,I,S,A,D;n=e.state,r=e.next_in,A=e.input,i=r+(e.avail_in-5),a=e.next_out,D=e.output,s=a-(t-e.avail_out),o=a+(e.avail_out-257),u=n.dmax,l=n.wsize,c=n.whave,d=n.wnext,f=n.window,p=n.hold,y=n.bits,h=n.lencode,m=n.distcode,b=(1<<n.lenbits)-1,g=(1<<n.distbits)-1;e:do{y<15&&(p+=A[r++]<<y,y+=8,p+=A[r++]<<y,y+=8),_=h[p&b];t:for(;;){if(p>>>=v=_>>>24,y-=v,0==(v=_>>>16&255))D[a++]=65535&_;else{if(!(16&v)){if(0==(64&v)){_=h[(65535&_)+(p&(1<<v)-1)];continue t}if(32&v){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&_,(v&=15)&&(y<v&&(p+=A[r++]<<y,y+=8),w+=p&(1<<v)-1,p>>>=v,y-=v),y<15&&(p+=A[r++]<<y,y+=8,p+=A[r++]<<y,y+=8),_=m[p&g];n:for(;;){if(p>>>=v=_>>>24,y-=v,!(16&(v=_>>>16&255))){if(0==(64&v)){_=m[(65535&_)+(p&(1<<v)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(T=65535&_,y<(v&=15)&&(p+=A[r++]<<y,(y+=8)<v&&(p+=A[r++]<<y,y+=8)),(T+=p&(1<<v)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=v,y-=v,T>(v=a-s)){if((v=T-v)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(I=0,S=f,0===d){if(I+=l-v,v<w){w-=v;do{D[a++]=f[I++]}while(--v);I=a-T,S=D}}else if(d<v){if(I+=l+d-v,(v-=d)<w){w-=v;do{D[a++]=f[I++]}while(--v);if(I=0,d<w){w-=v=d;do{D[a++]=f[I++]}while(--v);I=a-T,S=D}}}else if(I+=d-v,v<w){w-=v;do{D[a++]=f[I++]}while(--v);I=a-T,S=D}for(;w>2;)D[a++]=S[I++],D[a++]=S[I++],D[a++]=S[I++],w-=3;w&&(D[a++]=S[I++],w>1&&(D[a++]=S[I++]))}else{I=a-T;do{D[a++]=D[I++],D[a++]=D[I++],D[a++]=D[I++],w-=3}while(w>2);w&&(D[a++]=D[I++],w>1&&(D[a++]=D[I++]))}break}}break}}while(r<i&&a<o);r-=w=y>>3,p&=(1<<(y-=w<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<o?o-a+257:257-(a-o),n.hold=p,n.bits=y}},function(e,t,n){"use strict";var r=n(8),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,u,l,c,d,f){var p,y,h,m,b,g,_,v,w,T=f.bits,I=0,S=0,A=0,D=0,E=0,C=0,x=0,M=0,k=0,N=0,P=null,L=0,R=new r.Buf16(16),O=new r.Buf16(16),B=null,j=0;for(I=0;I<=15;I++)R[I]=0;for(S=0;S<u;S++)R[t[n+S]]++;for(E=T,D=15;D>=1&&0===R[D];D--);if(E>D&&(E=D),0===D)return l[c++]=20971520,l[c++]=20971520,f.bits=1,0;for(A=1;A<D&&0===R[A];A++);for(E<A&&(E=A),M=1,I=1;I<=15;I++)if(M<<=1,(M-=R[I])<0)return-1;if(M>0&&(0===e||1!==D))return-1;for(O[1]=0,I=1;I<15;I++)O[I+1]=O[I]+R[I];for(S=0;S<u;S++)0!==t[n+S]&&(d[O[t[n+S]]++]=S);if(0===e?(P=B=d,g=19):1===e?(P=i,L-=257,B=a,j-=257,g=256):(P=s,B=o,g=-1),N=0,S=0,I=A,b=c,C=E,x=0,h=-1,m=(k=1<<E)-1,1===e&&k>852||2===e&&k>592)return 1;for(;;){_=I-x,d[S]<g?(v=0,w=d[S]):d[S]>g?(v=B[j+d[S]],w=P[L+d[S]]):(v=96,w=0),p=1<<I-x,A=y=1<<C;do{l[b+(N>>x)+(y-=p)]=_<<24|v<<16|w|0}while(0!==y);for(p=1<<I-1;N&p;)p>>=1;if(0!==p?(N&=p-1,N+=p):N=0,S++,0==--R[I]){if(I===D)break;I=t[n+d[S]]}if(I>E&&(N&m)!==h){for(0===x&&(x=E),b+=A,M=1<<(C=I-x);C+x<D&&!((M-=R[C+x])<=0);)C++,M<<=1;if(k+=1<<C,1===e&&k>852||2===e&&k>592)return 1;l[h=N&m]=E<<24|C<<16|b-c|0}}return 0!==N&&(l[b+N]=I-x<<24|64<<16|0),f.bits=E,0}},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){"use strict";(function(t,r){!function(){if("arm"!==t.arch){var i=[];!function(){for(var e=0;e<256;e++){for(var t=e,n=0;n<8;n++)1&t?t=3988292384^t>>>1:t>>>=1;i[e]=t>>>0}}(),e.exports=function(){for(var e=arguments.length,t=-1,n=0;n<e;n++)t=a(t,new r(arguments[n]));return(-1^t)>>>0}}else e.exports=n(62);function a(e,t){for(var n=t.length,r=0;r<n;r++)e=i[255&(e^t[r])]^e>>>8;return e}}()}).call(this,n(1),n(0).Buffer)},function(e,t,n){"use strict";(function(t){for(var n=[],r=0;r<256;r++){var i=n[r]=new t(4);i.writeUInt32BE(r,0);for(var a=0;a<8;a++){var s=1&i[0],o=1&i[1],u=1&i[2],l=1&i[3];i[0]=i[0]>>1^(l?237:0),i[1]=i[1]>>1^(l?184:0)^(s?128:0),i[2]=i[2]>>1^(l?131:0)^(o?128:0),i[3]=i[3]>>1^(l?32:0)^(u?128:0)}}function c(e,t){for(var r=t.length,i=0;i<r;i++){var a=n[e[3]^t[i]];e[3]=a[3]^e[2],e[2]=a[2]^e[1],e[1]=a[1]^e[0],e[0]=a[0]}}e.exports=function(){var e=arguments.length,n=new t(4);n.fill(255);for(var r=0;r<e;r++)c(n,new t(arguments[r]));return n[0]=255^n[0],n[1]=255^n[1],n[2]=255^n[2],n[3]=255^n[3],n.readUInt32BE(0)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";function r(e){for(var t=e.length,n=[],r=-1;r<=t;r++)n[r]=[];var i=[];for(r=0;r<t;r++)for(var a=0;a<t;a++)n[r][a]||(n[r][a]=1,s(r,a)?s(r-1,a)||i.push(o(r,a,"right")):s(r,a-1)&&i.push(o(r,a,"down")));return i;function s(n,r){return!(n<0||r<0||n>=t||r>=t||!e[n][r])}function o(e,t,r){n[e][t]=1;var i=[];i.push(["M",t,e]);var a=e,o=t,u=0;do{switch(r){case"right":n[a][o]=1,s(a,o)?(n[a-1][o]=1,s(a-1,o)?(i.push(["h",u]),u=0,r="up"):(u++,o++)):(i.push(["h",u]),u=0,r="down");break;case"left":n[a-1][o-1]=1,s(a-1,o-1)?(n[a][o-1]=1,s(a,o-1)?(i.push(["h",-u]),u=0,r="down"):(u++,o--)):(i.push(["h",-u]),u=0,r="up");break;case"down":n[a][o-1]=1,s(a,o-1)?(n[a][o]=1,s(a,o)?(i.push(["v",u]),u=0,r="right"):(u++,a++)):(i.push(["v",u]),u=0,r="left");break;case"up":n[a-1][o]=1,s(a-1,o)?(n[a-1][o-1]=1,s(a-1,o-1)?(i.push(["v",-u]),u=0,r="left"):(u++,a--)):(i.push(["v",-u]),u=0,r="right")}}while(a!=e||o!=t);return i}}function i(e,t,n){r(e).forEach((function(e){for(var r="",i=0;i<e.length;i++){var a=e[i];switch(a[0]){case"M":r+="M"+(a[1]+n)+" "+(a[2]+n);break;default:r+=a.join("")}}r+="z",t.push(r)}))}e.exports={svg:function(e,t,n,r){var a=e.length+2*n;if(t.push('<svg xmlns="http://www.w3.org/2000/svg" '),r>0){var s=a*r;t.push('width="'+s+'" height="'+s+'" ')}t.push('viewBox="0 0 '+a+" "+a+'">'),t.push('<path d="'),i(e,t,n),t.push('"/></svg>'),t.push(null)},eps:function(e,t,n){var i=e.length,a=9*(i+2*n);t.push(["%!PS-Adobe-3.0 EPSF-3.0","%%BoundingBox: 0 0 "+a+" "+a,"/h { 0 rlineto } bind def","/v { 0 exch neg rlineto } bind def","/M { neg "+(i+n)+" add moveto } bind def","/z { closepath } bind def","9 9 scale",""].join("\n")),r(e).forEach((function(e){for(var r="",i=0;i<e.length;i++){var a=e[i];switch(a[0]){case"M":r+=a[1]+n+" "+a[2]+" M ";break;default:r+=a[1]+" "+a[0]+" "}}r+="z\n",t.push(r)})),t.push("fill\n%%EOF\n"),t.push(null)},pdf:function(e,t,n){var i=e.length,a=9*(i+2*n),s=["%PDF-1.0\n\n","1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj\n","2 0 obj << /Type /Pages /Count 1 /Kids [ 3 0 R ] >> endobj\n"];s.push("3 0 obj << /Type /Page /Parent 2 0 R /Resources <<>> /Contents 4 0 R /MediaBox [ 0 0 "+a+" "+a+" ] >> endobj\n");var o="9 0 0 9 0 0 cm\n";o+=r(e).map((function(e){for(var t,r,a="",s=0;s<e.length;s++){var o=e[s];switch(o[0]){case"M":a+=(t=o[1]+n)+" "+(r=i-o[2]+n)+" m ";break;case"h":a+=(t+=o[1])+" "+r+" l ";break;case"v":a+=t+" "+(r-=o[1])+" l "}}return a+"h"})).join("\n"),o+="\nf\n",s.push("4 0 obj << /Length "+o.length+" >> stream\n"+o+"endstream\nendobj\n");for(var u="xref\n0 5\n0000000000 65535 f \n",l=1,c=s[0].length;l<5;l++)u+=("0000000000"+c).substr(-10)+" 00000 n \n",c+=s[l].length;s.push(u,"trailer << /Root 1 0 R /Size 5 >>\n","startxref\n"+c+"\n%%EOF\n"),t.push(s.join("")),t.push(null)},svg_object:function(e,t){var n=[];return i(e,n,t),{size:e.length+2*t,path:n.filter(Boolean).join("")}}}},function(e,t){e.exports="data:image/svg+xml,%3Csvg width='1459' height='238' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M526.767 130.224l-20.024 72.055h-20.827L458 96.827h22.874l16.588 76.367h.585l19.731-76.367h18.635l19.731 76.367h.585l16.662-76.367h22.873l-27.989 105.452h-20.827l-20.023-72.055h-.658zm99.898 57.878c9.281 0 16.954-6.066 16.954-14.543v-5.7l-16.515 1.023c-7.966.585-12.497 4.166-12.497 9.72 0 5.846 4.823 9.5 12.058 9.5zm-7.015 15.42c-14.908 0-26.236-9.647-26.236-23.751 0-14.25 10.962-22.508 30.474-23.677l19.731-1.17v-5.188c0-7.308-5.115-11.547-13.154-11.547-7.965 0-13.008 3.947-14.03 9.72h-19.513c.804-15.2 13.739-25.65 34.493-25.65 20.097 0 33.178 10.376 33.178 26.161v53.86h-20.608v-11.986h-.439c-4.384 8.331-14.104 13.228-23.896 13.228zm59.193-1.243V96.827h21.339v105.452h-21.339zm36.247 0V96.827h21.339v105.452H715.09zm70.886-64.236c-9.354 0-16.077 7.089-16.808 16.881h33.25c-.438-10.011-6.942-16.88-16.442-16.88zm16.735 40.266h19.585c-2.338 15.347-16.37 25.651-35.735 25.651-24.116 0-38.586-15.42-38.586-40.485 0-24.993 14.616-41.217 37.782-41.217 22.8 0 37.197 15.42 37.197 39.243v6.504h-54.005v1.316c0 11.18 7.088 18.854 17.977 18.854 7.82 0 13.812-3.873 15.785-9.866zm36.905-72.42h21.339v18.05h14.47v16.077h-14.47v37.49c0 5.992 2.923 8.842 9.208 8.842 1.9 0 3.873-.146 5.188-.365v15.712c-2.192.511-5.846.877-10.158.877-18.416 0-25.577-6.14-25.577-21.412v-41.144H828.58V123.94h11.035v-18.05zm95.952 98.217c-30.693 0-49.913-20.535-49.913-54.59 0-33.98 19.366-54.516 49.913-54.516 25.358 0 44.65 16.077 46.332 39.682h-21.486c-2.046-12.935-11.984-21.412-24.846-21.412-16.662 0-27.405 13.958-27.405 36.173 0 22.509 10.597 36.394 27.478 36.394 13.08 0 22.508-7.674 24.847-20.17h21.485c-2.485 23.531-20.535 38.44-46.405 38.44zm94.125-.146c-23.678 0-38.805-15.2-38.805-40.924 0-25.358 15.347-40.778 38.805-40.778s38.805 15.347 38.805 40.778c0 25.797-15.128 40.924-38.805 40.924zm0-16.297c10.45 0 17.1-8.842 17.1-24.554 0-15.566-6.723-24.554-17.1-24.554-10.377 0-17.174 8.988-17.174 24.554 0 15.712 6.65 24.554 17.174 24.554zm49.766 14.616v-78.34h20.608v13.958h.439c4.165-9.72 12.423-15.42 24.481-15.42 17.393 0 27.185 10.962 27.185 29.305v50.497h-21.339v-46.04c0-10.23-4.823-16.077-14.396-16.077s-15.639 7.016-15.639 17.174v44.943h-21.339zm86.233 0v-78.34h20.608v13.958h.438c4.166-9.72 12.424-15.42 24.482-15.42 17.392 0 27.185 10.962 27.185 29.305v50.497h-21.339v-46.04c0-10.23-4.823-16.077-14.396-16.077-9.574 0-15.64 7.016-15.64 17.174v44.943h-21.338zm121.383-64.236c-9.354 0-16.077 7.089-16.808 16.881h33.25c-.438-10.011-6.942-16.88-16.442-16.88zm16.735 40.266h19.585c-2.338 15.347-16.37 25.651-35.735 25.651-24.116 0-38.586-15.42-38.586-40.485 0-24.993 14.616-41.217 37.782-41.217 22.8 0 37.197 15.42 37.197 39.243v6.504h-54.005v1.316c0 11.18 7.089 18.854 17.977 18.854 7.82 0 13.812-3.873 15.785-9.866zm102.383-25.212h-19.804c-1.242-8.257-6.723-14.104-15.493-14.104-10.523 0-17.1 8.916-17.1 24.043 0 15.42 6.577 24.189 17.173 24.189 8.55 0 14.104-5.115 15.42-13.666h19.877c-1.096 18.49-14.908 30.401-35.516 30.401-23.604 0-38.585-15.346-38.585-40.924 0-25.139 14.98-40.778 38.439-40.778 21.193 0 34.64 13.081 35.59 30.84zm16.077-47.208h21.34v18.05h14.469v16.077h-14.47v37.49c0 5.992 2.923 8.842 9.208 8.842 1.9 0 3.873-.146 5.189-.365v15.712c-2.193.511-5.847.877-10.158.877-18.416 0-25.578-6.14-25.578-21.412v-41.144h-11.034V123.94h11.034v-18.05z' fill='%233999FB'/%3E%3Cpath d='M79.5 46.539c63.216-61.894 165.71-61.894 228.926 0l7.608 7.449a7.808 7.808 0 0 1 0 11.207l-26.026 25.482a4.108 4.108 0 0 1-5.723 0l-10.47-10.251c-44.101-43.179-115.604-43.179-159.705 0l-11.212 10.978a4.108 4.108 0 0 1-5.723 0L71.149 65.922a7.808 7.808 0 0 1 0-11.207l8.35-8.176zm282.75 52.699l23.163 22.679a7.808 7.808 0 0 1 0 11.206L280.97 235.385c-3.161 3.095-8.286 3.095-11.447 0l-74.128-72.578a2.054 2.054 0 0 0-2.862 0l-74.127 72.578c-3.16 3.095-8.285 3.095-11.446 0L2.51 133.122a7.808 7.808 0 0 1 0-11.207l23.164-22.679c3.16-3.094 8.285-3.094 11.446 0l74.13 72.58c.79.773 2.07.773 2.861 0l74.126-72.58c3.16-3.094 8.285-3.094 11.446 0l74.13 72.58c.79.773 2.071.773 2.861 0l74.129-72.578c3.16-3.095 8.285-3.095 11.446 0z' fill='%233B99FC' fill-rule='nonzero'/%3E%3C/g%3E%3C/svg%3E"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={animationDuration:300}},function(e,t,n){var r=n(67),i=n(68);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a=(r(i,{insert:"head",singleton:!1}),i.locals?i.locals:{});e.exports=a},function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function o(e,t){for(var n={},r=[],i=0;i<e.length;i++){var o=e[i],u=t.base?o[0]+t.base:o[0],l=n[u]||0,c="".concat(u," ").concat(l);n[u]=l+1;var d=s(c),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:c,updater:h(f,t),references:1}),r.push(c)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var s=i(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var l,c=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function d(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,i);else{var a=document.createTextNode(i),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(a,s[t]):e.appendChild(a)}}function f(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,y=0;function h(e,t){var n,r,i;if(t.singleton){var a=y++;n=p||(p=u(t)),r=d.bind(null,n,a,!1),i=d.bind(null,n,a,!0)}else n=u(t),r=f.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=o(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);a[i].references--}for(var u=o(e,t),l=0;l<n.length;l++){var c=s(n[l]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=u}}}},function(e,t,n){(t=n(69)(!1)).push([e.i,":root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n \n.fadeOut {\n animation-name: fadeOut;\n}\n\n.walletconnect-modal__base {\n position: relative;\n top: 50%;\n display: inline-block;\n z-index: 2147483000;\n background: #fff;\n transform: translateY(-50%);\n margin: 0 auto;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0 12px 24px 0 rgba(0,0,0,0.1);\n width: 100%;\n max-width: 500px;\n}\n\n.walletconnect-modal__header {\n position: relative;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.walletconnect-modal__headerLogo {\n width: 100%;\n max-width: 320px;\n margin: 20px auto;\n height: 100%;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 15px;\n right: 15px;\n z-index: 10000;\n}\n\n.walletconnect-modal__close__icon {\n width: 25px;\n height: 25px;\n position: relative;\n top: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 90%;\n border: 1px solid #7C828B;\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 90%;\n border: 1px solid #7C828B;\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n position: fixed;\n top: 0;\n width: 100%;\n height: 100%;\n z-index: 2147482999;\n background-color: rgba(0,0,0,0.5);\n text-align: center;\n}\n\n.walletconnect-qrcode__text {\n color: #7C828B;\n font-family: Avenir;\n font-size: 18px;\n text-align: center;\n margin: 0 auto;\n padding: 0 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.walletconnect-qrcode__image {\n width: 100%;\n padding: 30px;\n box-sizing: border-box;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,a=e[1]||"",s=e[3];if(!s)return a;if(t&&"function"==typeof btoa){var o=(n=s,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),u=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(e," */")}));return[a].concat(u).concat([o]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(i[s]=!0)}for(var o=0;o<e.length;o++){var u=[].concat(e[o]);r&&i[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71);t.default={open:function(e,t){r.generate(e,{small:!0})},close:function(){}}},function(e,t,n){var r=n(72),i=n(27),a=" ",s=function(e){return e?" ":a},o=function(e){return{times:function(t){return new Array(t).join(e)}}};e.exports={error:i.L,generate:function(e,t,n){"function"==typeof t&&(n=t,t={});var i=new r(-1,this.error);i.addData(e),i.make();var u="";if(t&&t.small){var l=i.getModuleCount(),c=i.modules.slice(),d=l%2==1;d&&c.push(function(e,t){for(var n=new Array(e),r=0;r<e;r++)n[r]=!1;return n}(l));var f={WHITE_ALL:"█",WHITE_BLACK:"▀",BLACK_WHITE:"▄",BLACK_ALL:" "},p=o(f.BLACK_WHITE).times(l+3),y=o(f.WHITE_BLACK).times(l+3);u+=p+"\n";for(var h=0;h<l;h+=2){u+=f.WHITE_ALL;for(var m=0;m<l;m++)!1===c[h][m]&&!1===c[h+1][m]?u+=f.WHITE_ALL:!1===c[h][m]&&!0===c[h+1][m]?u+=f.WHITE_BLACK:!0===c[h][m]&&!1===c[h+1][m]?u+=f.BLACK_WHITE:u+=f.BLACK_ALL;u+=f.WHITE_ALL+"\n"}d||(u+=y)}else{var b=o(a).times(i.getModuleCount()+3);u+=b+"\n",i.modules.forEach((function(e){u+=a,u+=e.map(s).join(""),u+=a+"\n"})),u+=b}n?n(u):console.log(u)},setErrorLevel:function(e){this.error=i[e]||this.error}}},function(e,t,n){var r=n(73),i=n(74),a=n(25),s=n(76),o=n(77);function u(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}u.prototype={addData:function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=s.getRSBlocks(e,this.errorCorrectLevel),n=new o,r=0,a=0;a<t.length;a++)r+=t[a].dataCount;for(var u=0;u<this.dataList.length;u++){var l=this.dataList[u];n.put(l.mode,4),n.put(l.getLength(),i.getLengthInBits(l.mode,e)),l.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null===this.dataCache&&(this.dataCache=u.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0===r||6===r)||0<=r&&r<=6&&(0===n||6===n)||2<=n&&n<=4&&2<=r&&r<=4)},getBestMaskPattern:function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=i.getLostPoint(this);(0===n||e>r)&&(e=r,t=n)}return t},createMovieClip:function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var i=0;i<this.modules.length;i++)for(var a=1*i,s=0;s<this.modules[i].length;s++){var o=1*s;this.modules[i][s]&&(r.beginFill(0,100),r.moveTo(o,a),r.lineTo(o+1,a),r.lineTo(o+1,a+1),r.lineTo(o,a+1),r.endFill())}return r},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null===this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null===this.modules[6][t]&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=i.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],a=e[n];if(null===this.modules[r][a])for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)2===Math.abs(s)||2===Math.abs(o)||0===s&&0===o?this.modules[r+s][a+o]=!0:this.modules[r+s][a+o]=!1}},setupTypeNumber:function(e){for(var t,n=i.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++)t=!e&&1==(n>>r&1),this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=t;for(var a=0;a<18;a++)t=!e&&1==(n>>a&1),this.modules[a%3+this.moduleCount-8-3][Math.floor(a/3)]=t},setupTypeInfo:function(e,t){for(var n,r=this.errorCorrectLevel<<3|t,a=i.getBCHTypeInfo(r),s=0;s<15;s++)n=!e&&1==(a>>s&1),s<6?this.modules[s][8]=n:s<8?this.modules[s+1][8]=n:this.modules[this.moduleCount-15+s][8]=n;for(var o=0;o<15;o++)n=!e&&1==(a>>o&1),o<8?this.modules[8][this.moduleCount-o-1]=n:o<9?this.modules[8][15-o-1+1]=n:this.modules[8][15-o-1]=n;this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var n=-1,r=this.moduleCount-1,a=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(6===o&&o--;;){for(var u=0;u<2;u++)if(null===this.modules[r][o-u]){var l=!1;s<e.length&&(l=1==(e[s]>>>a&1)),i.getMask(t,r,o-u)&&(l=!l),this.modules[r][o-u]=l,-1==--a&&(s++,a=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},u.PAD0=236,u.PAD1=17,u.createData=function(e,t,n){for(var r=s.getRSBlocks(e,t),a=new o,l=0;l<n.length;l++){var c=n[l];a.put(c.mode,4),a.put(c.getLength(),i.getLengthInBits(c.mode,e)),c.write(a)}for(var d=0,f=0;f<r.length;f++)d+=r[f].dataCount;if(a.getLengthInBits()>8*d)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+8*d+")");for(a.getLengthInBits()+4<=8*d&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=8*d||(a.put(u.PAD0,8),a.getLengthInBits()>=8*d));)a.put(u.PAD1,8);return u.createBytes(a,r)},u.createBytes=function(e,t){for(var n=0,r=0,s=0,o=new Array(t.length),u=new Array(t.length),l=0;l<t.length;l++){var c=t[l].dataCount,d=t[l].totalCount-c;r=Math.max(r,c),s=Math.max(s,d),o[l]=new Array(c);for(var f=0;f<o[l].length;f++)o[l][f]=255&e.buffer[f+n];n+=c;var p=i.getErrorCorrectPolynomial(d),y=new a(o[l],p.getLength()-1).mod(p);u[l]=new Array(p.getLength()-1);for(var h=0;h<u[l].length;h++){var m=h+y.getLength()-u[l].length;u[l][h]=m>=0?y.get(m):0}}for(var b=0,g=0;g<t.length;g++)b+=t[g].totalCount;for(var _=new Array(b),v=0,w=0;w<r;w++)for(var T=0;T<t.length;T++)w<o[T].length&&(_[v++]=o[T][w]);for(var I=0;I<s;I++)for(var S=0;S<t.length;S++)I<u[S].length&&(_[v++]=u[S][I]);return _},e.exports=u},function(e,t,n){var r=n(24);function i(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}i.prototype={getLength:function(){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=i},function(e,t,n){var r=n(24),i=n(25),a=n(26),s=n(75),o={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;o.getBCHDigit(t)-o.getBCHDigit(o.G15)>=0;)t^=o.G15<<o.getBCHDigit(t)-o.getBCHDigit(o.G15);return(e<<10|t)^o.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;o.getBCHDigit(t)-o.getBCHDigit(o.G18)>=0;)t^=o.G18<<o.getBCHDigit(t)-o.getBCHDigit(o.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},getPatternPosition:function(e){return o.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case s.PATTERN000:return(t+n)%2==0;case s.PATTERN001:return t%2==0;case s.PATTERN010:return n%3==0;case s.PATTERN011:return(t+n)%3==0;case s.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case s.PATTERN101:return t*n%2+t*n%3==0;case s.PATTERN110:return(t*n%2+t*n%3)%2==0;case s.PATTERN111:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new i([1],0),n=0;n<e;n++)t=t.multiply(new i([1,a.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){var t=e.getModuleCount(),n=0,r=0,i=0;for(r=0;r<t;r++)for(i=0;i<t;i++){for(var a=0,s=e.isDark(r,i),o=-1;o<=1;o++)if(!(r+o<0||t<=r+o))for(var u=-1;u<=1;u++)i+u<0||t<=i+u||0===o&&0===u||s===e.isDark(r+o,i+u)&&a++;a>5&&(n+=3+a-5)}for(r=0;r<t-1;r++)for(i=0;i<t-1;i++){var l=0;e.isDark(r,i)&&l++,e.isDark(r+1,i)&&l++,e.isDark(r,i+1)&&l++,e.isDark(r+1,i+1)&&l++,0!==l&&4!==l||(n+=3)}for(r=0;r<t;r++)for(i=0;i<t-6;i++)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(i=0;i<t;i++)for(r=0;r<t-6;r++)e.isDark(r,i)&&!e.isDark(r+1,i)&&e.isDark(r+2,i)&&e.isDark(r+3,i)&&e.isDark(r+4,i)&&!e.isDark(r+5,i)&&e.isDark(r+6,i)&&(n+=40);var c=0;for(i=0;i<t;i++)for(r=0;r<t;r++)e.isDark(r,i)&&c++;return n+Math.abs(100*c/t/t-50)/5*10}};e.exports=o},function(e,t){e.exports={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7}},function(e,t,n){var r=n(27);function i(e,t){this.totalCount=e,this.dataCount=t}i.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],i.getRSBlocks=function(e,t){var n=i.getRsBlockTable(e,t);if(void 0===n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,a=[],s=0;s<r;s++)for(var o=n[3*s+0],u=n[3*s+1],l=n[3*s+2],c=0;c<o;c++)a.push(new i(u,l));return a},i.getRsBlockTable=function(e,t){switch(t){case r.L:return i.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return i.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return i.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return i.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=i},function(e,t){function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=n}])},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t,r){var i=n(24);e.exports=_;var a,s=n(54);_.ReadableState=g,n(8).EventEmitter;var o=function(e,t){return e.listeners(t).length},u=n(56),l=n(1).Buffer,c=t.Uint8Array||function(){},d=n(18);d.inherits=n(0);var f=n(106),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var y,h=n(107),m=n(57);d.inherits(_,u);var b=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var r=t instanceof(a=a||n(10));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(y||(y=n(34).StringDecoder),this.decoder=new y(e.encoding),this.encoding=e.encoding)}function _(e){if(a=a||n(10),!(this instanceof _))return new _(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function v(e,t,n,r,i){var a,s=e._readableState;return null===t?(s.reading=!1,function(e,t){if(!t.ended){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,I(e)}}(e,s)):(i||(a=function(e,t){var n,r;return r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):A(e,s)):w(e,s,t,!1))):r||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function w(e,t,n,r){t.flowing&&0===t.length&&!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&&I(e)),A(e,t)}function T(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(S,e):S(e))}function S(e){p("emit readable"),e.emit("readable"),x(e)}function A(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(D,e,t))}function D(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function E(e){p("readable nexttick read 0"),e.read(0)}function C(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,s=e>a.length?a.length:e;if(s===a.length?i+=a:i+=a.slice(0,e),0==(e-=s)){s===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(s));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=l.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,s),0==(e-=s)){s===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var 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,i.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=m.destroy,_.prototype._undestroy=m.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),v(this,e,t,!1,n)},_.prototype.unshift=function(e){return v(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return y||(y=n(34).StringDecoder),this._readableState.decoder=new y(e),this._readableState.encoding=e,this},_.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?k(this):I(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&k(this),null;var r,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",i=!0),t.ended||t.reading?p("reading or ended",i=!1):i&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=T(n,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&k(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,p("pipe count=%d opts=%j",a.pipesCount,t);var u=t&&!1===t.end||e===r.stdout||e===r.stderr?g:l;function l(){p("onend"),e.end()}a.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",(function t(r,i){p("onunpipe"),r===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",t),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",y),d=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,x(e))}}(n);e.on("drain",c);var d=!1,f=!1;function y(t){p("ondata"),f=!1,!1!==e.write(t)||f||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==P(a.pipes,e))&&!d&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,f=!0),n.pause())}function h(t){p("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",b),g()}function b(){p("onfinish"),e.removeListener("close",m),g()}function g(){p("unpipe"),n.unpipe(e)}return n.on("data",y),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",m),e.once("finish",b),e.emit("pipe",n),a.flowing||(p("pipe resume"),n.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var s=P(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},_.prototype.on=function(e,t){var n=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&I(this):i.nextTick(E,this))}return n},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(C,e,t))}(this,e)),this},_.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(p("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){p("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<b.length;a++)e.on(b[a],this.emit.bind(this,b[a]));return this._read=function(t){p("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=M}).call(this,n(4),n(6))},function(e,t,n){e.exports=n(8).EventEmitter},function(e,t,n){"use strict";var r=n(24);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";e.exports=s;var r=n(10),i=n(18);function a(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,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){u(e,t,n)})):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),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)}i.inherits=n(0),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},function(e){e.exports=JSON.parse('{"COMPRESSED_TYPE_INVALID":"compressed should be a boolean","EC_PRIVATE_KEY_TYPE_INVALID":"private key should be a Buffer","EC_PRIVATE_KEY_LENGTH_INVALID":"private key length is invalid","EC_PRIVATE_KEY_RANGE_INVALID":"private key range is invalid","EC_PRIVATE_KEY_TWEAK_ADD_FAIL":"tweak out of range or resulting private key is invalid","EC_PRIVATE_KEY_TWEAK_MUL_FAIL":"tweak out of range","EC_PRIVATE_KEY_EXPORT_DER_FAIL":"couldn\'t export to DER format","EC_PRIVATE_KEY_IMPORT_DER_FAIL":"couldn\'t import from DER format","EC_PUBLIC_KEYS_TYPE_INVALID":"public keys should be an Array","EC_PUBLIC_KEYS_LENGTH_INVALID":"public keys Array should have at least 1 element","EC_PUBLIC_KEY_TYPE_INVALID":"public key should be a Buffer","EC_PUBLIC_KEY_LENGTH_INVALID":"public key length is invalid","EC_PUBLIC_KEY_PARSE_FAIL":"the public key could not be parsed or is invalid","EC_PUBLIC_KEY_CREATE_FAIL":"private was invalid, try again","EC_PUBLIC_KEY_TWEAK_ADD_FAIL":"tweak out of range or resulting public key is invalid","EC_PUBLIC_KEY_TWEAK_MUL_FAIL":"tweak out of range","EC_PUBLIC_KEY_COMBINE_FAIL":"the sum of the public keys is not valid","ECDH_FAIL":"scalar was invalid (zero or overflow)","ECDSA_SIGNATURE_TYPE_INVALID":"signature should be a Buffer","ECDSA_SIGNATURE_LENGTH_INVALID":"signature length is invalid","ECDSA_SIGNATURE_PARSE_FAIL":"couldn\'t parse signature","ECDSA_SIGNATURE_PARSE_DER_FAIL":"couldn\'t parse DER signature","ECDSA_SIGNATURE_SERIALIZE_DER_FAIL":"couldn\'t serialize signature to DER format","ECDSA_SIGN_FAIL":"nonce generation function failed or private key is invalid","ECDSA_RECOVER_FAIL":"couldn\'t recover public key from signature","MSG32_TYPE_INVALID":"message should be a Buffer","MSG32_LENGTH_INVALID":"message length is invalid","OPTIONS_TYPE_INVALID":"options should be an Object","OPTIONS_DATA_TYPE_INVALID":"options.data should be a Buffer","OPTIONS_DATA_LENGTH_INVALID":"options.data length is invalid","OPTIONS_NONCEFN_TYPE_INVALID":"options.noncefn should be a Function","RECOVERY_ID_TYPE_INVALID":"recovery should be a Number","RECOVERY_ID_VALUE_INVALID":"recovery should have value between -1 and 4","TWEAK_TYPE_INVALID":"tweak should be a Buffer","TWEAK_LENGTH_INVALID":"tweak length is invalid"}')},function(e,t,n){"use strict";var r=n(1).Buffer,i=n(13).Transform;function a(e){i.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(0)(a,i),a.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)n[a++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)n[this._blockOffset++]=e[i++];for(var s=0,o=8*e.length;o>0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=a},function(e,t,n){var r=n(0),i=n(14),a=n(1).Buffer,s=[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],o=new Array(64);function u(){this.init(),this._w=o,i.call(this,64,56)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(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}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,u=0|this._e,y=0|this._f,h=0|this._g,m=0|this._h,b=0;b<16;++b)n[b]=e.readInt32BE(4*b);for(;b<64;++b)n[b]=0|(((t=n[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[b-7]+p(n[b-15])+n[b-16];for(var g=0;g<64;++g){var _=m+f(u)+l(u,y,h)+s[g]+n[g]|0,v=d(r)+c(r,i,a)|0;m=h,h=y,y=u,u=o+_|0,o=a,a=i,i=r,r=_+v|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0,this._f=y+this._f|0,this._g=h+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=a.allocUnsafe(32);return 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),e},e.exports=u},function(e,t,n){var r=n(0),i=n(14),a=n(1).Buffer,s=[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],o=new Array(160);function u(){this.init(),this._w=o,i.call(this,128,112)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(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 y(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 b(e,t){return e>>>0<t>>>0?1:0}r(u,i),u.prototype.init=function(){return 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,this},u.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,a=0|this._dh,o=0|this._eh,u=0|this._fh,g=0|this._gh,_=0|this._hh,v=0|this._al,w=0|this._bl,T=0|this._cl,I=0|this._dl,S=0|this._el,A=0|this._fl,D=0|this._gl,E=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var x=t[C-30],M=t[C-30+1],k=p(x,M),N=y(M,x),P=h(x=t[C-4],M=t[C-4+1]),L=m(M,x),R=t[C-14],O=t[C-14+1],B=t[C-32],j=t[C-32+1],V=N+O|0,U=k+R+b(V,N)|0;U=(U=U+P+b(V=V+L|0,L)|0)+B+b(V=V+j|0,j)|0,t[C]=U,t[C+1]=V}for(var z=0;z<160;z+=2){U=t[z],V=t[z+1];var q=c(n,r,i),$=c(v,w,T),F=d(n,v),H=d(v,n),G=f(o,S),Y=f(S,o),Q=s[z],Z=s[z+1],K=l(o,u,g),W=l(S,A,D),J=E+Y|0,X=_+G+b(J,E)|0;X=(X=(X=X+K+b(J=J+W|0,W)|0)+Q+b(J=J+Z|0,Z)|0)+U+b(J=J+V|0,V)|0;var ee=H+$|0,te=F+q+b(ee,H)|0;_=g,E=D,g=u,D=A,u=o,A=S,o=a+X+b(S=I+J|0,I)|0,a=i,I=T,i=r,T=w,r=n,w=v,n=X+te+b(v=J+ee|0,J)|0}this._al=this._al+v|0,this._bl=this._bl+w|0,this._cl=this._cl+T|0,this._dl=this._dl+I|0,this._el=this._el+S|0,this._fl=this._fl+A|0,this._gl=this._gl+D|0,this._hl=this._hl+E|0,this._ah=this._ah+n+b(this._al,v)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+i+b(this._cl,T)|0,this._dh=this._dh+a+b(this._dl,I)|0,this._eh=this._eh+o+b(this._el,S)|0,this._fh=this._fh+u+b(this._fl,A)|0,this._gh=this._gh+g+b(this._gl,D)|0,this._hh=this._hh+_+b(this._hl,E)|0},u.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return 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),e},e.exports=u},function(e,t,n){"use strict";var r=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),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 i=e.charCodeAt(r),a=i>>8,s=255&i;a?n.push(a,s):n.push(s)}return n},r.zero2=i,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t,n){var r;function i(e){this.rand=e}if(e.exports=function(e){return r||(r=new i(null)),r.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=n(135);if("function"!=typeof a.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return a.randomBytes(e)}}catch(e){}},function(e,t,n){"use strict";var r=t;r.base=n(27),r.short=n(136),r.mont=n(137),r.edwards=n(138)},function(e,t,n){"use strict";var r=n(7).rotr32;function i(e,t,n){return e&t^~e&n}function a(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?s(t,n,r):2===e?a(t,n,r):void 0},t.ch32=i,t.maj32=a,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";var r=n(7),i=n(20),a=n(66),s=n(11),o=r.sum32,u=r.sum32_4,l=r.sum32_5,c=a.ch32,d=a.maj32,f=a.s0_256,p=a.s1_256,y=a.g0_256,h=a.g1_256,m=i.BlockHash,b=[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 g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}r.inherits(g,m),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=u(h(n[r-2]),n[r-7],y(n[r-15]),n[r-16]);var i=this.h[0],a=this.h[1],m=this.h[2],b=this.h[3],g=this.h[4],_=this.h[5],v=this.h[6],w=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var T=l(w,p(g),c(g,_,v),this.k[r],n[r]),I=o(f(i),d(i,a,m));w=v,v=_,_=g,g=o(b,T),b=m,m=a,a=i,i=o(T,I)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],m),this.h[3]=o(this.h[3],b),this.h[4]=o(this.h[4],g),this.h[5]=o(this.h[5],_),this.h[6]=o(this.h[6],v),this.h[7]=o(this.h[7],w)},g.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(7),i=n(20),a=n(11),s=r.rotr64_hi,o=r.rotr64_lo,u=r.shr64_hi,l=r.shr64_lo,c=r.sum64,d=r.sum64_hi,f=r.sum64_lo,p=r.sum64_4_hi,y=r.sum64_4_lo,h=r.sum64_5_hi,m=r.sum64_5_lo,b=i.BlockHash,g=[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 _(){if(!(this instanceof _))return new _;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function v(e,t,n,r,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function w(e,t,n,r,i,a){var s=t&r^~t&a;return s<0&&(s+=4294967296),s}function T(e,t,n,r,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function I(e,t,n,r,i,a){var s=t&r^t&a^r&a;return s<0&&(s+=4294967296),s}function S(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function A(e,t){var n=o(e,t,28)^o(t,e,2)^o(t,e,7);return n<0&&(n+=4294967296),n}function D(e,t){var n=s(e,t,14)^s(e,t,18)^s(t,e,9);return n<0&&(n+=4294967296),n}function E(e,t){var n=o(e,t,14)^o(e,t,18)^o(t,e,9);return n<0&&(n+=4294967296),n}function C(e,t){var n=s(e,t,1)^s(e,t,8)^u(e,t,7);return n<0&&(n+=4294967296),n}function x(e,t){var n=o(e,t,1)^o(e,t,8)^l(e,t,7);return n<0&&(n+=4294967296),n}function M(e,t){var n=s(e,t,19)^s(t,e,29)^u(e,t,6);return n<0&&(n+=4294967296),n}function k(e,t){var n=o(e,t,19)^o(t,e,29)^l(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(_,b),e.exports=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=M(n[r-4],n[r-3]),a=k(n[r-4],n[r-3]),s=n[r-14],o=n[r-13],u=C(n[r-30],n[r-29]),l=x(n[r-30],n[r-29]),c=n[r-32],d=n[r-31];n[r]=p(i,a,s,o,u,l,c,d),n[r+1]=y(i,a,s,o,u,l,c,d)}},_.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],u=this.h[4],l=this.h[5],p=this.h[6],y=this.h[7],b=this.h[8],g=this.h[9],_=this.h[10],C=this.h[11],x=this.h[12],M=this.h[13],k=this.h[14],N=this.h[15];a(this.k.length===n.length);for(var P=0;P<n.length;P+=2){var L=k,R=N,O=D(b,g),B=E(b,g),j=v(b,0,_,0,x),V=w(0,g,0,C,0,M),U=this.k[P],z=this.k[P+1],q=n[P],$=n[P+1],F=h(L,R,O,B,j,V,U,z,q,$),H=m(L,R,O,B,j,V,U,z,q,$);L=S(r,i),R=A(r,i),O=T(r,0,s,0,u),B=I(0,i,0,o,0,l);var G=d(L,R,O,B),Y=f(L,R,O,B);k=x,N=M,x=_,M=C,_=b,C=g,b=d(p,y,F,H),g=f(y,y,F,H),p=u,y=l,u=s,l=o,s=r,o=i,r=d(F,H,G,Y),i=f(F,H,G,Y)}c(this.h,0,r,i),c(this.h,2,s,o),c(this.h,4,u,l),c(this.h,6,p,y),c(this.h,8,b,g),c(this.h,10,_,C),c(this.h,12,x,M),c(this.h,14,k,N)},_.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t){e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},function(e,t,n){"use strict";const r=(e,t)=>function(){const n=t.promiseModule,r=new Array(arguments.length);for(let e=0;e<arguments.length;e++)r[e]=arguments[e];return new n((n,i)=>{t.errorFirst?r.push((function(e,r){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e<arguments.length;e++)t[e-1]=arguments[e];e?(t.unshift(e),i(t)):n(t)}else e?i(e):n(r)})):r.push((function(e){if(t.multiArgs){const e=new Array(arguments.length-1);for(let t=0;t<arguments.length;t++)e[t]=arguments[t];n(e)}else n(e)})),e.apply(this,r)})};e.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);const n=e=>{const n=t=>"string"==typeof t?e===t:t.test(e);return t.include?t.include.some(n):!t.exclude.some(n)};let i;i="function"==typeof e?function(){return t.excludeMain?e.apply(this,arguments):r(e,t).apply(this,arguments)}:Object.create(Object.getPrototypeOf(e));for(const a in e){const s=e[a];i[a]="function"==typeof s&&n(a)?r(s,t):s}return i}},function(e,t,n){const r=n(29),i=n(157)();function a(e){this.currentProvider=e}function s(e){return function(){const t=this;var n=[].slice.call(arguments),r=n.pop();t.sendAsync({method:e,params:n},r)}}function o(e,t){return function(){const n=this;var r=[].slice.call(arguments),i=r.pop();r.length<e&&r.push("latest"),n.sendAsync({method:t,params:r},i)}}e.exports=a,a.prototype.getBalance=o(2,"eth_getBalance"),a.prototype.getCode=o(2,"eth_getCode"),a.prototype.getTransactionCount=o(2,"eth_getTransactionCount"),a.prototype.getStorageAt=o(3,"eth_getStorageAt"),a.prototype.call=o(2,"eth_call"),a.prototype.protocolVersion=s("eth_protocolVersion"),a.prototype.syncing=s("eth_syncing"),a.prototype.coinbase=s("eth_coinbase"),a.prototype.mining=s("eth_mining"),a.prototype.hashrate=s("eth_hashrate"),a.prototype.gasPrice=s("eth_gasPrice"),a.prototype.accounts=s("eth_accounts"),a.prototype.blockNumber=s("eth_blockNumber"),a.prototype.getBlockTransactionCountByHash=s("eth_getBlockTransactionCountByHash"),a.prototype.getBlockTransactionCountByNumber=s("eth_getBlockTransactionCountByNumber"),a.prototype.getUncleCountByBlockHash=s("eth_getUncleCountByBlockHash"),a.prototype.getUncleCountByBlockNumber=s("eth_getUncleCountByBlockNumber"),a.prototype.sign=s("eth_sign"),a.prototype.sendTransaction=s("eth_sendTransaction"),a.prototype.sendRawTransaction=s("eth_sendRawTransaction"),a.prototype.estimateGas=s("eth_estimateGas"),a.prototype.getBlockByHash=s("eth_getBlockByHash"),a.prototype.getBlockByNumber=s("eth_getBlockByNumber"),a.prototype.getTransactionByHash=s("eth_getTransactionByHash"),a.prototype.getTransactionByBlockHashAndIndex=s("eth_getTransactionByBlockHashAndIndex"),a.prototype.getTransactionByBlockNumberAndIndex=s("eth_getTransactionByBlockNumberAndIndex"),a.prototype.getTransactionReceipt=s("eth_getTransactionReceipt"),a.prototype.getUncleByBlockHashAndIndex=s("eth_getUncleByBlockHashAndIndex"),a.prototype.getUncleByBlockNumberAndIndex=s("eth_getUncleByBlockNumberAndIndex"),a.prototype.getCompilers=s("eth_getCompilers"),a.prototype.compileLLL=s("eth_compileLLL"),a.prototype.compileSolidity=s("eth_compileSolidity"),a.prototype.compileSerpent=s("eth_compileSerpent"),a.prototype.newFilter=s("eth_newFilter"),a.prototype.newBlockFilter=s("eth_newBlockFilter"),a.prototype.newPendingTransactionFilter=s("eth_newPendingTransactionFilter"),a.prototype.uninstallFilter=s("eth_uninstallFilter"),a.prototype.getFilterChanges=s("eth_getFilterChanges"),a.prototype.getFilterLogs=s("eth_getFilterLogs"),a.prototype.getLogs=s("eth_getLogs"),a.prototype.getWork=s("eth_getWork"),a.prototype.submitWork=s("eth_submitWork"),a.prototype.submitHashrate=s("eth_submitHashrate"),a.prototype.sendAsync=function(e,t){var n;this.currentProvider.sendAsync((n=e,r({id:i(),jsonrpc:"2.0",params:[]},n)),(function(e,n){if(!e&&n.error&&(e=new Error("EthQuery - RPC Error - "+n.error.message)),e)return t(e);t(null,n.result)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){((0,r.default)(e)?f:p)(e,(0,c.default)(t),n)};var r=d(n(30)),i=d(n(78)),a=d(n(163)),s=d(n(81)),o=d(n(21)),u=d(n(41)),l=d(n(43)),c=d(n(12));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n){n=(0,u.default)(n||o.default);var r=0,a=0,s=e.length;function c(e,t){e?n(e):++a!==s&&t!==i.default||n(null)}for(0===s&&n(null);r<s;r++)t(e[r],r,(0,l.default)(c))}var p=(0,s.default)(a.default,1/0);e.exports=t.default},function(e,t,n){var r=n(74).Symbol;e.exports=r},function(e,t,n){var r=n(75),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(4))},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n,u){if(u=(0,i.default)(u||r.default),e<=0||!t)return u(null);var l=(0,a.default)(t),c=!1,d=0,f=!1;function p(e,t){if(d-=1,e)c=!0,u(e);else{if(t===o.default||c&&d<=0)return c=!0,u(null);f||y()}}function y(){for(f=!0;d<e&&!c;){var t=l();if(null===t)return c=!0,void(d<=0&&u(null));d+=1,n(t.value,t.key,(0,s.default)(p))}f=!1}y()}};var r=u(n(21)),i=u(n(41)),a=u(n(164)),s=u(n(43)),o=u(n(78));function u(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(n,r,i){return e(n,t,r,i)}},e.exports=t.default},function(e,t,n){const r=n(83);function i(e){return"never"!==o(e)}function a(e){var t=s(e);return t>=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function s(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function o(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}e.exports={cacheIdentifierForPayload:function(e,t={}){if(!i(e))return null;const{includeBlockRef:n}=t,s=n?e.params:a(e);return e.method+":"+r(s)},canCache:i,blockTagForPayload:function(e){var t=s(e);return t>=e.params.length?null:e.params[t]},paramsWithoutBlockTag:a,blockTagParamIndex:s,cacheTypeForPayload:o}},function(e,t,n){var r="undefined"!=typeof JSON?JSON:n(190);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n=t.space||"";"number"==typeof n&&(n=Array(n+1).join(" "));var s,o="boolean"==typeof t.cycles&&t.cycles,u=t.replacer||function(e,t){return t},l=t.cmp&&(s=t.cmp,function(e){return function(t,n){var r={key:t,value:e[t]},i={key:n,value:e[n]};return s(r,i)}}),c=[];return function e(t,s,d,f){var p=n?"\n"+new Array(f+1).join(n):"",y=n?": ":":";if(d&&d.toJSON&&"function"==typeof d.toJSON&&(d=d.toJSON()),void 0!==(d=u.call(t,s,d))){if("object"!=typeof d||null===d)return r.stringify(d);if(i(d)){for(var h=[],m=0;m<d.length;m++){var b=e(d,m,d[m],f+1)||r.stringify(null);h.push(p+n+b)}return"["+h.join(",")+p+"]"}if(-1!==c.indexOf(d)){if(o)return r.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}c.push(d);var g=a(d).sort(l&&l(d));for(h=[],m=0;m<g.length;m++){var _=e(d,s=g[m],d[s],f+1);if(_){var v=r.stringify(s)+y+_;h.push(p+n+v)}}return c.splice(c.indexOf(d),1),"{"+h.join(",")+p+"}"}}({"":e},"",e,0)};var i=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},a=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},n=[];for(var r in e)t.call(e,r)&&n.push(r);return n}},function(e,t,n){const r=n(199).Mutex,i=n(46),a=n(85),s=n(201),o=n(204),u=n(205),{intToHex:l,hexToInt:c}=n(22);function d(e){return f(async(...t)=>{const n=await e(...t);return l(n.id)})}function f(e){return i(async(t,n)=>{const r=await e.apply(null,t.params);n.result=r})}function p(e,t){const n=[];for(let t in e)n.push(e[t]);return n}e.exports=function({blockTracker:e,provider:t}){let n=0,i={};const y=new r,h=function({mutex:e}){return t=>async(n,r,i,a)=>{(await e.acquire())(),t(n,r,i,a)}}({mutex:y}),m=a({eth_newFilter:h(d(g)),eth_newBlockFilter:h(d(_)),eth_newPendingTransactionFilter:h(d(v)),eth_uninstallFilter:h(f(I)),eth_getFilterChanges:h(f(w)),eth_getFilterLogs:h(f(T))}),b=async({oldBlock:e,newBlock:t})=>{if(0===i.length)return;const n=await y.acquire();try{await Promise.all(p(i).map(async n=>{try{await n.update({oldBlock:e,newBlock:t})}catch(e){console.error(e)}}))}catch(e){console.error(e)}n()};return m.newLogFilter=g,m.newBlockFilter=_,m.newPendingTransactionFilter=v,m.uninstallFilter=I,m.getFilterChanges=w,m.getFilterLogs=T,m.destroy=()=>{!async function(){const e=p(i).length;i={},A({prevFilterCount:e,newFilterCount:0})}()},m;async function g(e){const n=new s({provider:t,params:e});return await S(n),n}async function _(){const e=new o({provider:t});return await S(e),e}async function v(){const e=new u({provider:t});return await S(e),e}async function w(e){const t=c(e),n=i[t];if(!n)throw new Error(`No filter for index "${t}"`);return n.getChangesAndClear()}async function T(e){const t=c(e),n=i[t];if(!n)throw new Error(`No filter for index "${t}"`);return"log"===n.type?results=n.getAllResults():results=[],results}async function I(e){const t=c(e),n=i[t],r=Boolean(n);return r&&await async function(e){const t=p(i).length;delete i[e],A({prevFilterCount:t,newFilterCount:p(i).length})}(t),r}async function S(t){const r=p(i).length,a=await e.getLatestBlock();return await t.initialize({currentBlock:a}),n++,i[n]=t,t.id=n,t.idHex=l(n),A({prevFilterCount:r,newFilterCount:p(i).length}),n}function A({prevFilterCount:t,newFilterCount:n}){0===t&&n>0?e.on("sync",b):t>0&&0===n&&e.removeListener("sync",b)}}},function(e,t,n){e.exports=n(200)},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){(function(e){var r=n(230),i=n(89),a=n(29),s=n(232),o=n(51),u=t;u.request=function(t,n){t="string"==typeof t?o.parse(t):a(t);var i=-1===e.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||i,u=t.hostname||t.host,l=t.port,c=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?s+"//"+u:"")+(l?":"+l:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new r(t);return n&&d.on("response",n),d},u.get=function(e,t){var n=u.request(e,t);return n.end(),n},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(4))},function(e,t,n){(function(e){t.fetch=o(e.fetch)&&o(e.ReadableStream),t.writableStream=o(e.WritableStream),t.abortController=o(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var n;function r(){if(void 0!==n)return n;if(e.XMLHttpRequest){n=new e.XMLHttpRequest;try{n.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var a=void 0!==e.ArrayBuffer,s=a&&o(e.ArrayBuffer.prototype.slice);function o(e){return"function"==typeof e}t.arraybuffer=t.fetch||a&&i("arraybuffer"),t.msstream=!t.fetch&&s&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&a&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&o(r().overrideMimeType),t.vbArray=o(e.VBArray),n=null}).call(this,n(4))},function(e,t,n){(function(e,r,i){var a=n(88),s=n(0),o=n(17),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(t,n,s,u){var l=this;if(o.Readable.call(l),l._mode=s,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){e.nextTick((function(){l.emit("close")}))})),"fetch"===s){if(l._fetchResponse=n,l.url=n.url,l.statusCode=n.status,l.statusMessage=n.statusText,n.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),a.writableStream){var c=new WritableStream({write:function(e){return new Promise((function(t,n){l._destroyed?n():l.push(new r(e))?t():l._resumeFetch=t}))},close:function(){i.clearTimeout(u),l._destroyed||l.push(null)},abort:function(e){l._destroyed||l.emit("error",e)}});try{return void n.body.pipeTo(c).catch((function(e){i.clearTimeout(u),l._destroyed||l.emit("error",e)}))}catch(e){}}var d=n.body.getReader();!function e(){d.read().then((function(t){if(!l._destroyed){if(t.done)return i.clearTimeout(u),void l.push(null);l.push(new r(t.value)),e()}})).catch((function(e){i.clearTimeout(u),l._destroyed||l.emit("error",e)}))}()}else if(l._xhr=t,l._pos=0,l.url=t.responseURL,l.statusCode=t.status,l.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!a.overrideMimeType){var f=l.rawHeaders["mime-type"];if(f){var p=f.match(/;\s*charset=([^;])(;|$)/);p&&(l._charset=p[1].toLowerCase())}l._charset||(l._charset="utf-8")}};s(l,o.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{n=new i.VBArray(t.responseBody).toArray()}catch(e){}if(null!==n){e.push(new r(n));break}case"text":try{n=t.responseText}catch(t){e._mode="text:vbarray";break}if(n.length>e._pos){var a=n.substr(e._pos);if("x-user-defined"===e._charset){for(var s=new r(a.length),o=0;o<a.length;o++)s[o]=255&a.charCodeAt(o);e.push(s)}else e.push(a,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;n=t.response,e.push(new r(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==u.LOADING||!n)break;e.push(new r(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==u.LOADING)break;var l=new i.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(new r(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){e.push(null)},l.readAsArrayBuffer(n)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,n(6),n(2).Buffer,n(4))},function(e){e.exports=JSON.parse('{"name":"@walletconnect/web3-provider","version":"1.0.0-beta.47","description":"Web3 Provider for WalletConnect","scripts":{"clean":"rm -rf lib","build":"webpack","test":"mocha --require ./babel-polyfill.js test/**/*.spec.js"},"keywords":["walletconnect","ethereum","web3","crypto","dapp","wallet"],"author":"WalletConnect <walletconnect.org>","homepage":"https://github.com/WalletConnect/walletconnect-monorepo/tree/v1.0.0-beta","license":"LGPL-3.0","main":"lib/index.js","directories":{"lib":"lib","test":"test"},"files":["lib","src"],"repository":{"type":"git","url":"git+https://github.com/walletconnect/walletconnect-monorepo.git"},"bugs":{"url":"https://github.com/walletconnect/walletconnect-monorepo/issues"},"devDependencies":{"@babel/cli":"7.8.3","@babel/core":"7.8.3","@babel/node":"7.8.3","@babel/polyfill":"7.8.3","@babel/preset-env":"7.8.3","@babel/preset-typescript":"7.8.3","@babel/register":"7.8.3","@types/chai":"4.2.7","@types/mocha":"5.2.7","@types/web3-provider-engine":"14.0.0","chai":"4.2.0","isomorphic-fetch":"2.2.1","mocha":"5.2.0","ts-loader":"5.4.5","typescript":"3.7.5","webpack":"4.41.5","webpack-cli":"3.3.10"},"dependencies":{"@walletconnect/browser":"^1.0.0-beta.47","@walletconnect/qrcode-modal":"^1.0.0-beta.47","@walletconnect/types":"^1.0.0-beta.47","web3-provider-engine":"15.0.4","xhr2-cookies":"1.1.0"},"gitHead":"165f7993c2acc907c653c02847fb02721052c6e7"}')},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return a})),n.d(t,"__rest",(function(){return s})),n.d(t,"__decorate",(function(){return o})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return l})),n.d(t,"__awaiter",(function(){return c})),n.d(t,"__generator",(function(){return d})),n.d(t,"__exportStar",(function(){return f})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return y})),n.d(t,"__spread",(function(){return h})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return g})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return v})),n.d(t,"__importStar",(function(){return w})),n.d(t,"__importDefault",(function(){return T}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n}function o(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(i,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,o)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}}function f(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||o(e,t)}))})}function o(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,l):c(a[0][2],n)}catch(e){c(a[0][3],e)}var n}function u(e){o("next",e)}function l(e){o("throw",e)}function c(e,t){e(t),a.shift(),a.length&&o(a[0][0],a[0][1])}}function g(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function T(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";n.r(t);var r=n(1);n.d(t,"isBytesLike",(function(){return o})),n.d(t,"isBytes",(function(){return u})),n.d(t,"arrayify",(function(){return l})),n.d(t,"concat",(function(){return c})),n.d(t,"stripZeros",(function(){return d})),n.d(t,"zeroPad",(function(){return f})),n.d(t,"isHexString",(function(){return p})),n.d(t,"hexlify",(function(){return y})),n.d(t,"hexDataLength",(function(){return h})),n.d(t,"hexDataSlice",(function(){return m})),n.d(t,"hexConcat",(function(){return b})),n.d(t,"hexValue",(function(){return g})),n.d(t,"hexStripZeros",(function(){return _})),n.d(t,"hexZeroPad",(function(){return v})),n.d(t,"splitSignature",(function(){return w})),n.d(t,"joinSignature",(function(){return T}));const i=new r.a("bytes/5.0.0-beta.136");function a(e){return!!e.toHexString}function s(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function o(e){return p(e)&&!(e.length%2)||u(e)}function u(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(null==e.length)return!1;for(let t=0;t<e.length;t++){const n=e[t];if(n<0||n>=256||n%1)return!1}return!0}function l(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e/=256;return 0===t.length&&t.push(0),s(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0x0"+n.substring(2):"right"===t.hexPad?n+="0":i.throwArgumentError("hex data is odd-length","value",e));const r=[];for(let e=0;e<n.length;e+=2)r.push(parseInt(n.substring(e,e+2),16));return s(new Uint8Array(r))}return u(e)?s(new Uint8Array(e)):i.throwArgumentError("invalid arrayify value","value",e)}function c(e){const t=e.map(e=>l(e)),n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);return t.reduce((e,t)=>(r.set(t,e),e+t.length),0),s(r)}function d(e){let t=l(e);if(0===t.length)return t;let n=0;for(;n<t.length&&0===t[n];)n++;return n&&(t=t.slice(n)),t}function f(e,t){(e=l(e)).length>t&&i.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(t);return n.set(e,t-e.length),s(n)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}function y(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t="0123456789abcdef"[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":i.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(u(e)){let t="0x";for(let n=0;n<e.length;n++){let r=e[n];t+="0123456789abcdef"[(240&r)>>4]+"0123456789abcdef"[15&r]}return t}return i.throwArgumentError("invalid hexlify value","value",e)}function h(e){if("string"!=typeof e)e=y(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2}function m(e,t,n){return"string"!=typeof e?e=y(e):(!p(e)||e.length%2)&&i.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function b(e){let t="0x";return e.forEach(e=>{t+=y(e).substring(2)}),t}function g(e){const t=_(y(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function _(e){"string"!=typeof e&&(e=y(e)),p(e)||i.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}function v(e,t){for("string"!=typeof e?e=y(e):p(e)||i.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&i.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function w(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(o(e)){const n=l(e);65!==n.length&&i.throwArgumentError("invalid signature string; must be 65 bytes","signature",e),t.r=y(n.slice(0,32)),t.s=y(n.slice(32,64)),t.v=n[64],t.recoveryParam=1-t.v%2,t.v<27&&(0===t.v||1===t.v?t.v+=27:i.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam&&(n[32]|=128),t._vs=y(n.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const n=f(l(t._vs),32);t._vs=y(n);const r=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=r:t.recoveryParam!==r&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;const a=y(n);null==t.s?t.s=a:t.s!==a&&i.throwArgumentError("signature v mismatch _vs","signature",e)}null==t.recoveryParam?null==t.v?i.throwArgumentError("signature missing v and recoveryParam","signature",e):t.recoveryParam=1-t.v%2:null==t.v?t.v=27+t.recoveryParam:t.recoveryParam!==1-t.v%2&&i.throwArgumentError("signature recoveryParam mismatch v","signature",e),null!=t.r&&p(t.r)?t.r=v(t.r,32):i.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=v(t.s,32):i.throwArgumentError("signature missing or invalid s","signature",e);const n=l(t.s);n[0]>=128&&i.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(n[0]|=128);const r=y(n);t._vs&&(p(t._vs)||i.throwArgumentError("signature invalid _vs","signature",e),t._vs=v(t._vs,32)),null==t._vs?t._vs=r:t._vs!==r&&i.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t}function T(e){return y(c([(e=w(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));let r=!1,i=!1;const a={debug:1,default:2,info:2,warn:3,error:4,off:5};let s=a.default,o=null;const u=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(n){e.push(t)}}),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();class l{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}setLogLevel(e){const t=a[e];null!=t?s=t:this.warn("invalid log level - "+e)}_log(e,t){s>a[e]||console.log.apply(console,t)}debug(...e){this._log(l.levels.DEBUG,e)}info(...e){this._log(l.levels.INFO,e)}warn(...e){this._log(l.levels.WARNING,e)}makeError(e,t,n){if(i)return new Error("unknown error");t||(t=l.errors.UNKNOWN_ERROR),n||(n={});const r=[];Object.keys(n).forEach(e=>{try{r.push(e+"="+JSON.stringify(n[e]))}catch(t){r.push(e+"="+JSON.stringify(n[e].toString()))}}),r.push("code="+t),r.push("version="+this.version);const a=e;r.length&&(e+=" ("+r.join(", ")+")");const s=new Error(e);return s.reason=a,s.code=t,Object.keys(n).forEach((function(e){s[e]=n[e]})),s}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,l.errors.INVALID_ARGUMENT,{argument:t,value:n})}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",l.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,l.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,l.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n=n?": "+n:"",e<t&&this.throwError("missing argument"+n,l.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+n,l.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",l.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",l.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",l.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return o||(o=new l("logger/5.0.0-beta.134")),o}static setCensorship(e,t){if(r){if(!e)return;this.globalLogger().throwError("error censorship permanent",l.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,r=!!t}}l.errors={UNKNOWN_ERROR:"UNKNOWN_ERROR",NOT_IMPLEMENTED:"NOT_IMPLEMENTED",UNSUPPORTED_OPERATION:"UNSUPPORTED_OPERATION",NETWORK_ERROR:"NETWORK_ERROR",SERVER_ERROR:"SERVER_ERROR",TIMEOUT:"TIMEOUT",BUFFER_OVERRUN:"BUFFER_OVERRUN",NUMERIC_FAULT:"NUMERIC_FAULT",MISSING_NEW:"MISSING_NEW",INVALID_ARGUMENT:"INVALID_ARGUMENT",MISSING_ARGUMENT:"MISSING_ARGUMENT",UNEXPECTED_ARGUMENT:"UNEXPECTED_ARGUMENT",CALL_EXCEPTION:"CALL_EXCEPTION",INSUFFICIENT_FUNDS:"INSUFFICIENT_FUNDS",NONCE_EXPIRED:"NONCE_EXPIRED",REPLACEMENT_UNDERPRICED:"REPLACEMENT_UNDERPRICED",UNPREDICTABLE_GAS_LIMIT:"UNPREDICTABLE_GAS_LIMIT"},l.levels={DEBUG:"DEBUG",INFO:"INFO",WARNING:"WARNING",ERROR:"ERROR",OFF:"OFF"}},function(e,t,n){"use strict";var r=n(3),i=n(0),a=n(1);const s="bignumber/5.0.0-beta.135",o=new a.a(s),u={};class l{constructor(e,t){o.checkNew(new.target,l),e!==u&&o.throwError("cannot call consturtor directly; use BigNumber.from",a.a.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return d(f(this).fromTwos(e))}toTwos(e){return d(f(this).toTwos(e))}abs(){return"-"===this._hex[0]?l.from(this._hex.substring(1)):this}add(e){return d(f(this).add(f(e)))}sub(e){return d(f(this).sub(f(e)))}div(e){return l.from(e).isZero()&&p("division by zero","div"),d(f(this).div(f(e)))}mul(e){return d(f(this).mul(f(e)))}mod(e){return d(f(this).mod(f(e)))}pow(e){return d(f(this).pow(f(e)))}maskn(e){return d(f(this).maskn(e))}eq(e){return f(this).eq(f(e))}lt(e){return f(this).lt(f(e))}lte(e){return f(this).lte(f(e))}gt(e){return f(this).gt(f(e))}gte(e){return f(this).gte(f(e))}isZero(){return f(this).isZero()}toNumber(){try{return f(this).toNumber()}catch(e){p("overflow","toNumber",this.toString())}return null}toString(){return 0!==arguments.length&&o.throwError("bigNumber.toString does not accept parameters",a.a.errors.UNEXPECTED_ARGUMENT,{}),f(this).toString(10)}toHexString(){return this._hex}static from(e){return e instanceof l?e:"string"==typeof e?e.match(/-?0x[0-9a-f]+/i)?new l(u,c(e)):e.match(/^-?[0-9]+$/)?new l(u,c(new r.BN(e))):o.throwArgumentError("invalid BigNumber string","value",e):"number"==typeof e?(e%1&&p("underflow","BigNumber.from",e),(e>=9007199254740991||e<=-9007199254740991)&&p("overflow","BigNumber.from",e),l.from(String(e))):"bigint"==typeof e?l.from(e.toString()):Object(i.isBytes)(e)?l.from(Object(i.hexlify)(e)):e._hex&&Object(i.isHexString)(e._hex)?l.from(e._hex):e.toHexString&&"string"==typeof(e=e.toHexString())?l.from(e):o.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function c(e){if("string"!=typeof e)return c(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&o.throwArgumentError("invalid hex","value",e),"0x00"===(e=c(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function d(e){return l.from(c(e))}function f(e){const t=l.from(e).toHexString();return"-"===t[0]?new r.BN("-"+t.substring(3),16):new r.BN(t.substring(2),16)}function p(e,t,n){const r={fault:e,operation:t};return null!=n&&(r.value=n),o.throwError(e,a.a.errors.NUMERIC_FAULT,r)}new a.a(s),l.from(0),l.from(-1);let y="0";for(;y.length<256;)y+=y;n.d(t,"a",(function(){return l}))},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function a(e,t,n){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{s=n(14).Buffer}catch(e){}function o(e,t,n){for(var r=0,i=Math.min(e.length,n),a=t;a<i;a++){var s=e.charCodeAt(a)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function u(e,t,n,r){for(var i=0,a=Math.min(e.length,n),s=t;s<a;s++){var o=e.charCodeAt(s)-48;i*=r,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===n)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===n)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.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,i,a=0;for(n=e.length-6,r=0;n>=t;n-=6)i=o(e,n,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);n+6!==t&&(i=o(e,t,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,l=0,c=n;c<o;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var d=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","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"],c=[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],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,u=s/67108864|0;n.words[0]=o;for(var l=1;l<r;l++){for(var c=u>>>26,d=67108863&u,f=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=f;p++){var y=l-p|0;c+=(s=(i=0|e.words[y])*(a=0|t.words[p])+d)/67108864|0,d=67108863&s}n.words[l]=0|d,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}a.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<i|a)).toString(16);n=0!=(a=o>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==a&&(n=a.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],p=d[e];n="";var y=this.clone();for(y.negative=0;!y.isZero();){var h=y.modn(p).toString(e);n=(y=y.idivn(p)).isZero()?h+n:l[f-h.length]+h+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return r(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===t,l=new e(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[o]=s;for(;o<a;o++)l[o]=0}else{for(o=0;o<a-i;o++)l[o]=0;for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[a-o-1]=s}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;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()},a.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.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];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,a,s=e.words,o=t.words,u=n.words,l=0,c=0|s[0],d=8191&c,f=c>>>13,p=0|s[1],y=8191&p,h=p>>>13,m=0|s[2],b=8191&m,g=m>>>13,_=0|s[3],v=8191&_,w=_>>>13,T=0|s[4],I=8191&T,S=T>>>13,A=0|s[5],D=8191&A,E=A>>>13,C=0|s[6],x=8191&C,M=C>>>13,k=0|s[7],N=8191&k,P=k>>>13,L=0|s[8],R=8191&L,O=L>>>13,B=0|s[9],j=8191&B,V=B>>>13,U=0|o[0],z=8191&U,q=U>>>13,$=0|o[1],F=8191&$,H=$>>>13,G=0|o[2],Y=8191&G,Q=G>>>13,Z=0|o[3],K=8191&Z,W=Z>>>13,J=0|o[4],X=8191&J,ee=J>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ue=8191&oe,le=oe>>>13,ce=0|o[8],de=8191&ce,fe=ce>>>13,pe=0|o[9],ye=8191&pe,he=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;l=((a=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(h,z)|0,a=Math.imul(h,q);var be=(l+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,F)|0))<<13)|0;l=((a=a+Math.imul(f,H)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(g,z)|0,a=Math.imul(g,q),r=r+Math.imul(y,F)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(h,F)|0,a=a+Math.imul(h,H)|0;var ge=(l+(r=r+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(f,Y)|0))<<13)|0;l=((a=a+Math.imul(f,Q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(w,z)|0,a=Math.imul(w,q),r=r+Math.imul(b,F)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(g,F)|0,a=a+Math.imul(g,H)|0,r=r+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(h,Y)|0,a=a+Math.imul(h,Q)|0;var _e=(l+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,K)|0))<<13)|0;l=((a=a+Math.imul(f,W)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,z),i=(i=Math.imul(I,q))+Math.imul(S,z)|0,a=Math.imul(S,q),r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,F)|0,a=a+Math.imul(w,H)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,Q)|0,r=r+Math.imul(y,K)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(h,K)|0,a=a+Math.imul(h,W)|0;var ve=(l+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;l=((a=a+Math.imul(f,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(E,z)|0,a=Math.imul(E,q),r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(S,F)|0,a=a+Math.imul(S,H)|0,r=r+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,Q)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,W)|0,r=r+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(h,X)|0,a=a+Math.imul(h,ee)|0;var we=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;l=((a=a+Math.imul(f,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(M,z)|0,a=Math.imul(M,q),r=r+Math.imul(D,F)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(E,F)|0,a=a+Math.imul(E,H)|0,r=r+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,Q)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,W)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,X)|0,a=a+Math.imul(g,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(h,ne)|0,a=a+Math.imul(h,re)|0;var Te=(l+(r=r+Math.imul(d,ae)|0)|0)+((8191&(i=(i=i+Math.imul(d,se)|0)+Math.imul(f,ae)|0))<<13)|0;l=((a=a+Math.imul(f,se)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(N,z),i=(i=Math.imul(N,q))+Math.imul(P,z)|0,a=Math.imul(P,q),r=r+Math.imul(x,F)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(M,F)|0,a=a+Math.imul(M,H)|0,r=r+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,Q)|0,r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,W)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(g,ne)|0,a=a+Math.imul(g,re)|0,r=r+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(h,ae)|0,a=a+Math.imul(h,se)|0;var Ie=(l+(r=r+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ue)|0))<<13)|0;l=((a=a+Math.imul(f,le)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,a=Math.imul(O,q),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(P,F)|0,a=a+Math.imul(P,H)|0,r=r+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,Q)|0,r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,W)|0,r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(w,ne)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,se)|0,r=r+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(h,ue)|0,a=a+Math.imul(h,le)|0;var Se=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((a=a+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(V,z)|0,a=Math.imul(V,q),r=r+Math.imul(R,F)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(O,F)|0,a=a+Math.imul(O,H)|0,r=r+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,Q)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(M,K)|0,a=a+Math.imul(M,W)|0,r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(E,X)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(S,ne)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(v,ae)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,le)|0)+Math.imul(g,ue)|0,a=a+Math.imul(g,le)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(h,de)|0,a=a+Math.imul(h,fe)|0;var Ae=(l+(r=r+Math.imul(d,ye)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(f,ye)|0))<<13)|0;l=((a=a+Math.imul(f,he)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(V,F)|0,a=Math.imul(V,H),r=r+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(O,Y)|0,a=a+Math.imul(O,Q)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,W)|0,r=r+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(w,ue)|0,a=a+Math.imul(w,le)|0,r=r+Math.imul(b,de)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(g,de)|0,a=a+Math.imul(g,fe)|0;var De=(l+(r=r+Math.imul(y,ye)|0)|0)+((8191&(i=(i=i+Math.imul(y,he)|0)+Math.imul(h,ye)|0))<<13)|0;l=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Q))+Math.imul(V,Y)|0,a=Math.imul(V,Q),r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,W)|0,r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(M,ne)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(D,ae)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,le)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(w,de)|0,a=a+Math.imul(w,fe)|0;var Ee=(l+(r=r+Math.imul(b,ye)|0)|0)+((8191&(i=(i=i+Math.imul(b,he)|0)+Math.imul(g,ye)|0))<<13)|0;l=((a=a+Math.imul(g,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,W))+Math.imul(V,K)|0,a=Math.imul(V,W),r=r+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,a=a+Math.imul(P,re)|0,r=r+Math.imul(x,ae)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,se)|0,r=r+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(E,ue)|0,a=a+Math.imul(E,le)|0,r=r+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(S,de)|0,a=a+Math.imul(S,fe)|0;var Ce=(l+(r=r+Math.imul(v,ye)|0)|0)+((8191&(i=(i=i+Math.imul(v,he)|0)+Math.imul(w,ye)|0))<<13)|0;l=((a=a+Math.imul(w,he)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(V,X)|0,a=Math.imul(V,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,se)|0,r=r+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(M,ue)|0,a=a+Math.imul(M,le)|0,r=r+Math.imul(D,de)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(E,de)|0,a=a+Math.imul(E,fe)|0;var xe=(l+(r=r+Math.imul(I,ye)|0)|0)+((8191&(i=(i=i+Math.imul(I,he)|0)+Math.imul(S,ye)|0))<<13)|0;l=((a=a+Math.imul(S,he)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(V,ne)|0,a=Math.imul(V,re),r=r+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,se)|0,r=r+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(P,ue)|0,a=a+Math.imul(P,le)|0,r=r+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(M,de)|0,a=a+Math.imul(M,fe)|0;var Me=(l+(r=r+Math.imul(D,ye)|0)|0)+((8191&(i=(i=i+Math.imul(D,he)|0)+Math.imul(E,ye)|0))<<13)|0;l=((a=a+Math.imul(E,he)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ae),i=(i=Math.imul(j,se))+Math.imul(V,ae)|0,a=Math.imul(V,se),r=r+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(O,ue)|0,a=a+Math.imul(O,le)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(P,de)|0,a=a+Math.imul(P,fe)|0;var ke=(l+(r=r+Math.imul(x,ye)|0)|0)+((8191&(i=(i=i+Math.imul(x,he)|0)+Math.imul(M,ye)|0))<<13)|0;l=((a=a+Math.imul(M,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(V,ue)|0,a=Math.imul(V,le),r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(O,de)|0,a=a+Math.imul(O,fe)|0;var Ne=(l+(r=r+Math.imul(N,ye)|0)|0)+((8191&(i=(i=i+Math.imul(N,he)|0)+Math.imul(P,ye)|0))<<13)|0;l=((a=a+Math.imul(P,he)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(V,de)|0,a=Math.imul(V,fe);var Pe=(l+(r=r+Math.imul(R,ye)|0)|0)+((8191&(i=(i=i+Math.imul(R,he)|0)+Math.imul(O,ye)|0))<<13)|0;l=((a=a+Math.imul(O,he)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(l+(r=Math.imul(j,ye))|0)+((8191&(i=(i=Math.imul(j,he))+Math.imul(V,ye)|0))<<13)|0;return l=((a=Math.imul(V,he))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=me,u[1]=be,u[2]=ge,u[3]=_e,u[4]=ve,u[5]=we,u[6]=Te,u[7]=Ie,u[8]=Se,u[9]=Ae,u[10]=De,u[11]=Ee,u[12]=Ce,u[13]=xe,u[14]=Me,u[15]=ke,u[16]=Ne,u[17]=Pe,u[18]=Le,0!==l&&(u[19]=l,n.length++),n};function y(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(p=f),a.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,u=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=u;l++){var c=a-l,d=(0|e.words[c])*(0|t.words[l]),f=67108863&d;o=67108863&(f=f+o|0),i+=(s=(s=s+(d/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,e,t):y(this,e,t)},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},h.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},h.prototype.permute=function(e,t,n,r,i,a){for(var s=0;s<a;s++)r[s]=t[e[s]],i[s]=n[e[s]]},h.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),l=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var d=u,f=l,p=0;p<s;p++){var y=n[c+p],h=r[c+p],m=n[c+p+s],b=r[c+p+s],g=d*m-f*b;b=d*b+f*m,m=g,n[c+p]=y+m,r[c+p]=h+b,n[c+p+s]=y-m,r[c+p+s]=h-b,p!==o&&(g=u*d-l*f,f=u*f+l*d,d=g)}},h.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},h.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},h.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},h.prototype.convert13b=function(e,t,n,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],n[2*s]=8191&a,a>>>=13,n[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===a),r(0==(-8192&a))},h.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},h.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),u=new Array(r),l=new Array(r),c=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,l,r),this.transform(s,a,o,u,r,i),this.transform(l,a,c,d,r,i);for(var p=0;p<r;p++){var y=o[p]*c[p]-u[p]*d[p];u[p]=o[p]*d[p]+u[p]*c[p],o[p]=y}return this.conjugate(o,u,r),this.transform(o,u,f,a,r,i),this.conjugate(f,a,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),y(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[n]=67108863&a}return 0!==t&&(this.words[n]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},a.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,u=(0|this.words[t])-o<<n;this.words[t]=u|s,s=o>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,u=n;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var d=0|this.words[l];this.words[l]=c<<26-a|d>>>a,c=d&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},a.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.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]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&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()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var i,a,s=e.length+n;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+n])+o;var u=(0|e.words[i])*t;o=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&a}for(;i<this.length-n;i++)o=(a=(0|this.words[i+n])+o)>>26,this.words[i+n]=67108863&a;if(0===o)return this.strip();for(r(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var o,u=r.length-i.length;if("mod"!==t){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var l=0;l<o.length;l++)o.words[l]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,o&&(o.words[u]=1));for(var d=u-1;d>=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=f)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,o},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),d=t.clone();!t.isZero();){for(var f=0,p=1;0==(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var y=0,h=1;0==(n.words[0]&h)&&y<26;++y,h<<=1);if(y>0)for(n.iushrn(y);y-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(d)),o.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o),s.isub(u)):(n.isub(t),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:n.iushln(l)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new a(1),o=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(o)):(n.isub(t),o.isub(s))}return(i=0===t.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(e),i},a.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);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var a=i,s=n;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new T(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=a._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}function I(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(g,b),g.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var a=0|e.words[r];e.words[r-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(_,b),i(v,b),i(w,b),w.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new _;else if("p192"===e)t=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},T.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},T.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,i),f=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),y=s;0!==p.cmp(o);){for(var h=p,m=0;0!==h.cmp(o);m++)h=h.redSqr();r(m<y);var b=this.pow(d,new a(1).iushln(y-m-1));f=f.redMul(b),d=b.redSqr(),p=p.redMul(d),y=m}return f},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new a(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var d=l>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4==++o||0===r&&0===c)&&(i=this.mul(i,n[s]),o=0,s=0)):o=0}u=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new I(e)},i(I,T),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(13)(e))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(t,n){!function(){"use strict";var r="object"==typeof window?window:{};!r.JS_SHA3_NO_NODE_JS&&"object"==typeof t&&t.versions&&t.versions.node&&(r=n);for(var i=!r.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],o=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],l=["hex","buffer","arrayBuffer","array"],c=function(e,t,n){return function(r){return new w(e,t,e).update(r)[n]()}},d=function(e,t,n){return function(r,i){return new w(e,t,i).update(r)[n]()}},f=function(e,t){var n=c(e,t,"hex");n.create=function(){return new w(e,t,e)},n.update=function(e){return n.create().update(e)};for(var r=0;r<l.length;++r){var i=l[r];n[i]=c(e,t,i)}return n},p=[{name:"keccak",padding:[1,256,65536,16777216],bits:u,createMethod:f},{name:"sha3",padding:[6,1536,393216,100663296],bits:u,createMethod:f},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(e,t){var n=d(e,t,"hex");n.create=function(n){return new w(e,t,n)},n.update=function(e,t){return n.create(t).update(e)};for(var r=0;r<l.length;++r){var i=l[r];n[i]=d(e,t,i)}return n}}],y={},h=[],m=0;m<p.length;++m)for(var b=p[m],g=b.bits,_=0;_<g.length;++_){var v=b.name+"_"+g[_];h.push(v),y[v]=b.createMethod(g[_],b.padding)}function w(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}w.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var n,r,i=e.length,a=this.blocks,o=this.byteCount,u=this.blockCount,l=0,c=this.s;l<i;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<u+1;++n)a[n]=0;if(t)for(n=this.start;l<i&&n<o;++l)a[n>>2]|=e[l]<<s[3&n++];else for(n=this.start;l<i&&n<o;++l)(r=e.charCodeAt(l))<128?a[n>>2]|=r<<s[3&n++]:r<2048?(a[n>>2]|=(192|r>>6)<<s[3&n++],a[n>>2]|=(128|63&r)<<s[3&n++]):r<55296||r>=57344?(a[n>>2]|=(224|r>>12)<<s[3&n++],a[n>>2]|=(128|r>>6&63)<<s[3&n++],a[n>>2]|=(128|63&r)<<s[3&n++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++l)),a[n>>2]|=(240|r>>18)<<s[3&n++],a[n>>2]|=(128|r>>12&63)<<s[3&n++],a[n>>2]|=(128|r>>6&63)<<s[3&n++],a[n>>2]|=(128|63&r)<<s[3&n++]);if(this.lastByteIndex=n,n>=o){for(this.start=n-o,this.block=a[u],n=0;n<u;++n)c[n]^=a[n];T(c),this.reset=!0}else this.start=n}return this},w.prototype.finalize=function(){var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];T(r)},w.prototype.toString=w.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,s=0,o=0,u="";o<r;){for(s=0;s<t&&o<r;++s,++o)e=n[s],u+=a[e>>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];o%t==0&&(T(n),s=0)}return i&&(e=n[s],i>0&&(u+=a[e>>4&15]+a[15&e]),i>1&&(u+=a[e>>12&15]+a[e>>8&15]),i>2&&(u+=a[e>>20&15]+a[e>>16&15])),u},w.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,a=0,s=0,o=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(o);for(var u=new Uint32Array(e);s<r;){for(a=0;a<t&&s<r;++a,++s)u[s]=n[a];s%t==0&&T(n)}return i&&(u[a]=n[a],e=e.slice(0,o)),e},w.prototype.buffer=w.prototype.arrayBuffer,w.prototype.digest=w.prototype.array=function(){this.finalize();for(var e,t,n=this.blockCount,r=this.s,i=this.outputBlocks,a=this.extraBytes,s=0,o=0,u=[];o<i;){for(s=0;s<n&&o<i;++s,++o)e=o<<2,t=r[s],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;o%n==0&&T(r)}return a&&(e=o<<2,t=r[s],a>0&&(u[e]=255&t),a>1&&(u[e+1]=t>>8&255),a>2&&(u[e+2]=t>>16&255)),u};var T=function(e){var t,n,r,i,a,s,u,l,c,d,f,p,y,h,m,b,g,_,v,w,T,I,S,A,D,E,C,x,M,k,N,P,L,R,O,B,j,V,U,z,q,$,F,H,G,Y,Q,Z,K,W,J,X,ee,te,ne,re,ie,ae,se,oe,ue,le,ce;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),n=(y=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(l<<1|c>>>31),n=a^(c<<1|l>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=s^(d<<1|f>>>31),n=u^(f<<1|d>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=l^(p<<1|y>>>31),n=c^(y<<1|p>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=d^(i<<1|a>>>31),n=f^(a<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,h=e[0],m=e[1],Y=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,x=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,$=e[40]<<18|e[41]>>>14,F=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,b=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,K=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,_=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,W=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,D=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,V=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,T=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,E=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,ae=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,I=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=h^~b&_,e[1]=m^~g&v,e[10]=A^~E&x,e[11]=D^~C&M,e[20]=R^~B&V,e[21]=O^~j&U,e[30]=H^~Y&Z,e[31]=G^~Q&K,e[40]=te^~re&ae,e[41]=ne^~ie&se,e[2]=b^~_&w,e[3]=g^~v&T,e[12]=E^~x&k,e[13]=C^~M&N,e[22]=B^~V&z,e[23]=j^~U&q,e[32]=Y^~Z&W,e[33]=Q^~K&J,e[42]=re^~ae&oe,e[43]=ie^~se&ue,e[4]=_^~w&I,e[5]=v^~T&S,e[14]=x^~k&P,e[15]=M^~N&L,e[24]=V^~z&$,e[25]=U^~q&F,e[34]=Z^~W&X,e[35]=K^~J&ee,e[44]=ae^~oe&le,e[45]=se^~ue&ce,e[6]=w^~I&h,e[7]=T^~S&m,e[16]=k^~P&A,e[17]=N^~L&D,e[26]=z^~$&R,e[27]=q^~F&O,e[36]=W^~X&H,e[37]=J^~ee&G,e[46]=oe^~le&te,e[47]=ue^~ce&ne,e[8]=I^~h&b,e[9]=S^~m&g,e[18]=P^~A&E,e[19]=L^~D&C,e[28]=$^~R&B,e[29]=F^~O&j,e[38]=X^~H&Y,e[39]=ee^~G&Q,e[48]=le^~te&re,e[49]=ce^~ne&ie,e[0]^=o[r],e[1]^=o[r+1]};if(i)e.exports=y;else for(m=0;m<h.length;++m)r[h[m]]=y[h[m]]}()}).call(this,n(15),n(4))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),i=r.__importDefault(n(12)),a=n(0),s=n(17),o=n(16);function u(e){return o.toUtf8String(new Uint8Array(e))}function l(e,t){var n=a.hexlify(new Uint8Array(e));return t&&(n=_(n)),n}function c(e,t){var n=e.toString("hex");return t||(n=g(n)),n}function d(e){return o.toUtf8Bytes(e).buffer}function f(e,t){return l(d(e),t)}function p(e,t){var n=new i.default(e).toString(16);return n=b(n),t&&(n=_(n)),n}function y(t){return t=_(t),e.from(t,"hex")}function h(e){return e=g(e),a.arrayify(e).buffer}function m(e){return new i.default(e).toNumber()}function b(e){return(e=(e=_(e)).length%2!=0?"0"+e:e)&&(e=g(e)),e}function g(e){return"0x"===e.toLowerCase().substring(0,2)?e:"0x"+e}function _(e){return"0x"===e.toLowerCase().substring(0,2)?e.substring(2):e}function v(e){return g(e=(e=_(e)).startsWith("0")?e.substring(1):e)}function w(e){return a.isHexString(e)}function T(e){return""===e||"string"==typeof e&&""===e.trim()}function I(e){for(var t={},n=("?"===e[0]?e.substr(1):e).split("&"),r=0;r<n.length;r++){var i=n[r].match(/\w+(?==)/i)||[],a=n[r].match(/=.+/i)||[];i[0]&&(t[decodeURIComponent(i[0])]=decodeURIComponent(a[0].substr(1)))}return t}function S(e){return!(e&&e.length)}t.convertArrayBufferToBuffer=function(e){return y(l(e))},t.convertArrayBufferToUtf8=u,t.convertArrayBufferToHex=l,t.convertArrayBufferToNumber=function(e){return m(l(e))},t.concatArrayBuffers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.map((function(e){return l(e,!0)})).join(""),r=h(n);return r},t.convertBufferToArrayBuffer=function(e){return h(c(e))},t.convertBufferToUtf8=function(e){return e.toString("utf8")},t.convertBufferToHex=c,t.convertBufferToNumber=function(e){return m(c(e))},t.concatBuffers=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.concat(t);return r},t.convertUtf8ToArrayBuffer=d,t.convertUtf8ToBuffer=function(t){return e.from(t,"utf8")},t.convertUtf8ToHex=f,t.convertUtf8ToNumber=function(e){return new i.default(e).toNumber()},t.convertNumberToBuffer=function(e){return y(p(e))},t.convertNumberToArrayBuffer=function(e){return h(p(e))},t.convertNumberToUtf8=function(e){return new i.default(e).toString()},t.convertNumberToHex=p,t.convertHexToBuffer=y,t.convertHexToArrayBuffer=h,t.convertHexToUtf8=function(e){return u(h(e))},t.convertHexToNumber=m,t.sanitizeHex=b,t.addHexPrefix=g,t.removeHexPrefix=_,t.removeHexLeadingZeros=v,t.isHexString=w,t.isEmptyString=T,t.payloadId=function(){return(new Date).getTime()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))},t.uuid=function(){return function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t}()},t.toChecksumAddress=function(e){return s.getAddress(e)},t.isValidAddress=function(e){return!(!e||"0x"!==e.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(e)||!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e)&&e!==t.toChecksumAddress(e))},t.getMeta=function(){if("undefined"==typeof window||"undefined"==typeof document||void 0===window.location)return null;function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=document.getElementsByTagName("meta"),r=function(t){var r=n[t],i=["itemprop","property","name"].map((function(e){return r.getAttribute(e)})).filter((function(t){t&&e.includes(t)}));if(i.length&&i){var a=r.getAttribute("content");if(a)return{value:a}}},i=0;i<n.length;i++){var a=r(i);if("object"==typeof a)return a.value}return""}var t=function(){var t=e("name","og:site_name","og:title","twitter:title");return t||(t=document.title),t}();return{description:e("description","og:description","twitter:description","keywords"),url:window.location.origin,icons:function(){for(var e=document.getElementsByTagName("link"),t=[],n=0;n<e.length;n++){var r=e[n],i=r.getAttribute("rel");if(i&&i.toLowerCase().indexOf("icon")>-1){var a=r.getAttribute("href");if(a)if(-1===a.toLowerCase().indexOf("https:")&&-1===a.toLowerCase().indexOf("http:")&&0!==a.indexOf("//")){var s=window.location.protocol+"//"+window.location.host;if(0===a.indexOf("/"))s+=a;else{var o=window.location.pathname.split("/");o.pop(),s+=o.join("/")+"/"+a}t.push(s)}else if(0===a.indexOf("//")){var u=window.location.protocol+a;t.push(u)}else t.push(a)}}return t}(),name:t}},t.parseQueryString=I,t.parseWalletConnectUri=function(e){var t=e.indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,i=e.substring(0,t),a=function(e){var t=e.split("@");return{handshakeTopic:t[0],version:parseInt(t[1],10)}}(e.substring(t+1,n)),s=function(e){var t=I(e);return{key:t.key||"",bridge:t.bridge||""}}(void 0!==n?e.substr(n):"");return r.__assign(r.__assign({protocol:i},a),s)},t.promisify=function(e,t){var n=this;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return r.__awaiter(n,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,new Promise((function(n,a){e.apply(t,r.__spread(i,[function(e,t){null==e&&a(e),n(t)}]))}))]}))}))}},t.isEmptyArray=S,t.parsePersonalSign=function(e){return S(e)||w(e[0])||(e[0]=f(e[0])),e},t.parseTransactionData=function(e){if(void 0===e.from||!t.isValidAddress(e.from))throw new Error("Transaction object must include a valid 'from' value.");function n(e){var t=e;return("number"==typeof e||"string"==typeof e&&!T(e))&&(w(e)?"string"==typeof e&&(t=b(e)):t=p(e)),"string"==typeof t&&(t=v(t)),t}var r={from:b(e.from),to:void 0===e.to?"":b(e.to),gasPrice:void 0===e.gasPrice?"":n(e.gasPrice),gasLimit:void 0===e.gasLimit?void 0===e.gas?"":n(e.gas):n(e.gasLimit),value:void 0===e.value?"":n(e.value),nonce:void 0===e.nonce?"":n(e.nonce),data:void 0===e.data?"":b(e.data)||"0x"},i=["gasPrice","gasLimit","value","nonce"];return Object.keys(r).forEach((function(e){!r[e].trim().length&&i.includes(e)&&delete r[e]})),r},t.formatRpcError=function(e){var t=e.message||"Failed or Rejected Request",n=-32e3;if(e&&!e.code)switch(t){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3}return{code:n,message:t}},t.isJsonRpcSubscription=function(e){return"object"==typeof e.params},t.isJsonRpcRequest=function(e){return void 0!==e.method},t.isJsonRpcResponseSuccess=function(e){return void 0!==e.result},t.isJsonRpcResponseError=function(e){return void 0!==e.error},t.isInternalEvent=function(e){return void 0!==e.event},t.isWalletConnectSession=function(e){return void 0!==e.bridge},t.isReservedEvent=function(e){return["session_request","session_update","exchange_key","connect","disconnect","display_uri","transport_open","transport_close"].includes(e)||e.startsWith("wc_")},t.signingMethods=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v3","personal_sign"],t.stateMethods=["eth_accounts","eth_chainId","net_version"],t.isSilentPayload=function(e){return!!e.method.startsWith("wc_")||!t.signingMethods.includes(e.method)}}).call(this,n(7).Buffer)},function(e,t,n){"use strict";(function(e){var r=n(8),i=n(9),a=n(10);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(t,n),i=(e=o(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=o(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?o(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(c(t),e=o(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=o(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function h(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var a,s=1,o=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(a=n;a<o;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*s}else-1!==c&&(a-=a-c),c=-1}else for(n+u>o&&(n=o-u),a=n;a>=0;a--){for(var d=!0,f=0;f<u;f++)if(l(e,a+f)!==l(t,f)){d=!1;break}if(d)return a}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var s=0;s<r;++s){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))return s;e[n+s]=o}return s}function v(e,t,n,r){return q(U(t,e.length-n),e,n,r)}function w(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function T(e,t,n,r){return w(e,t,n,r)}function I(e,t,n,r){return q(z(t),e,n,r)}function S(e,t,n,r){return q(function(e,t){for(var n,r,i,a=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,s,o,u,l=e[i],c=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&(u=(15&l)<<12|(63&a)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],s=e[i+2],o=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(u=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=V(e[a]);return i}function M(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function k(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")}function N(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function R(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,a){return a||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.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}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=y,u.prototype._isBuffer=!0,u.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)m(this,t,t+1);return this},u.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)m(this,t,t+3),m(this,t+1,t+2);return this},u.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)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?D(this,0,e):h.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),o=Math.min(a,s),l=this.slice(r,i),c=e.slice(t,n),d=0;d<o;++d)if(l[d]!==c[d]){a=l[d],s=c[d];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=0,s=1,o=0;for(this[t]=255&e;++a<n&&(s*=256);)e<0&&0===o&&0!==this[t+a-1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=n-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=u.isBuffer(e)?e:U(new u(e,r).toString()),o=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%o]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(4))},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),s=r[0],o=r[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,o)),c=0,d=o>0?s-4:s;for(n=0;n<d;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===o&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===o&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],s=0,o=n-i;s<o;s+=16383)a.push(c(e,s,s+16383>o?o:s+16383));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)r[o]=s[o],i[s.charCodeAt(o)]=o;function l(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("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,a,s=[],o=t;o<n;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,s,o=8*i-r-1,u=(1<<o)-1,l=u>>1,c=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+e[t+d],d+=f,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=r;c>0;s=256*s+e[t+d],d+=f,c-=8);if(0===a)a=1-l;else{if(a===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),a-=l}return(p?-1:1)*s*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var s,o,u,l=8*a-i-1,c=(1<<l)-1,d=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,y=r?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*u-1)*Math.pow(2,i),s+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&o,p+=y,o/=256,i-=8);for(s=s<<i|o,l+=i;l>0;e[n+p]=255&s,p+=y,s/=256,l-=8);e[n+p-y]|=128*h}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return a})),n.d(t,"__rest",(function(){return s})),n.d(t,"__decorate",(function(){return o})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return l})),n.d(t,"__awaiter",(function(){return c})),n.d(t,"__generator",(function(){return d})),n.d(t,"__exportStar",(function(){return f})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return y})),n.d(t,"__spread",(function(){return h})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return g})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return v})),n.d(t,"__importStar",(function(){return w})),n.d(t,"__importDefault",(function(){return T}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n}function o(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(i,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,o)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}}function f(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||o(e,t)}))})}function o(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,l):c(a[0][2],n)}catch(e){c(a[0][3],e)}var n}function u(e){o("next",e)}function l(e){o("throw",e)}function c(e,t){e(t),a.shift(),a.length&&o(a[0][0],a[0][1])}}function g(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function T(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r;!function(i){"use strict";var a,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,u=Math.floor,l="[BigNumber Error] ",c=l+"Number primitive has more than 15 significant digits: ",d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function f(e){var t=0|e;return e>0||e===t?t:t-1}function p(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(n=14-(t=e[r++]+"").length;n--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function y(e,t){var n,r,i=e.c,a=t.c,s=e.s,o=t.s,u=e.e,l=t.e;if(!s||!o)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=u==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return u>l^n?1:-1;for(o=(u=i.length)<(l=a.length)?u:l,s=0;s<o;s++)if(i[s]!=a[s])return i[s]>a[s]^n?1:-1;return u==l?0:u>l^n?1:-1}function h(e,t,n,r){if(e<t||e>n||e!==u(e))throw Error(l+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function m(e){var t=e.c.length-1;return f(e.e/14)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function g(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(a=function e(t){var n,r,i,a,_,v,w,T,I,S=B.prototype={constructor:B,toString:null,valueOf:null},A=new B(1),D=20,E=4,C=-7,x=21,M=-1e7,k=1e7,N=!1,P=1,L=0,R={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},O="0123456789abcdefghijklmnopqrstuvwxyz";function B(e,t){var n,a,o,l,d,f,p,y,m=this;if(!(m instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber)return m.s=e.s,void(!e.c||e.e>k?m.c=m.e=null:e.e<M?m.c=[m.e=0]:(m.e=e.e,m.c=e.c.slice()));if((f="number"==typeof e)&&0*e==0){if(m.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,d=e;d>=10;d/=10,l++);return void(l>k?m.c=m.e=null:(m.e=l,m.c=[e]))}y=String(e)}else{if(!s.test(y=String(e)))return i(m,y,f);m.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(d=y.search(/e/i))>0?(l<0&&(l=d),l+=+y.slice(d+1),y=y.substring(0,d)):l<0&&(l=y.length)}else{if(h(t,2,O.length,"Base"),10==t)return z(m=new B(e),D+m.e+1,E);if(y=String(e),f="number"==typeof e){if(0*e!=0)return i(m,y,f,t);if(m.s=1/e<0?(y=y.slice(1),-1):1,B.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(c+e)}else m.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=O.slice(0,t),l=d=0,p=y.length;d<p;d++)if(n.indexOf(a=y.charAt(d))<0){if("."==a){if(d>l){l=p;continue}}else if(!o&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){o=!0,d=-1,l=0;continue}return i(m,String(e),f,t)}f=!1,(l=(y=r(y,t,10,m.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(d=0;48===y.charCodeAt(d);d++);for(p=y.length;48===y.charCodeAt(--p););if(y=y.slice(d,++p)){if(p-=d,f&&B.DEBUG&&p>15&&(e>9007199254740991||e!==u(e)))throw Error(c+m.s*e);if((l=l-d-1)>k)m.c=m.e=null;else if(l<M)m.c=[m.e=0];else{if(m.e=l,m.c=[],d=(l+1)%14,l<0&&(d+=14),d<p){for(d&&m.c.push(+y.slice(0,d)),p-=14;d<p;)m.c.push(+y.slice(d,d+=14));d=14-(y=y.slice(d)).length}else d-=p;for(;d--;y+="0");m.c.push(+y)}}else m.c=[m.e=0]}function j(e,t,n,r){var i,a,s,o,u;if(null==n?n=E:h(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=p(e.c),u=1==r||2==r&&(s<=C||s>=x)?b(u,s):g(u,s,"0");else if(a=(e=z(new B(e),t,n)).e,o=(u=p(e.c)).length,1==r||2==r&&(t<=a||a<=C)){for(;o<t;u+="0",o++);u=b(u,a)}else if(t-=s,u=g(u,a,"0"),a+1>o){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=a-o)>0)for(a+1==o&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function V(e,t){for(var n,r=1,i=new B(e[0]);r<e.length;r++){if(!(n=new B(e[r])).s){i=n;break}t.call(i,n)&&(i=n)}return i}function U(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+14*n-1)>k?e.c=e.e=null:n<M?e.c=[e.e=0]:(e.e=n,e.c=t),e}function z(e,t,n,r){var i,a,s,l,c,f,p,y=e.c,h=d;if(y){e:{for(i=1,l=y[0];l>=10;l/=10,i++);if((a=t-i)<0)a+=14,s=t,p=(c=y[f=0])/h[i-s-1]%10|0;else if((f=o((a+1)/14))>=y.length){if(!r)break e;for(;y.length<=f;y.push(0));c=p=0,i=1,s=(a%=14)-14+1}else{for(c=l=y[f],i=1;l>=10;l/=10,i++);p=(s=(a%=14)-14+i)<0?0:c/h[i-s-1]%10|0}if(r=r||t<0||null!=y[f+1]||(s<0?c:c%h[i-s-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(a>0?s>0?c/h[i-s]:0:y[f-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=h[(14-t%14)%14],e.e=-t||0):y[0]=e.e=0,e;if(0==a?(y.length=f,l=1,f--):(y.length=f+1,l=h[14-a],y[f]=s>0?u(c/h[i-s]%h[s])*l:0),r)for(;;){if(0==f){for(a=1,s=y[0];s>=10;s/=10,a++);for(s=y[0]+=l,l=1;s>=10;s/=10,l++);a!=l&&(e.e++,1e14==y[0]&&(y[0]=1));break}if(y[f]+=l,1e14!=y[f])break;y[f--]=0,l=1}for(a=y.length;0===y[--a];y.pop());}e.e>k?e.c=e.e=null:e.e<M&&(e.c=[e.e=0])}return e}function q(e){var t,n=e.e;return null===n?e.toString():(t=p(e.c),t=n<=C||n>=x?b(t,n):g(t,n,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(l+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(h(n=e[t],0,1e9,t),D=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(h(n=e[t],0,8,t),E=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(h(n[0],-1e9,0,t),h(n[1],0,1e9,t),C=n[0],x=n[1]):(h(n,-1e9,1e9,t),C=-(x=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)h(n[0],-1e9,-1,t),h(n[1],1,1e9,t),M=n[0],k=n[1];else{if(h(n,-1e9,1e9,t),!n)throw Error(l+t+" cannot be zero: "+n);M=-(k=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(l+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw N=!n,Error(l+"crypto unavailable");N=n}else N=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(h(n=e[t],0,9,t),P=n),e.hasOwnProperty(t="POW_PRECISION")&&(h(n=e[t],0,1e9,t),L=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(l+t+" not an object: "+n);R=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(l+t+" invalid: "+n);O=n}}return{DECIMAL_PLACES:D,ROUNDING_MODE:E,EXPONENTIAL_AT:[C,x],RANGE:[M,k],CRYPTO:N,MODULO_MODE:P,POW_PRECISION:L,FORMAT:R,ALPHABET:O}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-1e9&&i<=1e9&&i===u(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%14)<1&&(t+=14),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=1e14||n!==u(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(l+"Invalid BigNumber: "+e)},B.maximum=B.max=function(){return V(arguments,S.lt)},B.minimum=B.min=function(){return V(arguments,S.gt)},B.random=(a=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,s,c=0,f=[],p=new B(A);if(null==e?e=D:h(e,0,1e9),i=o(e/14),N)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));c<i;)(s=131072*t[c]+(t[c+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(f.push(s%1e14),c+=2);c=i/2}else{if(!crypto.randomBytes)throw N=!1,Error(l+"crypto unavailable");for(t=crypto.randomBytes(i*=7);c<i;)(s=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(f.push(s%1e14),c+=7);c=i/7}if(!N)for(;c<i;)(s=a())<9e15&&(f[c++]=s%1e14);for(e%=14,(i=f[--c])&&e&&(s=d[14-e],f[c]=u(i/s)*s);0===f[c];f.pop(),c--);if(c<0)f=[r=0];else{for(r=-1;0===f[0];f.splice(0,1),r-=14);for(c=1,s=f[0];s>=10;s/=10,c++);c<14&&(r-=14-c)}return p.e=r,p.c=f,p}),B.sum=function(){for(var e=1,t=arguments,n=new B(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){function e(e,t,n,r){for(var i,a,s=[0],o=0,u=e.length;o<u;){for(a=s.length;a--;s[a]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(t,r,i,a,s){var o,u,l,c,d,f,y,h,m=t.indexOf("."),b=D,_=E;for(m>=0&&(c=L,L=0,t=t.replace(".",""),f=(h=new B(r)).pow(t.length-m),L=c,h.c=e(g(p(f.c),f.e,"0"),10,i,"0123456789"),h.e=h.c.length),l=c=(y=e(t,r,i,s?(o=O,"0123456789"):(o="0123456789",O))).length;0==y[--c];y.pop());if(!y[0])return o.charAt(0);if(m<0?--l:(f.c=y,f.e=l,f.s=a,y=(f=n(f,h,b,_,i)).c,d=f.r,l=f.e),m=y[u=l+b+1],c=i/2,d=d||u<0||null!=y[u+1],d=_<4?(null!=m||d)&&(0==_||_==(f.s<0?3:2)):m>c||m==c&&(4==_||d||6==_&&1&y[u-1]||_==(f.s<0?8:7)),u<1||!y[0])t=d?g(o.charAt(1),-b,o.charAt(0)):o.charAt(0);else{if(y.length=u,d)for(--i;++y[--u]>i;)y[u]=0,u||(++l,y=[1].concat(y));for(c=y.length;!y[--c];);for(m=0,t="";m<=c;t+=o.charAt(y[m++]));t=g(t,l,o.charAt(0))}return t}}(),n=function(){function e(e,t,n){var r,i,a,s,o=0,u=e.length,l=t%1e7,c=t/1e7|0;for(e=e.slice();u--;)o=((i=l*(a=e[u]%1e7)+(r=c*a+(s=e[u]/1e7|0)*l)%1e7*1e7+o)/n|0)+(r/1e7|0)+c*s,e[u]=i%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,s,o){var l,c,d,p,y,h,m,b,g,_,v,w,T,I,S,A,D,E=r.s==i.s?1:-1,C=r.c,x=i.c;if(!(C&&C[0]&&x&&x[0]))return new B(r.s&&i.s&&(C?!x||C[0]!=x[0]:x)?C&&0==C[0]||!x?0*E:E/0:NaN);for(g=(b=new B(E)).c=[],E=a+(c=r.e-i.e)+1,o||(o=1e14,c=f(r.e/14)-f(i.e/14),E=E/14|0),d=0;x[d]==(C[d]||0);d++);if(x[d]>(C[d]||0)&&c--,E<0)g.push(1),p=!0;else{for(I=C.length,A=x.length,d=0,E+=2,(y=u(o/(x[0]+1)))>1&&(x=e(x,y,o),C=e(C,y,o),A=x.length,I=C.length),T=A,v=(_=C.slice(0,A)).length;v<A;_[v++]=0);D=x.slice(),D=[0].concat(D),S=x[0],x[1]>=o/2&&S++;do{if(y=0,(l=t(x,_,A,v))<0){if(w=_[0],A!=v&&(w=w*o+(_[1]||0)),(y=u(w/S))>1)for(y>=o&&(y=o-1),m=(h=e(x,y,o)).length,v=_.length;1==t(h,_,m,v);)y--,n(h,A<m?D:x,m,o),m=h.length,l=1;else 0==y&&(l=y=1),m=(h=x.slice()).length;if(m<v&&(h=[0].concat(h)),n(_,h,v,o),v=_.length,-1==l)for(;t(x,_,A,v)<1;)y++,n(_,A<v?D:x,v,o),v=_.length}else 0===l&&(y++,_=[0]);g[d++]=y,_[0]?_[v++]=C[T]||0:(_=[C[T]],v=1)}while((T++<I||null!=_[0])&&E--);p=null!=_[0],g[0]||g.splice(0,1)}if(1e14==o){for(d=1,E=g[0];E>=10;E/=10,d++);z(b,a+(b.e=d+14*c-1)+1,s,p)}else b.e=c,b.r=+p;return b}}(),_=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,w=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(I,"");if(T.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(_,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(v,"$1").replace(w,"0.$1")),t!=a))return new B(a,i);if(B.DEBUG)throw Error(l+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},S.absoluteValue=S.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},S.comparedTo=function(e,t){return y(this,new B(e,t))},S.decimalPlaces=S.dp=function(e,t){var n,r,i,a=this;if(null!=e)return h(e,0,1e9),null==t?t=E:h(t,0,8),z(new B(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=14*((i=n.length-1)-f(this.e/14)),i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},S.dividedBy=S.div=function(e,t){return n(this,new B(e,t),D,E)},S.dividedToIntegerBy=S.idiv=function(e,t){return n(this,new B(e,t),0,1)},S.exponentiatedBy=S.pow=function(e,t){var n,r,i,a,s,c,d,f,p=this;if((e=new B(e)).c&&!e.isInteger())throw Error(l+"Exponent not an integer: "+q(e));if(null!=t&&(t=new B(t)),s=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return f=new B(Math.pow(+q(p),s?2-m(e):+q(e))),t?f.mod(t):f;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(r=!c&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return a=p.s<0&&m(e)?-0:0,p.e>-1&&(a=1/a),new B(c?1/a:a);L&&(a=o(L/14+2))}for(s?(n=new B(.5),c&&(e.s=1),d=m(e)):d=(i=Math.abs(+q(e)))%2,f=new B(A);;){if(d){if(!(f=f.times(p)).c)break;a?f.c.length>a&&(f.c.length=a):r&&(f=f.mod(t))}if(i){if(0===(i=u(i/2)))break;d=i%2}else if(z(e=e.times(n),e.e+1,1),e.e>14)d=m(e);else{if(0==(i=+q(e)))break;d=i%2}p=p.times(p),a?p.c&&p.c.length>a&&(p.c.length=a):r&&(p=p.mod(t))}return r?f:(c&&(f=A.div(f)),t?f.mod(t):a?z(f,L,E,void 0):f)},S.integerValue=function(e){var t=new B(this);return null==e?e=E:h(e,0,8),z(t,t.e+1,e)},S.isEqualTo=S.eq=function(e,t){return 0===y(this,new B(e,t))},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(e,t){return y(this,new B(e,t))>0},S.isGreaterThanOrEqualTo=S.gte=function(e,t){return 1===(t=y(this,new B(e,t)))||0===t},S.isInteger=function(){return!!this.c&&f(this.e/14)>this.c.length-2},S.isLessThan=S.lt=function(e,t){return y(this,new B(e,t))<0},S.isLessThanOrEqualTo=S.lte=function(e,t){return-1===(t=y(this,new B(e,t)))||0===t},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&0==this.c[0]},S.minus=function(e,t){var n,r,i,a,s=this,o=s.s;if(t=(e=new B(e,t)).s,!o||!t)return new B(NaN);if(o!=t)return e.s=-t,s.plus(e);var u=s.e/14,l=e.e/14,c=s.c,d=e.c;if(!u||!l){if(!c||!d)return c?(e.s=-t,e):new B(d?s:NaN);if(!c[0]||!d[0])return d[0]?(e.s=-t,e):new B(c[0]?s:3==E?-0:0)}if(u=f(u),l=f(l),c=c.slice(),o=u-l){for((a=o<0)?(o=-o,i=c):(l=u,i=d),i.reverse(),t=o;t--;i.push(0));i.reverse()}else for(r=(a=(o=c.length)<(t=d.length))?o:t,o=t=0;t<r;t++)if(c[t]!=d[t]){a=c[t]<d[t];break}if(a&&(i=c,c=d,d=i,e.s=-e.s),(t=(r=d.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=99999999999999;r>o;){if(c[--r]<d[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=1e14}c[r]-=d[r]}for(;0==c[0];c.splice(0,1),--l);return c[0]?U(e,c,l):(e.s=3==E?-1:1,e.c=[e.e=0],e)},S.modulo=S.mod=function(e,t){var r,i,a=this;return e=new B(e,t),!a.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||a.c&&!a.c[0]?new B(a):(9==P?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,P),(e=a.minus(r.times(e))).c[0]||1!=P||(e.s=a.s),e)},S.multipliedBy=S.times=function(e,t){var n,r,i,a,s,o,u,l,c,d,p,y,h,m=this,b=m.c,g=(e=new B(e,t)).c;if(!(b&&g&&b[0]&&g[0]))return!m.s||!e.s||b&&!b[0]&&!g||g&&!g[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&g?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=f(m.e/14)+f(e.e/14),e.s*=m.s,(u=b.length)<(d=g.length)&&(h=b,b=g,g=h,i=u,u=d,d=i),i=u+d,h=[];i--;h.push(0));for(i=d;--i>=0;){for(n=0,p=g[i]%1e7,y=g[i]/1e7|0,a=i+(s=u);a>i;)n=((l=p*(l=b[--s]%1e7)+(o=y*l+(c=b[s]/1e7|0)*p)%1e7*1e7+h[a]+n)/1e14|0)+(o/1e7|0)+y*c,h[a--]=l%1e14;h[a]=n}return n?++r:h.splice(0,1),U(e,h,r)},S.negated=function(){var e=new B(this);return e.s=-e.s||null,e},S.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/14,s=e.e/14,o=r.c,u=e.c;if(!a||!s){if(!o||!u)return new B(i/0);if(!o[0]||!u[0])return u[0]?e:new B(o[0]?r:0*i)}if(a=f(a),s=f(s),o=o.slice(),i=a-s){for(i>0?(s=a,n=u):(i=-i,n=o),n.reverse();i--;n.push(0));n.reverse()}for((i=o.length)-(t=u.length)<0&&(n=u,u=o,o=n,t=i),i=0;t;)i=(o[--t]=o[t]+u[t]+i)/1e14|0,o[t]=1e14===o[t]?0:o[t]%1e14;return i&&(o=[i].concat(o),++s),U(e,o,s)},S.precision=S.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return h(e,1,1e9),null==t?t=E:h(t,0,8),z(new B(a),e,t);if(!(n=a.c))return null;if(r=14*(i=n.length-1)+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},S.shiftedBy=function(e){return h(e,-9007199254740991,9007199254740991),this.times("1e"+e)},S.squareRoot=S.sqrt=function(){var e,t,r,i,a,s=this,o=s.c,u=s.s,l=s.e,c=D+4,d=new B("0.5");if(1!==u||!o||!o[0])return new B(!u||u<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(u=Math.sqrt(+q(s)))||u==1/0?(((t=p(o)).length+l)%2==0&&(t+="0"),u=Math.sqrt(+t),l=f((l+1)/2)-(l<0||l%2),r=new B(t=u==1/0?"1e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new B(u+""),r.c[0])for((u=(l=r.e)+c)<3&&(u=0);;)if(a=r,r=d.times(a.plus(n(s,a,c,1))),p(a.c).slice(0,u)===(t=p(r.c)).slice(0,u)){if(r.e<l&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(z(r,r.e+D+2,1),e=!r.times(r).eq(s));break}if(!i&&(z(a,a.e+D+2,0),a.times(a).eq(s))){r=a;break}c+=4,u+=4,i=1}return z(r,r.e+D+1,E,e)},S.toExponential=function(e,t){return null!=e&&(h(e,0,1e9),e++),j(this,e,t,1)},S.toFixed=function(e,t){return null!=e&&(h(e,0,1e9),e=e+this.e+1),j(this,e,t)},S.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=R;else if("object"!=typeof n)throw Error(l+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var a,s=r.split("."),o=+n.groupSize,u=+n.secondaryGroupSize,c=n.groupSeparator||"",d=s[0],f=s[1],p=i.s<0,y=p?d.slice(1):d,h=y.length;if(u&&(a=o,o=u,u=a,h-=a),o>0&&h>0){for(a=h%o||o,d=y.substr(0,a);a<h;a+=o)d+=c+y.substr(a,o);u>0&&(d+=c+y.slice(a)),p&&(d="-"+d)}r=f?d+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):d}return(n.prefix||"")+r+(n.suffix||"")},S.toFraction=function(e){var t,r,i,a,s,o,u,c,f,y,h,m,b=this,g=b.c;if(null!=e&&(!(u=new B(e)).isInteger()&&(u.c||1!==u.s)||u.lt(A)))throw Error(l+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+q(u));if(!g)return new B(b);for(t=new B(A),f=r=new B(A),i=c=new B(A),m=p(g),s=t.e=m.length-b.e-1,t.c[0]=d[(o=s%14)<0?14+o:o],e=!e||u.comparedTo(t)>0?s>0?t:f:u,o=k,k=1/0,u=new B(m),c.c[0]=0;y=n(u,t,0,1),1!=(a=r.plus(y.times(i))).comparedTo(e);)r=i,i=a,f=c.plus(y.times(a=f)),c=a,t=u.minus(y.times(a=t)),u=a;return a=n(e.minus(r),i,0,1),c=c.plus(a.times(f)),r=r.plus(a.times(i)),c.s=f.s=b.s,h=n(f,i,s*=2,E).minus(b).abs().comparedTo(n(c,r,s,E).minus(b).abs())<1?[f,i]:[c,r],k=o,h},S.toNumber=function(){return+q(this)},S.toPrecision=function(e,t){return null!=e&&h(e,1,1e9),j(this,e,t,2)},S.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=C||a>=x?b(p(n.c),a):g(p(n.c),a,"0"):10===e?t=g(p((n=z(new B(n),D+a+1,E)).c),n.e,"0"):(h(e,2,O.length,"Base"),t=r(g(p(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},S.valueOf=S.toJSON=function(){return q(this)},S._isBigNumber=!0,null!=t&&B.set(t),B}()).default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!c){var e=o(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}i.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];l.push(new y(e,t)),1!==l.length||c||o(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t);var r=n(2);r.a.from(-1),r.a.from(0),r.a.from(1),r.a.from(2),r.a.from("1000000000000000000"),r.a.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var i=n(0);const a=new(n(1).a)("strings/5.0.0-beta.136");var s,o;function u(e,t,n,r,i){if(e===o.BAD_PREFIX||e===o.UNEXPECTED_CONTINUE){let e=0;for(let r=t+1;r<n.length&&n[r]>>6==2;r++)e++;return e}return e===o.OVERRUN?n.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(s||(s={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(o||(o={}));const l=Object.freeze({error:function(e,t,n,r,i){return a.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",n)},ignore:u,replace:function(e,t,n,r,i){return e===o.OVERLONG?(r.push(i),0):(r.push(65533),u(e,t,n))}});function c(e,t){null==t&&(t=l.error),e=Object(i.arrayify)(e);const n=[];let r=0;for(;r<e.length;){const i=e[r++];if(i>>7==0){n.push(i);continue}let a=null,s=null;if(192==(224&i))a=1,s=127;else if(224==(240&i))a=2,s=2047;else{if(240!=(248&i)){r+=t(128==(192&i)?o.UNEXPECTED_CONTINUE:o.BAD_PREFIX,r-1,e,n);continue}a=3,s=65535}if(r-1+a>=e.length){r+=t(o.OVERRUN,r-1,e,n);continue}let u=i&(1<<8-a-1)-1;for(let i=0;i<a;i++){let i=e[r];if(128!=(192&i)){r+=t(o.MISSING_CONTINUE,r,e,n),u=null;break}u=u<<6|63&i,r++}null!==u&&(u>1114111?r+=t(o.OUT_OF_RANGE,r-1-a,e,n,u):u>=55296&&u<=57343?r+=t(o.UTF16_SURROGATE,r-1-a,e,n,u):u<=s?r+=t(o.OVERLONG,r-1-a,e,n,u):n.push(u))}return n}function d(e,t=s.current){t!=s.current&&(a.checkNormalize(),e=e.normalize(t));let n=[];for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);if(r<128)n.push(r);else if(r<2048)n.push(r>>6|192),n.push(63&r|128);else if(55296==(64512&r)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const a=65536+((1023&r)<<10)+(1023&i);n.push(a>>18|240),n.push(a>>12&63|128),n.push(a>>6&63|128),n.push(63&a|128)}else n.push(r>>12|224),n.push(r>>6&63|128),n.push(63&r|128)}return Object(i.arrayify)(n)}function f(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function p(e,t){return'"'+c(e,t).map(e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?f(e):f(55296+((e-=65536)>>10&1023))+f(56320+(1023&e))}).join("")+'"'}function y(e){return e.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join("")}function h(e,t){return y(c(e,t))}function m(e,t=s.current){return c(d(e,t))}function b(e){const t=d(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Object(i.hexlify)(Object(i.concat)([t,"0x0000000000000000000000000000000000000000000000000000000000000000"]).slice(0,32))}function g(e){const t=Object(i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let n=31;for(;0===t[n-1];)n--;return h(t.slice(0,n))}function _(e,t){t||(t=function(e){return[parseInt(e,16)]});let n=0,r={};return e.split(",").forEach(e=>{let i=e.split(":");n+=parseInt(i[0],16),r[n]=t(i[1])}),r}function v(e){let t=0;return e.split(",").map(e=>{let n=e.split("-");1===n.length?n[1]="0":""===n[1]&&(n[1]="1");let r=t+parseInt(n[0],16);return t=parseInt(n[1],16),{l:r,h:t}})}function w(e,t){let n=0;for(let r=0;r<t.length;r++){let i=t[r];if(n+=i.l,e>=n&&e<=n+i.h&&(e-n)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-n))continue;return i}}return null}const T=v("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),I="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(e=>parseInt(e,16)),S=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],A=_("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),D=_("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),E=_("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let t=[];for(let n=0;n<e.length;n+=4)t.push(parseInt(e.substring(n,n+4),16));return t})),C=v("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function x(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();let t=m(e);var n;n=t.map(e=>I.indexOf(e)>=0||e>=65024&&e<=65039?[]:function(e){let t=w(e,S);if(t)return[e+t.s];let n=A[e];if(n)return n;let r=D[e];return r?[e+r[0]]:E[e]||null}(e)||[e]),t=n.reduce((e,t)=>(t.forEach(t=>{e.push(t)}),e),[]),t=m(y(t),s.NFKC),t.forEach(e=>{if(w(e,C))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),t.forEach(e=>{if(w(e,T))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=y(t);if("-"===r.substring(0,1)||"--"===r.substring(2,4)||"-"===r.substring(r.length-1))throw new Error("invalid hyphen");if(r.length>63)throw new Error("too long");return r}n.d(t,"_toEscapedUtf8String",(function(){return p})),n.d(t,"toUtf8Bytes",(function(){return d})),n.d(t,"toUtf8CodePoints",(function(){return m})),n.d(t,"toUtf8String",(function(){return h})),n.d(t,"Utf8ErrorFuncs",(function(){return l})),n.d(t,"Utf8ErrorReason",(function(){return o})),n.d(t,"UnicodeNormalizationForm",(function(){return s})),n.d(t,"formatBytes32String",(function(){return b})),n.d(t,"parseBytes32String",(function(){return g})),n.d(t,"nameprep",(function(){return x}))},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n(0),a=n(2),s=n(5),o=n.n(s);function u(e){return"0x"+o.a.keccak_256(Object(i.arrayify)(e))}function l(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}var c=n(1);n.d(t,"getAddress",(function(){return b})),n.d(t,"isAddress",(function(){return g})),n.d(t,"getIcapAddress",(function(){return _})),n.d(t,"getContractAddress",(function(){return v})),n.d(t,"getCreate2Address",(function(){return w}));const d=new c.a("address/5.0.0-beta.134");function f(e){Object(i.isHexString)(e,20)||d.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let e=0;e<40;e++)n[e]=t[e].charCodeAt(0);const r=Object(i.arrayify)(u(n));for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&r[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const p={};for(let e=0;e<10;e++)p[String(e)]=String(e);for(let e=0;e<26;e++)p[String.fromCharCode(65+e)]=String(10+e);const y=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10));var h;function m(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map(e=>p[e]).join("");for(;t.length>=y;){let e=t.substring(0,y);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n="0"+n;return n}function b(e){let t=null;if("string"!=typeof e&&d.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=f(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&d.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==m(e)&&d.throwArgumentError("bad icap checksum","address",e),t=new r.BN(e.substring(4),36).toString(16);t.length<40;)t="0"+t;t=f("0x"+t)}else d.throwArgumentError("invalid address","address",e);return t}function g(e){try{return b(e),!0}catch(e){}return!1}function _(e){let t=new r.BN(b(e).substring(2),16).toString(36).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+m("XE00"+t)+t}function v(e){let t=null;try{t=b(e.from)}catch(t){d.throwArgumentError("missing from address","transaction",e)}const n=Object(i.stripZeros)(Object(i.arrayify)(a.a.from(e.nonce).toHexString()));return b(Object(i.hexDataSlice)(u(function(e){return Object(i.hexlify)(function e(t){if(Array.isArray(t)){let n=[];if(t.forEach((function(t){n=n.concat(e(t))})),n.length<=55)return n.unshift(192+n.length),n;const r=l(n.length);return r.unshift(247+r.length),r.concat(n)}const n=Array.prototype.slice.call(Object(i.arrayify)(t));if(1===n.length&&n[0]<=127)return n;if(n.length<=55)return n.unshift(128+n.length),n;const r=l(n.length);return r.unshift(183+r.length),r.concat(n)}(e))}([t,n])),12))}function w(e,t,n){return 32!==Object(i.hexDataLength)(t)&&d.throwArgumentError("salt must be 32 bytes","salt",t),32!==Object(i.hexDataLength)(n)&&d.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",n),b(Object(i.hexDataSlice)(u(Object(i.concat)(["0xff",b(e),t,n])),12))}}])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=r.__importDefault(n(3)),a=r.__importStar(n(4)),s=r.__importDefault(n(5)),o=function(e){function t(t){return e.call(this,a,t,null,s.default)||this}return r.__extends(t,e),t}(i.default);t.default=o},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return a})),n.d(t,"__rest",(function(){return s})),n.d(t,"__decorate",(function(){return o})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return l})),n.d(t,"__awaiter",(function(){return c})),n.d(t,"__generator",(function(){return d})),n.d(t,"__exportStar",(function(){return f})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return y})),n.d(t,"__spread",(function(){return h})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return g})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return v})),n.d(t,"__importStar",(function(){return w})),n.d(t,"__importDefault",(function(){return T}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n}function o(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(i,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,o)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}}function f(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||o(e,t)}))})}function o(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,l):c(a[0][2],n)}catch(e){c(a[0][3],e)}var n}function u(e){o("next",e)}function l(e){o("throw",e)}function c(e,t){e(t),a.shift(),a.length&&o(a[0][0],a[0][1])}}function g(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function T(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";n.r(t);var r=n(1);n.d(t,"isBytesLike",(function(){return o})),n.d(t,"isBytes",(function(){return u})),n.d(t,"arrayify",(function(){return l})),n.d(t,"concat",(function(){return c})),n.d(t,"stripZeros",(function(){return d})),n.d(t,"zeroPad",(function(){return f})),n.d(t,"isHexString",(function(){return p})),n.d(t,"hexlify",(function(){return y})),n.d(t,"hexDataLength",(function(){return h})),n.d(t,"hexDataSlice",(function(){return m})),n.d(t,"hexConcat",(function(){return b})),n.d(t,"hexValue",(function(){return g})),n.d(t,"hexStripZeros",(function(){return _})),n.d(t,"hexZeroPad",(function(){return v})),n.d(t,"splitSignature",(function(){return w})),n.d(t,"joinSignature",(function(){return T}));const i=new r.a("bytes/5.0.0-beta.136");function a(e){return!!e.toHexString}function s(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function o(e){return p(e)&&!(e.length%2)||u(e)}function u(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(null==e.length)return!1;for(let t=0;t<e.length;t++){const n=e[t];if(n<0||n>=256||n%1)return!1}return!0}function l(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e/=256;return 0===t.length&&t.push(0),s(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0x0"+n.substring(2):"right"===t.hexPad?n+="0":i.throwArgumentError("hex data is odd-length","value",e));const r=[];for(let e=0;e<n.length;e+=2)r.push(parseInt(n.substring(e,e+2),16));return s(new Uint8Array(r))}return u(e)?s(new Uint8Array(e)):i.throwArgumentError("invalid arrayify value","value",e)}function c(e){const t=e.map(e=>l(e)),n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);return t.reduce((e,t)=>(r.set(t,e),e+t.length),0),s(r)}function d(e){let t=l(e);if(0===t.length)return t;let n=0;for(;n<t.length&&0===t[n];)n++;return n&&(t=t.slice(n)),t}function f(e,t){(e=l(e)).length>t&&i.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(t);return n.set(e,t-e.length),s(n)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}function y(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t="0123456789abcdef"[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":i.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(u(e)){let t="0x";for(let n=0;n<e.length;n++){let r=e[n];t+="0123456789abcdef"[(240&r)>>4]+"0123456789abcdef"[15&r]}return t}return i.throwArgumentError("invalid hexlify value","value",e)}function h(e){if("string"!=typeof e)e=y(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2}function m(e,t,n){return"string"!=typeof e?e=y(e):(!p(e)||e.length%2)&&i.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function b(e){let t="0x";return e.forEach(e=>{t+=y(e).substring(2)}),t}function g(e){const t=_(y(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function _(e){"string"!=typeof e&&(e=y(e)),p(e)||i.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}function v(e,t){for("string"!=typeof e?e=y(e):p(e)||i.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&i.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function w(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(o(e)){const n=l(e);65!==n.length&&i.throwArgumentError("invalid signature string; must be 65 bytes","signature",e),t.r=y(n.slice(0,32)),t.s=y(n.slice(32,64)),t.v=n[64],t.recoveryParam=1-t.v%2,t.v<27&&(0===t.v||1===t.v?t.v+=27:i.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam&&(n[32]|=128),t._vs=y(n.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const n=f(l(t._vs),32);t._vs=y(n);const r=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=r:t.recoveryParam!==r&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;const a=y(n);null==t.s?t.s=a:t.s!==a&&i.throwArgumentError("signature v mismatch _vs","signature",e)}null==t.recoveryParam?null==t.v?i.throwArgumentError("signature missing v and recoveryParam","signature",e):t.recoveryParam=1-t.v%2:null==t.v?t.v=27+t.recoveryParam:t.recoveryParam!==1-t.v%2&&i.throwArgumentError("signature recoveryParam mismatch v","signature",e),null!=t.r&&p(t.r)?t.r=v(t.r,32):i.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=v(t.s,32):i.throwArgumentError("signature missing or invalid s","signature",e);const n=l(t.s);n[0]>=128&&i.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(n[0]|=128);const r=y(n);t._vs&&(p(t._vs)||i.throwArgumentError("signature invalid _vs","signature",e),t._vs=v(t._vs,32)),null==t._vs?t._vs=r:t._vs!==r&&i.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t}function T(e){return y(c([(e=w(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));let r=!1,i=!1;const a={debug:1,default:2,info:2,warn:3,error:4,off:5};let s=a.default,o=null;const u=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(n){e.push(t)}}),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();class l{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}setLogLevel(e){const t=a[e];null!=t?s=t:this.warn("invalid log level - "+e)}_log(e,t){s>a[e]||console.log.apply(console,t)}debug(...e){this._log(l.levels.DEBUG,e)}info(...e){this._log(l.levels.INFO,e)}warn(...e){this._log(l.levels.WARNING,e)}makeError(e,t,n){if(i)return new Error("unknown error");t||(t=l.errors.UNKNOWN_ERROR),n||(n={});const r=[];Object.keys(n).forEach(e=>{try{r.push(e+"="+JSON.stringify(n[e]))}catch(t){r.push(e+"="+JSON.stringify(n[e].toString()))}}),r.push("code="+t),r.push("version="+this.version);const a=e;r.length&&(e+=" ("+r.join(", ")+")");const s=new Error(e);return s.reason=a,s.code=t,Object.keys(n).forEach((function(e){s[e]=n[e]})),s}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,l.errors.INVALID_ARGUMENT,{argument:t,value:n})}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",l.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,l.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,l.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n=n?": "+n:"",e<t&&this.throwError("missing argument"+n,l.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+n,l.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",l.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",l.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",l.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return o||(o=new l("logger/5.0.0-beta.134")),o}static setCensorship(e,t){if(r){if(!e)return;this.globalLogger().throwError("error censorship permanent",l.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,r=!!t}}l.errors={UNKNOWN_ERROR:"UNKNOWN_ERROR",NOT_IMPLEMENTED:"NOT_IMPLEMENTED",UNSUPPORTED_OPERATION:"UNSUPPORTED_OPERATION",NETWORK_ERROR:"NETWORK_ERROR",SERVER_ERROR:"SERVER_ERROR",TIMEOUT:"TIMEOUT",BUFFER_OVERRUN:"BUFFER_OVERRUN",NUMERIC_FAULT:"NUMERIC_FAULT",MISSING_NEW:"MISSING_NEW",INVALID_ARGUMENT:"INVALID_ARGUMENT",MISSING_ARGUMENT:"MISSING_ARGUMENT",UNEXPECTED_ARGUMENT:"UNEXPECTED_ARGUMENT",CALL_EXCEPTION:"CALL_EXCEPTION",INSUFFICIENT_FUNDS:"INSUFFICIENT_FUNDS",NONCE_EXPIRED:"NONCE_EXPIRED",REPLACEMENT_UNDERPRICED:"REPLACEMENT_UNDERPRICED",UNPREDICTABLE_GAS_LIMIT:"UNPREDICTABLE_GAS_LIMIT"},l.levels={DEBUG:"DEBUG",INFO:"INFO",WARNING:"WARNING",ERROR:"ERROR",OFF:"OFF"}},function(e,t,n){"use strict";var r=n(3),i=n(0),a=n(1);const s="bignumber/5.0.0-beta.135",o=new a.a(s),u={};class l{constructor(e,t){o.checkNew(new.target,l),e!==u&&o.throwError("cannot call consturtor directly; use BigNumber.from",a.a.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return d(f(this).fromTwos(e))}toTwos(e){return d(f(this).toTwos(e))}abs(){return"-"===this._hex[0]?l.from(this._hex.substring(1)):this}add(e){return d(f(this).add(f(e)))}sub(e){return d(f(this).sub(f(e)))}div(e){return l.from(e).isZero()&&p("division by zero","div"),d(f(this).div(f(e)))}mul(e){return d(f(this).mul(f(e)))}mod(e){return d(f(this).mod(f(e)))}pow(e){return d(f(this).pow(f(e)))}maskn(e){return d(f(this).maskn(e))}eq(e){return f(this).eq(f(e))}lt(e){return f(this).lt(f(e))}lte(e){return f(this).lte(f(e))}gt(e){return f(this).gt(f(e))}gte(e){return f(this).gte(f(e))}isZero(){return f(this).isZero()}toNumber(){try{return f(this).toNumber()}catch(e){p("overflow","toNumber",this.toString())}return null}toString(){return 0!==arguments.length&&o.throwError("bigNumber.toString does not accept parameters",a.a.errors.UNEXPECTED_ARGUMENT,{}),f(this).toString(10)}toHexString(){return this._hex}static from(e){return e instanceof l?e:"string"==typeof e?e.match(/-?0x[0-9a-f]+/i)?new l(u,c(e)):e.match(/^-?[0-9]+$/)?new l(u,c(new r.BN(e))):o.throwArgumentError("invalid BigNumber string","value",e):"number"==typeof e?(e%1&&p("underflow","BigNumber.from",e),(e>=9007199254740991||e<=-9007199254740991)&&p("overflow","BigNumber.from",e),l.from(String(e))):"bigint"==typeof e?l.from(e.toString()):Object(i.isBytes)(e)?l.from(Object(i.hexlify)(e)):e._hex&&Object(i.isHexString)(e._hex)?l.from(e._hex):e.toHexString&&"string"==typeof(e=e.toHexString())?l.from(e):o.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function c(e){if("string"!=typeof e)return c(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&o.throwArgumentError("invalid hex","value",e),"0x00"===(e=c(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function d(e){return l.from(c(e))}function f(e){const t=l.from(e).toHexString();return"-"===t[0]?new r.BN("-"+t.substring(3),16):new r.BN(t.substring(2),16)}function p(e,t,n){const r={fault:e,operation:t};return null!=n&&(r.value=n),o.throwError(e,a.a.errors.NUMERIC_FAULT,r)}new a.a(s),l.from(0),l.from(-1);let y="0";for(;y.length<256;)y+=y;n.d(t,"a",(function(){return l}))},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function a(e,t,n){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{s=n(14).Buffer}catch(e){}function o(e,t,n){for(var r=0,i=Math.min(e.length,n),a=t;a<i;a++){var s=e.charCodeAt(a)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function u(e,t,n,r){for(var i=0,a=Math.min(e.length,n),s=t;s<a;s++){var o=e.charCodeAt(s)-48;i*=r,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===n)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===n)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.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,i,a=0;for(n=e.length-6,r=0;n>=t;n-=6)i=o(e,n,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);n+6!==t&&(i=o(e,t,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,l=0,c=n;c<o;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var d=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},a.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},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","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"],c=[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],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,u=s/67108864|0;n.words[0]=o;for(var l=1;l<r;l++){for(var c=u>>>26,d=67108863&u,f=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=f;p++){var y=l-p|0;c+=(s=(i=0|e.words[y])*(a=0|t.words[p])+d)/67108864|0,d=67108863&s}n.words[l]=0|d,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}a.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<i|a)).toString(16);n=0!=(a=o>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==a&&(n=a.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],p=d[e];n="";var y=this.clone();for(y.negative=0;!y.isZero();){var h=y.modn(p).toString(e);n=(y=y.idivn(p)).isZero()?h+n:l[f-h.length]+h+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return r(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===t,l=new e(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[o]=s;for(;o<a;o++)l[o]=0}else{for(o=0;o<a-i;o++)l[o]=0;for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[a-o-1]=s}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;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()},a.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.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];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,a,s=e.words,o=t.words,u=n.words,l=0,c=0|s[0],d=8191&c,f=c>>>13,p=0|s[1],y=8191&p,h=p>>>13,m=0|s[2],b=8191&m,g=m>>>13,_=0|s[3],v=8191&_,w=_>>>13,T=0|s[4],I=8191&T,S=T>>>13,A=0|s[5],D=8191&A,E=A>>>13,C=0|s[6],x=8191&C,M=C>>>13,k=0|s[7],N=8191&k,P=k>>>13,L=0|s[8],R=8191&L,O=L>>>13,B=0|s[9],j=8191&B,V=B>>>13,U=0|o[0],z=8191&U,q=U>>>13,$=0|o[1],F=8191&$,H=$>>>13,G=0|o[2],Y=8191&G,Q=G>>>13,Z=0|o[3],K=8191&Z,W=Z>>>13,J=0|o[4],X=8191&J,ee=J>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ue=8191&oe,le=oe>>>13,ce=0|o[8],de=8191&ce,fe=ce>>>13,pe=0|o[9],ye=8191&pe,he=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(f,z)|0))<<13)|0;l=((a=Math.imul(f,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(h,z)|0,a=Math.imul(h,q);var be=(l+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,F)|0))<<13)|0;l=((a=a+Math.imul(f,H)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),i=(i=Math.imul(b,q))+Math.imul(g,z)|0,a=Math.imul(g,q),r=r+Math.imul(y,F)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(h,F)|0,a=a+Math.imul(h,H)|0;var ge=(l+(r=r+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(f,Y)|0))<<13)|0;l=((a=a+Math.imul(f,Q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(v,z),i=(i=Math.imul(v,q))+Math.imul(w,z)|0,a=Math.imul(w,q),r=r+Math.imul(b,F)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(g,F)|0,a=a+Math.imul(g,H)|0,r=r+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(h,Y)|0,a=a+Math.imul(h,Q)|0;var _e=(l+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,K)|0))<<13)|0;l=((a=a+Math.imul(f,W)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,z),i=(i=Math.imul(I,q))+Math.imul(S,z)|0,a=Math.imul(S,q),r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,F)|0,a=a+Math.imul(w,H)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,Q)|0,r=r+Math.imul(y,K)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(h,K)|0,a=a+Math.imul(h,W)|0;var ve=(l+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,X)|0))<<13)|0;l=((a=a+Math.imul(f,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(E,z)|0,a=Math.imul(E,q),r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(S,F)|0,a=a+Math.imul(S,H)|0,r=r+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,Q)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,W)|0,r=r+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(h,X)|0,a=a+Math.imul(h,ee)|0;var we=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;l=((a=a+Math.imul(f,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(x,z),i=(i=Math.imul(x,q))+Math.imul(M,z)|0,a=Math.imul(M,q),r=r+Math.imul(D,F)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(E,F)|0,a=a+Math.imul(E,H)|0,r=r+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,Q)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,W)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,X)|0,a=a+Math.imul(g,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(h,ne)|0,a=a+Math.imul(h,re)|0;var Te=(l+(r=r+Math.imul(d,ae)|0)|0)+((8191&(i=(i=i+Math.imul(d,se)|0)+Math.imul(f,ae)|0))<<13)|0;l=((a=a+Math.imul(f,se)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(N,z),i=(i=Math.imul(N,q))+Math.imul(P,z)|0,a=Math.imul(P,q),r=r+Math.imul(x,F)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(M,F)|0,a=a+Math.imul(M,H)|0,r=r+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,Q)|0,r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,W)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(g,ne)|0,a=a+Math.imul(g,re)|0,r=r+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(h,ae)|0,a=a+Math.imul(h,se)|0;var Ie=(l+(r=r+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(f,ue)|0))<<13)|0;l=((a=a+Math.imul(f,le)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,a=Math.imul(O,q),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(P,F)|0,a=a+Math.imul(P,H)|0,r=r+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,Q)|0,r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,W)|0,r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(w,ne)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,se)|0,r=r+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(h,ue)|0,a=a+Math.imul(h,le)|0;var Se=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;l=((a=a+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(V,z)|0,a=Math.imul(V,q),r=r+Math.imul(R,F)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(O,F)|0,a=a+Math.imul(O,H)|0,r=r+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,Q)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(M,K)|0,a=a+Math.imul(M,W)|0,r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(E,X)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(S,ne)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(v,ae)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,le)|0)+Math.imul(g,ue)|0,a=a+Math.imul(g,le)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(h,de)|0,a=a+Math.imul(h,fe)|0;var Ae=(l+(r=r+Math.imul(d,ye)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(f,ye)|0))<<13)|0;l=((a=a+Math.imul(f,he)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(V,F)|0,a=Math.imul(V,H),r=r+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(O,Y)|0,a=a+Math.imul(O,Q)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,W)|0,r=r+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(w,ue)|0,a=a+Math.imul(w,le)|0,r=r+Math.imul(b,de)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(g,de)|0,a=a+Math.imul(g,fe)|0;var De=(l+(r=r+Math.imul(y,ye)|0)|0)+((8191&(i=(i=i+Math.imul(y,he)|0)+Math.imul(h,ye)|0))<<13)|0;l=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Q))+Math.imul(V,Y)|0,a=Math.imul(V,Q),r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,W)|0,r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(M,ne)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(D,ae)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,le)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(w,de)|0,a=a+Math.imul(w,fe)|0;var Ee=(l+(r=r+Math.imul(b,ye)|0)|0)+((8191&(i=(i=i+Math.imul(b,he)|0)+Math.imul(g,ye)|0))<<13)|0;l=((a=a+Math.imul(g,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,W))+Math.imul(V,K)|0,a=Math.imul(V,W),r=r+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,a=a+Math.imul(P,re)|0,r=r+Math.imul(x,ae)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,se)|0,r=r+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(E,ue)|0,a=a+Math.imul(E,le)|0,r=r+Math.imul(I,de)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(S,de)|0,a=a+Math.imul(S,fe)|0;var Ce=(l+(r=r+Math.imul(v,ye)|0)|0)+((8191&(i=(i=i+Math.imul(v,he)|0)+Math.imul(w,ye)|0))<<13)|0;l=((a=a+Math.imul(w,he)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(V,X)|0,a=Math.imul(V,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,se)|0,r=r+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(M,ue)|0,a=a+Math.imul(M,le)|0,r=r+Math.imul(D,de)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(E,de)|0,a=a+Math.imul(E,fe)|0;var xe=(l+(r=r+Math.imul(I,ye)|0)|0)+((8191&(i=(i=i+Math.imul(I,he)|0)+Math.imul(S,ye)|0))<<13)|0;l=((a=a+Math.imul(S,he)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(V,ne)|0,a=Math.imul(V,re),r=r+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,se)|0,r=r+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(P,ue)|0,a=a+Math.imul(P,le)|0,r=r+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(M,de)|0,a=a+Math.imul(M,fe)|0;var Me=(l+(r=r+Math.imul(D,ye)|0)|0)+((8191&(i=(i=i+Math.imul(D,he)|0)+Math.imul(E,ye)|0))<<13)|0;l=((a=a+Math.imul(E,he)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ae),i=(i=Math.imul(j,se))+Math.imul(V,ae)|0,a=Math.imul(V,se),r=r+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(O,ue)|0,a=a+Math.imul(O,le)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(P,de)|0,a=a+Math.imul(P,fe)|0;var ke=(l+(r=r+Math.imul(x,ye)|0)|0)+((8191&(i=(i=i+Math.imul(x,he)|0)+Math.imul(M,ye)|0))<<13)|0;l=((a=a+Math.imul(M,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(V,ue)|0,a=Math.imul(V,le),r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(O,de)|0,a=a+Math.imul(O,fe)|0;var Ne=(l+(r=r+Math.imul(N,ye)|0)|0)+((8191&(i=(i=i+Math.imul(N,he)|0)+Math.imul(P,ye)|0))<<13)|0;l=((a=a+Math.imul(P,he)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(j,de),i=(i=Math.imul(j,fe))+Math.imul(V,de)|0,a=Math.imul(V,fe);var Pe=(l+(r=r+Math.imul(R,ye)|0)|0)+((8191&(i=(i=i+Math.imul(R,he)|0)+Math.imul(O,ye)|0))<<13)|0;l=((a=a+Math.imul(O,he)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(l+(r=Math.imul(j,ye))|0)+((8191&(i=(i=Math.imul(j,he))+Math.imul(V,ye)|0))<<13)|0;return l=((a=Math.imul(V,he))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=me,u[1]=be,u[2]=ge,u[3]=_e,u[4]=ve,u[5]=we,u[6]=Te,u[7]=Ie,u[8]=Se,u[9]=Ae,u[10]=De,u[11]=Ee,u[12]=Ce,u[13]=xe,u[14]=Me,u[15]=ke,u[16]=Ne,u[17]=Pe,u[18]=Le,0!==l&&(u[19]=l,n.length++),n};function y(e,t,n){return(new h).mulp(e,t,n)}function h(e,t){this.x=e,this.y=t}Math.imul||(p=f),a.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,u=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=u;l++){var c=a-l,d=(0|e.words[c])*(0|t.words[l]),f=67108863&d;o=67108863&(f=f+o|0),i+=(s=(s=s+(d/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,e,t):y(this,e,t)},h.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},h.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},h.prototype.permute=function(e,t,n,r,i,a){for(var s=0;s<a;s++)r[s]=t[e[s]],i[s]=n[e[s]]},h.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),l=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var d=u,f=l,p=0;p<s;p++){var y=n[c+p],h=r[c+p],m=n[c+p+s],b=r[c+p+s],g=d*m-f*b;b=d*b+f*m,m=g,n[c+p]=y+m,r[c+p]=h+b,n[c+p+s]=y-m,r[c+p+s]=h-b,p!==o&&(g=u*d-l*f,f=u*f+l*d,d=g)}},h.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},h.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},h.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},h.prototype.convert13b=function(e,t,n,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],n[2*s]=8191&a,a>>>=13,n[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===a),r(0==(-8192&a))},h.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},h.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),u=new Array(r),l=new Array(r),c=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,l,r),this.transform(s,a,o,u,r,i),this.transform(l,a,c,d,r,i);for(var p=0;p<r;p++){var y=o[p]*c[p]-u[p]*d[p];u[p]=o[p]*d[p]+u[p]*c[p],o[p]=y}return this.conjugate(o,u,r),this.transform(o,u,f,a,r,i),this.conjugate(f,a,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),y(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[n]=67108863&a}return 0!==t&&(this.words[n]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},a.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,u=(0|this.words[t])-o<<n;this.words[t]=u|s,s=o>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,u=n;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var d=0|this.words[l];this.words[l]=c<<26-a|d>>>a,c=d&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},a.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.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]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&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()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var i,a,s=e.length+n;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+n])+o;var u=(0|e.words[i])*t;o=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&a}for(;i<this.length-n;i++)o=(a=(0|this.words[i+n])+o)>>26,this.words[i+n]=67108863&a;if(0===o)return this.strip();for(r(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var o,u=r.length-i.length;if("mod"!==t){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var l=0;l<o.length;l++)o.words[l]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,o&&(o.words[u]=1));for(var d=u-1;d>=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=f)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,o},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),d=t.clone();!t.isZero();){for(var f=0,p=1;0==(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var y=0,h=1;0==(n.words[0]&h)&&y<26;++y,h<<=1);if(y>0)for(n.iushrn(y);y-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(d)),o.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o),s.isub(u)):(n.isub(t),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:n.iushln(l)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new a(1),o=new a(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(o)):(n.isub(t),o.isub(s))}return(i=0===t.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(e),i},a.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);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var a=i,s=n;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new T(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=a._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}function I(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(g,b),g.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var a=0|e.words[r];e.words[r-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(_,b),i(v,b),i(w,b),w.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new _;else if("p192"===e)t=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},T.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},T.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,i),f=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),y=s;0!==p.cmp(o);){for(var h=p,m=0;0!==h.cmp(o);m++)h=h.redSqr();r(m<y);var b=this.pow(d,new a(1).iushln(y-m-1));f=f.redMul(b),d=b.redSqr(),p=p.redMul(d),y=m}return f},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new a(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var d=l>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4==++o||0===r&&0===c)&&(i=this.mul(i,n[s]),o=0,s=0)):o=0}u=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new I(e)},i(I,T),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(13)(e))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(t,n){!function(){"use strict";var r="object"==typeof window?window:{};!r.JS_SHA3_NO_NODE_JS&&"object"==typeof t&&t.versions&&t.versions.node&&(r=n);for(var i=!r.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],o=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],l=["hex","buffer","arrayBuffer","array"],c=function(e,t,n){return function(r){return new w(e,t,e).update(r)[n]()}},d=function(e,t,n){return function(r,i){return new w(e,t,i).update(r)[n]()}},f=function(e,t){var n=c(e,t,"hex");n.create=function(){return new w(e,t,e)},n.update=function(e){return n.create().update(e)};for(var r=0;r<l.length;++r){var i=l[r];n[i]=c(e,t,i)}return n},p=[{name:"keccak",padding:[1,256,65536,16777216],bits:u,createMethod:f},{name:"sha3",padding:[6,1536,393216,100663296],bits:u,createMethod:f},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(e,t){var n=d(e,t,"hex");n.create=function(n){return new w(e,t,n)},n.update=function(e,t){return n.create(t).update(e)};for(var r=0;r<l.length;++r){var i=l[r];n[i]=d(e,t,i)}return n}}],y={},h=[],m=0;m<p.length;++m)for(var b=p[m],g=b.bits,_=0;_<g.length;++_){var v=b.name+"_"+g[_];h.push(v),y[v]=b.createMethod(g[_],b.padding)}function w(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}w.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var n,r,i=e.length,a=this.blocks,o=this.byteCount,u=this.blockCount,l=0,c=this.s;l<i;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<u+1;++n)a[n]=0;if(t)for(n=this.start;l<i&&n<o;++l)a[n>>2]|=e[l]<<s[3&n++];else for(n=this.start;l<i&&n<o;++l)(r=e.charCodeAt(l))<128?a[n>>2]|=r<<s[3&n++]:r<2048?(a[n>>2]|=(192|r>>6)<<s[3&n++],a[n>>2]|=(128|63&r)<<s[3&n++]):r<55296||r>=57344?(a[n>>2]|=(224|r>>12)<<s[3&n++],a[n>>2]|=(128|r>>6&63)<<s[3&n++],a[n>>2]|=(128|63&r)<<s[3&n++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++l)),a[n>>2]|=(240|r>>18)<<s[3&n++],a[n>>2]|=(128|r>>12&63)<<s[3&n++],a[n>>2]|=(128|r>>6&63)<<s[3&n++],a[n>>2]|=(128|63&r)<<s[3&n++]);if(this.lastByteIndex=n,n>=o){for(this.start=n-o,this.block=a[u],n=0;n<u;++n)c[n]^=a[n];T(c),this.reset=!0}else this.start=n}return this},w.prototype.finalize=function(){var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];T(r)},w.prototype.toString=w.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,s=0,o=0,u="";o<r;){for(s=0;s<t&&o<r;++s,++o)e=n[s],u+=a[e>>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];o%t==0&&(T(n),s=0)}return i&&(e=n[s],i>0&&(u+=a[e>>4&15]+a[15&e]),i>1&&(u+=a[e>>12&15]+a[e>>8&15]),i>2&&(u+=a[e>>20&15]+a[e>>16&15])),u},w.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,a=0,s=0,o=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(o);for(var u=new Uint32Array(e);s<r;){for(a=0;a<t&&s<r;++a,++s)u[s]=n[a];s%t==0&&T(n)}return i&&(u[a]=n[a],e=e.slice(0,o)),e},w.prototype.buffer=w.prototype.arrayBuffer,w.prototype.digest=w.prototype.array=function(){this.finalize();for(var e,t,n=this.blockCount,r=this.s,i=this.outputBlocks,a=this.extraBytes,s=0,o=0,u=[];o<i;){for(s=0;s<n&&o<i;++s,++o)e=o<<2,t=r[s],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;o%n==0&&T(r)}return a&&(e=o<<2,t=r[s],a>0&&(u[e]=255&t),a>1&&(u[e+1]=t>>8&255),a>2&&(u[e+2]=t>>16&255)),u};var T=function(e){var t,n,r,i,a,s,u,l,c,d,f,p,y,h,m,b,g,_,v,w,T,I,S,A,D,E,C,x,M,k,N,P,L,R,O,B,j,V,U,z,q,$,F,H,G,Y,Q,Z,K,W,J,X,ee,te,ne,re,ie,ae,se,oe,ue,le,ce;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),n=(y=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(l<<1|c>>>31),n=a^(c<<1|l>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=s^(d<<1|f>>>31),n=u^(f<<1|d>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=l^(p<<1|y>>>31),n=c^(y<<1|p>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=d^(i<<1|a>>>31),n=f^(a<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,h=e[0],m=e[1],Y=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,x=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,$=e[40]<<18|e[41]>>>14,F=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,b=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,K=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,_=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,W=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,D=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,V=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,T=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,E=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,ae=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,I=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=h^~b&_,e[1]=m^~g&v,e[10]=A^~E&x,e[11]=D^~C&M,e[20]=R^~B&V,e[21]=O^~j&U,e[30]=H^~Y&Z,e[31]=G^~Q&K,e[40]=te^~re&ae,e[41]=ne^~ie&se,e[2]=b^~_&w,e[3]=g^~v&T,e[12]=E^~x&k,e[13]=C^~M&N,e[22]=B^~V&z,e[23]=j^~U&q,e[32]=Y^~Z&W,e[33]=Q^~K&J,e[42]=re^~ae&oe,e[43]=ie^~se&ue,e[4]=_^~w&I,e[5]=v^~T&S,e[14]=x^~k&P,e[15]=M^~N&L,e[24]=V^~z&$,e[25]=U^~q&F,e[34]=Z^~W&X,e[35]=K^~J&ee,e[44]=ae^~oe&le,e[45]=se^~ue&ce,e[6]=w^~I&h,e[7]=T^~S&m,e[16]=k^~P&A,e[17]=N^~L&D,e[26]=z^~$&R,e[27]=q^~F&O,e[36]=W^~X&H,e[37]=J^~ee&G,e[46]=oe^~le&te,e[47]=ue^~ce&ne,e[8]=I^~h&b,e[9]=S^~m&g,e[18]=P^~A&E,e[19]=L^~D&C,e[28]=$^~R&B,e[29]=F^~O&j,e[38]=X^~H&Y,e[39]=ee^~G&Q,e[48]=le^~te&re,e[49]=ce^~ne&ie,e[0]^=o[r],e[1]^=o[r+1]};if(i)e.exports=y;else for(m=0;m<h.length;++m)r[h[m]]=y[h[m]]}()}).call(this,n(15),n(4))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),i=r.__importDefault(n(12)),a=n(0),s=n(17),o=n(16);function u(e){return o.toUtf8String(new Uint8Array(e))}function l(e,t){var n=a.hexlify(new Uint8Array(e));return t&&(n=_(n)),n}function c(e,t){var n=e.toString("hex");return t||(n=g(n)),n}function d(e){return o.toUtf8Bytes(e).buffer}function f(e,t){return l(d(e),t)}function p(e,t){var n=new i.default(e).toString(16);return n=b(n),t&&(n=_(n)),n}function y(t){return t=_(t),e.from(t,"hex")}function h(e){return e=g(e),a.arrayify(e).buffer}function m(e){return new i.default(e).toNumber()}function b(e){return(e=(e=_(e)).length%2!=0?"0"+e:e)&&(e=g(e)),e}function g(e){return"0x"===e.toLowerCase().substring(0,2)?e:"0x"+e}function _(e){return"0x"===e.toLowerCase().substring(0,2)?e.substring(2):e}function v(e){return g(e=(e=_(e)).startsWith("0")?e.substring(1):e)}function w(e){return a.isHexString(e)}function T(e){return""===e||"string"==typeof e&&""===e.trim()}function I(e){for(var t={},n=("?"===e[0]?e.substr(1):e).split("&"),r=0;r<n.length;r++){var i=n[r].match(/\w+(?==)/i)||[],a=n[r].match(/=.+/i)||[];i[0]&&(t[decodeURIComponent(i[0])]=decodeURIComponent(a[0].substr(1)))}return t}function S(e){return!(e&&e.length)}t.convertArrayBufferToBuffer=function(e){return y(l(e))},t.convertArrayBufferToUtf8=u,t.convertArrayBufferToHex=l,t.convertArrayBufferToNumber=function(e){return m(l(e))},t.concatArrayBuffers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.map((function(e){return l(e,!0)})).join(""),r=h(n);return r},t.convertBufferToArrayBuffer=function(e){return h(c(e))},t.convertBufferToUtf8=function(e){return e.toString("utf8")},t.convertBufferToHex=c,t.convertBufferToNumber=function(e){return m(c(e))},t.concatBuffers=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.concat(t);return r},t.convertUtf8ToArrayBuffer=d,t.convertUtf8ToBuffer=function(t){return e.from(t,"utf8")},t.convertUtf8ToHex=f,t.convertUtf8ToNumber=function(e){return new i.default(e).toNumber()},t.convertNumberToBuffer=function(e){return y(p(e))},t.convertNumberToArrayBuffer=function(e){return h(p(e))},t.convertNumberToUtf8=function(e){return new i.default(e).toString()},t.convertNumberToHex=p,t.convertHexToBuffer=y,t.convertHexToArrayBuffer=h,t.convertHexToUtf8=function(e){return u(h(e))},t.convertHexToNumber=m,t.sanitizeHex=b,t.addHexPrefix=g,t.removeHexPrefix=_,t.removeHexLeadingZeros=v,t.isHexString=w,t.isEmptyString=T,t.payloadId=function(){return(new Date).getTime()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))},t.uuid=function(){return function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t}()},t.toChecksumAddress=function(e){return s.getAddress(e)},t.isValidAddress=function(e){return!(!e||"0x"!==e.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(e)||!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e)&&e!==t.toChecksumAddress(e))},t.getMeta=function(){if("undefined"==typeof window||"undefined"==typeof document||void 0===window.location)return null;function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=document.getElementsByTagName("meta"),r=function(t){var r=n[t],i=["itemprop","property","name"].map((function(e){return r.getAttribute(e)})).filter((function(t){t&&e.includes(t)}));if(i.length&&i){var a=r.getAttribute("content");if(a)return{value:a}}},i=0;i<n.length;i++){var a=r(i);if("object"==typeof a)return a.value}return""}var t=function(){var t=e("name","og:site_name","og:title","twitter:title");return t||(t=document.title),t}();return{description:e("description","og:description","twitter:description","keywords"),url:window.location.origin,icons:function(){for(var e=document.getElementsByTagName("link"),t=[],n=0;n<e.length;n++){var r=e[n],i=r.getAttribute("rel");if(i&&i.toLowerCase().indexOf("icon")>-1){var a=r.getAttribute("href");if(a)if(-1===a.toLowerCase().indexOf("https:")&&-1===a.toLowerCase().indexOf("http:")&&0!==a.indexOf("//")){var s=window.location.protocol+"//"+window.location.host;if(0===a.indexOf("/"))s+=a;else{var o=window.location.pathname.split("/");o.pop(),s+=o.join("/")+"/"+a}t.push(s)}else if(0===a.indexOf("//")){var u=window.location.protocol+a;t.push(u)}else t.push(a)}}return t}(),name:t}},t.parseQueryString=I,t.parseWalletConnectUri=function(e){var t=e.indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,i=e.substring(0,t),a=function(e){var t=e.split("@");return{handshakeTopic:t[0],version:parseInt(t[1],10)}}(e.substring(t+1,n)),s=function(e){var t=I(e);return{key:t.key||"",bridge:t.bridge||""}}(void 0!==n?e.substr(n):"");return r.__assign(r.__assign({protocol:i},a),s)},t.promisify=function(e,t){var n=this;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return r.__awaiter(n,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,new Promise((function(n,a){e.apply(t,r.__spread(i,[function(e,t){null==e&&a(e),n(t)}]))}))]}))}))}},t.isEmptyArray=S,t.parsePersonalSign=function(e){return S(e)||w(e[0])||(e[0]=f(e[0])),e},t.parseTransactionData=function(e){if(void 0===e.from||!t.isValidAddress(e.from))throw new Error("Transaction object must include a valid 'from' value.");function n(e){var t=e;return("number"==typeof e||"string"==typeof e&&!T(e))&&(w(e)?"string"==typeof e&&(t=b(e)):t=p(e)),"string"==typeof t&&(t=v(t)),t}var r={from:b(e.from),to:void 0===e.to?"":b(e.to),gasPrice:void 0===e.gasPrice?"":n(e.gasPrice),gasLimit:void 0===e.gasLimit?void 0===e.gas?"":n(e.gas):n(e.gasLimit),value:void 0===e.value?"":n(e.value),nonce:void 0===e.nonce?"":n(e.nonce),data:void 0===e.data?"":b(e.data)||"0x"},i=["gasPrice","gasLimit","value","nonce"];return Object.keys(r).forEach((function(e){!r[e].trim().length&&i.includes(e)&&delete r[e]})),r},t.formatRpcError=function(e){var t=e.message||"Failed or Rejected Request",n=-32e3;if(e&&!e.code)switch(t){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3}return{code:n,message:t}},t.isJsonRpcSubscription=function(e){return"object"==typeof e.params},t.isJsonRpcRequest=function(e){return void 0!==e.method},t.isJsonRpcResponseSuccess=function(e){return void 0!==e.result},t.isJsonRpcResponseError=function(e){return void 0!==e.error},t.isInternalEvent=function(e){return void 0!==e.event},t.isWalletConnectSession=function(e){return void 0!==e.bridge},t.isReservedEvent=function(e){return["session_request","session_update","exchange_key","connect","disconnect","display_uri","transport_open","transport_close"].includes(e)||e.startsWith("wc_")},t.signingMethods=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v3","personal_sign"],t.stateMethods=["eth_accounts","eth_chainId","net_version"],t.isSilentPayload=function(e){return!!e.method.startsWith("wc_")||!t.signingMethods.includes(e.method)}}).call(this,n(7).Buffer)},function(e,t,n){"use strict";(function(e){var r=n(8),i=n(9),a=n(10);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(t,n),i=(e=o(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=o(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?o(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(c(t),e=o(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=o(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function h(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var a,s=1,o=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(a=n;a<o;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*s}else-1!==c&&(a-=a-c),c=-1}else for(n+u>o&&(n=o-u),a=n;a>=0;a--){for(var d=!0,f=0;f<u;f++)if(l(e,a+f)!==l(t,f)){d=!1;break}if(d)return a}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var s=0;s<r;++s){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))return s;e[n+s]=o}return s}function v(e,t,n,r){return q(U(t,e.length-n),e,n,r)}function w(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function T(e,t,n,r){return w(e,t,n,r)}function I(e,t,n,r){return q(z(t),e,n,r)}function S(e,t,n,r){return q(function(e,t){for(var n,r,i,a=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,s,o,u,l=e[i],c=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&(u=(15&l)<<12|(63&a)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],s=e[i+2],o=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(u=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=V(e[a]);return i}function M(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function k(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")}function N(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function R(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,a){return a||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.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}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=y,u.prototype._isBuffer=!0,u.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)m(this,t,t+1);return this},u.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)m(this,t,t+3),m(this,t+1,t+2);return this},u.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)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?D(this,0,e):h.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),o=Math.min(a,s),l=this.slice(r,i),c=e.slice(t,n),d=0;d<o;++d)if(l[d]!==c[d]){a=l[d],s=c[d];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=0,s=1,o=0;for(this[t]=255&e;++a<n&&(s*=256);)e<0&&0===o&&0!==this[t+a-1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=n-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=u.isBuffer(e)?e:U(new u(e,r).toString()),o=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%o]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(4))},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),s=r[0],o=r[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,o)),c=0,d=o>0?s-4:s;for(n=0;n<d;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===o&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===o&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],s=0,o=n-i;s<o;s+=16383)a.push(c(e,s,s+16383>o?o:s+16383));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)r[o]=s[o],i[s.charCodeAt(o)]=o;function l(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("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,a,s=[],o=t;o<n;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,s,o=8*i-r-1,u=(1<<o)-1,l=u>>1,c=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+e[t+d],d+=f,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=r;c>0;s=256*s+e[t+d],d+=f,c-=8);if(0===a)a=1-l;else{if(a===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),a-=l}return(p?-1:1)*s*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var s,o,u,l=8*a-i-1,c=(1<<l)-1,d=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,y=r?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0
@kendricktan
Copy link
Author

https://github.com/0mllwntrmt3 potential real name is Denis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment