!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["js-bigchaindb-driver"]=e():t["js-bigchaindb-driver"]=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=85)}([function(t,e,r){"use strict";(function(t){function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),o.alloc(+t)}function v(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return Y(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,f=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,f/=2,s/=2,r/=2}var u;if(i){var c=-1;for(u=r;uf&&(r=f-s),u=r;u>=0;u--){for(var h=!0,d=0;di&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+f<=r){var s,u,c,h;switch(f){case 1:o<128&&(a=o);break;case 2:128==(192&(s=t[i+1]))&&(h=(31&o)<<6|63&s)>127&&(a=h);break;case 3:s=t[i+1],u=t[i+2],128==(192&s)&&128==(192&u)&&(h=(15&o)<<12|(63&s)<<6|63&u)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:s=t[i+1],u=t[i+2],c=t[i+3],128==(192&s)&&128==(192&u)&&128==(192&c)&&(h=(15&o)<<18|(63&s)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(a=h)}}null===a?(a=65533,f=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=f}return B(n)}function B(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,i,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function U(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,i){return i||L(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,i){return i||L(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function F(t){if(t=q(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function q(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function K(t){return t<16?"0"+t.toString(16):t.toString(16)}function Y(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function H(t){return Z.toByteArray(F(t))}function X(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function W(t){return t!==t}var Z=r(42),J=r(73),$=r(74);e.Buffer=o,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,r){return a(null,t,e,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,r){return s(null,t,e,r)},o.allocUnsafe=function(t){return u(null,t)},o.allocUnsafeSlow=function(t){return u(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},o.prototype.compare=function(t,e,r,n,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var a=i-n,f=r-e,s=Math.min(a,f),u=this.slice(n,i),c=t.slice(e,r),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return M(this,t,e,r);case"ascii":return S(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return e||j(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||j(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||j(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||j(t,4,this.length),J.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||j(t,4,this.length),J.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||j(t,8,this.length),J.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||j(t,8,this.length),J.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):U(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):U(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=0,a=1,f=0;for(this[e]=255&t;++o>0)-f&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=r-1,a=1,f=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===f&&0!==this[e+o+1]&&(f=1),this[e+o]=(t/a>>0)-f&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):U(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):U(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var a;if("number"==typeof t)for(a=e;a=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function b(e){return+e!=e&&(e=0),t.alloc(+e)}function v(e,r){if(t.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 i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(i)return Y(e).length;r=(""+r).toLowerCase(),i=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:w(e,r,n,i,o);if("number"==typeof r)return r&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):w(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,f=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,f/=2,s/=2,r/=2}var u;if(i){var c=-1;for(u=r;uf&&(r=f-s),u=r;u>=0;u--){for(var h=!0,d=0;di&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+f<=r){var s,u,c,h;switch(f){case 1:o<128&&(a=o);break;case 2:128==(192&(s=t[i+1]))&&(h=(31&o)<<6|63&s)>127&&(a=h);break;case 3:s=t[i+1],u=t[i+2],128==(192&s)&&128==(192&u)&&(h=(15&o)<<12|(63&s)<<6|63&u)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:s=t[i+1],u=t[i+2],c=t[i+3],128==(192&s)&&128==(192&u)&&128==(192&c)&&(h=(15&o)<<18|(63&s)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(a=h)}}null===a?(a=65533,f=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=f}return B(n)}function B(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function C(e,r,n,i,o,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||re.length)throw new RangeError("Index out of range")}function U(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,i){return i||L(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,i){return i||L(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function F(t){if(t=q(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function q(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function K(t){return t<16?"0"+t.toString(16):t.toString(16)}function Y(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function H(t){return Z.toByteArray(F(t))}function X(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function W(t){return t!==t}var Z=r(490),J=r(491),$=r(492);e.Buffer=t,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=i(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return a(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return s(null,t,e,r)},t.allocUnsafe=function(t){return u(null,t)},t.allocUnsafeSlow=function(t){return u(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,a=Math.min(n,i);o0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,f=n-r,s=Math.min(a,f),u=this.slice(i,o),c=e.slice(r,n),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return M(this,t,e,r);case"ascii":return S(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),r<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||j(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||j(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||j(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||j(t,4,this.length),J.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||j(t,4,this.length),J.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||j(t,8,this.length),J.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||j(t,8,this.length),J.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):U(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):U(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):N(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=0,a=1,f=0;for(this[e]=255&t;++o>0)-f&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=r-1,a=1,f=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===f&&0!==this[e+o+1]&&(f=1),this[e+o]=(t/a>>0)-f&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):U(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):U(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):N(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r|=0,n||C(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r=0;--o)e[o+r]=this[o+n];else if(a<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=r;a0?i(n(t),9007199254740991):0}},function(t,e,r){var n=r(24);t.exports=function(t){return Object(n(t))}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){var n=r(9),i=r(37);t.exports=r(8)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(4),i=r(14),o=r(12),a=r(48)("src"),f="toString",s=Function[f],u=(""+s).split(f);r(32).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,r,f){var s="function"==typeof r;s&&(o(r,"name")||i(r,"name",e)),t[e]!==r&&(s&&(o(r,a)||i(r,a,t[e]?""+t[e]:u.join(String(e)))),t===n?t[e]=r:f?t[e]?t[e]=r:i(t,e,r):(delete t[e],i(t,e,r)))})(Function.prototype,f,function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,r){var n=r(0),i=r(5),o=r(24),a=function(t,e,r,n){var i=String(o(t)),a="<"+e;return""!==r&&(a+=" "+r+'="'+String(n).replace(/"/g,""")+'"'),a+">"+i+""};t.exports=function(t,e){var r={};r[t]=e(a),n(n.P+n.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",r)}},function(t,e,r){var n=r(65),i=r(24);t.exports=function(t){return n(i(t))}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){return o.isBN(t)?t:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))))}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?f-49+10:f>=17?f-17+10:f}return i}function s(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,f=67108863&a,s=a/67108864|0;r.words[0]=f;for(var u=1;u>>26,h=67108863&s,d=Math.min(u,e.length-1),l=Math.max(0,u-t.length+1);l<=d;l++){var p=u-l|0;i=0|t.words[p],o=0|e.words[l],a=i*o+h,c+=a/67108864|0,h=67108863&a}r.words[u]=0|h,s=0|c}return 0!==s?r.words[u]=0|s:r.length--,r.strip()}function c(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0,i+=a>>>26,a&=67108863}r.words[o]=f,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function h(t,e,r){return(new d).mulp(t,e,r)}function d(t,e){this.x=t,this.y=e}function l(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){l.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){l.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){l.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function y(){l.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function m(t){g.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;var w;try{w=r(1).Buffer}catch(t){}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-f&67108863,(f+=24)>=26&&(f-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-f&67108863,(f+=24)>=26&&(f-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var _=["","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"],M=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,r=0!==o||a!==this.length-1?_[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=M[t],c=S[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var d=h.modn(c).toString(t);h=h.idivn(c),r=h.isZero()?d+r:_[u-d.length]+d+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==w),this.toArrayLike(w,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,f,s="le"===e,u=new t(o),c=this.clone();if(s){for(f=0;!c.isZero();f++)a=c.andln(255),c.iushrn(8),u[f]=a;for(;f=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,l=0|a[1],p=8191&l,b=l>>>13,v=0|a[2],y=8191&v,g=v>>>13,m=0|a[3],w=8191&m,_=m>>>13,M=0|a[4],S=8191&M,E=M>>>13,A=0|a[5],x=8191&A,k=A>>>13,I=0|a[6],B=8191&I,O=I>>>13,R=0|a[7],P=8191&R,T=R>>>13,j=0|a[8],C=8191&j,U=j>>>13,N=0|a[9],L=8191&N,D=N>>>13,z=0|f[0],F=8191&z,q=z>>>13,K=0|f[1],Y=8191&K,G=K>>>13,V=0|f[2],H=8191&V,X=V>>>13,W=0|f[3],Z=8191&W,J=W>>>13,$=0|f[4],Q=8191&$,tt=$>>>13,et=0|f[5],rt=8191&et,nt=et>>>13,it=0|f[6],ot=8191&it,at=it>>>13,ft=0|f[7],st=8191&ft,ut=ft>>>13,ct=0|f[8],ht=8191&ct,dt=ct>>>13,lt=0|f[9],pt=8191<,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,F),i=Math.imul(h,q),i=i+Math.imul(d,F)|0,o=Math.imul(d,q);var vt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(p,F),i=Math.imul(p,q),i=i+Math.imul(b,F)|0,o=Math.imul(b,q),n=n+Math.imul(h,Y)|0,i=i+Math.imul(h,G)|0,i=i+Math.imul(d,Y)|0,o=o+Math.imul(d,G)|0;var yt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,F),i=Math.imul(y,q),i=i+Math.imul(g,F)|0,o=Math.imul(g,q),n=n+Math.imul(p,Y)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(b,Y)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(h,H)|0,i=i+Math.imul(h,X)|0,i=i+Math.imul(d,H)|0,o=o+Math.imul(d,X)|0;var gt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,F),i=Math.imul(w,q),i=i+Math.imul(_,F)|0,o=Math.imul(_,q),n=n+Math.imul(y,Y)|0,i=i+Math.imul(y,G)|0,i=i+Math.imul(g,Y)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(p,H)|0,i=i+Math.imul(p,X)|0,i=i+Math.imul(b,H)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,J)|0,i=i+Math.imul(d,Z)|0,o=o+Math.imul(d,J)|0;var mt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(S,F),i=Math.imul(S,q),i=i+Math.imul(E,F)|0,o=Math.imul(E,q),n=n+Math.imul(w,Y)|0,i=i+Math.imul(w,G)|0,i=i+Math.imul(_,Y)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(y,H)|0,i=i+Math.imul(y,X)|0,i=i+Math.imul(g,H)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,J)|0,i=i+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,F),i=Math.imul(x,q),i=i+Math.imul(k,F)|0,o=Math.imul(k,q),n=n+Math.imul(S,Y)|0,i=i+Math.imul(S,G)|0,i=i+Math.imul(E,Y)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,H)|0,i=i+Math.imul(w,X)|0,i=i+Math.imul(_,H)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(y,Z)|0,i=i+Math.imul(y,J)|0,i=i+Math.imul(g,Z)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(d,rt)|0,o=o+Math.imul(d,nt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(B,F),i=Math.imul(B,q),i=i+Math.imul(O,F)|0,o=Math.imul(O,q),n=n+Math.imul(x,Y)|0,i=i+Math.imul(x,G)|0,i=i+Math.imul(k,Y)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(S,H)|0,i=i+Math.imul(S,X)|0,i=i+Math.imul(E,H)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,J)|0,i=i+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(y,Q)|0,i=i+Math.imul(y,tt)|0,i=i+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(h,ot)|0,i=i+Math.imul(h,at)|0,i=i+Math.imul(d,ot)|0,o=o+Math.imul(d,at)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,F),i=Math.imul(P,q),i=i+Math.imul(T,F)|0,o=Math.imul(T,q),n=n+Math.imul(B,Y)|0,i=i+Math.imul(B,G)|0,i=i+Math.imul(O,Y)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,H)|0,i=i+Math.imul(x,X)|0,i=i+Math.imul(k,H)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(S,Z)|0,i=i+Math.imul(S,J)|0,i=i+Math.imul(E,Z)|0,o=o+Math.imul(E,J)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,tt)|0,i=i+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=i+Math.imul(y,nt)|0,i=i+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=i+Math.imul(p,at)|0,i=i+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(h,st)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(d,st)|0,o=o+Math.imul(d,ut)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(C,F),i=Math.imul(C,q),i=i+Math.imul(U,F)|0,o=Math.imul(U,q),n=n+Math.imul(P,Y)|0,i=i+Math.imul(P,G)|0,i=i+Math.imul(T,Y)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(B,H)|0,i=i+Math.imul(B,X)|0,i=i+Math.imul(O,H)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(x,Z)|0,i=i+Math.imul(x,J)|0,i=i+Math.imul(k,Z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(S,Q)|0,i=i+Math.imul(S,tt)|0,i=i+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=i+Math.imul(w,nt)|0,i=i+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=i+Math.imul(y,at)|0,i=i+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,st)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(b,st)|0,o=o+Math.imul(b,ut)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,dt)|0,i=i+Math.imul(d,ht)|0,o=o+Math.imul(d,dt)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,F),i=Math.imul(L,q),i=i+Math.imul(D,F)|0,o=Math.imul(D,q),n=n+Math.imul(C,Y)|0,i=i+Math.imul(C,G)|0,i=i+Math.imul(U,Y)|0,o=o+Math.imul(U,G)|0,n=n+Math.imul(P,H)|0,i=i+Math.imul(P,X)|0,i=i+Math.imul(T,H)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(B,Z)|0,i=i+Math.imul(B,J)|0,i=i+Math.imul(O,Z)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(x,Q)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(S,rt)|0,i=i+Math.imul(S,nt)|0,i=i+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=i+Math.imul(w,at)|0,i=i+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(y,st)|0,i=i+Math.imul(y,ut)|0,i=i+Math.imul(g,st)|0,o=o+Math.imul(g,ut)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,dt)|0,i=i+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,bt)|0,i=i+Math.imul(d,pt)|0,o=o+Math.imul(d,bt)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,Y),i=Math.imul(L,G),i=i+Math.imul(D,Y)|0,o=Math.imul(D,G),n=n+Math.imul(C,H)|0,i=i+Math.imul(C,X)|0,i=i+Math.imul(U,H)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(P,Z)|0,i=i+Math.imul(P,J)|0,i=i+Math.imul(T,Z)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(B,Q)|0,i=i+Math.imul(B,tt)|0,i=i+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(S,ot)|0,i=i+Math.imul(S,at)|0,i=i+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,st)|0,i=i+Math.imul(w,ut)|0,i=i+Math.imul(_,st)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(y,ht)|0,i=i+Math.imul(y,dt)|0,i=i+Math.imul(g,ht)|0,o=o+Math.imul(g,dt)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,bt)|0,i=i+Math.imul(b,pt)|0,o=o+Math.imul(b,bt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,H),i=Math.imul(L,X),i=i+Math.imul(D,H)|0,o=Math.imul(D,X),n=n+Math.imul(C,Z)|0,i=i+Math.imul(C,J)|0,i=i+Math.imul(U,Z)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(P,Q)|0,i=i+Math.imul(P,tt)|0,i=i+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(B,rt)|0,i=i+Math.imul(B,nt)|0,i=i+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(x,ot)|0,i=i+Math.imul(x,at)|0,i=i+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(S,st)|0,i=i+Math.imul(S,ut)|0,i=i+Math.imul(E,st)|0,o=o+Math.imul(E,ut)|0,n=n+Math.imul(w,ht)|0,i=i+Math.imul(w,dt)|0,i=i+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0,n=n+Math.imul(y,pt)|0,i=i+Math.imul(y,bt)|0,i=i+Math.imul(g,pt)|0,o=o+Math.imul(g,bt)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,Z),i=Math.imul(L,J),i=i+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(C,Q)|0,i=i+Math.imul(C,tt)|0,i=i+Math.imul(U,Q)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(P,rt)|0,i=i+Math.imul(P,nt)|0,i=i+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(B,ot)|0,i=i+Math.imul(B,at)|0,i=i+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,n=n+Math.imul(x,st)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(k,st)|0,o=o+Math.imul(k,ut)|0,n=n+Math.imul(S,ht)|0,i=i+Math.imul(S,dt)|0,i=i+Math.imul(E,ht)|0,o=o+Math.imul(E,dt)|0,n=n+Math.imul(w,pt)|0,i=i+Math.imul(w,bt)|0,i=i+Math.imul(_,pt)|0,o=o+Math.imul(_,bt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=Math.imul(L,tt),i=i+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(C,rt)|0,i=i+Math.imul(C,nt)|0,i=i+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(P,ot)|0,i=i+Math.imul(P,at)|0,i=i+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(B,st)|0,i=i+Math.imul(B,ut)|0,i=i+Math.imul(O,st)|0,o=o+Math.imul(O,ut)|0,n=n+Math.imul(x,ht)|0,i=i+Math.imul(x,dt)|0,i=i+Math.imul(k,ht)|0,o=o+Math.imul(k,dt)|0,n=n+Math.imul(S,pt)|0,i=i+Math.imul(S,bt)|0,i=i+Math.imul(E,pt)|0,o=o+Math.imul(E,bt)|0;var Bt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,rt),i=Math.imul(L,nt),i=i+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(C,ot)|0,i=i+Math.imul(C,at)|0,i=i+Math.imul(U,ot)|0,o=o+Math.imul(U,at)|0,n=n+Math.imul(P,st)|0,i=i+Math.imul(P,ut)|0,i=i+Math.imul(T,st)|0,o=o+Math.imul(T,ut)|0,n=n+Math.imul(B,ht)|0,i=i+Math.imul(B,dt)|0,i=i+Math.imul(O,ht)|0,o=o+Math.imul(O,dt)|0,n=n+Math.imul(x,pt)|0,i=i+Math.imul(x,bt)|0,i=i+Math.imul(k,pt)|0,o=o+Math.imul(k,bt)|0;var Ot=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ot),i=Math.imul(L,at),i=i+Math.imul(D,ot)|0,o=Math.imul(D,at),n=n+Math.imul(C,st)|0,i=i+Math.imul(C,ut)|0,i=i+Math.imul(U,st)|0,o=o+Math.imul(U,ut)|0,n=n+Math.imul(P,ht)|0,i=i+Math.imul(P,dt)|0,i=i+Math.imul(T,ht)|0,o=o+Math.imul(T,dt)|0,n=n+Math.imul(B,pt)|0,i=i+Math.imul(B,bt)|0,i=i+Math.imul(O,pt)|0,o=o+Math.imul(O,bt)|0;var Rt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,st),i=Math.imul(L,ut),i=i+Math.imul(D,st)|0,o=Math.imul(D,ut),n=n+Math.imul(C,ht)|0,i=i+Math.imul(C,dt)|0,i=i+Math.imul(U,ht)|0,o=o+Math.imul(U,dt)|0,n=n+Math.imul(P,pt)|0,i=i+Math.imul(P,bt)|0,i=i+Math.imul(T,pt)|0,o=o+Math.imul(T,bt)|0;var Pt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ht),i=Math.imul(L,dt),i=i+Math.imul(D,ht)|0,o=Math.imul(D,dt),n=n+Math.imul(C,pt)|0,i=i+Math.imul(C,bt)|0,i=i+Math.imul(U,pt)|0,o=o+Math.imul(U,bt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,pt),i=Math.imul(L,bt),i=i+Math.imul(D,pt)|0,o=Math.imul(D,bt);var jt=(u+n|0)+((8191&i)<<13)|0;return u=(o+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,s[0]=vt,s[1]=yt,s[2]=gt,s[3]=mt,s[4]=wt,s[5]=_t,s[6]=Mt,s[7]=St,s[8]=Et,s[9]=At,s[10]=xt,s[11]=kt,s[12]=It,s[13]=Bt,s[14]=Ot,s[15]=Rt,s[16]=Pt,s[17]=Tt,s[18]=jt,0!==u&&(s[19]=u,r.length++),r};Math.imul||(E=u),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?E(this,t,e):r<63?u(this,t,e):r<1024?c(this,t,e):h(this,t,e)},d.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},d.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=s(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),f=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&f}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===f)return this.strip();for(n(-1===f),f=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var f,s=n.length-i.length;if("mod"!==e){f=new o(null),f.length=s+1,f.words=new Array(f.length);for(var u=0;u=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);f&&(f.words[h]=d)}return f&&f.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},o.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var i,a,f;return 0!==this.negative&&0===t.negative?(f=this.neg().divmod(t,e),"mod"!==e&&(i=f.div.neg()),"div"!==e&&(a=f.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(f=this.divmod(t.neg(),e),"mod"!==e&&(i=f.div.neg()),{div:i,mod:f.mod}):0!=(this.negative&t.negative)?(f=this.neg().divmod(t.neg(),e),"div"!==e&&(a=f.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:f.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),f=new o(0),s=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var d=0,l=1;0==(e.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(c),s.isub(h)),f.iushrn(1),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(f),a.isub(s)):(r.isub(e),f.isub(i),s.isub(a))}return{a:f,b:s,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),f=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var s=0,u=1;0==(e.words[0]&u)&&s<26;++s,u<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(f),i.iushrn(1);for(var c=0,h=1;0==(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a)):(r.isub(e),a.isub(i))}var d;return d=0===e.cmpn(1)?i:a,d.cmpn(0)<0&&d.iadd(t),d},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,f&=67108863,this.words[a]=f}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new g(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};l.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},l.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},l.prototype.split=function(t,e){t.iushrn(this.n,0,e)},l.prototype.imulK=function(t){return t.imul(this.k)},i(p,l),p.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return A[t]=e,e},g.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},g.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},g.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},g.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},g.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},g.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},g.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},g.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},g.prototype.isqr=function(t){return this.imul(t,t.clone())},g.prototype.sqr=function(t){return this.mul(t,t)},g.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var f=new o(1).toRed(this),s=f.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var h=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),p=a;0!==l.cmp(f);){for(var b=l,v=0;0!==b.cmp(f);v++)b=b.redSqr();n(v=0;n--){for(var u=e.words[n],c=s-1;c>=0;c--){var h=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++f||0===n&&0===c)&&(i=this.mul(i,r[a]),f=0,a=0)):f=0}s=26}return i},g.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},g.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new m(t)},i(m,g),m.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},m.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},m.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},m.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},m.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(e,r(92)(t))},function(t,e,r){"use strict";var n=e;n.version=r(465).version,n.utils=r(521),n.rand=r(522),n.hmacDRBG=r(519),n.curve=r(99),n.curves=r(512),n.ec=r(513),n.eddsa=r(516)},function(t,e,r){var n=r(66),i=r(37),o=r(17),a=r(29),f=r(12),s=r(174),u=Object.getOwnPropertyDescriptor;e.f=r(8)?u:function(t,e){if(t=o(t),e=a(e,!0),s)try{return u(t,e)}catch(t){}if(f(t,e))return i(!n.f.call(t,e),t[e])}},function(t,e,r){var n=r(12),i=r(11),o=r(133)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),n(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,r){"use strict";var n=e;n.version=r(467).version,n.utils=r(558),n.rand=r(559),n.hmacDRBG=r(556),n.curve=r(104),n.curves=r(549),n.ec=r(550),n.eddsa=r(553)},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(5);t.exports=function(t,e){return!!t&&n(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function a(){b&&l&&(b=!1,l.length?p=l.concat(p):v=-1,p.length&&f())}function f(){if(!b){var t=i(a);b=!0;for(var e=p.length;e;){for(l=p,p=[];++v1)for(var r=1;r_;_++)if((d||_ in g)&&(b=g[_],v=m(b,_,y),t))if(r)M[_]=v;else if(v)switch(t){case 3:return!0;case 5:return b;case 6:return _;case 2:M.push(b)}else if(c)return!1;return h?-1:u||c?c:M}}},function(t,e,r){var n=r(0),i=r(32),o=r(5);t.exports=function(t,e){var r=(i.Object||{})[t]||Object[t],a={};a[t]=e(r),n(n.S+n.F*o(function(){r(1)}),"Object",a)}},function(t,e,r){var n=r(6);t.exports=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){return o.isBN(t)?t:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))))}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?f-49+10:f>=17?f-17+10:f}return i}function s(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,f=67108863&a,s=a/67108864|0;r.words[0]=f;for(var u=1;u>>26,h=67108863&s,d=Math.min(u,e.length-1),l=Math.max(0,u-t.length+1);l<=d;l++){var p=u-l|0;i=0|t.words[p],o=0|e.words[l],a=i*o+h,c+=a/67108864|0,h=67108863&a}r.words[u]=0|h,s=0|c}return 0!==s?r.words[u]=0|s:r.length--,r.strip()}function c(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0,i+=a>>>26,a&=67108863}r.words[o]=f,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function h(t,e,r){return(new d).mulp(t,e,r)}function d(t,e){this.x=t,this.y=e}function l(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){l.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){l.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){l.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function y(){l.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function m(t){g.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;var w;try{w=r(1).Buffer}catch(t){}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-f&67108863,(f+=24)>=26&&(f-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-f&67108863,(f+=24)>=26&&(f-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var _=["","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"],M=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,r=0!==o||a!==this.length-1?_[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=M[t],c=S[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var d=h.modn(c).toString(t);h=h.idivn(c),r=h.isZero()?d+r:_[u-d.length]+d+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==w),this.toArrayLike(w,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,f,s="le"===e,u=new t(o),c=this.clone();if(s){for(f=0;!c.isZero();f++)a=c.andln(255),c.iushrn(8),u[f]=a;for(;f=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,l=0|a[1],p=8191&l,b=l>>>13,v=0|a[2],y=8191&v,g=v>>>13,m=0|a[3],w=8191&m,_=m>>>13,M=0|a[4],S=8191&M,E=M>>>13,A=0|a[5],x=8191&A,k=A>>>13,I=0|a[6],B=8191&I,O=I>>>13,R=0|a[7],P=8191&R,T=R>>>13,j=0|a[8],C=8191&j,U=j>>>13,N=0|a[9],L=8191&N,D=N>>>13,z=0|f[0],F=8191&z,q=z>>>13,K=0|f[1],Y=8191&K,G=K>>>13,V=0|f[2],H=8191&V,X=V>>>13,W=0|f[3],Z=8191&W,J=W>>>13,$=0|f[4],Q=8191&$,tt=$>>>13,et=0|f[5],rt=8191&et,nt=et>>>13,it=0|f[6],ot=8191&it,at=it>>>13,ft=0|f[7],st=8191&ft,ut=ft>>>13,ct=0|f[8],ht=8191&ct,dt=ct>>>13,lt=0|f[9],pt=8191<,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,F),i=Math.imul(h,q),i=i+Math.imul(d,F)|0,o=Math.imul(d,q);var vt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(p,F),i=Math.imul(p,q),i=i+Math.imul(b,F)|0,o=Math.imul(b,q),n=n+Math.imul(h,Y)|0,i=i+Math.imul(h,G)|0,i=i+Math.imul(d,Y)|0,o=o+Math.imul(d,G)|0;var yt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,F),i=Math.imul(y,q),i=i+Math.imul(g,F)|0,o=Math.imul(g,q),n=n+Math.imul(p,Y)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(b,Y)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(h,H)|0,i=i+Math.imul(h,X)|0,i=i+Math.imul(d,H)|0,o=o+Math.imul(d,X)|0;var gt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,F),i=Math.imul(w,q),i=i+Math.imul(_,F)|0,o=Math.imul(_,q),n=n+Math.imul(y,Y)|0,i=i+Math.imul(y,G)|0,i=i+Math.imul(g,Y)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(p,H)|0,i=i+Math.imul(p,X)|0,i=i+Math.imul(b,H)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,J)|0,i=i+Math.imul(d,Z)|0,o=o+Math.imul(d,J)|0;var mt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(S,F),i=Math.imul(S,q),i=i+Math.imul(E,F)|0,o=Math.imul(E,q),n=n+Math.imul(w,Y)|0,i=i+Math.imul(w,G)|0,i=i+Math.imul(_,Y)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(y,H)|0,i=i+Math.imul(y,X)|0,i=i+Math.imul(g,H)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,J)|0,i=i+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,F),i=Math.imul(x,q),i=i+Math.imul(k,F)|0,o=Math.imul(k,q),n=n+Math.imul(S,Y)|0,i=i+Math.imul(S,G)|0,i=i+Math.imul(E,Y)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,H)|0,i=i+Math.imul(w,X)|0,i=i+Math.imul(_,H)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(y,Z)|0,i=i+Math.imul(y,J)|0,i=i+Math.imul(g,Z)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(d,rt)|0,o=o+Math.imul(d,nt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(B,F),i=Math.imul(B,q),i=i+Math.imul(O,F)|0,o=Math.imul(O,q),n=n+Math.imul(x,Y)|0,i=i+Math.imul(x,G)|0,i=i+Math.imul(k,Y)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(S,H)|0,i=i+Math.imul(S,X)|0,i=i+Math.imul(E,H)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,J)|0,i=i+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(y,Q)|0,i=i+Math.imul(y,tt)|0,i=i+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(h,ot)|0,i=i+Math.imul(h,at)|0,i=i+Math.imul(d,ot)|0,o=o+Math.imul(d,at)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,F),i=Math.imul(P,q),i=i+Math.imul(T,F)|0,o=Math.imul(T,q),n=n+Math.imul(B,Y)|0,i=i+Math.imul(B,G)|0,i=i+Math.imul(O,Y)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(x,H)|0,i=i+Math.imul(x,X)|0,i=i+Math.imul(k,H)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(S,Z)|0,i=i+Math.imul(S,J)|0,i=i+Math.imul(E,Z)|0,o=o+Math.imul(E,J)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,tt)|0,i=i+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=i+Math.imul(y,nt)|0,i=i+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=i+Math.imul(p,at)|0,i=i+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(h,st)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(d,st)|0,o=o+Math.imul(d,ut)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(C,F),i=Math.imul(C,q),i=i+Math.imul(U,F)|0,o=Math.imul(U,q),n=n+Math.imul(P,Y)|0,i=i+Math.imul(P,G)|0,i=i+Math.imul(T,Y)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(B,H)|0,i=i+Math.imul(B,X)|0,i=i+Math.imul(O,H)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(x,Z)|0,i=i+Math.imul(x,J)|0,i=i+Math.imul(k,Z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(S,Q)|0,i=i+Math.imul(S,tt)|0,i=i+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=i+Math.imul(w,nt)|0,i=i+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=i+Math.imul(y,at)|0,i=i+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,st)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(b,st)|0,o=o+Math.imul(b,ut)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,dt)|0,i=i+Math.imul(d,ht)|0,o=o+Math.imul(d,dt)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,F),i=Math.imul(L,q),i=i+Math.imul(D,F)|0,o=Math.imul(D,q),n=n+Math.imul(C,Y)|0,i=i+Math.imul(C,G)|0,i=i+Math.imul(U,Y)|0,o=o+Math.imul(U,G)|0,n=n+Math.imul(P,H)|0,i=i+Math.imul(P,X)|0,i=i+Math.imul(T,H)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(B,Z)|0,i=i+Math.imul(B,J)|0,i=i+Math.imul(O,Z)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(x,Q)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(S,rt)|0,i=i+Math.imul(S,nt)|0,i=i+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=i+Math.imul(w,at)|0,i=i+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(y,st)|0,i=i+Math.imul(y,ut)|0,i=i+Math.imul(g,st)|0,o=o+Math.imul(g,ut)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,dt)|0,i=i+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,bt)|0,i=i+Math.imul(d,pt)|0,o=o+Math.imul(d,bt)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,Y),i=Math.imul(L,G),i=i+Math.imul(D,Y)|0,o=Math.imul(D,G),n=n+Math.imul(C,H)|0,i=i+Math.imul(C,X)|0,i=i+Math.imul(U,H)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(P,Z)|0,i=i+Math.imul(P,J)|0,i=i+Math.imul(T,Z)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(B,Q)|0,i=i+Math.imul(B,tt)|0,i=i+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(S,ot)|0,i=i+Math.imul(S,at)|0,i=i+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,st)|0,i=i+Math.imul(w,ut)|0,i=i+Math.imul(_,st)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(y,ht)|0,i=i+Math.imul(y,dt)|0,i=i+Math.imul(g,ht)|0,o=o+Math.imul(g,dt)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,bt)|0,i=i+Math.imul(b,pt)|0,o=o+Math.imul(b,bt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,H),i=Math.imul(L,X),i=i+Math.imul(D,H)|0,o=Math.imul(D,X),n=n+Math.imul(C,Z)|0,i=i+Math.imul(C,J)|0,i=i+Math.imul(U,Z)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(P,Q)|0,i=i+Math.imul(P,tt)|0,i=i+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(B,rt)|0,i=i+Math.imul(B,nt)|0,i=i+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(x,ot)|0,i=i+Math.imul(x,at)|0,i=i+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(S,st)|0,i=i+Math.imul(S,ut)|0,i=i+Math.imul(E,st)|0,o=o+Math.imul(E,ut)|0,n=n+Math.imul(w,ht)|0,i=i+Math.imul(w,dt)|0,i=i+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0,n=n+Math.imul(y,pt)|0,i=i+Math.imul(y,bt)|0,i=i+Math.imul(g,pt)|0,o=o+Math.imul(g,bt)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,Z),i=Math.imul(L,J),i=i+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(C,Q)|0,i=i+Math.imul(C,tt)|0,i=i+Math.imul(U,Q)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(P,rt)|0,i=i+Math.imul(P,nt)|0,i=i+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(B,ot)|0,i=i+Math.imul(B,at)|0,i=i+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,n=n+Math.imul(x,st)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(k,st)|0,o=o+Math.imul(k,ut)|0,n=n+Math.imul(S,ht)|0,i=i+Math.imul(S,dt)|0,i=i+Math.imul(E,ht)|0,o=o+Math.imul(E,dt)|0,n=n+Math.imul(w,pt)|0,i=i+Math.imul(w,bt)|0,i=i+Math.imul(_,pt)|0,o=o+Math.imul(_,bt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,Q),i=Math.imul(L,tt),i=i+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(C,rt)|0,i=i+Math.imul(C,nt)|0,i=i+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(P,ot)|0,i=i+Math.imul(P,at)|0,i=i+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(B,st)|0,i=i+Math.imul(B,ut)|0,i=i+Math.imul(O,st)|0,o=o+Math.imul(O,ut)|0,n=n+Math.imul(x,ht)|0,i=i+Math.imul(x,dt)|0,i=i+Math.imul(k,ht)|0,o=o+Math.imul(k,dt)|0,n=n+Math.imul(S,pt)|0,i=i+Math.imul(S,bt)|0,i=i+Math.imul(E,pt)|0,o=o+Math.imul(E,bt)|0;var Bt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,rt),i=Math.imul(L,nt),i=i+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(C,ot)|0,i=i+Math.imul(C,at)|0,i=i+Math.imul(U,ot)|0,o=o+Math.imul(U,at)|0,n=n+Math.imul(P,st)|0,i=i+Math.imul(P,ut)|0,i=i+Math.imul(T,st)|0,o=o+Math.imul(T,ut)|0,n=n+Math.imul(B,ht)|0,i=i+Math.imul(B,dt)|0,i=i+Math.imul(O,ht)|0,o=o+Math.imul(O,dt)|0,n=n+Math.imul(x,pt)|0,i=i+Math.imul(x,bt)|0,i=i+Math.imul(k,pt)|0,o=o+Math.imul(k,bt)|0;var Ot=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ot),i=Math.imul(L,at),i=i+Math.imul(D,ot)|0,o=Math.imul(D,at),n=n+Math.imul(C,st)|0,i=i+Math.imul(C,ut)|0,i=i+Math.imul(U,st)|0,o=o+Math.imul(U,ut)|0,n=n+Math.imul(P,ht)|0,i=i+Math.imul(P,dt)|0,i=i+Math.imul(T,ht)|0,o=o+Math.imul(T,dt)|0,n=n+Math.imul(B,pt)|0,i=i+Math.imul(B,bt)|0,i=i+Math.imul(O,pt)|0,o=o+Math.imul(O,bt)|0;var Rt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,st),i=Math.imul(L,ut),i=i+Math.imul(D,st)|0,o=Math.imul(D,ut),n=n+Math.imul(C,ht)|0,i=i+Math.imul(C,dt)|0,i=i+Math.imul(U,ht)|0,o=o+Math.imul(U,dt)|0,n=n+Math.imul(P,pt)|0,i=i+Math.imul(P,bt)|0,i=i+Math.imul(T,pt)|0,o=o+Math.imul(T,bt)|0;var Pt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ht),i=Math.imul(L,dt),i=i+Math.imul(D,ht)|0,o=Math.imul(D,dt),n=n+Math.imul(C,pt)|0,i=i+Math.imul(C,bt)|0,i=i+Math.imul(U,pt)|0,o=o+Math.imul(U,bt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,pt),i=Math.imul(L,bt),i=i+Math.imul(D,pt)|0,o=Math.imul(D,bt);var jt=(u+n|0)+((8191&i)<<13)|0;return u=(o+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,s[0]=vt,s[1]=yt,s[2]=gt,s[3]=mt,s[4]=wt,s[5]=_t,s[6]=Mt,s[7]=St,s[8]=Et,s[9]=At,s[10]=xt,s[11]=kt,s[12]=It,s[13]=Bt,s[14]=Ot,s[15]=Rt,s[16]=Pt,s[17]=Tt,s[18]=jt,0!==u&&(s[19]=u,r.length++),r};Math.imul||(E=u),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?E(this,t,e):r<63?u(this,t,e):r<1024?c(this,t,e):h(this,t,e)},d.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},d.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=s(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),f=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&f}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===f)return this.strip();for(n(-1===f),f=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var f,s=n.length-i.length;if("mod"!==e){f=new o(null),f.length=s+1,f.words=new Array(f.length);for(var u=0;u=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);f&&(f.words[h]=d)}return f&&f.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},o.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var i,a,f;return 0!==this.negative&&0===t.negative?(f=this.neg().divmod(t,e),"mod"!==e&&(i=f.div.neg()),"div"!==e&&(a=f.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(f=this.divmod(t.neg(),e),"mod"!==e&&(i=f.div.neg()),{div:i,mod:f.mod}):0!=(this.negative&t.negative)?(f=this.neg().divmod(t.neg(),e),"div"!==e&&(a=f.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:f.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),f=new o(0),s=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var d=0,l=1;0==(e.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(c),s.isub(h)),f.iushrn(1),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(f),a.isub(s)):(r.isub(e),f.isub(i),s.isub(a))}return{a:f,b:s,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),f=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var s=0,u=1;0==(e.words[0]&u)&&s<26;++s,u<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(f),i.iushrn(1);for(var c=0,h=1;0==(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a)):(r.isub(e),a.isub(i))}var d;return d=0===e.cmpn(1)?i:a,d.cmpn(0)<0&&d.iadd(t),d},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,f&=67108863,this.words[a]=f}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new g(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};l.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},l.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},l.prototype.split=function(t,e){t.iushrn(this.n,0,e)},l.prototype.imulK=function(t){return t.imul(this.k)},i(p,l),p.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return A[t]=e,e},g.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},g.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},g.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},g.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},g.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},g.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},g.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},g.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},g.prototype.isqr=function(t){return this.imul(t,t.clone())},g.prototype.sqr=function(t){return this.mul(t,t)},g.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var f=new o(1).toRed(this),s=f.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var h=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),p=a;0!==l.cmp(f);){for(var b=l,v=0;0!==b.cmp(f);v++)b=b.redSqr();n(v=0;n--){for(var u=e.words[n],c=s-1;c>=0;c--){var h=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++f||0===n&&0===c)&&(i=this.mul(i,r[a]),f=0,a=0)):f=0}s=26}return i},g.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},g.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new m(t)},i(m,g),m.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},m.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},m.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},m.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},m.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(e,r(92)(t))},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(110).EventEmitter;r(603)(n,i),n.Readable=r(600),n.Writable=r(602),n.Duplex=r(595),n.Transform=r(601),n.PassThrough=r(599),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){c||(c=!0,t.end())}function a(){c||(c=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(s(),0===i.listenerCount(this,"error"))throw t}function s(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",a),u.removeListener("error",f),t.removeListener("error",f),u.removeListener("end",s),u.removeListener("close",s),t.removeListener("close",s)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&!1===e.end||(u.on("end",o),u.on("close",a));var c=!1;return u.on("error",f),t.on("error",f),u.on("end",s),u.on("close",s),t.on("close",s),t.emit("pipe",u),t}},function(t,e){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,e,r){var n=r(13);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(190),i=r(0),o=r(87)("metadata"),a=o.store||(o.store=new(r(193))),f=function(t,e,r){var i=a.get(t);if(!i){if(!r)return;a.set(t,i=new n)}var o=i.get(e);if(!o){if(!r)return;i.set(e,o=new n)}return o},s=function(t,e,r){var n=f(e,r,!1);return void 0!==n&&n.has(t)},u=function(t,e,r){var n=f(e,r,!1);return void 0===n?void 0:n.get(t)},c=function(t,e,r,n){f(r,n,!0).set(t,e)},h=function(t,e){var r=f(t,e,!1),n=[];return r&&r.forEach(function(t,e){n.push(e)}),n},d=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},l=function(t){i(i.S,"Reflect",t)};t.exports={store:a,map:f,has:s,get:u,set:c,keys:h,key:d,exp:l}},function(t,e,r){"use strict";if(r(8)){var n=r(41),i=r(4),o=r(5),a=r(0),f=r(88),s=r(140),u=r(33),c=r(40),h=r(37),d=r(14),l=r(45),p=r(38),b=r(10),v=r(47),y=r(29),g=r(12),m=r(187),w=r(64),_=r(6),M=r(11),S=r(125),E=r(42),A=r(21),x=r(43).f,k=r(142),I=r(48),B=r(7),O=r(27),R=r(78),P=r(134),T=r(143),j=r(56),C=r(84),U=r(46),N=r(118),L=r(167),D=r(9),z=r(20),F=D.f,q=z.f,K=i.RangeError,Y=i.TypeError,G=i.Uint8Array,V="ArrayBuffer",H="Shared"+V,X="BYTES_PER_ELEMENT",W="prototype",Z=Array[W],J=s.ArrayBuffer,$=s.DataView,Q=O(0),tt=O(2),et=O(3),rt=O(4),nt=O(5),it=O(6),ot=R(!0),at=R(!1),ft=T.values,st=T.keys,ut=T.entries,ct=Z.lastIndexOf,ht=Z.reduce,dt=Z.reduceRight,lt=Z.join,pt=Z.sort,bt=Z.slice,vt=Z.toString,yt=Z.toLocaleString,gt=B("iterator"),mt=B("toStringTag"),wt=I("typed_constructor"),_t=I("def_constructor"),Mt=f.CONSTR,St=f.TYPED,Et=f.VIEW,At="Wrong length!",xt=O(1,function(t,e){return Pt(P(t,t[_t]),e)}),kt=o(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),It=!!G&&!!G[W].set&&o(function(){new G(1).set({})}),Bt=function(t,e){if(void 0===t)throw Y(At);var r=+t,n=b(t);if(e&&!m(r,n))throw K(At);return n},Ot=function(t,e){var r=p(t);if(r<0||r%e)throw K("Wrong offset!");return r},Rt=function(t){if(_(t)&&St in t)return t;throw Y(t+" is not a typed array!")},Pt=function(t,e){if(!(_(t)&&wt in t))throw Y("It is not a typed array constructor!");return new t(e)},Tt=function(t,e){return jt(P(t,t[_t]),e)},jt=function(t,e){for(var r=0,n=e.length,i=Pt(t,n);n>r;)i[r]=e[r++];return i},Ct=function(t,e,r){F(t,e,{get:function(){return this._d[r]}})},Ut=function(t){var e,r,n,i,o,a,f=M(t),s=arguments.length,c=s>1?arguments[1]:void 0,h=void 0!==c,d=k(f);if(void 0!=d&&!S(d)){for(a=d.call(f),n=[],e=0;!(o=a.next()).done;e++)n.push(o.value);f=n}for(h&&s>2&&(c=u(c,arguments[2],2)),e=0,r=b(f.length),i=Pt(this,r);r>e;e++)i[e]=h?c(f[e],e):f[e];return i},Nt=function(){for(var t=0,e=arguments.length,r=Pt(this,e);e>t;)r[t]=arguments[t++];return r},Lt=!!G&&o(function(){yt.call(new G(1))}),Dt=function(){return yt.apply(Lt?bt.call(Rt(this)):Rt(this),arguments)},zt={copyWithin:function(t,e){return L.call(Rt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return rt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(Rt(this),arguments)},filter:function(t){return Tt(this,tt(Rt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return nt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return it(Rt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Rt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Rt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(Rt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return lt.apply(Rt(this),arguments)},lastIndexOf:function(t){return ct.apply(Rt(this),arguments)},map:function(t){return xt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ht.apply(Rt(this),arguments)},reduceRight:function(t){return dt.apply(Rt(this),arguments)},reverse:function(){for(var t,e=this,r=Rt(e).length,n=Math.floor(r/2),i=0;i1?arguments[1]:void 0)},sort:function(t){return pt.call(Rt(this),t)},subarray:function(t,e){var r=Rt(this),n=r.length,i=v(t,n);return new(P(r,r[_t]))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,b((void 0===e?n:v(e,n))-i))}},Ft=function(t,e){return Tt(this,bt.call(Rt(this),t,e))},qt=function(t){Rt(this);var e=Ot(arguments[1],1),r=this.length,n=M(t),i=b(n.length),o=0;if(i+e>r)throw K(At);for(;o255?255:255&n),i.v[p](r*e+i.o,n,kt)},B=function(t,e){F(t,e,{get:function(){return k(this,e)},set:function(t){return I(this,e,t)},enumerable:!0})};m?(v=r(function(t,r,n,i){c(t,v,u,"_d");var o,a,f,s,h=0,l=0;if(_(r)){if(!(r instanceof J||(s=w(r))==V||s==H))return St in r?jt(v,r):Ut.call(v,r);o=r,l=Ot(n,e);var p=r.byteLength;if(void 0===i){if(p%e)throw K(At);if((a=p-l)<0)throw K(At)}else if((a=b(i)*e)+l>p)throw K(At);f=a/e}else f=Bt(r,!0),a=f*e,o=new J(a);for(d(t,"_d",{b:o,o:l,l:a,e:f,v:new $(o)});h0?n:r)(t)}},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e){t.exports=!1},function(t,e,r){var n=r(3),i=r(180),o=r(121),a=r(133)("IE_PROTO"),f=function(){},s="prototype",u=function(){var t,e=r(120)("iframe"),n=o.length;for(e.style.display="none",r(123).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("