From 0803f8eb4660e73c233969591c36e6309fb212a7 Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 15 Aug 2018 11:49:42 -0400 Subject: [PATCH] webpack polyfill --- dist/index.js | 10 +++++----- package.json | 1 + src/index.js | 1 + webpack.config.js | 2 +- yarn.lock | 11 +++++++++-- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0de1460..de0f0d1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,16 +1,16 @@ -module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=127)}([function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";(function(t){ +module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=238)}([function(t,e,n){var r=n(5),i=n(13),o=n(22),a=n(19),s=n(34),u=function(t,e,n){var c,f,h,l,d=t&u.F,p=t&u.G,m=t&u.S,v=t&u.P,g=t&u.B,y=p?r:m?r[e]||(r[e]={}):(r[e]||{}).prototype,b=p?i:i[e]||(i[e]={}),_=b.prototype||(b.prototype={});for(c in p&&(n=e),n)h=((f=!d&&y&&void 0!==y[c])?y:n)[c],l=g&&f?s(h,r):v&&"function"==typeof h?s(Function.call,h):h,y&&a(y,c,h,t&u.U),b[c]!=h&&o(b,c,l),v&&_[c]!=h&&(_[c]=h)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var n=r(167),i=r(168),o=r(70);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.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 z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(t).length;default:if(n)return z(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(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=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var o,a=1,s=t.length,u=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,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var h=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,l=0;li&&(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;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(h=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,f=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=f}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return E(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.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 o=i-n,a=r-e,s=Math.min(o,a),c=this.slice(n,i),h=t.slice(e,r),f=0;fi)&&(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 b(this,t,e,r);case"utf8":case"utf-8":return y(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return M(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}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function E(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,i,o){if(!u.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 I(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 R(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 j(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 B(t,e,r,n,o){return o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||O(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},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},u.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(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&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 D(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(4))},function(t,e,r){var n=r(1),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(256).Buffer}catch(t){}function s(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 u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(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,c=0,h=r;h1&&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 c=["","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"],h=[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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(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,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(t=t||10,e=0|e||1,16===t||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+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 l=h[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+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!==a),this.toArrayLike(a,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,s,u="le"===e,c=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),c[s]=a;for(;s=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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,b=v>>>13,y=0|a[3],_=8191&y,w=y>>>13,M=0|a[4],x=8191&M,k=M>>>13,S=0|a[5],A=8191&S,E=S>>>13,T=0|a[6],C=8191&T,P=T>>>13,N=0|a[7],O=8191&N,I=N>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,q=L>>>13,z=0|s[0],D=8191&z,F=z>>>13,H=0|s[1],G=8191&H,K=H>>>13,W=0|s[2],V=8191&W,Z=W>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ht=0|s[8],ft=8191&ht,lt=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,D)|0))<<13)|0;c=((o=Math.imul(l,F))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,F))+Math.imul(m,D)|0,o=Math.imul(m,F);var gt=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,D),i=(i=Math.imul(g,F))+Math.imul(b,D)|0,o=Math.imul(b,F),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(_,D),i=(i=Math.imul(_,F))+Math.imul(w,D)|0,o=Math.imul(w,F),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,D),i=(i=Math.imul(x,F))+Math.imul(k,D)|0,o=Math.imul(k,F),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,F))+Math.imul(E,D)|0,o=Math.imul(E,F),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(C,D),i=(i=Math.imul(C,F))+Math.imul(P,D)|0,o=Math.imul(P,F),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,D),i=(i=Math.imul(O,F))+Math.imul(I,D)|0,o=Math.imul(I,F),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,D),i=(i=Math.imul(j,F))+Math.imul(B,D)|0,o=Math.imul(B,F),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,F))+Math.imul(q,D)|0,o=Math.imul(q,F),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,K))+Math.imul(q,G)|0,o=Math.imul(q,K),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(g,ft)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var At=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,Z))+Math.imul(q,V)|0,o=Math.imul(q,Z),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(q,$)|0,o=Math.imul(q,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var Tt=(c+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(j,rt)|0,i=(i=i+Math.imul(j,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(q,ot)|0,o=Math.imul(q,at),n=n+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,lt)|0;var Nt=(c+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(q,ut)|0,o=Math.imul(q,ct),n=n+Math.imul(j,ft)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,lt))+Math.imul(q,ft)|0,o=Math.imul(q,lt);var It=(c+(n=n+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(q,pt)|0))<<13)|0;return c=((o=Math.imul(q,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=bt,u[3]=yt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=kt,u[9]=St,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Nt,u[16]=Ot,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(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)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.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=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&s}return u&&0!==h&&(u.words[u.length++]=h),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)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;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 s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=l)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},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,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(e.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},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,s&=67108863,this.words[a]=s}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,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=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 M(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 v={k256:null,p224:null,p192:null,p25519:null};function g(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 b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(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 x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.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(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.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")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.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)},M.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},M.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)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.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 s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();n(v=0;n--){for(var c=e.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===h)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.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)},x.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)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(14)(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,r){var n;(function(){var r=this,i=r._,o=Array.prototype,a=Object.prototype,s=Function.prototype,u=o.push,c=o.slice,h=a.toString,f=a.hasOwnProperty,l=Array.isArray,d=Object.keys,p=s.bind,m=Object.create,v=function(){},g=function(t){return t instanceof g?t:this instanceof g?void(this._wrapped=t):new g(t)};void 0!==t&&t.exports&&(e=t.exports=g),e._=g,g.VERSION="1.8.3";var b=function(t,e,r){if(void 0===e)return t;switch(null==r?3: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)};case 4:return function(r,n,i,o){return t.call(e,r,n,i,o)}}return function(){return t.apply(e,arguments)}},y=function(t,e,r){return null==t?g.identity:g.isFunction(t)?b(t,e,r):g.isObject(t)?g.matcher(t):g.property(t)};g.iteratee=function(t,e){return y(t,e,1/0)};var _=function(t,e){return function(r){var n=arguments.length;if(n<2||null==r)return r;for(var i=1;i=0&&e<=x};function A(t){return function(e,r,n,i){r=b(r,i,4);var o=!S(e)&&g.keys(e),a=(o||e).length,s=t>0?0:a-1;return arguments.length<3&&(n=e[o?o[s]:s],s+=t),function(e,r,n,i,o,a){for(;o>=0&&o=0},g.invoke=function(t,e){var r=c.call(arguments,2),n=g.isFunction(e);return g.map(t,function(t){var i=n?e:t[e];return null==i?i:i.apply(t,r)})},g.pluck=function(t,e){return g.map(t,g.property(e))},g.where=function(t,e){return g.filter(t,g.matcher(e))},g.findWhere=function(t,e){return g.find(t,g.matcher(e))},g.max=function(t,e,r){var n,i,o=-1/0,a=-1/0;if(null==e&&null!=t)for(var s=0,u=(t=S(t)?t:g.values(t)).length;so&&(o=n);else e=y(e,r),g.each(t,function(t,r,n){((i=e(t,r,n))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},g.min=function(t,e,r){var n,i,o=1/0,a=1/0;if(null==e&&null!=t)for(var s=0,u=(t=S(t)?t:g.values(t)).length;sn||void 0===r)return 1;if(r0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(r&&o&&s)return n[o=r(n,i)]===i?o:-1;if(i!=i)return(o=e(c.call(n,a,s),g.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&oe?(a&&(clearTimeout(a),a=null),s=c,o=t.apply(n,i),a||(n=i=null)):a||!1===r.trailing||(a=setTimeout(u,h)),o}},g.debounce=function(t,e,r){var n,i,o,a,s,u=function(){var c=g.now()-a;c=0?n=setTimeout(u,e-c):(n=null,r||(s=t.apply(o,i),n||(o=i=null)))};return function(){o=this,i=arguments,a=g.now();var c=r&&!n;return n||(n=setTimeout(u,e)),c&&(s=t.apply(o,i),o=i=null),s}},g.wrap=function(t,e){return g.partial(e,t)},g.negate=function(t){return function(){return!t.apply(this,arguments)}},g.compose=function(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}},g.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},g.before=function(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}},g.once=g.partial(g.before,2);var O=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function R(t,e){var r=I.length,n=t.constructor,i=g.isFunction(n)&&n.prototype||a,o="constructor";for(g.has(t,o)&&!g.contains(e,o)&&e.push(o);r--;)(o=I[r])in t&&t[o]!==i[o]&&!g.contains(e,o)&&e.push(o)}g.keys=function(t){if(!g.isObject(t))return[];if(d)return d(t);var e=[];for(var r in t)g.has(t,r)&&e.push(r);return O&&R(t,e),e},g.allKeys=function(t){if(!g.isObject(t))return[];var e=[];for(var r in t)e.push(r);return O&&R(t,e),e},g.values=function(t){for(var e=g.keys(t),r=e.length,n=Array(r),i=0;i":">",'"':""","'":"'","`":"`"},L=g.invert(B),U=function(t){var e=function(e){return t[e]},r="(?:"+g.keys(t).join("|")+")",n=RegExp(r),i=RegExp(r,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(i,e):t}};g.escape=U(B),g.unescape=U(L),g.result=function(t,e,r){var n=null==t?void 0:t[e];return void 0===n&&(n=r),g.isFunction(n)?n.call(t):n};var q=0;g.uniqueId=function(t){var e=++q+"";return t?t+e:e},g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var z=/(.)^/,D={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},F=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+D[t]};g.template=function(t,e,r){!e&&r&&(e=r),e=g.defaults({},e,g.templateSettings);var n=RegExp([(e.escape||z).source,(e.interpolate||z).source,(e.evaluate||z).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(n,function(e,r,n,a,s){return o+=t.slice(i,s).replace(F,H),i=s+e.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var s=function(t){return a.call(this,t,g)},u=e.variable||"obj";return s.source="function("+u+"){\n"+o+"}",s},g.chain=function(t){var e=g(t);return e._chain=!0,e};var G=function(t,e){return t._chain?g(e).chain():e};g.mixin=function(t){g.each(g.functions(t),function(e){var r=g[e]=t[e];g.prototype[e]=function(){var t=[this._wrapped];return u.apply(t,arguments),G(this,r.apply(g,t))}})},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];g.prototype[t]=function(){var r=this._wrapped;return e.apply(r,arguments),"shift"!==t&&"splice"!==t||0!==r.length||delete r[0],G(this,r)}}),g.each(["concat","join","slice"],function(t){var e=o[t];g.prototype[t]=function(){return G(this,e.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return""+this._wrapped},void 0===(n=function(){return g}.apply(e,[]))||(t.exports=n)}).call(this)},function(t,e,r){"use strict";var n=r(163),i=r(164);t.exports={errors:n,formatters:i}},function(t,e,r){"use strict";var n=e;n.version=r(262).version,n.utils=r(263),n.rand=r(107),n.curve=r(42),n.curves=r(268),n.ec=r(276),n.eddsa=r(280)},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],h=!1,f=-1;function l(){h&&u&&(h=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!h){var t=s(l);h=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r7?r+=t[n].toUpperCase():r+=t[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:u,toAscii:u,asciiToHex:c,fromAscii:c,unitMap:i.unitMap,toWei:function(t,e){if(e=h(e),!o.isBN(t)&&!n.isString(t))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(t)?i.toWei(t,e):i.toWei(t,e).toString(10)},fromWei:function(t,e){if(e=h(e),!o.isBN(t)&&!n.isString(t))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(t)?i.fromWei(t,e):i.fromWei(t,e).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement}},function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){var n=r(5),i=r(10),o=r(216),a=r(90),s=function(t){return n.isNumber(t)&&(t=Math.trunc(t)),new a(i.toTwosComplement(t).replace("0x",""))};t.exports={formatInputInt:s,formatInputBytes:function(t){if(!i.isHexStrict(t))throw new Error('Given parameter is not bytes: "'+t+'"');var e=t.replace(/^0x/i,"");if(e.length%2!=0)throw new Error('Given parameter bytes has an invalid length: "'+t+'"');if(e.length>64)throw new Error('Given parameter bytes is too long: "'+t+'"');var r=Math.floor((e.length+63)/64);return e=i.padRight(e,64*r),new a(e)},formatInputDynamicBytes:function(t){if(!i.isHexStrict(t))throw new Error('Given parameter is not bytes: "'+t+'"');var e=t.replace(/^0x/i,"");if(e.length%2!=0)throw new Error('Given parameter bytes has an invalid length: "'+t+'"');var r=e.length/2,n=Math.floor((e.length+63)/64);return e=i.padRight(e,64*n),new a(s(r).value+e)},formatInputString:function(t){if(!n.isString(t))throw new Error("Given parameter is not a valid string: "+t);var e=i.utf8ToHex(t).replace(/^0x/i,""),r=e.length/2,o=Math.floor((e.length+63)/64);return e=i.padRight(e,64*o),new a(s(r).value+e)},formatInputBool:function(t){return new a("000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0"))},formatOutputInt:function(t){var e=t.staticPart();if(!e&&!t.rawValue)throw new Error("Couldn't decode "+name+" from ABI: 0x"+t.rawValue);return function(t){return"1"===new o(t.substr(0,1),16).toString(2).substr(0,1)}(e)?new o(e,16).fromTwos(256).toString(10):new o(e,16).toString(10)},formatOutputUInt:function(t,e){var r=t.staticPart();if(!r&&!t.rawValue)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);return new o(r,16).toString(10)},formatOutputBool:function(t,e){var r=t.staticPart();if(!r&&!t.rawValue)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);return"0000000000000000000000000000000000000000000000000000000000000001"===r},formatOutputBytes:function(t,e){var r=e.match(/^bytes([0-9]*)/),n=parseInt(r[1]);if(t.staticPart().slice(0,2*n).length!==2*n)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue+" The size doesn't match.");return"0x"+t.staticPart().slice(0,2*n)},formatOutputDynamicBytes:function(t,e){var r=t.dynamicPart().slice(0,64);if(!r)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);var n=2*new o(r,16).toNumber();return"0x"+t.dynamicPart().substr(64,n)},formatOutputString:function(t){var e=t.dynamicPart().slice(0,64);if(!e)throw new Error("ERROR: The returned value is not a convertible string:"+e);var r=2*new o(e,16).toNumber();return r?i.hexToUtf8("0x"+t.dynamicPart().substr(64,r).replace(/^0x/i,"")):""},formatOutputAddress:function(t,e){var r=t.staticPart();if(!r)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);return i.toChecksumAddress("0x"+r.slice(r.length-40,r.length))},toTwosComplement:i.toTwosComplement}},function(t,e,r){"use strict";var n=r(11),i=r(0);function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function s(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n>8,a=255&i;o?r.push(o,a):r.push(a)}else for(n=0;n>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,c=e;return u+=(c=c+n>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,c){var h=0,f=e;return h+=(f=f+n>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,c){return e+n+o+s+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){var n=r(2).Buffer,i=r(52).Transform,o=r(48).StringDecoder;function a(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(0)(a,i),a.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasLowMarketValue=e.hasHighMarketValue=e.formatInputDecimals=e.formatFixedDecimals=e.convertAmountToAssetAmount=e.convertAssetAmountFromNativeAmount=e.convertAssetAmountToNativeAmount=e.convertAssetAmountFromNativeValue=e.convertAssetAmountToNativeValue=e.convertAssetAmountFromBigNumber=e.convertAssetAmountToBigNumber=e.convertAssetAmountToDisplaySpecific=e.convertAmountToDisplaySpecific=e.convertAmountToDisplay=e.handleSignificantDecimals=e.convertAmountFromBigNumber=e.convertAmountToBigNumber=e.subtract=e.add=e.mod=e.floorDivide=e.divide=e.multiply=e.smallerThanOrEqual=e.smallerThan=e.greaterThanOrEqual=e.greaterThan=e.convertStringToHex=e.convertHexToString=e.convertStringToNumber=e.convertNumberToString=e.countDecimalPlaces=e.fromWei=void 0;var n=a(r(159)),i=a(r(33)),o=a(r(34));function a(t){return t&&t.__esModule?t:{default:t}}e.fromWei=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:18;return new n.default(t.toString(10),10).dividedBy((0,n.default)(10).pow(e)).toString(10)};var s=function(t){return(0,n.default)("".concat(t)).dp()};e.countDecimalPlaces=s;var u=function(t){return(0,n.default)("".concat(t)).toString()};e.convertNumberToString=u;var c=function(t){return(0,n.default)("".concat(t)).toNumber()};e.convertStringToNumber=c;e.convertHexToString=function(t){return(0,n.default)("".concat(t)).toString()};e.convertStringToHex=function(t){return(0,n.default)("".concat(t)).toString(16)};var h=function(t,e){return 1===(0,n.default)("".concat(t)).comparedTo((0,n.default)("".concat(e)))};e.greaterThan=h;e.greaterThanOrEqual=function(t,e){return(0,n.default)("".concat(t)).comparedTo((0,n.default)("".concat(e)))>=0};var f=function(t,e){return-1===(0,n.default)("".concat(t)).comparedTo((0,n.default)("".concat(e)))};e.smallerThan=f;e.smallerThanOrEqual=function(t,e){return(0,n.default)("".concat(t)).comparedTo((0,n.default)("".concat(e)))<=0};e.multiply=function(t,e){return(0,n.default)("".concat(t)).times((0,n.default)("".concat(e))).toString()};e.divide=function(t,e){return(0,n.default)("".concat(t)).dividedBy((0,n.default)("".concat(e))).toString()};e.floorDivide=function(t,e){return(0,n.default)("".concat(t)).dividedToIntegerBy((0,n.default)("".concat(e))).toString()};e.mod=function(t,e){return(0,n.default)("".concat(t)).mod((0,n.default)("".concat(e))).toString()};e.add=function(t,e){return(0,n.default)("".concat(t)).plus((0,n.default)("".concat(e))).toString()};e.subtract=function(t,e){return(0,n.default)("".concat(t)).minus((0,n.default)("".concat(e))).toString()};var l=function(t){return(0,n.default)("".concat(t)).times(i.default.ether).toString()};e.convertAmountToBigNumber=l;var d=function(t){return(0,n.default)("".concat(t)).dividedBy(i.default.ether).toString()};e.convertAmountFromBigNumber=d;var p=function(t,e,r){if(!(0,n.default)("".concat(e)).isInteger()||r&&!(0,n.default)("".concat(r)).isInteger())return null;r=r?c(r):3,e=c(e),e=f((0,n.default)("".concat(t)).abs(),1)?(e=t.slice(2).slice("").search(/[^0]/g)+r)<8?e:8:e8?r:8;return(0,n.default)(m(t,i)).toFormat().replace(/,/g,"")};e.hasHighMarketValue=function(t){return t.native&&h(d(t.native.balance.amount),t.native.selected.assetLimit)};e.hasLowMarketValue=function(t){return t.native&&f(d(t.native.balance.amount),t.native.selected.assetLimit)}},function(t,e,r){"use strict";var n=r(162),i=r(210);t.exports={packageInit:function(t,e){if(e=Array.prototype.slice.call(e),!t)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(t,"currentProvider",{get:function(){return t._provider},set:function(e){return t.setProvider(e)},enumerable:!0,configurable:!0}),e[0]&&e[0]._requestManager?t._requestManager=new n.Manager(e[0].currentProvider):(t._requestManager=new n.Manager,t._requestManager.setProvider(e[0],e[1])),t.givenProvider=n.Manager.givenProvider,t.providers=n.Manager.providers,t._provider=t._requestManager.provider,t.setProvider||(t.setProvider=function(e,r){return t._requestManager.setProvider(e,r),t._provider=t._requestManager.provider,!0}),t.BatchRequest=n.BatchManager.bind(null,t._requestManager),t.extend=i(t)},addProviders:function(t){t.givenProvider=n.Manager.givenProvider,t.providers=n.Manager.providers}}},function(t,e,r){"use strict";var n=r(36),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(26);o.inherits=r(0);var a=r(80),s=r(47);o.inherits(f,a);for(var u=i(s.prototype),c=0;c1?(t[r[0]]=t[r[0]]||{},t[r[0]][r[1]]=e):t[r[0]]=e},c.prototype.getCall=function(t){return n.isFunction(this.call)?this.call(t):this.call},c.prototype.extractCallback=function(t){if(n.isFunction(t[t.length-1]))return t.pop()},c.prototype.validateArgs=function(t){if(t.length!==this.params)throw i.InvalidNumberOfParams(t.length,this.params,this.name)},c.prototype.formatInput=function(t){var e=this;return this.inputFormatter?this.inputFormatter.map(function(r,n){return r?r.call(e,t[n]):t[n]}):t},c.prototype.formatOutput=function(t){var e=this;return n.isArray(t)?t.map(function(t){return e.outputFormatter&&t?e.outputFormatter(t):t}):this.outputFormatter&&t?this.outputFormatter(t):t},c.prototype.toPayload=function(t){var e=this.getCall(t),r=this.extractCallback(t),n=this.formatInput(t);this.validateArgs(n);var i={method:e,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},c.prototype._confirmTransaction=function(t,e,r){var i=this,h=!1,f=!0,l=0,d=0,p=null,m="",v=n.isObject(r.params[0])&&r.params[0].gas?r.params[0].gas:null,g=n.isObject(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,b=[new c({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:o.outputTransactionReceiptFormatter}),new c({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]}),new u({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:o.outputBlockFormatter}}})],y={};n.each(b,function(t){t.attachToObject(y),t.requestManager=i.requestManager});var _=function(r,n,o,u,c){if(!o)return c||(c={unsubscribe:function(){clearInterval(p)}}),(r?s.resolve(r):y.getTransactionReceipt(e)).catch(function(e){c.unsubscribe(),h=!0,a._fireError({message:"Failed to check for transaction receipt:",data:e},t.eventEmitter,t.reject)}).then(function(e){if(!e||!e.blockHash)throw new Error("Receipt missing or blockHash null");return i.extraFormatters&&i.extraFormatters.receiptFormatter&&(e=i.extraFormatters.receiptFormatter(e)),t.eventEmitter.listeners("confirmation").length>0&&(void 0!==r&&0===d||t.eventEmitter.emit("confirmation",d,e),f=!1,25===++d&&(c.unsubscribe(),t.eventEmitter.removeAllListeners())),e}).then(function(e){if(g&&!h){if(!e.contractAddress)return f&&(c.unsubscribe(),h=!0),void a._fireError(new Error("The transaction receipt didn't contain a contract address."),t.eventEmitter,t.reject);y.getCode(e.contractAddress,function(r,n){n&&(n.length>2?(t.eventEmitter.emit("receipt",e),i.extraFormatters&&i.extraFormatters.contractDeployFormatter?t.resolve(i.extraFormatters.contractDeployFormatter(e)):t.resolve(e),f&&t.eventEmitter.removeAllListeners()):a._fireError(new Error("The contract code couldn't be stored, please check your gas limit."),t.eventEmitter,t.reject),f&&c.unsubscribe(),h=!0)})}return e}).then(function(e){g||h||(e.outOfGas||v&&v===e.gasUsed||!0!==e.status&&"0x1"!==e.status&&void 0!==e.status?(e&&(m=JSON.stringify(e,null,2)),!1===e.status||"0x0"===e.status?a._fireError(new Error("Transaction has been reverted by the EVM:\n"+m),t.eventEmitter,t.reject):a._fireError(new Error("Transaction ran out of gas. Please provide more gas:\n"+m),t.eventEmitter,t.reject)):(t.eventEmitter.emit("receipt",e),t.resolve(e),f&&t.eventEmitter.removeAllListeners()),f&&c.unsubscribe(),h=!0)}).catch(function(){l++,n?l-1>=750&&(c.unsubscribe(),h=!0,a._fireError(new Error("Transaction was not mined within750 seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject)):l-1>=50&&(c.unsubscribe(),h=!0,a._fireError(new Error("Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject))});c.unsubscribe(),h=!0,a._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:o},t.eventEmitter,t.reject)},w=function(t){n.isFunction(this.requestManager.provider.on)?y.subscribe("newBlockHeaders",_.bind(null,t,!1)):p=setInterval(_.bind(null,t,!0),1e3)}.bind(this);y.getTransactionReceipt(e).then(function(e){e&&e.blockHash?(t.eventEmitter.listeners("confirmation").length>0&&w(e),_(e,!1)):h||w()}).catch(function(){h||w()})};var h=function(t,e){return n.isNumber(t)?e.wallet[t]:n.isObject(t)&&t.address&&t.privateKey?t:e.wallet[t.toLowerCase()]};c.prototype.buildCall=function(){var t=this,e="eth_sendTransaction"===t.call||"eth_sendRawTransaction"===t.call,r=function(){var r=s(!e),i=t.toPayload(Array.prototype.slice.call(arguments)),o=function(n,o){try{o=t.formatOutput(o)}catch(t){n=t}if(o instanceof Error&&(n=o),n)return n.error&&(n=n.error),a._fireError(n,r.eventEmitter,r.reject,i.callback);i.callback&&i.callback(null,o),e?(r.eventEmitter.emit("transactionHash",o),t._confirmTransaction(r,o,i)):n||r.resolve(o)},u=function(e){var r=n.extend({},i,{method:"eth_sendRawTransaction",params:[e.rawTransaction]});t.requestManager.send(r,o)},f=function(t,e){var i;if(e&&e.accounts&&e.accounts.wallet&&e.accounts.wallet.length)if("eth_sendTransaction"===t.method){var a=t.params[0];if((i=h(n.isObject(a)?a.from:null,e.accounts))&&i.privateKey)return e.accounts.signTransaction(n.omit(a,"from"),i.privateKey).then(u)}else if("eth_sign"===t.method){var s=t.params[1];if((i=h(t.params[0],e.accounts))&&i.privateKey){var c=e.accounts.sign(s,i.privateKey);return t.callback&&t.callback(null,c.signature),void r.resolve(c.signature)}}return e.requestManager.send(t,o)};e&&n.isObject(i.params[0])&&!i.params[0].gasPrice?new c({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(t.requestManager)(function(e,r){r&&(i.params[0].gasPrice=r),f(i,t)}):f(i,t);return r.eventEmitter};return r.method=t,r.request=this.request.bind(this),r},c.prototype.request=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));return t.format=this.formatOutput.bind(this),t},t.exports=c},function(t,e,r){var n=r(12),i=r(90),o=function(t){this._inputFormatter=t.inputFormatter,this._outputFormatter=t.outputFormatter};o.prototype.isType=function(t){throw"This method should be overwritten for type "+t},o.prototype.staticPartLength=function(t){return(this.nestedTypes(t)||["[1]"]).map(function(t){return parseInt(t.slice(1,-1),10)||1}).reduce(function(t,e){return t*e},32)},o.prototype.isDynamicArray=function(t){var e=this.nestedTypes(t);return!!e&&!e[e.length-1].match(/[0-9]{1,}/g)},o.prototype.isStaticArray=function(t){var e=this.nestedTypes(t);return!!e&&!!e[e.length-1].match(/[0-9]{1,}/g)},o.prototype.staticArrayLength=function(t){var e=this.nestedTypes(t);return e?parseInt(e[e.length-1].match(/[0-9]{1,}/g)||1):1},o.prototype.nestedName=function(t){var e=this.nestedTypes(t);return e?t.substr(0,t.length-e[e.length-1].length):t},o.prototype.isDynamicType=function(){return!1},o.prototype.nestedTypes=function(t){return t.match(/(\[[0-9]*\])/g)},o.prototype.encode=function(t,e){var r=this;return this.isDynamicArray(e)?function(){var i=t.length,o=r.nestedName(e),a=[];return a.push(n.formatInputInt(i).encode()),t.forEach(function(t){a.push(r.encode(t,o))}),a}():this.isStaticArray(e)?function(){for(var n=r.staticArrayLength(e),i=r.nestedName(e),o=[],a=0;a65536)throw new Error("requested too many random bytes");var a=new e.Uint8Array(t);t>0&&o.getRandomValues(a);var s=i.from(a.buffer);if("function"==typeof r)return n.nextTick(function(){r(null,s)});return s}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(4),r(8))},function(t,e,r){var n=r(2).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHistoricalTransactions=e.parseTransaction=e.parseAccountTransactions=e.parseNewTransaction=e.parseConfirmedTransactions=e.parseHistoricalNativePrice=e.parseAccountUniqueTokens=e.parseAccountBalancesPrices=e.parseAccountAssets=e.parsePricesObject=e.parseGasPricesTxFee=e.getNativeGasPrice=e.convertGasPricesToNative=e.parseGasPrices=e.defaultGasPriceFormat=e.getTxFee=e.parseError=void 0;var n=l(r(32)),i=r(16),o=l(r(33)),a=l(r(34)),s=l(r(68)),u=r(69),c=r(35),h=r(333),f=r(44);function l(t){return t&&t.__esModule?t:{default:t}}function d(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function p(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){d(o,n,i,a,s,"next",t)}function s(t){d(o,n,i,a,s,"throw",t)}a(void 0)})}}function m(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"USD",n={selected:a.default[r]};return Object.keys(a.default).forEach(function(r){n[r]={},e.forEach(function(e){var o=null;t.RAW[e]&&(o={price:{amount:(0,i.convertAmountToBigNumber)(t.RAW[e][r].PRICE),display:(0,i.convertAmountToDisplaySpecific)((0,i.convertAmountToBigNumber)(t.RAW[e][r].PRICE),n,r)},change:{amount:(0,i.convertAmountToBigNumber)(t.RAW[e][r].CHANGEPCT24HOUR),display:(0,i.convertAmountToDisplay)((0,i.convertAmountToBigNumber)(t.RAW[e][r].CHANGEPCT24HOUR))}}),"WETH"!==e&&(n[r][e]=o),"ETH"===e&&(n[r].WETH=o)})}),n};e.parseAccountAssets=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{var r=m(t);return{address:e,type:"",assets:r=(r=r.map(function(t){var e={name:t.contract.name!==t.contract.address?t.contract.name:t.contract.symbol||"Unknown Token",symbol:t.contract.symbol||"———",address:t.contract.address||null,decimals:(0,i.convertStringToNumber)(t.contract.decimals)},r=(0,i.convertAssetAmountToBigNumber)(t.balance,e.decimals);return v({},e,{balance:{amount:r,display:(0,i.convertAmountToDisplay)(r,null,{symbol:e.symbol,decimals:e.decimals})},native:null})})).filter(function(t){return!!Number(t.balance.amount)||"ETH"===t.symbol}),total:null}}catch(t){throw t}};e.parseAccountBalancesPrices=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],0),n=v({},t),o=e.selected.currency;if(t){var a=t.assets.map(function(t){if(!e||e&&!e[o][t.symbol])return t;var r=(0,i.convertAmountFromBigNumber)(t.balance.amount,t.decimals),n=(0,i.convertAmountFromBigNumber)(e[o][t.symbol].price.amount),a=(0,i.multiply)(r,n),s=(0,i.convertAmountToBigNumber)(a),u=(0,i.convertAmountToDisplay)(s,e),c=e[o][t.symbol].price;return v({},t,{native:{selected:e.selected,balance:{amount:s,display:u},price:c,change:t.symbol===e.selected.currency?{amount:"0",display:"———"}:e[o][t.symbol].change}})});n=v({},n,{assets:a,total:{amount:r=a.reduce(function(t,e){return(0,i.add)(t,e.native?e.native.balance.amount:0)},0),display:(0,i.convertAmountToDisplay)(r,e)}})}return n};e.parseAccountUniqueTokens=function(t){return t.data.assets.length?t.data.assets.map(function(t){return{background:"#".concat(t.background_color),name:t.name,imageUrl:t.image_url,id:t.token_id,lastPrice:t.last_sale&&Number((0,i.convertAmountFromBigNumber)(t.last_sale.total_price)),contractAddress:t.asset_contract.address}}):[]};var x={name:"Ethereum",symbol:"ETH",address:null,decimals:18},k=function(){var t=p(regeneratorRuntime.mark(function t(e){var r,n,o,s,u,c,h,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=v({},e),n=r.timestamp?r.timestamp.secs:Date.now(),(o=v({},r.asset)).symbol="WETH"===r.asset.symbol?"ETH":r.asset.symbol,s=[o.symbol,"ETH"],u=s.map(function(t){return(0,f.apiGetHistoricalPrices)(t,n)}),t.next=8,Promise.all(u);case 8:return c=t.sent,h=c[0],l=c[1],Object.keys(a.default).forEach(function(t){var e={selected:a.default[t]};if(e[t]={},"Error"!==h.data.response&&h.data[o.symbol]){var n=(0,i.convertAmountToBigNumber)(h.data[o.symbol][t]);e[t][o.symbol]={price:{amount:n,display:null}};var s=(0,i.convertAmountToDisplay)(n,e);e[t][o.symbol].price.display=s;var u=e[t][o.symbol].price,c=(0,i.convertAssetAmountToNativeValue)(r.value.amount,o,e),f=(0,i.convertAmountToDisplay)(c,e),d=r.error?{amount:"",display:""}:{amount:c,display:f};r.native[t]={price:u,value:d}}if(r.txFee&&"Error"!==l.data.response&&l.data.ETH){var p=(0,i.convertAmountToBigNumber)(l.data.ETH[t]);e[t].ETH={price:{amount:p,display:null}};var m=(0,i.convertAmountToDisplay)(p,e);e[t].ETH.price.display=m;var g=(0,i.convertAssetAmountToNativeValue)(r.txFee.amount,x,e),b={amount:g,display:(0,i.convertAmountToDisplay)(g,e)};r.native[t]=v({},r.native[t],{txFee:b})}}),t.abrupt("return",r);case 13:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.parseHistoricalNativePrice=k;var S=function(){var t=p(regeneratorRuntime.mark(function t(){var e,r,n=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:"",t.next=3,T(e);case 3:return r=t.sent,t.next=6,Promise.all(r.map(function(){var t=p(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,k(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()));case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.parseConfirmedTransactions=S;var A=function(){var t=p(regeneratorRuntime.mark(function t(){var e,r,n,o,s,u,h,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=l.length>0&&void 0!==l[0]?l[0]:null,r=l.length>1&&void 0!==l[1]?l[1]:"",n=e.gasLimit&&e.gasPrice?(0,i.multiply)(e.gasLimit,e.gasPrice):null,o=n?{amount:n,display:(0,i.convertAmountToDisplay)(n,null,{symbol:"ETH",decimals:18})}:null,s=(0,i.convertAmountToBigNumber)(e.value,e.asset.decimals),u={amount:s,display:(0,i.convertAmountToDisplay)(s,null,e.asset)},t.t0=e.nonce,t.t0){t.next=16;break}if(!e.from){t.next=14;break}return t.next=11,(0,c.getTransactionCount)(e.from);case 11:t.t1=t.sent,t.next=15;break;case 14:t.t1="";case 15:t.t0=t.t1;case 16:return h=t.t0,f={hash:e.hash,timestamp:null,from:e.from,to:e.to,error:!1,nonce:h,value:u,txFee:o,native:{selected:a.default[r]},pending:!0,asset:e.asset},t.next=20,k(f);case 20:return t.abrupt("return",t.sent);case 21:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.parseNewTransaction=A;var E=function(){var t=p(regeneratorRuntime.mark(function t(){var e,r,n,i,o,a,s,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:null,r=u.length>1&&void 0!==u[1]?u[1]:"",n=u.length>2&&void 0!==u[2]?u[2]:"",e&&e.docs){t.next=5;break}return t.abrupt("return",[]);case 5:return t.next=7,Promise.all(e.docs.map(function(){var t=p(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()));case 7:if(i=t.sent,o=[],i.forEach(function(t){t.forEach(function(t){o.push(t)})}),!(e.pages>e.page)){t.next=24;break}return t.prev=11,t.next=14,(0,f.apiGetTransactionData)(r,n,e.page+1);case 14:return a=t.sent,t.next=17,E(a.data,r,n);case 17:s=t.sent,o=m(o).concat(m(s)),t.next=24;break;case 21:throw t.prev=21,t.t0=t.catch(11),t.t0;case 24:return t.abrupt("return",o);case 25:case"end":return t.stop()}},t,this,[[11,21]])}));return function(){return t.apply(this,arguments)}}();e.parseAccountTransactions=E;var T=function(){var t=p(regeneratorRuntime.mark(function t(e){var r,n,o,a,s,u,c,h,f,l,d,p,m;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e._id,n={secs:"".concat(e.timeStamp),ms:"".concat(e.timeStamp,"000")},o=!!e.error,a=e.from,s=e.to,u={name:"Ethereum",symbol:"ETH",address:null,decimals:18},c={amount:e.value,display:(0,i.convertAmountToDisplay)(e.value,null,{symbol:"ETH",decimals:18})},h=(0,i.multiply)(e.gasUsed,e.gasPrice),f={amount:h,display:(0,i.convertAmountToDisplay)(h,null,{symbol:"ETH",decimals:18})},l=function(){if("0x"!==e.input&&e.operations&&e.operations.length&&e.operations.filter(function(t){return"token_transfer"===t.type}).length)return!0;return!1}(),p=[d={hash:r,timestamp:n,from:a,to:s,error:o,value:c,txFee:f,native:{},pending:!1,asset:u}],l&&(m=[],e.operations.length&&(e.operations.forEach(function(t,e){var r={hash:"".concat(d.hash,"-").concat(e+1),timestamp:n,from:a,to:s,error:o,value:c,txFee:f,native:{},pending:!1,asset:u},h=t.contract.name.startsWith("0x")?t.contract.symbol||"Unknown Token":t.contract.name;r.asset={name:h,symbol:t.contract.symbol||"———",address:t.contract.address||"",decimals:t.contract.decimals||18},r.from=t.from,r.to=t.to;var l=(0,i.convertAssetAmountToBigNumber)(t.value,r.asset.decimals);r.value={amount:l,display:(0,i.convertAmountToDisplay)(l,null,r.asset)},m.push(r)}),Number(e.value)?(d.hash="".concat(d.hash,"-0"),p=m.concat([d])):p=m.concat())),t.abrupt("return",p);case 14:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.parseTransaction=T;var C=function(){var t=p(regeneratorRuntime.mark(function t(){var e,r,n=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=n.length>0&&void 0!==n[0]?n[0]:null).length){t.next=3;break}return t.abrupt("return",e);case 3:return t.next=5,Promise.all(e.map(function(){var t=p(regeneratorRuntime.mark(function t(e,r){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.native&&!(e.native&&Object.keys(e.native).length<1)){t.next=5;break}return t.next=3,(0,u.debounceRequest)(k,[e],50*r);case 3:return n=t.sent,t.abrupt("return",n);case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()));case 5:return r=t.sent,t.abrupt("return",r);case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.parseHistoricalTransactions=C},function(t,e,r){"use strict";var n=r(184),i=r(185);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=y,e.resolve=function(t,e){return y(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?y(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=y(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(c),f=["%","/","?",";","#"].concat(h),l=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(186);function y(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?I+="x":I+=O[R];if(!I.match(d)){var B=P.slice(0,E),L=P.slice(E+1),U=O.match(p);U&&(B.push(U[1]),L.unshift(U[2])),L.length&&(y="/"+L.join(".")+y),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=n.toASCII(this.hostname));var q=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+q,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[M])for(E=0,N=h.length;E0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=x.slice(-1)[0],A=(r.host||t.host||x.length>1)&&("."===S||".."===S)||""===S,E=0,T=x.length;T>=0;T--)"."===(S=x[T])?x.splice(T,1):".."===S?(x.splice(T,1),E++):E&&(x.splice(T,1),E--);if(!w&&!M)for(;E--;E)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var C,P=""===x[0]||x[0]&&"/"===x[0].charAt(0);k&&(r.hostname=r.host=P?"":x.length?x.shift():"",(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift()));return(w=w||r.host&&x.length)&&!P&&x.unshift(""),x.length?r.pathname=x.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,r){(e=t.exports=r(80)).Stream=e,e.Readable=e,e.Writable=r(47),e.Duplex=r(18),e.Transform=r(83),e.PassThrough=r(199)},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,r(1).Buffer)},function(t,e,r){"use strict";var n=r(0),i=r(51),o=r(53),a=r(54),s=r(15);function u(t){s.call(this,"digest"),this._hash=t}n(u,s),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(a(t))}},function(t,e,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o7?r+=t[n].toUpperCase():r+=t[n];return r};var d=function(t){return l.utils.fromWei(t)};e.fromWei=d;var p=function(t){return l.utils.toWei(t)};e.toWei=p;e.sha3=function(t){return l.utils.sha3(t)};var m=function(t){return l.eth.getTransactionCount(t,"pending")};e.getTransactionCount=m;e.getTransactionByHash=function(t){return l.eth.getTransaction(t)};e.getBlockByHash=function(t){return l.eth.getBlock(t)};var v=function(){var t=f(regeneratorRuntime.mark(function t(e){var r,n,i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.eth.getBalance(e);case 2:return r=t.sent,n=d(r),i=0!==(0,a.convertStringToNumber)(n)?(0,a.convertNumberToString)(n):0,t.abrupt("return",i);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.getAccountBalance=v;e.getTokenBalanceOf=function(t,e){return new Promise(function(r,n){var i=u.default.token_balance.hash,s=(0,o.getDataString)(i,[(0,o.removeHexPrefix)(t)]);l.eth.call({to:e,data:s}).then(function(t){var e=(0,a.convertHexToString)(t);r(e)}).catch(function(t){return n(t)})})};var g=function(){var t=f(regeneratorRuntime.mark(function t(e){var r,n,i,o,a,s,u,c,h,f,d;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.from,n=e.to,i=e.data,o=e.value,a=e.gasPrice,s=e.gasLimit,t.t0=a,t.t0){t.next=6;break}return t.next=5,l.eth.getGasPrice();case 5:t.t0=t.sent;case 6:if(u=t.t0,c="0x00"===o?{from:r,to:n,data:i}:{to:n,data:i},t.t1=s,t.t1){t.next=13;break}return t.next=12,l.eth.estimateGas(c);case 12:t.t1=t.sent;case 13:return h=t.t1,t.next=16,m(r);case 16:return f=t.sent,d={from:r,to:n,nonce:l.utils.toHex(f),gasPrice:l.utils.toHex(u),gasLimit:l.utils.toHex(h),gas:l.utils.toHex(h),value:l.utils.toHex(o),data:i},t.abrupt("return",d);case 19:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.getTxDetails=g;var b=function(t){var e=u.default.token_transfer.hash,r=(0,a.convertStringToHex)((0,a.convertAmountToAssetAmount)(t.amount,t.asset.decimals)),n=(0,o.removeHexPrefix)(t.to),i=(0,o.getDataString)(e,[n,r]);return{from:t.from,to:t.asset.address,data:i,gasPrice:t.gasPrice,gasLimit:t.gasLimit}};e.getTransferTokenTransaction=b;e.createSignableTransaction=function(t){t.value=t.amount,"ETH"!==t.asset.symbol&&(t=b(t));var e="0x"===t.from.substr(0,2)?t.from:"0x".concat(t.from),r="0x"===t.to.substr(0,2)?t.to:"0x".concat(t.to),n=t.value?p(t.value):"0x00",i=t.data?t.data:"0x";return g({from:e,to:r,data:i,value:n,gasPrice:t.gasPrice,gasLimit:t.gasLimit})};var y=function(){var t=f(regeneratorRuntime.mark(function t(e){var r,n,c,h,f,d,p,m,v,g,b;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.asset,n=e.address,c=e.recipient,h=e.amount,f=s.default.basic_tx,d="0x",p=h&&Number(h)?(0,a.convertAmountToBigNumber)(h):.1*r.balance.amount,m=c&&(0,i.isValidAddress)(c)?c:"0x737e583620f4ac1842d4e354789ca0c5e0651fbb",v={to:m,data:d},"ETH"===r.symbol){t.next=15;break}return g=u.default.token_transfer.hash,b=(0,a.convertAssetAmountFromBigNumber)(p,r.decimals),b=(0,a.convertStringToHex)(b),d=(0,o.getDataString)(g,[(0,o.removeHexPrefix)(m),b]),v={from:n,to:r.address,data:d,value:"0x0"},t.next=14,l.eth.estimateGas(v);case 14:f=t.sent;case 15:return t.abrupt("return",f);case 16:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.estimateGasLimit=y},function(t,e,r){"use strict";(function(e){!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(s-1),a=0;a1?(t[r[0]]=t[r[0]]||{},t[r[0]][r[1]]=e):t[r[0]]=e},i.prototype.buildCall=function(){var t=this;return function(){t.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var e=new n({subscription:t.subscriptions[arguments[0]],requestManager:t.requestManager,type:t.type});return e.subscribe.apply(e,arguments)}},t.exports={subscriptions:i,subscription:n}},function(t,e,r){"use strict";var n=r(17),i=r(19),o=r(10),a=function(){var t=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:o.hexToNumber}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};n.addProviders(a),t.exports=a},function(t,e,r){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(21),e.createHash=e.Hash=r(27),e.createHmac=e.Hmac=r(94);var n=r(236),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var a=r(55);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync;var s=r(238);e.Cipher=s.Cipher,e.createCipher=s.createCipher,e.Cipheriv=s.Cipheriv,e.createCipheriv=s.createCipheriv,e.Decipher=s.Decipher,e.createDecipher=s.createDecipher,e.Decipheriv=s.Decipheriv,e.createDecipheriv=s.createDecipheriv,e.getCiphers=s.getCiphers,e.listCiphers=s.listCiphers;var u=r(255);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var c=r(260);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=r(298);var h=r(299);e.publicEncrypt=h.publicEncrypt,e.privateEncrypt=h.privateEncrypt,e.publicDecrypt=h.publicDecrypt,e.privateDecrypt=h.privateDecrypt;var f=r(302);e.randomFill=f.randomFill,e.randomFillSync=f.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,r){var n=r(2).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i>>24]^h[p>>>16&255]^f[m>>>8&255]^l[255&v]^e[g++],a=c[p>>>24]^h[m>>>16&255]^f[v>>>8&255]^l[255&d]^e[g++],s=c[m>>>24]^h[v>>>16&255]^f[d>>>8&255]^l[255&p]^e[g++],u=c[v>>>24]^h[d>>>16&255]^f[p>>>8&255]^l[255&m]^e[g++],d=o,p=a,m=s,v=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&v])^e[g++],a=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[v>>>8&255]<<8|n[255&d])^e[g++],s=(n[m>>>24]<<24|n[v>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[g++],u=(n[v>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^e[g++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var h=t[a],f=t[h],l=t[f],d=257*t[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*l^65537*f^257*h^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=h^t[t[t[l^h]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var c=[],h=0;h>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},function(t,e,r){var n=r(2).Buffer,i=r(51);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var h=new i;h.update(c),h.update(t),e&&h.update(e),c=h.digest();var f=0;if(a>0){var l=s.length-a;f=Math.min(a,c.length),c.copy(s,l,0,f),a-=f}if(f0){var d=u.length-o,p=Math.min(o,c.length-f);c.copy(u,d,f,f+p),o-=p}}return c.fill(0),{key:s,iv:u}}},function(t,e,r){"use strict";var n=e;n.base=r(264),n.short=r(265),n.mont=r(266),n.edwards=r(267)},function(t,e,r){(function(e){var n=r(283),i=r(295),o=r(296),a=r(57),s=r(55);function u(t){var r;"object"!=typeof t||e.isBuffer(t)||(r=t.passphrase,t=t.key),"string"==typeof t&&(t=new e(t));var u,c,h=o(t,r),f=h.tag,l=h.data;switch(f){case"CERTIFICATE":c=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(l,"der")),u=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+f);case"ENCRYPTED PRIVATE KEY":l=function(t,r){var n=t.algorithm.decrypt.kde.kdeparams.salt,o=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),u=i[t.algorithm.decrypt.cipher.algo.join(".")],c=t.algorithm.decrypt.cipher.iv,h=t.subjectPrivateKey,f=parseInt(u.split("-")[1],10)/8,l=s.pbkdf2Sync(r,n,o,f),d=a.createDecipheriv(u,l,c),p=[];return p.push(d.update(h)),p.push(d.final()),e.concat(p)}(l=n.EncryptedPrivateKey.decode(l,"der"),r);case"PRIVATE KEY":switch(u=(c=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+f);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+f)}}t.exports=u,u.signature=n.signature}).call(this,r(1).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.apiShapeshiftGetExchangeDetails=e.apiShapeshiftSendAmount=e.apiShapeshiftGetDepositStatus=e.apiShapeshiftGetMarketInfo=e.apiShapeshiftGetCoins=e.apiShapeshiftGetCurrencies=e.apiGetGasPrices=e.apiGetAccountTransactions=e.apiGetTransaction=e.apiGetTransactionData=e.apiGetAccountBalances=e.apiGetHistoricalPrices=e.apiGetPrices=void 0;var n=s(r(62)),i=r(23),o=r(16),a=s(r(34));function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)})}}var h=t.env.REACT_APP_CRYPTOCOMPARE_API_KEY||"",f=n.default.create({baseURL:"https://min-api.cryptocompare.com/data/",timeout:3e4,headers:{"Content-Type":"application/json",Accept:"application/json"}});e.apiGetPrices=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=JSON.stringify(t).replace(/[[\]"]/gi,""),r=JSON.stringify(Object.keys(a.default)).replace(/[[\]"]/gi,"");return f.get("/pricemultifull?fsyms=".concat(e,"&tsyms=").concat(r,"&apiKey=").concat(h))};e.apiGetHistoricalPrices=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),r=JSON.stringify(Object.keys(a.default)).replace(/[[\]"]/gi,"");return f.get("/pricehistorical?fsym=".concat(t,"&tsyms=").concat(r,"&ts=").concat(e,"&apiKey=").concat(h))};var l=n.default.create({baseURL:"https://indexer.balance.io",timeout:3e4,headers:{"Content-Type":"application/json",Accept:"application/json"}}),d=function(){var t=c(regeneratorRuntime.mark(function t(){var e,r,n,o,a,s,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=u.length>0&&void 0!==u[0]?u[0]:"",r=u.length>1&&void 0!==u[1]?u[1]:"mainnet",t.prev=2,t.next=5,l.get("/get_balances/".concat(r,"/").concat(e));case 5:return n=t.sent,o=n.data,a=(0,i.parseAccountAssets)(o,e),s={data:a},t.abrupt("return",s);case 12:throw t.prev=12,t.t0=t.catch(2),t.t0;case 15:case"end":return t.stop()}},t,this,[[2,12]])}));return function(){return t.apply(this,arguments)}}();e.apiGetAccountBalances=d;var p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mainnet",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return l.get("/get_transactions/".concat(e,"/").concat(t,"/").concat(r))};e.apiGetTransactionData=p;e.apiGetTransaction=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mainnet";return l.get("/get_transaction/".concat(e,"/").concat(t))};var m=function(){var t=c(regeneratorRuntime.mark(function t(){var e,r,n,o,a,s,u,c,h=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=h.length>0&&void 0!==h[0]?h[0]:"",r=h.length>1&&void 0!==h[1]?h[1]:"mainnet",n=h.length>2&&void 0!==h[2]?h[2]:"",t.prev=3,t.next=6,p(e,r,1);case 6:return o=t.sent,a=o.data,t.next=10,(0,i.parseAccountTransactions)(a,e,r);case 10:return(s=t.sent).length&&n&&(u=!0,s=s.filter(function(t){return t.hash===n&&u?(u=!1,!1):!(t.hash===n||!u)})),t.next=14,(0,i.parseHistoricalTransactions)(s);case 14:return s=t.sent,c={data:s},t.abrupt("return",c);case 19:throw t.prev=19,t.t0=t.catch(3),t.t0;case 22:case"end":return t.stop()}},t,this,[[3,19]])}));return function(){return t.apply(this,arguments)}}();e.apiGetAccountTransactions=m;e.apiGetGasPrices=function(){return l.get("/get_eth_gas_prices")};e.apiShapeshiftGetCurrencies=function(){return l.get("/get_currencies")};var v=n.default.create({baseURL:"https://shapeshift.io",timeout:3e4,headers:{"Content-Type":"application/json",Accept:"application/json"}});e.apiShapeshiftGetCoins=function(){return v.get("/getcoins")};var g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return v.get("/marketinfo/".concat(t))};e.apiShapeshiftGetMarketInfo=g;e.apiShapeshiftGetDepositStatus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return v.get("/txStat/".concat(t))};var b=function(){var e=c(regeneratorRuntime.mark(function e(r){var n,i,o,a,s,u,c,h,f,l,d,p,m,b,y,_;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.address,i=void 0===n?"":n,o=r.depositSymbol,a=void 0===o?"":o,s=r.withdrawalSymbol,u=void 0===s?"":s,c=r.depositAmount,h=void 0===c?"":c,f=r.withdrawalAmount,l=void 0===f?"":f,e.prev=1,d="".concat(a.toLowerCase(),"_").concat(u.toLowerCase()),e.next=5,g(d);case 5:return p=e.sent,m=p.data.minimum,b=i?{pair:d,withdrawal:i,returnAddress:i}:{pair:d},l?b.amount=l:b.depositAmount=h||m,(y=t.env.REACT_APP_SHAPESHIFT_API_KEY||"")&&(b.apiKey=y),e.next=13,v.post("/sendamount",b);case 13:if(!(_=e.sent).data.success){e.next=19;break}return _.data.success.min=m,e.abrupt("return",_);case 19:return e.abrupt("return",{data:{success:{pair:d,depositAmount:"",withdrawalAmount:"",quotedRate:p.data.rate,maxLimit:p.data.maxLimit,min:p.data.minimum,minerFee:p.data.minerFee,error:_.data.error}}});case 20:e.next=25;break;case 22:throw e.prev=22,e.t0=e.catch(1),e.t0;case 25:case"end":return e.stop()}},e,this,[[1,22]])}));return function(t){return e.apply(this,arguments)}}();e.apiShapeshiftSendAmount=b;e.apiShapeshiftGetExchangeDetails=function(t){var e=t.request,r=void 0===e?{depositSymbol:"",withdrawalSymbol:"",withdrawalAmount:""}:e,n=t.inputOne,i=void 0===n?"":n,a=t.inputTwo,s=void 0===a?"":a,u=t.withdrawal,c=void 0!==u&&u;return b(r).then(function(t){var e,r=t.data,n=c?"depositAmount":"withdrawalAmount",a={};return a={exchangeDetails:e=r.success},e.error?s="":i?(s=e[n]||"",s=(0,o.formatInputDecimals)(s,i)):s="",a[n]=s,a})}}).call(this,r(8))},function(t,e,r){"use strict";(function(e){var n=r(9),i=r(144),o={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=r(64):void 0!==e&&(t=r(64)),t}(),transformRequest:[function(t,e){return i(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],function(t){s.headers[t]={}}),n.forEach(["post","put","patch"],function(t){s.headers[t]=n.merge(o)}),t.exports=s}).call(this,r(8))},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!function(t){return"number"==typeof t}(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,a,s,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var h=new Error('Uncaught, unspecified "error" event. ('+e+")");throw h.context=e,h}if(o(r=this._events[t]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),a=(c=r.slice()).length,u=0;u0&&this._events[t].length>a&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!n(e))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,o,a,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(a=(r=this._events[t]).length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){o=s;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){"use strict";(function(e,n,i){var o=r(36);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=b;var s,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;b.WritableState=g;var c=r(26);c.inherits=r(0);var h={deprecate:r(198)},f=r(81),l=r(2).Buffer,d=i.Uint8Array||function(){};var p,m=r(82);function v(){}function g(t,e){s=s||r(18),t=t||{};var n=e instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(k,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),k(t,e))}(t,r,n,e,i);else{var a=M(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?u(_,t,r,a,i):_(t,r,a,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(t){if(s=s||r(18),!(p.call(b,this)||this instanceof s))return new b(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function y(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function _(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),k(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,y(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,h=r.encoding,f=r.callback;if(y(t,e,!1,e.objectMode?1:c.length,c,h,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function M(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),k(t,e)})}function k(t,e){var r=M(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(x,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(b,f),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===b&&(t&&t._writableState instanceof g)}})):p=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&function(t){return l.isBuffer(t)||t instanceof d}(t);return a&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=v),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(n,a),i=!1),i}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(8),r(196).setImmediate,r(4))},function(t,e,r){"use strict";var n=r(2).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=h,this.end=f,e=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function h(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.listeners={}}return t.prototype.addEventListener=function(t,e){t=t.toLowerCase(),this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(e.handleEvent||e)},t.prototype.removeEventListener=function(t,e){if(t=t.toLowerCase(),this.listeners[t]){var r=this.listeners[t].indexOf(e.handleEvent||e);r<0||this.listeners[t].splice(r,1)}},t.prototype.dispatchEvent=function(t){var e=t.type.toLowerCase();if(t.target=this,this.listeners[e])for(var r=0,n=this.listeners[e];r>6|192);else{if(i>55295&&i<56320){if(++n==t.length)return null;var o=t.charCodeAt(n);if(o<56320||o>57343)return null;r+=e((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=e(i>>12&63|128)}else r+=e(i>>12|224);r+=e(i>>6&63|128)}r+=e(63&i|128)}}return r},toString:function(t){for(var e="",r=0,o=i(t);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(t,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(t,r))<<6|63&n(t,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(t,r))<<12|(63&n(t,++r))<<6|63&n(t,++r)}++r}if(a<=65535)e+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,e+=String.fromCharCode(a>>10|55296),e+=String.fromCharCode(1023&a|56320)}}return e},fromNumber:function(t){var e=t.toString(16);return e.length%2==0?"0x"+e:"0x0"+e},toNumber:function(t){return parseInt(t.slice(2),16)},fromNat:function(t){return"0x0"===t?"0x":t.length%2==0?t:"0x0"+t.slice(2)},toNat:function(t){return"0"===t[2]?"0x"+t.slice(3):t},fromArray:a,toArray:o,fromUint8Array:function(t){return a([].slice.call(t,0))},toUint8Array:function(t){return new Uint8Array(o(t))}}},function(t,e,r){"use strict";(function(e){var n=r(0),i=r(91),o=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(t,e){return t<>>32-e}function u(t,e,r,n,i,o,a){return s(t+(e&r|~e&n)+i+o|0,a)+e|0}function c(t,e,r,n,i,o,a){return s(t+(e&n|r&~n)+i+o|0,a)+e|0}function h(t,e,r,n,i,o,a){return s(t+(e^r^n)+i+o|0,a)+e|0}function f(t,e,r,n,i,o,a){return s(t+(r^(e|~n))+i+o|0,a)+e|0}n(a,i),a.prototype._update=function(){for(var t=o,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,a=this._d;n=f(n=f(n=f(n=f(n=h(n=h(n=h(n=h(n=c(n=c(n=c(n=c(n=u(n=u(n=u(n=u(n,i=u(i,a=u(a,r=u(r,n,i,a,t[0],3614090360,7),n,i,t[1],3905402710,12),r,n,t[2],606105819,17),a,r,t[3],3250441966,22),i=u(i,a=u(a,r=u(r,n,i,a,t[4],4118548399,7),n,i,t[5],1200080426,12),r,n,t[6],2821735955,17),a,r,t[7],4249261313,22),i=u(i,a=u(a,r=u(r,n,i,a,t[8],1770035416,7),n,i,t[9],2336552879,12),r,n,t[10],4294925233,17),a,r,t[11],2304563134,22),i=u(i,a=u(a,r=u(r,n,i,a,t[12],1804603682,7),n,i,t[13],4254626195,12),r,n,t[14],2792965006,17),a,r,t[15],1236535329,22),i=c(i,a=c(a,r=c(r,n,i,a,t[1],4129170786,5),n,i,t[6],3225465664,9),r,n,t[11],643717713,14),a,r,t[0],3921069994,20),i=c(i,a=c(a,r=c(r,n,i,a,t[5],3593408605,5),n,i,t[10],38016083,9),r,n,t[15],3634488961,14),a,r,t[4],3889429448,20),i=c(i,a=c(a,r=c(r,n,i,a,t[9],568446438,5),n,i,t[14],3275163606,9),r,n,t[3],4107603335,14),a,r,t[8],1163531501,20),i=c(i,a=c(a,r=c(r,n,i,a,t[13],2850285829,5),n,i,t[2],4243563512,9),r,n,t[7],1735328473,14),a,r,t[12],2368359562,20),i=h(i,a=h(a,r=h(r,n,i,a,t[5],4294588738,4),n,i,t[8],2272392833,11),r,n,t[11],1839030562,16),a,r,t[14],4259657740,23),i=h(i,a=h(a,r=h(r,n,i,a,t[1],2763975236,4),n,i,t[4],1272893353,11),r,n,t[7],4139469664,16),a,r,t[10],3200236656,23),i=h(i,a=h(a,r=h(r,n,i,a,t[13],681279174,4),n,i,t[0],3936430074,11),r,n,t[3],3572445317,16),a,r,t[6],76029189,23),i=h(i,a=h(a,r=h(r,n,i,a,t[9],3654602809,4),n,i,t[12],3873151461,11),r,n,t[15],530742520,16),a,r,t[2],3299628645,23),i=f(i,a=f(a,r=f(r,n,i,a,t[0],4096336452,6),n,i,t[7],1126891415,10),r,n,t[14],2878612391,15),a,r,t[5],4237533241,21),i=f(i,a=f(a,r=f(r,n,i,a,t[12],1700485571,6),n,i,t[3],2399980690,10),r,n,t[10],4293915773,15),a,r,t[1],2240044497,21),i=f(i,a=f(a,r=f(r,n,i,a,t[8],1873313359,6),n,i,t[15],4264355552,10),r,n,t[6],2734768916,15),a,r,t[13],1309151649,21),i=f(i,a=f(a,r=f(r,n,i,a,t[4],4149444226,6),n,i,t[11],3174756917,10),r,n,t[2],718787259,15),a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a}).call(this,r(1).Buffer)},function(t,e,r){t.exports=i;var n=r(46).EventEmitter;function i(){n.call(this)}r(0)(i,n),i.Readable=r(25),i.Writable=r(227),i.Duplex=r(228),i.Transform=r(229),i.PassThrough=r(230),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(h(),0===n.listenerCount(this,"error"))throw t}function h(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",h),r.removeListener("close",h),t.removeListener("close",h)}return r.on("error",c),t.on("error",c),r.on("end",h),r.on("close",h),t.on("close",h),t.emit("pipe",r),t}},function(t,e,r){"use strict";var n=r(1).Buffer,i=r(0),o=r(91),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<>>32-e}function m(t,e,r,n,i,o,a,s){return p(t+(e^r^n)+o+a|0,s)+i|0}function v(t,e,r,n,i,o,a,s){return p(t+(e&r|~e&n)+o+a|0,s)+i|0}function g(t,e,r,n,i,o,a,s){return p(t+((e|~r)^n)+o+a|0,s)+i|0}function b(t,e,r,n,i,o,a,s){return p(t+(e&n|r&~n)+o+a|0,s)+i|0}function y(t,e,r,n,i,o,a,s){return p(t+(e^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,_=0|this._a,w=0|this._b,M=0|this._c,x=0|this._d,k=0|this._e,S=0;S<80;S+=1){var A,E;S<16?(A=m(r,n,i,o,d,t[s[S]],f[0],c[S]),E=y(_,w,M,x,k,t[u[S]],l[0],h[S])):S<32?(A=v(r,n,i,o,d,t[s[S]],f[1],c[S]),E=b(_,w,M,x,k,t[u[S]],l[1],h[S])):S<48?(A=g(r,n,i,o,d,t[s[S]],f[2],c[S]),E=g(_,w,M,x,k,t[u[S]],l[2],h[S])):S<64?(A=b(r,n,i,o,d,t[s[S]],f[3],c[S]),E=v(_,w,M,x,k,t[u[S]],l[3],h[S])):(A=y(r,n,i,o,d,t[s[S]],f[4],c[S]),E=m(_,w,M,x,k,t[u[S]],l[4],h[S])),r=d,d=o,o=p(i,10),i=n,n=A,_=k,k=x,x=p(M,10),M=w,w=E}var T=this._b+i+x|0;this._b=this._c+o+k|0,this._c=this._d+d+_|0,this._d=this._e+r+w|0,this._e=this._a+n+M|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(231),e.sha1=r(232),e.sha224=r(233),e.sha256=r(92),e.sha384=r(234),e.sha512=r(93)},function(t,e,r){e.pbkdf2=r(237),e.pbkdf2Sync=r(99)},function(t,e,r){"use strict";e.utils=r(240),e.Cipher=r(241),e.DES=r(242),e.CBC=r(243),e.EDE=r(244)},function(t,e,r){var n=r(245),i=r(253),o=r(102);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){var n={ECB:r(246),CBC:r(247),CFB:r(248),CFB8:r(249),CFB1:r(250),OFB:r(251),CTR:r(100),GCM:r(100)},i=r(102);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},function(t,e,r){(function(e){var n=r(3),i=r(21);function o(t,r){var i=function(t){var e=a(t);return{blinder:e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(r),o=r.modulus.byteLength(),s=(n.mont(r.modulus),new n(t).mul(i.blinder).umod(r.modulus)),u=s.toRed(n.mont(r.prime1)),c=s.toRed(n.mont(r.prime2)),h=r.coefficient,f=r.prime1,l=r.prime2,d=u.redPow(r.exponent1),p=c.redPow(r.exponent2);d=d.fromRed(),p=p.fromRed();var m=d.isub(p).imul(h).umod(f);return m.imul(l),p.iadd(m),new e(p.imul(i.unblinder).umod(r.modulus).toArray(!1,o))}function a(t){for(var e=t.modulus.byteLength(),r=new n(i(e));r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new n(i(e));return r}t.exports=o,o.getr=a}).call(this,r(1).Buffer)},function(t,e,r){var n=e;n.utils=r(13),n.common=r(29),n.sha=r(269),n.ripemd=r(273),n.hmac=r(274),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.accountClearState=e.accountChangeNativeCurrency=e.accountChangeLanguage=e.accountUpdateNetwork=e.accountUpdateAccountAddress=e.accountUpdateExchange=e.accountUpdateTransactions=e.accountInitializeState=e.accountUpdateHasPendingTransaction=void 0;var n=l(r(130)),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}(r(32)),o=r(44),a=r(334),s=r(23),u=r(125),c=r(35),h=r(126),f=l(r(34));function l(t){return t&&t.__esModule?t:{default:t}}function d(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function p(t){for(var e=1;e0&&void 0!==arguments[0])||arguments[0];return function(e){e({type:"account/ACCOUNT_UPDATE_HAS_PENDING_TRANSACTION",payload:t})}};e.accountInitializeState=function(){(0,u.getLanguage)().then(function(t){dispatch({type:"account/ACCOUNT_CHANGE_LANGUAGE_SUCCESS",payload:{language:t}})}).catch(function(t){dispatch({type:"account/ACCOUNT_CHANGE_LANGUAGE_FAILURE"})}),(0,u.getNativeCurrency)().then(function(t){dispatch({type:"account/ACCOUNT_INITIALIZE_PRICES_SUCCESS",payload:{nativeCurrency:t}})}).catch(function(t){dispatch({type:"account/ACCOUNT_INITIALIZE_PRICES_FAILURE"})})};e.accountUpdateTransactions=function(t){return function(e,r){e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_REQUEST"});var n=r().account.transactions,i=r().account.network,o=r().account.accountInfo.address,a=r().account.nativeCurrency;(0,s.parseNewTransaction)(t,a).then(function(r){var a=v(n);a=[r].concat(v(a)),(0,u.updateLocalTransactions)(o,a,i),e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_SUCCESS",payload:a}),e(S(t.hash))}).catch(function(t){e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_FAILURE"});var r=(0,s.parseError)(t);e((0,h.notificationShow)(r,!0))})}};e.accountUpdateExchange=function(t){return function(e,r){e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_REQUEST"});var n=r().account.transactions,i=r().account.network,o=r().account.accountInfo.address,a=r().account.nativeCurrency;Promise.all(t.map(function(t){return(0,s.parseNewTransaction)(t,a,o,i)})).then(function(r){var a=v(r.reverse()).concat(v(n));(0,u.updateLocalTransactions)(o,a,i),e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_SUCCESS",payload:a}),t.forEach(function(t){return e(S(t.hash))})}).catch(function(t){e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_FAILURE"});var r=(0,s.parseError)(t);e((0,h.notificationShow)(r,!0))})}};e.accountUpdateAccountAddress=function(t,e){return function(r,n){if(t&&e){var i=n().account.network;n().account.accountType!==e&&r(_()),r({type:"account/ACCOUNT_UPDATE_ACCOUNT_ADDRESS",payload:{accountAddress:t,accountType:e}}),r(M()),r(b(i)),r(k()),r(x()),r(A())}}};var b=function(t){return function(e){(0,c.web3SetHttpProvider)("https://".concat(t,".infura.io/")),e({type:"account/ACCOUNT_UPDATE_NETWORK",payload:t})}};e.accountUpdateNetwork=b;e.accountChangeLanguage=function(t){return function(e){(0,i.updateLanguage)(t),(0,u.saveLanguage)(t).then(function(){e({type:"account/ACCOUNT_CHANGE_LANGUAGE_SUCCESS",payload:{language:t}})}).catch(function(t){e({type:"account/ACCOUNT_CHANGE_LANGUAGE_FAILURE"})})}};e.accountChangeNativeCurrency=function(t){return function(t,e){var r=e().account.prices;r?t(y(r)):(0,u.getNativePrices)().then(function(e){t(y(e))}).catch(function(e){t({type:"account/ACCOUNT_CHANGE_NATIVE_CURRENCY_FAILURE"})})}};var y=function(t){return function(e,r){(0,u.saveNativeCurrency)(nativeCurrency);var n=r().account.accountAddress,i=r().account.network,o=f.default[nativeCurrency],a=r().account.accountInfo,c=p({},t,{selected:o}),h=p({},a,(0,s.parseAccountBalancesPrices)(a,c));(0,u.updateLocalBalances)(n,h,i),e({type:"account/ACCOUNT_CHANGE_NATIVE_CURRENCY_SUCCESS",payload:{nativeCurrency:nativeCurrency,prices:c,accountInfo:h}})}},_=function(){return function(t){clearInterval(g),clearInterval(null),t({type:"account/ACCOUNT_CLEAR_STATE"})}};e.accountClearState=_;var w=function(t){return function(e,r){var n=t.assets.map(function(t){return t.symbol}),i=function(){e({type:"account/ACCOUNT_GET_NATIVE_PRICES_REQUEST",payload:r().account.nativeCurrency}),(0,o.apiGetPrices)(n).then(function(i){var o=i.data,a=r().account.nativePriceRequest,c=r().account.nativeCurrency,h=r().account.network;if(c===a){var f=(0,s.parsePricesObject)(o,n,c),l=(0,s.parseAccountBalancesPrices)(t,f,h);(0,u.updateLocalBalances)(l.address,l,h),(0,u.saveNativePrices)(f),e({type:"account/ACCOUNT_GET_NATIVE_PRICES_SUCCESS",payload:{accountInfo:l,prices:f}})}}).catch(function(t){e({type:"account/ACCOUNT_GET_NATIVE_PRICES_FAILURE"});var r=(0,s.parseError)(t);e((0,h.notificationShow)(r,!0))})};i(),clearInterval(g),g=setInterval(i,15e3)}},M=function(){return function(t){t({type:"account/ACCOUNT_SHAPESHIFT_VERIFY_REQUEST"}),(0,o.apiShapeshiftGetCoins)().then(function(e){e.data;t({type:"account/ACCOUNT_SHAPESHIFT_VERIFY_SUCCESS"})}).catch(function(){return t({type:"account/ACCOUNT_SHAPESHIFT_VERIFY_FAILURE"})})}},x=function(){return function(t,e){var r=e().account,i=r.network,a=r.accountInfo,c=r.accountAddress,f=r.accountType,l=p({},a),d=[];(0,u.getAccountLocal)(c).then(function(e){e&&e[i]&&(e[i].balances&&(l=p({},l,{assets:e[i].balances.assets,total:e[i].balances.total})),e[i].type&&!l.type&&(l.type=e[i].type),e[i].pending&&(d=v(e[i].pending)),e[i].transactions&&(d=n.default.unionBy(d,e[i].transactions,"hash"),(0,u.updateLocalTransactions)(c,d,i)),t({type:"account/ACCOUNT_GET_ACCOUNT_BALANCES_REQUEST",payload:{accountType:l.type||f,accountInfo:l,transactions:d,fetching:e&&!e[i]||!e}})),(0,o.apiGetAccountBalances)(c,i).then(function(e){var r=p({},e.data,{type:f});(0,u.updateLocalBalances)(c,r,i),t({type:"account/ACCOUNT_GET_ACCOUNT_BALANCES_SUCCESS"}),t(w(r))}).catch(function(e){var r=(0,s.parseError)(e);t((0,h.notificationShow)(r,!0)),t({type:"account/ACCOUNT_GET_ACCOUNT_BALANCES_FAILURE"})})}).catch(function(e){var r=(0,s.parseError)(e);t((0,h.notificationShow)(r,!0))})}},k=function(){return function(t,e){var r=e().account,a=r.accountAddress,s=r.network,c=[],f=[];(0,u.getAccountLocal)(a).then(function(r){r&&r[s]&&(r[s].pending&&(c=v(r[s].pending),r[s].pending.forEach(function(e){return t(S(e.hash))})),r[s].transactions&&(f=r[s].transactions,c=n.default.unionBy(c,r[s].transactions,"hash"),(0,u.updateLocalTransactions)(a,c,s))),t({type:"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_REQUEST",payload:{transactions:c,fetchingTransactions:r&&!r[s]||!r||!r[s].transactions||!r[s].transactions.length}});var l=f.length?f[0].hash:"";(0,o.apiGetAccountTransactions)(a,s,l).then(function(r){var i=r.data,o=e().account.accountAddress,a=e().account.transactions,c=n.default.unionBy(i,a,"hash");(0,u.updateLocalTransactions)(o,c,s),t({type:"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_SUCCESS",payload:c})}).catch(function(e){t((0,h.notificationShow)(i.default.t("notification.error.failed_get_account_tx"),!0)),t({type:"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_FAILURE"})})}).catch(function(e){t({type:"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_FAILURE"})})}},S=function(t){return function(e,r){e({type:"account/ACCOUNT_CHECK_TRANSACTION_STATUS_REQUEST"});var n=r().account.network;e(E(t,n))}},A=function(){return function(t,e){var r=e().account.accountAddress;t({type:"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_REQUEST"}),(0,a.apiGetAccountUniqueTokens)(r).then(function(e){t({type:"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_SUCCESS",payload:e})}).catch(function(e){var r=(0,s.parseError)(e);t((0,h.notificationShow)(r,!0)),t({type:"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_FAILURE"})})}},E=function t(e,r){return function(n,i){(0,o.apiGetTransaction)(e,r).then(function(a){var c=a.data;if(c&&!c.error&&("0x"===c.input||"0x"!==c.input&&c.operations&&c.operations.length)){var f=i().account.accountInfo.address,l=i().account.transactions.map(function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){d(o,n,i,a,s,"next",t)}function s(t){d(o,n,i,a,s,"throw",t)}a(void 0)})}}(regeneratorRuntime.mark(function t(r){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r.hash.toLowerCase()!==e.toLowerCase()){t.next=6;break}return t.next=3,(0,s.parseConfirmedTransactions)(c);case 3:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",r);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}());Promise.all(l).then(function(t){var e,i=(e=[]).concat.apply(e,v(t));(0,u.updateLocalTransactions)(f,i,r),n({type:"account/ACCOUNT_CHECK_TRANSACTION_STATUS_SUCCESS",payload:i}),n(function(t,e){var r=e().account,n=r.network,i=r.accountAddress,a=r.accountType;t({type:"account/ACCOUNT_UPDATE_BALANCES_REQUEST"}),(0,o.apiGetAccountBalances)(i,n).then(function(r){var i=r.data,o=e().account.prices,u=p({},i,{type:a}),c=(0,s.parseAccountBalancesPrices)(u,o,n);t({type:"account/ACCOUNT_UPDATE_BALANCES_SUCCESS",payload:c}),t(w(u))}).catch(function(e){var r=(0,s.parseError)(e);t((0,h.notificationShow)(r,!0)),t({type:"account/ACCOUNT_UPDATE_BALANCES_FAILURE"})})})})}else setTimeout(function(){return n(t(e,r))},1e3)}).catch(function(i){setTimeout(function(){return n(t(e,r))},1e3)})}},T={accountType:"",accountAddress:"",accountInfo:{address:"",accountType:"",assets:[{name:"Ethereum",symbol:"ETH",address:null,decimals:18,balance:{amount:"",display:"0.00 ETH"},native:null}],total:null},fetching:!1,fetchingShapeshift:!1,fetchingTransactions:!1,fetchingUniqueTokens:!1,hasPendingTransaction:!1,language:"en",nativePriceRequest:"USD",nativeCurrency:"USD",network:"mainnet",prices:{},shapeshiftAvailable:!0,transactions:[],uniqueTokens:[]};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"account/ACCOUNT_UPDATE_ACCOUNT_ADDRESS":return p({},t,{accountType:e.payload.accountType,accountAddress:e.payload.accountAddress,transactions:[]});case"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_REQUEST":return p({},t,{fetchingTransactions:e.payload.fetchingTransactions,transactions:e.payload.transactions});case"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_SUCCESS":return p({},t,{fetchingTransactions:!1,transactions:e.payload});case"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_FAILURE":return p({},t,{fetchingTransactions:!1});case"account/ACCOUNT_CHECK_TRANSACTION_STATUS_SUCCESS":case"account/ACCOUNT_UPDATE_TRANSACTIONS_SUCCESS":return p({},t,{transactions:e.payload});case"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_REQUEST":return p({},t,{fetchingUniqueTokens:!0});case"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_SUCCESS":return p({},t,{fetchingUniqueTokens:!1,uniqueTokens:e.payload});case"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_FAILURE":return p({},t,{fetchingUniqueTokens:!1});case"account/ACCOUNT_GET_ACCOUNT_BALANCES_REQUEST":return p({},t,{fetching:e.payload.fetching,accountType:e.payload.accountType,accountInfo:e.payload.accountInfo,transactions:e.payload.transactions});case"account/ACCOUNT_GET_ACCOUNT_BALANCES_SUCCESS":case"account/ACCOUNT_GET_ACCOUNT_BALANCES_FAILURE":return p({},t,{fetching:!1});case"account/ACCOUNT_UPDATE_BALANCES_REQUEST":return p({},t,{fetching:!0});case"account/ACCOUNT_UPDATE_BALANCES_SUCCESS":return p({},t,{accountInfo:e.payload,fetching:!1});case"account/ACCOUNT_UPDATE_BALANCES_FAILURE":return p({},t,{fetching:!1});case"account/ACCOUNT_GET_NATIVE_PRICES_REQUEST":return p({},t,{fetchingNativePrices:!0,nativePriceRequest:e.payload});case"account/ACCOUNT_GET_NATIVE_PRICES_SUCCESS":return p({},t,{fetchingNativePrices:!1,nativePriceRequest:"",prices:e.payload.prices,accountInfo:e.payload.accountInfo});case"account/ACCOUNT_GET_NATIVE_PRICES_FAILURE":return p({},t,{fetchingNativePrices:!1,nativePriceRequest:"USD"});case"account/ACCOUNT_INITIALIZE_PRICES_SUCCESS":return p({},t,{nativePriceRequest:e.payload.nativeCurrency,nativeCurrency:e.payload.nativeCurrency});case"account/ACCOUNT_INITIALIZE_PRICES_FAILURE":return p({},t);case"account/ACCOUNT_UPDATE_HAS_PENDING_TRANSACTION":return p({},t,{hasPendingTransaction:e.payload});case"account/ACCOUNT_SHAPESHIFT_VERIFY_REQUEST":return p({},t,{fetchingShapeshift:!0});case"account/ACCOUNT_SHAPESHIFT_VERIFY_SUCCESS":return p({},t,{fetchingShapeshift:!1,shapeshiftAvailable:!0});case"account/ACCOUNT_SHAPESHIFT_VERIFY_FAILURE":return p({},t,{fetchingShapeshift:!1,shapeshiftAvailable:!1});case"account/ACCOUNT_CHANGE_NATIVE_CURRENCY_SUCCESS":return p({},t,{nativeCurrency:e.payload.nativeCurrency,prices:e.payload.prices,accountInfo:e.payload.accountInfo});case"account/ACCOUNT_CHANGE_NATIVE_CURRENCY_FAILURE":return p({},t);case"account/ACCOUNT_CHANGE_LANGUAGE_SUCCESS":return p({},t,{language:e.payload.language});case"account/ACCOUNT_CHANGE_LANGUAGE_FAILURE":return p({},t);case"account/ACCOUNT_CLEAR_STATE":return p({},t,T);default:return t}}},function(t,e,r){t.exports=r(141)},function(t,e,r){"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9999;if(t.length<=e)return t;var r=e-3,n=!1,i=0;return t.split(" ").filter(function(t){return i+=t.length,!(n||i>=r)||(n=!0,!1)}).join(" ")+"..."};var o=function(t,e,r){return r=r||"0",(t+="").length>=e?t:new Array(e-t.length+1).join(r)+t};e.padLeft=o;e.sanitizeHex=function(t){return""===(t="0x"===t.substring(0,2)?t.substring(2):t)?"":"0x"+(t=t.length%2!=0?"0"+t:t)};e.removeHexPrefix=function(t){return t.toLowerCase().replace("0x","")};e.getDataString=function(t,e){for(var r="",n=0;n0&&void 0!==arguments[0]?arguments[0]:"",e=/^(44'\/6[0|1]'\/\d+'?\/)(\d+)$/.exec(t);if(null===e)throw new Error("To get multiple accounts your derivation path must follow pattern 44'/60|61'/x'/n ");return{basePath:e[1],index:parseInt(e[2],10)}};e.getUrlParameter=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"undefined"!=typeof window?window.location.href:"",r=t.replace(/[[]]/g,"\\$&"),n=new RegExp("[?&]"+r+"(=([^&#]*)|&|#|$)").exec(e);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null};var a=function(t){return t.filter(function(t){return"ETH"===t.symbol})[0]};e.getEth=a;e.transactionData=function(t,e,r){var i=a(t.assets),o=i.balance.amount,s=(0,n.convertAmountFromBigNumber)(o),u=(0,n.convertNumberToString)(e),c=r.txFee.value.amount,h=(0,n.convertAmountFromBigNumber)(c);return{ethereum:i,balanceAmount:o,balance:s,requestedAmount:u,txFeeAmount:c,txFee:h,amountWithFees:(0,n.add)(u,h)}};e.calcTxFee=function(t,e,r){var n=t[e],i=n&&n.txFee.native?n.txFee.native.value.display:"$0.00",o="ETH"!==r?" (".concat(n&&n.txFee?n.txFee.value.display:"0.000 ETH",")"):"";return"".concat(i).concat(o)}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){var n=r(169),i=r(170);t.exports=function(t){if("string"==typeof t||"number"==typeof t){var e=new n(1),r=String(t).toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),a=i(r);if("-"===a.substr(0,1)&&(a=i(a.slice(1)),e=new n(-1,10)),!(a=""===a?"0":a).match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||!0===o&&a.match(/^[0-9A-Fa-f]+$/))return new n(a,16).mul(e);if((a.match(/^-?[0-9]+$/)||""===a)&&!1===o)return new n(a,10).mul(e)}else if("object"==typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new n(t.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(t,e,r){var n=r(5),i=r(73),o=r(71),a=r(172),s=r(74),u=function(t){return t instanceof i||t&&t.constructor&&"BN"===t.constructor.name},c=function(t){return t&&t.constructor&&"BigNumber"===t.constructor.name},h=function(t){try{return o.apply(null,arguments)}catch(e){throw new Error(e+' Given value: "'+t+'"')}},f=function(t){return!!/^(0x)?[0-9a-f]{40}$/i.test(t)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(t)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(t))||l(t))},l=function(t){t=t.replace(/^0x/i,"");for(var e=g(t.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(e[r],16)>7&&t[r].toUpperCase()!==t[r]||parseInt(e[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1;return!0},d=function(t){var e="";t=(t=(t=(t=(t=a.encode(t)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r>>4).toString(16)),e.push((15&t[r]).toString(16));return"0x"+e.join("")},isHex:function(t){return(n.isString(t)||n.isNumber(t))&&/^(-0x|0x)?[0-9a-f]*$/i.test(t)},isHexStrict:v,leftPad:function(t,e,r){var n=/^0x/i.test(t)||"number"==typeof t,i=e-(t=t.toString(16).replace(/^0x/i,"")).length+1>=0?e-t.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+t},rightPad:function(t,e,r){var n=/^0x/i.test(t)||"number"==typeof t,i=e-(t=t.toString(16).replace(/^0x/i,"")).length+1>=0?e-t.length+1:0;return(n?"0x":"")+t+new Array(i).join(r||"0")},toTwosComplement:function(t){return"0x"+h(t).toTwos(256).toString(16,64)},sha3:g}},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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(1).Buffer}catch(t){}function s(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 u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(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,c=0,h=r;h1&&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 c=["","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"],h=[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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(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,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(t=t||10,e=0|e||1,16===t||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+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 l=h[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+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!==a),this.toArrayLike(a,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,s,u="le"===e,c=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),c[s]=a;for(;s=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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,b=v>>>13,y=0|a[3],_=8191&y,w=y>>>13,M=0|a[4],x=8191&M,k=M>>>13,S=0|a[5],A=8191&S,E=S>>>13,T=0|a[6],C=8191&T,P=T>>>13,N=0|a[7],O=8191&N,I=N>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,q=L>>>13,z=0|s[0],D=8191&z,F=z>>>13,H=0|s[1],G=8191&H,K=H>>>13,W=0|s[2],V=8191&W,Z=W>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ht=0|s[8],ft=8191&ht,lt=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,D)|0))<<13)|0;c=((o=Math.imul(l,F))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,F))+Math.imul(m,D)|0,o=Math.imul(m,F);var gt=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,D),i=(i=Math.imul(g,F))+Math.imul(b,D)|0,o=Math.imul(b,F),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(_,D),i=(i=Math.imul(_,F))+Math.imul(w,D)|0,o=Math.imul(w,F),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,D),i=(i=Math.imul(x,F))+Math.imul(k,D)|0,o=Math.imul(k,F),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,F))+Math.imul(E,D)|0,o=Math.imul(E,F),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(C,D),i=(i=Math.imul(C,F))+Math.imul(P,D)|0,o=Math.imul(P,F),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,D),i=(i=Math.imul(O,F))+Math.imul(I,D)|0,o=Math.imul(I,F),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,D),i=(i=Math.imul(j,F))+Math.imul(B,D)|0,o=Math.imul(B,F),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,F))+Math.imul(q,D)|0,o=Math.imul(q,F),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,K))+Math.imul(q,G)|0,o=Math.imul(q,K),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(g,ft)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var At=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,Z))+Math.imul(q,V)|0,o=Math.imul(q,Z),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(q,$)|0,o=Math.imul(q,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var Tt=(c+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(j,rt)|0,i=(i=i+Math.imul(j,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(q,ot)|0,o=Math.imul(q,at),n=n+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,lt)|0;var Nt=(c+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(q,ut)|0,o=Math.imul(q,ct),n=n+Math.imul(j,ft)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,lt))+Math.imul(q,ft)|0,o=Math.imul(q,lt);var It=(c+(n=n+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(q,pt)|0))<<13)|0;return c=((o=Math.imul(q,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=bt,u[3]=yt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=kt,u[9]=St,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Nt,u[16]=Ot,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(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)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.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=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&s}return u&&0!==h&&(u.words[u.length++]=h),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)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;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 s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=l)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},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,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(e.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},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,s&=67108863,this.words[a]=s}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,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=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 M(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 v={k256:null,p224:null,p192:null,p25519:null};function g(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 b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(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 x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.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(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.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")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.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)},M.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},M.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)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.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 s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();n(v=0;n--){for(var c=e.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===h)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.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)},x.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)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(14)(t))},function(t,e){var r="0123456789abcdef".split(""),n=[1,256,65536,16777216],i=[0,8,16,24],o=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],a=function(t){var e,r,n,i,a,s,u,c,h,f,l,d,p,m,v,g,b,y,_,w,M,x,k,S,A,E,T,C,P,N,O,I,R,j,B,L,U,q,z,D,F,H,G,K,W,V,Z,X,$,Y,J,Q,tt,et,rt,nt,it,ot,at,st,ut,ct,ht;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],a=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],u=t[3]^t[13]^t[23]^t[33]^t[43],c=t[4]^t[14]^t[24]^t[34]^t[44],h=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],e=(d=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|u>>>31),r=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(u<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(c<<1|h>>>31),r=a^(h<<1|c>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(f<<1|l>>>31),r=u^(l<<1|f>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=c^(d<<1|p>>>31),r=h^(p<<1|d>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=f^(i<<1|a>>>31),r=l^(a<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,m=t[0],v=t[1],V=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,C=t[20]<<3|t[21]>>>29,P=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,G=t[41]<<18|t[40]>>>14,j=t[2]<<1|t[3]>>>31,B=t[3]<<1|t[2]>>>31,g=t[13]<<12|t[12]>>>20,b=t[12]<<12|t[13]>>>20,X=t[22]<<10|t[23]>>>22,$=t[23]<<10|t[22]>>>22,N=t[33]<<13|t[32]>>>19,O=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ht=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,U=t[15]<<6|t[14]>>>26,y=t[25]<<11|t[24]>>>21,_=t[24]<<11|t[25]>>>21,Y=t[34]<<15|t[35]>>>17,J=t[35]<<15|t[34]>>>17,I=t[45]<<29|t[44]>>>3,R=t[44]<<29|t[45]>>>3,S=t[6]<<28|t[7]>>>4,A=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,q=t[26]<<25|t[27]>>>7,z=t[27]<<25|t[26]>>>7,w=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,Q=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,K=t[8]<<27|t[9]>>>5,W=t[9]<<27|t[8]>>>5,E=t[18]<<20|t[19]>>>12,T=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,D=t[38]<<8|t[39]>>>24,F=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,k=t[49]<<14|t[48]>>>18,t[0]=m^~g&y,t[1]=v^~b&_,t[10]=S^~E&C,t[11]=A^~T&P,t[20]=j^~L&q,t[21]=B^~U&z,t[30]=K^~V&X,t[31]=W^~Z&$,t[40]=et^~nt&ot,t[41]=rt^~it&at,t[2]=g^~y&w,t[3]=b^~_&M,t[12]=E^~C&N,t[13]=T^~P&O,t[22]=L^~q&D,t[23]=U^~z&F,t[32]=V^~X&Y,t[33]=Z^~$&J,t[42]=nt^~ot&st,t[43]=it^~at&ut,t[4]=y^~w&x,t[5]=_^~M&k,t[14]=C^~N&I,t[15]=P^~O&R,t[24]=q^~D&H,t[25]=z^~F&G,t[34]=X^~Y&Q,t[35]=$^~J&tt,t[44]=ot^~st&ct,t[45]=at^~ut&ht,t[6]=w^~x&m,t[7]=M^~k&v,t[16]=N^~I&S,t[17]=O^~R&A,t[26]=D^~H&j,t[27]=F^~G&B,t[36]=Y^~Q&K,t[37]=J^~tt&W,t[46]=st^~ct&et,t[47]=ut^~ht&rt,t[8]=x^~m&g,t[9]=k^~v&b,t[18]=I^~S&E,t[19]=R^~A&T,t[28]=H^~j&L,t[29]=G^~B&U,t[38]=Q^~K&V,t[39]=tt^~W&Z,t[48]=ct^~et&nt,t[49]=ht^~rt&it,t[0]^=o[n],t[1]^=o[n+1]},s=function(t){return function(e){var o;if("0x"===e.slice(0,2)){o=[];for(var s=2,u=e.length;s>2]|=e[d]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(u[v>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=c){for(t.start=v-c,t.block=u[h],v=0;v>2]|=n[3&v],t.lastByteIndex===c)for(u[0]=u[h],v=1;v>4&15]+r[15&p]+r[p>>12&15]+r[p>>8&15]+r[p>>20&15]+r[p>>16&15]+r[p>>28&15]+r[p>>24&15];g%h==0&&(a(l),v=0)}return"0x"+m}(function(t){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(t<<1)>>5,outputBlocks:t>>5,s:function(t){return[].concat(t,t,t,t,t)}([0,0,0,0,0,0,0,0,0,0])}}(t),o)}};t.exports={keccak256:s(256),keccak512:s(512),keccak256s:s(256),keccak512s:s(512)}},function(t,e,r){"use strict";var n=r(10),i=r(177),o=function(t){var e="A".charCodeAt(0),r="Z".charCodeAt(0);return(t=(t=t.toUpperCase()).substr(4)+t.substr(0,4)).split("").map(function(t){var n=t.charCodeAt(0);return n>=e&&n<=r?n-e+10:t}).join("")},a=function(t){for(var e,r=t;r.length>2;)e=r.slice(0,9),r=parseInt(e,10)%97+r.slice(e.length);return parseInt(r,10)%97},s=function(t){this._iban=t};s.toAddress=function(t){if(!(t=new s(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()},s.toIban=function(t){return s.fromAddress(t).toString()},s.fromAddress=function(t){if(!n.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var e=function(t,e){for(var r=t;r.length<2*e;)r="0"+r;return r}(new i(t,16).toString(36),15);return s.fromBban(e.toUpperCase())},s.fromBban=function(t){var e=("0"+(98-a(o("XE00"+t)))).slice(-2);return new s("XE"+e+t)},s.createIndirect=function(t){return s.fromBban("ETH"+t.institution+t.identifier)},s.isValid=function(t){return new s(t).isValid()},s.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(o(this._iban))},s.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},s.prototype.isIndirect=function(){return 20===this._iban.length},s.prototype.checksum=function(){return this._iban.substr(2,2)},s.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},s.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},s.prototype.toAddress=function(){if(this.isDirect()){var t=this._iban.substr(4),e=new i(t,36);return n.toChecksumAddress(e.toString(16,20))}return""},s.prototype.toString=function(){return this._iban},t.exports=s},function(t,e,r){"use strict";var n={messageId:0,toPayload:function(t,e){if(!t)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(e)+'"!');return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:t,params:e||[]}},isValidResponse:function(t){return Array.isArray(t)?t.every(e):e(t);function e(t){return!(!t||t.error||"2.0"!==t.jsonrpc||"number"!=typeof t.id&&"string"!=typeof t.id||void 0===t.result)}},toBatchPayload:function(t){return t.map(function(t){return n.toPayload(t.method,t.params)})}};t.exports=n},function(t,e,r){(function(t){var n=r(192),i=r(79),o=r(84),a=r(201),s=r(24),u=e;u.request=function(e,r){e="string"==typeof e?s.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,h=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+h,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(4))},function(t,e,r){(function(t){e.fetch=s(t.fetch)&&s(t.ReadableStream),e.writableStream=s(t.WritableStream),e.abortController=s(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(t){}var r;function n(){if(void 0!==r)return r;if(t.XMLHttpRequest){r=new t.XMLHttpRequest;try{r.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(t){r=null}}else r=null;return r}function i(t){var e=n();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var o=void 0!==t.ArrayBuffer,a=o&&s(t.ArrayBuffer.prototype.slice);function s(t){return"function"==typeof t}e.arraybuffer=e.fetch||o&&i("arraybuffer"),e.msstream=!e.fetch&&a&&i("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o&&i("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!n()&&s(n().overrideMimeType),e.vbArray=s(t.VBArray),r=null}).call(this,r(4))},function(t,e,r){(function(t,n,i){var o=r(78),a=r(0),s=r(25),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=e.IncomingMessage=function(e,r,a,u){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){t.nextTick(function(){c.emit("close")})}),"fetch"===a){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach(function(t,e){c.headers[e.toLowerCase()]=t,c.rawHeaders.push(e,t)}),o.writableStream){var h=new WritableStream({write:function(t){return new Promise(function(e,r){c._destroyed?r():c.push(new n(t))?e():c._resumeFetch=e})},close:function(){i.clearTimeout(u),c._destroyed||c.push(null)},abort:function(t){c._destroyed||c.emit("error",t)}});try{return void r.body.pipeTo(h).catch(function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)})}catch(t){}}var f=r.body.getReader();!function t(){f.read().then(function(e){if(!c._destroyed){if(e.done)return i.clearTimeout(u),void c.push(null);c.push(new n(e.value)),t()}}).catch(function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)})}()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(e[2])):void 0!==c.headers[r]?c.headers[r]+=", "+e[2]:c.headers[r]=e[2],c.rawHeaders.push(e[1],e[2])}}),c._charset="x-user-defined",!o.overrideMimeType){var l=c.rawHeaders["mime-type"];if(l){var d=l.match(/;\s*charset=([^;])(;|$)/);d&&(c._charset=d[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},c.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==u.DONE)break;try{r=new i.VBArray(e.responseBody).toArray()}catch(t){}if(null!==r){t.push(new n(r));break}case"text":try{r=e.responseText}catch(e){t._mode="text:vbarray";break}if(r.length>t._pos){var o=r.substr(t._pos);if("x-user-defined"===t._charset){for(var a=new n(o.length),s=0;st._pos&&(t.push(new n(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,r(8),r(1).Buffer,r(4))},function(t,e,r){"use strict";(function(e,n){var i=r(36);t.exports=y;var o,a=r(70);y.ReadableState=b;r(46).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=r(81),c=r(2).Buffer,h=e.Uint8Array||function(){};var f=r(26);f.inherits=r(0);var l=r(193),d=void 0;d=l&&l.debuglog?l.debuglog("stream"):function(){};var p,m=r(194),v=r(82);f.inherits(y,u);var g=["error","close","destroy","pause","resume"];function b(t,e){o=o||r(18),t=t||{};var n=e instanceof o;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(48).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(o=o||r(18),!(this instanceof y))return new y(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function _(t,e,r,n,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,k(t)}(t,a)):(i||(o=function(t,e){var r;(function(t){return c.isBuffer(t)||t instanceof h})(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?w(t,a,e,!1):A(t,a)):w(t,a,e,!1))):n||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=M?t=M:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){d("emit readable"),t.emit("readable"),P(t)}function A(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(E,t,e))}function E(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function O(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(I,e,t))}function I(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?O(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&O(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?N(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&O(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?h:y;function c(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",g),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",v),t.removeListener("unpipe",c),r.removeListener("end",h),r.removeListener("end",y),r.removeListener("data",m),l=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function h(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",c);var f=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,P(t))}}(r);t.on("drain",f);var l=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==R(o.pipes,t))&&!l&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function v(e){d("onerror",e),y(),t.removeListener("error",v),0===s(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",b),y()}function b(){d("onfinish"),t.removeListener("close",g),y()}function y(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",v),t.once("close",g),t.once("finish",b),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){var n=r(0),i=r(22),o=r(2).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function f(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0|this._f,m=0|this._g,v=0|this._h,g=0;g<16;++g)e[g]=t.readInt32BE(4*g);for(;g<64;++g)e[g]=p(e[g-2])+e[g-7]+d(e[g-15])+e[g-16]|0;for(var b=0;b<64;++b){var y=v+l(s)+c(s,u,m)+a[b]+e[b]|0,_=f(r)+h(r,n,i)|0;v=m,m=u,u=s,s=o+y|0,o=i,i=n,n=r,r=y+_|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=u+this._f|0,this._g=m+this._g|0,this._h=v+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var n=r(0),i=r(22),o=r(2).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function f(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function v(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function g(t,e){return t>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,y=0|this._hh,_=0|this._al,w=0|this._bl,M=0|this._cl,x=0|this._dl,k=0|this._el,S=0|this._fl,A=0|this._gl,E=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var C=e[T-30],P=e[T-30+1],N=d(C,P),O=p(P,C),I=m(C=e[T-4],P=e[T-4+1]),R=v(P,C),j=e[T-14],B=e[T-14+1],L=e[T-32],U=e[T-32+1],q=O+B|0,z=N+j+g(q,O)|0;z=(z=z+I+g(q=q+R|0,R)|0)+L+g(q=q+U|0,U)|0,e[T]=z,e[T+1]=q}for(var D=0;D<160;D+=2){z=e[D],q=e[D+1];var F=h(r,n,i),H=h(_,w,M),G=f(r,_),K=f(_,r),W=l(s,k),V=l(k,s),Z=a[D],X=a[D+1],$=c(s,u,b),Y=c(k,S,A),J=E+V|0,Q=y+W+g(J,E)|0;Q=(Q=(Q=Q+$+g(J=J+Y|0,Y)|0)+Z+g(J=J+X|0,X)|0)+z+g(J=J+q|0,q)|0;var tt=K+H|0,et=G+F+g(tt,K)|0;y=b,E=A,b=u,A=S,u=s,S=k,s=o+Q+g(k=x+J|0,x)|0,o=i,x=M,i=n,M=w,n=r,w=_,r=Q+et+g(_=J+tt|0,J)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+M|0,this._dl=this._dl+x|0,this._el=this._el+k|0,this._fl=this._fl+S|0,this._gl=this._gl+A|0,this._hl=this._hl+E|0,this._ah=this._ah+r+g(this._al,_)|0,this._bh=this._bh+n+g(this._bl,w)|0,this._ch=this._ch+i+g(this._cl,M)|0,this._dh=this._dh+o+g(this._dl,x)|0,this._eh=this._eh+s+g(this._el,k)|0,this._fh=this._fh+u+g(this._fl,S)|0,this._gh=this._gh+b+g(this._gl,A)|0,this._hh=this._hh+y+g(this._hl,E)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){"use strict";var n=r(0),i=r(235),o=r(15),a=r(2).Buffer,s=r(95),u=r(53),c=r(54),h=a.alloc(128);function f(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:c(t)).update(e).digest():e.lengthr||o!=o)throw new TypeError("Bad key length")}}).call(this,r(1).Buffer)},function(t,e,r){(function(e){var r;e.browser?r="utf-8":r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=r}).call(this,r(8))},function(t,e,r){var n=r(95),i=r(53),o=r(54),a=r(97),s=r(98),u=r(2).Buffer,c=u.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(t,e,r){var a=function(t){return"rmd160"===t||"ripemd160"===t?i:"md5"===t?n:function(e){return o(t).update(e).digest()}}(t),s="sha512"===t||"sha384"===t?128:64;e.length>s?e=a(e):e.lengtht;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(c))for(;r.mod(h).cmp(f);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(v(p=r.shrn(1))&&v(r)&&g(p)&&g(r)&&a.test(p)&&a.test(r))return r}}},function(t,e,r){var n=r(3),i=r(107);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),a=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),h=s.toRed(o);e>0;e--){var f=this._randrange(new n(2),s);r&&r(f);var l=f.toRed(o).redPow(c);if(0!==l.cmp(a)&&0!==l.cmp(h)){for(var d=1;d0;e--){var h=this._randrange(new n(2),a),f=t.gcd(h);if(0!==f.cmpn(1))return f;var l=h.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(c)){for(var d=1;d>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,r){"use strict";var n=r(13).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?a(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=a,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,e,r){"use strict";var n=r(13),i=r(29),o=r(109),a=r(11),s=n.sum32,u=n.sum32_4,c=n.sum32_5,h=o.ch32,f=o.maj32,l=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,v=i.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(b,v),t.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function f(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=s.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var u=1,c=n.length;c>=256;c>>=8)u++;(o=new i(2+u))[0]=a,o[1]=128|u;c=1+u;for(var h=n.length;h>0;c--,h>>=8)o[c]=255&h;return this._createEncoderBuffer([o,n])},c.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new i(2*t.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(n=0;n=128;a>>=7)o++}var s=new i(o),u=s.length-1;for(n=t.length-1;n>=0;n--){a=t[n];for(s[u--]=127&a;(a>>=7)>0;)s[u--]=128|127&a}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[h(n.getFullYear()),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[h(n.getFullYear()%100),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new i(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=new i(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);n=1;for(var a=t;a>=256;a>>=8)n++;for(a=(o=new Array(n)).length-1;a>=0;a--)o[a]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},c.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},c.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n="80"?r(n.length/2,128):"")+n}var i=e.map(t).join("");return r(i.length/2,192)+i}(t)},decode:function(t){var e=2,r=function(){if(e>=t.length)throw"";var r=t.slice(e,e+2);return r<"80"?(e+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(t.slice(e,e+=2),16)%64;return r<56?r:parseInt(t.slice(e,e+=2*(r-55)),16)},i=function(){var r=n();return"0x"+t.slice(e,e+=2*r)},o=function(){for(var t=2*n()+e,i=[];e>>31),r=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(u<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(c<<1|h>>>31),r=a^(h<<1|c>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(f<<1|l>>>31),r=u^(l<<1|f>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=c^(d<<1|p>>>31),r=h^(p<<1|d>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=f^(i<<1|a>>>31),r=l^(a<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,m=t[0],v=t[1],V=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,C=t[20]<<3|t[21]>>>29,P=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,G=t[41]<<18|t[40]>>>14,j=t[2]<<1|t[3]>>>31,B=t[3]<<1|t[2]>>>31,g=t[13]<<12|t[12]>>>20,b=t[12]<<12|t[13]>>>20,X=t[22]<<10|t[23]>>>22,$=t[23]<<10|t[22]>>>22,N=t[33]<<13|t[32]>>>19,O=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ht=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,U=t[15]<<6|t[14]>>>26,y=t[25]<<11|t[24]>>>21,_=t[24]<<11|t[25]>>>21,Y=t[34]<<15|t[35]>>>17,J=t[35]<<15|t[34]>>>17,I=t[45]<<29|t[44]>>>3,R=t[44]<<29|t[45]>>>3,S=t[6]<<28|t[7]>>>4,A=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,q=t[26]<<25|t[27]>>>7,z=t[27]<<25|t[26]>>>7,w=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,Q=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,K=t[8]<<27|t[9]>>>5,W=t[9]<<27|t[8]>>>5,E=t[18]<<20|t[19]>>>12,T=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,D=t[38]<<8|t[39]>>>24,F=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,k=t[49]<<14|t[48]>>>18,t[0]=m^~g&y,t[1]=v^~b&_,t[10]=S^~E&C,t[11]=A^~T&P,t[20]=j^~L&q,t[21]=B^~U&z,t[30]=K^~V&X,t[31]=W^~Z&$,t[40]=et^~nt&ot,t[41]=rt^~it&at,t[2]=g^~y&w,t[3]=b^~_&M,t[12]=E^~C&N,t[13]=T^~P&O,t[22]=L^~q&D,t[23]=U^~z&F,t[32]=V^~X&Y,t[33]=Z^~$&J,t[42]=nt^~ot&st,t[43]=it^~at&ut,t[4]=y^~w&x,t[5]=_^~M&k,t[14]=C^~N&I,t[15]=P^~O&R,t[24]=q^~D&H,t[25]=z^~F&G,t[34]=X^~Y&Q,t[35]=$^~J&tt,t[44]=ot^~st&ct,t[45]=at^~ut&ht,t[6]=w^~x&m,t[7]=M^~k&v,t[16]=N^~I&S,t[17]=O^~R&A,t[26]=D^~H&j,t[27]=F^~G&B,t[36]=Y^~Q&K,t[37]=J^~tt&W,t[46]=st^~ct&et,t[47]=ut^~ht&rt,t[8]=x^~m&g,t[9]=k^~v&b,t[18]=I^~S&E,t[19]=R^~A&T,t[28]=H^~j&L,t[29]=G^~B&U,t[38]=Q^~K&V,t[39]=tt^~W&Z,t[48]=ct^~et&nt,t[49]=ht^~rt&it,t[0]^=o[n],t[1]^=o[n+1]},s=function(t){return function(e){var o;if("0x"===e.slice(0,2)){o=[];for(var s=2,u=e.length;s>2]|=e[d]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(u[v>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=c){for(t.start=v-c,t.block=u[h],v=0;v>2]|=n[3&v],t.lastByteIndex===c)for(u[0]=u[h],v=1;v>4&15]+r[15&p]+r[p>>12&15]+r[p>>8&15]+r[p>>20&15]+r[p>>16&15]+r[p>>28&15]+r[p>>24&15];g%h==0&&(a(l),v=0)}return"0x"+m}(function(t){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(t<<1)>>5,outputBlocks:t>>5,s:function(t){return[].concat(t,t,t,t,t)}([0,0,0,0,0,0,0,0,0,0])}}(t),o)}};t.exports={keccak256:s(256),keccak512:s(512),keccak256s:s(256),keccak512s:s(512)}},function(t,e,r){"use strict"; +var r=n(443),i=n(444),o=n(181);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.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 n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(r)return D(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var h=!0,l=0;li&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function k(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,h=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=h}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,n);case"utf8":case"utf-8":return k(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,a=n-e,s=Math.min(o,a),c=this.slice(r,i),f=t.slice(e,n),h=0;hi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return M(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function E(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,n,r,i,o){if(!u.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 I(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function j(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,r,o){return o||j(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return o||j(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if(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);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||N(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(10))},function(t,e,n){var r=n(2),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(101)("wks"),i=n(45),o=n(5).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(532).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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 n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&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 c=["","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"],f=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}n.words[c]=0|h,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(t=t||10,e=0|e||1,16===t||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=0;nt.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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,y=v>>>13,b=0|a[3],_=8191&b,w=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],A=8191&k,E=k>>>13,T=0|a[6],C=8191&T,P=T>>>13,O=0|a[7],N=8191&O,I=O>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,F=L>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],G=8191&H,W=H>>>13,V=0|s[2],K=8191&V,Z=V>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],ht=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var vt=(c+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var gt=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,q),i=(i=Math.imul(g,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),r=r+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(S,q)|0,o=Math.imul(S,z),r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(A,q),i=(i=Math.imul(A,z))+Math.imul(E,q)|0,o=Math.imul(E,z),r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(_,K)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(l,nt)|0))<<13)|0;c=((o=o+Math.imul(l,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(P,q)|0,o=Math.imul(P,z),r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(I,q)|0,o=Math.imul(I,z),r=r+Math.imul(C,G)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Y)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(C,K)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var St=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(U,G),i=(i=Math.imul(U,W))+Math.imul(F,G)|0,o=Math.imul(F,W),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,Z)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var At=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,Z))+Math.imul(F,K)|0,o=Math.imul(F,Z),r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,r=r+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(r=r+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,r=r+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,lt)|0;var Tt=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(B,nt)|0,o=o+Math.imul(B,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(U,nt),i=(i=Math.imul(U,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,r=r+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var Ot=(c+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),r=r+Math.imul(j,ht)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Nt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(r=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=yt,u[3]=bt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Ot,u[16]=Nt,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?l(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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(r("number"==typeof t),r(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)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(i,l,h);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(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 M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(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 y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):n.strip(),n},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(y,g),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var h=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,n(40)(t))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(7),i=n(143),o=n(41),a=Object.defineProperty;e.f=n(12)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(38),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r;(function(){var n=this,i=n._,o=Array.prototype,a=Object.prototype,s=Function.prototype,u=o.push,c=o.slice,f=a.toString,h=a.hasOwnProperty,l=Array.isArray,d=Object.keys,p=s.bind,m=Object.create,v=function(){},g=function(t){return t instanceof g?t:this instanceof g?void(this._wrapped=t):new g(t)};void 0!==t&&t.exports&&(e=t.exports=g),e._=g,g.VERSION="1.8.3";var y=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},b=function(t,e,n){return null==t?g.identity:g.isFunction(t)?y(t,e,n):g.isObject(t)?g.matcher(t):g.property(t)};g.iteratee=function(t,e){return b(t,e,1/0)};var _=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i=0&&e<=x};function A(t){return function(e,n,r,i){n=y(n,i,4);var o=!k(e)&&g.keys(e),a=(o||e).length,s=t>0?0:a-1;return arguments.length<3&&(r=e[o?o[s]:s],s+=t),function(e,n,r,i,o,a){for(;o>=0&&o=0},g.invoke=function(t,e){var n=c.call(arguments,2),r=g.isFunction(e);return g.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},g.pluck=function(t,e){return g.map(t,g.property(e))},g.where=function(t,e){return g.filter(t,g.matcher(e))},g.findWhere=function(t,e){return g.find(t,g.matcher(e))},g.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e&&null!=t)for(var s=0,u=(t=k(t)?t:g.values(t)).length;so&&(o=r);else e=b(e,n),g.each(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},g.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e&&null!=t)for(var s=0,u=(t=k(t)?t:g.values(t)).length;sr||void 0===n)return 1;if(n0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,a,s),g.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&oe?(a&&(clearTimeout(a),a=null),s=c,o=t.apply(r,i),a||(r=i=null)):a||!1===n.trailing||(a=setTimeout(u,f)),o}},g.debounce=function(t,e,n){var r,i,o,a,s,u=function(){var c=g.now()-a;c=0?r=setTimeout(u,e-c):(r=null,n||(s=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=g.now();var c=n&&!r;return r||(r=setTimeout(u,e)),c&&(s=t.apply(o,i),o=i=null),s}},g.wrap=function(t,e){return g.partial(e,t)},g.negate=function(t){return function(){return!t.apply(this,arguments)}},g.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},g.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},g.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},g.once=g.partial(g.before,2);var N=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function R(t,e){var n=I.length,r=t.constructor,i=g.isFunction(r)&&r.prototype||a,o="constructor";for(g.has(t,o)&&!g.contains(e,o)&&e.push(o);n--;)(o=I[n])in t&&t[o]!==i[o]&&!g.contains(e,o)&&e.push(o)}g.keys=function(t){if(!g.isObject(t))return[];if(d)return d(t);var e=[];for(var n in t)g.has(t,n)&&e.push(n);return N&&R(t,e),e},g.allKeys=function(t){if(!g.isObject(t))return[];var e=[];for(var n in t)e.push(n);return N&&R(t,e),e},g.values=function(t){for(var e=g.keys(t),n=e.length,r=Array(n),i=0;i":">",'"':""","'":"'","`":"`"},L=g.invert(B),U=function(t){var e=function(e){return t[e]},n="(?:"+g.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};g.escape=U(B),g.unescape=U(L),g.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),g.isFunction(r)?r.call(t):r};var F=0;g.uniqueId=function(t){var e=++F+"";return t?t+e:e},g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+q[t]};g.template=function(t,e,n){!e&&n&&(e=n),e=g.defaults({},e,g.templateSettings);var r=RegExp([(e.escape||D).source,(e.interpolate||D).source,(e.evaluate||D).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,a,s){return o+=t.slice(i,s).replace(z,H),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var s=function(t){return a.call(this,t,g)},u=e.variable||"obj";return s.source="function("+u+"){\n"+o+"}",s},g.chain=function(t){var e=g(t);return e._chain=!0,e};var G=function(t,e){return t._chain?g(e).chain():e};g.mixin=function(t){g.each(g.functions(t),function(e){var n=g[e]=t[e];g.prototype[e]=function(){var t=[this._wrapped];return u.apply(t,arguments),G(this,n.apply(g,t))}})},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];g.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],G(this,n)}}),g.each(["concat","join","slice"],function(t){var e=o[t];g.prototype[t]=function(){return G(this,e.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return""+this._wrapped},void 0===(r=function(){return g}.apply(e,[]))||(t.exports=r)}).call(this)},function(t,e,n){"use strict";var r=n(439),i=n(440);t.exports={errors:r,formatters:i}},function(t,e,n){"use strict";var r=e;r.version=n(538).version,r.utils=n(539),r.rand=n(218),r.curve=n(98),r.curves=n(544),r.ec=n(552),r.eddsa=n(556)},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],f=!1,h=-1;function l(){f&&u&&(f=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!f){var t=s(l);f=!0;for(var e=c.length;e;){for(u=c,c=[];++h1)for(var n=1;n"+i+""};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(11),i=n(44);t.exports=n(12)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(66),i=n(37);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(37);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(174),i=n(418),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return null!==t&&"object"==typeof t}function u(t){return"[object Function]"===o.call(t)}function c(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n7?n+=t[r].toUpperCase():n+=t[r];return n},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:u,toAscii:u,asciiToHex:c,fromAscii:c,unitMap:i.unitMap,toWei:function(t,e){if(e=f(e),!o.isBN(t)&&!r.isString(t))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(t)?i.toWei(t,e):i.toWei(t,e).toString(10)},fromWei:function(t,e){if(e=f(e),!o.isBN(t)&&!r.isString(t))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(t)?i.fromWei(t,e):i.fromWei(t,e).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement}},function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=n,n.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var r=n(67),i=n(44),o=n(23),a=n(41),s=n(21),u=n(143),c=Object.getOwnPropertyDescriptor;e.f=n(12)?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(0),i=n(13),o=n(4);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(34),i=n(66),o=n(24),a=n(14),s=n(331);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,f=4==t,h=6==t,l=5==t||h,d=e||s;return function(e,s,p){for(var m,v,g=o(e),y=i(g),b=r(s,p,3),_=a(y.length),w=0,M=n?d(e,_):u?d(e,0):void 0;_>w;w++)if((l||w in y)&&(v=b(m=y[w],w,g),t))if(n)M[w]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return w;case 2:M.push(m)}else if(f)return!1;return h?-1:c||f?f:M}}},function(t,e,n){var r=n(15),i=n(26),o=n(492),a=n(201),s=function(t){return r.isNumber(t)&&(t=Math.trunc(t)),new a(i.toTwosComplement(t).replace("0x",""))};t.exports={formatInputInt:s,formatInputBytes:function(t){if(!i.isHexStrict(t))throw new Error('Given parameter is not bytes: "'+t+'"');var e=t.replace(/^0x/i,"");if(e.length%2!=0)throw new Error('Given parameter bytes has an invalid length: "'+t+'"');if(e.length>64)throw new Error('Given parameter bytes is too long: "'+t+'"');var n=Math.floor((e.length+63)/64);return e=i.padRight(e,64*n),new a(e)},formatInputDynamicBytes:function(t){if(!i.isHexStrict(t))throw new Error('Given parameter is not bytes: "'+t+'"');var e=t.replace(/^0x/i,"");if(e.length%2!=0)throw new Error('Given parameter bytes has an invalid length: "'+t+'"');var n=e.length/2,r=Math.floor((e.length+63)/64);return e=i.padRight(e,64*r),new a(s(n).value+e)},formatInputString:function(t){if(!r.isString(t))throw new Error("Given parameter is not a valid string: "+t);var e=i.utf8ToHex(t).replace(/^0x/i,""),n=e.length/2,o=Math.floor((e.length+63)/64);return e=i.padRight(e,64*o),new a(s(n).value+e)},formatInputBool:function(t){return new a("000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0"))},formatOutputInt:function(t){var e=t.staticPart();if(!e&&!t.rawValue)throw new Error("Couldn't decode "+name+" from ABI: 0x"+t.rawValue);return function(t){return"1"===new o(t.substr(0,1),16).toString(2).substr(0,1)}(e)?new o(e,16).fromTwos(256).toString(10):new o(e,16).toString(10)},formatOutputUInt:function(t,e){var n=t.staticPart();if(!n&&!t.rawValue)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);return new o(n,16).toString(10)},formatOutputBool:function(t,e){var n=t.staticPart();if(!n&&!t.rawValue)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);return"0000000000000000000000000000000000000000000000000000000000000001"===n},formatOutputBytes:function(t,e){var n=e.match(/^bytes([0-9]*)/),r=parseInt(n[1]);if(t.staticPart().slice(0,2*r).length!==2*r)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue+" The size doesn't match.");return"0x"+t.staticPart().slice(0,2*r)},formatOutputDynamicBytes:function(t,e){var n=t.dynamicPart().slice(0,64);if(!n)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);var r=2*new o(n,16).toNumber();return"0x"+t.dynamicPart().substr(64,r)},formatOutputString:function(t){var e=t.dynamicPart().slice(0,64);if(!e)throw new Error("ERROR: The returned value is not a convertible string:"+e);var n=2*new o(e,16).toNumber();return n?i.hexToUtf8("0x"+t.dynamicPart().substr(64,n).replace(/^0x/i,"")):""},formatOutputAddress:function(t,e){var n=t.staticPart();if(!n)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);return i.toChecksumAddress("0x"+n.slice(n.length-40,n.length))},toTwosComplement:i.toTwosComplement}},function(t,e,n){"use strict";var r=n(27),i=n(1);function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function s(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),r=0;r>8,a=255&i;o?n.push(o,a):n.push(a)}else for(r=0;r>>0}return a},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,a=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,a,s){var u=0,c=e;return u+=(c=c+r>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,n,r,i,o,a,s){return e+r+o+s>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,a,s,u,c){var f=0,h=e;return f+=(h=h+r>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,n,r,i,o,a,s,u,c){return e+r+o+s+c>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},function(t,e,n){var r=n(35);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.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){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";if(n(12)){var r=n(46),i=n(5),o=n(4),a=n(0),s=n(87),u=n(124),c=n(34),f=n(61),h=n(44),l=n(22),d=n(62),p=n(38),m=n(14),v=n(168),g=n(48),y=n(41),b=n(21),_=n(79),w=n(6),M=n(24),x=n(117),S=n(49),k=n(51),A=n(50).f,E=n(119),T=n(45),C=n(8),P=n(31),O=n(77),N=n(84),I=n(121),R=n(58),j=n(81),B=n(60),L=n(120),U=n(160),F=n(11),D=n(29),q=F.f,z=D.f,H=i.RangeError,G=i.TypeError,W=i.Uint8Array,V=Array.prototype,K=u.ArrayBuffer,Z=u.DataView,X=P(0),$=P(2),Y=P(3),J=P(4),Q=P(5),tt=P(6),et=O(!0),nt=O(!1),rt=I.values,it=I.keys,ot=I.entries,at=V.lastIndexOf,st=V.reduce,ut=V.reduceRight,ct=V.join,ft=V.sort,ht=V.slice,lt=V.toString,dt=V.toLocaleString,pt=C("iterator"),mt=C("toStringTag"),vt=T("typed_constructor"),gt=T("def_constructor"),yt=s.CONSTR,bt=s.TYPED,_t=s.VIEW,wt=P(1,function(t,e){return At(N(t,t[gt]),e)}),Mt=o(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),xt=!!W&&!!W.prototype.set&&o(function(){new W(1).set({})}),St=function(t,e){var n=p(t);if(n<0||n%e)throw H("Wrong offset!");return n},kt=function(t){if(w(t)&&bt in t)return t;throw G(t+" is not a typed array!")},At=function(t,e){if(!(w(t)&&vt in t))throw G("It is not a typed array constructor!");return new t(e)},Et=function(t,e){return Tt(N(t,t[gt]),e)},Tt=function(t,e){for(var n=0,r=e.length,i=At(t,r);r>n;)i[n]=e[n++];return i},Ct=function(t,e,n){q(t,e,{get:function(){return this._d[n]}})},Pt=function(t){var e,n,r,i,o,a,s=M(t),u=arguments.length,f=u>1?arguments[1]:void 0,h=void 0!==f,l=E(s);if(void 0!=l&&!x(l)){for(a=l.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(h&&u>2&&(f=c(f,arguments[2],2)),e=0,n=m(s.length),i=At(this,n);n>e;e++)i[e]=h?f(s[e],e):s[e];return i},Ot=function(){for(var t=0,e=arguments.length,n=At(this,e);e>t;)n[t]=arguments[t++];return n},Nt=!!W&&o(function(){dt.call(new W(1))}),It=function(){return dt.apply(Nt?ht.call(kt(this)):kt(this),arguments)},Rt={copyWithin:function(t,e){return U.call(kt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return J(kt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return L.apply(kt(this),arguments)},filter:function(t){return Et(this,$(kt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(kt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(kt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){X(kt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(kt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(kt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(kt(this),arguments)},lastIndexOf:function(t){return at.apply(kt(this),arguments)},map:function(t){return wt(kt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(kt(this),arguments)},reduceRight:function(t){return ut.apply(kt(this),arguments)},reverse:function(){for(var t,e=kt(this).length,n=Math.floor(e/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return ft.call(kt(this),t)},subarray:function(t,e){var n=kt(this),r=n.length,i=g(t,r);return new(N(n,n[gt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===e?r:g(e,r))-i))}},jt=function(t,e){return Et(this,ht.call(kt(this),t,e))},Bt=function(t){kt(this);var e=St(arguments[1],1),n=this.length,r=M(t),i=m(r.length),o=0;if(i+e>n)throw H("Wrong length!");for(;o255?255:255&r),i.v[d](n*e+i.o,r,Mt)}(this,n,t)},enumerable:!0})};b?(p=n(function(t,n,r,i){f(t,p,c,"_d");var o,a,s,u,h=0,d=0;if(w(n)){if(!(n instanceof K||"ArrayBuffer"==(u=_(n))||"SharedArrayBuffer"==u))return bt in n?Tt(p,n):Pt.call(p,n);o=n,d=St(r,e);var g=n.byteLength;if(void 0===i){if(g%e)throw H("Wrong length!");if((a=g-d)<0)throw H("Wrong length!")}else if((a=m(i)*e)+d>g)throw H("Wrong length!");s=a/e}else s=v(n),o=new K(a=s*e);for(l(t,"_d",{b:o,o:d,l:a,e:s,v:new Z(o)});hdocument.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(145),i=n(104).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(21),i=n(24),o=n(103)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasLowMarketValue=e.hasHighMarketValue=e.formatInputDecimals=e.formatFixedDecimals=e.convertAmountToAssetAmount=e.convertAssetAmountFromNativeAmount=e.convertAssetAmountToNativeAmount=e.convertAssetAmountFromNativeValue=e.convertAssetAmountToNativeValue=e.convertAssetAmountFromBigNumber=e.convertAssetAmountToBigNumber=e.convertAssetAmountToDisplaySpecific=e.convertAmountToDisplaySpecific=e.convertAmountToDisplay=e.handleSignificantDecimals=e.convertAmountFromBigNumber=e.convertAmountToBigNumber=e.subtract=e.add=e.mod=e.floorDivide=e.divide=e.multiply=e.smallerThanOrEqual=e.smallerThan=e.greaterThanOrEqual=e.greaterThan=e.convertStringToHex=e.convertHexToString=e.convertStringToNumber=e.convertNumberToString=e.countDecimalPlaces=e.fromWei=void 0;var r=a(n(435)),i=a(n(89)),o=a(n(90));function a(t){return t&&t.__esModule?t:{default:t}}e.fromWei=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:18;return new r.default(t.toString(10),10).dividedBy((0,r.default)(10).pow(e)).toString(10)};var s=function(t){return(0,r.default)("".concat(t)).dp()};e.countDecimalPlaces=s;var u=function(t){return(0,r.default)("".concat(t)).toString()};e.convertNumberToString=u;var c=function(t){return(0,r.default)("".concat(t)).toNumber()};e.convertStringToNumber=c;e.convertHexToString=function(t){return(0,r.default)("".concat(t)).toString()};e.convertStringToHex=function(t){return(0,r.default)("".concat(t)).toString(16)};var f=function(t,e){return 1===(0,r.default)("".concat(t)).comparedTo((0,r.default)("".concat(e)))};e.greaterThan=f;e.greaterThanOrEqual=function(t,e){return(0,r.default)("".concat(t)).comparedTo((0,r.default)("".concat(e)))>=0};var h=function(t,e){return-1===(0,r.default)("".concat(t)).comparedTo((0,r.default)("".concat(e)))};e.smallerThan=h;e.smallerThanOrEqual=function(t,e){return(0,r.default)("".concat(t)).comparedTo((0,r.default)("".concat(e)))<=0};e.multiply=function(t,e){return(0,r.default)("".concat(t)).times((0,r.default)("".concat(e))).toString()};e.divide=function(t,e){return(0,r.default)("".concat(t)).dividedBy((0,r.default)("".concat(e))).toString()};e.floorDivide=function(t,e){return(0,r.default)("".concat(t)).dividedToIntegerBy((0,r.default)("".concat(e))).toString()};e.mod=function(t,e){return(0,r.default)("".concat(t)).mod((0,r.default)("".concat(e))).toString()};e.add=function(t,e){return(0,r.default)("".concat(t)).plus((0,r.default)("".concat(e))).toString()};e.subtract=function(t,e){return(0,r.default)("".concat(t)).minus((0,r.default)("".concat(e))).toString()};var l=function(t){return(0,r.default)("".concat(t)).times(i.default.ether).toString()};e.convertAmountToBigNumber=l;var d=function(t){return(0,r.default)("".concat(t)).dividedBy(i.default.ether).toString()};e.convertAmountFromBigNumber=d;var p=function(t,e,n){if(!(0,r.default)("".concat(e)).isInteger()||n&&!(0,r.default)("".concat(n)).isInteger())return null;n=n?c(n):3,e=c(e),e=h((0,r.default)("".concat(t)).abs(),1)?(e=t.slice(2).slice("").search(/[^0]/g)+n)<8?e:8:e8?n:8;return(0,r.default)(m(t,i)).toFormat().replace(/,/g,"")};e.hasHighMarketValue=function(t){return t.native&&f(d(t.native.balance.amount),t.native.selected.assetLimit)};e.hasLowMarketValue=function(t){return t.native&&h(d(t.native.balance.amount),t.native.selected.assetLimit)}},function(t,e,n){"use strict";var r=n(438),i=n(486);t.exports={packageInit:function(t,e){if(e=Array.prototype.slice.call(e),!t)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(t,"currentProvider",{get:function(){return t._provider},set:function(e){return t.setProvider(e)},enumerable:!0,configurable:!0}),e[0]&&e[0]._requestManager?t._requestManager=new r.Manager(e[0].currentProvider):(t._requestManager=new r.Manager,t._requestManager.setProvider(e[0],e[1])),t.givenProvider=r.Manager.givenProvider,t.providers=r.Manager.providers,t._provider=t._requestManager.provider,t.setProvider||(t.setProvider=function(e,n){return t._requestManager.setProvider(e,n),t._provider=t._requestManager.provider,!0}),t.BatchRequest=r.BatchManager.bind(null,t._requestManager),t.extend=i(t)},addProviders:function(t){t.givenProvider=r.Manager.givenProvider,t.providers=r.Manager.providers}}},function(t,e,n){"use strict";var r=n(92),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=h;var o=n(71);o.inherits=n(1);var a=n(191),s=n(128);o.inherits(h,a);for(var u=i(s.prototype),c=0;c1?(t[n[0]]=t[n[0]]||{},t[n[0]][n[1]]=e):t[n[0]]=e},c.prototype.getCall=function(t){return r.isFunction(this.call)?this.call(t):this.call},c.prototype.extractCallback=function(t){if(r.isFunction(t[t.length-1]))return t.pop()},c.prototype.validateArgs=function(t){if(t.length!==this.params)throw i.InvalidNumberOfParams(t.length,this.params,this.name)},c.prototype.formatInput=function(t){var e=this;return this.inputFormatter?this.inputFormatter.map(function(n,r){return n?n.call(e,t[r]):t[r]}):t},c.prototype.formatOutput=function(t){var e=this;return r.isArray(t)?t.map(function(t){return e.outputFormatter&&t?e.outputFormatter(t):t}):this.outputFormatter&&t?this.outputFormatter(t):t},c.prototype.toPayload=function(t){var e=this.getCall(t),n=this.extractCallback(t),r=this.formatInput(t);this.validateArgs(r);var i={method:e,params:r,callback:n};return this.transformPayload&&(i=this.transformPayload(i)),i},c.prototype._confirmTransaction=function(t,e,n){var i=this,f=!1,h=!0,l=0,d=0,p=null,m="",v=r.isObject(n.params[0])&&n.params[0].gas?n.params[0].gas:null,g=r.isObject(n.params[0])&&n.params[0].data&&n.params[0].from&&!n.params[0].to,y=[new c({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:o.outputTransactionReceiptFormatter}),new c({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]}),new u({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:o.outputBlockFormatter}}})],b={};r.each(y,function(t){t.attachToObject(b),t.requestManager=i.requestManager});var _=function(n,r,o,u,c){if(!o)return c||(c={unsubscribe:function(){clearInterval(p)}}),(n?s.resolve(n):b.getTransactionReceipt(e)).catch(function(e){c.unsubscribe(),f=!0,a._fireError({message:"Failed to check for transaction receipt:",data:e},t.eventEmitter,t.reject)}).then(function(e){if(!e||!e.blockHash)throw new Error("Receipt missing or blockHash null");return i.extraFormatters&&i.extraFormatters.receiptFormatter&&(e=i.extraFormatters.receiptFormatter(e)),t.eventEmitter.listeners("confirmation").length>0&&(void 0!==n&&0===d||t.eventEmitter.emit("confirmation",d,e),h=!1,25===++d&&(c.unsubscribe(),t.eventEmitter.removeAllListeners())),e}).then(function(e){if(g&&!f){if(!e.contractAddress)return h&&(c.unsubscribe(),f=!0),void a._fireError(new Error("The transaction receipt didn't contain a contract address."),t.eventEmitter,t.reject);b.getCode(e.contractAddress,function(n,r){r&&(r.length>2?(t.eventEmitter.emit("receipt",e),i.extraFormatters&&i.extraFormatters.contractDeployFormatter?t.resolve(i.extraFormatters.contractDeployFormatter(e)):t.resolve(e),h&&t.eventEmitter.removeAllListeners()):a._fireError(new Error("The contract code couldn't be stored, please check your gas limit."),t.eventEmitter,t.reject),h&&c.unsubscribe(),f=!0)})}return e}).then(function(e){g||f||(e.outOfGas||v&&v===e.gasUsed||!0!==e.status&&"0x1"!==e.status&&void 0!==e.status?(e&&(m=JSON.stringify(e,null,2)),!1===e.status||"0x0"===e.status?a._fireError(new Error("Transaction has been reverted by the EVM:\n"+m),t.eventEmitter,t.reject):a._fireError(new Error("Transaction ran out of gas. Please provide more gas:\n"+m),t.eventEmitter,t.reject)):(t.eventEmitter.emit("receipt",e),t.resolve(e),h&&t.eventEmitter.removeAllListeners()),h&&c.unsubscribe(),f=!0)}).catch(function(){l++,r?l-1>=750&&(c.unsubscribe(),f=!0,a._fireError(new Error("Transaction was not mined within750 seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject)):l-1>=50&&(c.unsubscribe(),f=!0,a._fireError(new Error("Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject))});c.unsubscribe(),f=!0,a._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:o},t.eventEmitter,t.reject)},w=function(t){r.isFunction(this.requestManager.provider.on)?b.subscribe("newBlockHeaders",_.bind(null,t,!1)):p=setInterval(_.bind(null,t,!0),1e3)}.bind(this);b.getTransactionReceipt(e).then(function(e){e&&e.blockHash?(t.eventEmitter.listeners("confirmation").length>0&&w(e),_(e,!1)):f||w()}).catch(function(){f||w()})};var f=function(t,e){return r.isNumber(t)?e.wallet[t]:r.isObject(t)&&t.address&&t.privateKey?t:e.wallet[t.toLowerCase()]};c.prototype.buildCall=function(){var t=this,e="eth_sendTransaction"===t.call||"eth_sendRawTransaction"===t.call,n=function(){var n=s(!e),i=t.toPayload(Array.prototype.slice.call(arguments)),o=function(r,o){try{o=t.formatOutput(o)}catch(t){r=t}if(o instanceof Error&&(r=o),r)return r.error&&(r=r.error),a._fireError(r,n.eventEmitter,n.reject,i.callback);i.callback&&i.callback(null,o),e?(n.eventEmitter.emit("transactionHash",o),t._confirmTransaction(n,o,i)):r||n.resolve(o)},u=function(e){var n=r.extend({},i,{method:"eth_sendRawTransaction",params:[e.rawTransaction]});t.requestManager.send(n,o)},h=function(t,e){var i;if(e&&e.accounts&&e.accounts.wallet&&e.accounts.wallet.length)if("eth_sendTransaction"===t.method){var a=t.params[0];if((i=f(r.isObject(a)?a.from:null,e.accounts))&&i.privateKey)return e.accounts.signTransaction(r.omit(a,"from"),i.privateKey).then(u)}else if("eth_sign"===t.method){var s=t.params[1];if((i=f(t.params[0],e.accounts))&&i.privateKey){var c=e.accounts.sign(s,i.privateKey);return t.callback&&t.callback(null,c.signature),void n.resolve(c.signature)}}return e.requestManager.send(t,o)};e&&r.isObject(i.params[0])&&!i.params[0].gasPrice?new c({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(t.requestManager)(function(e,n){n&&(i.params[0].gasPrice=n),h(i,t)}):h(i,t);return n.eventEmitter};return n.method=t,n.request=this.request.bind(this),n},c.prototype.request=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));return t.format=this.formatOutput.bind(this),t},t.exports=c},function(t,e,n){var r=n(32),i=n(201),o=function(t){this._inputFormatter=t.inputFormatter,this._outputFormatter=t.outputFormatter};o.prototype.isType=function(t){throw"This method should be overwritten for type "+t},o.prototype.staticPartLength=function(t){return(this.nestedTypes(t)||["[1]"]).map(function(t){return parseInt(t.slice(1,-1),10)||1}).reduce(function(t,e){return t*e},32)},o.prototype.isDynamicArray=function(t){var e=this.nestedTypes(t);return!!e&&!e[e.length-1].match(/[0-9]{1,}/g)},o.prototype.isStaticArray=function(t){var e=this.nestedTypes(t);return!!e&&!!e[e.length-1].match(/[0-9]{1,}/g)},o.prototype.staticArrayLength=function(t){var e=this.nestedTypes(t);return e?parseInt(e[e.length-1].match(/[0-9]{1,}/g)||1):1},o.prototype.nestedName=function(t){var e=this.nestedTypes(t);return e?t.substr(0,t.length-e[e.length-1].length):t},o.prototype.isDynamicType=function(){return!1},o.prototype.nestedTypes=function(t){return t.match(/(\[[0-9]*\])/g)},o.prototype.encode=function(t,e){var n=this;return this.isDynamicArray(e)?function(){var i=t.length,o=n.nestedName(e),a=[];return a.push(r.formatInputInt(i).encode()),t.forEach(function(t){a.push(n.encode(t,o))}),a}():this.isStaticArray(e)?function(){for(var r=n.staticArrayLength(e),i=n.nestedName(e),o=[],a=0;a65536)throw new Error("requested too many random bytes");var a=new e.Uint8Array(t);t>0&&o.getRandomValues(a);var s=i.from(a.buffer);if("function"==typeof n)return r.nextTick(function(){n(null,s)});return s}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,n(10),n(18))},function(t,e,n){var r=n(3).Buffer;function i(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=r.from(t,e));for(var n=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){var r=n(36);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHistoricalTransactions=e.parseTransaction=e.parseAccountTransactions=e.parseNewTransaction=e.parseConfirmedTransactions=e.parseHistoricalNativePrice=e.parseAccountUniqueTokens=e.parseAccountBalancesPrices=e.parseAccountAssets=e.parsePricesObject=e.parseGasPricesTxFee=e.getNativeGasPrice=e.convertGasPricesToNative=e.parseGasPrices=e.defaultGasPriceFormat=e.getTxFee=e.parseError=void 0;var r=l(n(88)),i=n(52),o=l(n(89)),a=l(n(90)),s=l(n(179)),u=n(180),c=n(91),f=n(609),h=n(125);function l(t){return t&&t.__esModule?t:{default:t}}function d(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){d(o,r,i,a,s,"next",t)}function s(t){d(o,r,i,a,s,"throw",t)}a(void 0)})}}function m(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"USD",r={selected:a.default[n]};return Object.keys(a.default).forEach(function(n){r[n]={},e.forEach(function(e){var o=null;t.RAW[e]&&(o={price:{amount:(0,i.convertAmountToBigNumber)(t.RAW[e][n].PRICE),display:(0,i.convertAmountToDisplaySpecific)((0,i.convertAmountToBigNumber)(t.RAW[e][n].PRICE),r,n)},change:{amount:(0,i.convertAmountToBigNumber)(t.RAW[e][n].CHANGEPCT24HOUR),display:(0,i.convertAmountToDisplay)((0,i.convertAmountToBigNumber)(t.RAW[e][n].CHANGEPCT24HOUR))}}),"WETH"!==e&&(r[n][e]=o),"ETH"===e&&(r[n].WETH=o)})}),r};e.parseAccountAssets=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{var n=m(t);return{address:e,type:"",assets:n=(n=n.map(function(t){var e={name:t.contract.name!==t.contract.address?t.contract.name:t.contract.symbol||"Unknown Token",symbol:t.contract.symbol||"———",address:t.contract.address||null,decimals:(0,i.convertStringToNumber)(t.contract.decimals)},n=(0,i.convertAssetAmountToBigNumber)(t.balance,e.decimals);return v({},e,{balance:{amount:n,display:(0,i.convertAmountToDisplay)(n,null,{symbol:e.symbol,decimals:e.decimals})},native:null})})).filter(function(t){return!!Number(t.balance.amount)||"ETH"===t.symbol}),total:null}}catch(t){throw t}};e.parseAccountBalancesPrices=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],0),r=v({},t),o=e.selected.currency;if(t){var a=t.assets.map(function(t){if(!e||e&&!e[o][t.symbol])return t;var n=(0,i.convertAmountFromBigNumber)(t.balance.amount,t.decimals),r=(0,i.convertAmountFromBigNumber)(e[o][t.symbol].price.amount),a=(0,i.multiply)(n,r),s=(0,i.convertAmountToBigNumber)(a),u=(0,i.convertAmountToDisplay)(s,e),c=e[o][t.symbol].price;return v({},t,{native:{selected:e.selected,balance:{amount:s,display:u},price:c,change:t.symbol===e.selected.currency?{amount:"0",display:"———"}:e[o][t.symbol].change}})});r=v({},r,{assets:a,total:{amount:n=a.reduce(function(t,e){return(0,i.add)(t,e.native?e.native.balance.amount:0)},0),display:(0,i.convertAmountToDisplay)(n,e)}})}return r};e.parseAccountUniqueTokens=function(t){return t.data.assets.length?t.data.assets.map(function(t){return{background:"#".concat(t.background_color),name:t.name,imageUrl:t.image_url,id:t.token_id,lastPrice:t.last_sale&&Number((0,i.convertAmountFromBigNumber)(t.last_sale.total_price)),contractAddress:t.asset_contract.address}}):[]};var x={name:"Ethereum",symbol:"ETH",address:null,decimals:18},S=function(){var t=p(regeneratorRuntime.mark(function t(e){var n,r,o,s,u,c,f,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=v({},e),r=n.timestamp?n.timestamp.secs:Date.now(),(o=v({},n.asset)).symbol="WETH"===n.asset.symbol?"ETH":n.asset.symbol,s=[o.symbol,"ETH"],u=s.map(function(t){return(0,h.apiGetHistoricalPrices)(t,r)}),t.next=8,Promise.all(u);case 8:return c=t.sent,f=c[0],l=c[1],Object.keys(a.default).forEach(function(t){var e={selected:a.default[t]};if(e[t]={},"Error"!==f.data.response&&f.data[o.symbol]){var r=(0,i.convertAmountToBigNumber)(f.data[o.symbol][t]);e[t][o.symbol]={price:{amount:r,display:null}};var s=(0,i.convertAmountToDisplay)(r,e);e[t][o.symbol].price.display=s;var u=e[t][o.symbol].price,c=(0,i.convertAssetAmountToNativeValue)(n.value.amount,o,e),h=(0,i.convertAmountToDisplay)(c,e),d=n.error?{amount:"",display:""}:{amount:c,display:h};n.native[t]={price:u,value:d}}if(n.txFee&&"Error"!==l.data.response&&l.data.ETH){var p=(0,i.convertAmountToBigNumber)(l.data.ETH[t]);e[t].ETH={price:{amount:p,display:null}};var m=(0,i.convertAmountToDisplay)(p,e);e[t].ETH.price.display=m;var g=(0,i.convertAssetAmountToNativeValue)(n.txFee.amount,x,e),y={amount:g,display:(0,i.convertAmountToDisplay)(g,e)};n.native[t]=v({},n.native[t],{txFee:y})}}),t.abrupt("return",n);case 13:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.parseHistoricalNativePrice=S;var k=function(){var t=p(regeneratorRuntime.mark(function t(){var e,n,r=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:"",t.next=3,T(e);case 3:return n=t.sent,t.next=6,Promise.all(n.map(function(){var t=p(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()));case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.parseConfirmedTransactions=k;var A=function(){var t=p(regeneratorRuntime.mark(function t(){var e,n,r,o,s,u,f,h,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=l.length>0&&void 0!==l[0]?l[0]:null,n=l.length>1&&void 0!==l[1]?l[1]:"",r=e.gasLimit&&e.gasPrice?(0,i.multiply)(e.gasLimit,e.gasPrice):null,o=r?{amount:r,display:(0,i.convertAmountToDisplay)(r,null,{symbol:"ETH",decimals:18})}:null,s=(0,i.convertAmountToBigNumber)(e.value,e.asset.decimals),u={amount:s,display:(0,i.convertAmountToDisplay)(s,null,e.asset)},t.t0=e.nonce,t.t0){t.next=16;break}if(!e.from){t.next=14;break}return t.next=11,(0,c.getTransactionCount)(e.from);case 11:t.t1=t.sent,t.next=15;break;case 14:t.t1="";case 15:t.t0=t.t1;case 16:return f=t.t0,h={hash:e.hash,timestamp:null,from:e.from,to:e.to,error:!1,nonce:f,value:u,txFee:o,native:{selected:a.default[n]},pending:!0,asset:e.asset},t.next=20,S(h);case 20:return t.abrupt("return",t.sent);case 21:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.parseNewTransaction=A;var E=function(){var t=p(regeneratorRuntime.mark(function t(){var e,n,r,i,o,a,s,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:null,n=u.length>1&&void 0!==u[1]?u[1]:"",r=u.length>2&&void 0!==u[2]?u[2]:"",e&&e.docs){t.next=5;break}return t.abrupt("return",[]);case 5:return t.next=7,Promise.all(e.docs.map(function(){var t=p(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()));case 7:if(i=t.sent,o=[],i.forEach(function(t){t.forEach(function(t){o.push(t)})}),!(e.pages>e.page)){t.next=24;break}return t.prev=11,t.next=14,(0,h.apiGetTransactionData)(n,r,e.page+1);case 14:return a=t.sent,t.next=17,E(a.data,n,r);case 17:s=t.sent,o=m(o).concat(m(s)),t.next=24;break;case 21:throw t.prev=21,t.t0=t.catch(11),t.t0;case 24:return t.abrupt("return",o);case 25:case"end":return t.stop()}},t,this,[[11,21]])}));return function(){return t.apply(this,arguments)}}();e.parseAccountTransactions=E;var T=function(){var t=p(regeneratorRuntime.mark(function t(e){var n,r,o,a,s,u,c,f,h,l,d,p,m;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e._id,r={secs:"".concat(e.timeStamp),ms:"".concat(e.timeStamp,"000")},o=!!e.error,a=e.from,s=e.to,u={name:"Ethereum",symbol:"ETH",address:null,decimals:18},c={amount:e.value,display:(0,i.convertAmountToDisplay)(e.value,null,{symbol:"ETH",decimals:18})},f=(0,i.multiply)(e.gasUsed,e.gasPrice),h={amount:f,display:(0,i.convertAmountToDisplay)(f,null,{symbol:"ETH",decimals:18})},l=function(){if("0x"!==e.input&&e.operations&&e.operations.length&&e.operations.filter(function(t){return"token_transfer"===t.type}).length)return!0;return!1}(),p=[d={hash:n,timestamp:r,from:a,to:s,error:o,value:c,txFee:h,native:{},pending:!1,asset:u}],l&&(m=[],e.operations.length&&(e.operations.forEach(function(t,e){var n={hash:"".concat(d.hash,"-").concat(e+1),timestamp:r,from:a,to:s,error:o,value:c,txFee:h,native:{},pending:!1,asset:u},f=t.contract.name.startsWith("0x")?t.contract.symbol||"Unknown Token":t.contract.name;n.asset={name:f,symbol:t.contract.symbol||"———",address:t.contract.address||"",decimals:t.contract.decimals||18},n.from=t.from,n.to=t.to;var l=(0,i.convertAssetAmountToBigNumber)(t.value,n.asset.decimals);n.value={amount:l,display:(0,i.convertAmountToDisplay)(l,null,n.asset)},m.push(n)}),Number(e.value)?(d.hash="".concat(d.hash,"-0"),p=m.concat([d])):p=m.concat())),t.abrupt("return",p);case 14:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.parseTransaction=T;var C=function(){var t=p(regeneratorRuntime.mark(function t(){var e,n,r=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=r.length>0&&void 0!==r[0]?r[0]:null).length){t.next=3;break}return t.abrupt("return",e);case 3:return t.next=5,Promise.all(e.map(function(){var t=p(regeneratorRuntime.mark(function t(e,n){var r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.native&&!(e.native&&Object.keys(e.native).length<1)){t.next=5;break}return t.next=3,(0,u.debounceRequest)(S,[e],50*n);case 3:return r=t.sent,t.abrupt("return",r);case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}()));case 5:return n=t.sent,t.abrupt("return",n);case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.parseHistoricalTransactions=C},function(t,e,n){"use strict";var r=n(460),i=n(461);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=b(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),h=["%","/","?",";","#"].concat(f),l=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(462);function b(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?I+="x":I+=N[R];if(!I.match(d)){var B=P.slice(0,E),L=P.slice(E+1),U=N.match(p);U&&(B.push(U[1]),L.unshift(U[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+F,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[M])for(E=0,O=f.length;E0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=x.slice(-1)[0],A=(n.host||t.host||x.length>1)&&("."===k||".."===k)||""===k,E=0,T=x.length;T>=0;T--)"."===(k=x[T])?x.splice(T,1):".."===k?(x.splice(T,1),E++):E&&(x.splice(T,1),E--);if(!w&&!M)for(;E--;E)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var C,P=""===x[0]||x[0]&&"/"===x[0].charAt(0);S&&(n.hostname=n.host=P?"":x.length?x.shift():"",(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift()));return(w=w||n.host&&x.length)&&!P&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){(e=t.exports=n(191)).Stream=e,e.Readable=e,e.Writable=n(128),e.Duplex=n(54),e.Transform=n(194),e.PassThrough=n(475)},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(2).Buffer)},function(t,e,n){"use strict";var r=n(1),i=n(132),o=n(134),a=n(135),s=n(43);function u(t){s.call(this,"digest"),this._hash=t}r(u,s),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(a(t))}},function(t,e,n){(function(e){t.exports=function(t,n){for(var r=Math.min(t.length,n.length),i=new e(r),o=0;o=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;of;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(36),i=n(8)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(0),i=n(37),o=n(4),a=n(108),s="["+a+"]",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),f=function(t,e,n){var i={},s=o(function(){return!!a[t]()||"​…"!="​…"[t]()}),u=i[t]=s?e(h):a[t];n&&(i[n]=u),r(r.P+r.F*s,"String",i)},h=f.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};t.exports=f},function(t,e,n){var r=n(8)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(22),i=n(19),o=n(4),a=n(37),s=n(8);t.exports=function(t,e,n){var u=s(t),c=n(a,u,""[t]),f=c[0],h=c[1];o(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),r(RegExp.prototype,u,2==e?function(t,e){return h.call(t,this,e)}:function(t){return h.call(t,this)}))}},function(t,e,n){var r=n(34),i=n(158),o=n(117),a=n(7),s=n(14),u=n(119),c={},f={};(e=t.exports=function(t,e,n,h,l){var d,p,m,v,g=l?function(){return t}:u(t),y=r(n,h,e?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(d=s(t.length);d>b;b++)if((v=e?y(a(p=t[b])[0],p[1]):y(t[b]))===c||v===f)return v}else for(m=g.call(t);!(p=m.next()).done;)if((v=i(m,y,p.value,e))===c||v===f)return v}).BREAK=c,e.RETURN=f},function(t,e,n){var r=n(7),i=n(35),o=n(8)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r=n(5).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(5),i=n(0),o=n(19),a=n(62),s=n(42),u=n(83),c=n(61),f=n(6),h=n(4),l=n(81),d=n(57),p=n(109);t.exports=function(t,e,n,m,v,g){var y=r[t],b=y,_=v?"set":"add",w=b&&b.prototype,M={},x=function(t){var e=w[t];o(w,t,"delete"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof b&&(g||w.forEach&&!h(function(){(new b).entries().next()}))){var S=new b,k=S[_](g?{}:-0,1)!=S,A=h(function(){S.has(1)}),E=l(function(t){new b(t)}),T=!g&&h(function(){for(var t=new b,e=5;e--;)t[_](e,e);return!t.has(-0)});E||((b=e(function(e,n){c(e,b,t);var r=p(new y,e,b);return void 0!=n&&u(n,v,r[_],r),r})).prototype=w,w.constructor=b),(A||T)&&(x("delete"),x("has"),v&&x("get")),(T||k)&&x(_),g&&w.clear&&delete w.clear}else b=m.getConstructor(e,t,v,_),a(b.prototype,n),s.NEED=!0;return d(b,t),M[t]=b,i(i.G+i.W+i.F*(b!=y),M),g||m.setStrong(b,t,v),b}},function(t,e,n){for(var r,i=n(5),o=n(22),a=n(45),s=a("typed_array"),u=a("view"),c=!(!i.ArrayBuffer||!i.DataView),f=c,h=0,l="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(r=i[l[h++]])?(o(r.prototype,s,!0),o(r.prototype,u,!0)):f=!1;t.exports={ABV:c,CONSTR:f,TYPED:s,VIEW:u}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.updateLanguage=e.resources=void 0;var r=p(n(613)),i=p(n(407)),o=p(n(408)),a=p(n(409)),s=p(n(410)),u=p(n(411)),c=p(n(412)),f=p(n(413)),h=p(n(414)),l=p(n(415)),d=p(n(416));function p(t){return t&&t.__esModule?t:{default:t}}var m={en:o.default,br:i.default,de:s.default,es:l.default,fr:a.default,it:c.default,cz:u.default,pt:f.default,ru:h.default,pl:d.default};e.resources=m;e.updateLanguage=function(t){return r.default.changeLanguage(t)},r.default.on("languageChanged",function(){});var v=r.default;e.default=v},function(t){t.exports={basic_tx:21e3,noether:0,wei:1,kwei:1e3,Kwei:1e3,babbage:1e3,femtoether:1e3,mwei:1e6,Mwei:1e6,lovelace:1e6,picoether:1e6,gwei:1e9,Gwei:1e9,shannon:1e9,nanoether:1e9,nano:1e9,szabo:1e12,microether:1e12,micro:1e12,finney:1e15,milliether:1e15,milli:1e15,ether:1e18,kether:1e21,grand:1e21,mether:1e24,gether:1e27,tether:1e30}},function(t){t.exports={USD:{symbol:"$",currency:"USD",decimals:2,alignment:"left",assetLimit:1},GBP:{symbol:"£",currency:"GBP",decimals:2,alignment:"left",assetLimit:1},EUR:{symbol:"€",currency:"EUR",decimals:2,alignment:"left",assetLimit:1},BTC:{symbol:"₿",currency:"BTC",decimals:8,alignment:"right",assetLimit:1e-4},ETH:{symbol:"Ξ",currency:"ETH",decimals:8,alignment:"right",assetLimit:.001}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.estimateGasLimit=e.createSignableTransaction=e.getTransferTokenTransaction=e.getTxDetails=e.getTokenBalanceOf=e.getAccountBalance=e.getBlockByHash=e.getTransactionByHash=e.getTransactionCount=e.sha3=e.toWei=e.fromWei=e.toChecksumAddress=e.web3SetHttpProvider=e.web3Instance=void 0;var r=c(n(436)),i=n(607),o=n(180),a=n(52),s=c(n(89)),u=c(n(608));function c(t){return t&&t.__esModule?t:{default:t}}function f(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function h(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){f(o,r,i,a,s,"next",t)}function s(t){f(o,r,i,a,s,"throw",t)}a(void 0)})}}var l=new r.default(new r.default.providers.HttpProvider("https://mainnet.infura.io/"));e.web3Instance=l;e.web3SetHttpProvider=function(t){var e=null;if(t.match(/(https?:\/\/)(\w+.)+/g)&&(e=new r.default.providers.HttpProvider(t)),!e)throw new Error("function web3SetHttpProvider requires provider to match a valid HTTP/HTTPS endpoint");return l.setProvider(e)};e.toChecksumAddress=function(t){if(void 0===t)return"";t=t.toLowerCase().replace("0x","");for(var e=l.utils.sha3(t).replace("0x",""),n="0x",r=0;r7?n+=t[r].toUpperCase():n+=t[r];return n};var d=function(t){return l.utils.fromWei(t)};e.fromWei=d;var p=function(t){return l.utils.toWei(t)};e.toWei=p;e.sha3=function(t){return l.utils.sha3(t)};var m=function(t){return l.eth.getTransactionCount(t,"pending")};e.getTransactionCount=m;e.getTransactionByHash=function(t){return l.eth.getTransaction(t)};e.getBlockByHash=function(t){return l.eth.getBlock(t)};var v=function(){var t=h(regeneratorRuntime.mark(function t(e){var n,r,i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.eth.getBalance(e);case 2:return n=t.sent,r=d(n),i=0!==(0,a.convertStringToNumber)(r)?(0,a.convertNumberToString)(r):0,t.abrupt("return",i);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.getAccountBalance=v;e.getTokenBalanceOf=function(t,e){return new Promise(function(n,r){var i=u.default.token_balance.hash,s=(0,o.getDataString)(i,[(0,o.removeHexPrefix)(t)]);l.eth.call({to:e,data:s}).then(function(t){var e=(0,a.convertHexToString)(t);n(e)}).catch(function(t){return r(t)})})};var g=function(){var t=h(regeneratorRuntime.mark(function t(e){var n,r,i,o,a,s,u,c,f,h,d;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.from,r=e.to,i=e.data,o=e.value,a=e.gasPrice,s=e.gasLimit,t.t0=a,t.t0){t.next=6;break}return t.next=5,l.eth.getGasPrice();case 5:t.t0=t.sent;case 6:if(u=t.t0,c="0x00"===o?{from:n,to:r,data:i}:{to:r,data:i},t.t1=s,t.t1){t.next=13;break}return t.next=12,l.eth.estimateGas(c);case 12:t.t1=t.sent;case 13:return f=t.t1,t.next=16,m(n);case 16:return h=t.sent,d={from:n,to:r,nonce:l.utils.toHex(h),gasPrice:l.utils.toHex(u),gasLimit:l.utils.toHex(f),gas:l.utils.toHex(f),value:l.utils.toHex(o),data:i},t.abrupt("return",d);case 19:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.getTxDetails=g;var y=function(t){var e=u.default.token_transfer.hash,n=(0,a.convertStringToHex)((0,a.convertAmountToAssetAmount)(t.amount,t.asset.decimals)),r=(0,o.removeHexPrefix)(t.to),i=(0,o.getDataString)(e,[r,n]);return{from:t.from,to:t.asset.address,data:i,gasPrice:t.gasPrice,gasLimit:t.gasLimit}};e.getTransferTokenTransaction=y;e.createSignableTransaction=function(t){t.value=t.amount,"ETH"!==t.asset.symbol&&(t=y(t));var e="0x"===t.from.substr(0,2)?t.from:"0x".concat(t.from),n="0x"===t.to.substr(0,2)?t.to:"0x".concat(t.to),r=t.value?p(t.value):"0x00",i=t.data?t.data:"0x";return g({from:e,to:n,data:i,value:r,gasPrice:t.gasPrice,gasLimit:t.gasLimit})};var b=function(){var t=h(regeneratorRuntime.mark(function t(e){var n,r,c,f,h,d,p,m,v,g,y;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.asset,r=e.address,c=e.recipient,f=e.amount,h=s.default.basic_tx,d="0x",p=f&&Number(f)?(0,a.convertAmountToBigNumber)(f):.1*n.balance.amount,m=c&&(0,i.isValidAddress)(c)?c:"0x737e583620f4ac1842d4e354789ca0c5e0651fbb",v={to:m,data:d},"ETH"===n.symbol){t.next=15;break}return g=u.default.token_transfer.hash,y=(0,a.convertAssetAmountFromBigNumber)(p,n.decimals),y=(0,a.convertStringToHex)(y),d=(0,o.getDataString)(g,[(0,o.removeHexPrefix)(m),y]),v={from:r,to:n.address,data:d,value:"0x0"},t.next=14,l.eth.estimateGas(v);case 14:h=t.sent;case 15:return t.abrupt("return",h);case 16:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.estimateGasLimit=b},function(t,e,n){"use strict";(function(e){!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,r)});case 4:return e.nextTick(function(){t.call(null,n,r,i)});default:for(o=new Array(s-1),a=0;a1?(t[n[0]]=t[n[0]]||{},t[n[0]][n[1]]=e):t[n[0]]=e},i.prototype.buildCall=function(){var t=this;return function(){t.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var e=new r({subscription:t.subscriptions[arguments[0]],requestManager:t.requestManager,type:t.type});return e.subscribe.apply(e,arguments)}},t.exports={subscriptions:i,subscription:r}},function(t,e,n){"use strict";var r=n(53),i=n(55),o=n(26),a=function(){var t=this;r.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:o.hexToNumber}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};r.addProviders(a),t.exports=a},function(t,e,n){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=n(64),e.createHash=e.Hash=n(72),e.createHmac=e.Hmac=n(205);var r=n(512),i=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var a=n(136);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync;var s=n(514);e.Cipher=s.Cipher,e.createCipher=s.createCipher,e.Cipheriv=s.Cipheriv,e.createCipheriv=s.createCipheriv,e.Decipher=s.Decipher,e.createDecipher=s.createDecipher,e.Decipheriv=s.Decipheriv,e.createDecipheriv=s.createDecipheriv,e.getCiphers=s.getCiphers,e.listCiphers=s.listCiphers;var u=n(531);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var c=n(536);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=n(574);var f=n(575);e.publicEncrypt=f.publicEncrypt,e.privateEncrypt=f.privateEncrypt,e.publicDecrypt=f.publicDecrypt,e.privateDecrypt=f.privateDecrypt;var h=n(578);e.randomFill=h.randomFill,e.randomFillSync=h.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,n){var r=n(3).Buffer;function i(t){r.isBuffer(t)||(t=r.from(t));for(var e=t.length/4|0,n=new Array(e),i=0;i>>24]^f[p>>>16&255]^h[m>>>8&255]^l[255&v]^e[g++],a=c[p>>>24]^f[m>>>16&255]^h[v>>>8&255]^l[255&d]^e[g++],s=c[m>>>24]^f[v>>>16&255]^h[d>>>8&255]^l[255&p]^e[g++],u=c[v>>>24]^f[d>>>16&255]^h[p>>>8&255]^l[255&m]^e[g++],d=o,p=a,m=s,v=u;return o=(r[d>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&v])^e[g++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[v>>>8&255]<<8|r[255&d])^e[g++],s=(r[m>>>24]<<24|r[v>>>16&255]<<16|r[d>>>8&255]<<8|r[255&p])^e[g++],u=(r[v>>>24]<<24|r[d>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[g++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,n[a]=c,r[c]=a;var f=t[a],h=t[f],l=t[h],d=257*t[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*l^65537*h^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^t[t[t[l^f]]],s^=t[t[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,r=4*(n+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=r.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var n=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},function(t,e,n){var r=n(3).Buffer,i=n(132);t.exports=function(t,e,n,o){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=r.alloc(a),u=r.alloc(o||0),c=r.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(t),e&&f.update(e),c=f.digest();var h=0;if(a>0){var l=s.length-a;h=Math.min(a,c.length),c.copy(s,l,0,h),a-=h}if(h0){var d=u.length-o,p=Math.min(o,c.length-h);c.copy(u,d,h,h+p),o-=p}}return c.fill(0),{key:s,iv:u}}},function(t,e,n){"use strict";var r=e;r.base=n(540),r.short=n(541),r.mont=n(542),r.edwards=n(543)},function(t,e,n){(function(e){var r=n(559),i=n(571),o=n(572),a=n(138),s=n(136);function u(t){var n;"object"!=typeof t||e.isBuffer(t)||(n=t.passphrase,t=t.key),"string"==typeof t&&(t=new e(t));var u,c,f=o(t,n),h=f.tag,l=f.data;switch(h){case"CERTIFICATE":c=r.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=r.PublicKey.decode(l,"der")),u=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=r.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+h);case"ENCRYPTED PRIVATE KEY":l=function(t,n){var r=t.algorithm.decrypt.kde.kdeparams.salt,o=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),u=i[t.algorithm.decrypt.cipher.algo.join(".")],c=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,h=parseInt(u.split("-")[1],10)/8,l=s.pbkdf2Sync(n,r,o,h),d=a.createDecipheriv(u,l,c),p=[];return p.push(d.update(f)),p.push(d.final()),e.concat(p)}(l=r.EncryptedPrivateKey.decode(l,"der"),n);case"PRIVATE KEY":switch(u=(c=r.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:r.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=r.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+h);case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=r.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=u,u.signature=r.signature}).call(this,n(2).Buffer)},function(t,e,n){var r=n(6),i=n(5).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(13),i=n(5),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(46)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){e.f=n(8)},function(t,e,n){var r=n(101)("keys"),i=n(45);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(36);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(5).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(6),i=n(7),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(34)(Function.call,n(29).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(6),i=n(107).set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){"use strict";var r=n(38),i=n(37);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){"use strict";var r=n(46),i=n(0),o=n(19),a=n(22),s=n(58),u=n(157),c=n(57),f=n(51),h=n(8)("iterator"),l=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,p,m,v,g){u(n,e,p);var y,b,_,w=function(t){if(!l&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},M=e+" Iterator",x="values"==m,S=!1,k=t.prototype,A=k[h]||k["@@iterator"]||m&&k[m],E=A||w(m),T=m?x?w("entries"):E:void 0,C="Array"==e&&k.entries||A;if(C&&(_=f(C.call(new t)))!==Object.prototype&&_.next&&(c(_,M,!0),r||"function"==typeof _[h]||a(_,h,d)),x&&A&&"values"!==A.name&&(S=!0,E=function(){return A.call(this)}),r&&!g||!l&&!S&&k[h]||a(k,h,E),s[e]=E,s[M]=d,m)if(y={values:x?E:w("values"),keys:v?E:w("keys"),entries:T},g)for(b in y)b in k||o(k,b,y[b]);else i(i.P+i.F*(l||S),e,y);return y}},function(t,e,n){var r=n(115),i=n(37);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(6),i=n(36),o=n(8)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(8)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(58),i=n(8)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(11),i=n(44);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(79),i=n(8)("iterator"),o=n(58);t.exports=n(13).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(24),i=n(48),o=n(14);t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(59),i=n(161),o=n(58),a=n(23);t.exports=n(113)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(7);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r,i,o,a=n(34),s=n(150),u=n(106),c=n(100),f=n(5),h=f.process,l=f.setImmediate,d=f.clearImmediate,p=f.MessageChannel,m=f.Dispatch,v=0,g={},y=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},b=function(t){y.call(t.data)};l&&d||(l=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},d=function(t){delete g[t]},"process"==n(36)(h)?r=function(t){h.nextTick(a(y,t,1))}:m&&m.now?r=function(t){m.now(a(y,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:l,clear:d}},function(t,e,n){"use strict";var r=n(5),i=n(12),o=n(46),a=n(87),s=n(22),u=n(62),c=n(4),f=n(61),h=n(38),l=n(14),d=n(168),p=n(50).f,m=n(11).f,v=n(120),g=n(57),y="prototype",b="Wrong index!",_=r.ArrayBuffer,w=r.DataView,M=r.Math,x=r.RangeError,S=r.Infinity,k=_,A=M.abs,E=M.pow,T=M.floor,C=M.log,P=M.LN2,O=i?"_b":"buffer",N=i?"_l":"byteLength",I=i?"_o":"byteOffset";function R(t,e,n){var r,i,o,a=new Array(n),s=8*n-e-1,u=(1<>1,f=23===e?E(2,-24)-E(2,-77):0,h=0,l=t<0||0===t&&1/t<0?1:0;for((t=A(t))!=t||t===S?(i=t!=t?1:0,r=u):(r=T(C(t)/P),t*(o=E(2,-r))<1&&(r--,o*=2),(t+=r+c>=1?f/o:f*E(2,1-c))*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(t*o-1)*E(2,e),r+=c):(i=t*E(2,c-1)*E(2,e),r=0));e>=8;a[h++]=255&i,i/=256,e-=8);for(r=r<0;a[h++]=255&r,r/=256,s-=8);return a[--h]|=128*l,a}function j(t,e,n){var r,i=8*n-e-1,o=(1<>1,s=i-7,u=n-1,c=t[u--],f=127&c;for(c>>=7;s>0;f=256*f+t[u],u--,s-=8);for(r=f&(1<<-s)-1,f>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===f)f=1-a;else{if(f===o)return r?NaN:c?-S:S;r+=E(2,e),f-=a}return(c?-1:1)*r*E(2,f-e)}function B(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function L(t){return[255&t]}function U(t){return[255&t,t>>8&255]}function F(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function D(t){return R(t,52,8)}function q(t){return R(t,23,4)}function z(t,e,n){m(t[y],e,{get:function(){return this[n]}})}function H(t,e,n,r){var i=d(+n);if(i+e>t[N])throw x(b);var o=t[O]._b,a=i+t[I],s=o.slice(a,a+e);return r?s:s.reverse()}function G(t,e,n,r,i,o){var a=d(+n);if(a+e>t[N])throw x(b);for(var s=t[O]._b,u=a+t[I],c=r(+i),f=0;fZ;)(W=K[Z++])in _||s(_,W,k[W]);o||(V.constructor=_)}var X=new w(new _(2)),$=w[y].setInt8;X.setInt8(0,2147483648),X.setInt8(1,2147483649),!X.getInt8(0)&&X.getInt8(1)||u(w[y],{setInt8:function(t,e){$.call(this,t,e<<24>>24)},setUint8:function(t,e){$.call(this,t,e<<24>>24)}},!0)}else _=function(t){f(this,_,"ArrayBuffer");var e=d(t);this._b=v.call(new Array(e),0),this[N]=e},w=function(t,e,n){f(this,w,"DataView"),f(t,_,"DataView");var r=t[N],i=h(e);if(i<0||i>r)throw x("Wrong offset!");if(i+(n=void 0===n?r-i:l(n))>r)throw x("Wrong length!");this[O]=t,this[I]=i,this[N]=n},i&&(z(_,"byteLength","_l"),z(w,"buffer","_b"),z(w,"byteLength","_l"),z(w,"byteOffset","_o")),u(w[y],{getInt8:function(t){return H(this,1,t)[0]<<24>>24},getUint8:function(t){return H(this,1,t)[0]},getInt16:function(t){var e=H(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=H(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return B(H(this,4,t,arguments[1]))},getUint32:function(t){return B(H(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return j(H(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return j(H(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){G(this,1,t,L,e)},setUint8:function(t,e){G(this,1,t,L,e)},setInt16:function(t,e){G(this,2,t,U,e,arguments[2])},setUint16:function(t,e){G(this,2,t,U,e,arguments[2])},setInt32:function(t,e){G(this,4,t,F,e,arguments[2])},setUint32:function(t,e){G(this,4,t,F,e,arguments[2])},setFloat32:function(t,e){G(this,4,t,q,e,arguments[2])},setFloat64:function(t,e){G(this,8,t,D,e,arguments[2])}});g(_,"ArrayBuffer"),g(w,"DataView"),s(w[y],a.VIEW,!0),e.ArrayBuffer=_,e.DataView=w},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.apiShapeshiftGetExchangeDetails=e.apiShapeshiftSendAmount=e.apiShapeshiftGetDepositStatus=e.apiShapeshiftGetMarketInfo=e.apiShapeshiftGetCoins=e.apiShapeshiftGetCurrencies=e.apiGetGasPrices=e.apiGetAccountTransactions=e.apiGetTransaction=e.apiGetTransactionData=e.apiGetAccountBalances=e.apiGetHistoricalPrices=e.apiGetPrices=void 0;var r=s(n(173)),i=n(68),o=n(52),a=s(n(90));function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)})}}var f=t.env.REACT_APP_CRYPTOCOMPARE_API_KEY||"",h=r.default.create({baseURL:"https://min-api.cryptocompare.com/data/",timeout:3e4,headers:{"Content-Type":"application/json",Accept:"application/json"}});e.apiGetPrices=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=JSON.stringify(t).replace(/[[\]"]/gi,""),n=JSON.stringify(Object.keys(a.default)).replace(/[[\]"]/gi,"");return h.get("/pricemultifull?fsyms=".concat(e,"&tsyms=").concat(n,"&apiKey=").concat(f))};e.apiGetHistoricalPrices=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),n=JSON.stringify(Object.keys(a.default)).replace(/[[\]"]/gi,"");return h.get("/pricehistorical?fsym=".concat(t,"&tsyms=").concat(n,"&ts=").concat(e,"&apiKey=").concat(f))};var l=r.default.create({baseURL:"https://indexer.balance.io",timeout:3e4,headers:{"Content-Type":"application/json",Accept:"application/json"}}),d=function(){var t=c(regeneratorRuntime.mark(function t(){var e,n,r,o,a,s,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=u.length>0&&void 0!==u[0]?u[0]:"",n=u.length>1&&void 0!==u[1]?u[1]:"mainnet",t.prev=2,t.next=5,l.get("/get_balances/".concat(n,"/").concat(e));case 5:return r=t.sent,o=r.data,a=(0,i.parseAccountAssets)(o,e),s={data:a},t.abrupt("return",s);case 12:throw t.prev=12,t.t0=t.catch(2),t.t0;case 15:case"end":return t.stop()}},t,this,[[2,12]])}));return function(){return t.apply(this,arguments)}}();e.apiGetAccountBalances=d;var p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mainnet",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return l.get("/get_transactions/".concat(e,"/").concat(t,"/").concat(n))};e.apiGetTransactionData=p;e.apiGetTransaction=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mainnet";return l.get("/get_transaction/".concat(e,"/").concat(t))};var m=function(){var t=c(regeneratorRuntime.mark(function t(){var e,n,r,o,a,s,u,c,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=f.length>0&&void 0!==f[0]?f[0]:"",n=f.length>1&&void 0!==f[1]?f[1]:"mainnet",r=f.length>2&&void 0!==f[2]?f[2]:"",t.prev=3,t.next=6,p(e,n,1);case 6:return o=t.sent,a=o.data,t.next=10,(0,i.parseAccountTransactions)(a,e,n);case 10:return(s=t.sent).length&&r&&(u=!0,s=s.filter(function(t){return t.hash===r&&u?(u=!1,!1):!(t.hash===r||!u)})),t.next=14,(0,i.parseHistoricalTransactions)(s);case 14:return s=t.sent,c={data:s},t.abrupt("return",c);case 19:throw t.prev=19,t.t0=t.catch(3),t.t0;case 22:case"end":return t.stop()}},t,this,[[3,19]])}));return function(){return t.apply(this,arguments)}}();e.apiGetAccountTransactions=m;e.apiGetGasPrices=function(){return l.get("/get_eth_gas_prices")};e.apiShapeshiftGetCurrencies=function(){return l.get("/get_currencies")};var v=r.default.create({baseURL:"https://shapeshift.io",timeout:3e4,headers:{"Content-Type":"application/json",Accept:"application/json"}});e.apiShapeshiftGetCoins=function(){return v.get("/getcoins")};var g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return v.get("/marketinfo/".concat(t))};e.apiShapeshiftGetMarketInfo=g;e.apiShapeshiftGetDepositStatus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return v.get("/txStat/".concat(t))};var y=function(){var e=c(regeneratorRuntime.mark(function e(n){var r,i,o,a,s,u,c,f,h,l,d,p,m,y,b,_;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.address,i=void 0===r?"":r,o=n.depositSymbol,a=void 0===o?"":o,s=n.withdrawalSymbol,u=void 0===s?"":s,c=n.depositAmount,f=void 0===c?"":c,h=n.withdrawalAmount,l=void 0===h?"":h,e.prev=1,d="".concat(a.toLowerCase(),"_").concat(u.toLowerCase()),e.next=5,g(d);case 5:return p=e.sent,m=p.data.minimum,y=i?{pair:d,withdrawal:i,returnAddress:i}:{pair:d},l?y.amount=l:y.depositAmount=f||m,(b=t.env.REACT_APP_SHAPESHIFT_API_KEY||"")&&(y.apiKey=b),e.next=13,v.post("/sendamount",y);case 13:if(!(_=e.sent).data.success){e.next=19;break}return _.data.success.min=m,e.abrupt("return",_);case 19:return e.abrupt("return",{data:{success:{pair:d,depositAmount:"",withdrawalAmount:"",quotedRate:p.data.rate,maxLimit:p.data.maxLimit,min:p.data.minimum,minerFee:p.data.minerFee,error:_.data.error}}});case 20:e.next=25;break;case 22:throw e.prev=22,e.t0=e.catch(1),e.t0;case 25:case"end":return e.stop()}},e,this,[[1,22]])}));return function(t){return e.apply(this,arguments)}}();e.apiShapeshiftSendAmount=y;e.apiShapeshiftGetExchangeDetails=function(t){var e=t.request,n=void 0===e?{depositSymbol:"",withdrawalSymbol:"",withdrawalAmount:""}:e,r=t.inputOne,i=void 0===r?"":r,a=t.inputTwo,s=void 0===a?"":a,u=t.withdrawal,c=void 0!==u&&u;return y(n).then(function(t){var e,n=t.data,r=c?"depositAmount":"withdrawalAmount",a={};return a={exchangeDetails:e=n.success},e.error?s="":i?(s=e[r]||"",s=(0,o.formatInputDecimals)(s,i)):s="",a[r]=s,a})}}).call(this,n(18))},function(t,e,n){"use strict";(function(e){var r=n(25),i=n(420),o={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=n(175):void 0!==e&&(t=n(175)),t}(),transformRequest:[function(t,e){return i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(t){s.headers[t]={}}),r.forEach(["post","put","patch"],function(t){s.headers[t]=r.merge(o)}),t.exports=s}).call(this,n(18))},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!function(t){return"number"==typeof t}(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,a,s,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var f=new Error('Uncaught, unspecified "error" event. ('+e+")");throw f.context=e,f}if(o(n=this._events[t]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(i(n))for(s=Array.prototype.slice.call(arguments,1),a=(c=n.slice()).length,u=0;u0&&this._events[t].length>a&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){if(!r(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},n.prototype.removeListener=function(t,e){var n,o,a,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(a=(n=this._events[t]).length,o=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(s=a;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){o=s;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";(function(e,r,i){var o=n(92);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var s,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;y.WritableState=g;var c=n(71);c.inherits=n(1);var f={deprecate:n(474)},h=n(192),l=n(3).Buffer,d=i.Uint8Array||function(){};var p,m=n(193);function v(){}function g(t,e){s=s||n(54),t=t||{};var r=e instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),S(t,e))}(t,n,r,e,i);else{var a=M(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(t,n),r?u(_,t,n,a,i):_(t,n,a,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function y(t){if(s=s||n(54),!(p.call(y,this)||this instanceof s))return new y(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function b(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function _(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,f=n.encoding,h=n.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,f,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function M(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),S(t,e)})}function S(t,e){var n=M(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(x,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(y,h),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===y&&(t&&t._writableState instanceof g)}})):p=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,n){var r=this._writableState,i=!1,a=!r.objectMode&&function(t){return l.isBuffer(t)||t instanceof d}(t);return a&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof n&&(n=v),r.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(r,a),i=!1),i}(this,r,t,n))&&(r.pendingcb++,i=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,n));return e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,S(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(18),n(472).setImmediate,n(10))},function(t,e,n){"use strict";var r=n(3).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=h,e=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function f(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(t.lastNeed=i-1),i;if(--r=0)return i>0&&(t.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.listeners={}}return t.prototype.addEventListener=function(t,e){t=t.toLowerCase(),this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(e.handleEvent||e)},t.prototype.removeEventListener=function(t,e){if(t=t.toLowerCase(),this.listeners[t]){var n=this.listeners[t].indexOf(e.handleEvent||e);n<0||this.listeners[t].splice(n,1)}},t.prototype.dispatchEvent=function(t){var e=t.type.toLowerCase();if(t.target=this,this.listeners[e])for(var n=0,r=this.listeners[e];n>6|192);else{if(i>55295&&i<56320){if(++r==t.length)return null;var o=t.charCodeAt(r);if(o<56320||o>57343)return null;n+=e((i=65536+((1023&i)<<10)+(1023&o))>>18|240),n+=e(i>>12&63|128)}else n+=e(i>>12|224);n+=e(i>>6&63|128)}n+=e(63&i|128)}}return n},toString:function(t){for(var e="",n=0,o=i(t);n127){if(a>191&&a<224){if(n>=o)return null;a=(31&a)<<6|63&r(t,n)}else if(a>223&&a<240){if(n+1>=o)return null;a=(15&a)<<12|(63&r(t,n))<<6|63&r(t,++n)}else{if(!(a>239&&a<248))return null;if(n+2>=o)return null;a=(7&a)<<18|(63&r(t,n))<<12|(63&r(t,++n))<<6|63&r(t,++n)}++n}if(a<=65535)e+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,e+=String.fromCharCode(a>>10|55296),e+=String.fromCharCode(1023&a|56320)}}return e},fromNumber:function(t){var e=t.toString(16);return e.length%2==0?"0x"+e:"0x0"+e},toNumber:function(t){return parseInt(t.slice(2),16)},fromNat:function(t){return"0x0"===t?"0x":t.length%2==0?t:"0x0"+t.slice(2)},toNat:function(t){return"0"===t[2]?"0x"+t.slice(3):t},fromArray:a,toArray:o,fromUint8Array:function(t){return a([].slice.call(t,0))},toUint8Array:function(t){return new Uint8Array(o(t))}}},function(t,e,n){"use strict";(function(e){var r=n(1),i=n(202),o=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(t,e){return t<>>32-e}function u(t,e,n,r,i,o,a){return s(t+(e&n|~e&r)+i+o|0,a)+e|0}function c(t,e,n,r,i,o,a){return s(t+(e&r|n&~r)+i+o|0,a)+e|0}function f(t,e,n,r,i,o,a){return s(t+(e^n^r)+i+o|0,a)+e|0}function h(t,e,n,r,i,o,a){return s(t+(n^(e|~r))+i+o|0,a)+e|0}r(a,i),a.prototype._update=function(){for(var t=o,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,a=this._d;r=h(r=h(r=h(r=h(r=f(r=f(r=f(r=f(r=c(r=c(r=c(r=c(r=u(r=u(r=u(r=u(r,i=u(i,a=u(a,n=u(n,r,i,a,t[0],3614090360,7),r,i,t[1],3905402710,12),n,r,t[2],606105819,17),a,n,t[3],3250441966,22),i=u(i,a=u(a,n=u(n,r,i,a,t[4],4118548399,7),r,i,t[5],1200080426,12),n,r,t[6],2821735955,17),a,n,t[7],4249261313,22),i=u(i,a=u(a,n=u(n,r,i,a,t[8],1770035416,7),r,i,t[9],2336552879,12),n,r,t[10],4294925233,17),a,n,t[11],2304563134,22),i=u(i,a=u(a,n=u(n,r,i,a,t[12],1804603682,7),r,i,t[13],4254626195,12),n,r,t[14],2792965006,17),a,n,t[15],1236535329,22),i=c(i,a=c(a,n=c(n,r,i,a,t[1],4129170786,5),r,i,t[6],3225465664,9),n,r,t[11],643717713,14),a,n,t[0],3921069994,20),i=c(i,a=c(a,n=c(n,r,i,a,t[5],3593408605,5),r,i,t[10],38016083,9),n,r,t[15],3634488961,14),a,n,t[4],3889429448,20),i=c(i,a=c(a,n=c(n,r,i,a,t[9],568446438,5),r,i,t[14],3275163606,9),n,r,t[3],4107603335,14),a,n,t[8],1163531501,20),i=c(i,a=c(a,n=c(n,r,i,a,t[13],2850285829,5),r,i,t[2],4243563512,9),n,r,t[7],1735328473,14),a,n,t[12],2368359562,20),i=f(i,a=f(a,n=f(n,r,i,a,t[5],4294588738,4),r,i,t[8],2272392833,11),n,r,t[11],1839030562,16),a,n,t[14],4259657740,23),i=f(i,a=f(a,n=f(n,r,i,a,t[1],2763975236,4),r,i,t[4],1272893353,11),n,r,t[7],4139469664,16),a,n,t[10],3200236656,23),i=f(i,a=f(a,n=f(n,r,i,a,t[13],681279174,4),r,i,t[0],3936430074,11),n,r,t[3],3572445317,16),a,n,t[6],76029189,23),i=f(i,a=f(a,n=f(n,r,i,a,t[9],3654602809,4),r,i,t[12],3873151461,11),n,r,t[15],530742520,16),a,n,t[2],3299628645,23),i=h(i,a=h(a,n=h(n,r,i,a,t[0],4096336452,6),r,i,t[7],1126891415,10),n,r,t[14],2878612391,15),a,n,t[5],4237533241,21),i=h(i,a=h(a,n=h(n,r,i,a,t[12],1700485571,6),r,i,t[3],2399980690,10),n,r,t[10],4293915773,15),a,n,t[1],2240044497,21),i=h(i,a=h(a,n=h(n,r,i,a,t[8],1873313359,6),r,i,t[15],4264355552,10),n,r,t[6],2734768916,15),a,n,t[13],1309151649,21),i=h(i,a=h(a,n=h(n,r,i,a,t[4],4149444226,6),r,i,t[11],3174756917,10),n,r,t[2],718787259,15),a,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+a|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a}).call(this,n(2).Buffer)},function(t,e,n){t.exports=i;var r=n(127).EventEmitter;function i(){r.call(this)}n(1)(i,r),i.Readable=n(70),i.Writable=n(503),i.Duplex=n(504),i.Transform=n(505),i.PassThrough=n(506),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",s),n.on("close",u));var a=!1;function s(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===r.listenerCount(this,"error"))throw t}function f(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",f),n.removeListener("close",f),t.removeListener("close",f)}return n.on("error",c),t.on("error",c),n.on("end",f),n.on("close",f),t.on("close",f),t.emit("pipe",n),t}},function(t,e,n){"use strict";var r=n(2).Buffer,i=n(1),o=n(202),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<>>32-e}function m(t,e,n,r,i,o,a,s){return p(t+(e^n^r)+o+a|0,s)+i|0}function v(t,e,n,r,i,o,a,s){return p(t+(e&n|~e&r)+o+a|0,s)+i|0}function g(t,e,n,r,i,o,a,s){return p(t+((e|~n)^r)+o+a|0,s)+i|0}function y(t,e,n,r,i,o,a,s){return p(t+(e&r|n&~r)+o+a|0,s)+i|0}function b(t,e,n,r,i,o,a,s){return p(t+(e^(n|~r))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,_=0|this._a,w=0|this._b,M=0|this._c,x=0|this._d,S=0|this._e,k=0;k<80;k+=1){var A,E;k<16?(A=m(n,r,i,o,d,t[s[k]],h[0],c[k]),E=b(_,w,M,x,S,t[u[k]],l[0],f[k])):k<32?(A=v(n,r,i,o,d,t[s[k]],h[1],c[k]),E=y(_,w,M,x,S,t[u[k]],l[1],f[k])):k<48?(A=g(n,r,i,o,d,t[s[k]],h[2],c[k]),E=g(_,w,M,x,S,t[u[k]],l[2],f[k])):k<64?(A=y(n,r,i,o,d,t[s[k]],h[3],c[k]),E=v(_,w,M,x,S,t[u[k]],l[3],f[k])):(A=b(n,r,i,o,d,t[s[k]],h[4],c[k]),E=m(_,w,M,x,S,t[u[k]],l[4],f[k])),n=d,d=o,o=p(i,10),i=r,r=A,_=S,S=x,x=p(M,10),M=w,w=E}var T=this._b+i+x|0;this._b=this._c+o+S|0,this._c=this._d+d+_|0,this._d=this._e+n+w|0,this._e=this._a+r+M|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(507),e.sha1=n(508),e.sha224=n(509),e.sha256=n(203),e.sha384=n(510),e.sha512=n(204)},function(t,e,n){e.pbkdf2=n(513),e.pbkdf2Sync=n(210)},function(t,e,n){"use strict";e.utils=n(516),e.Cipher=n(517),e.DES=n(518),e.CBC=n(519),e.EDE=n(520)},function(t,e,n){var r=n(521),i=n(529),o=n(213);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,n){var r={ECB:n(522),CBC:n(523),CFB:n(524),CFB8:n(525),CFB1:n(526),OFB:n(527),CTR:n(211),GCM:n(211)},i=n(213);for(var o in i)i[o].module=r[i[o].mode];t.exports=i},function(t,e,n){(function(e){var r=n(9),i=n(64);function o(t,n){var i=function(t){var e=a(t);return{blinder:e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(n),o=n.modulus.byteLength(),s=(r.mont(n.modulus),new r(t).mul(i.blinder).umod(n.modulus)),u=s.toRed(r.mont(n.prime1)),c=s.toRed(r.mont(n.prime2)),f=n.coefficient,h=n.prime1,l=n.prime2,d=u.redPow(n.exponent1),p=c.redPow(n.exponent2);d=d.fromRed(),p=p.fromRed();var m=d.isub(p).imul(f).umod(h);return m.imul(l),p.iadd(m),new e(p.imul(i.unblinder).umod(n.modulus).toArray(!1,o))}function a(t){for(var e=t.modulus.byteLength(),n=new r(i(e));n.cmp(t.modulus)>=0||!n.umod(t.prime1)||!n.umod(t.prime2);)n=new r(i(e));return n}t.exports=o,o.getr=a}).call(this,n(2).Buffer)},function(t,e,n){var r=e;r.utils=n(33),r.common=n(74),r.sha=n(545),r.ripemd=n(549),r.hmac=n(550),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(t,e,n){"use strict";(function(t){n(239),n(383),n(385),n(387),n(389),n(391),n(393),n(395),n(397),n(399),n(403),t._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),t._babelPolyfill=!0}).call(this,n(10))},function(t,e,n){t.exports=!n(12)&&!n(4)(function(){return 7!=Object.defineProperty(n(100)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(5),i=n(13),o=n(46),a=n(102),s=n(11).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(21),i=n(23),o=n(77)(!1),a=n(103)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(11),i=n(7),o=n(47);t.exports=n(12)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(23),i=n(50).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){"use strict";var r=n(47),i=n(78),o=n(67),a=n(24),s=n(66),u=Object.assign;t.exports=!u||n(4)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,c=1,f=i.f,h=o.f;u>c;)for(var l,d=s(arguments[c++]),p=f?r(d).concat(f(d)):r(d),m=p.length,v=0;m>v;)h.call(d,l=p[v++])&&(n[l]=d[l]);return n}:u},function(t,e,n){"use strict";var r=n(35),i=n(6),o=n(150),a=[].slice,s={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),u=function(){var r=n.concat(a.call(arguments));return this instanceof u?function(t,e,n){if(!(e in s)){for(var r=[],i=0;i>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(5).parseFloat,i=n(80).trim;t.exports=1/r(n(108)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(36);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(6),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(38),i=n(37);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(49),i=n(44),o=n(57),a={};n(22)(a,n(8)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(7);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(35),i=n(24),o=n(66),a=n(14);t.exports=function(t,e,n,s,u){r(e);var c=i(t),f=o(c),h=a(c.length),l=u?h-1:0,d=u?-1:1;if(n<2)for(;;){if(l in f){s=f[l],l+=d;break}if(l+=d,u?l<0:h<=l)throw TypeError("Reduce of empty array with no initial value")}for(;u?l>=0:h>l;l+=d)l in f&&(s=e(s,f[l],l,c));return s}},function(t,e,n){"use strict";var r=n(24),i=n(48),o=n(14);t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),s=i(t,a),u=i(e,a),c=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===c?a:i(c,a))-u,a-s),h=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=h,u+=h;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){n(12)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(122)})},function(t,e,n){"use strict";var r,i,o,a,s=n(46),u=n(5),c=n(34),f=n(79),h=n(0),l=n(6),d=n(35),p=n(61),m=n(83),v=n(84),g=n(123).set,y=n(352)(),b=n(164),_=n(353),w=n(85),M=n(165),x=u.TypeError,S=u.process,k=S&&S.versions,A=k&&k.v8||"",E=u.Promise,T="process"==f(S),C=function(){},P=i=b.f,O=!!function(){try{var t=E.resolve(1),e=(t.constructor={})[n(8)("species")]=function(t){t(C,C)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(C)instanceof e&&0!==A.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),N=function(t){var e;return!(!l(t)||"function"!=typeof(e=t.then))&&e},I=function(t,e){if(!t._n){t._n=!0;var n=t._c;y(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a,s=i?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{s?(i||(2==t._h&&B(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?c(x("Promise-chain cycle")):(o=N(n))?o.call(n,u,c):u(n)):c(r)}catch(t){f&&!a&&f.exit(),c(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&R(t)})}},R=function(t){g.call(u,function(){var e,n,r,i=t._v,o=j(t);if(o&&(e=_(function(){T?S.emit("unhandledRejection",i,t):(n=u.onunhandledrejection)?n({promise:t,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=T||j(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},B=function(t){g.call(u,function(){var e;T?S.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},L=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),I(e,!0))},U=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw x("Promise can't be resolved itself");(e=N(t))?y(function(){var r={_w:n,_d:!1};try{e.call(t,c(U,r,1),c(L,r,1))}catch(t){L.call(r,t)}}):(n._v=t,n._s=1,I(n,!1))}catch(t){L.call({_w:n,_d:!1},t)}}};O||(E=function(t){p(this,E,"Promise","_h"),d(t),r.call(this);try{t(c(U,this,1),c(L,this,1))}catch(t){L.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(62)(E.prototype,{then:function(t,e){var n=P(v(this,E));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(U,t,1),this.reject=c(L,t,1)},b.f=P=function(t){return t===E||t===a?new o(t):i(t)}),h(h.G+h.W+h.F*!O,{Promise:E}),n(57)(E,"Promise"),n(60)("Promise"),a=n(13).Promise,h(h.S+h.F*!O,"Promise",{reject:function(t){var e=P(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(s||!O),"Promise",{resolve:function(t){return M(s&&this===a?E:this,t)}}),h(h.S+h.F*!(O&&n(81)(function(t){E.all(t).catch(C)})),"Promise",{all:function(t){var e=this,n=P(e),r=n.resolve,i=n.reject,o=_(function(){var n=[],o=0,a=1;m(t,!1,function(t){var s=o++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=P(e),r=n.reject,i=_(function(){m(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e,n){"use strict";var r=n(35);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){var r=n(7),i=n(6),o=n(164);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(11).f,i=n(49),o=n(62),a=n(34),s=n(61),u=n(83),c=n(113),f=n(161),h=n(60),l=n(12),d=n(42).fastKey,p=n(63),m=l?"_s":"size",v=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var f=t(function(t,r){s(t,f,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[m]=0,void 0!=r&&u(r,n,t[c],t)});return o(f.prototype,{clear:function(){for(var t=p(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[m]=0},delete:function(t){var n=p(this,e),r=v(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[m]--}return!!r},forEach:function(t){p(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!v(p(this,e),t)}}),l&&r(f.prototype,"size",{get:function(){return p(this,e)[m]}}),f},def:function(t,e,n){var r,i,o=v(t,e);return o?o.v=n:(t._l=o={i:i=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[m]++,"F"!==i&&(t._i[i]=o)),t},getEntry:v,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=p(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?f(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,f(1))},n?"entries":"values",!n,!0),h(e)}}},function(t,e,n){"use strict";var r=n(62),i=n(42).getWeak,o=n(7),a=n(6),s=n(61),u=n(83),c=n(31),f=n(21),h=n(63),l=c(5),d=c(6),p=0,m=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},g=function(t,e){return l(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var n=g(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var c=t(function(t,r){s(t,c,e,"_i"),t._t=e,t._i=p++,t._l=void 0,void 0!=r&&u(r,n,t[o],t)});return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return!0===n?m(h(this,e)).delete(t):n&&f(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return!0===n?m(h(this,e)).has(t):n&&f(n,this._i)}}),c},def:function(t,e,n){var r=i(o(e),!0);return!0===r?m(t).set(e,n):r[t._i]=n,t},ufstore:m}},function(t,e,n){var r=n(38),i=n(14);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(50),i=n(78),o=n(7),a=n(5).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(14),i=n(110),o=n(37);t.exports=function(t,e,n,a){var s=String(o(t)),u=s.length,c=void 0===n?" ":String(n),f=r(e);if(f<=u||""==c)return s;var h=f-u,l=i.call(c,Math.ceil(h/c.length));return l.length>h&&(l=l.slice(0,h)),a?l+s:s+l}},function(t,e,n){var r=n(47),i=n(23),o=n(67).f;t.exports=function(t){return function(e){for(var n,a=i(e),s=r(a),u=s.length,c=0,f=[];u>c;)o.call(a,n=s[c++])&&f.push(t?[n,a[n]]:a[n]);return f}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.accountClearState=e.accountChangeNativeCurrency=e.accountChangeLanguage=e.accountUpdateNetwork=e.accountUpdateAccountAddress=e.accountUpdateExchange=e.accountUpdateTransactions=e.accountInitializeState=e.accountUpdateHasPendingTransaction=void 0;var r=l(n(406)),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}(n(88)),o=n(125),a=n(610),s=n(68),u=n(236),c=n(91),f=n(237),h=l(n(90));function l(t){return t&&t.__esModule?t:{default:t}}function d(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function p(t){for(var e=1;e0&&void 0!==arguments[0])||arguments[0];return function(e){e({type:"account/ACCOUNT_UPDATE_HAS_PENDING_TRANSACTION",payload:t})}};e.accountInitializeState=function(){(0,u.getLanguage)().then(function(t){dispatch({type:"account/ACCOUNT_CHANGE_LANGUAGE_SUCCESS",payload:{language:t}})}).catch(function(t){dispatch({type:"account/ACCOUNT_CHANGE_LANGUAGE_FAILURE"})}),(0,u.getNativeCurrency)().then(function(t){dispatch({type:"account/ACCOUNT_INITIALIZE_PRICES_SUCCESS",payload:{nativeCurrency:t}})}).catch(function(t){dispatch({type:"account/ACCOUNT_INITIALIZE_PRICES_FAILURE"})})};e.accountUpdateTransactions=function(t){return function(e,n){e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_REQUEST"});var r=n().account.transactions,i=n().account.network,o=n().account.accountInfo.address,a=n().account.nativeCurrency;(0,s.parseNewTransaction)(t,a).then(function(n){var a=v(r);a=[n].concat(v(a)),(0,u.updateLocalTransactions)(o,a,i),e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_SUCCESS",payload:a}),e(k(t.hash))}).catch(function(t){e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_FAILURE"});var n=(0,s.parseError)(t);e((0,f.notificationShow)(n,!0))})}};e.accountUpdateExchange=function(t){return function(e,n){e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_REQUEST"});var r=n().account.transactions,i=n().account.network,o=n().account.accountInfo.address,a=n().account.nativeCurrency;Promise.all(t.map(function(t){return(0,s.parseNewTransaction)(t,a,o,i)})).then(function(n){var a=v(n.reverse()).concat(v(r));(0,u.updateLocalTransactions)(o,a,i),e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_SUCCESS",payload:a}),t.forEach(function(t){return e(k(t.hash))})}).catch(function(t){e({type:"account/ACCOUNT_UPDATE_TRANSACTIONS_FAILURE"});var n=(0,s.parseError)(t);e((0,f.notificationShow)(n,!0))})}};e.accountUpdateAccountAddress=function(t,e){return function(n,r){if(t&&e){var i=r().account.network;r().account.accountType!==e&&n(_()),n({type:"account/ACCOUNT_UPDATE_ACCOUNT_ADDRESS",payload:{accountAddress:t,accountType:e}}),n(M()),n(y(i)),n(S()),n(x()),n(A())}}};var y=function(t){return function(e){(0,c.web3SetHttpProvider)("https://".concat(t,".infura.io/")),e({type:"account/ACCOUNT_UPDATE_NETWORK",payload:t})}};e.accountUpdateNetwork=y;e.accountChangeLanguage=function(t){return function(e){(0,i.updateLanguage)(t),(0,u.saveLanguage)(t).then(function(){e({type:"account/ACCOUNT_CHANGE_LANGUAGE_SUCCESS",payload:{language:t}})}).catch(function(t){e({type:"account/ACCOUNT_CHANGE_LANGUAGE_FAILURE"})})}};e.accountChangeNativeCurrency=function(t){return function(t,e){var n=e().account.prices;n?t(b(n)):(0,u.getNativePrices)().then(function(e){t(b(e))}).catch(function(e){t({type:"account/ACCOUNT_CHANGE_NATIVE_CURRENCY_FAILURE"})})}};var b=function(t){return function(e,n){(0,u.saveNativeCurrency)(nativeCurrency);var r=n().account.accountAddress,i=n().account.network,o=h.default[nativeCurrency],a=n().account.accountInfo,c=p({},t,{selected:o}),f=p({},a,(0,s.parseAccountBalancesPrices)(a,c));(0,u.updateLocalBalances)(r,f,i),e({type:"account/ACCOUNT_CHANGE_NATIVE_CURRENCY_SUCCESS",payload:{nativeCurrency:nativeCurrency,prices:c,accountInfo:f}})}},_=function(){return function(t){clearInterval(g),clearInterval(null),t({type:"account/ACCOUNT_CLEAR_STATE"})}};e.accountClearState=_;var w=function(t){return function(e,n){var r=t.assets.map(function(t){return t.symbol}),i=function(){e({type:"account/ACCOUNT_GET_NATIVE_PRICES_REQUEST",payload:n().account.nativeCurrency}),(0,o.apiGetPrices)(r).then(function(i){var o=i.data,a=n().account.nativePriceRequest,c=n().account.nativeCurrency,f=n().account.network;if(c===a){var h=(0,s.parsePricesObject)(o,r,c),l=(0,s.parseAccountBalancesPrices)(t,h,f);(0,u.updateLocalBalances)(l.address,l,f),(0,u.saveNativePrices)(h),e({type:"account/ACCOUNT_GET_NATIVE_PRICES_SUCCESS",payload:{accountInfo:l,prices:h}})}}).catch(function(t){e({type:"account/ACCOUNT_GET_NATIVE_PRICES_FAILURE"});var n=(0,s.parseError)(t);e((0,f.notificationShow)(n,!0))})};i(),clearInterval(g),g=setInterval(i,15e3)}},M=function(){return function(t){t({type:"account/ACCOUNT_SHAPESHIFT_VERIFY_REQUEST"}),(0,o.apiShapeshiftGetCoins)().then(function(e){e.data;t({type:"account/ACCOUNT_SHAPESHIFT_VERIFY_SUCCESS"})}).catch(function(){return t({type:"account/ACCOUNT_SHAPESHIFT_VERIFY_FAILURE"})})}},x=function(){return function(t,e){var n=e().account,i=n.network,a=n.accountInfo,c=n.accountAddress,h=n.accountType,l=p({},a),d=[];(0,u.getAccountLocal)(c).then(function(e){e&&e[i]&&(e[i].balances&&(l=p({},l,{assets:e[i].balances.assets,total:e[i].balances.total})),e[i].type&&!l.type&&(l.type=e[i].type),e[i].pending&&(d=v(e[i].pending)),e[i].transactions&&(d=r.default.unionBy(d,e[i].transactions,"hash"),(0,u.updateLocalTransactions)(c,d,i)),t({type:"account/ACCOUNT_GET_ACCOUNT_BALANCES_REQUEST",payload:{accountType:l.type||h,accountInfo:l,transactions:d,fetching:e&&!e[i]||!e}})),(0,o.apiGetAccountBalances)(c,i).then(function(e){var n=p({},e.data,{type:h});(0,u.updateLocalBalances)(c,n,i),t({type:"account/ACCOUNT_GET_ACCOUNT_BALANCES_SUCCESS"}),t(w(n))}).catch(function(e){var n=(0,s.parseError)(e);t((0,f.notificationShow)(n,!0)),t({type:"account/ACCOUNT_GET_ACCOUNT_BALANCES_FAILURE"})})}).catch(function(e){var n=(0,s.parseError)(e);t((0,f.notificationShow)(n,!0))})}},S=function(){return function(t,e){var n=e().account,a=n.accountAddress,s=n.network,c=[],h=[];(0,u.getAccountLocal)(a).then(function(n){n&&n[s]&&(n[s].pending&&(c=v(n[s].pending),n[s].pending.forEach(function(e){return t(k(e.hash))})),n[s].transactions&&(h=n[s].transactions,c=r.default.unionBy(c,n[s].transactions,"hash"),(0,u.updateLocalTransactions)(a,c,s))),t({type:"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_REQUEST",payload:{transactions:c,fetchingTransactions:n&&!n[s]||!n||!n[s].transactions||!n[s].transactions.length}});var l=h.length?h[0].hash:"";(0,o.apiGetAccountTransactions)(a,s,l).then(function(n){var i=n.data,o=e().account.accountAddress,a=e().account.transactions,c=r.default.unionBy(i,a,"hash");(0,u.updateLocalTransactions)(o,c,s),t({type:"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_SUCCESS",payload:c})}).catch(function(e){t((0,f.notificationShow)(i.default.t("notification.error.failed_get_account_tx"),!0)),t({type:"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_FAILURE"})})}).catch(function(e){t({type:"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_FAILURE"})})}},k=function(t){return function(e,n){e({type:"account/ACCOUNT_CHECK_TRANSACTION_STATUS_REQUEST"});var r=n().account.network;e(E(t,r))}},A=function(){return function(t,e){var n=e().account.accountAddress;t({type:"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_REQUEST"}),(0,a.apiGetAccountUniqueTokens)(n).then(function(e){t({type:"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_SUCCESS",payload:e})}).catch(function(e){var n=(0,s.parseError)(e);t((0,f.notificationShow)(n,!0)),t({type:"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_FAILURE"})})}},E=function t(e,n){return function(r,i){(0,o.apiGetTransaction)(e,n).then(function(a){var c=a.data;if(c&&!c.error&&("0x"===c.input||"0x"!==c.input&&c.operations&&c.operations.length)){var h=i().account.accountInfo.address,l=i().account.transactions.map(function(){var t=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){d(o,r,i,a,s,"next",t)}function s(t){d(o,r,i,a,s,"throw",t)}a(void 0)})}}(regeneratorRuntime.mark(function t(n){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n.hash.toLowerCase()!==e.toLowerCase()){t.next=6;break}return t.next=3,(0,s.parseConfirmedTransactions)(c);case 3:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",n);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}());Promise.all(l).then(function(t){var e,i=(e=[]).concat.apply(e,v(t));(0,u.updateLocalTransactions)(h,i,n),r({type:"account/ACCOUNT_CHECK_TRANSACTION_STATUS_SUCCESS",payload:i}),r(function(t,e){var n=e().account,r=n.network,i=n.accountAddress,a=n.accountType;t({type:"account/ACCOUNT_UPDATE_BALANCES_REQUEST"}),(0,o.apiGetAccountBalances)(i,r).then(function(n){var i=n.data,o=e().account.prices,u=p({},i,{type:a}),c=(0,s.parseAccountBalancesPrices)(u,o,r);t({type:"account/ACCOUNT_UPDATE_BALANCES_SUCCESS",payload:c}),t(w(u))}).catch(function(e){var n=(0,s.parseError)(e);t((0,f.notificationShow)(n,!0)),t({type:"account/ACCOUNT_UPDATE_BALANCES_FAILURE"})})})})}else setTimeout(function(){return r(t(e,n))},1e3)}).catch(function(i){setTimeout(function(){return r(t(e,n))},1e3)})}},T={accountType:"",accountAddress:"",accountInfo:{address:"",accountType:"",assets:[{name:"Ethereum",symbol:"ETH",address:null,decimals:18,balance:{amount:"",display:"0.00 ETH"},native:null}],total:null},fetching:!1,fetchingShapeshift:!1,fetchingTransactions:!1,fetchingUniqueTokens:!1,hasPendingTransaction:!1,language:"en",nativePriceRequest:"USD",nativeCurrency:"USD",network:"mainnet",prices:{},shapeshiftAvailable:!0,transactions:[],uniqueTokens:[]};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"account/ACCOUNT_UPDATE_ACCOUNT_ADDRESS":return p({},t,{accountType:e.payload.accountType,accountAddress:e.payload.accountAddress,transactions:[]});case"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_REQUEST":return p({},t,{fetchingTransactions:e.payload.fetchingTransactions,transactions:e.payload.transactions});case"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_SUCCESS":return p({},t,{fetchingTransactions:!1,transactions:e.payload});case"account/ACCOUNT_GET_ACCOUNT_TRANSACTIONS_FAILURE":return p({},t,{fetchingTransactions:!1});case"account/ACCOUNT_CHECK_TRANSACTION_STATUS_SUCCESS":case"account/ACCOUNT_UPDATE_TRANSACTIONS_SUCCESS":return p({},t,{transactions:e.payload});case"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_REQUEST":return p({},t,{fetchingUniqueTokens:!0});case"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_SUCCESS":return p({},t,{fetchingUniqueTokens:!1,uniqueTokens:e.payload});case"account/ACCOUNT_GET_ACCOUNT_UNIQUE_TOKENS_FAILURE":return p({},t,{fetchingUniqueTokens:!1});case"account/ACCOUNT_GET_ACCOUNT_BALANCES_REQUEST":return p({},t,{fetching:e.payload.fetching,accountType:e.payload.accountType,accountInfo:e.payload.accountInfo,transactions:e.payload.transactions});case"account/ACCOUNT_GET_ACCOUNT_BALANCES_SUCCESS":case"account/ACCOUNT_GET_ACCOUNT_BALANCES_FAILURE":return p({},t,{fetching:!1});case"account/ACCOUNT_UPDATE_BALANCES_REQUEST":return p({},t,{fetching:!0});case"account/ACCOUNT_UPDATE_BALANCES_SUCCESS":return p({},t,{accountInfo:e.payload,fetching:!1});case"account/ACCOUNT_UPDATE_BALANCES_FAILURE":return p({},t,{fetching:!1});case"account/ACCOUNT_GET_NATIVE_PRICES_REQUEST":return p({},t,{fetchingNativePrices:!0,nativePriceRequest:e.payload});case"account/ACCOUNT_GET_NATIVE_PRICES_SUCCESS":return p({},t,{fetchingNativePrices:!1,nativePriceRequest:"",prices:e.payload.prices,accountInfo:e.payload.accountInfo});case"account/ACCOUNT_GET_NATIVE_PRICES_FAILURE":return p({},t,{fetchingNativePrices:!1,nativePriceRequest:"USD"});case"account/ACCOUNT_INITIALIZE_PRICES_SUCCESS":return p({},t,{nativePriceRequest:e.payload.nativeCurrency,nativeCurrency:e.payload.nativeCurrency});case"account/ACCOUNT_INITIALIZE_PRICES_FAILURE":return p({},t);case"account/ACCOUNT_UPDATE_HAS_PENDING_TRANSACTION":return p({},t,{hasPendingTransaction:e.payload});case"account/ACCOUNT_SHAPESHIFT_VERIFY_REQUEST":return p({},t,{fetchingShapeshift:!0});case"account/ACCOUNT_SHAPESHIFT_VERIFY_SUCCESS":return p({},t,{fetchingShapeshift:!1,shapeshiftAvailable:!0});case"account/ACCOUNT_SHAPESHIFT_VERIFY_FAILURE":return p({},t,{fetchingShapeshift:!1,shapeshiftAvailable:!1});case"account/ACCOUNT_CHANGE_NATIVE_CURRENCY_SUCCESS":return p({},t,{nativeCurrency:e.payload.nativeCurrency,prices:e.payload.prices,accountInfo:e.payload.accountInfo});case"account/ACCOUNT_CHANGE_NATIVE_CURRENCY_FAILURE":return p({},t);case"account/ACCOUNT_CHANGE_LANGUAGE_SUCCESS":return p({},t,{language:e.payload.language});case"account/ACCOUNT_CHANGE_LANGUAGE_FAILURE":return p({},t);case"account/ACCOUNT_CLEAR_STATE":return p({},t,T);default:return t}}},function(t,e,n){t.exports=n(417)},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9999;if(t.length<=e)return t;var n=e-3,r=!1,i=0;return t.split(" ").filter(function(t){return i+=t.length,!(r||i>=n)||(r=!0,!1)}).join(" ")+"..."};var o=function(t,e,n){return n=n||"0",(t+="").length>=e?t:new Array(e-t.length+1).join(n)+t};e.padLeft=o;e.sanitizeHex=function(t){return""===(t="0x"===t.substring(0,2)?t.substring(2):t)?"":"0x"+(t=t.length%2!=0?"0"+t:t)};e.removeHexPrefix=function(t){return t.toLowerCase().replace("0x","")};e.getDataString=function(t,e){for(var n="",r=0;r0&&void 0!==arguments[0]?arguments[0]:"",e=/^(44'\/6[0|1]'\/\d+'?\/)(\d+)$/.exec(t);if(null===e)throw new Error("To get multiple accounts your derivation path must follow pattern 44'/60|61'/x'/n ");return{basePath:e[1],index:parseInt(e[2],10)}};e.getUrlParameter=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"undefined"!=typeof window?window.location.href:"",n=t.replace(/[[]]/g,"\\$&"),r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)").exec(e);return r?r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"":null};var a=function(t){return t.filter(function(t){return"ETH"===t.symbol})[0]};e.getEth=a;e.transactionData=function(t,e,n){var i=a(t.assets),o=i.balance.amount,s=(0,r.convertAmountFromBigNumber)(o),u=(0,r.convertNumberToString)(e),c=n.txFee.value.amount,f=(0,r.convertAmountFromBigNumber)(c);return{ethereum:i,balanceAmount:o,balance:s,requestedAmount:u,txFeeAmount:c,txFee:f,amountWithFees:(0,r.add)(u,f)}};e.calcTxFee=function(t,e,n){var r=t[e],i=r&&r.txFee.native?r.txFee.native.value.display:"$0.00",o="ETH"!==n?" (".concat(r&&r.txFee?r.txFee.value.display:"0.000 ETH",")"):"";return"".concat(i).concat(o)}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){var r=n(445),i=n(446);t.exports=function(t){if("string"==typeof t||"number"==typeof t){var e=new r(1),n=String(t).toLowerCase().trim(),o="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),a=i(n);if("-"===a.substr(0,1)&&(a=i(a.slice(1)),e=new r(-1,10)),!(a=""===a?"0":a).match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||!0===o&&a.match(/^[0-9A-Fa-f]+$/))return new r(a,16).mul(e);if((a.match(/^-?[0-9]+$/)||""===a)&&!1===o)return new r(a,10).mul(e)}else if("object"==typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new r(t.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(t,e,n){var r=n(15),i=n(184),o=n(182),a=n(448),s=n(185),u=function(t){return t instanceof i||t&&t.constructor&&"BN"===t.constructor.name},c=function(t){return t&&t.constructor&&"BigNumber"===t.constructor.name},f=function(t){try{return o.apply(null,arguments)}catch(e){throw new Error(e+' Given value: "'+t+'"')}},h=function(t){return!!/^(0x)?[0-9a-f]{40}$/i.test(t)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(t)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(t))||l(t))},l=function(t){t=t.replace(/^0x/i,"");for(var e=g(t.toLowerCase()).replace(/^0x/i,""),n=0;n<40;n++)if(parseInt(e[n],16)>7&&t[n].toUpperCase()!==t[n]||parseInt(e[n],16)<=7&&t[n].toLowerCase()!==t[n])return!1;return!0},d=function(t){var e="";t=(t=(t=(t=(t=a.encode(t)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var n=0;n>>4).toString(16)),e.push((15&t[n]).toString(16));return"0x"+e.join("")},isHex:function(t){return(r.isString(t)||r.isNumber(t))&&/^(-0x|0x)?[0-9a-f]*$/i.test(t)},isHexStrict:v,leftPad:function(t,e,n){var r=/^0x/i.test(t)||"number"==typeof t,i=e-(t=t.toString(16).replace(/^0x/i,"")).length+1>=0?e-t.length+1:0;return(r?"0x":"")+new Array(i).join(n||"0")+t},rightPad:function(t,e,n){var r=/^0x/i.test(t)||"number"==typeof t,i=e-(t=t.toString(16).replace(/^0x/i,"")).length+1>=0?e-t.length+1:0;return(r?"0x":"")+t+new Array(i).join(n||"0")},toTwosComplement:function(t){return"0x"+f(t).toTwos(256).toString(16,64)},sha3:g}},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(2).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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 n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&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 c=["","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"],f=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}n.words[c]=0|h,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(t=t||10,e=0|e||1,16===t||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=0;nt.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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,y=v>>>13,b=0|a[3],_=8191&b,w=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],A=8191&k,E=k>>>13,T=0|a[6],C=8191&T,P=T>>>13,O=0|a[7],N=8191&O,I=O>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,F=L>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],G=8191&H,W=H>>>13,V=0|s[2],K=8191&V,Z=V>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],ht=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var vt=(c+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var gt=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,q),i=(i=Math.imul(g,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),r=r+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(S,q)|0,o=Math.imul(S,z),r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(A,q),i=(i=Math.imul(A,z))+Math.imul(E,q)|0,o=Math.imul(E,z),r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(_,K)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(l,nt)|0))<<13)|0;c=((o=o+Math.imul(l,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(P,q)|0,o=Math.imul(P,z),r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(I,q)|0,o=Math.imul(I,z),r=r+Math.imul(C,G)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Y)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(C,K)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var St=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(U,G),i=(i=Math.imul(U,W))+Math.imul(F,G)|0,o=Math.imul(F,W),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,Z)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var At=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,Z))+Math.imul(F,K)|0,o=Math.imul(F,Z),r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,r=r+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(r=r+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,r=r+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,lt)|0;var Tt=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(B,nt)|0,o=o+Math.imul(B,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(U,nt),i=(i=Math.imul(U,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,r=r+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var Ot=(c+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),r=r+Math.imul(j,ht)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Nt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(r=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=yt,u[3]=bt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Ot,u[16]=Nt,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?l(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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(r("number"==typeof t),r(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)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(i,l,h);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(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 M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(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 y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):n.strip(),n},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(y,g),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var h=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,n(40)(t))},function(t,e){var n="0123456789abcdef".split(""),r=[1,256,65536,16777216],i=[0,8,16,24],o=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],a=function(t){var e,n,r,i,a,s,u,c,f,h,l,d,p,m,v,g,y,b,_,w,M,x,S,k,A,E,T,C,P,O,N,I,R,j,B,L,U,F,D,q,z,H,G,W,V,K,Z,X,$,Y,J,Q,tt,et,nt,rt,it,ot,at,st,ut,ct,ft;for(r=0;r<48;r+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],a=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],u=t[3]^t[13]^t[23]^t[33]^t[43],c=t[4]^t[14]^t[24]^t[34]^t[44],f=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],e=(d=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|u>>>31),n=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(u<<1|s>>>31),t[0]^=e,t[1]^=n,t[10]^=e,t[11]^=n,t[20]^=e,t[21]^=n,t[30]^=e,t[31]^=n,t[40]^=e,t[41]^=n,e=i^(c<<1|f>>>31),n=a^(f<<1|c>>>31),t[2]^=e,t[3]^=n,t[12]^=e,t[13]^=n,t[22]^=e,t[23]^=n,t[32]^=e,t[33]^=n,t[42]^=e,t[43]^=n,e=s^(h<<1|l>>>31),n=u^(l<<1|h>>>31),t[4]^=e,t[5]^=n,t[14]^=e,t[15]^=n,t[24]^=e,t[25]^=n,t[34]^=e,t[35]^=n,t[44]^=e,t[45]^=n,e=c^(d<<1|p>>>31),n=f^(p<<1|d>>>31),t[6]^=e,t[7]^=n,t[16]^=e,t[17]^=n,t[26]^=e,t[27]^=n,t[36]^=e,t[37]^=n,t[46]^=e,t[47]^=n,e=h^(i<<1|a>>>31),n=l^(a<<1|i>>>31),t[8]^=e,t[9]^=n,t[18]^=e,t[19]^=n,t[28]^=e,t[29]^=n,t[38]^=e,t[39]^=n,t[48]^=e,t[49]^=n,m=t[0],v=t[1],K=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,C=t[20]<<3|t[21]>>>29,P=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,G=t[41]<<18|t[40]>>>14,j=t[2]<<1|t[3]>>>31,B=t[3]<<1|t[2]>>>31,g=t[13]<<12|t[12]>>>20,y=t[12]<<12|t[13]>>>20,X=t[22]<<10|t[23]>>>22,$=t[23]<<10|t[22]>>>22,O=t[33]<<13|t[32]>>>19,N=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ft=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,nt=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,U=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,_=t[24]<<11|t[25]>>>21,Y=t[34]<<15|t[35]>>>17,J=t[35]<<15|t[34]>>>17,I=t[45]<<29|t[44]>>>3,R=t[44]<<29|t[45]>>>3,k=t[6]<<28|t[7]>>>4,A=t[7]<<28|t[6]>>>4,rt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,F=t[26]<<25|t[27]>>>7,D=t[27]<<25|t[26]>>>7,w=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,Q=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,W=t[8]<<27|t[9]>>>5,V=t[9]<<27|t[8]>>>5,E=t[18]<<20|t[19]>>>12,T=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,q=t[38]<<8|t[39]>>>24,z=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,S=t[49]<<14|t[48]>>>18,t[0]=m^~g&b,t[1]=v^~y&_,t[10]=k^~E&C,t[11]=A^~T&P,t[20]=j^~L&F,t[21]=B^~U&D,t[30]=W^~K&X,t[31]=V^~Z&$,t[40]=et^~rt&ot,t[41]=nt^~it&at,t[2]=g^~b&w,t[3]=y^~_&M,t[12]=E^~C&O,t[13]=T^~P&N,t[22]=L^~F&q,t[23]=U^~D&z,t[32]=K^~X&Y,t[33]=Z^~$&J,t[42]=rt^~ot&st,t[43]=it^~at&ut,t[4]=b^~w&x,t[5]=_^~M&S,t[14]=C^~O&I,t[15]=P^~N&R,t[24]=F^~q&H,t[25]=D^~z&G,t[34]=X^~Y&Q,t[35]=$^~J&tt,t[44]=ot^~st&ct,t[45]=at^~ut&ft,t[6]=w^~x&m,t[7]=M^~S&v,t[16]=O^~I&k,t[17]=N^~R&A,t[26]=q^~H&j,t[27]=z^~G&B,t[36]=Y^~Q&W,t[37]=J^~tt&V,t[46]=st^~ct&et,t[47]=ut^~ft&nt,t[8]=x^~m&g,t[9]=S^~v&y,t[18]=I^~k&E,t[19]=R^~A&T,t[28]=H^~j&L,t[29]=G^~B&U,t[38]=Q^~W&K,t[39]=tt^~V&Z,t[48]=ct^~et&rt,t[49]=ft^~nt&it,t[0]^=o[r],t[1]^=o[r+1]},s=function(t){return function(e){var o;if("0x"===e.slice(0,2)){o=[];for(var s=2,u=e.length;s>2]|=e[d]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(u[v>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=c){for(t.start=v-c,t.block=u[f],v=0;v>2]|=r[3&v],t.lastByteIndex===c)for(u[0]=u[f],v=1;v>4&15]+n[15&p]+n[p>>12&15]+n[p>>8&15]+n[p>>20&15]+n[p>>16&15]+n[p>>28&15]+n[p>>24&15];g%f==0&&(a(l),v=0)}return"0x"+m}(function(t){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(t<<1)>>5,outputBlocks:t>>5,s:function(t){return[].concat(t,t,t,t,t)}([0,0,0,0,0,0,0,0,0,0])}}(t),o)}};t.exports={keccak256:s(256),keccak512:s(512),keccak256s:s(256),keccak512s:s(512)}},function(t,e,n){"use strict";var r=n(26),i=n(453),o=function(t){var e="A".charCodeAt(0),n="Z".charCodeAt(0);return(t=(t=t.toUpperCase()).substr(4)+t.substr(0,4)).split("").map(function(t){var r=t.charCodeAt(0);return r>=e&&r<=n?r-e+10:t}).join("")},a=function(t){for(var e,n=t;n.length>2;)e=n.slice(0,9),n=parseInt(e,10)%97+n.slice(e.length);return parseInt(n,10)%97},s=function(t){this._iban=t};s.toAddress=function(t){if(!(t=new s(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()},s.toIban=function(t){return s.fromAddress(t).toString()},s.fromAddress=function(t){if(!r.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var e=function(t,e){for(var n=t;n.length<2*e;)n="0"+n;return n}(new i(t,16).toString(36),15);return s.fromBban(e.toUpperCase())},s.fromBban=function(t){var e=("0"+(98-a(o("XE00"+t)))).slice(-2);return new s("XE"+e+t)},s.createIndirect=function(t){return s.fromBban("ETH"+t.institution+t.identifier)},s.isValid=function(t){return new s(t).isValid()},s.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(o(this._iban))},s.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},s.prototype.isIndirect=function(){return 20===this._iban.length},s.prototype.checksum=function(){return this._iban.substr(2,2)},s.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},s.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},s.prototype.toAddress=function(){if(this.isDirect()){var t=this._iban.substr(4),e=new i(t,36);return r.toChecksumAddress(e.toString(16,20))}return""},s.prototype.toString=function(){return this._iban},t.exports=s},function(t,e,n){"use strict";var r={messageId:0,toPayload:function(t,e){if(!t)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(e)+'"!');return r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:t,params:e||[]}},isValidResponse:function(t){return Array.isArray(t)?t.every(e):e(t);function e(t){return!(!t||t.error||"2.0"!==t.jsonrpc||"number"!=typeof t.id&&"string"!=typeof t.id||void 0===t.result)}},toBatchPayload:function(t){return t.map(function(t){return r.toPayload(t.method,t.params)})}};t.exports=r},function(t,e,n){(function(t){var r=n(468),i=n(190),o=n(195),a=n(477),s=n(69),u=e;u.request=function(e,n){e="string"==typeof e?s.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,f=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+f,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new r(e);return n&&h.on("response",n),h},u.get=function(t,e){var n=u.request(t,e);return n.end(),n},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(10))},function(t,e,n){(function(t){e.fetch=s(t.fetch)&&s(t.ReadableStream),e.writableStream=s(t.WritableStream),e.abortController=s(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(t){}var n;function r(){if(void 0!==n)return n;if(t.XMLHttpRequest){n=new t.XMLHttpRequest;try{n.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(t){n=null}}else n=null;return n}function i(t){var e=r();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var o=void 0!==t.ArrayBuffer,a=o&&s(t.ArrayBuffer.prototype.slice);function s(t){return"function"==typeof t}e.arraybuffer=e.fetch||o&&i("arraybuffer"),e.msstream=!e.fetch&&a&&i("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o&&i("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!r()&&s(r().overrideMimeType),e.vbArray=s(t.VBArray),n=null}).call(this,n(10))},function(t,e,n){(function(t,r,i){var o=n(189),a=n(1),s=n(70),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=e.IncomingMessage=function(e,n,a,u){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){t.nextTick(function(){c.emit("close")})}),"fetch"===a){if(c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=n.statusText,n.headers.forEach(function(t,e){c.headers[e.toLowerCase()]=t,c.rawHeaders.push(e,t)}),o.writableStream){var f=new WritableStream({write:function(t){return new Promise(function(e,n){c._destroyed?n():c.push(new r(t))?e():c._resumeFetch=e})},close:function(){i.clearTimeout(u),c._destroyed||c.push(null)},abort:function(t){c._destroyed||c.emit("error",t)}});try{return void n.body.pipeTo(f).catch(function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)})}catch(t){}}var h=n.body.getReader();!function t(){h.read().then(function(e){if(!c._destroyed){if(e.done)return i.clearTimeout(u),void c.push(null);c.push(new r(e.value)),t()}}).catch(function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)})}()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var n=e[1].toLowerCase();"set-cookie"===n?(void 0===c.headers[n]&&(c.headers[n]=[]),c.headers[n].push(e[2])):void 0!==c.headers[n]?c.headers[n]+=", "+e[2]:c.headers[n]=e[2],c.rawHeaders.push(e[1],e[2])}}),c._charset="x-user-defined",!o.overrideMimeType){var l=c.rawHeaders["mime-type"];if(l){var d=l.match(/;\s*charset=([^;])(;|$)/);d&&(c._charset=d[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},c.prototype._onXHRProgress=function(){var t=this,e=t._xhr,n=null;switch(t._mode){case"text:vbarray":if(e.readyState!==u.DONE)break;try{n=new i.VBArray(e.responseBody).toArray()}catch(t){}if(null!==n){t.push(new r(n));break}case"text":try{n=e.responseText}catch(e){t._mode="text:vbarray";break}if(n.length>t._pos){var o=n.substr(t._pos);if("x-user-defined"===t._charset){for(var a=new r(o.length),s=0;st._pos&&(t.push(new r(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(n)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,n(18),n(2).Buffer,n(10))},function(t,e,n){"use strict";(function(e,r){var i=n(92);t.exports=b;var o,a=n(181);b.ReadableState=y;n(127).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=n(192),c=n(3).Buffer,f=e.Uint8Array||function(){};var h=n(71);h.inherits=n(1);var l=n(469),d=void 0;d=l&&l.debuglog?l.debuglog("stream"):function(){};var p,m=n(470),v=n(193);h.inherits(b,u);var g=["error","close","destroy","pause","resume"];function y(t,e){o=o||n(54),t=t||{};var r=e instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=n(129).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||n(54),!(this instanceof b))return new b(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function _(t,e,n,r,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,S(t)}(t,a)):(i||(o=function(t,e){var n;(function(t){return c.isBuffer(t)||t instanceof f})(e)||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?w(t,a,e,!1):A(t,a)):w(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=M?t=M:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(k,t):k(t))}function k(t){d("emit readable"),t.emit("readable"),P(t)}function A(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(E,t,e))}function E(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function N(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(I,e,t))}function I(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):S(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&N(this),null;var r,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&N(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?f:b;function c(e,r){d("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",h),t.removeListener("error",v),t.removeListener("unpipe",c),n.removeListener("end",f),n.removeListener("end",b),n.removeListener("data",m),l=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function f(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",c);var h=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,P(t))}}(n);t.on("drain",h);var l=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==R(o.pipes,t))&&!l&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function v(e){d("onerror",e),b(),t.removeListener("error",v),0===s(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",y),b()}function y(){d("onfinish"),t.removeListener("close",g),b()}function b(){d("unpipe"),n.unpipe(t)}return n.on("data",m),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",v),t.once("close",g),t.once("finish",y),t.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,n){var r=n(1),i=n(65),o=n(3).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t,e,n){return n^t&(e^n)}function f(t,e,n){return t&e|n&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0|this._f,m=0|this._g,v=0|this._h,g=0;g<16;++g)e[g]=t.readInt32BE(4*g);for(;g<64;++g)e[g]=p(e[g-2])+e[g-7]+d(e[g-15])+e[g-16]|0;for(var y=0;y<64;++y){var b=v+l(s)+c(s,u,m)+a[y]+e[y]|0,_=h(n)+f(n,r,i)|0;v=m,m=u,u=s,s=o+b|0,o=i,i=r,r=n,n=b+_|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=u+this._f|0,this._g=m+this._g|0,this._h=v+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,n){var r=n(1),i=n(65),o=n(3).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,n){return n^t&(e^n)}function f(t,e,n){return t&e|n&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function v(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function g(t,e){return t>>>0>>0?1:0}r(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,y=0|this._gh,b=0|this._hh,_=0|this._al,w=0|this._bl,M=0|this._cl,x=0|this._dl,S=0|this._el,k=0|this._fl,A=0|this._gl,E=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var C=e[T-30],P=e[T-30+1],O=d(C,P),N=p(P,C),I=m(C=e[T-4],P=e[T-4+1]),R=v(P,C),j=e[T-14],B=e[T-14+1],L=e[T-32],U=e[T-32+1],F=N+B|0,D=O+j+g(F,N)|0;D=(D=D+I+g(F=F+R|0,R)|0)+L+g(F=F+U|0,U)|0,e[T]=D,e[T+1]=F}for(var q=0;q<160;q+=2){D=e[q],F=e[q+1];var z=f(n,r,i),H=f(_,w,M),G=h(n,_),W=h(_,n),V=l(s,S),K=l(S,s),Z=a[q],X=a[q+1],$=c(s,u,y),Y=c(S,k,A),J=E+K|0,Q=b+V+g(J,E)|0;Q=(Q=(Q=Q+$+g(J=J+Y|0,Y)|0)+Z+g(J=J+X|0,X)|0)+D+g(J=J+F|0,F)|0;var tt=W+H|0,et=G+z+g(tt,W)|0;b=y,E=A,y=u,A=k,u=s,k=S,s=o+Q+g(S=x+J|0,x)|0,o=i,x=M,i=r,M=w,r=n,w=_,n=Q+et+g(_=J+tt|0,J)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+M|0,this._dl=this._dl+x|0,this._el=this._el+S|0,this._fl=this._fl+k|0,this._gl=this._gl+A|0,this._hl=this._hl+E|0,this._ah=this._ah+n+g(this._al,_)|0,this._bh=this._bh+r+g(this._bl,w)|0,this._ch=this._ch+i+g(this._cl,M)|0,this._dh=this._dh+o+g(this._dl,x)|0,this._eh=this._eh+s+g(this._el,S)|0,this._fh=this._fh+u+g(this._fl,k)|0,this._gh=this._gh+y+g(this._gl,A)|0,this._hh=this._hh+b+g(this._hl,E)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,n){"use strict";var r=n(1),i=n(511),o=n(43),a=n(3).Buffer,s=n(206),u=n(134),c=n(135),f=a.alloc(128);function h(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var n="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>n)?e=("rmd160"===t?new u:c(t)).update(e).digest():e.lengthn||o!=o)throw new TypeError("Bad key length")}}).call(this,n(2).Buffer)},function(t,e,n){(function(e){var n;e.browser?n="utf-8":n=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=n}).call(this,n(18))},function(t,e,n){var r=n(206),i=n(134),o=n(135),a=n(208),s=n(209),u=n(3).Buffer,c=u.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(t,e,n){var a=function(t){return"rmd160"===t||"ripemd160"===t?i:"md5"===t?r:function(e){return o(t).update(e).digest()}}(t),s="sha512"===t||"sha384"===t?128:64;e.length>s?e=a(e):e.lengtht;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(u),e.cmp(u)){if(!e.cmp(c))for(;n.mod(f).cmp(h);)n.iadd(d)}else for(;n.mod(o).cmp(l);)n.iadd(d);if(v(p=n.shrn(1))&&v(n)&&g(p)&&g(n)&&a.test(p)&&a.test(n))return n}}},function(t,e,n){var r=n(9),i=n(218);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),n=Math.ceil(e/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var n=e.sub(t);return t.add(this._randbelow(n))},o.prototype.test=function(t,e,n){var i=t.bitLength(),o=r.mont(t),a=new r(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),f=s.toRed(o);e>0;e--){var h=this._randrange(new r(2),s);n&&n(h);var l=h.toRed(o).redPow(c);if(0!==l.cmp(a)&&0!==l.cmp(f)){for(var d=1;d0;e--){var f=this._randrange(new r(2),a),h=t.gcd(f);if(0!==h.cmpn(1))return h;var l=f.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(c)){for(var d=1;d>8,a=255&i;o?n.push(o,a):n.push(a)}return n},r.zero2=i,r.toHex=o,r.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,n){"use strict";var r=n(33).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function a(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?a(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=a,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,n){"use strict";var r=n(33),i=n(74),o=n(220),a=n(27),s=r.sum32,u=r.sum32_4,c=r.sum32_5,f=o.ch32,h=o.maj32,l=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,v=i.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(y,v),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r>6],i=0==(32&n);if(31==(31&n)){var o=n;for(n=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;n<<=7,n|=127&o}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function h(t,e,n){var r=t.readUInt8(n);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;var i=127&r;if(i>4)return t.error("length octect is too long");r=0;for(var o=0;o=31)return r.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=s.tagClassByName[n||"universal"]<<6}(t,e,n,this.reporter);if(r.length<128)return(o=new i(2))[0]=a,o[1]=r.length,this._createEncoderBuffer([o,r]);for(var u=1,c=r.length;c>=256;c>>=8)u++;(o=new i(2+u))[0]=a,o[1]=128|u;c=1+u;for(var f=r.length;f>0;c--,f>>=8)o[c]=255&f;return this._createEncoderBuffer([o,r])},c.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var n=new i(2*t.length),r=0;r=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(r=0;r=128;a>>=7)o++}var s=new i(o),u=s.length-1;for(r=t.length-1;r>=0;r--){a=t[r];for(s[u--]=127&a;(a>>=7)>0;)s[u--]=128|127&a}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(t,e){var n,r=new Date(t);return"gentime"===e?n=[f(r.getFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?n=[f(r.getFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(n,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var n=t.toArray();!t.sign&&128&n[0]&&n.unshift(0),t=new i(n)}if(i.isBuffer(t)){var r=t.length;0===t.length&&r++;var o=new i(r);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);r=1;for(var a=t;a>=256;a>>=8)r++;for(a=(o=new Array(r)).length-1;a>=0;a--)o[a]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},c.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},c.prototype._skipDefault=function(t,e,n){var r,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,n).join()),o.length!==i.defaultBuffer.length)return!1;for(r=0;r="80"?n(r.length/2,128):"")+r}var i=e.map(t).join("");return n(i.length/2,192)+i}(t)},decode:function(t){var e=2,n=function(){if(e>=t.length)throw"";var n=t.slice(e,e+2);return n<"80"?(e+=2,"0x"+n):n<"c0"?i():o()},r=function(){var n=parseInt(t.slice(e,e+=2),16)%64;return n<56?n:parseInt(t.slice(e,e+=2*(n-55)),16)},i=function(){var n=r();return"0x"+t.slice(e,e+=2*n)},o=function(){for(var t=2*r()+e,i=[];e>>31),n=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(u<<1|s>>>31),t[0]^=e,t[1]^=n,t[10]^=e,t[11]^=n,t[20]^=e,t[21]^=n,t[30]^=e,t[31]^=n,t[40]^=e,t[41]^=n,e=i^(c<<1|f>>>31),n=a^(f<<1|c>>>31),t[2]^=e,t[3]^=n,t[12]^=e,t[13]^=n,t[22]^=e,t[23]^=n,t[32]^=e,t[33]^=n,t[42]^=e,t[43]^=n,e=s^(h<<1|l>>>31),n=u^(l<<1|h>>>31),t[4]^=e,t[5]^=n,t[14]^=e,t[15]^=n,t[24]^=e,t[25]^=n,t[34]^=e,t[35]^=n,t[44]^=e,t[45]^=n,e=c^(d<<1|p>>>31),n=f^(p<<1|d>>>31),t[6]^=e,t[7]^=n,t[16]^=e,t[17]^=n,t[26]^=e,t[27]^=n,t[36]^=e,t[37]^=n,t[46]^=e,t[47]^=n,e=h^(i<<1|a>>>31),n=l^(a<<1|i>>>31),t[8]^=e,t[9]^=n,t[18]^=e,t[19]^=n,t[28]^=e,t[29]^=n,t[38]^=e,t[39]^=n,t[48]^=e,t[49]^=n,m=t[0],v=t[1],K=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,C=t[20]<<3|t[21]>>>29,P=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,G=t[41]<<18|t[40]>>>14,j=t[2]<<1|t[3]>>>31,B=t[3]<<1|t[2]>>>31,g=t[13]<<12|t[12]>>>20,y=t[12]<<12|t[13]>>>20,X=t[22]<<10|t[23]>>>22,$=t[23]<<10|t[22]>>>22,O=t[33]<<13|t[32]>>>19,N=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ft=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,nt=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,U=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,_=t[24]<<11|t[25]>>>21,Y=t[34]<<15|t[35]>>>17,J=t[35]<<15|t[34]>>>17,I=t[45]<<29|t[44]>>>3,R=t[44]<<29|t[45]>>>3,k=t[6]<<28|t[7]>>>4,A=t[7]<<28|t[6]>>>4,rt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,F=t[26]<<25|t[27]>>>7,D=t[27]<<25|t[26]>>>7,w=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,Q=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,W=t[8]<<27|t[9]>>>5,V=t[9]<<27|t[8]>>>5,E=t[18]<<20|t[19]>>>12,T=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,q=t[38]<<8|t[39]>>>24,z=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,S=t[49]<<14|t[48]>>>18,t[0]=m^~g&b,t[1]=v^~y&_,t[10]=k^~E&C,t[11]=A^~T&P,t[20]=j^~L&F,t[21]=B^~U&D,t[30]=W^~K&X,t[31]=V^~Z&$,t[40]=et^~rt&ot,t[41]=nt^~it&at,t[2]=g^~b&w,t[3]=y^~_&M,t[12]=E^~C&O,t[13]=T^~P&N,t[22]=L^~F&q,t[23]=U^~D&z,t[32]=K^~X&Y,t[33]=Z^~$&J,t[42]=rt^~ot&st,t[43]=it^~at&ut,t[4]=b^~w&x,t[5]=_^~M&S,t[14]=C^~O&I,t[15]=P^~N&R,t[24]=F^~q&H,t[25]=D^~z&G,t[34]=X^~Y&Q,t[35]=$^~J&tt,t[44]=ot^~st&ct,t[45]=at^~ut&ft,t[6]=w^~x&m,t[7]=M^~S&v,t[16]=O^~I&k,t[17]=N^~R&A,t[26]=q^~H&j,t[27]=z^~G&B,t[36]=Y^~Q&W,t[37]=J^~tt&V,t[46]=st^~ct&et,t[47]=ut^~ft&nt,t[8]=x^~m&g,t[9]=S^~v&y,t[18]=I^~k&E,t[19]=R^~A&T,t[28]=H^~j&L,t[29]=G^~B&U,t[38]=Q^~W&K,t[39]=tt^~V&Z,t[48]=ct^~et&rt,t[49]=ft^~nt&it,t[0]^=o[r],t[1]^=o[r+1]},s=function(t){return function(e){var o;if("0x"===e.slice(0,2)){o=[];for(var s=2,u=e.length;s>2]|=e[d]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(u[v>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=c){for(t.start=v-c,t.block=u[f],v=0;v>2]|=r[3&v],t.lastByteIndex===c)for(u[0]=u[f],v=1;v>4&15]+n[15&p]+n[p>>12&15]+n[p>>8&15]+n[p>>20&15]+n[p>>16&15]+n[p>>28&15]+n[p>>24&15];g%f==0&&(a(l),v=0)}return"0x"+m}(function(t){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(t<<1)>>5,outputBlocks:t>>5,s:function(t){return[].concat(t,t,t,t,t)}([0,0,0,0,0,0,0,0,0,0])}}(t),o)}};t.exports={keccak256:s(256),keccak512:s(512),keccak256s:s(256),keccak512s:s(512)}},function(t,e,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT -*/var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u>6|192);else{if(i>55295&&i<56320){if(++n==t.length)return null;var o=t.charCodeAt(n);if(o<56320||o>57343)return null;r+=e((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=e(i>>12&63|128)}else r+=e(i>>12|224);r+=e(i>>6&63|128)}r+=e(63&i|128)}}return r},toString:function(t){for(var e="",r=0,o=i(t);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(t,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(t,r))<<6|63&n(t,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(t,r))<<12|(63&n(t,++r))<<6|63&n(t,++r)}++r}if(a<=65535)e+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,e+=String.fromCharCode(a>>10|55296),e+=String.fromCharCode(1023&a|56320)}}return e},fromNumber:function(t){var e=t.toString(16);return e.length%2==0?"0x"+e:"0x0"+e},toNumber:function(t){return parseInt(t.slice(2),16)},fromNat:function(t){return"0x0"===t?"0x":t.length%2==0?t:"0x0"+t.slice(2)},toNat:function(t){return"0"===t[2]?"0x"+t.slice(3):t},fromArray:a,toArray:o,fromUint8Array:function(t){return a([].slice.call(t,0))},toUint8Array:function(t){return new Uint8Array(o(t))}}},function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise(function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,u,"next",t)}function u(t){n(a,i,o,s,u,"throw",t)}s(void 0)})}}Object.defineProperty(e,"__esModule",{value:!0}),e.saveLanguage=e.getLanguage=e.saveWalletConnectAccount=e.getWalletConnectAccount=e.updateLocalTransactions=e.updateLocalBalances=e.saveNativeCurrency=e.getNativeCurrency=e.saveNativePrices=e.getNativePrices=e.getAccountLocal=e.removeLocal=e.getLocal=e.saveLocal=void 0;var o=function(){var t=i(regeneratorRuntime.mark(function t(){var e,r,n,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:"",r=i.length>1&&void 0!==i[1]?i[1]:{},n=i.length>2&&void 0!==i[2]?i[2]:"0.1.0",t.prev=3,r.storageVersion=n,t.next=7,storage.save({key:e,data:r,expires:null});case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),console.log("Storage: error saving to local for key",e);case 12:case"end":return t.stop()}},t,this,[[3,9]])}));return function(){return t.apply(this,arguments)}}();e.saveLocal=o;var a=function(){var t=i(regeneratorRuntime.mark(function t(){var e,r,n,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:"",r=i.length>1&&void 0!==i[1]?i[1]:"0.1.0",t.prev=2,t.next=5,storage.load({key:e,autoSync:!1,syncInBackground:!1});case 5:if(!(n=t.sent)||n.storageVersion!==r){t.next=10;break}return t.abrupt("return",n);case 10:if(!n){t.next=14;break}return t.next=13,s(e);case 13:return t.abrupt("return",null);case 14:t.next=20;break;case 16:return t.prev=16,t.t0=t.catch(2),console.log("Storage: error getting from local for key",e),t.abrupt("return",null);case 20:case"end":return t.stop()}},t,this,[[2,16]])}));return function(){return t.apply(this,arguments)}}();e.getLocal=a;var s=function(){var t=i(regeneratorRuntime.mark(function t(){var e,r=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:"",t.prev=1,t.next=4,storage.removeItem({key:e});case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),console.log("Storage: error removing local with key",e);case 9:case"end":return t.stop()}},t,this,[[1,6]])}));return function(){return t.apply(this,arguments)}}();e.removeLocal=s;var u=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a(e.toLowerCase(),"0.1.0");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.getAccountLocal=u;var c=function(){var t=i(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a("nativePrices","0.1.0");case 2:return e=t.sent,t.abrupt("return",e?e.data:null);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.getNativePrices=c;var h=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o("nativePrices",{data:e},"0.1.0");case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.saveNativePrices=h;var f=function(){var t=i(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a("nativeCurrency","0.1.0");case 2:return e=t.sent,t.abrupt("return",e?e.data:null);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.getNativeCurrency=f;var l=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o("nativeCurrency",{data:e},"0.1.0");case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.saveNativeCurrency=l;var d=function(){var t=i(regeneratorRuntime.mark(function t(e,r,n){var i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,u(e);case 4:return(i=t.sent)||(i={}),i[n]||(i[n]={}),i[n].type=r.type,i[n].balances={assets:r.assets,total:r.total||"———"},t.next=11,o(e.toLowerCase(),i,"0.1.0");case 11:case"end":return t.stop()}},t,this)}));return function(e,r,n){return t.apply(this,arguments)}}();e.updateLocalBalances=d;var p=function(){var t=i(regeneratorRuntime.mark(function t(e,r,n){var i,a,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,u(e);case 4:return(i=t.sent)||(i={}),a=[],s=[],r.forEach(function(t){t.pending?a.push(t):s.push(t)}),i[n]||(i[n]={}),i[n].transactions=s,i[n].pending=a,t.next=14,o(e.toLowerCase(),i,"0.1.0");case 14:case"end":return t.stop()}},t,this)}));return function(e,r,n){return t.apply(this,arguments)}}();e.updateLocalTransactions=p;var m=function(){var t=i(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a("walletconnect","0.1.0");case 2:return e=t.sent,t.abrupt("return",e?e.data:null);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.getWalletConnectAccount=m;var v=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o("walletconnect",{data:e},"0.1.0");case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.saveWalletConnectAccount=v;var g=function(){var t=i(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a("language","0.1.0");case 2:return e=t.sent,t.abrupt("return",e?e.data:null);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.getLanguage=g;var b=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o("language",{data:e},"0.1.0");case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.saveLanguage=b},function(t,e,r){"use strict";function n(t){for(var e=1;e1&&void 0!==arguments[1]&&arguments[1];return function(r){clearTimeout(o),r({type:"notification/NOTIFICATION_SHOW",payload:{message:t,error:e}}),o=setTimeout(function(){return r({type:"notification/NOTIFICATION_HIDE"})},15e3)}};var a={show:!1,error:!1,message:""};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"notification/NOTIFICATION_SHOW":return n({},t,{show:!0,message:e.payload.message,error:e.payload.error});case"notification/NOTIFICATION_HIDE":return n({},t,{show:!1,message:"",error:!1});default:return t}}},function(t,e,r){t.exports=r(128)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"account",{enumerable:!0,get:function(){return n.account}}),Object.defineProperty(e,"accountChangeLanguage",{enumerable:!0,get:function(){return n.accountChangeLanguage}}),Object.defineProperty(e,"accountChangeNativeCurrency",{enumerable:!0,get:function(){return n.accountChangeNativeCurrency}}),Object.defineProperty(e,"accountUpdateNetwork",{enumerable:!0,get:function(){return n.accountUpdateNetwork}}),Object.defineProperty(e,"accountClearState",{enumerable:!0,get:function(){return n.accountClearState}}),Object.defineProperty(e,"accountUpdateAccountAddress",{enumerable:!0,get:function(){return n.accountUpdateAccountAddress}}),Object.defineProperty(e,"accountUpdateExchange",{enumerable:!0,get:function(){return n.accountUpdateExchange}}),Object.defineProperty(e,"accountUpdateHasPendingTransaction",{enumerable:!0,get:function(){return n.accountUpdateHasPendingTransaction}}),Object.defineProperty(e,"accountUpdateTransactions",{enumerable:!0,get:function(){return n.accountUpdateTransactions}}),Object.defineProperty(e,"send",{enumerable:!0,get:function(){return n.send}}),Object.defineProperty(e,"sendClearFields",{enumerable:!0,get:function(){return n.sendClearFields}}),Object.defineProperty(e,"sendMaxBalance",{enumerable:!0,get:function(){return n.sendMaxBalance}}),Object.defineProperty(e,"sendModalInit",{enumerable:!0,get:function(){return n.sendModalInit}}),Object.defineProperty(e,"sendToggleConfirmationView",{enumerable:!0,get:function(){return n.sendToggleConfirmationView}}),Object.defineProperty(e,"sendTransaction",{enumerable:!0,get:function(){return n.sendTransaction}}),Object.defineProperty(e,"sendUpdateAssetAmount",{enumerable:!0,get:function(){return n.sendUpdateAssetAmount}}),Object.defineProperty(e,"sendUpdateGasPrice",{enumerable:!0,get:function(){return n.sendUpdateGasPrice}}),Object.defineProperty(e,"sendUpdateNativeAmount",{enumerable:!0,get:function(){return n.sendUpdateNativeAmount}}),Object.defineProperty(e,"sendUpdateRecipient",{enumerable:!0,get:function(){return n.sendUpdateRecipient}}),Object.defineProperty(e,"sendUpdateSelected",{enumerable:!0,get:function(){return n.sendUpdateSelected}}),Object.defineProperty(e,"parseError",{enumerable:!0,get:function(){return i.parseError}}),Object.defineProperty(e,"parseGasPrices",{enumerable:!0,get:function(){return i.parseGasPrices}}),e.bignumber=e.commonStorage=void 0;var n=r(129),i=r(336),o=s(r(125));e.commonStorage=o;var a=s(r(16));function s(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}e.bignumber=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"account",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"accountChangeLanguage",{enumerable:!0,get:function(){return n.accountChangeLanguage}}),Object.defineProperty(e,"accountChangeNativeCurrency",{enumerable:!0,get:function(){return n.accountChangeNativeCurrency}}),Object.defineProperty(e,"accountUpdateNetwork",{enumerable:!0,get:function(){return n.accountUpdateNetwork}}),Object.defineProperty(e,"accountClearState",{enumerable:!0,get:function(){return n.accountClearState}}),Object.defineProperty(e,"accountUpdateAccountAddress",{enumerable:!0,get:function(){return n.accountUpdateAccountAddress}}),Object.defineProperty(e,"accountUpdateExchange",{enumerable:!0,get:function(){return n.accountUpdateExchange}}),Object.defineProperty(e,"accountUpdateHasPendingTransaction",{enumerable:!0,get:function(){return n.accountUpdateHasPendingTransaction}}),Object.defineProperty(e,"accountUpdateTransactions",{enumerable:!0,get:function(){return n.accountUpdateTransactions}}),Object.defineProperty(e,"send",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"sendClearFields",{enumerable:!0,get:function(){return i.sendClearFields}}),Object.defineProperty(e,"sendMaxBalance",{enumerable:!0,get:function(){return i.sendMaxBalance}}),Object.defineProperty(e,"sendModalInit",{enumerable:!0,get:function(){return i.sendModalInit}}),Object.defineProperty(e,"sendToggleConfirmationView",{enumerable:!0,get:function(){return i.sendToggleConfirmationView}}),Object.defineProperty(e,"sendTransaction",{enumerable:!0,get:function(){return i.sendTransaction}}),Object.defineProperty(e,"sendUpdateAssetAmount",{enumerable:!0,get:function(){return i.sendUpdateAssetAmount}}),Object.defineProperty(e,"sendUpdateGasPrice",{enumerable:!0,get:function(){return i.sendUpdateGasPrice}}),Object.defineProperty(e,"sendUpdateNativeAmount",{enumerable:!0,get:function(){return i.sendUpdateNativeAmount}}),Object.defineProperty(e,"sendUpdateRecipient",{enumerable:!0,get:function(){return i.sendUpdateRecipient}}),Object.defineProperty(e,"sendUpdateSelected",{enumerable:!0,get:function(){return i.sendUpdateSelected}});var n=o(r(61)),i=o(r(335));function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}},function(t,e,r){(function(t,n){var i; +*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u>6|192);else{if(i>55295&&i<56320){if(++r==t.length)return null;var o=t.charCodeAt(r);if(o<56320||o>57343)return null;n+=e((i=65536+((1023&i)<<10)+(1023&o))>>18|240),n+=e(i>>12&63|128)}else n+=e(i>>12|224);n+=e(i>>6&63|128)}n+=e(63&i|128)}}return n},toString:function(t){for(var e="",n=0,o=i(t);n127){if(a>191&&a<224){if(n>=o)return null;a=(31&a)<<6|63&r(t,n)}else if(a>223&&a<240){if(n+1>=o)return null;a=(15&a)<<12|(63&r(t,n))<<6|63&r(t,++n)}else{if(!(a>239&&a<248))return null;if(n+2>=o)return null;a=(7&a)<<18|(63&r(t,n))<<12|(63&r(t,++n))<<6|63&r(t,++n)}++n}if(a<=65535)e+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,e+=String.fromCharCode(a>>10|55296),e+=String.fromCharCode(1023&a|56320)}}return e},fromNumber:function(t){var e=t.toString(16);return e.length%2==0?"0x"+e:"0x0"+e},toNumber:function(t){return parseInt(t.slice(2),16)},fromNat:function(t){return"0x0"===t?"0x":t.length%2==0?t:"0x0"+t.slice(2)},toNat:function(t){return"0"===t[2]?"0x"+t.slice(3):t},fromArray:a,toArray:o,fromUint8Array:function(t){return a([].slice.call(t,0))},toUint8Array:function(t){return new Uint8Array(o(t))}}},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise(function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)})}}Object.defineProperty(e,"__esModule",{value:!0}),e.saveLanguage=e.getLanguage=e.saveWalletConnectAccount=e.getWalletConnectAccount=e.updateLocalTransactions=e.updateLocalBalances=e.saveNativeCurrency=e.getNativeCurrency=e.saveNativePrices=e.getNativePrices=e.getAccountLocal=e.removeLocal=e.getLocal=e.saveLocal=void 0;var o=function(){var t=i(regeneratorRuntime.mark(function t(){var e,n,r,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:"",n=i.length>1&&void 0!==i[1]?i[1]:{},r=i.length>2&&void 0!==i[2]?i[2]:"0.1.0",t.prev=3,n.storageVersion=r,t.next=7,storage.save({key:e,data:n,expires:null});case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),console.log("Storage: error saving to local for key",e);case 12:case"end":return t.stop()}},t,this,[[3,9]])}));return function(){return t.apply(this,arguments)}}();e.saveLocal=o;var a=function(){var t=i(regeneratorRuntime.mark(function t(){var e,n,r,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:"",n=i.length>1&&void 0!==i[1]?i[1]:"0.1.0",t.prev=2,t.next=5,storage.load({key:e,autoSync:!1,syncInBackground:!1});case 5:if(!(r=t.sent)||r.storageVersion!==n){t.next=10;break}return t.abrupt("return",r);case 10:if(!r){t.next=14;break}return t.next=13,s(e);case 13:return t.abrupt("return",null);case 14:t.next=20;break;case 16:return t.prev=16,t.t0=t.catch(2),console.log("Storage: error getting from local for key",e),t.abrupt("return",null);case 20:case"end":return t.stop()}},t,this,[[2,16]])}));return function(){return t.apply(this,arguments)}}();e.getLocal=a;var s=function(){var t=i(regeneratorRuntime.mark(function t(){var e,n=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:"",t.prev=1,t.next=4,storage.removeItem({key:e});case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),console.log("Storage: error removing local with key",e);case 9:case"end":return t.stop()}},t,this,[[1,6]])}));return function(){return t.apply(this,arguments)}}();e.removeLocal=s;var u=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a(e.toLowerCase(),"0.1.0");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.getAccountLocal=u;var c=function(){var t=i(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a("nativePrices","0.1.0");case 2:return e=t.sent,t.abrupt("return",e?e.data:null);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.getNativePrices=c;var f=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o("nativePrices",{data:e},"0.1.0");case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.saveNativePrices=f;var h=function(){var t=i(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a("nativeCurrency","0.1.0");case 2:return e=t.sent,t.abrupt("return",e?e.data:null);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.getNativeCurrency=h;var l=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o("nativeCurrency",{data:e},"0.1.0");case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.saveNativeCurrency=l;var d=function(){var t=i(regeneratorRuntime.mark(function t(e,n,r){var i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,u(e);case 4:return(i=t.sent)||(i={}),i[r]||(i[r]={}),i[r].type=n.type,i[r].balances={assets:n.assets,total:n.total||"———"},t.next=11,o(e.toLowerCase(),i,"0.1.0");case 11:case"end":return t.stop()}},t,this)}));return function(e,n,r){return t.apply(this,arguments)}}();e.updateLocalBalances=d;var p=function(){var t=i(regeneratorRuntime.mark(function t(e,n,r){var i,a,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,u(e);case 4:return(i=t.sent)||(i={}),a=[],s=[],n.forEach(function(t){t.pending?a.push(t):s.push(t)}),i[r]||(i[r]={}),i[r].transactions=s,i[r].pending=a,t.next=14,o(e.toLowerCase(),i,"0.1.0");case 14:case"end":return t.stop()}},t,this)}));return function(e,n,r){return t.apply(this,arguments)}}();e.updateLocalTransactions=p;var m=function(){var t=i(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a("walletconnect","0.1.0");case 2:return e=t.sent,t.abrupt("return",e?e.data:null);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.getWalletConnectAccount=m;var v=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o("walletconnect",{data:e},"0.1.0");case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.saveWalletConnectAccount=v;var g=function(){var t=i(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a("language","0.1.0");case 2:return e=t.sent,t.abrupt("return",e?e.data:null);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.getLanguage=g;var y=function(){var t=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o("language",{data:e},"0.1.0");case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();e.saveLanguage=y},function(t,e,n){"use strict";function r(t){for(var e=1;e1&&void 0!==arguments[1]&&arguments[1];return function(n){clearTimeout(o),n({type:"notification/NOTIFICATION_SHOW",payload:{message:t,error:e}}),o=setTimeout(function(){return n({type:"notification/NOTIFICATION_HIDE"})},15e3)}};var a={show:!1,error:!1,message:""};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"notification/NOTIFICATION_SHOW":return r({},t,{show:!0,message:e.payload.message,error:e.payload.error});case"notification/NOTIFICATION_HIDE":return r({},t,{show:!1,message:"",error:!1});default:return t}}},function(t,e,n){n(142),t.exports=n(404)},function(t,e,n){n(240),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(321),n(322),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(121),n(346),n(347),n(162),n(348),n(349),n(350),n(351),n(163),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(376),n(377),n(378),n(379),n(380),n(381),n(382),t.exports=n(13)},function(t,e,n){"use strict";var r=n(5),i=n(21),o=n(12),a=n(0),s=n(19),u=n(42).KEY,c=n(4),f=n(101),h=n(57),l=n(45),d=n(8),p=n(102),m=n(144),v=n(241),g=n(105),y=n(7),b=n(6),_=n(23),w=n(41),M=n(44),x=n(49),S=n(147),k=n(29),A=n(11),E=n(47),T=k.f,C=A.f,P=S.f,O=r.Symbol,N=r.JSON,I=N&&N.stringify,R=d("_hidden"),j=d("toPrimitive"),B={}.propertyIsEnumerable,L=f("symbol-registry"),U=f("symbols"),F=f("op-symbols"),D=Object.prototype,q="function"==typeof O,z=r.QObject,H=!z||!z.prototype||!z.prototype.findChild,G=o&&c(function(){return 7!=x(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=T(D,e);r&&delete D[e],C(t,e,n),r&&t!==D&&C(D,e,r)}:C,W=function(t){var e=U[t]=x(O.prototype);return e._k=t,e},V=q&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},K=function(t,e,n){return t===D&&K(F,e,n),y(t),e=w(e,!0),y(n),i(U,e)?(n.enumerable?(i(t,R)&&t[R][e]&&(t[R][e]=!1),n=x(n,{enumerable:M(0,!1)})):(i(t,R)||C(t,R,M(1,{})),t[R][e]=!0),G(t,e,n)):C(t,e,n)},Z=function(t,e){y(t);for(var n,r=v(e=_(e)),i=0,o=r.length;o>i;)K(t,n=r[i++],e[n]);return t},X=function(t){var e=B.call(this,t=w(t,!0));return!(this===D&&i(U,t)&&!i(F,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,R)&&this[R][t])||e)},$=function(t,e){if(t=_(t),e=w(e,!0),t!==D||!i(U,e)||i(F,e)){var n=T(t,e);return!n||!i(U,e)||i(t,R)&&t[R][e]||(n.enumerable=!0),n}},Y=function(t){for(var e,n=P(_(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==R||e==u||r.push(e);return r},J=function(t){for(var e,n=t===D,r=P(n?F:_(t)),o=[],a=0;r.length>a;)!i(U,e=r[a++])||n&&!i(D,e)||o.push(U[e]);return o};q||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=l(arguments.length>0?arguments[0]:void 0),e=function(n){this===D&&e.call(F,n),i(this,R)&&i(this[R],t)&&(this[R][t]=!1),G(this,t,M(1,n))};return o&&H&&G(D,t,{configurable:!0,set:e}),W(t)}).prototype,"toString",function(){return this._k}),k.f=$,A.f=K,n(50).f=S.f=Y,n(67).f=X,n(78).f=J,o&&!n(46)&&s(D,"propertyIsEnumerable",X,!0),p.f=function(t){return W(d(t))}),a(a.G+a.W+a.F*!q,{Symbol:O});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)d(Q[tt++]);for(var et=E(d.store),nt=0;et.length>nt;)m(et[nt++]);a(a.S+a.F*!q,"Symbol",{for:function(t){return i(L,t+="")?L[t]:L[t]=O(t)},keyFor:function(t){if(!V(t))throw TypeError(t+" is not a symbol!");for(var e in L)if(L[e]===t)return e},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!q,"Object",{create:function(t,e){return void 0===e?x(t):Z(x(t),e)},defineProperty:K,defineProperties:Z,getOwnPropertyDescriptor:$,getOwnPropertyNames:Y,getOwnPropertySymbols:J}),N&&a(a.S+a.F*(!q||c(function(){var t=O();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!V(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!V(e))return e}),r[1]=e,I.apply(N,r)}}),O.prototype[j]||n(22)(O.prototype,j,O.prototype.valueOf),h(O,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},function(t,e,n){var r=n(47),i=n(78),o=n(67);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(49)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(12),"Object",{defineProperty:n(11).f})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(12),"Object",{defineProperties:n(146)})},function(t,e,n){var r=n(23),i=n(29).f;n(30)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){var r=n(24),i=n(51);n(30)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(24),i=n(47);n(30)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(30)("getOwnPropertyNames",function(){return n(147).f})},function(t,e,n){var r=n(6),i=n(42).onFreeze;n(30)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(6),i=n(42).onFreeze;n(30)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(6),i=n(42).onFreeze;n(30)("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(6);n(30)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(6);n(30)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(6);n(30)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(148)})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(257)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(107).set})},function(t,e,n){"use strict";var r=n(79),i={};i[n(8)("toStringTag")]="z",i+""!="[object z]"&&n(19)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(0);r(r.P,"Function",{bind:n(149)})},function(t,e,n){var r=n(11).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(12)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(6),i=n(51),o=n(8)("hasInstance"),a=Function.prototype;o in a||n(11).f(a,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(0),i=n(151);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(0),i=n(152);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var r=n(5),i=n(21),o=n(36),a=n(109),s=n(41),u=n(4),c=n(50).f,f=n(29).f,h=n(11).f,l=n(80).trim,d=r.Number,p=d,m=d.prototype,v="Number"==o(n(49)(m)),g="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=g?e.trim():l(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,u=e.slice(2),c=0,f=u.length;ci)return NaN;return parseInt(u,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(v?u(function(){m.valueOf.call(n)}):"Number"!=o(n))?a(new p(y(e)),n,d):y(e)};for(var b,_=n(12)?c(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;_.length>w;w++)i(p,b=_[w])&&!i(d,b)&&h(d,b,f(p,b));d.prototype=m,m.constructor=d,n(19)(r,"Number",d)}},function(t,e,n){"use strict";var r=n(0),i=n(38),o=n(153),a=n(110),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",h=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},l=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(4)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,u=o(this,f),c=i(t),m="",v="0";if(c<0||c>20)throw RangeError(f);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(m="-",u=-u),u>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(u*p(2,69,1))-69)<0?u*p(2,-e,1):u/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(h(0,n),r=c;r>=7;)h(1e7,0),r-=7;for(h(p(10,r,1),0),r=e-1;r>=23;)l(1<<23),r-=23;l(1<0?m+((s=v.length)<=c?"0."+a.call("0",c-s)+v:v.slice(0,s-c)+"."+v.slice(s-c)):m+v}})},function(t,e,n){"use strict";var r=n(0),i=n(4),o=n(153),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(0),i=n(5).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{isInteger:n(154)})},function(t,e,n){var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),i=n(154),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),i=n(152);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(0),i=n(151);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(0),i=n(155),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,n){var r=n(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),i=n(111);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(0),i=n(112);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var r=n(0);r(r.S,"Math",{fround:n(285)})},function(t,e,n){var r=n(111),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),u=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),c=r(t);return is||n!=n?c*(1/0):c*n}},function(t,e,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,s=arguments.length,u=0;a0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(t,e,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(4)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log1p:n(155)})},function(t,e,n){var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(0);r(r.S,"Math",{sign:n(111)})},function(t,e,n){var r=n(0),i=n(112),o=Math.exp;r(r.S+r.F*n(4)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(0),i=n(112),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(0),i=n(48),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(0),i=n(23),o=n(14);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(0),i=n(156)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(14),o=n(114),a="".endsWith;r(r.P+r.F*n(116)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),s=void 0===n?r:Math.min(i(n),r),u=String(t);return a?a.call(e,u,s):e.slice(s-u.length,s)===u}})},function(t,e,n){"use strict";var r=n(0),i=n(114);r(r.P+r.F*n(116)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0);r(r.P,"String",{repeat:n(110)})},function(t,e,n){"use strict";var r=n(0),i=n(14),o=n(114),a="".startsWith;r(r.P+r.F*n(116)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(20)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(20)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(20)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(20)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(20)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(20)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(20)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(20)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(20)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(20)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(20)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(20)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(20)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),i=n(24),o=n(41);r(r.P+r.F*n(4)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(0),i=n(320);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var r=n(4),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!r(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(19)(r,"toString",function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"})},function(t,e,n){var r=n(8)("toPrimitive"),i=Date.prototype;r in i||n(22)(i,r,n(323))},function(t,e,n){"use strict";var r=n(7),i=n(41);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,e,n){var r=n(0);r(r.S,"Array",{isArray:n(105)})},function(t,e,n){"use strict";var r=n(34),i=n(0),o=n(24),a=n(158),s=n(117),u=n(14),c=n(118),f=n(119);i(i.S+i.F*!n(81)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,h,l=o(t),d="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,v=void 0!==m,g=0,y=f(l);if(v&&(m=r(m,p>2?arguments[2]:void 0,2)),void 0==y||d==Array&&s(y))for(n=new d(e=u(l.length));e>g;g++)c(n,g,v?m(l[g],g):l[g]);else for(h=y.call(l),n=new d;!(i=h.next()).done;g++)c(n,g,v?a(h,m,[i.value,g],!0):i.value);return n.length=g,n}})},function(t,e,n){"use strict";var r=n(0),i=n(118);r(r.S+r.F*n(4)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),i=n(23),o=[].join;r(r.P+r.F*(n(66)!=Object||!n(28)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),i=n(106),o=n(36),a=n(48),s=n(14),u=[].slice;r(r.P+r.F*n(4)(function(){i&&u.call(i)}),"Array",{slice:function(t,e){var n=s(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var i=a(t,n),c=a(e,n),f=s(c-i),h=new Array(f),l=0;l1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(0);r(r.P,"Array",{copyWithin:n(160)}),n(59)("copyWithin")},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(120)}),n(59)("fill")},function(t,e,n){"use strict";var r=n(0),i=n(31)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(59)("find")},function(t,e,n){"use strict";var r=n(0),i=n(31)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(59)(o)},function(t,e,n){n(60)("Array")},function(t,e,n){var r=n(5),i=n(109),o=n(11).f,a=n(50).f,s=n(115),u=n(122),c=r.RegExp,f=c,h=c.prototype,l=/a/g,d=/a/g,p=new c(l)!==l;if(n(12)&&(!p||n(4)(function(){return d[n(8)("match")]=!1,c(l)!=l||c(d)==d||"/a/i"!=c(l,"i")}))){c=function(t,e){var n=this instanceof c,r=s(t),o=void 0===e;return!n&&r&&t.constructor===c&&o?t:i(p?new f(r&&!o?t.source:t,e):f((r=t instanceof c)?t.source:t,r&&o?u.call(t):e),n?this:h,c)};for(var m=function(t){t in c||o(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},v=a(f),g=0;v.length>g;)m(v[g++]);h.constructor=c,c.prototype=h,n(19)(r,"RegExp",c)}n(60)("RegExp")},function(t,e,n){"use strict";n(162);var r=n(7),i=n(122),o=n(12),a=/./.toString,s=function(t){n(19)(RegExp.prototype,"toString",t,!0)};n(4)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(t,e,n){n(82)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(82)("replace",2,function(t,e,n){return[function(r,i){"use strict";var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,n){n(82)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(82)("split",2,function(t,e,r){"use strict";var i=n(115),o=r,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var s=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(n,t,e);var r,u,c,f,h,l=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,m=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,d+"g");for(s||(r=new RegExp("^"+v.source+"$(?!\\s)",d));(u=v.exec(n))&&!((c=u.index+u[0].length)>p&&(l.push(n.slice(p,u.index)),!s&&u.length>1&&u[0].replace(r,function(){for(h=1;h1&&u.index=m));)v.lastIndex===u.index&&v.lastIndex++;return p===n.length?!f&&v.test("")||l.push(""):l.push(n.slice(p)),l.length>m?l.slice(0,m):l}}else"0".split(void 0,0).length&&(r=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(n,i){var o=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},function(t,e,n){var r=n(5),i=n(123).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(36)(a);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(c)}}else n=function(){i.call(r,c)};else{var h=!0,l=document.createTextNode("");new o(c).observe(l,{characterData:!0}),n=function(){l.data=h=!h}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){"use strict";var r=n(166),i=n(63);t.exports=n(86)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(166),i=n(63);t.exports=n(86)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(31)(0),o=n(19),a=n(42),s=n(148),u=n(167),c=n(6),f=n(4),h=n(63),l=a.getWeak,d=Object.isExtensible,p=u.ufstore,m={},v=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(t){if(c(t)){var e=l(t);return!0===e?p(h(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(h(this,"WeakMap"),t,e)}},y=t.exports=n(86)("WeakMap",v,g,u,!0,!0);f(function(){return 7!=(new y).set((Object.freeze||Object)(m),7).get(m)})&&(s((r=u.getConstructor(v,"WeakMap")).prototype,g),a.NEED=!0,i(["delete","has","get","set"],function(t){var e=y.prototype,n=e[t];o(e,t,function(e,i){if(c(e)&&!d(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)})}))},function(t,e,n){"use strict";var r=n(167),i=n(63);n(86)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),i=n(87),o=n(124),a=n(7),s=n(48),u=n(14),c=n(6),f=n(5).ArrayBuffer,h=n(84),l=o.ArrayBuffer,d=o.DataView,p=i.ABV&&f.isView,m=l.prototype.slice,v=i.VIEW;r(r.G+r.W+r.F*(f!==l),{ArrayBuffer:l}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||c(t)&&v in t}}),r(r.P+r.U+r.F*n(4)(function(){return!new l(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==m&&void 0===e)return m.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),o=new(h(this,l))(u(i-r)),c=new d(this),f=new d(o),p=0;r=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var r=n(29),i=n(51),o=n(21),a=n(0),s=n(6),u=n(7);a(a.S,"Reflect",{get:function t(e,n){var a,c,f=arguments.length<3?e:arguments[2];return u(e)===f?e[n]:(a=r.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:s(c=i(e))?t(c,n,f):void 0}})},function(t,e,n){var r=n(29),i=n(0),o=n(7);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(0),i=n(51),o=n(7);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),i=n(7),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(169)})},function(t,e,n){var r=n(0),i=n(7),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(11),i=n(29),o=n(51),a=n(21),s=n(0),u=n(44),c=n(7),f=n(6);s(s.S,"Reflect",{set:function t(e,n,s){var h,l,d=arguments.length<4?e:arguments[3],p=i.f(c(e),n);if(!p){if(f(l=o(e)))return t(l,n,s,d);p=u(0)}if(a(p,"value")){if(!1===p.writable||!f(d))return!1;if(h=i.f(d,n)){if(h.get||h.set||!1===h.writable)return!1;h.value=s,r.f(d,n,h)}else r.f(d,n,u(0,s));return!0}return void 0!==p.set&&(p.set.call(d,s),!0)}})},function(t,e,n){var r=n(0),i=n(107);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(384),t.exports=n(13).Array.includes},function(t,e,n){"use strict";var r=n(0),i=n(77)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(59)("includes")},function(t,e,n){n(386),t.exports=n(13).String.padStart},function(t,e,n){"use strict";var r=n(0),i=n(170),o=n(85);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(388),t.exports=n(13).String.padEnd},function(t,e,n){"use strict";var r=n(0),i=n(170),o=n(85);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(390),t.exports=n(102).f("asyncIterator")},function(t,e,n){n(144)("asyncIterator")},function(t,e,n){n(392),t.exports=n(13).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(0),i=n(169),o=n(23),a=n(29),s=n(118);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),u=a.f,c=i(r),f={},h=0;c.length>h;)void 0!==(n=u(r,e=c[h++]))&&s(f,e,n);return f}})},function(t,e,n){n(394),t.exports=n(13).Object.values},function(t,e,n){var r=n(0),i=n(171)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){n(396),t.exports=n(13).Object.entries},function(t,e,n){var r=n(0),i=n(171)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";n(163),n(398),t.exports=n(13).Promise.finally},function(t,e,n){"use strict";var r=n(0),i=n(13),o=n(5),a=n(84),s=n(165);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){n(400),n(401),n(402),t.exports=n(13)},function(t,e,n){var r=n(5),i=n(0),o=n(85),a=[].slice,s=/MSIE .\./.test(o),u=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(t,e,n){var r=n(0),i=n(123);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(121),i=n(47),o=n(19),a=n(5),s=n(22),u=n(58),c=n(8),f=c("iterator"),h=c("toStringTag"),l=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(d),m=0;m=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),m}}}function _(t,e,n,r){var i=e&&e.prototype instanceof M?e:M,o=Object.create(i.prototype),a=new P(r||[]);return o._invoke=function(t,e,n){var r=h;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return N()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=w(t,e,n);if("normal"===u.type){if(r=n.done?p:l,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function w(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function M(){}function x(){}function S(){}function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function A(t){var e;this._invoke=function(n,r){function o(){return new Promise(function(e,o){!function e(n,r,o,a){var s=w(t[n],t,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(c).then(function(t){u.value=t,o(u)},a)}a(s.arg)}(n,r,e,o)})}return e=e?e.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,E(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=w(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r @@ -18,11 +18,11 @@ object-assign * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",h=500,f="__lodash_placeholder__",l=1,d=2,p=4,m=1,v=2,g=1,b=2,y=4,_=8,w=16,M=32,x=64,k=128,S=256,A=512,E=30,T="...",C=800,P=16,N=1,O=2,I=1/0,R=9007199254740991,j=1.7976931348623157e308,B=NaN,L=4294967295,U=L-1,q=L>>>1,z=[["ary",k],["bind",g],["bindKey",b],["curry",_],["curryRight",w],["flip",A],["partial",M],["partialRight",x],["rearg",S]],D="[object Arguments]",F="[object Array]",H="[object AsyncFunction]",G="[object Boolean]",K="[object Date]",W="[object DOMException]",V="[object Error]",Z="[object Function]",X="[object GeneratorFunction]",$="[object Map]",Y="[object Number]",J="[object Null]",Q="[object Object]",tt="[object Proxy]",et="[object RegExp]",rt="[object Set]",nt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ut="[object ArrayBuffer]",ct="[object DataView]",ht="[object Float32Array]",ft="[object Float64Array]",lt="[object Int8Array]",dt="[object Int16Array]",pt="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",bt="[object Uint32Array]",yt=/\b__p \+= '';/g,_t=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,kt=RegExp(Mt.source),St=RegExp(xt.source),At=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,Tt=/<%=([\s\S]+?)%>/g,Ct=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pt=/^\w*$/,Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ot=/[\\^$.*+?()[\]{}|]/g,It=RegExp(Ot.source),Rt=/^\s+|\s+$/g,jt=/^\s+/,Bt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ut=/\{\n\/\* \[wrapped with (.+)\] \*/,qt=/,? & /,zt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ht=/\w*$/,Gt=/^[-+]0x[0-9a-f]+$/i,Kt=/^0b[01]+$/i,Wt=/^\[object .+?Constructor\]$/,Vt=/^0o[0-7]+$/i,Zt=/^(?:0|[1-9]\d*)$/,Xt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$t=/($^)/,Yt=/['\n\r\u2028\u2029\\]/g,Jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Qt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Qt+"]",re="["+Jt+"]",ne="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+Qt+ne+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ue="[^\\ud800-\\udfff]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",he="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",le="(?:"+oe+"|"+ae+")",de="(?:"+fe+"|"+ae+")",pe="(?:"+re+"|"+se+")"+"?",me="[\\ufe0e\\ufe0f]?"+pe+("(?:\\u200d(?:"+[ue,ce,he].join("|")+")[\\ufe0e\\ufe0f]?"+pe+")*"),ve="(?:"+[ie,ce,he].join("|")+")"+me,ge="(?:"+[ue+re+"?",re,ce,he,te].join("|")+")",be=RegExp("['’]","g"),ye=RegExp(re,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),we=RegExp([fe+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,fe,"$"].join("|")+")",de+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,fe+le,"$"].join("|")+")",fe+"?"+le+"+(?:['’](?:d|ll|m|re|s|t|ve))?",fe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ne,ve].join("|"),"g"),Me=RegExp("[\\u200d\\ud800-\\udfff"+Jt+"\\ufe0e\\ufe0f]"),xe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ke=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Se=-1,Ae={};Ae[ht]=Ae[ft]=Ae[lt]=Ae[dt]=Ae[pt]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[bt]=!0,Ae[D]=Ae[F]=Ae[ut]=Ae[G]=Ae[ct]=Ae[K]=Ae[V]=Ae[Z]=Ae[$]=Ae[Y]=Ae[Q]=Ae[et]=Ae[rt]=Ae[nt]=Ae[at]=!1;var Ee={};Ee[D]=Ee[F]=Ee[ut]=Ee[ct]=Ee[G]=Ee[K]=Ee[ht]=Ee[ft]=Ee[lt]=Ee[dt]=Ee[pt]=Ee[$]=Ee[Y]=Ee[Q]=Ee[et]=Ee[rt]=Ee[nt]=Ee[it]=Ee[mt]=Ee[vt]=Ee[gt]=Ee[bt]=!0,Ee[V]=Ee[Z]=Ee[at]=!1;var Te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ce=parseFloat,Pe=parseInt,Ne="object"==typeof t&&t&&t.Object===Object&&t,Oe="object"==typeof self&&self&&self.Object===Object&&self,Ie=Ne||Oe||Function("return this")(),Re="object"==typeof e&&e&&!e.nodeType&&e,je=Re&&"object"==typeof n&&n&&!n.nodeType&&n,Be=je&&je.exports===Re,Le=Be&&Ne.process,Ue=function(){try{var t=je&&je.require&&je.require("util").types;return t||Le&&Le.binding&&Le.binding("util")}catch(t){}}(),qe=Ue&&Ue.isArrayBuffer,ze=Ue&&Ue.isDate,De=Ue&&Ue.isMap,Fe=Ue&&Ue.isRegExp,He=Ue&&Ue.isSet,Ge=Ue&&Ue.isTypedArray;function Ke(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function We(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i-1}function Je(t,e,r){for(var n=-1,i=null==t?0:t.length;++n-1;);return r}function _r(t,e){for(var r=t.length;r--&&sr(e,t[r],0)>-1;);return r}var wr=lr({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Mr=lr({"&":"&","<":"<",">":">",'"':""","'":"'"});function xr(t){return"\\"+Te[t]}function kr(t){return Me.test(t)}function Sr(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function Ar(t,e){return function(r){return t(e(r))}}function Er(t,e){for(var r=-1,n=t.length,i=0,o=[];++r",""":'"',"'":"'"});var Rr=function t(e){var r=(e=null==e?Ie:Rr.defaults(Ie.Object(),e,Rr.pick(Ie,ke))).Array,n=e.Date,i=e.Error,Jt=e.Function,Qt=e.Math,te=e.Object,ee=e.RegExp,re=e.String,ne=e.TypeError,ie=r.prototype,oe=Jt.prototype,ae=te.prototype,se=e["__core-js_shared__"],ue=oe.toString,ce=ae.hasOwnProperty,he=0,fe=function(){var t=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),le=ae.toString,de=ue.call(te),pe=Ie._,me=ee("^"+ue.call(ce).replace(Ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ve=Be?e.Buffer:o,ge=e.Symbol,_e=e.Uint8Array,Me=ve?ve.allocUnsafe:o,Te=Ar(te.getPrototypeOf,te),Ne=te.create,Oe=ae.propertyIsEnumerable,Re=ie.splice,je=ge?ge.isConcatSpreadable:o,Le=ge?ge.iterator:o,Ue=ge?ge.toStringTag:o,ir=function(){try{var t=qo(te,"defineProperty");return t({},"",{}),t}catch(t){}}(),lr=e.clearTimeout!==Ie.clearTimeout&&e.clearTimeout,jr=n&&n.now!==Ie.Date.now&&n.now,Br=e.setTimeout!==Ie.setTimeout&&e.setTimeout,Lr=Qt.ceil,Ur=Qt.floor,qr=te.getOwnPropertySymbols,zr=ve?ve.isBuffer:o,Dr=e.isFinite,Fr=ie.join,Hr=Ar(te.keys,te),Gr=Qt.max,Kr=Qt.min,Wr=n.now,Vr=e.parseInt,Zr=Qt.random,Xr=ie.reverse,$r=qo(e,"DataView"),Yr=qo(e,"Map"),Jr=qo(e,"Promise"),Qr=qo(e,"Set"),tn=qo(e,"WeakMap"),en=qo(te,"create"),rn=tn&&new tn,nn={},on=ha($r),an=ha(Yr),sn=ha(Jr),un=ha(Qr),cn=ha(tn),hn=ge?ge.prototype:o,fn=hn?hn.valueOf:o,ln=hn?hn.toString:o;function dn(t){if(Es(t)&&!vs(t)&&!(t instanceof gn)){if(t instanceof vn)return t;if(ce.call(t,"__wrapped__"))return fa(t)}return new vn(t)}var pn=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var r=new t;return t.prototype=o,r}}();function mn(){}function vn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=L,this.__views__=[]}function bn(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function jn(t,e,r,n,i,a){var s,u=e&l,c=e&d,h=e&p;if(r&&(s=i?r(t,n,i,a):r(t)),s!==o)return s;if(!As(t))return t;var f=vs(t);if(f){if(s=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&ce.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!u)return ro(t,s)}else{var m=Fo(t),v=m==Z||m==X;if(_s(t))return $i(t,u);if(m==Q||m==D||v&&!i){if(s=c||v?{}:Go(t),!u)return c?function(t,e){return no(t,Do(t),e)}(t,function(t,e){return t&&no(e,iu(e),t)}(s,t)):function(t,e){return no(t,zo(t),e)}(t,Nn(s,t))}else{if(!Ee[m])return i?t:{};s=function(t,e,r){var n=t.constructor;switch(e){case ut:return Yi(t);case G:case K:return new n(+t);case ct:return function(t,e){var r=e?Yi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case ht:case ft:case lt:case dt:case pt:case mt:case vt:case gt:case bt:return Ji(t,r);case $:return new n;case Y:case nt:return new n(t);case et:return function(t){var e=new t.constructor(t.source,Ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case rt:return new n;case it:return function(t){return fn?te(fn.call(t)):{}}(t)}}(t,m,u)}}a||(a=new Mn);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(n){s.add(jn(n,e,r,n,t,a))}),s;if(Ts(t))return t.forEach(function(n,i){s.set(i,jn(n,e,r,i,t,a))}),s;var b=f?o:(h?c?Oo:No:c?iu:nu)(t);return Ve(b||t,function(n,i){b&&(n=t[i=n]),Tn(s,i,jn(n,e,r,i,t,a))}),s}function Bn(t,e,r){var n=r.length;if(null==t)return!n;for(t=te(t);n--;){var i=r[n],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Ln(t,e,r){if("function"!=typeof t)throw new ne(u);return na(function(){t.apply(o,r)},e)}function Un(t,e,r,n){var i=-1,o=Ye,s=!0,u=t.length,c=[],h=e.length;if(!u)return c;r&&(e=Qe(e,vr(r))),n?(o=Je,s=!1):e.length>=a&&(o=br,s=!1,e=new wn(e));t:for(;++i-1},yn.prototype.set=function(t,e){var r=this.__data__,n=Cn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},_n.prototype.clear=function(){this.size=0,this.__data__={hash:new bn,map:new(Yr||yn),string:new bn}},_n.prototype.delete=function(t){var e=Lo(this,t).delete(t);return this.size-=e?1:0,e},_n.prototype.get=function(t){return Lo(this,t).get(t)},_n.prototype.has=function(t){return Lo(this,t).has(t)},_n.prototype.set=function(t,e){var r=Lo(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},wn.prototype.add=wn.prototype.push=function(t){return this.__data__.set(t,c),this},wn.prototype.has=function(t){return this.__data__.has(t)},Mn.prototype.clear=function(){this.__data__=new yn,this.size=0},Mn.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Mn.prototype.get=function(t){return this.__data__.get(t)},Mn.prototype.has=function(t){return this.__data__.has(t)},Mn.prototype.set=function(t,e){var r=this.__data__;if(r instanceof yn){var n=r.__data__;if(!Yr||n.length0&&r(s)?e>1?Gn(s,e-1,r,n,i):tr(i,s):n||(i[i.length]=s)}return i}var Kn=so(),Wn=so(!0);function Vn(t,e){return t&&Kn(t,e,nu)}function Zn(t,e){return t&&Wn(t,e,nu)}function Xn(t,e){return $e(e,function(e){return xs(t[e])})}function $n(t,e){for(var r=0,n=(e=Wi(e,t)).length;null!=t&&re}function ti(t,e){return null!=t&&ce.call(t,e)}function ei(t,e){return null!=t&&e in te(t)}function ri(t,e,n){for(var i=n?Je:Ye,a=t[0].length,s=t.length,u=s,c=r(s),h=1/0,f=[];u--;){var l=t[u];u&&e&&(l=Qe(l,vr(e))),h=Kr(l.length,h),c[u]=!n&&(e||a>=120&&l.length>=120)?new wn(u&&l):o}l=t[0];var d=-1,p=c[0];t:for(;++d=s)return u;var c=r[n];return u*("desc"==c?-1:1)}}return t.index-e.index}(t,e,r)})}function bi(t,e,r){for(var n=-1,i=e.length,o={};++n-1;)s!==t&&Re.call(s,u,1),Re.call(t,u,1);return t}function _i(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;Wo(i)?Re.call(t,i,1):Ui(t,i)}}return t}function wi(t,e){return t+Ur(Zr()*(e-t+1))}function Mi(t,e){var r="";if(!t||e<1||e>R)return r;do{e%2&&(r+=t),(e=Ur(e/2))&&(t+=t)}while(e);return r}function xi(t,e){return ia(ta(t,e,Cu),t+"")}function ki(t){return kn(lu(t))}function Si(t,e){var r=lu(t);return sa(r,Rn(e,0,r.length))}function Ai(t,e,r,n){if(!As(t))return t;for(var i=-1,a=(e=Wi(e,t)).length,s=a-1,u=t;null!=u&&++io?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i>>1,a=t[o];null!==a&&!Rs(a)&&(r?a<=e:a=a){var h=e?null:xo(t);if(h)return Cr(h);s=!1,i=br,c=new wn}else c=e?[]:u;t:for(;++n=n?t:Pi(t,e,r)}var Xi=lr||function(t){return Ie.clearTimeout(t)};function $i(t,e){if(e)return t.slice();var r=t.length,n=Me?Me(r):new t.constructor(r);return t.copy(n),n}function Yi(t){var e=new t.constructor(t.byteLength);return new _e(e).set(new _e(t)),e}function Ji(t,e){var r=e?Yi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Qi(t,e){if(t!==e){var r=t!==o,n=null===t,i=t==t,a=Rs(t),s=e!==o,u=null===e,c=e==e,h=Rs(e);if(!u&&!h&&!a&&t>e||a&&s&&c&&!u&&!h||n&&s&&c||!r&&c||!i)return 1;if(!n&&!a&&!h&&t1?r[i-1]:o,s=i>2?r[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Vo(r[0],r[1],s)&&(a=i<3?o:a,i=1),e=te(e);++n-1?i[a?e[s]:s]:o}}function lo(t){return Po(function(e){var r=e.length,n=r,i=vn.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new ne(u);if(i&&!s&&"wrapper"==Ro(a))var s=new vn([],!0)}for(n=s?n:r;++n1&&_.reverse(),l&&hu))return!1;var h=a.get(t);if(h&&a.get(e))return h==e;var f=-1,l=!0,d=r&v?new wn:o;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(Lt,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Ve(z,function(r){var n="_."+r[0];e&r[1]&&!Ye(t,n)&&t.push(n)}),t.sort()}(function(t){var e=t.match(Ut);return e?e[1].split(qt):[]}(n),r)))}function aa(t){var e=0,r=0;return function(){var n=Wr(),i=P-(n-r);if(r=n,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function sa(t,e){var r=-1,n=t.length,i=n-1;for(e=e===o?n:e;++r1?t[e-1]:o;return Na(t,r="function"==typeof r?(t.pop(),r):o)});function Ua(t){var e=dn(t);return e.__chain__=!0,e}function qa(t,e){return e(t)}var za=Po(function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,i=function(e){return In(e,t)};return!(e>1||this.__actions__.length)&&n instanceof gn&&Wo(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:qa,args:[i],thisArg:o}),new vn(n,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Da=io(function(t,e,r){ce.call(t,r)?++t[r]:On(t,r,1)});var Fa=fo(ma),Ha=fo(va);function Ga(t,e){return(vs(t)?Ve:qn)(t,Bo(e,3))}function Ka(t,e){return(vs(t)?Ze:zn)(t,Bo(e,3))}var Wa=io(function(t,e,r){ce.call(t,r)?t[r].push(e):On(t,r,[e])});var Va=xi(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return qn(t,function(t){a[++i]=o?Ke(e,t,n):ni(t,e,n)}),a}),Za=io(function(t,e,r){On(t,r,e)});function Xa(t,e){return(vs(t)?Qe:li)(t,Bo(e,3))}var $a=io(function(t,e,r){t[r?0:1].push(e)},function(){return[[],[]]});var Ya=xi(function(t,e){if(null==t)return[];var r=e.length;return r>1&&Vo(t,e[0],e[1])?e=[]:r>2&&Vo(e[0],e[1],e[2])&&(e=[e[0]]),gi(t,Gn(e,1),[])}),Ja=jr||function(){return Ie.Date.now()};function Qa(t,e,r){return e=r?o:e,e=t&&null==e?t.length:e,So(t,k,o,o,o,o,e)}function ts(t,e){var r;if("function"!=typeof e)throw new ne(u);return t=zs(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=o),r}}var es=xi(function(t,e,r){var n=g;if(r.length){var i=Er(r,jo(es));n|=M}return So(t,n,e,r,i)}),rs=xi(function(t,e,r){var n=g|b;if(r.length){var i=Er(r,jo(rs));n|=M}return So(e,n,t,r,i)});function ns(t,e,r){var n,i,a,s,c,h,f=0,l=!1,d=!1,p=!0;if("function"!=typeof t)throw new ne(u);function m(e){var r=n,a=i;return n=i=o,f=e,s=t.apply(a,r)}function v(t){var r=t-h;return h===o||r>=e||r<0||d&&t-f>=a}function g(){var t=Ja();if(v(t))return b(t);c=na(g,function(t){var r=e-(t-h);return d?Kr(r,a-(t-f)):r}(t))}function b(t){return c=o,p&&n?m(t):(n=i=o,s)}function y(){var t=Ja(),r=v(t);if(n=arguments,i=this,h=t,r){if(c===o)return function(t){return f=t,c=na(g,e),l?m(t):s}(h);if(d)return c=na(g,e),m(h)}return c===o&&(c=na(g,e)),s}return e=Fs(e)||0,As(r)&&(l=!!r.leading,a=(d="maxWait"in r)?Gr(Fs(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p),y.cancel=function(){c!==o&&Xi(c),f=0,n=h=i=c=o},y.flush=function(){return c===o?s:b(Ja())},y}var is=xi(function(t,e){return Ln(t,1,e)}),os=xi(function(t,e,r){return Ln(t,Fs(e)||0,r)});function as(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ne(u);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(as.Cache||_n),r}function ss(t){if("function"!=typeof t)throw new ne(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}as.Cache=_n;var us=Vi(function(t,e){var r=(e=1==e.length&&vs(e[0])?Qe(e[0],vr(Bo())):Qe(Gn(e,1),vr(Bo()))).length;return xi(function(n){for(var i=-1,o=Kr(n.length,r);++i=e}),ms=ii(function(){return arguments}())?ii:function(t){return Es(t)&&ce.call(t,"callee")&&!Oe.call(t,"callee")},vs=r.isArray,gs=qe?vr(qe):function(t){return Es(t)&&Jn(t)==ut};function bs(t){return null!=t&&Ss(t.length)&&!xs(t)}function ys(t){return Es(t)&&bs(t)}var _s=zr||Fu,ws=ze?vr(ze):function(t){return Es(t)&&Jn(t)==K};function Ms(t){if(!Es(t))return!1;var e=Jn(t);return e==V||e==W||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function xs(t){if(!As(t))return!1;var e=Jn(t);return e==Z||e==X||e==H||e==tt}function ks(t){return"number"==typeof t&&t==zs(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=R}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Es(t){return null!=t&&"object"==typeof t}var Ts=De?vr(De):function(t){return Es(t)&&Fo(t)==$};function Cs(t){return"number"==typeof t||Es(t)&&Jn(t)==Y}function Ps(t){if(!Es(t)||Jn(t)!=Q)return!1;var e=Te(t);if(null===e)return!0;var r=ce.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&ue.call(r)==de}var Ns=Fe?vr(Fe):function(t){return Es(t)&&Jn(t)==et};var Os=He?vr(He):function(t){return Es(t)&&Fo(t)==rt};function Is(t){return"string"==typeof t||!vs(t)&&Es(t)&&Jn(t)==nt}function Rs(t){return"symbol"==typeof t||Es(t)&&Jn(t)==it}var js=Ge?vr(Ge):function(t){return Es(t)&&Ss(t.length)&&!!Ae[Jn(t)]};var Bs=_o(fi),Ls=_o(function(t,e){return t<=e});function Us(t){if(!t)return[];if(bs(t))return Is(t)?Or(t):ro(t);if(Le&&t[Le])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Le]());var e=Fo(t);return(e==$?Sr:e==rt?Cr:lu)(t)}function qs(t){return t?(t=Fs(t))===I||t===-I?(t<0?-1:1)*j:t==t?t:0:0===t?t:0}function zs(t){var e=qs(t),r=e%1;return e==e?r?e-r:e:0}function Ds(t){return t?Rn(zs(t),0,L):0}function Fs(t){if("number"==typeof t)return t;if(Rs(t))return B;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Rt,"");var r=Kt.test(t);return r||Vt.test(t)?Pe(t.slice(2),r?2:8):Gt.test(t)?B:+t}function Hs(t){return no(t,iu(t))}function Gs(t){return null==t?"":Bi(t)}var Ks=oo(function(t,e){if(Yo(e)||bs(e))no(e,nu(e),t);else for(var r in e)ce.call(e,r)&&Tn(t,r,e[r])}),Ws=oo(function(t,e){no(e,iu(e),t)}),Vs=oo(function(t,e,r,n){no(e,iu(e),t,n)}),Zs=oo(function(t,e,r,n){no(e,nu(e),t,n)}),Xs=Po(In);var $s=xi(function(t,e){t=te(t);var r=-1,n=e.length,i=n>2?e[2]:o;for(i&&Vo(e[0],e[1],i)&&(n=1);++r1),e}),no(t,Oo(t),r),n&&(r=jn(r,l|d|p,To));for(var i=e.length;i--;)Ui(r,e[i]);return r});var uu=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,r){return Qs(t,r)})}(t,e)});function cu(t,e){if(null==t)return{};var r=Qe(Oo(t),function(t){return[t]});return e=Bo(e),bi(t,r,function(t,r){return e(t,r[0])})}var hu=ko(nu),fu=ko(iu);function lu(t){return null==t?[]:gr(t,nu(t))}var du=co(function(t,e,r){return e=e.toLowerCase(),t+(r?pu(e):e)});function pu(t){return Mu(Gs(t).toLowerCase())}function mu(t){return(t=Gs(t))&&t.replace(Xt,wr).replace(ye,"")}var vu=co(function(t,e,r){return t+(r?"-":"")+e.toLowerCase()}),gu=co(function(t,e,r){return t+(r?" ":"")+e.toLowerCase()}),bu=uo("toLowerCase");var yu=co(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()});var _u=co(function(t,e,r){return t+(r?" ":"")+Mu(e)});var wu=co(function(t,e,r){return t+(r?" ":"")+e.toUpperCase()}),Mu=uo("toUpperCase");function xu(t,e,r){return t=Gs(t),(e=r?o:e)===o?function(t){return xe.test(t)}(t)?function(t){return t.match(we)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var ku=xi(function(t,e){try{return Ke(t,o,e)}catch(t){return Ms(t)?t:new i(t)}}),Su=Po(function(t,e){return Ve(e,function(e){e=ca(e),On(t,e,es(t[e],t))}),t});function Au(t){return function(){return t}}var Eu=lo(),Tu=lo(!0);function Cu(t){return t}function Pu(t){return ui("function"==typeof t?t:jn(t,l))}var Nu=xi(function(t,e){return function(r){return ni(r,t,e)}}),Ou=xi(function(t,e){return function(r){return ni(t,r,e)}});function Iu(t,e,r){var n=nu(e),i=Xn(e,n);null!=r||As(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=Xn(e,nu(e)));var o=!(As(r)&&"chain"in r&&!r.chain),a=xs(t);return Ve(i,function(r){var n=e[r];t[r]=n,a&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__);return(r.__actions__=ro(this.__actions__)).push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,tr([this.value()],arguments))})}),t}function Ru(){}var ju=go(Qe),Bu=go(Xe),Lu=go(nr);function Uu(t){return Zo(t)?fr(ca(t)):function(t){return function(e){return $n(e,t)}}(t)}var qu=yo(),zu=yo(!0);function Du(){return[]}function Fu(){return!1}var Hu=vo(function(t,e){return t+e},0),Gu=Mo("ceil"),Ku=vo(function(t,e){return t/e},1),Wu=Mo("floor");var Vu=vo(function(t,e){return t*e},1),Zu=Mo("round"),Xu=vo(function(t,e){return t-e},0);return dn.after=function(t,e){if("function"!=typeof e)throw new ne(u);return t=zs(t),function(){if(--t<1)return e.apply(this,arguments)}},dn.ary=Qa,dn.assign=Ks,dn.assignIn=Ws,dn.assignInWith=Vs,dn.assignWith=Zs,dn.at=Xs,dn.before=ts,dn.bind=es,dn.bindAll=Su,dn.bindKey=rs,dn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return vs(t)?t:[t]},dn.chain=Ua,dn.chunk=function(t,e,n){e=(n?Vo(t,e,n):e===o)?1:Gr(zs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=r(Lr(i/e));ai?0:i+r),(n=n===o||n>i?i:zs(n))<0&&(n+=i),n=r>n?0:Ds(n);r>>0)?(t=Gs(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Bi(e))&&kr(t)?Zi(Or(t),0,r):t.split(e,r):[]},dn.spread=function(t,e){if("function"!=typeof t)throw new ne(u);return e=null==e?0:Gr(zs(e),0),xi(function(r){var n=r[e],i=Zi(r,0,e);return n&&tr(i,n),Ke(t,this,i)})},dn.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},dn.take=function(t,e,r){return t&&t.length?Pi(t,0,(e=r||e===o?1:zs(e))<0?0:e):[]},dn.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?Pi(t,(e=n-(e=r||e===o?1:zs(e)))<0?0:e,n):[]},dn.takeRightWhile=function(t,e){return t&&t.length?zi(t,Bo(e,3),!1,!0):[]},dn.takeWhile=function(t,e){return t&&t.length?zi(t,Bo(e,3)):[]},dn.tap=function(t,e){return e(t),t},dn.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new ne(u);return As(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ns(t,e,{leading:n,maxWait:e,trailing:i})},dn.thru=qa,dn.toArray=Us,dn.toPairs=hu,dn.toPairsIn=fu,dn.toPath=function(t){return vs(t)?Qe(t,ca):Rs(t)?[t]:ro(ua(Gs(t)))},dn.toPlainObject=Hs,dn.transform=function(t,e,r){var n=vs(t),i=n||_s(t)||js(t);if(e=Bo(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:As(t)&&xs(o)?pn(Te(t)):{}}return(i?Ve:Vn)(t,function(t,n,i){return e(r,t,n,i)}),r},dn.unary=function(t){return Qa(t,1)},dn.union=Ea,dn.unionBy=Ta,dn.unionWith=Ca,dn.uniq=function(t){return t&&t.length?Li(t):[]},dn.uniqBy=function(t,e){return t&&t.length?Li(t,Bo(e,2)):[]},dn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Li(t,o,e):[]},dn.unset=function(t,e){return null==t||Ui(t,e)},dn.unzip=Pa,dn.unzipWith=Na,dn.update=function(t,e,r){return null==t?t:qi(t,e,Ki(r))},dn.updateWith=function(t,e,r,n){return n="function"==typeof n?n:o,null==t?t:qi(t,e,Ki(r),n)},dn.values=lu,dn.valuesIn=function(t){return null==t?[]:gr(t,iu(t))},dn.without=Oa,dn.words=xu,dn.wrap=function(t,e){return cs(Ki(e),t)},dn.xor=Ia,dn.xorBy=Ra,dn.xorWith=ja,dn.zip=Ba,dn.zipObject=function(t,e){return Hi(t||[],e||[],Tn)},dn.zipObjectDeep=function(t,e){return Hi(t||[],e||[],Ai)},dn.zipWith=La,dn.entries=hu,dn.entriesIn=fu,dn.extend=Ws,dn.extendWith=Vs,Iu(dn,dn),dn.add=Hu,dn.attempt=ku,dn.camelCase=du,dn.capitalize=pu,dn.ceil=Gu,dn.clamp=function(t,e,r){return r===o&&(r=e,e=o),r!==o&&(r=(r=Fs(r))==r?r:0),e!==o&&(e=(e=Fs(e))==e?e:0),Rn(Fs(t),e,r)},dn.clone=function(t){return jn(t,p)},dn.cloneDeep=function(t){return jn(t,l|p)},dn.cloneDeepWith=function(t,e){return jn(t,l|p,e="function"==typeof e?e:o)},dn.cloneWith=function(t,e){return jn(t,p,e="function"==typeof e?e:o)},dn.conformsTo=function(t,e){return null==e||Bn(t,e,nu(e))},dn.deburr=mu,dn.defaultTo=function(t,e){return null==t||t!=t?e:t},dn.divide=Ku,dn.endsWith=function(t,e,r){t=Gs(t),e=Bi(e);var n=t.length,i=r=r===o?n:Rn(zs(r),0,n);return(r-=e.length)>=0&&t.slice(r,i)==e},dn.eq=ls,dn.escape=function(t){return(t=Gs(t))&&St.test(t)?t.replace(xt,Mr):t},dn.escapeRegExp=function(t){return(t=Gs(t))&&It.test(t)?t.replace(Ot,"\\$&"):t},dn.every=function(t,e,r){var n=vs(t)?Xe:Dn;return r&&Vo(t,e,r)&&(e=o),n(t,Bo(e,3))},dn.find=Fa,dn.findIndex=ma,dn.findKey=function(t,e){return or(t,Bo(e,3),Vn)},dn.findLast=Ha,dn.findLastIndex=va,dn.findLastKey=function(t,e){return or(t,Bo(e,3),Zn)},dn.floor=Wu,dn.forEach=Ga,dn.forEachRight=Ka,dn.forIn=function(t,e){return null==t?t:Kn(t,Bo(e,3),iu)},dn.forInRight=function(t,e){return null==t?t:Wn(t,Bo(e,3),iu)},dn.forOwn=function(t,e){return t&&Vn(t,Bo(e,3))},dn.forOwnRight=function(t,e){return t&&Zn(t,Bo(e,3))},dn.get=Js,dn.gt=ds,dn.gte=ps,dn.has=function(t,e){return null!=t&&Ho(t,e,ti)},dn.hasIn=Qs,dn.head=ba,dn.identity=Cu,dn.includes=function(t,e,r,n){t=bs(t)?t:lu(t),r=r&&!n?zs(r):0;var i=t.length;return r<0&&(r=Gr(i+r,0)),Is(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&sr(t,e,r)>-1},dn.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:zs(r);return i<0&&(i=Gr(n+i,0)),sr(t,e,i)},dn.inRange=function(t,e,r){return e=qs(e),r===o?(r=e,e=0):r=qs(r),function(t,e,r){return t>=Kr(e,r)&&t=-R&&t<=R},dn.isSet=Os,dn.isString=Is,dn.isSymbol=Rs,dn.isTypedArray=js,dn.isUndefined=function(t){return t===o},dn.isWeakMap=function(t){return Es(t)&&Fo(t)==at},dn.isWeakSet=function(t){return Es(t)&&Jn(t)==st},dn.join=function(t,e){return null==t?"":Fr.call(t,e)},dn.kebabCase=vu,dn.last=Ma,dn.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=zs(r))<0?Gr(n+i,0):Kr(i,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,i):ar(t,cr,i,!0)},dn.lowerCase=gu,dn.lowerFirst=bu,dn.lt=Bs,dn.lte=Ls,dn.max=function(t){return t&&t.length?Fn(t,Cu,Qn):o},dn.maxBy=function(t,e){return t&&t.length?Fn(t,Bo(e,2),Qn):o},dn.mean=function(t){return hr(t,Cu)},dn.meanBy=function(t,e){return hr(t,Bo(e,2))},dn.min=function(t){return t&&t.length?Fn(t,Cu,fi):o},dn.minBy=function(t,e){return t&&t.length?Fn(t,Bo(e,2),fi):o},dn.stubArray=Du,dn.stubFalse=Fu,dn.stubObject=function(){return{}},dn.stubString=function(){return""},dn.stubTrue=function(){return!0},dn.multiply=Vu,dn.nth=function(t,e){return t&&t.length?vi(t,zs(e)):o},dn.noConflict=function(){return Ie._===this&&(Ie._=pe),this},dn.noop=Ru,dn.now=Ja,dn.pad=function(t,e,r){t=Gs(t);var n=(e=zs(e))?Nr(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return bo(Ur(i),r)+t+bo(Lr(i),r)},dn.padEnd=function(t,e,r){t=Gs(t);var n=(e=zs(e))?Nr(t):0;return e&&ne){var n=t;t=e,e=n}if(r||t%1||e%1){var i=Zr();return Kr(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},dn.reduce=function(t,e,r){var n=vs(t)?er:dr,i=arguments.length<3;return n(t,Bo(e,4),r,i,qn)},dn.reduceRight=function(t,e,r){var n=vs(t)?rr:dr,i=arguments.length<3;return n(t,Bo(e,4),r,i,zn)},dn.repeat=function(t,e,r){return e=(r?Vo(t,e,r):e===o)?1:zs(e),Mi(Gs(t),e)},dn.replace=function(){var t=arguments,e=Gs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},dn.result=function(t,e,r){var n=-1,i=(e=Wi(e,t)).length;for(i||(i=1,t=o);++nR)return[];var r=L,n=Kr(t,L);e=Bo(e),t-=L;for(var i=mr(n,e);++r=a)return t;var u=r-Nr(n);if(u<1)return n;var c=s?Zi(s,0,u).join(""):t.slice(0,u);if(i===o)return c+n;if(s&&(u+=c.length-u),Ns(i)){if(t.slice(u).search(i)){var h,f=c;for(i.global||(i=ee(i.source,Gs(Ht.exec(i))+"g")),i.lastIndex=0;h=i.exec(f);)var l=h.index;c=c.slice(0,l===o?u:l)}}else if(t.indexOf(Bi(i),u)!=u){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+n},dn.unescape=function(t){return(t=Gs(t))&&kt.test(t)?t.replace(Mt,Ir):t},dn.uniqueId=function(t){var e=++he;return Gs(t)+e},dn.upperCase=wu,dn.upperFirst=Mu,dn.each=Ga,dn.eachRight=Ka,dn.first=ba,Iu(dn,function(){var t={};return Vn(dn,function(e,r){ce.call(dn.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),dn.VERSION="4.17.10",Ve(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){dn[t].placeholder=dn}),Ve(["drop","take"],function(t,e){gn.prototype[t]=function(r){r=r===o?1:Gr(zs(r),0);var n=this.__filtered__&&!e?new gn(this):this.clone();return n.__filtered__?n.__takeCount__=Kr(r,n.__takeCount__):n.__views__.push({size:Kr(r,L),type:t+(n.__dir__<0?"Right":"")}),n},gn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ve(["filter","map","takeWhile"],function(t,e){var r=e+1,n=r==N||3==r;gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Bo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}}),Ve(["head","last"],function(t,e){var r="take"+(e?"Right":"");gn.prototype[t]=function(){return this[r](1).value()[0]}}),Ve(["initial","tail"],function(t,e){var r="drop"+(e?"":"Right");gn.prototype[t]=function(){return this.__filtered__?new gn(this):this[r](1)}}),gn.prototype.compact=function(){return this.filter(Cu)},gn.prototype.find=function(t){return this.filter(t).head()},gn.prototype.findLast=function(t){return this.reverse().find(t)},gn.prototype.invokeMap=xi(function(t,e){return"function"==typeof t?new gn(this):this.map(function(r){return ni(r,t,e)})}),gn.prototype.reject=function(t){return this.filter(ss(Bo(t)))},gn.prototype.slice=function(t,e){t=zs(t);var r=this;return r.__filtered__&&(t>0||e<0)?new gn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==o&&(r=(e=zs(e))<0?r.dropRight(-e):r.take(e-t)),r)},gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},gn.prototype.toArray=function(){return this.take(L)},Vn(gn.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),i=dn[n?"take"+("last"==e?"Right":""):e],a=n||/^find/.test(e);i&&(dn.prototype[e]=function(){var e=this.__wrapped__,s=n?[1]:arguments,u=e instanceof gn,c=s[0],h=u||vs(e),f=function(t){var e=i.apply(dn,tr([t],s));return n&&l?e[0]:e};h&&r&&"function"==typeof c&&1!=c.length&&(u=h=!1);var l=this.__chain__,d=!!this.__actions__.length,p=a&&!l,m=u&&!d;if(!a&&h){e=m?e:new gn(this);var v=t.apply(e,s);return v.__actions__.push({func:qa,args:[f],thisArg:o}),new vn(v,l)}return p&&m?t.apply(this,s):(v=this.thru(f),p?n?v.value()[0]:v.value():v)})}),Ve(["pop","push","shift","sort","splice","unshift"],function(t){var e=ie[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);dn.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(vs(i)?i:[],t)}return this[r](function(r){return e.apply(vs(r)?r:[],t)})}}),Vn(gn.prototype,function(t,e){var r=dn[e];if(r){var n=r.name+"";(nn[n]||(nn[n]=[])).push({name:e,func:r})}}),nn[po(o,b).name]=[{name:"wrapper",func:o}],gn.prototype.clone=function(){var t=new gn(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},gn.prototype.reverse=function(){if(this.__filtered__){var t=new gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=vs(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},dn.prototype.plant=function(t){for(var e,r=this;r instanceof mn;){var n=fa(r);n.__index__=0,n.__values__=o,e?i.__wrapped__=n:e=n;var i=n;r=r.__wrapped__}return i.__wrapped__=t,e},dn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gn){var e=t;return this.__actions__.length&&(e=new gn(this)),(e=e.reverse()).__actions__.push({func:qa,args:[Aa],thisArg:o}),new vn(e,this.__chain__)}return this.thru(Aa)},dn.prototype.toJSON=dn.prototype.valueOf=dn.prototype.value=function(){return Di(this.__wrapped__,this.__actions__)},dn.prototype.first=dn.prototype.head,Le&&(dn.prototype[Le]=function(){return this}),dn}();Ie._=Rr,(i=function(){return Rr}.call(e,r,e,n))===o||(n.exports=i)}).call(this)}).call(this,r(4),r(14)(t))},function(t){t.exports={translation:{account:{hide:"Ocultar",label_24h:"24h",label_asset:"Ativos",label_price:"Preço",label_quantity:"Quantidade",label_status:"Status",label_total:"Total",low_market_value:"baixo valor de mercado",no_market_value:"sem valor de mercado",show:"Expandir",show_all:"Mostrar tudo",show_less:"Mostrar menos",tab_balances:"Saldos",tab_balances_tooltip:"Ethereum e token saldos",tab_interactions:"Interações",tab_interactions_tooltip:"Interações de Smart Contract",tab_transactions:"Transações",tab_transactions_tooltip:"Transações e transferências de tokens",tab_uniquetokens:"Tokens exclusivos",tab_uniquetokens_tooltip:"Tokens exclusivos",token:"token",tokens:"tokens",tx_failed:"Falhou",tx_fee:"Taxa",tx_from:"De",tx_hash:"Hash de transação",tx_pending:"Pendente",tx_received:"Recebido",tx_self:"Eu",tx_sent:"Enviado",tx_timestamp:"Data/hora",tx_to:"Para",unknown_token:"Token desconhecido"},button:{cancel:"Cancelar",close:"Fechar",confirm:"Confirme",connect_walletconnect:"Use o WalletConnect",donate:"Doe ETH",exchange:"Troca",exchange_again:"Troque novamente",go_back:"Volte",learn_more:"Saiba mais",notify_me:"Receba notificação",receive:"Receber",send:"Enviar",send_another:"Enviar outro",try_again:"Tente novamente",view:"Visualizar"},homepage:{coming_soon:"Em breve.",connect_ledger:{button:"Conecte-se ao Ledger",description:"Conecte-se e assine com seu ",link_text:"Ledger wallet",link_title:"Compre uma carteira de Ledger hardware wallet"},connect_metamask:{button:"Conecte-se ao MetaMask",description:"Conecte-se ao MetaMask Chrome extensão."},connect_trezor:{button:"Conecte-se a Trezor",description:"Conecte-se e assine com seu ",link_text:"Trezor hardware wallet",link_title:"Compre uma carteira de Trezor hardware wallet"},connect_walletconnect:"Ligue e assine com a sua carteira móvel compatível com o WalletConnect."},input:{asset_amount:"Quantidade",donation_address:"Balance Manager endereço",email:"Email",email_placeholder:"seu@email.com",input_placeholder:"Digite aqui",input_text:"Entrada",password:"Senha",password_placeholder:"••••••••••",private_key:"Chave privada",recipient_address:"Endereço do destinatário"},message:{click_to_copy_to_clipboard:"Clique para copiar para a área de transferência",coming_soon:"Em breve...",exchange_not_available:"O Exchange não está disponível na sua área",failed_ledger_connection:"Falha ao conectar-se ao Ledger, verifique seu dispositivo",failed_request:"Falha no pedido, por favor atualize",failed_trezor_connection:"Falha ao conectar-se ao Trezor, verifique seu dispositivo",failed_trezor_popup_blocked:"Por favor, permita que os popups do Balance usem o seu Trezor",learn_more:"Saiba mais",no_interactions:"Nenhuma interação encontrada para esta conta",no_transactions:"Nenhuma transação encontrada para esta conta",no_unique_tokens:"Nenhum token exclusivo encontrado para esta conta",opensea_footer:"é um mercado para tokens exclusivos (ou 'não fungíveis'). As pessoas negociam no espaço de mercado e isso lhes dá valor. Você pode penhorar seus tokens para conseguir dinheiro. Tudo isso é executado no Ethereum.",opensea_header:"Como isso funciona?",page_not_found:"404 Página Não Encontrada",please_connect_ledger:"Por favor, conecte e desbloqueie o Ledger e selecione Ethereum",please_connect_trezor:"Por favor, conecte seu Trezor e siga as instruções",power_by:"Distribuído por",web3_not_available:"Por favor, instale a extensão MetaMask Chrome",web3_not_unlocked:"Por favor, desbloqueie sua carteira MetaMask",web3_unknown_network:"Rede desconhecida, por favor mude para outra"},modal:{approve_tx:"Aprovar transação no {{walletType}}",confirm_tx:"Confirme a transação de {{walletName}}",default_wallet:"Carteira",deposit_dropdown_label:"Trocar meu",deposit_input_label:"Pagamento",donate_title:"Enviar de {{walletName}} para o Gestor de saldo",exchange_fee:"Taxa de troca",exchange_max:"Troca máxima",exchange_title:"Trocar de {{walletName}}",gas_average:"Médio",gas_fast:"Rápido",gas_fee:"Taxa",gas_slow:"Lento",helper_balance:"Balanço",helper_max:"Max",helper_min:"Min",helper_price:"Preço",helper_rate:"Taxa",helper_value:"Valor",invalid_address:"Endereço inválido",new:"Novo",previous_short:"Prev.",receive_title:"Receber para {{walletName}}",send_max:"Enviar max",send_title:"Enviar de {{walletName}}",tx_confirm_amount:"Montante",tx_confirm_fee:"Taxa de transação",tx_confirm_recipient:"Destinatário",tx_confirm_sender:"Remetente",tx_fee:"Taxa de transação",tx_hash:"Hash de transação",tx_verify:"Verifique sua transação aqui",withdrawal_dropdown_label:"Para",withdrawal_input_label:"Obter"},notification:{error:{failed_get_account_tx:"Falha ao obter transações da conta",failed_get_gas_prices:"Não foi possível obter os preços da Ethereum Gas",failed_get_tx_fee:"Não foi possível estimar a taxa de transação",failed_scanning_qr_code:"Falha ao digitalizar o código QR, por favor, tente novamente",generic_error:"Algo deu errado. Por favor tente outra vez",insufficient_balance:"Saldo insuficiente nesta conta",insufficient_for_fees:"Saldo insuficiente para cobrir as taxas de transação",invalid_address:"Endereço inválido, por favor verifique novamente",invalid_address_scanned:"Endereço inválido digitalizado, tente novamente",invalid_private_key_scanned:"Chave privada inválida, tente novamente",no_accounts_found:"Nenhuma Conta Ethereum Encontrada"},info:{address_copied_to_clipboard:"Endereço copiado para a área de transferência"}},subscribe_form:{email_already_subscribed:"Desculpe, você já se inscreveu com este e-mail",generic_error:"Oops, algo deu errado",sending:"Enviando ...",successful:"Verifique seu e-mail",too_many_signup_request:"Muitas solicitações de inscrição, tente novamente mais tarde"},time:{day:"dia",days:"dias",hour:"hora",hours:"horas",hr:"hr",hrs:"hrs",milisecond:"milisegundo",miliseconds:"milissegundos",min:"min",mins:"min",minute:"minuto",minutes:"minutos",ms:"ms",now:"Agora",s:"s",sec:"sec",second:"segundo",seconds:"segundos",secs:"sec"},warning:{user_is_offline:"Conexão offline, por favor, verifique sua conexão com a internet",user_is_online:"Conectado! Você está de volta online"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Connect to the MetaMask Chrome extension.",button:"Connect to MetaMask"},connect_ledger:{description:"Connect and sign with your ",link_text:"Ledger hardware wallet",link_title:"Buy a Ledger hardware wallet",button:"Connect to Ledger"},connect_trezor:{description:"Connect and sign with your ",link_text:"Trezor hardware wallet",link_title:"Buy a Trezor hardware wallet",button:"Connect to Trezor"},connect_walletconnect:"Connect and sign with your WalletConnect-enabled mobile wallet.",coming_soon:"Coming soon."},account:{tab_balances:"Balances",tab_transactions:"Transactions",tab_interactions:"Interactions",tab_uniquetokens:"Unique Tokens",tab_balances_tooltip:"Ethereum and Token Balances",tab_transactions_tooltip:"Transactions and Token Transfers",tab_interactions_tooltip:"Smart Contract Interactions",tab_uniquetokens_tooltip:"Unique Tokens",label_asset:"Asset",label_quantity:"Quantity",label_price:"Price",label_24h:"24h",label_status:"Status",label_total:"Total",show:"Show",hide:"Hide",token:"token",tokens:"tokens",no_market_value:"with no market value",low_market_value:"with low market value",tx_hash:"Transaction Hash",tx_timestamp:"Timestamp",tx_fee:"Fee",tx_to:"To",tx_from:"From",tx_self:"Self",tx_sent:"Sent",tx_received:"Received",tx_failed:"Failed",tx_pending:"Pending",show_all:"Show all",show_less:"Show less",unknown_token:"Unknown Token"},button:{connect_walletconnect:"Use WalletConnect",exchange:"Exchange",send:"Send",donate:"Donate ETH",receive:"Receive",close:"Close",confirm:"Confirm",cancel:"Cancel",go_back:"Go Back",send_another:"Send Another",exchange_again:"Exchange Again",notify_me:"Get notified",try_again:"Try again",learn_more:"Learn more",view:"View"},input:{recipient_address:"Recipient Address",private_key:"Private Key",donation_address:"Balance Manager Address",asset_amount:"Amount",email:"Email",password:"Password",input_text:"Input",email_placeholder:"your@email.com",password_placeholder:"••••••••••",input_placeholder:"Type here"},modal:{receive_title:"Receive to {{walletName}}",exchange_title:"Exchange from {{walletName}}",donate_title:"Send from {{walletName}} to Balance Manager",send_title:"Send from {{walletName}}",approve_tx:"Approve transaction on {{walletType}}",confirm_tx:"Confirm transaction from {{walletName}}",invalid_address:"Invalid Address",send_max:"Send max",exchange_max:"Exchange max",default_wallet:" Wallet",gas_slow:"Slow",gas_average:"Average",gas_fast:"Fast",gas_fee:"Fee",tx_confirm_sender:"Sender",tx_confirm_recipient:"Recipient",tx_confirm_amount:"Amount",tx_confirm_fee:"Transaction Fee",tx_hash:"Transaction Hash",tx_verify:"Verify your transaction here",deposit_dropdown_label:"Exchange my",withdrawal_dropdown_label:"For",deposit_input_label:"Pay",withdrawal_input_label:"Get",tx_fee:"Transaction Fee",exchange_fee:"Exchange Fee",previous_short:"Prev.",new:"New",helper_balance:"Balance",helper_value:"Value",helper_rate:"Rate",helper_price:"Price",helper_min:"Min",helper_max:"Max"},message:{web3_not_available:"Please install the MetaMask Chrome extension",web3_not_unlocked:"Please unlock your MetaMask wallet",web3_unknown_network:"Unknown network, please switch to another one",page_not_found:"404 Page Not Found",coming_soon:"Coming soon...",click_to_copy_to_clipboard:"Click to copy to clipboard",failed_request:"Failed request, please refresh",failed_ledger_connection:"Failed to connect to Ledger, please check your device",failed_trezor_connection:"Failed to connect to Trezor, please check your device",failed_trezor_popup_blocked:"Please allow popups on Balance to use your Trezor",no_transactions:"No transactions found for this account",no_unique_tokens:"No unique tokens found for this account",no_interactions:"No interactions found for this account",please_connect_ledger:"Please connect and unlock Ledger then select Ethereum",please_connect_trezor:"Please connect your Trezor and follow the instructions",opensea_footer:" is a market place for unique (or 'non-fungible') tokens. People trade on the marketspace and that gives them value. You can pawn your tokens to get money. All of this runs on Ethereum. ",opensea_header:"How does this work under the hood?",power_by:"Powered by",exchange_not_available:"Exchange is not available in your area",learn_more:"Learn more"},notification:{error:{no_accounts_found:"No Ethereum Accounts Found",invalid_address:"Address is invalid, please check again",insufficient_balance:"Insufficient balance in this account",insufficient_for_fees:"Insufficient balance to cover transaction fees",invalid_address_scanned:"Invalid Address Scanned, please try again",invalid_private_key_scanned:"Invalid Private Key Scanned, please try again",failed_scanning_qr_code:"Failed to scan QR code, please try again",failed_get_gas_prices:"Failed to get Ethereum Gas prices",failed_get_tx_fee:"Failed to estimate Transaction fee",failed_get_account_tx:"Failed to get Account transactions",generic_error:"Something went wrong, please try again"},info:{address_copied_to_clipboard:"Address copied to clipboard"}},warning:{user_is_offline:"Connection offline, please check your internet connection",user_is_online:"Connected! You're back online"},subscribe_form:{email_already_subscribed:"Sorry, you've already signed up with this email",too_many_signup_request:"Too many signup requests, please try again later",successful:"Check your email",sending:"Sending...",generic_error:"Oops, something went wrong"},time:{ms:"ms",milisecond:"milisecond",miliseconds:"miliseconds",s:"s",sec:"sec",secs:"secs",second:"second",seconds:"seconds",min:"min",mins:"mins",minute:"minute",minutes:"minutes",hr:"hr",hrs:"hrs",hour:"hour",hours:"hours",day:"day",days:"days",now:"Now"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Connectez-vous à l’extension Chrome de MetaMask.",button:"Se connecter à MetaMask"},connect_ledger:{description:"Connectez-vous et signez vos transactions avec votre ",link_text:"hardware wallet Ledger",link_title:"Acheter un hardware wallet Ledger",button:"Se connecter à Ledger"},connect_trezor:{description:" Connectez-vous et signez vos transactions avec votre ",link_text:"hardware wallet Trezor",link_title:"Acheter un hardware wallet Trezor",button:"Se connecter à Trezor"},connect_walletconnect:"Connectez-vous et signez vos transactions avec votre portefeuille mobile WalletConnect",coming_soon:"À venir."},account:{tab_balances:"Soldes",tab_transactions:"Transactions",tab_interactions:"Interactions",tab_uniquetokens:"Tokens uniques",tab_balances_tooltip:"Soldes en Ethereum et en tokens",tab_transactions_tooltip:"Transactions et transferts de tokens",tab_interactions_tooltip:"Interactions de smart-contracts",tab_uniquetokens_tooltip:"Tokens uniques",label_asset:"Actif",label_quantity:"Quantité",label_price:"Prix",label_24h:"24 h",label_status:"État",label_total:"Total",show:"Afficher",hide:"Masquer",token:"token",tokens:"tokens",no_market_value:"avec aucune valeur marchande",low_market_value:"avec une faible valeur marchande",tx_hash:"Hachage de transaction",tx_timestamp:"Horodatage",tx_fee:"Frais",tx_to:"À",tx_from:"De",tx_self:"Moi",tx_sent:"Envoyé",tx_received:"Reçu",tx_failed:"Échoué",tx_pending:"En attente",show_all:"Afficher tout",show_less:"Afficher moins",unknown_token:"Token inconnu"},button:{connect_walletconnect:"Utiliser WalletConnect",exchange:"Échanger",send:"Envoyer",donate:"Donner de l’ETH",receive:"Recevoir",close:"Fermer",confirm:"Confirmer",cancel:"Annuler",go_back:"Retourner",send_another:"Envoyer un autre",exchange_again:"Échanger encore",notify_me:"Recevoir des notifications",try_again:"Réessayer",learn_more:"En savoir plus",view:"Affichage"},input:{recipient_address:"Adresse du destinataire",private_key:"Clé privée",donation_address:"Adresse du Balance Manager",asset_amount:"Quantité",email:"Adresse de courriel",password:"Mot de passe",input_text:"Input",email_placeholder:"votre@courriel.com",password_placeholder:"••••••••••",input_placeholder:"Saisissez ici"},modal:{receive_title:"Recevoir à {{walletName}}",exchange_title:"Échanger de {{walletName}}",donate_title:"Envoyer de {{walletName}} au Balance Manager",send_title:"Envoyer de {{walletName}}",approve_tx:"Permettre une transaction de {{walletType}}",confirm_tx:"Confirmer une transaction de {{walletName}}",invalid_address:"Adresse non valide",send_max:"Envoyer la valeur max",exchange_max:"Échanger la valeur max",default_wallet:" Wallet",gas_slow:"Lent",gas_average:"Moyen",gas_fast:"Vite",gas_fee:"Frais",tx_confirm_sender:"Payeur",tx_confirm_recipient:"Bénéficiaire",tx_confirm_amount:"Quantité",tx_confirm_fee:"Frais de transaction",tx_hash:"Hachage de transaction",tx_verify:"Vérifiez votre transaction ici",deposit_dropdown_label:"Échanger mes",withdrawal_dropdown_label:"pour",deposit_input_label:"Payer",withdrawal_input_label:"Obtenir",tx_fee:"Frais de transaction",exchange_fee:"Frais d’échange",previous_short:"Préc.",new:"New",helper_balance:"Solde",helper_value:"Valeur",helper_rate:"Taux",helper_price:"Prix",helper_min:"Min",helper_max:"Max"},message:{web3_not_available:"Veuillez installer l’extension Chrome de MetaMask",web3_not_unlocked:"Veuillez déverrouiller votre wallet MetaMask",web3_unknown_network:"Réseau inconnu, veuillez basculer vers un autre",page_not_found:"404 Page introuvable",coming_soon:"À venir...",click_to_copy_to_clipboard:"Cliquez ici pour copier dans les presse-papiers",failed_request:"Requête échouée, veuillez rafraîchir la page",failed_ledger_connection:"Erreur de connexion à Ledger, veuillez vérifier votre appareil",failed_trezor_connection:"Erreur de connexion à Trezor, veuillez vérifier votre appareil",failed_trezor_popup_blocked:"Veuillez permettre l’affichage de fenêtres contextuelles de Balance",no_transactions:"Aucune transaction n’a été trouvée pour ce compte",no_unique_tokens:"Aucun token unique n’a été trouvé pour ce compte ",no_interactions:"Aucune interaction n’a été trouvée pour ce compte",please_connect_ledger:"Veuillez choisir Ethereum après la connexion et le déverrouillage de Ledger",please_connect_trezor:"Veuillez vous connecter à Trezor puis suivez les instructions",opensea_footer:" est un marché de tokens uniques (non-fongible). En échangeant sur ce marché, on augmente de la valeur de ces tokens. Vous pouvez vendre vos tokens pour de l’argent. Tout cela utilise l’Ethereum. ",opensea_header:"Comment est-ce que cela marche « sous le capot ? »",power_by:"Réalisé par",exchange_not_available:"L’échange n’est pas disponible dans votre région",learn_more:"En savoir plus"},notification:{error:{no_accounts_found:"Aucun compte Ethereum n’a été trouvé",invalid_address:"Adresse non valide, veuillez la vérifier",insufficient_balance:"Ce compte a un solde insuffisant",insufficient_for_fees:"Solde insuffisant pour payer les frais de transaction",invalid_address_scanned:"Adresse non valide, veuillez réessayer",invalid_private_key_scanned:"Clé privée non valide, veuillez réessayer",failed_scanning_qr_code:"Impossible de scanner le code QR, veuillez réessayer",failed_get_gas_prices:"Échec de l’obtention des prix de Gas d’Ethereum",failed_get_tx_fee:"Échec de l’estimation des frais de transaction",failed_get_account_tx:"Échec de l’obtention des transactions de compte",generic_error:"Une erreur s’est produite, veuillez réessayer"},info:{address_copied_to_clipboard:"L’adresse a été copiée dans le presse-papiers"}},warning:{user_is_offline:"Hors connexion, veuillez vérifier votre connexion Internet",user_is_online:"Connexion réussie ! Vous êtes encore connecté à Internet"},subscribe_form:{email_already_subscribed:"Désolé, vous vous êtes déjà inscrit avec cette adresse de courriel",too_many_signup_request:"Nous avons détecté trop de demandes d’inscription, veuillez réessayer plus tard",successful:"Veuillez consulter vos courriels",sending:"En train d’en envoyer...",generic_error:"Oups, une erreur s’est produite"},time:{ms:"ms",milisecond:"milliseconde",miliseconds:"millisecondes",s:"s",sec:"sec",secs:"secs",second:"seconde",seconds:"secondes",min:"min",mins:"mins",minute:"minute",minutes:"minutes",hr:"h",hrs:"hres",hour:"heure",hours:"heures",day:"jour",days:"jours",now:"Maintenant"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Mit der MetaMask Chrome Erweiterung verbinden.",button:"Mit MetaMask verbinden"},connect_ledger:{description:"Verbinden und anmelden mit deiner ",link_text:"Ledger Hardware Wallet",link_title:"Eine Ledger Hardware Wallet kaufen",button:"Mit Ledger verbinden"},connect_walletconnect:"Verbinden und mit einr WalletConnect-fähigen Mobile Wallet anmelden.",coming_soon:"Coming soon…"},account:{tab_balances:"Saldi",tab_transactions:"Transaktionen",tab_interactions:"Interaktionen",tab_balances_tooltip:"Ethereum und Token Saldi",tab_transactions_tooltip:"Transaktionen und Tokentransfers",tab_interactions_tooltip:"Smart Contract Interaktionen",label_asset:"Asset",label_quantity:"Menge",label_price:"Preis",label_24h:"24h",label_status:"Status",label_total:"Summe",show:"Anzeigen",hide:"Ausblenden",token:"Token",tokens:"Tokens",no_market_value:"ohne Marktwert",low_market_value:"mit geringem Marktwert",tx_hash:"Transaktionshash",tx_timestamp:"Zeitstempel",tx_fee:"Gebühr",tx_to:"An",tx_from:"Von",tx_self:"Ich",tx_sent:"Gesendet",tx_received:"Erhalten",tx_failed:"Fehlgeschlagen",tx_pending:"Ausstehend",show_all:"Alle anzeigen",show_less:"Weniger anzeigen",unknown_token:"Unbekannter Token"},button:{connect_walletconnect:"WalletConnect benutzen",exchange:"Umwechseln",send:"Senden",donate:"ETH spenden",receive:"Erhalten",close:"Schließen",cancel:"Abbrechen",go_back:"Zurück",send_another:"Weitere senden",notify_me:"Benachrichtige mich",try_again:"Erneut vesuchen"},input:{recipient_address:"Empfängeradresse",private_key:"Private-Key",donation_address:"Balance Manager Adresse",asset_amount:"Menge",email:"E-Mail-Adresse",password:"Passwort",input_text:"Input",email_placeholder:"deine@email.de",password_placeholder:"••••••••••",input_placeholder:"Hier einfügen"},modal:{receive_title:"Mit {{walletName}} erhalten",exchange_title:"Umwechseln von {{walletName}}",donate_title:"Von {{walletName}} an Balance Manager senden",send_title:"Gesendet von {{walletName}}",approve_tx:"Transaktion auf {{walletType}} zustimmen",confirm_tx:"Transaktion von {{walletName}} bestätigen",invalid_address:"Ungültige Adresse",send_max:"maximal",exchange_max:"maximal",default_wallet:" Wallet",gas_slow:"Langsam",gas_average:"Durchschnittlich",gas_fast:"Schnell",gas_fee:"Gebühr",tx_confirm_sender:"Sender",tx_confirm_recipient:"Empfänger",tx_confirm_amount:"Menge",tx_confirm_fee:"Transaktionsgebühr",tx_hash:"Transaktionshash",tx_verify:"Transaktion hier verifizieren",deposit_dropdown_label:"Tausche mein",withdrawal_dropdown_label:"gegen",deposit_input_label:"Bezahlen",withdrawal_input_label:"Erhalten",tx_fee:"Transaktionsgebühr",exchange_fee:"Umtauschgebühr"},message:{web3_not_available:"Bitte die MetaMask Chrome Erweiterung installieren",web3_not_unlocked:"Bitte die MetaMask Wallet entsperren",web3_unknown_network:"Unbekanntes Netzwerk, bitte auf ein anderes wechseln",page_not_found:"404 Seite nicht gefunden",coming_soon:"Coming soon…",click_to_copy_to_clipboard:"Klicken um in die Zwischenablage zu kopieren",failed_request:"Anfrage fehlgeschlagen, bitte neu laden",failed_ledger_connection:"Fehler beim verbinden zu Ledger, bitte Gerät überprüfen",no_transactions:"Keine Transaktionen für diesen Account gefunden",no_interactions:"Keine Interaktionen für diesen Account gefunden",please_connect_ledger:"Mit Ledger verbinden, entsperren und Ethereum auswählen"},notification:{error:{no_accounts_found:"Kein Ethereum Account gefunden",invalid_address:"Addresse ist ungültig, bitte überprüfen",insufficient_balance:"Nicht genügend Guthaben in diesem Account",insufficient_for_fees:"Nicht genügend Guthaben um Transaktionsgebühren zu decken",invalid_address_scanned:"Gescannte Adresse ungültig, bitte erneut versuchen",invalid_private_key_scanned:"Gescannter Private-Key ungültig, bitte erneut versuchen",failed_scanning_qr_code:"QR-Code scannen fehlgeschlagen, bitte erneut versuchen",failed_get_gas_prices:"Ethereum Gas Preis ermitteln fehlgeschlagen",failed_get_tx_fee:"Transaktionsgebühr ermitteln fehlgeschlagen",failed_get_account_tx:"Abrufen der Transaktionen für diesen Account fehlgeschlagen",generic_error:"Etwas ist schief gelaufen, bitte erneut versuchen"},info:{address_copied_to_clipboard:"Adresse in Zwischenablage kopiert"}},warning:{user_is_offline:"Verbindung ist offline, bitte Internetverbindung überprüfen",user_is_online:"Verbunden! Wieder online"},subscribe_form:{email_already_subscribed:"Es tut uns Leid, diese E-Mail-Adresse ist bereits in unserem Verteiler",too_many_signup_request:"Zu viele Anfragen, bitte später erneut versuchen",successful:"Check deine E-Mails",sending:"Wird gesendet…",generic_error:"Ups, irgendwas ist schief gelaufen"},time:{ms:"ms",milisecond:"Millisekunde",miliseconds:"Millisekunden",s:"s",sec:"Sek",secs:"Sek",second:"Sekunde",seconds:"Sekunden",min:"Min",mins:"Min",minute:"Minute",minutes:"Minuten",hr:"Std",hrs:"Stdn",hour:"Stunde",hours:"Stunden",day:"Tag",days:"Tage"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Připojit se k MetaMask rozšíření.",button:"Připojit se k MetaMask"},connect_ledger:{description:"Připojit se a podepsat pomocí ",link_text:"Ledger HW peněženky",link_title:"Koupit Ledger HW peněženku",button:"Připojit se k Ledger"},connect_trezor:{description:"Připojit se a podepsat pomocí ",link_text:"Trezor HW peněženky",link_title:"Koupit Trezor HW peněženku",button:"Připojit se k Trezoru"},connect_walletconnect:"Připojit se a podepsat pomocí WalletConnect-enabled mobilní peněženky.",coming_soon:"Již brzy."},account:{tab_balances:"Zůstatky",tab_transactions:"Transakce",tab_interactions:"Interakce",tab_uniquetokens:"Unikátní tokeny",tab_balances_tooltip:"Zůstatky Etheru a Tokenů",tab_transactions_tooltip:"Transakce a transakce tokenů",tab_interactions_tooltip:"Smart Contract interakce",tab_uniquetokens_tooltip:"Unikátní tokeny",label_asset:"Aktivum",label_quantity:"Množství",label_price:"Cena",label_24h:"24h",label_status:"Status",label_total:"Celkem",show:"Zobraz",hide:"Schovej",token:"token",tokens:"tokeny",no_market_value:"bez tržní hodnoty",low_market_value:"s nízkou tržní hodnotou",tx_hash:"Hash transakce",tx_timestamp:"Datum a čas",tx_fee:"Poplatek",tx_to:"Komu",tx_from:"Od",tx_self:"Sobě",tx_sent:"Posláno",tx_received:"Obdrženo",tx_failed:"Selhalo",tx_pending:"Probíhá",show_all:"Zobrazit všechny",show_less:"Zobraz méně",unknown_token:"Neznámý Token"},button:{connect_walletconnect:"Použij WalletConnect",exchange:"Směnit",send:"Poslat",donate:"Daruj ETH",receive:"Příjmout",close:"Zavřít",confirm:"Potvrdit",cancel:"Zrušit",go_back:"Jít zpět",send_another:"Poslat další",exchange_again:"Směn znovu",notify_me:"Dostávat oznámení",try_again:"Zkusit znovu",learn_more:"Zjistit více",view:"Zobrazit"},input:{recipient_address:"Adresa příjemce",private_key:"Soukromý klíč",donation_address:"Správa zůstatků",asset_amount:"množství",email:"Email",password:"Heslo",input_text:"Vstup",email_placeholder:"your@email.com",password_placeholder:"••••••••••",input_placeholder:"Vepište zde"},modal:{receive_title:"Příjmout pomocí {{walletName}}",exchange_title:"Směnit pomocí {{walletName}}",donate_title:"Odeslat z {{walletName}} do správy prostředků",send_title:"Odeslat z {{walletName}}",approve_tx:"Schválit transakci na {{walletType}}",confirm_tx:"Potvrdit transakci od {{walletName}}",invalid_address:"Chybná adresa",send_max:"Poslat maximum",exchange_max:"Směnit maximum",default_wallet:" peněženky",gas_slow:"Pomalu",gas_average:"Průměrně",gas_fast:"Rychle",gas_fee:"Poplatek",tx_confirm_sender:"Odesílatel",tx_confirm_recipient:"Příjemce",tx_confirm_amount:"Množství",tx_confirm_fee:"Poplatek za transakci",tx_hash:"Hash transakce",tx_verify:"Ověřte si transakci zde",deposit_dropdown_label:"Směn můj",withdrawal_dropdown_label:"Za",deposit_input_label:"Zaplatit",withdrawal_input_label:"Získat",tx_fee:"Poplatek za transakci",exchange_fee:"Poplatek za směnu",previous_short:"Před.",new:"Nový",helper_balance:"Zůstatek",helper_value:"Hodnota",helper_rate:"Sazba",helper_price:"Cena",helper_min:"Min",helper_max:"Max"},message:{web3_not_available:"Nainstalujte si prosím MetaMask rozšíření",web3_not_unlocked:"Odblokujte prosím MetaMask",web3_unknown_network:"Neznámá síť, prosím přepněte se do jinačí sítě",page_not_found:"404 Stránka nenalezena",coming_soon:"Již brzy...",click_to_copy_to_clipboard:"Klikněte pro zkopírování do schránky",failed_request:"Požadavek selhal, prosím opakujte",failed_ledger_connection:"Nepodařilo se připojit k Ledger, prosím zkontrolujte Vaše zařízení",failed_trezor_connection:"Nepodařilo se připojit k Trezoru, prosím zkontrolujte Vaše zařízení",failed_trezor_popup_blocked:"Prosím povolte vyskakovací okna v Zůstatcích pro používání Trezoru",no_transactions:"Nebyly nalezeny žádné transakce pro Váš účet",no_unique_tokens:"Nebyly nalezeny žádné unikátní tokeny pro Váš účet",no_interactions:"Nebyly nalezeny žádné interakce pro Váš účet",please_connect_ledger:"Prosím připojte a odemkněte Ledger a následně vyberte možnost Ethereum",please_connect_trezor:"Prosím připojte Trezor a následujte instrukce",opensea_footer:" je market pro unikátní (též 'nezaměnitelné') tokeny. Lidé obchodují na trhu a to jim získává hodnotu. Můžete zastavit Vaše tokeny a tím získat peníze. A vše tohleto běží na Ethereum. ",opensea_header:"A jak tohle funguje pod kapotou?",power_by:"Poháněno",exchange_not_available:"Směnárna neni povolená ve Vaší lokalitě",learn_more:"Zjistit více"},notification:{error:{no_accounts_found:"Nebyly nalezeny žádné Ethereum účty",invalid_address:"Adresa je chybná, prosím zkontrolujte jí",insufficient_balance:"Nedostatečný zůstatek na tomto účtě",insufficient_for_fees:"Nedostatečný zůstatek pro pokrytí poplatků",invalid_address_scanned:"Naskenovaná adresa je chybná, prosím zkuste to znovu",invalid_private_key_scanned:"Naskenovaný privátní klíč je chybný. prosím zkuste to znovu",failed_scanning_qr_code:"Nepodařilo se naskenovat QR kód, prosím zkuste to pozdějí",failed_get_gas_prices:"Nepodařilo se získat cenu za Ethereum plyn",failed_get_tx_fee:"Chyba v počítání poplatku za plyn",failed_get_account_tx:"Chyba v získávání transakcí k účtu",generic_error:"Něco se stalo, zkuste to prosím pozdějí"},info:{address_copied_to_clipboard:"Adresa zkopírována do schránky"}},warning:{user_is_offline:"Jste offline, prosíme zkontrolujte internetové připojení",user_is_online:"Připojeno! Jste zpátky online"},subscribe_form:{email_already_subscribed:"S tímto emailem jste již zaregistrování",too_many_signup_request:"Mnoho chybných pokusů o přihlášení, zkuste to prosím později",successful:"Zkontrolujte si svůj email",sending:"Odesílám...",generic_error:"Hups, něco se pokazilo"},time:{ms:"ms",milisecond:"milisekunda",miliseconds:"milisekundy",s:"s",sec:"sek",secs:"sek",second:"sekunda",seconds:"sekundy",min:"min",mins:"min.",minute:"minuta",minutes:"minuty",hr:"hod",hrs:"hod",hour:"hodina",hours:"hodin",day:"den",days:"dnů",now:"nyní"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Connetti all'estensione di Chrome MetaMask.",button:"Connetti a MetaMask"},connect_ledger:{description:"Connetti ed accedi con il tuo ",link_text:"Ledger hardware wallet",link_title:"Acquista un hardware wallet Ledger",button:"Connetti a Ledger"},connect_walletconnect:"Collegati ed accedi al tuo wallet WalletConnect.",coming_soon:"In arrivo."},account:{tab_balances:"Saldo",tab_transactions:"Transazioni",tab_interactions:"Interazioni",tab_balances_tooltip:"Saldo di Ethereum e Token",tab_transactions_tooltip:"Transazioni e Transferimenti dei Token",tab_interactions_tooltip:"Interazioni di Smart Contracts",label_asset:"Asset",label_quantity:"Quantità",label_price:"Prezzo",label_24h:"24h",label_status:"Stato",label_total:"Totale",show:"Mostra",hide:"Nascondi",token:"token",tokens:"token",no_market_value:"senza valore di mercato",low_market_value:"con basso valore di mercato",tx_hash:"Hash della Transazione",tx_timestamp:"Data/Ora",tx_fee:"Commissioni",tx_to:"A",tx_from:"Da",tx_self:"Io",tx_sent:"Inviata",tx_received:"Ricevuta",tx_failed:"Fallita",tx_pending:"In attesa",show_all:"Mostra tutto",show_less:"Mostra meno",unknown_token:"Token Sconosciuto"},button:{connect_walletconnect:"Usa WalletConnect",exchange:"Scambia",send:"Invia",donate:"Dona ETH",receive:"Ricevi",close:"Chiudi",cancel:"Cancella",go_back:"Indietro",send_another:"Invia un altro",notify_me:"Imposta notifica",try_again:"Prova ancora"},input:{recipient_address:"Indirizzo Destinatario",private_key:"Chiave Privata",donation_address:"Indirizzo di Balance Manager",asset_amount:"Quantità",email:"Email",password:"Password",input_text:"Input",email_placeholder:"tua@email.com",password_placeholder:"••••••••••",input_placeholder:"Scrivi qui"},modal:{receive_title:"Ricevi a {{walletName}}",exchange_title:"Scambia da {{walletName}}",donate_title:"Invia da {{walletName}} a Balance Manager",send_title:"Invia da {{walletName}}",approve_tx:"Approva transazioni su {{walletType}}",confirm_tx:"Conferma transazione da {{walletName}}",invalid_address:"Indirizzo Non Valido",send_max:"Invia max",exchange_max:"Scambia max",default_wallet:" Wallet",gas_slow:"Lento",gas_average:"Medio",gas_fast:"Veloce",gas_fee:"Costi di commissione",tx_confirm_sender:"Mittente",tx_confirm_recipient:"Destinatario",tx_confirm_amount:"Quantità",tx_confirm_fee:"Commissioni per la Transazione",tx_hash:"Hash della Transazione",tx_verify:"Verify your transaction here",deposit_dropdown_label:"Scambia i miei",withdrawal_dropdown_label:"per",deposit_input_label:"Paga",withdrawal_input_label:"Ottieni",tx_fee:"Commissioni per la Transazione",exchange_fee:"Commissioni per il Cambio"},message:{web3_not_available:"Installa l'estensione di Chrome MetaMask",web3_not_unlocked:"Per favore sblocca il tuo wallet MetaMask",web3_unknown_network:"Network sconosciuto, per favore passa ad un altro",page_not_found:"404 Pagina Non Trovata",coming_soon:"In arrivo...",click_to_copy_to_clipboard:"Clicca per copiare negli appunti",failed_request:"Richiesta fallita, per favore ricarica la pagina",failed_ledger_connection:"Collegamento a Ledger fallito, controlla il tuo dispositivo",no_transactions:"Nessuna transazione trovata per questo account",no_interactions:"Nessuna interazione trovata per questo account",please_connect_ledger:"Collega e sblocca Ledger, poi seleziona Ethereum"},notification:{error:{no_accounts_found:"Nessun Account Ethereum Trovato",invalid_address:"Indirizzo non valido, per favore controlla di nuovo",insufficient_balance:"Saldo insufficiente per questo account",insufficient_for_fees:"Saldo insufficiente per coprire i costi di transazione",invalid_address_scanned:"Indirizzo non valido, per favore prova di nuovo",invalid_private_key_scanned:"Chiave Privata non valida, per favore prova di nuovo",failed_scanning_qr_code:"Scannerizzazione QR code fallita, per favore prova di nuovo",failed_get_gas_prices:"Ottenimento prezzi Gas fallito",failed_get_tx_fee:"Stima costi di transazione fallita",failed_get_account_tx:"Ottenimento transazioni account fallito",generic_error:"Qualcosa è andato storto, prova di nuovo"},info:{address_copied_to_clipboard:"Indirizzo copiato negli appunti"}},warning:{user_is_offline:"Connessione assente, controlla tua connessione internet",user_is_online:"Connesso! Sei di nuovo online"},subscribe_form:{email_already_subscribed:"Ci dispiace, ti sei già registrato con questa mail",too_many_signup_request:"Troppe richiesta di registrazione, riprova più tardi",successful:"Controlla la tua email",sending:"Invio...",generic_error:"Oops, qualcosa è andato storto"},time:{ms:"ms",milisecond:"millisecondo",miliseconds:"millisecondi",s:"s",sec:"sec",secs:"sec",second:"secondo",seconds:"secondi",min:"min",mins:"min",minute:"minuto",minutes:"minuti",hr:"hr",hrs:"hr",hour:"ora",hours:"ore",day:"giorno",days:"giorni"}}}},function(t){t.exports={translation:{account:{hide:"Ocultar",label_24h:"24h",label_asset:"Ativos",label_price:"Preço",label_quantity:"Quantidade",label_status:"Status",label_total:"Total",low_market_value:"baixo valor de mercado",no_market_value:"sem valor de mercado",show:"Expandir",show_all:"Mostrar tudo",show_less:"Mostrar menos",tab_balances:"Saldos",tab_balances_tooltip:"Ethereum e token saldos",tab_interactions:"Interações",tab_interactions_tooltip:"Interações de Smart Contract",tab_transactions:"Transações",tab_transactions_tooltip:"Transações e transferências de tokens",tab_uniquetokens:"Tokens exclusivos",tab_uniquetokens_tooltip:"Tokens exclusivos",token:"token",tokens:"tokens",tx_failed:"Falhou",tx_fee:"Taxa",tx_from:"De",tx_hash:"Hash de transação",tx_pending:"Pendente",tx_received:"Recebido",tx_self:"Eu",tx_sent:"Enviado",tx_timestamp:"Data/hora",tx_to:"Para",unknown_token:"Token desconhecido"},button:{cancel:"Cancelar",close:"Fechar",confirm:"Confirme",connect_walletconnect:"Use o WalletConnect",donate:"Doe ETH",exchange:"Troca",exchange_again:"Troque novamente",go_back:"Volte",learn_more:"Saiba mais",notify_me:"Receba notificação",receive:"Receber",send:"Enviar",send_another:"Enviar outro",try_again:"Tente novamente",view:"Visualizar"},homepage:{coming_soon:"Em breve.",connect_ledger:{button:"Conecte-se ao Ledger",description:"Conecte-se e assine com seu ",link_text:"Ledger wallet",link_title:"Compre uma carteira de Ledger hardware wallet"},connect_metamask:{button:"Conecte-se ao MetaMask",description:"Conecte-se ao MetaMask Chrome extensão."},connect_trezor:{button:"Conecte-se a Trezor",description:"Conecte-se e assine com seu ",link_text:"Trezor hardware wallet",link_title:"Compre uma carteira de Trezor hardware wallet"},connect_walletconnect:"Ligue e assine com a sua carteira móvel compatível com o WalletConnect."},input:{asset_amount:"Quantidade",donation_address:"Balance Manager endereço",email:"Email",email_placeholder:"seu@email.com",input_placeholder:"Digite aqui",input_text:"Entrada",password:"Senha",password_placeholder:"••••••••••",private_key:"Chave privada",recipient_address:"Endereço do destinatário"},message:{click_to_copy_to_clipboard:"Clique para copiar para a área de transferência",coming_soon:"Em breve...",exchange_not_available:"O Exchange não está disponível na sua área",failed_ledger_connection:"Falha ao conectar-se ao Ledger, verifique seu dispositivo",failed_request:"Falha no pedido, por favor atualize",failed_trezor_connection:"Falha ao conectar-se ao Trezor, verifique seu dispositivo",failed_trezor_popup_blocked:"Por favor, permita que os popups do Balance usem o seu Trezor",learn_more:"Saiba mais",no_interactions:"Nenhuma interação encontrada para esta conta",no_transactions:"Nenhuma transação encontrada para esta conta",no_unique_tokens:"Nenhum token exclusivo encontrado para esta conta",opensea_footer:"é um mercado para tokens exclusivos (ou 'não fungíveis'). As pessoas negociam no espaço de mercado e isso lhes dá valor. Você pode penhorar seus tokens para conseguir dinheiro. Tudo isso é executado no Ethereum.",opensea_header:"Como isso funciona?",page_not_found:"404 Página Não Encontrada",please_connect_ledger:"Por favor, conecte e desbloqueie o Ledger e selecione Ethereum",please_connect_trezor:"Por favor, conecte seu Trezor e siga as instruções",power_by:"Distribuído por",web3_not_available:"Por favor, instale a extensão MetaMask Chrome",web3_not_unlocked:"Por favor, desbloqueie sua carteira MetaMask",web3_unknown_network:"Rede desconhecida, por favor mude para outra"},modal:{approve_tx:"Aprovar transação no {{walletType}}",confirm_tx:"Confirme a transação de {{walletName}}",default_wallet:"Carteira",deposit_dropdown_label:"Trocar meu",deposit_input_label:"Pagamento",donate_title:"Enviar de {{walletName}} para o Gestor de saldo",exchange_fee:"Taxa de troca",exchange_max:"Troca máxima",exchange_title:"Trocar de {{walletName}}",gas_average:"Médio",gas_fast:"Rápido",gas_fee:"Taxa",gas_slow:"Lento",helper_balance:"Balanço",helper_max:"Max",helper_min:"Min",helper_price:"Preço",helper_rate:"Taxa",helper_value:"Valor",invalid_address:"Endereço inválido",new:"Novo",previous_short:"Prev.",receive_title:"Receber para {{walletName}}",send_max:"Enviar max",send_title:"Enviar de {{walletName}}",tx_confirm_amount:"Montante",tx_confirm_fee:"Taxa de transação",tx_confirm_recipient:"Destinatário",tx_confirm_sender:"Remetente",tx_fee:"Taxa de transação",tx_hash:"Hash de transação",tx_verify:"Verifique sua transação aqui",withdrawal_dropdown_label:"Para",withdrawal_input_label:"Obter"},notification:{error:{failed_get_account_tx:"Falha ao obter transações da conta",failed_get_gas_prices:"Não foi possível obter os preços da Ethereum Gas",failed_get_tx_fee:"Não foi possível estimar a taxa de transação",failed_scanning_qr_code:"Falha ao digitalizar o código QR, por favor, tente novamente",generic_error:"Algo deu errado. Por favor tente outra vez",insufficient_balance:"Saldo insuficiente nesta conta",insufficient_for_fees:"Saldo insuficiente para cobrir as taxas de transação",invalid_address:"Endereço inválido, por favor verifique novamente",invalid_address_scanned:"Endereço inválido digitalizado, tente novamente",invalid_private_key_scanned:"Chave privada inválida, tente novamente",no_accounts_found:"Nenhuma Conta Ethereum Encontrada"},info:{address_copied_to_clipboard:"Endereço copiado para a área de transferência"}},subscribe_form:{email_already_subscribed:"Desculpe, você já se inscreveu com este e-mail",generic_error:"Oops, algo deu errado",sending:"Enviando ...",successful:"Verifique seu e-mail",too_many_signup_request:"Muitas solicitações de inscrição, tente novamente mais tarde"},time:{day:"dia",days:"dias",hour:"hora",hours:"horas",hr:"hr",hrs:"hrs",milisecond:"milisegundo",miliseconds:"milissegundos",min:"min",mins:"min",minute:"minuto",minutes:"minutos",ms:"ms",now:"Agora",s:"s",sec:"sec",second:"segundo",seconds:"segundos",secs:"sec"},warning:{user_is_offline:"Conexão offline, por favor, verifique sua conexão com a internet",user_is_online:"Conectado! Você está de volta online"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Подключитесь к Chrome плагину MetaMask.",button:"Подключиться к MetaMask"},connect_ledger:{description:"Подключите и авторизируйтесь через свой ",link_text:"аппаратный кошелек Ledger",link_title:"Купить аппаратный кошелек Ledger",button:"Подключиться к Ledger"},connect_trezor:{description:"Подключите и авторизируйтесь через свой ",link_text:"аппаратный кошелек Trezor",link_title:"Купить аппаратный кошелек Trezor",button:"Подключиться к Trezor"},connect_walletconnect:"Подключите и авторизируйстесь через свой мобильный кошелек с поддержкой WalletConnect.",coming_soon:"Скоро."},account:{tab_balances:"Балансы",tab_transactions:"Транзакции",tab_interactions:"Операции",tab_uniquetokens:"Уникальные токены",tab_balances_tooltip:"Балансы Ethereum и токенов",tab_transactions_tooltip:"Транзакции и переводы токенов",tab_interactions_tooltip:"Операции со smart контрактами",tab_uniquetokens_tooltip:"Уникальные токены",label_asset:"Актив",label_quantity:"Кол-во",label_price:"Цена",label_24h:"24ч",label_status:"Статус",label_total:"Всего",show:"Показать",hide:"Скрыть",token:"токен",tokens:"токенов",no_market_value:"без рыночной стоимости",low_market_value:"с низкой рыночной стоимостью",tx_hash:"Хеш транзакции",tx_timestamp:"Время",tx_fee:"Комиссия",tx_to:"На",tx_from:"От",tx_self:"Self",tx_sent:"Отправлено",tx_received:"Получено",tx_failed:"Ошибка",tx_pending:"Ожидается",show_all:"Показать все",show_less:"Показать меньше",unknown_token:"Неизвестный токен"},button:{connect_walletconnect:"Использовать WalletConnect",exchange:"Обмен",send:"Отправить",donate:"Задонатить ETH",receive:"Получить",close:"Закрыть",cancel:"Отменить",go_back:"Назад",send_another:"Отправить еще",exchange_again:"Обменять еще",notify_me:"Получить уведомление",try_again:"Попробовать еще раз",learn_more:"Узнать больше",view:"Смотреть"},input:{recipient_address:"Адрес получателя",private_key:"Приватный ключ",donation_address:"Адрес Balance Manager",asset_amount:"Сумма",email:"Email",password:"Пароль",input_text:"Input",email_placeholder:"your@email.com",password_placeholder:"••••••••••",input_placeholder:"Заполнить здесь"},modal:{receive_title:"Получить на {{walletName}}",exchange_title:"Обменять с {{walletName}}",donate_title:"Отправить с {{walletName}} на Balance Manager",send_title:"Отправить с {{walletName}}",approve_tx:"Одобрить транзакцию на {{walletType}}",confirm_tx:"Подтвердить транзакцию с {{walletName}}",invalid_address:"Неправильный адрес",send_max:"Отправить макс",exchange_max:"Обменять макс",default_wallet:" кошелек",gas_slow:"Медленно",gas_average:"Средне",gas_fast:"Быстро",gas_fee:"Комиссия",tx_confirm_sender:"Отправитель",tx_confirm_recipient:"Получатель",tx_confirm_amount:"Сумма",tx_confirm_fee:"Коммисия транзакции",tx_hash:"Хэш транзакции",tx_verify:"Верифицируйте свою транзакцию здесь",deposit_dropdown_label:"Обменять мои",withdrawal_dropdown_label:"на",deposit_input_label:"Отдаю",withdrawal_input_label:"Получаю",tx_fee:"Комиссия транзакции",exchange_fee:"Комиссия обмена",previous_short:"Пред.",new:"Новое",helper_balance:"Баланс",helper_value:"Стоимость",helper_rate:"Курс обмена",helper_price:"Цена",helper_min:"Мин",helper_max:"Макс"},message:{web3_not_available:"Пожалуйста установите Chrome плагин MetaMask",web3_not_unlocked:"Пожалуйста разблокируйте свой MetaMask кошелек",web3_unknown_network:"Неизвестная сеть, попробуйте подключиться к другой",page_not_found:"404 Страница не найдена",coming_soon:"Скоро...",click_to_copy_to_clipboard:"Нажмите, чтобы скопировать",failed_request:"Ошибка запроса, пожалуйста обновите",failed_ledger_connection:"Ошибка подключения к Ledger, пожалуйста проверьте устройство",failed_trezor_connection:"Ошибка подключения к Trezor, пожалуйста проверьте устройство",failed_trezor_popup_blocked:"Пожалуйста разрешите всплывающие окна для Balance чтобы использовать свой Trezor",no_transactions:"Не найдено транзакций для этого аккаунта",no_unique_tokens:"Не найдено уникальных токенов для этого аккаунта",no_interactions:"Не найдено операций с этим аккаунтом",please_connect_ledger:"Пожалуйста подключите и разблокируйте Ledger, затем выберите Ethereum",please_connect_trezor:"Пожалуйста подключите свой Trezor и следуйте инструкциям",opensea_footer:" это marketplace для уникальных (или 'не заменяемых') токенов. Люди торгуют на этом marketplace и это дает им стомость. Вы можете заложить свои токены, чтобы получить деньги. Все это работает на Ethereum. ",opensea_header:"Как это работает под капотом?",power_by:"Работает на",exchange_not_available:"Обмен не доступен в вашем регионе",learn_more:"Узнать больше"},notification:{error:{no_accounts_found:"Ethereum аккаунт не найден",invalid_address:"Неправильный адрес, пожалуйста проверьте еще раз",insufficient_balance:"Недостаточный баланс в этом аккаунте",insufficient_for_fees:"Недостаточный баланс, чтобы покрыть комиссию транзакции",invalid_address_scanned:"Обнаружен неправильный адрес, пожалуйста попробуйте еще раз",invalid_private_key_scanned:"Обнаружен неправильный приватный ключ, пожалуйста попробуйте еще раз",failed_scanning_qr_code:"Ошибка сканирования QR кода, пожалуйста попробуйте еще раз",failed_get_gas_prices:"Не удалось получить Ethereum Gas prices",failed_get_tx_fee:"Не удалось посчитать комиссию транзакции",failed_get_account_tx:"Не удалось получить транзакции аккаунта",generic_error:"Что-то пошло не так, попробуйте еще раз"},info:{address_copied_to_clipboard:"Адрес скопирован в буфер"}},warning:{user_is_offline:"Нет подключения, пожалуйста проверьте свое интернет-соединение",user_is_online:"Подключено! Вы снова онлайн"},subscribe_form:{email_already_subscribed:"Извините, вы уже авторизировались с этим e-mail",too_many_signup_request:"Слишком много запросов на регистрацию, пожалуйста попробуйте еще раз",successful:"Проверьте свой e-mail",sending:"Отправляется...",generic_error:"Упс, что-то пошло не так"},time:{ms:"мс",milisecond:"милисекунда",miliseconds:"милисекунд",s:"с",sec:"сек",secs:"сек",second:"секунда",seconds:"секунд",min:"мин",mins:"мин",minute:"минута",minutes:"минут",hr:"ч",hrs:"ч",hour:"час",hours:"часов",day:"день",days:"дней",now:"Сейчас"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Conéctate a la extensión de Chrome de Metamask.",button:"Conectar MetaMask"},connect_ledger:{description:"Conéctate y firma tus transacciones con tu ",link_text:"Ledger Wallet",link_title:"Compra un Ledger hardware wallet",button:"Conectar Ledger"},connect_trezor:{description:"Conéctate y firma tus transacciones con tu ",link_text:"Trezor Wallet",link_title:"Compra un Trezor hardware wallet",button:"Conectar Trezor"},connect_walletconnect:{description:"Conéctate y firmat con tu wallet móvil de WalletConnect.",button:"Conectar Wallet Connect"},coming_soon:"Próximamente."},account:{tab_balances:"Saldos",tab_transactions:"Transacciones",tab_interactions:"Interacciones",tab_balances_tooltip:"Saldos de Ethereum y Tokens",tab_transactions_tooltip:"Transacciones y Transferencias de Tokens",tab_interactions_tooltip:"Interacciones de Smart Contracts",label_asset:"Activo",label_quantity:"Cantidad",label_price:"Precio",label_24h:"24h",label_status:"Estado",label_total:"Total",show:"Mostrar",hide:"Esconder",token:"token",tokens:"tokens",no_market_value:"sin valor de mercado",low_market_value:"con bajo valor de mercado",tx_hash:"Hash de Transacción",tx_timestamp:"Fecha/Hora",tx_fee:"Tarifa",tx_to:"Hacia",tx_from:"Desde",tx_self:"Yo",tx_sent:"Enviado",tx_received:"Recibido",tx_failed:"Fallido",tx_pending:"Pendiente",show_all:"Mostrar todo",show_less:"Mostrar menos",unknown_token:"Token Desconocido"},button:{connect_walletconnect:"Utilizar WalletConnect",donate:"Donar ETH",exchange:"Cambiar",send:"Enviar",receive:"Recibir",close:"Cerrar",cancel:"Cancelar",go_back:"Regressar",send_another:"Enviar otro",notify_me:"Ser notificado",try_again:"Intentar otra vez"},input:{recipient_address:"Recipiente Dirección",private_key:"Llave Privada",asset_amount:"Cantidad",donation_address:"Balance Manager Dirección",email:"Email",password:"Password",input_text:"Input",email_placeholder:"tu@email.com",password_placeholder:"••••••••••",input_placeholder:"Escribe aquí"},modal:{receive_title:"Recibir a {{walletName}}",exchange_title:"Intercambiar de {{walletName}}",send_title:"Enviar de {{walletName}}",approve_tx:"Aprobar transacción en {{walletType}}",confirm_tx:"Confirmar transacción de {{walletName}}",invalid_address:"Dirección inválida",send_max:"Enviar máximo",exchange_max:"Intercambiar máximo",default_wallet:" Cartera",gas_slow:"Lento",gas_average:"Medio",donate_title:"Enviar de {{walletName}} a Balance Manager",gas_fast:"Rápido",gas_fee:"Tarifa",tx_confirm_sender:"Remitente",tx_confirm_recipient:"Recipiente",tx_confirm_amount:"Cantidad",tx_confirm_fee:"Tarifa de transacción",tx_hash:"Hash de Transacción",tx_verify:"Verifique su transacción aquí",deposit_dropdown_label:"Intercambiar mi",withdrawal_dropdown_label:"por",deposit_input_label:"Pagar",withdrawal_input_label:"Obtener",tx_fee:"Tarifa de transacción",exchange_fee:"Tarifa de cambio"},message:{web3_not_available:"Instala la extension de Chrome de MetaMask",web3_not_unlocked:"Por favor desbloquear su cartera MetaMask",web3_unknown_network:"Red desconocida, por favor cambie a otro",page_not_found:"404 Página no encontrada",coming_soon:"Próximamente...",click_to_copy_to_clipboard:"Haz clic para copiar al clipboard",failed_request:"Solicitud fallida, por favor refrescar",failed_ledger_connection:"Error al conectar a Ledger, por favor verifica tu dispositivo",failed_trezor_connection:"Error al conectar a Trezor, por favor verifica tu dispositivo",no_transactions:"No se encontraron transacciones para esta cuenta",no_interactions:"No se encontraron interacciones para esta cuenta",please_connect_ledger:"Por favor conecta y desbloquea Ledger y luego selecciona Ethereum",please_connect_trezor:"Por favor conecta y desbloquea Trezor y luego selecciona Ethereum",exchange_not_available:"Intercambio no está disponible en su área",learn_more:"Aprende más"},notification:{error:{no_accounts_found:"No se encontraron cuentas de Ethereum",invalid_address:"Dirección inválida, verifica nuevamente",insufficient_balance:"Saldo insuficiente en esta cuenta",insufficient_for_fees:"Saldo insuficiente para cubrir las tarifas de transacción",invalid_address_scanned:"Dirección inválida escaneada, intenta nuevamente",invalid_private_key_scanned:"Llave privada inválida, intenta nuevamente",failed_scanning_qr_code:"Error al escanear el código QR, intenta nuevamente",failed_get_gas_prices:"Error al obtener los precios de Gas Ethereum",failed_get_tx_fee:"Error al estimar la tarifa de transacción",failed_get_account_tx:"Error al obtener transacciones de cuenta",generic_error:"Algo salió mal, intenta nuevamente"},info:{address_copied_to_clipboard:"Dirección copiada al clipboard"}},warning:{user_is_offline:"Conexión offline, por favor verifica tu conexión a Internet",user_is_online:"¡Conectado! Estás de vuelta online"},subscribe_form:{email_already_subscribed:"Lo sentimos, ya te has registrado con este correo electrónico",too_many_signup_request:"Demasiadas solicitudes de registro, inténtalo de nuevo más tarde",successful:"Verifica tu email",sending:"Enviando...",generic_error:"Uy! Algo salió mal"},time:{ms:"ms",milisecond:"milisegundo",miliseconds:"milisegundos",s:"s",sec:"seg",secs:"segs",second:"segundo",seconds:"segundos",min:"min",mins:"mins",minute:"minuto",minutes:"minutos",hr:"hr",hrs:"hrs",hour:"hora",hours:"horas",day:"dia",days:"dias"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Połącz z rozszerzeniem przegląrki Chrome MetaMask",button:"Połącz z MetaMask"},connect_ledger:{description:"Połącz za pomocą ",link_text:"Sprzętowego portfela Ledger",link_title:"Kup portfel sprzętowy Ledger",button:"Połącz z Ledger"},connect_trezor:{description:"Połącz i podpisuj za pomocą ",link_text:"Portfel sprzętowy Trezor ",link_title:"Kup portfel Trezor ",button:"Połącz z Trezor "},connect_walletconnect:"Podłącz i podpisz za pomocą WalletConnect-wspierającego portfela mobilnego.",coming_soon:"Dostępne wkrótce."},account:{tab_balances:"Saldo",tab_transactions:"Transakcje",tab_interactions:"Interakcje",tab_uniquetokens:"Unikalne Tokeny",tab_balances_tooltip:"Stany kont Ethereum i tokenów",tab_transactions_tooltip:"Transakcje i transfery tokenów",tab_interactions_tooltip:"Interakcje z smart contractem",tab_uniquetokens_tooltip:"Unikalne tokeny",label_asset:"Aktywa",label_quantity:"Ilość",label_price:"Cena",label_24h:"24h",label_status:"Status",label_total:"Podsumowanie",show:"Pokaż",hide:"Schowaj",token:"token",tokens:"tokeny",no_market_value:"bez wartości rynkowej",low_market_value:"z niewielką wartością rynkową",tx_hash:"Hash transakcji",tx_timestamp:"Znacznik czasu",tx_fee:"Opłata",tx_to:"To",tx_from:"Od",tx_self:"Własna",tx_sent:"Wysłano",tx_received:"Odebrano",tx_failed:"Niepowodzenie",tx_pending:"W trakcie",show_all:"Pokaż wszystkie",show_less:"Pokaż mniej",unknown_token:"Unikalny token"},button:{connect_walletconnect:"Użyj WalletConnect",exchange:"Wymiana",send:"Wyślij",donate:"Donacja ETH",receive:"Odbierz",close:"Zamknij",confirm:"Potwierdź",cancel:"Anuluj",go_back:"Wstecz",send_another:"Wyślij kolejną",exchange_again:"Wymień ponownie",notify_me:"Powiadom mnie",try_again:"Spróbuj ponownie",learn_more:"Dowiedz się więcej",view:"Zobacz"},input:{recipient_address:"Adres odbiorcy",private_key:"Prywatny klucz",donation_address:"Adres Balance Manager",asset_amount:"Ilość",email:"Email",password:"Hasło",input_text:"Wprowadź",email_placeholder:"your@email.com",password_placeholder:"••••••••••",input_placeholder:"Wpisz tutaj"},modal:{receive_title:"Odbierz do{{walletName}}",exchange_title:"Wymień z {{walletName}}",donate_title:"Wyślij z {{walletName}} do Balance Manager",send_title:"Wyślij z {{walletName}}",approve_tx:"Zatwierdź transakcję {{walletType}}",confirm_tx:"Zatwierdź  transakcję z {{walletName}}",invalid_address:"Nieprawdiłowy adres",send_max:"Wyślij wszystko",exchange_max:"Wymień wszystko",default_wallet:" Portfel",gas_slow:"Powolnie",gas_average:"Średnio",gas_fast:"Szybko",gas_fee:"Opłata",tx_confirm_sender:"Nadawca",tx_confirm_recipient:"Odbiorca",tx_confirm_amount:"Ilość",tx_confirm_fee:"Opłata transakcyjna",tx_hash:"Hash transakcji",tx_verify:"Zweryfikuj swoją transakcję tutaj",deposit_dropdown_label:"Wymień moje",withdrawal_dropdown_label:"Na",deposit_input_label:"Płać",withdrawal_input_label:"Otrzymaj",tx_fee:"Opłata transakcyjna",exchange_fee:"Opłata wymiany",previous_short:"poprzednie.",new:"Nowa",helper_balance:"Saldo",helper_value:"Wartość",helper_rate:"Rata",helper_price:"Cena",helper_min:"Min",helper_max:"Max"},message:{web3_not_available:"Proszę zainstalować rozszerzenie Chrome MetaMask",web3_not_unlocked:"Proszę odblokować swój portfel MetaMask",web3_unknown_network:"Nieznana sieć, prosze zmień na inną",page_not_found:"404 Nie znaleziono",coming_soon:"Wkrótce ...",click_to_copy_to_clipboard:"Skopiuj do schowka",failed_request:"Nieudane zapytanie, spróbuj ponownie",failed_ledger_connection:"Nieudane połączenie z Ledger, sprawdź urządzenie",failed_trezor_connection:"Nieudane połączenie z Trezor, sprawdź urządzenie",failed_trezor_popup_blocked:"Włącz pop-up aby używać Trezora z Balance",no_transactions:"Nie znaleziono transakcji dla tego konta",no_unique_tokens:"Brak unikatowych tokenów",no_interactions:"Brak transakcji dla tego konta",please_connect_ledger:"Proszę wybierz i podłącz Ledger a następnie wybierz Ethereum",please_connect_trezor:"Połącz Trezora i podążaj za instrukcjami",opensea_footer:" to rynek unikalnych tokenów. Ich wartość wynika z handlu na rynku. Możesz zastawić swój token aby otrzymać pieniądze. Wszystko działa na sieci Ethereum ",opensea_header:"Jak to działa od środka?",power_by:"Napędzane przez",exchange_not_available:"Wymiana nie jest dostępna w twojej lokalizacji",learn_more:"Dowiedz się więcej"},notification:{error:{no_accounts_found:"Nie znaleziono kont Ethereum",invalid_address:"Adres nieprawidłowy, sprawdź ponownie",insufficient_balance:"Niewystarczające saldo na tym koncie",insufficient_for_fees:"Niewystarczające saldo na pokrycie opłaty transakcyjnej",invalid_address_scanned:"Zeskanowany adres nieprawdiłowy, spróbuj ponownie",invalid_private_key_scanned:"Nieprawidłowy klucz prywatny zeskanowany, spróbuj ponownie",failed_scanning_qr_code:"Nieudana próba skanu QR, spróbuj jeszcze raz",failed_get_gas_prices:"Nie można było pobrać opłat transakcyjnych ethereum (Gas)",failed_get_tx_fee:"Nieduana estymacja opłat transakcyjnych",failed_get_account_tx:"Nieudane pobranie transakcji",generic_error:"Coś się popsuło, spróbuj ponownie"},info:{address_copied_to_clipboard:"Adres skopiowany do schowka"}},warning:{user_is_offline:"Połączenie zerwane, sprawdź swoją sieć",user_is_online:"Połączony! Jesteś online"},subscribe_form:{email_already_subscribed:"Adres już zapisany",too_many_signup_request:"Za dużo zapytań, sprawdź póżniej",successful:"Sprawdź swój email",sending:"Wysyłam...",generic_error:"Ups, coś się popsuło"},time:{ms:"ms",milisecond:"milisekunda",miliseconds:"milisekund",s:"s",sec:"sekunda",secs:"sekund",second:"second",seconds:"sekundy",min:"m",mins:"minut",minute:"minuta",minutes:"minuty",hr:"hr",hrs:"hrs",hour:"godzina",hours:"godziny",day:"dzień",days:"dni",now:"Teraz"}}}},function(t,e,r){"use strict";var n=r(9),i=r(63),o=r(143),a=r(45);function s(t){var e=new o(t),r=i(o.prototype.request,e);return n.extend(r,o.prototype,e),n.extend(r,e),r}var u=s(a);u.Axios=o,u.create=function(t){return s(n.merge(a,t))},u.Cancel=r(67),u.CancelToken=r(157),u.isCancel=r(66),u.all=function(t){return Promise.all(t)},u.spread=r(158),t.exports=u,t.exports.default=u},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)} + */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",l=1,d=2,p=4,m=1,v=2,g=1,y=2,b=4,_=8,w=16,M=32,x=64,S=128,k=256,A=512,E=30,T="...",C=800,P=16,O=1,N=2,I=1/0,R=9007199254740991,j=1.7976931348623157e308,B=NaN,L=4294967295,U=L-1,F=L>>>1,D=[["ary",S],["bind",g],["bindKey",y],["curry",_],["curryRight",w],["flip",A],["partial",M],["partialRight",x],["rearg",k]],q="[object Arguments]",z="[object Array]",H="[object AsyncFunction]",G="[object Boolean]",W="[object Date]",V="[object DOMException]",K="[object Error]",Z="[object Function]",X="[object GeneratorFunction]",$="[object Map]",Y="[object Number]",J="[object Null]",Q="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ut="[object ArrayBuffer]",ct="[object DataView]",ft="[object Float32Array]",ht="[object Float64Array]",lt="[object Int8Array]",dt="[object Int16Array]",pt="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\b__p \+= '';/g,_t=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,St=RegExp(Mt.source),kt=RegExp(xt.source),At=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,Tt=/<%=([\s\S]+?)%>/g,Ct=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pt=/^\w*$/,Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nt=/[\\^$.*+?()[\]{}|]/g,It=RegExp(Nt.source),Rt=/^\s+|\s+$/g,jt=/^\s+/,Bt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ut=/\{\n\/\* \[wrapped with (.+)\] \*/,Ft=/,? & /,Dt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qt=/\\(\\)?/g,zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ht=/\w*$/,Gt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Vt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Zt=/^(?:0|[1-9]\d*)$/,Xt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$t=/($^)/,Yt=/['\n\r\u2028\u2029\\]/g,Jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Qt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Qt+"]",ne="["+Jt+"]",re="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+Qt+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ue="[^\\ud800-\\udfff]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",fe="[\\ud800-\\udbff][\\udc00-\\udfff]",he="[A-Z\\xc0-\\xd6\\xd8-\\xde]",le="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",pe="(?:"+ne+"|"+se+")"+"?",me="[\\ufe0e\\ufe0f]?"+pe+("(?:\\u200d(?:"+[ue,ce,fe].join("|")+")[\\ufe0e\\ufe0f]?"+pe+")*"),ve="(?:"+[ie,ce,fe].join("|")+")"+me,ge="(?:"+[ue+ne+"?",ne,ce,fe,te].join("|")+")",ye=RegExp("['’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),we=RegExp([he+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+le,"$"].join("|")+")",he+"?"+le+"+(?:['’](?:d|ll|m|re|s|t|ve))?",he+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,ve].join("|"),"g"),Me=RegExp("[\\u200d\\ud800-\\udfff"+Jt+"\\ufe0e\\ufe0f]"),xe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Se=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ke=-1,Ae={};Ae[ft]=Ae[ht]=Ae[lt]=Ae[dt]=Ae[pt]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[z]=Ae[ut]=Ae[G]=Ae[ct]=Ae[W]=Ae[K]=Ae[Z]=Ae[$]=Ae[Y]=Ae[Q]=Ae[et]=Ae[nt]=Ae[rt]=Ae[at]=!1;var Ee={};Ee[q]=Ee[z]=Ee[ut]=Ee[ct]=Ee[G]=Ee[W]=Ee[ft]=Ee[ht]=Ee[lt]=Ee[dt]=Ee[pt]=Ee[$]=Ee[Y]=Ee[Q]=Ee[et]=Ee[nt]=Ee[rt]=Ee[it]=Ee[mt]=Ee[vt]=Ee[gt]=Ee[yt]=!0,Ee[K]=Ee[Z]=Ee[at]=!1;var Te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ce=parseFloat,Pe=parseInt,Oe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Ie=Oe||Ne||Function("return this")(),Re="object"==typeof e&&e&&!e.nodeType&&e,je=Re&&"object"==typeof r&&r&&!r.nodeType&&r,Be=je&&je.exports===Re,Le=Be&&Oe.process,Ue=function(){try{var t=je&&je.require&&je.require("util").types;return t||Le&&Le.binding&&Le.binding("util")}catch(t){}}(),Fe=Ue&&Ue.isArrayBuffer,De=Ue&&Ue.isDate,qe=Ue&&Ue.isMap,ze=Ue&&Ue.isRegExp,He=Ue&&Ue.isSet,Ge=Ue&&Ue.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ve(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Je(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function wn(t,e){for(var n=t.length;n--&&un(e,t[n],0)>-1;);return n}var Mn=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),xn=dn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Sn(t){return"\\"+Te[t]}function kn(t){return Me.test(t)}function An(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function En(t,e){return function(n){return t(e(n))}}function Tn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"});var jn=function t(e){var n=(e=null==e?Ie:jn.defaults(Ie.Object(),e,jn.pick(Ie,Se))).Array,r=e.Date,i=e.Error,Jt=e.Function,Qt=e.Math,te=e.Object,ee=e.RegExp,ne=e.String,re=e.TypeError,ie=n.prototype,oe=Jt.prototype,ae=te.prototype,se=e["__core-js_shared__"],ue=oe.toString,ce=ae.hasOwnProperty,fe=0,he=function(){var t=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),le=ae.toString,de=ue.call(te),pe=Ie._,me=ee("^"+ue.call(ce).replace(Nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ve=Be?e.Buffer:o,ge=e.Symbol,_e=e.Uint8Array,Me=ve?ve.allocUnsafe:o,Te=En(te.getPrototypeOf,te),Oe=te.create,Ne=ae.propertyIsEnumerable,Re=ie.splice,je=ge?ge.isConcatSpreadable:o,Le=ge?ge.iterator:o,Ue=ge?ge.toStringTag:o,on=function(){try{var t=Fo(te,"defineProperty");return t({},"",{}),t}catch(t){}}(),dn=e.clearTimeout!==Ie.clearTimeout&&e.clearTimeout,Bn=r&&r.now!==Ie.Date.now&&r.now,Ln=e.setTimeout!==Ie.setTimeout&&e.setTimeout,Un=Qt.ceil,Fn=Qt.floor,Dn=te.getOwnPropertySymbols,qn=ve?ve.isBuffer:o,zn=e.isFinite,Hn=ie.join,Gn=En(te.keys,te),Wn=Qt.max,Vn=Qt.min,Kn=r.now,Zn=e.parseInt,Xn=Qt.random,$n=ie.reverse,Yn=Fo(e,"DataView"),Jn=Fo(e,"Map"),Qn=Fo(e,"Promise"),tr=Fo(e,"Set"),er=Fo(e,"WeakMap"),nr=Fo(te,"create"),rr=er&&new er,ir={},or=fa(Yn),ar=fa(Jn),sr=fa(Qn),ur=fa(tr),cr=fa(er),fr=ge?ge.prototype:o,hr=fr?fr.valueOf:o,lr=fr?fr.toString:o;function dr(t){if(Es(t)&&!vs(t)&&!(t instanceof gr)){if(t instanceof vr)return t;if(ce.call(t,"__wrapped__"))return ha(t)}return new vr(t)}var pr=function(){function t(){}return function(e){if(!As(e))return{};if(Oe)return Oe(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function mr(){}function vr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function gr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=L,this.__views__=[]}function yr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function jr(t,e,n,r,i,a){var s,u=e&l,c=e&d,f=e&p;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=vs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ce.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return no(t,s)}else{var m=zo(t),v=m==Z||m==X;if(_s(t))return $i(t,u);if(m==Q||m==q||v&&!i){if(s=c||v?{}:Go(t),!u)return c?function(t,e){return ro(t,qo(t),e)}(t,function(t,e){return t&&ro(e,iu(e),t)}(s,t)):function(t,e){return ro(t,Do(t),e)}(t,Or(s,t))}else{if(!Ee[m])return i?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case ut:return Yi(t);case G:case W:return new r(+t);case ct:return function(t,e){var n=e?Yi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case ft:case ht:case lt:case dt:case pt:case mt:case vt:case gt:case yt:return Ji(t,n);case $:return new r;case Y:case rt:return new r(t);case et:return function(t){var e=new t.constructor(t.source,Ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case nt:return new r;case it:return function(t){return hr?te(hr.call(t)):{}}(t)}}(t,m,u)}}a||(a=new Mr);var g=a.get(t);if(g)return g;if(a.set(t,s),Ns(t))return t.forEach(function(r){s.add(jr(r,e,n,r,t,a))}),s;if(Ts(t))return t.forEach(function(r,i){s.set(i,jr(r,e,n,i,t,a))}),s;var y=h?o:(f?c?No:Oo:c?iu:ru)(t);return Ke(y||t,function(r,i){y&&(r=t[i=r]),Tr(s,i,jr(r,e,n,i,t,a))}),s}function Br(t,e,n){var r=n.length;if(null==t)return!r;for(t=te(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Lr(t,e,n){if("function"!=typeof t)throw new re(u);return ra(function(){t.apply(o,n)},e)}function Ur(t,e,n,r){var i=-1,o=Ye,s=!0,u=t.length,c=[],f=e.length;if(!u)return c;n&&(e=Qe(e,gn(n))),r?(o=Je,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i-1},br.prototype.set=function(t,e){var n=this.__data__,r=Cr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},_r.prototype.clear=function(){this.size=0,this.__data__={hash:new yr,map:new(Jn||br),string:new yr}},_r.prototype.delete=function(t){var e=Lo(this,t).delete(t);return this.size-=e?1:0,e},_r.prototype.get=function(t){return Lo(this,t).get(t)},_r.prototype.has=function(t){return Lo(this,t).has(t)},_r.prototype.set=function(t,e){var n=Lo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,c),this},wr.prototype.has=function(t){return this.__data__.has(t)},Mr.prototype.clear=function(){this.__data__=new br,this.size=0},Mr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Mr.prototype.get=function(t){return this.__data__.get(t)},Mr.prototype.has=function(t){return this.__data__.has(t)},Mr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof br){var r=n.__data__;if(!Jn||r.length0&&n(s)?e>1?Gr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Wr=so(),Vr=so(!0);function Kr(t,e){return t&&Wr(t,e,ru)}function Zr(t,e){return t&&Vr(t,e,ru)}function Xr(t,e){return $e(e,function(e){return xs(t[e])})}function $r(t,e){for(var n=0,r=(e=Vi(e,t)).length;null!=t&&ne}function ti(t,e){return null!=t&&ce.call(t,e)}function ei(t,e){return null!=t&&e in te(t)}function ni(t,e,r){for(var i=r?Je:Ye,a=t[0].length,s=t.length,u=s,c=n(s),f=1/0,h=[];u--;){var l=t[u];u&&e&&(l=Qe(l,gn(e))),f=Vn(l.length,f),c[u]=!r&&(e||a>=120&&l.length>=120)?new wr(u&&l):o}l=t[0];var d=-1,p=c[0];t:for(;++d=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)})}function yi(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)s!==t&&Re.call(s,u,1),Re.call(t,u,1);return t}function _i(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Vo(i)?Re.call(t,i,1):Ui(t,i)}}return t}function wi(t,e){return t+Fn(Xn()*(e-t+1))}function Mi(t,e){var n="";if(!t||e<1||e>R)return n;do{e%2&&(n+=t),(e=Fn(e/2))&&(t+=t)}while(e);return n}function xi(t,e){return ia(ta(t,e,Cu),t+"")}function Si(t){return Sr(lu(t))}function ki(t,e){var n=lu(t);return sa(n,Rr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=Vi(e,t)).length,s=a-1,u=t;null!=u&&++io?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=n(o);++i>>1,a=t[o];null!==a&&!Rs(a)&&(n?a<=e:a=a){var f=e?null:xo(t);if(f)return Pn(f);s=!1,i=bn,c=new wr}else c=e?[]:u;t:for(;++r=r?t:Pi(t,e,n)}var Xi=dn||function(t){return Ie.clearTimeout(t)};function $i(t,e){if(e)return t.slice();var n=t.length,r=Me?Me(n):new t.constructor(n);return t.copy(r),r}function Yi(t){var e=new t.constructor(t.byteLength);return new _e(e).set(new _e(t)),e}function Ji(t,e){var n=e?Yi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Qi(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Rs(t),s=e!==o,u=null===e,c=e==e,f=Rs(e);if(!u&&!f&&!a&&t>e||a&&s&&c&&!u&&!f||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!f&&t1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Ko(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=te(e);++r-1?i[a?e[s]:s]:o}}function lo(t){return Po(function(e){var n=e.length,r=n,i=vr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new re(u);if(i&&!s&&"wrapper"==Ro(a))var s=new vr([],!0)}for(r=s?r:n;++r1&&_.reverse(),l&&fu))return!1;var f=a.get(t);if(f&&a.get(e))return f==e;var h=-1,l=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Lt,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ke(D,function(n){var r="_."+n[0];e&n[1]&&!Ye(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ut);return e?e[1].split(Ft):[]}(r),n)))}function aa(t){var e=0,n=0;return function(){var r=Kn(),i=P-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function sa(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n1?t[e-1]:o;return Oa(t,n="function"==typeof n?(t.pop(),n):o)});function Ua(t){var e=dr(t);return e.__chain__=!0,e}function Fa(t,e){return e(t)}var Da=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof gr&&Vo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Fa,args:[i],thisArg:o}),new vr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var qa=io(function(t,e,n){ce.call(t,n)?++t[n]:Nr(t,n,1)});var za=ho(ma),Ha=ho(va);function Ga(t,e){return(vs(t)?Ke:Fr)(t,Bo(e,3))}function Wa(t,e){return(vs(t)?Ze:Dr)(t,Bo(e,3))}var Va=io(function(t,e,n){ce.call(t,n)?t[n].push(e):Nr(t,n,[e])});var Ka=xi(function(t,e,r){var i=-1,o="function"==typeof e,a=ys(t)?n(t.length):[];return Fr(t,function(t){a[++i]=o?We(e,t,r):ri(t,e,r)}),a}),Za=io(function(t,e,n){Nr(t,n,e)});function Xa(t,e){return(vs(t)?Qe:li)(t,Bo(e,3))}var $a=io(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Ya=xi(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Ko(t,e[0],e[1])?e=[]:n>2&&Ko(e[0],e[1],e[2])&&(e=[e[0]]),gi(t,Gr(e,1),[])}),Ja=Bn||function(){return Ie.Date.now()};function Qa(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,ko(t,S,o,o,o,o,e)}function ts(t,e){var n;if("function"!=typeof e)throw new re(u);return t=Ds(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var es=xi(function(t,e,n){var r=g;if(n.length){var i=Tn(n,jo(es));r|=M}return ko(t,r,e,n,i)}),ns=xi(function(t,e,n){var r=g|y;if(n.length){var i=Tn(n,jo(ns));r|=M}return ko(e,r,t,n,i)});function rs(t,e,n){var r,i,a,s,c,f,h=0,l=!1,d=!1,p=!0;if("function"!=typeof t)throw new re(u);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-f;return f===o||n>=e||n<0||d&&t-h>=a}function g(){var t=Ja();if(v(t))return y(t);c=ra(g,function(t){var n=e-(t-f);return d?Vn(n,a-(t-h)):n}(t))}function y(t){return c=o,p&&r?m(t):(r=i=o,s)}function b(){var t=Ja(),n=v(t);if(r=arguments,i=this,f=t,n){if(c===o)return function(t){return h=t,c=ra(g,e),l?m(t):s}(f);if(d)return c=ra(g,e),m(f)}return c===o&&(c=ra(g,e)),s}return e=zs(e)||0,As(n)&&(l=!!n.leading,a=(d="maxWait"in n)?Wn(zs(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==o&&Xi(c),h=0,r=f=i=c=o},b.flush=function(){return c===o?s:y(Ja())},b}var is=xi(function(t,e){return Lr(t,1,e)}),os=xi(function(t,e,n){return Lr(t,zs(e)||0,n)});function as(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new re(u);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(as.Cache||_r),n}function ss(t){if("function"!=typeof t)throw new re(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}as.Cache=_r;var us=Ki(function(t,e){var n=(e=1==e.length&&vs(e[0])?Qe(e[0],gn(Bo())):Qe(Gr(e,1),gn(Bo()))).length;return xi(function(r){for(var i=-1,o=Vn(r.length,n);++i=e}),ms=ii(function(){return arguments}())?ii:function(t){return Es(t)&&ce.call(t,"callee")&&!Ne.call(t,"callee")},vs=n.isArray,gs=Fe?gn(Fe):function(t){return Es(t)&&Jr(t)==ut};function ys(t){return null!=t&&ks(t.length)&&!xs(t)}function bs(t){return Es(t)&&ys(t)}var _s=qn||zu,ws=De?gn(De):function(t){return Es(t)&&Jr(t)==W};function Ms(t){if(!Es(t))return!1;var e=Jr(t);return e==K||e==V||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function xs(t){if(!As(t))return!1;var e=Jr(t);return e==Z||e==X||e==H||e==tt}function Ss(t){return"number"==typeof t&&t==Ds(t)}function ks(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=R}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Es(t){return null!=t&&"object"==typeof t}var Ts=qe?gn(qe):function(t){return Es(t)&&zo(t)==$};function Cs(t){return"number"==typeof t||Es(t)&&Jr(t)==Y}function Ps(t){if(!Es(t)||Jr(t)!=Q)return!1;var e=Te(t);if(null===e)return!0;var n=ce.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==de}var Os=ze?gn(ze):function(t){return Es(t)&&Jr(t)==et};var Ns=He?gn(He):function(t){return Es(t)&&zo(t)==nt};function Is(t){return"string"==typeof t||!vs(t)&&Es(t)&&Jr(t)==rt}function Rs(t){return"symbol"==typeof t||Es(t)&&Jr(t)==it}var js=Ge?gn(Ge):function(t){return Es(t)&&ks(t.length)&&!!Ae[Jr(t)]};var Bs=_o(hi),Ls=_o(function(t,e){return t<=e});function Us(t){if(!t)return[];if(ys(t))return Is(t)?In(t):no(t);if(Le&&t[Le])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Le]());var e=zo(t);return(e==$?An:e==nt?Pn:lu)(t)}function Fs(t){return t?(t=zs(t))===I||t===-I?(t<0?-1:1)*j:t==t?t:0:0===t?t:0}function Ds(t){var e=Fs(t),n=e%1;return e==e?n?e-n:e:0}function qs(t){return t?Rr(Ds(t),0,L):0}function zs(t){if("number"==typeof t)return t;if(Rs(t))return B;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Rt,"");var n=Wt.test(t);return n||Kt.test(t)?Pe(t.slice(2),n?2:8):Gt.test(t)?B:+t}function Hs(t){return ro(t,iu(t))}function Gs(t){return null==t?"":Bi(t)}var Ws=oo(function(t,e){if(Yo(e)||ys(e))ro(e,ru(e),t);else for(var n in e)ce.call(e,n)&&Tr(t,n,e[n])}),Vs=oo(function(t,e){ro(e,iu(e),t)}),Ks=oo(function(t,e,n,r){ro(e,iu(e),t,r)}),Zs=oo(function(t,e,n,r){ro(e,ru(e),t,r)}),Xs=Po(Ir);var $s=xi(function(t,e){t=te(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Ko(e[0],e[1],i)&&(r=1);++n1),e}),ro(t,No(t),n),r&&(n=jr(n,l|d|p,To));for(var i=e.length;i--;)Ui(n,e[i]);return n});var uu=Po(function(t,e){return null==t?{}:function(t,e){return yi(t,e,function(e,n){return Qs(t,n)})}(t,e)});function cu(t,e){if(null==t)return{};var n=Qe(No(t),function(t){return[t]});return e=Bo(e),yi(t,n,function(t,n){return e(t,n[0])})}var fu=So(ru),hu=So(iu);function lu(t){return null==t?[]:yn(t,ru(t))}var du=co(function(t,e,n){return e=e.toLowerCase(),t+(n?pu(e):e)});function pu(t){return Mu(Gs(t).toLowerCase())}function mu(t){return(t=Gs(t))&&t.replace(Xt,Mn).replace(be,"")}var vu=co(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),gu=co(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),yu=uo("toLowerCase");var bu=co(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var _u=co(function(t,e,n){return t+(n?" ":"")+Mu(e)});var wu=co(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Mu=uo("toUpperCase");function xu(t,e,n){return t=Gs(t),(e=n?o:e)===o?function(t){return xe.test(t)}(t)?function(t){return t.match(we)||[]}(t):function(t){return t.match(Dt)||[]}(t):t.match(e)||[]}var Su=xi(function(t,e){try{return We(t,o,e)}catch(t){return Ms(t)?t:new i(t)}}),ku=Po(function(t,e){return Ke(e,function(e){e=ca(e),Nr(t,e,es(t[e],t))}),t});function Au(t){return function(){return t}}var Eu=lo(),Tu=lo(!0);function Cu(t){return t}function Pu(t){return ui("function"==typeof t?t:jr(t,l))}var Ou=xi(function(t,e){return function(n){return ri(n,t,e)}}),Nu=xi(function(t,e){return function(n){return ri(t,n,e)}});function Iu(t,e,n){var r=ru(e),i=Xr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Xr(e,ru(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=xs(t);return Ke(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=no(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Ru(){}var ju=go(Qe),Bu=go(Xe),Lu=go(rn);function Uu(t){return Zo(t)?ln(ca(t)):function(t){return function(e){return $r(e,t)}}(t)}var Fu=bo(),Du=bo(!0);function qu(){return[]}function zu(){return!1}var Hu=vo(function(t,e){return t+e},0),Gu=Mo("ceil"),Wu=vo(function(t,e){return t/e},1),Vu=Mo("floor");var Ku=vo(function(t,e){return t*e},1),Zu=Mo("round"),Xu=vo(function(t,e){return t-e},0);return dr.after=function(t,e){if("function"!=typeof e)throw new re(u);return t=Ds(t),function(){if(--t<1)return e.apply(this,arguments)}},dr.ary=Qa,dr.assign=Ws,dr.assignIn=Vs,dr.assignInWith=Ks,dr.assignWith=Zs,dr.at=Xs,dr.before=ts,dr.bind=es,dr.bindAll=ku,dr.bindKey=ns,dr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return vs(t)?t:[t]},dr.chain=Ua,dr.chunk=function(t,e,r){e=(r?Ko(t,e,r):e===o)?1:Wn(Ds(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=n(Un(i/e));ai?0:i+n),(r=r===o||r>i?i:Ds(r))<0&&(r+=i),r=n>r?0:qs(r);n>>0)?(t=Gs(t))&&("string"==typeof e||null!=e&&!Os(e))&&!(e=Bi(e))&&kn(t)?Zi(In(t),0,n):t.split(e,n):[]},dr.spread=function(t,e){if("function"!=typeof t)throw new re(u);return e=null==e?0:Wn(Ds(e),0),xi(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},dr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},dr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:Ds(e))<0?0:e):[]},dr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:Ds(e)))<0?0:e,r):[]},dr.takeRightWhile=function(t,e){return t&&t.length?Di(t,Bo(e,3),!1,!0):[]},dr.takeWhile=function(t,e){return t&&t.length?Di(t,Bo(e,3)):[]},dr.tap=function(t,e){return e(t),t},dr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new re(u);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),rs(t,e,{leading:r,maxWait:e,trailing:i})},dr.thru=Fa,dr.toArray=Us,dr.toPairs=fu,dr.toPairsIn=hu,dr.toPath=function(t){return vs(t)?Qe(t,ca):Rs(t)?[t]:no(ua(Gs(t)))},dr.toPlainObject=Hs,dr.transform=function(t,e,n){var r=vs(t),i=r||_s(t)||js(t);if(e=Bo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&xs(o)?pr(Te(t)):{}}return(i?Ke:Kr)(t,function(t,r,i){return e(n,t,r,i)}),n},dr.unary=function(t){return Qa(t,1)},dr.union=Ea,dr.unionBy=Ta,dr.unionWith=Ca,dr.uniq=function(t){return t&&t.length?Li(t):[]},dr.uniqBy=function(t,e){return t&&t.length?Li(t,Bo(e,2)):[]},dr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Li(t,o,e):[]},dr.unset=function(t,e){return null==t||Ui(t,e)},dr.unzip=Pa,dr.unzipWith=Oa,dr.update=function(t,e,n){return null==t?t:Fi(t,e,Wi(n))},dr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Fi(t,e,Wi(n),r)},dr.values=lu,dr.valuesIn=function(t){return null==t?[]:yn(t,iu(t))},dr.without=Na,dr.words=xu,dr.wrap=function(t,e){return cs(Wi(e),t)},dr.xor=Ia,dr.xorBy=Ra,dr.xorWith=ja,dr.zip=Ba,dr.zipObject=function(t,e){return Hi(t||[],e||[],Tr)},dr.zipObjectDeep=function(t,e){return Hi(t||[],e||[],Ai)},dr.zipWith=La,dr.entries=fu,dr.entriesIn=hu,dr.extend=Vs,dr.extendWith=Ks,Iu(dr,dr),dr.add=Hu,dr.attempt=Su,dr.camelCase=du,dr.capitalize=pu,dr.ceil=Gu,dr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=zs(n))==n?n:0),e!==o&&(e=(e=zs(e))==e?e:0),Rr(zs(t),e,n)},dr.clone=function(t){return jr(t,p)},dr.cloneDeep=function(t){return jr(t,l|p)},dr.cloneDeepWith=function(t,e){return jr(t,l|p,e="function"==typeof e?e:o)},dr.cloneWith=function(t,e){return jr(t,p,e="function"==typeof e?e:o)},dr.conformsTo=function(t,e){return null==e||Br(t,e,ru(e))},dr.deburr=mu,dr.defaultTo=function(t,e){return null==t||t!=t?e:t},dr.divide=Wu,dr.endsWith=function(t,e,n){t=Gs(t),e=Bi(e);var r=t.length,i=n=n===o?r:Rr(Ds(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},dr.eq=ls,dr.escape=function(t){return(t=Gs(t))&&kt.test(t)?t.replace(xt,xn):t},dr.escapeRegExp=function(t){return(t=Gs(t))&&It.test(t)?t.replace(Nt,"\\$&"):t},dr.every=function(t,e,n){var r=vs(t)?Xe:qr;return n&&Ko(t,e,n)&&(e=o),r(t,Bo(e,3))},dr.find=za,dr.findIndex=ma,dr.findKey=function(t,e){return an(t,Bo(e,3),Kr)},dr.findLast=Ha,dr.findLastIndex=va,dr.findLastKey=function(t,e){return an(t,Bo(e,3),Zr)},dr.floor=Vu,dr.forEach=Ga,dr.forEachRight=Wa,dr.forIn=function(t,e){return null==t?t:Wr(t,Bo(e,3),iu)},dr.forInRight=function(t,e){return null==t?t:Vr(t,Bo(e,3),iu)},dr.forOwn=function(t,e){return t&&Kr(t,Bo(e,3))},dr.forOwnRight=function(t,e){return t&&Zr(t,Bo(e,3))},dr.get=Js,dr.gt=ds,dr.gte=ps,dr.has=function(t,e){return null!=t&&Ho(t,e,ti)},dr.hasIn=Qs,dr.head=ya,dr.identity=Cu,dr.includes=function(t,e,n,r){t=ys(t)?t:lu(t),n=n&&!r?Ds(n):0;var i=t.length;return n<0&&(n=Wn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&un(t,e,n)>-1},dr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Ds(n);return i<0&&(i=Wn(r+i,0)),un(t,e,i)},dr.inRange=function(t,e,n){return e=Fs(e),n===o?(n=e,e=0):n=Fs(n),function(t,e,n){return t>=Vn(e,n)&&t=-R&&t<=R},dr.isSet=Ns,dr.isString=Is,dr.isSymbol=Rs,dr.isTypedArray=js,dr.isUndefined=function(t){return t===o},dr.isWeakMap=function(t){return Es(t)&&zo(t)==at},dr.isWeakSet=function(t){return Es(t)&&Jr(t)==st},dr.join=function(t,e){return null==t?"":Hn.call(t,e)},dr.kebabCase=vu,dr.last=Ma,dr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Ds(n))<0?Wn(r+i,0):Vn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,fn,i,!0)},dr.lowerCase=gu,dr.lowerFirst=yu,dr.lt=Bs,dr.lte=Ls,dr.max=function(t){return t&&t.length?zr(t,Cu,Qr):o},dr.maxBy=function(t,e){return t&&t.length?zr(t,Bo(e,2),Qr):o},dr.mean=function(t){return hn(t,Cu)},dr.meanBy=function(t,e){return hn(t,Bo(e,2))},dr.min=function(t){return t&&t.length?zr(t,Cu,hi):o},dr.minBy=function(t,e){return t&&t.length?zr(t,Bo(e,2),hi):o},dr.stubArray=qu,dr.stubFalse=zu,dr.stubObject=function(){return{}},dr.stubString=function(){return""},dr.stubTrue=function(){return!0},dr.multiply=Ku,dr.nth=function(t,e){return t&&t.length?vi(t,Ds(e)):o},dr.noConflict=function(){return Ie._===this&&(Ie._=pe),this},dr.noop=Ru,dr.now=Ja,dr.pad=function(t,e,n){t=Gs(t);var r=(e=Ds(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return yo(Fn(i),n)+t+yo(Un(i),n)},dr.padEnd=function(t,e,n){t=Gs(t);var r=(e=Ds(e))?Nn(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Xn();return Vn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},dr.reduce=function(t,e,n){var r=vs(t)?en:pn,i=arguments.length<3;return r(t,Bo(e,4),n,i,Fr)},dr.reduceRight=function(t,e,n){var r=vs(t)?nn:pn,i=arguments.length<3;return r(t,Bo(e,4),n,i,Dr)},dr.repeat=function(t,e,n){return e=(n?Ko(t,e,n):e===o)?1:Ds(e),Mi(Gs(t),e)},dr.replace=function(){var t=arguments,e=Gs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},dr.result=function(t,e,n){var r=-1,i=(e=Vi(e,t)).length;for(i||(i=1,t=o);++rR)return[];var n=L,r=Vn(t,L);e=Bo(e),t-=L;for(var i=vn(r,e);++n=a)return t;var u=n-Nn(r);if(u<1)return r;var c=s?Zi(s,0,u).join(""):t.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),Os(i)){if(t.slice(u).search(i)){var f,h=c;for(i.global||(i=ee(i.source,Gs(Ht.exec(i))+"g")),i.lastIndex=0;f=i.exec(h);)var l=f.index;c=c.slice(0,l===o?u:l)}}else if(t.indexOf(Bi(i),u)!=u){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},dr.unescape=function(t){return(t=Gs(t))&&St.test(t)?t.replace(Mt,Rn):t},dr.uniqueId=function(t){var e=++fe;return Gs(t)+e},dr.upperCase=wu,dr.upperFirst=Mu,dr.each=Ga,dr.eachRight=Wa,dr.first=ya,Iu(dr,function(){var t={};return Kr(dr,function(e,n){ce.call(dr.prototype,n)||(t[n]=e)}),t}(),{chain:!1}),dr.VERSION="4.17.10",Ke(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){dr[t].placeholder=dr}),Ke(["drop","take"],function(t,e){gr.prototype[t]=function(n){n=n===o?1:Wn(Ds(n),0);var r=this.__filtered__&&!e?new gr(this):this.clone();return r.__filtered__?r.__takeCount__=Vn(n,r.__takeCount__):r.__views__.push({size:Vn(n,L),type:t+(r.__dir__<0?"Right":"")}),r},gr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ke(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==O||3==n;gr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Bo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Ke(["head","last"],function(t,e){var n="take"+(e?"Right":"");gr.prototype[t]=function(){return this[n](1).value()[0]}}),Ke(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");gr.prototype[t]=function(){return this.__filtered__?new gr(this):this[n](1)}}),gr.prototype.compact=function(){return this.filter(Cu)},gr.prototype.find=function(t){return this.filter(t).head()},gr.prototype.findLast=function(t){return this.reverse().find(t)},gr.prototype.invokeMap=xi(function(t,e){return"function"==typeof t?new gr(this):this.map(function(n){return ri(n,t,e)})}),gr.prototype.reject=function(t){return this.filter(ss(Bo(t)))},gr.prototype.slice=function(t,e){t=Ds(t);var n=this;return n.__filtered__&&(t>0||e<0)?new gr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=Ds(e))<0?n.dropRight(-e):n.take(e-t)),n)},gr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},gr.prototype.toArray=function(){return this.take(L)},Kr(gr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=dr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(dr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof gr,c=s[0],f=u||vs(e),h=function(t){var e=i.apply(dr,tn([t],s));return r&&l?e[0]:e};f&&n&&"function"==typeof c&&1!=c.length&&(u=f=!1);var l=this.__chain__,d=!!this.__actions__.length,p=a&&!l,m=u&&!d;if(!a&&f){e=m?e:new gr(this);var v=t.apply(e,s);return v.__actions__.push({func:Fa,args:[h],thisArg:o}),new vr(v,l)}return p&&m?t.apply(this,s):(v=this.thru(h),p?r?v.value()[0]:v.value():v)})}),Ke(["pop","push","shift","sort","splice","unshift"],function(t){var e=ie[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);dr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(vs(i)?i:[],t)}return this[n](function(n){return e.apply(vs(n)?n:[],t)})}}),Kr(gr.prototype,function(t,e){var n=dr[e];if(n){var r=n.name+"";(ir[r]||(ir[r]=[])).push({name:e,func:n})}}),ir[po(o,y).name]=[{name:"wrapper",func:o}],gr.prototype.clone=function(){var t=new gr(this.__wrapped__);return t.__actions__=no(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=no(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=no(this.__views__),t},gr.prototype.reverse=function(){if(this.__filtered__){var t=new gr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},gr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=vs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},dr.prototype.plant=function(t){for(var e,n=this;n instanceof mr;){var r=ha(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},dr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gr){var e=t;return this.__actions__.length&&(e=new gr(this)),(e=e.reverse()).__actions__.push({func:Fa,args:[Aa],thisArg:o}),new vr(e,this.__chain__)}return this.thru(Aa)},dr.prototype.toJSON=dr.prototype.valueOf=dr.prototype.value=function(){return qi(this.__wrapped__,this.__actions__)},dr.prototype.first=dr.prototype.head,Le&&(dr.prototype[Le]=function(){return this}),dr}();Ie._=jn,(i=function(){return jn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(10),n(40)(t))},function(t){t.exports={translation:{account:{hide:"Ocultar",label_24h:"24h",label_asset:"Ativos",label_price:"Preço",label_quantity:"Quantidade",label_status:"Status",label_total:"Total",low_market_value:"baixo valor de mercado",no_market_value:"sem valor de mercado",show:"Expandir",show_all:"Mostrar tudo",show_less:"Mostrar menos",tab_balances:"Saldos",tab_balances_tooltip:"Ethereum e token saldos",tab_interactions:"Interações",tab_interactions_tooltip:"Interações de Smart Contract",tab_transactions:"Transações",tab_transactions_tooltip:"Transações e transferências de tokens",tab_uniquetokens:"Tokens exclusivos",tab_uniquetokens_tooltip:"Tokens exclusivos",token:"token",tokens:"tokens",tx_failed:"Falhou",tx_fee:"Taxa",tx_from:"De",tx_hash:"Hash de transação",tx_pending:"Pendente",tx_received:"Recebido",tx_self:"Eu",tx_sent:"Enviado",tx_timestamp:"Data/hora",tx_to:"Para",unknown_token:"Token desconhecido"},button:{cancel:"Cancelar",close:"Fechar",confirm:"Confirme",connect_walletconnect:"Use o WalletConnect",donate:"Doe ETH",exchange:"Troca",exchange_again:"Troque novamente",go_back:"Volte",learn_more:"Saiba mais",notify_me:"Receba notificação",receive:"Receber",send:"Enviar",send_another:"Enviar outro",try_again:"Tente novamente",view:"Visualizar"},homepage:{coming_soon:"Em breve.",connect_ledger:{button:"Conecte-se ao Ledger",description:"Conecte-se e assine com seu ",link_text:"Ledger wallet",link_title:"Compre uma carteira de Ledger hardware wallet"},connect_metamask:{button:"Conecte-se ao MetaMask",description:"Conecte-se ao MetaMask Chrome extensão."},connect_trezor:{button:"Conecte-se a Trezor",description:"Conecte-se e assine com seu ",link_text:"Trezor hardware wallet",link_title:"Compre uma carteira de Trezor hardware wallet"},connect_walletconnect:"Ligue e assine com a sua carteira móvel compatível com o WalletConnect."},input:{asset_amount:"Quantidade",donation_address:"Balance Manager endereço",email:"Email",email_placeholder:"seu@email.com",input_placeholder:"Digite aqui",input_text:"Entrada",password:"Senha",password_placeholder:"••••••••••",private_key:"Chave privada",recipient_address:"Endereço do destinatário"},message:{click_to_copy_to_clipboard:"Clique para copiar para a área de transferência",coming_soon:"Em breve...",exchange_not_available:"O Exchange não está disponível na sua área",failed_ledger_connection:"Falha ao conectar-se ao Ledger, verifique seu dispositivo",failed_request:"Falha no pedido, por favor atualize",failed_trezor_connection:"Falha ao conectar-se ao Trezor, verifique seu dispositivo",failed_trezor_popup_blocked:"Por favor, permita que os popups do Balance usem o seu Trezor",learn_more:"Saiba mais",no_interactions:"Nenhuma interação encontrada para esta conta",no_transactions:"Nenhuma transação encontrada para esta conta",no_unique_tokens:"Nenhum token exclusivo encontrado para esta conta",opensea_footer:"é um mercado para tokens exclusivos (ou 'não fungíveis'). As pessoas negociam no espaço de mercado e isso lhes dá valor. Você pode penhorar seus tokens para conseguir dinheiro. Tudo isso é executado no Ethereum.",opensea_header:"Como isso funciona?",page_not_found:"404 Página Não Encontrada",please_connect_ledger:"Por favor, conecte e desbloqueie o Ledger e selecione Ethereum",please_connect_trezor:"Por favor, conecte seu Trezor e siga as instruções",power_by:"Distribuído por",web3_not_available:"Por favor, instale a extensão MetaMask Chrome",web3_not_unlocked:"Por favor, desbloqueie sua carteira MetaMask",web3_unknown_network:"Rede desconhecida, por favor mude para outra"},modal:{approve_tx:"Aprovar transação no {{walletType}}",confirm_tx:"Confirme a transação de {{walletName}}",default_wallet:"Carteira",deposit_dropdown_label:"Trocar meu",deposit_input_label:"Pagamento",donate_title:"Enviar de {{walletName}} para o Gestor de saldo",exchange_fee:"Taxa de troca",exchange_max:"Troca máxima",exchange_title:"Trocar de {{walletName}}",gas_average:"Médio",gas_fast:"Rápido",gas_fee:"Taxa",gas_slow:"Lento",helper_balance:"Balanço",helper_max:"Max",helper_min:"Min",helper_price:"Preço",helper_rate:"Taxa",helper_value:"Valor",invalid_address:"Endereço inválido",new:"Novo",previous_short:"Prev.",receive_title:"Receber para {{walletName}}",send_max:"Enviar max",send_title:"Enviar de {{walletName}}",tx_confirm_amount:"Montante",tx_confirm_fee:"Taxa de transação",tx_confirm_recipient:"Destinatário",tx_confirm_sender:"Remetente",tx_fee:"Taxa de transação",tx_hash:"Hash de transação",tx_verify:"Verifique sua transação aqui",withdrawal_dropdown_label:"Para",withdrawal_input_label:"Obter"},notification:{error:{failed_get_account_tx:"Falha ao obter transações da conta",failed_get_gas_prices:"Não foi possível obter os preços da Ethereum Gas",failed_get_tx_fee:"Não foi possível estimar a taxa de transação",failed_scanning_qr_code:"Falha ao digitalizar o código QR, por favor, tente novamente",generic_error:"Algo deu errado. Por favor tente outra vez",insufficient_balance:"Saldo insuficiente nesta conta",insufficient_for_fees:"Saldo insuficiente para cobrir as taxas de transação",invalid_address:"Endereço inválido, por favor verifique novamente",invalid_address_scanned:"Endereço inválido digitalizado, tente novamente",invalid_private_key_scanned:"Chave privada inválida, tente novamente",no_accounts_found:"Nenhuma Conta Ethereum Encontrada"},info:{address_copied_to_clipboard:"Endereço copiado para a área de transferência"}},subscribe_form:{email_already_subscribed:"Desculpe, você já se inscreveu com este e-mail",generic_error:"Oops, algo deu errado",sending:"Enviando ...",successful:"Verifique seu e-mail",too_many_signup_request:"Muitas solicitações de inscrição, tente novamente mais tarde"},time:{day:"dia",days:"dias",hour:"hora",hours:"horas",hr:"hr",hrs:"hrs",milisecond:"milisegundo",miliseconds:"milissegundos",min:"min",mins:"min",minute:"minuto",minutes:"minutos",ms:"ms",now:"Agora",s:"s",sec:"sec",second:"segundo",seconds:"segundos",secs:"sec"},warning:{user_is_offline:"Conexão offline, por favor, verifique sua conexão com a internet",user_is_online:"Conectado! Você está de volta online"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Connect to the MetaMask Chrome extension.",button:"Connect to MetaMask"},connect_ledger:{description:"Connect and sign with your ",link_text:"Ledger hardware wallet",link_title:"Buy a Ledger hardware wallet",button:"Connect to Ledger"},connect_trezor:{description:"Connect and sign with your ",link_text:"Trezor hardware wallet",link_title:"Buy a Trezor hardware wallet",button:"Connect to Trezor"},connect_walletconnect:"Connect and sign with your WalletConnect-enabled mobile wallet.",coming_soon:"Coming soon."},account:{tab_balances:"Balances",tab_transactions:"Transactions",tab_interactions:"Interactions",tab_uniquetokens:"Unique Tokens",tab_balances_tooltip:"Ethereum and Token Balances",tab_transactions_tooltip:"Transactions and Token Transfers",tab_interactions_tooltip:"Smart Contract Interactions",tab_uniquetokens_tooltip:"Unique Tokens",label_asset:"Asset",label_quantity:"Quantity",label_price:"Price",label_24h:"24h",label_status:"Status",label_total:"Total",show:"Show",hide:"Hide",token:"token",tokens:"tokens",no_market_value:"with no market value",low_market_value:"with low market value",tx_hash:"Transaction Hash",tx_timestamp:"Timestamp",tx_fee:"Fee",tx_to:"To",tx_from:"From",tx_self:"Self",tx_sent:"Sent",tx_received:"Received",tx_failed:"Failed",tx_pending:"Pending",show_all:"Show all",show_less:"Show less",unknown_token:"Unknown Token"},button:{connect_walletconnect:"Use WalletConnect",exchange:"Exchange",send:"Send",donate:"Donate ETH",receive:"Receive",close:"Close",confirm:"Confirm",cancel:"Cancel",go_back:"Go Back",send_another:"Send Another",exchange_again:"Exchange Again",notify_me:"Get notified",try_again:"Try again",learn_more:"Learn more",view:"View"},input:{recipient_address:"Recipient Address",private_key:"Private Key",donation_address:"Balance Manager Address",asset_amount:"Amount",email:"Email",password:"Password",input_text:"Input",email_placeholder:"your@email.com",password_placeholder:"••••••••••",input_placeholder:"Type here"},modal:{receive_title:"Receive to {{walletName}}",exchange_title:"Exchange from {{walletName}}",donate_title:"Send from {{walletName}} to Balance Manager",send_title:"Send from {{walletName}}",approve_tx:"Approve transaction on {{walletType}}",confirm_tx:"Confirm transaction from {{walletName}}",invalid_address:"Invalid Address",send_max:"Send max",exchange_max:"Exchange max",default_wallet:" Wallet",gas_slow:"Slow",gas_average:"Average",gas_fast:"Fast",gas_fee:"Fee",tx_confirm_sender:"Sender",tx_confirm_recipient:"Recipient",tx_confirm_amount:"Amount",tx_confirm_fee:"Transaction Fee",tx_hash:"Transaction Hash",tx_verify:"Verify your transaction here",deposit_dropdown_label:"Exchange my",withdrawal_dropdown_label:"For",deposit_input_label:"Pay",withdrawal_input_label:"Get",tx_fee:"Transaction Fee",exchange_fee:"Exchange Fee",previous_short:"Prev.",new:"New",helper_balance:"Balance",helper_value:"Value",helper_rate:"Rate",helper_price:"Price",helper_min:"Min",helper_max:"Max"},message:{web3_not_available:"Please install the MetaMask Chrome extension",web3_not_unlocked:"Please unlock your MetaMask wallet",web3_unknown_network:"Unknown network, please switch to another one",page_not_found:"404 Page Not Found",coming_soon:"Coming soon...",click_to_copy_to_clipboard:"Click to copy to clipboard",failed_request:"Failed request, please refresh",failed_ledger_connection:"Failed to connect to Ledger, please check your device",failed_trezor_connection:"Failed to connect to Trezor, please check your device",failed_trezor_popup_blocked:"Please allow popups on Balance to use your Trezor",no_transactions:"No transactions found for this account",no_unique_tokens:"No unique tokens found for this account",no_interactions:"No interactions found for this account",please_connect_ledger:"Please connect and unlock Ledger then select Ethereum",please_connect_trezor:"Please connect your Trezor and follow the instructions",opensea_footer:" is a market place for unique (or 'non-fungible') tokens. People trade on the marketspace and that gives them value. You can pawn your tokens to get money. All of this runs on Ethereum. ",opensea_header:"How does this work under the hood?",power_by:"Powered by",exchange_not_available:"Exchange is not available in your area",learn_more:"Learn more"},notification:{error:{no_accounts_found:"No Ethereum Accounts Found",invalid_address:"Address is invalid, please check again",insufficient_balance:"Insufficient balance in this account",insufficient_for_fees:"Insufficient balance to cover transaction fees",invalid_address_scanned:"Invalid Address Scanned, please try again",invalid_private_key_scanned:"Invalid Private Key Scanned, please try again",failed_scanning_qr_code:"Failed to scan QR code, please try again",failed_get_gas_prices:"Failed to get Ethereum Gas prices",failed_get_tx_fee:"Failed to estimate Transaction fee",failed_get_account_tx:"Failed to get Account transactions",generic_error:"Something went wrong, please try again"},info:{address_copied_to_clipboard:"Address copied to clipboard"}},warning:{user_is_offline:"Connection offline, please check your internet connection",user_is_online:"Connected! You're back online"},subscribe_form:{email_already_subscribed:"Sorry, you've already signed up with this email",too_many_signup_request:"Too many signup requests, please try again later",successful:"Check your email",sending:"Sending...",generic_error:"Oops, something went wrong"},time:{ms:"ms",milisecond:"milisecond",miliseconds:"miliseconds",s:"s",sec:"sec",secs:"secs",second:"second",seconds:"seconds",min:"min",mins:"mins",minute:"minute",minutes:"minutes",hr:"hr",hrs:"hrs",hour:"hour",hours:"hours",day:"day",days:"days",now:"Now"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Connectez-vous à l’extension Chrome de MetaMask.",button:"Se connecter à MetaMask"},connect_ledger:{description:"Connectez-vous et signez vos transactions avec votre ",link_text:"hardware wallet Ledger",link_title:"Acheter un hardware wallet Ledger",button:"Se connecter à Ledger"},connect_trezor:{description:" Connectez-vous et signez vos transactions avec votre ",link_text:"hardware wallet Trezor",link_title:"Acheter un hardware wallet Trezor",button:"Se connecter à Trezor"},connect_walletconnect:"Connectez-vous et signez vos transactions avec votre portefeuille mobile WalletConnect",coming_soon:"À venir."},account:{tab_balances:"Soldes",tab_transactions:"Transactions",tab_interactions:"Interactions",tab_uniquetokens:"Tokens uniques",tab_balances_tooltip:"Soldes en Ethereum et en tokens",tab_transactions_tooltip:"Transactions et transferts de tokens",tab_interactions_tooltip:"Interactions de smart-contracts",tab_uniquetokens_tooltip:"Tokens uniques",label_asset:"Actif",label_quantity:"Quantité",label_price:"Prix",label_24h:"24 h",label_status:"État",label_total:"Total",show:"Afficher",hide:"Masquer",token:"token",tokens:"tokens",no_market_value:"avec aucune valeur marchande",low_market_value:"avec une faible valeur marchande",tx_hash:"Hachage de transaction",tx_timestamp:"Horodatage",tx_fee:"Frais",tx_to:"À",tx_from:"De",tx_self:"Moi",tx_sent:"Envoyé",tx_received:"Reçu",tx_failed:"Échoué",tx_pending:"En attente",show_all:"Afficher tout",show_less:"Afficher moins",unknown_token:"Token inconnu"},button:{connect_walletconnect:"Utiliser WalletConnect",exchange:"Échanger",send:"Envoyer",donate:"Donner de l’ETH",receive:"Recevoir",close:"Fermer",confirm:"Confirmer",cancel:"Annuler",go_back:"Retourner",send_another:"Envoyer un autre",exchange_again:"Échanger encore",notify_me:"Recevoir des notifications",try_again:"Réessayer",learn_more:"En savoir plus",view:"Affichage"},input:{recipient_address:"Adresse du destinataire",private_key:"Clé privée",donation_address:"Adresse du Balance Manager",asset_amount:"Quantité",email:"Adresse de courriel",password:"Mot de passe",input_text:"Input",email_placeholder:"votre@courriel.com",password_placeholder:"••••••••••",input_placeholder:"Saisissez ici"},modal:{receive_title:"Recevoir à {{walletName}}",exchange_title:"Échanger de {{walletName}}",donate_title:"Envoyer de {{walletName}} au Balance Manager",send_title:"Envoyer de {{walletName}}",approve_tx:"Permettre une transaction de {{walletType}}",confirm_tx:"Confirmer une transaction de {{walletName}}",invalid_address:"Adresse non valide",send_max:"Envoyer la valeur max",exchange_max:"Échanger la valeur max",default_wallet:" Wallet",gas_slow:"Lent",gas_average:"Moyen",gas_fast:"Vite",gas_fee:"Frais",tx_confirm_sender:"Payeur",tx_confirm_recipient:"Bénéficiaire",tx_confirm_amount:"Quantité",tx_confirm_fee:"Frais de transaction",tx_hash:"Hachage de transaction",tx_verify:"Vérifiez votre transaction ici",deposit_dropdown_label:"Échanger mes",withdrawal_dropdown_label:"pour",deposit_input_label:"Payer",withdrawal_input_label:"Obtenir",tx_fee:"Frais de transaction",exchange_fee:"Frais d’échange",previous_short:"Préc.",new:"New",helper_balance:"Solde",helper_value:"Valeur",helper_rate:"Taux",helper_price:"Prix",helper_min:"Min",helper_max:"Max"},message:{web3_not_available:"Veuillez installer l’extension Chrome de MetaMask",web3_not_unlocked:"Veuillez déverrouiller votre wallet MetaMask",web3_unknown_network:"Réseau inconnu, veuillez basculer vers un autre",page_not_found:"404 Page introuvable",coming_soon:"À venir...",click_to_copy_to_clipboard:"Cliquez ici pour copier dans les presse-papiers",failed_request:"Requête échouée, veuillez rafraîchir la page",failed_ledger_connection:"Erreur de connexion à Ledger, veuillez vérifier votre appareil",failed_trezor_connection:"Erreur de connexion à Trezor, veuillez vérifier votre appareil",failed_trezor_popup_blocked:"Veuillez permettre l’affichage de fenêtres contextuelles de Balance",no_transactions:"Aucune transaction n’a été trouvée pour ce compte",no_unique_tokens:"Aucun token unique n’a été trouvé pour ce compte ",no_interactions:"Aucune interaction n’a été trouvée pour ce compte",please_connect_ledger:"Veuillez choisir Ethereum après la connexion et le déverrouillage de Ledger",please_connect_trezor:"Veuillez vous connecter à Trezor puis suivez les instructions",opensea_footer:" est un marché de tokens uniques (non-fongible). En échangeant sur ce marché, on augmente de la valeur de ces tokens. Vous pouvez vendre vos tokens pour de l’argent. Tout cela utilise l’Ethereum. ",opensea_header:"Comment est-ce que cela marche « sous le capot ? »",power_by:"Réalisé par",exchange_not_available:"L’échange n’est pas disponible dans votre région",learn_more:"En savoir plus"},notification:{error:{no_accounts_found:"Aucun compte Ethereum n’a été trouvé",invalid_address:"Adresse non valide, veuillez la vérifier",insufficient_balance:"Ce compte a un solde insuffisant",insufficient_for_fees:"Solde insuffisant pour payer les frais de transaction",invalid_address_scanned:"Adresse non valide, veuillez réessayer",invalid_private_key_scanned:"Clé privée non valide, veuillez réessayer",failed_scanning_qr_code:"Impossible de scanner le code QR, veuillez réessayer",failed_get_gas_prices:"Échec de l’obtention des prix de Gas d’Ethereum",failed_get_tx_fee:"Échec de l’estimation des frais de transaction",failed_get_account_tx:"Échec de l’obtention des transactions de compte",generic_error:"Une erreur s’est produite, veuillez réessayer"},info:{address_copied_to_clipboard:"L’adresse a été copiée dans le presse-papiers"}},warning:{user_is_offline:"Hors connexion, veuillez vérifier votre connexion Internet",user_is_online:"Connexion réussie ! Vous êtes encore connecté à Internet"},subscribe_form:{email_already_subscribed:"Désolé, vous vous êtes déjà inscrit avec cette adresse de courriel",too_many_signup_request:"Nous avons détecté trop de demandes d’inscription, veuillez réessayer plus tard",successful:"Veuillez consulter vos courriels",sending:"En train d’en envoyer...",generic_error:"Oups, une erreur s’est produite"},time:{ms:"ms",milisecond:"milliseconde",miliseconds:"millisecondes",s:"s",sec:"sec",secs:"secs",second:"seconde",seconds:"secondes",min:"min",mins:"mins",minute:"minute",minutes:"minutes",hr:"h",hrs:"hres",hour:"heure",hours:"heures",day:"jour",days:"jours",now:"Maintenant"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Mit der MetaMask Chrome Erweiterung verbinden.",button:"Mit MetaMask verbinden"},connect_ledger:{description:"Verbinden und anmelden mit deiner ",link_text:"Ledger Hardware Wallet",link_title:"Eine Ledger Hardware Wallet kaufen",button:"Mit Ledger verbinden"},connect_walletconnect:"Verbinden und mit einr WalletConnect-fähigen Mobile Wallet anmelden.",coming_soon:"Coming soon…"},account:{tab_balances:"Saldi",tab_transactions:"Transaktionen",tab_interactions:"Interaktionen",tab_balances_tooltip:"Ethereum und Token Saldi",tab_transactions_tooltip:"Transaktionen und Tokentransfers",tab_interactions_tooltip:"Smart Contract Interaktionen",label_asset:"Asset",label_quantity:"Menge",label_price:"Preis",label_24h:"24h",label_status:"Status",label_total:"Summe",show:"Anzeigen",hide:"Ausblenden",token:"Token",tokens:"Tokens",no_market_value:"ohne Marktwert",low_market_value:"mit geringem Marktwert",tx_hash:"Transaktionshash",tx_timestamp:"Zeitstempel",tx_fee:"Gebühr",tx_to:"An",tx_from:"Von",tx_self:"Ich",tx_sent:"Gesendet",tx_received:"Erhalten",tx_failed:"Fehlgeschlagen",tx_pending:"Ausstehend",show_all:"Alle anzeigen",show_less:"Weniger anzeigen",unknown_token:"Unbekannter Token"},button:{connect_walletconnect:"WalletConnect benutzen",exchange:"Umwechseln",send:"Senden",donate:"ETH spenden",receive:"Erhalten",close:"Schließen",cancel:"Abbrechen",go_back:"Zurück",send_another:"Weitere senden",notify_me:"Benachrichtige mich",try_again:"Erneut vesuchen"},input:{recipient_address:"Empfängeradresse",private_key:"Private-Key",donation_address:"Balance Manager Adresse",asset_amount:"Menge",email:"E-Mail-Adresse",password:"Passwort",input_text:"Input",email_placeholder:"deine@email.de",password_placeholder:"••••••••••",input_placeholder:"Hier einfügen"},modal:{receive_title:"Mit {{walletName}} erhalten",exchange_title:"Umwechseln von {{walletName}}",donate_title:"Von {{walletName}} an Balance Manager senden",send_title:"Gesendet von {{walletName}}",approve_tx:"Transaktion auf {{walletType}} zustimmen",confirm_tx:"Transaktion von {{walletName}} bestätigen",invalid_address:"Ungültige Adresse",send_max:"maximal",exchange_max:"maximal",default_wallet:" Wallet",gas_slow:"Langsam",gas_average:"Durchschnittlich",gas_fast:"Schnell",gas_fee:"Gebühr",tx_confirm_sender:"Sender",tx_confirm_recipient:"Empfänger",tx_confirm_amount:"Menge",tx_confirm_fee:"Transaktionsgebühr",tx_hash:"Transaktionshash",tx_verify:"Transaktion hier verifizieren",deposit_dropdown_label:"Tausche mein",withdrawal_dropdown_label:"gegen",deposit_input_label:"Bezahlen",withdrawal_input_label:"Erhalten",tx_fee:"Transaktionsgebühr",exchange_fee:"Umtauschgebühr"},message:{web3_not_available:"Bitte die MetaMask Chrome Erweiterung installieren",web3_not_unlocked:"Bitte die MetaMask Wallet entsperren",web3_unknown_network:"Unbekanntes Netzwerk, bitte auf ein anderes wechseln",page_not_found:"404 Seite nicht gefunden",coming_soon:"Coming soon…",click_to_copy_to_clipboard:"Klicken um in die Zwischenablage zu kopieren",failed_request:"Anfrage fehlgeschlagen, bitte neu laden",failed_ledger_connection:"Fehler beim verbinden zu Ledger, bitte Gerät überprüfen",no_transactions:"Keine Transaktionen für diesen Account gefunden",no_interactions:"Keine Interaktionen für diesen Account gefunden",please_connect_ledger:"Mit Ledger verbinden, entsperren und Ethereum auswählen"},notification:{error:{no_accounts_found:"Kein Ethereum Account gefunden",invalid_address:"Addresse ist ungültig, bitte überprüfen",insufficient_balance:"Nicht genügend Guthaben in diesem Account",insufficient_for_fees:"Nicht genügend Guthaben um Transaktionsgebühren zu decken",invalid_address_scanned:"Gescannte Adresse ungültig, bitte erneut versuchen",invalid_private_key_scanned:"Gescannter Private-Key ungültig, bitte erneut versuchen",failed_scanning_qr_code:"QR-Code scannen fehlgeschlagen, bitte erneut versuchen",failed_get_gas_prices:"Ethereum Gas Preis ermitteln fehlgeschlagen",failed_get_tx_fee:"Transaktionsgebühr ermitteln fehlgeschlagen",failed_get_account_tx:"Abrufen der Transaktionen für diesen Account fehlgeschlagen",generic_error:"Etwas ist schief gelaufen, bitte erneut versuchen"},info:{address_copied_to_clipboard:"Adresse in Zwischenablage kopiert"}},warning:{user_is_offline:"Verbindung ist offline, bitte Internetverbindung überprüfen",user_is_online:"Verbunden! Wieder online"},subscribe_form:{email_already_subscribed:"Es tut uns Leid, diese E-Mail-Adresse ist bereits in unserem Verteiler",too_many_signup_request:"Zu viele Anfragen, bitte später erneut versuchen",successful:"Check deine E-Mails",sending:"Wird gesendet…",generic_error:"Ups, irgendwas ist schief gelaufen"},time:{ms:"ms",milisecond:"Millisekunde",miliseconds:"Millisekunden",s:"s",sec:"Sek",secs:"Sek",second:"Sekunde",seconds:"Sekunden",min:"Min",mins:"Min",minute:"Minute",minutes:"Minuten",hr:"Std",hrs:"Stdn",hour:"Stunde",hours:"Stunden",day:"Tag",days:"Tage"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Připojit se k MetaMask rozšíření.",button:"Připojit se k MetaMask"},connect_ledger:{description:"Připojit se a podepsat pomocí ",link_text:"Ledger HW peněženky",link_title:"Koupit Ledger HW peněženku",button:"Připojit se k Ledger"},connect_trezor:{description:"Připojit se a podepsat pomocí ",link_text:"Trezor HW peněženky",link_title:"Koupit Trezor HW peněženku",button:"Připojit se k Trezoru"},connect_walletconnect:"Připojit se a podepsat pomocí WalletConnect-enabled mobilní peněženky.",coming_soon:"Již brzy."},account:{tab_balances:"Zůstatky",tab_transactions:"Transakce",tab_interactions:"Interakce",tab_uniquetokens:"Unikátní tokeny",tab_balances_tooltip:"Zůstatky Etheru a Tokenů",tab_transactions_tooltip:"Transakce a transakce tokenů",tab_interactions_tooltip:"Smart Contract interakce",tab_uniquetokens_tooltip:"Unikátní tokeny",label_asset:"Aktivum",label_quantity:"Množství",label_price:"Cena",label_24h:"24h",label_status:"Status",label_total:"Celkem",show:"Zobraz",hide:"Schovej",token:"token",tokens:"tokeny",no_market_value:"bez tržní hodnoty",low_market_value:"s nízkou tržní hodnotou",tx_hash:"Hash transakce",tx_timestamp:"Datum a čas",tx_fee:"Poplatek",tx_to:"Komu",tx_from:"Od",tx_self:"Sobě",tx_sent:"Posláno",tx_received:"Obdrženo",tx_failed:"Selhalo",tx_pending:"Probíhá",show_all:"Zobrazit všechny",show_less:"Zobraz méně",unknown_token:"Neznámý Token"},button:{connect_walletconnect:"Použij WalletConnect",exchange:"Směnit",send:"Poslat",donate:"Daruj ETH",receive:"Příjmout",close:"Zavřít",confirm:"Potvrdit",cancel:"Zrušit",go_back:"Jít zpět",send_another:"Poslat další",exchange_again:"Směn znovu",notify_me:"Dostávat oznámení",try_again:"Zkusit znovu",learn_more:"Zjistit více",view:"Zobrazit"},input:{recipient_address:"Adresa příjemce",private_key:"Soukromý klíč",donation_address:"Správa zůstatků",asset_amount:"množství",email:"Email",password:"Heslo",input_text:"Vstup",email_placeholder:"your@email.com",password_placeholder:"••••••••••",input_placeholder:"Vepište zde"},modal:{receive_title:"Příjmout pomocí {{walletName}}",exchange_title:"Směnit pomocí {{walletName}}",donate_title:"Odeslat z {{walletName}} do správy prostředků",send_title:"Odeslat z {{walletName}}",approve_tx:"Schválit transakci na {{walletType}}",confirm_tx:"Potvrdit transakci od {{walletName}}",invalid_address:"Chybná adresa",send_max:"Poslat maximum",exchange_max:"Směnit maximum",default_wallet:" peněženky",gas_slow:"Pomalu",gas_average:"Průměrně",gas_fast:"Rychle",gas_fee:"Poplatek",tx_confirm_sender:"Odesílatel",tx_confirm_recipient:"Příjemce",tx_confirm_amount:"Množství",tx_confirm_fee:"Poplatek za transakci",tx_hash:"Hash transakce",tx_verify:"Ověřte si transakci zde",deposit_dropdown_label:"Směn můj",withdrawal_dropdown_label:"Za",deposit_input_label:"Zaplatit",withdrawal_input_label:"Získat",tx_fee:"Poplatek za transakci",exchange_fee:"Poplatek za směnu",previous_short:"Před.",new:"Nový",helper_balance:"Zůstatek",helper_value:"Hodnota",helper_rate:"Sazba",helper_price:"Cena",helper_min:"Min",helper_max:"Max"},message:{web3_not_available:"Nainstalujte si prosím MetaMask rozšíření",web3_not_unlocked:"Odblokujte prosím MetaMask",web3_unknown_network:"Neznámá síť, prosím přepněte se do jinačí sítě",page_not_found:"404 Stránka nenalezena",coming_soon:"Již brzy...",click_to_copy_to_clipboard:"Klikněte pro zkopírování do schránky",failed_request:"Požadavek selhal, prosím opakujte",failed_ledger_connection:"Nepodařilo se připojit k Ledger, prosím zkontrolujte Vaše zařízení",failed_trezor_connection:"Nepodařilo se připojit k Trezoru, prosím zkontrolujte Vaše zařízení",failed_trezor_popup_blocked:"Prosím povolte vyskakovací okna v Zůstatcích pro používání Trezoru",no_transactions:"Nebyly nalezeny žádné transakce pro Váš účet",no_unique_tokens:"Nebyly nalezeny žádné unikátní tokeny pro Váš účet",no_interactions:"Nebyly nalezeny žádné interakce pro Váš účet",please_connect_ledger:"Prosím připojte a odemkněte Ledger a následně vyberte možnost Ethereum",please_connect_trezor:"Prosím připojte Trezor a následujte instrukce",opensea_footer:" je market pro unikátní (též 'nezaměnitelné') tokeny. Lidé obchodují na trhu a to jim získává hodnotu. Můžete zastavit Vaše tokeny a tím získat peníze. A vše tohleto běží na Ethereum. ",opensea_header:"A jak tohle funguje pod kapotou?",power_by:"Poháněno",exchange_not_available:"Směnárna neni povolená ve Vaší lokalitě",learn_more:"Zjistit více"},notification:{error:{no_accounts_found:"Nebyly nalezeny žádné Ethereum účty",invalid_address:"Adresa je chybná, prosím zkontrolujte jí",insufficient_balance:"Nedostatečný zůstatek na tomto účtě",insufficient_for_fees:"Nedostatečný zůstatek pro pokrytí poplatků",invalid_address_scanned:"Naskenovaná adresa je chybná, prosím zkuste to znovu",invalid_private_key_scanned:"Naskenovaný privátní klíč je chybný. prosím zkuste to znovu",failed_scanning_qr_code:"Nepodařilo se naskenovat QR kód, prosím zkuste to pozdějí",failed_get_gas_prices:"Nepodařilo se získat cenu za Ethereum plyn",failed_get_tx_fee:"Chyba v počítání poplatku za plyn",failed_get_account_tx:"Chyba v získávání transakcí k účtu",generic_error:"Něco se stalo, zkuste to prosím pozdějí"},info:{address_copied_to_clipboard:"Adresa zkopírována do schránky"}},warning:{user_is_offline:"Jste offline, prosíme zkontrolujte internetové připojení",user_is_online:"Připojeno! Jste zpátky online"},subscribe_form:{email_already_subscribed:"S tímto emailem jste již zaregistrování",too_many_signup_request:"Mnoho chybných pokusů o přihlášení, zkuste to prosím později",successful:"Zkontrolujte si svůj email",sending:"Odesílám...",generic_error:"Hups, něco se pokazilo"},time:{ms:"ms",milisecond:"milisekunda",miliseconds:"milisekundy",s:"s",sec:"sek",secs:"sek",second:"sekunda",seconds:"sekundy",min:"min",mins:"min.",minute:"minuta",minutes:"minuty",hr:"hod",hrs:"hod",hour:"hodina",hours:"hodin",day:"den",days:"dnů",now:"nyní"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Connetti all'estensione di Chrome MetaMask.",button:"Connetti a MetaMask"},connect_ledger:{description:"Connetti ed accedi con il tuo ",link_text:"Ledger hardware wallet",link_title:"Acquista un hardware wallet Ledger",button:"Connetti a Ledger"},connect_walletconnect:"Collegati ed accedi al tuo wallet WalletConnect.",coming_soon:"In arrivo."},account:{tab_balances:"Saldo",tab_transactions:"Transazioni",tab_interactions:"Interazioni",tab_balances_tooltip:"Saldo di Ethereum e Token",tab_transactions_tooltip:"Transazioni e Transferimenti dei Token",tab_interactions_tooltip:"Interazioni di Smart Contracts",label_asset:"Asset",label_quantity:"Quantità",label_price:"Prezzo",label_24h:"24h",label_status:"Stato",label_total:"Totale",show:"Mostra",hide:"Nascondi",token:"token",tokens:"token",no_market_value:"senza valore di mercato",low_market_value:"con basso valore di mercato",tx_hash:"Hash della Transazione",tx_timestamp:"Data/Ora",tx_fee:"Commissioni",tx_to:"A",tx_from:"Da",tx_self:"Io",tx_sent:"Inviata",tx_received:"Ricevuta",tx_failed:"Fallita",tx_pending:"In attesa",show_all:"Mostra tutto",show_less:"Mostra meno",unknown_token:"Token Sconosciuto"},button:{connect_walletconnect:"Usa WalletConnect",exchange:"Scambia",send:"Invia",donate:"Dona ETH",receive:"Ricevi",close:"Chiudi",cancel:"Cancella",go_back:"Indietro",send_another:"Invia un altro",notify_me:"Imposta notifica",try_again:"Prova ancora"},input:{recipient_address:"Indirizzo Destinatario",private_key:"Chiave Privata",donation_address:"Indirizzo di Balance Manager",asset_amount:"Quantità",email:"Email",password:"Password",input_text:"Input",email_placeholder:"tua@email.com",password_placeholder:"••••••••••",input_placeholder:"Scrivi qui"},modal:{receive_title:"Ricevi a {{walletName}}",exchange_title:"Scambia da {{walletName}}",donate_title:"Invia da {{walletName}} a Balance Manager",send_title:"Invia da {{walletName}}",approve_tx:"Approva transazioni su {{walletType}}",confirm_tx:"Conferma transazione da {{walletName}}",invalid_address:"Indirizzo Non Valido",send_max:"Invia max",exchange_max:"Scambia max",default_wallet:" Wallet",gas_slow:"Lento",gas_average:"Medio",gas_fast:"Veloce",gas_fee:"Costi di commissione",tx_confirm_sender:"Mittente",tx_confirm_recipient:"Destinatario",tx_confirm_amount:"Quantità",tx_confirm_fee:"Commissioni per la Transazione",tx_hash:"Hash della Transazione",tx_verify:"Verify your transaction here",deposit_dropdown_label:"Scambia i miei",withdrawal_dropdown_label:"per",deposit_input_label:"Paga",withdrawal_input_label:"Ottieni",tx_fee:"Commissioni per la Transazione",exchange_fee:"Commissioni per il Cambio"},message:{web3_not_available:"Installa l'estensione di Chrome MetaMask",web3_not_unlocked:"Per favore sblocca il tuo wallet MetaMask",web3_unknown_network:"Network sconosciuto, per favore passa ad un altro",page_not_found:"404 Pagina Non Trovata",coming_soon:"In arrivo...",click_to_copy_to_clipboard:"Clicca per copiare negli appunti",failed_request:"Richiesta fallita, per favore ricarica la pagina",failed_ledger_connection:"Collegamento a Ledger fallito, controlla il tuo dispositivo",no_transactions:"Nessuna transazione trovata per questo account",no_interactions:"Nessuna interazione trovata per questo account",please_connect_ledger:"Collega e sblocca Ledger, poi seleziona Ethereum"},notification:{error:{no_accounts_found:"Nessun Account Ethereum Trovato",invalid_address:"Indirizzo non valido, per favore controlla di nuovo",insufficient_balance:"Saldo insufficiente per questo account",insufficient_for_fees:"Saldo insufficiente per coprire i costi di transazione",invalid_address_scanned:"Indirizzo non valido, per favore prova di nuovo",invalid_private_key_scanned:"Chiave Privata non valida, per favore prova di nuovo",failed_scanning_qr_code:"Scannerizzazione QR code fallita, per favore prova di nuovo",failed_get_gas_prices:"Ottenimento prezzi Gas fallito",failed_get_tx_fee:"Stima costi di transazione fallita",failed_get_account_tx:"Ottenimento transazioni account fallito",generic_error:"Qualcosa è andato storto, prova di nuovo"},info:{address_copied_to_clipboard:"Indirizzo copiato negli appunti"}},warning:{user_is_offline:"Connessione assente, controlla tua connessione internet",user_is_online:"Connesso! Sei di nuovo online"},subscribe_form:{email_already_subscribed:"Ci dispiace, ti sei già registrato con questa mail",too_many_signup_request:"Troppe richiesta di registrazione, riprova più tardi",successful:"Controlla la tua email",sending:"Invio...",generic_error:"Oops, qualcosa è andato storto"},time:{ms:"ms",milisecond:"millisecondo",miliseconds:"millisecondi",s:"s",sec:"sec",secs:"sec",second:"secondo",seconds:"secondi",min:"min",mins:"min",minute:"minuto",minutes:"minuti",hr:"hr",hrs:"hr",hour:"ora",hours:"ore",day:"giorno",days:"giorni"}}}},function(t){t.exports={translation:{account:{hide:"Ocultar",label_24h:"24h",label_asset:"Ativos",label_price:"Preço",label_quantity:"Quantidade",label_status:"Status",label_total:"Total",low_market_value:"baixo valor de mercado",no_market_value:"sem valor de mercado",show:"Expandir",show_all:"Mostrar tudo",show_less:"Mostrar menos",tab_balances:"Saldos",tab_balances_tooltip:"Ethereum e token saldos",tab_interactions:"Interações",tab_interactions_tooltip:"Interações de Smart Contract",tab_transactions:"Transações",tab_transactions_tooltip:"Transações e transferências de tokens",tab_uniquetokens:"Tokens exclusivos",tab_uniquetokens_tooltip:"Tokens exclusivos",token:"token",tokens:"tokens",tx_failed:"Falhou",tx_fee:"Taxa",tx_from:"De",tx_hash:"Hash de transação",tx_pending:"Pendente",tx_received:"Recebido",tx_self:"Eu",tx_sent:"Enviado",tx_timestamp:"Data/hora",tx_to:"Para",unknown_token:"Token desconhecido"},button:{cancel:"Cancelar",close:"Fechar",confirm:"Confirme",connect_walletconnect:"Use o WalletConnect",donate:"Doe ETH",exchange:"Troca",exchange_again:"Troque novamente",go_back:"Volte",learn_more:"Saiba mais",notify_me:"Receba notificação",receive:"Receber",send:"Enviar",send_another:"Enviar outro",try_again:"Tente novamente",view:"Visualizar"},homepage:{coming_soon:"Em breve.",connect_ledger:{button:"Conecte-se ao Ledger",description:"Conecte-se e assine com seu ",link_text:"Ledger wallet",link_title:"Compre uma carteira de Ledger hardware wallet"},connect_metamask:{button:"Conecte-se ao MetaMask",description:"Conecte-se ao MetaMask Chrome extensão."},connect_trezor:{button:"Conecte-se a Trezor",description:"Conecte-se e assine com seu ",link_text:"Trezor hardware wallet",link_title:"Compre uma carteira de Trezor hardware wallet"},connect_walletconnect:"Ligue e assine com a sua carteira móvel compatível com o WalletConnect."},input:{asset_amount:"Quantidade",donation_address:"Balance Manager endereço",email:"Email",email_placeholder:"seu@email.com",input_placeholder:"Digite aqui",input_text:"Entrada",password:"Senha",password_placeholder:"••••••••••",private_key:"Chave privada",recipient_address:"Endereço do destinatário"},message:{click_to_copy_to_clipboard:"Clique para copiar para a área de transferência",coming_soon:"Em breve...",exchange_not_available:"O Exchange não está disponível na sua área",failed_ledger_connection:"Falha ao conectar-se ao Ledger, verifique seu dispositivo",failed_request:"Falha no pedido, por favor atualize",failed_trezor_connection:"Falha ao conectar-se ao Trezor, verifique seu dispositivo",failed_trezor_popup_blocked:"Por favor, permita que os popups do Balance usem o seu Trezor",learn_more:"Saiba mais",no_interactions:"Nenhuma interação encontrada para esta conta",no_transactions:"Nenhuma transação encontrada para esta conta",no_unique_tokens:"Nenhum token exclusivo encontrado para esta conta",opensea_footer:"é um mercado para tokens exclusivos (ou 'não fungíveis'). As pessoas negociam no espaço de mercado e isso lhes dá valor. Você pode penhorar seus tokens para conseguir dinheiro. Tudo isso é executado no Ethereum.",opensea_header:"Como isso funciona?",page_not_found:"404 Página Não Encontrada",please_connect_ledger:"Por favor, conecte e desbloqueie o Ledger e selecione Ethereum",please_connect_trezor:"Por favor, conecte seu Trezor e siga as instruções",power_by:"Distribuído por",web3_not_available:"Por favor, instale a extensão MetaMask Chrome",web3_not_unlocked:"Por favor, desbloqueie sua carteira MetaMask",web3_unknown_network:"Rede desconhecida, por favor mude para outra"},modal:{approve_tx:"Aprovar transação no {{walletType}}",confirm_tx:"Confirme a transação de {{walletName}}",default_wallet:"Carteira",deposit_dropdown_label:"Trocar meu",deposit_input_label:"Pagamento",donate_title:"Enviar de {{walletName}} para o Gestor de saldo",exchange_fee:"Taxa de troca",exchange_max:"Troca máxima",exchange_title:"Trocar de {{walletName}}",gas_average:"Médio",gas_fast:"Rápido",gas_fee:"Taxa",gas_slow:"Lento",helper_balance:"Balanço",helper_max:"Max",helper_min:"Min",helper_price:"Preço",helper_rate:"Taxa",helper_value:"Valor",invalid_address:"Endereço inválido",new:"Novo",previous_short:"Prev.",receive_title:"Receber para {{walletName}}",send_max:"Enviar max",send_title:"Enviar de {{walletName}}",tx_confirm_amount:"Montante",tx_confirm_fee:"Taxa de transação",tx_confirm_recipient:"Destinatário",tx_confirm_sender:"Remetente",tx_fee:"Taxa de transação",tx_hash:"Hash de transação",tx_verify:"Verifique sua transação aqui",withdrawal_dropdown_label:"Para",withdrawal_input_label:"Obter"},notification:{error:{failed_get_account_tx:"Falha ao obter transações da conta",failed_get_gas_prices:"Não foi possível obter os preços da Ethereum Gas",failed_get_tx_fee:"Não foi possível estimar a taxa de transação",failed_scanning_qr_code:"Falha ao digitalizar o código QR, por favor, tente novamente",generic_error:"Algo deu errado. Por favor tente outra vez",insufficient_balance:"Saldo insuficiente nesta conta",insufficient_for_fees:"Saldo insuficiente para cobrir as taxas de transação",invalid_address:"Endereço inválido, por favor verifique novamente",invalid_address_scanned:"Endereço inválido digitalizado, tente novamente",invalid_private_key_scanned:"Chave privada inválida, tente novamente",no_accounts_found:"Nenhuma Conta Ethereum Encontrada"},info:{address_copied_to_clipboard:"Endereço copiado para a área de transferência"}},subscribe_form:{email_already_subscribed:"Desculpe, você já se inscreveu com este e-mail",generic_error:"Oops, algo deu errado",sending:"Enviando ...",successful:"Verifique seu e-mail",too_many_signup_request:"Muitas solicitações de inscrição, tente novamente mais tarde"},time:{day:"dia",days:"dias",hour:"hora",hours:"horas",hr:"hr",hrs:"hrs",milisecond:"milisegundo",miliseconds:"milissegundos",min:"min",mins:"min",minute:"minuto",minutes:"minutos",ms:"ms",now:"Agora",s:"s",sec:"sec",second:"segundo",seconds:"segundos",secs:"sec"},warning:{user_is_offline:"Conexão offline, por favor, verifique sua conexão com a internet",user_is_online:"Conectado! Você está de volta online"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Подключитесь к Chrome плагину MetaMask.",button:"Подключиться к MetaMask"},connect_ledger:{description:"Подключите и авторизируйтесь через свой ",link_text:"аппаратный кошелек Ledger",link_title:"Купить аппаратный кошелек Ledger",button:"Подключиться к Ledger"},connect_trezor:{description:"Подключите и авторизируйтесь через свой ",link_text:"аппаратный кошелек Trezor",link_title:"Купить аппаратный кошелек Trezor",button:"Подключиться к Trezor"},connect_walletconnect:"Подключите и авторизируйстесь через свой мобильный кошелек с поддержкой WalletConnect.",coming_soon:"Скоро."},account:{tab_balances:"Балансы",tab_transactions:"Транзакции",tab_interactions:"Операции",tab_uniquetokens:"Уникальные токены",tab_balances_tooltip:"Балансы Ethereum и токенов",tab_transactions_tooltip:"Транзакции и переводы токенов",tab_interactions_tooltip:"Операции со smart контрактами",tab_uniquetokens_tooltip:"Уникальные токены",label_asset:"Актив",label_quantity:"Кол-во",label_price:"Цена",label_24h:"24ч",label_status:"Статус",label_total:"Всего",show:"Показать",hide:"Скрыть",token:"токен",tokens:"токенов",no_market_value:"без рыночной стоимости",low_market_value:"с низкой рыночной стоимостью",tx_hash:"Хеш транзакции",tx_timestamp:"Время",tx_fee:"Комиссия",tx_to:"На",tx_from:"От",tx_self:"Self",tx_sent:"Отправлено",tx_received:"Получено",tx_failed:"Ошибка",tx_pending:"Ожидается",show_all:"Показать все",show_less:"Показать меньше",unknown_token:"Неизвестный токен"},button:{connect_walletconnect:"Использовать WalletConnect",exchange:"Обмен",send:"Отправить",donate:"Задонатить ETH",receive:"Получить",close:"Закрыть",cancel:"Отменить",go_back:"Назад",send_another:"Отправить еще",exchange_again:"Обменять еще",notify_me:"Получить уведомление",try_again:"Попробовать еще раз",learn_more:"Узнать больше",view:"Смотреть"},input:{recipient_address:"Адрес получателя",private_key:"Приватный ключ",donation_address:"Адрес Balance Manager",asset_amount:"Сумма",email:"Email",password:"Пароль",input_text:"Input",email_placeholder:"your@email.com",password_placeholder:"••••••••••",input_placeholder:"Заполнить здесь"},modal:{receive_title:"Получить на {{walletName}}",exchange_title:"Обменять с {{walletName}}",donate_title:"Отправить с {{walletName}} на Balance Manager",send_title:"Отправить с {{walletName}}",approve_tx:"Одобрить транзакцию на {{walletType}}",confirm_tx:"Подтвердить транзакцию с {{walletName}}",invalid_address:"Неправильный адрес",send_max:"Отправить макс",exchange_max:"Обменять макс",default_wallet:" кошелек",gas_slow:"Медленно",gas_average:"Средне",gas_fast:"Быстро",gas_fee:"Комиссия",tx_confirm_sender:"Отправитель",tx_confirm_recipient:"Получатель",tx_confirm_amount:"Сумма",tx_confirm_fee:"Коммисия транзакции",tx_hash:"Хэш транзакции",tx_verify:"Верифицируйте свою транзакцию здесь",deposit_dropdown_label:"Обменять мои",withdrawal_dropdown_label:"на",deposit_input_label:"Отдаю",withdrawal_input_label:"Получаю",tx_fee:"Комиссия транзакции",exchange_fee:"Комиссия обмена",previous_short:"Пред.",new:"Новое",helper_balance:"Баланс",helper_value:"Стоимость",helper_rate:"Курс обмена",helper_price:"Цена",helper_min:"Мин",helper_max:"Макс"},message:{web3_not_available:"Пожалуйста установите Chrome плагин MetaMask",web3_not_unlocked:"Пожалуйста разблокируйте свой MetaMask кошелек",web3_unknown_network:"Неизвестная сеть, попробуйте подключиться к другой",page_not_found:"404 Страница не найдена",coming_soon:"Скоро...",click_to_copy_to_clipboard:"Нажмите, чтобы скопировать",failed_request:"Ошибка запроса, пожалуйста обновите",failed_ledger_connection:"Ошибка подключения к Ledger, пожалуйста проверьте устройство",failed_trezor_connection:"Ошибка подключения к Trezor, пожалуйста проверьте устройство",failed_trezor_popup_blocked:"Пожалуйста разрешите всплывающие окна для Balance чтобы использовать свой Trezor",no_transactions:"Не найдено транзакций для этого аккаунта",no_unique_tokens:"Не найдено уникальных токенов для этого аккаунта",no_interactions:"Не найдено операций с этим аккаунтом",please_connect_ledger:"Пожалуйста подключите и разблокируйте Ledger, затем выберите Ethereum",please_connect_trezor:"Пожалуйста подключите свой Trezor и следуйте инструкциям",opensea_footer:" это marketplace для уникальных (или 'не заменяемых') токенов. Люди торгуют на этом marketplace и это дает им стомость. Вы можете заложить свои токены, чтобы получить деньги. Все это работает на Ethereum. ",opensea_header:"Как это работает под капотом?",power_by:"Работает на",exchange_not_available:"Обмен не доступен в вашем регионе",learn_more:"Узнать больше"},notification:{error:{no_accounts_found:"Ethereum аккаунт не найден",invalid_address:"Неправильный адрес, пожалуйста проверьте еще раз",insufficient_balance:"Недостаточный баланс в этом аккаунте",insufficient_for_fees:"Недостаточный баланс, чтобы покрыть комиссию транзакции",invalid_address_scanned:"Обнаружен неправильный адрес, пожалуйста попробуйте еще раз",invalid_private_key_scanned:"Обнаружен неправильный приватный ключ, пожалуйста попробуйте еще раз",failed_scanning_qr_code:"Ошибка сканирования QR кода, пожалуйста попробуйте еще раз",failed_get_gas_prices:"Не удалось получить Ethereum Gas prices",failed_get_tx_fee:"Не удалось посчитать комиссию транзакции",failed_get_account_tx:"Не удалось получить транзакции аккаунта",generic_error:"Что-то пошло не так, попробуйте еще раз"},info:{address_copied_to_clipboard:"Адрес скопирован в буфер"}},warning:{user_is_offline:"Нет подключения, пожалуйста проверьте свое интернет-соединение",user_is_online:"Подключено! Вы снова онлайн"},subscribe_form:{email_already_subscribed:"Извините, вы уже авторизировались с этим e-mail",too_many_signup_request:"Слишком много запросов на регистрацию, пожалуйста попробуйте еще раз",successful:"Проверьте свой e-mail",sending:"Отправляется...",generic_error:"Упс, что-то пошло не так"},time:{ms:"мс",milisecond:"милисекунда",miliseconds:"милисекунд",s:"с",sec:"сек",secs:"сек",second:"секунда",seconds:"секунд",min:"мин",mins:"мин",minute:"минута",minutes:"минут",hr:"ч",hrs:"ч",hour:"час",hours:"часов",day:"день",days:"дней",now:"Сейчас"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Conéctate a la extensión de Chrome de Metamask.",button:"Conectar MetaMask"},connect_ledger:{description:"Conéctate y firma tus transacciones con tu ",link_text:"Ledger Wallet",link_title:"Compra un Ledger hardware wallet",button:"Conectar Ledger"},connect_trezor:{description:"Conéctate y firma tus transacciones con tu ",link_text:"Trezor Wallet",link_title:"Compra un Trezor hardware wallet",button:"Conectar Trezor"},connect_walletconnect:{description:"Conéctate y firmat con tu wallet móvil de WalletConnect.",button:"Conectar Wallet Connect"},coming_soon:"Próximamente."},account:{tab_balances:"Saldos",tab_transactions:"Transacciones",tab_interactions:"Interacciones",tab_balances_tooltip:"Saldos de Ethereum y Tokens",tab_transactions_tooltip:"Transacciones y Transferencias de Tokens",tab_interactions_tooltip:"Interacciones de Smart Contracts",label_asset:"Activo",label_quantity:"Cantidad",label_price:"Precio",label_24h:"24h",label_status:"Estado",label_total:"Total",show:"Mostrar",hide:"Esconder",token:"token",tokens:"tokens",no_market_value:"sin valor de mercado",low_market_value:"con bajo valor de mercado",tx_hash:"Hash de Transacción",tx_timestamp:"Fecha/Hora",tx_fee:"Tarifa",tx_to:"Hacia",tx_from:"Desde",tx_self:"Yo",tx_sent:"Enviado",tx_received:"Recibido",tx_failed:"Fallido",tx_pending:"Pendiente",show_all:"Mostrar todo",show_less:"Mostrar menos",unknown_token:"Token Desconocido"},button:{connect_walletconnect:"Utilizar WalletConnect",donate:"Donar ETH",exchange:"Cambiar",send:"Enviar",receive:"Recibir",close:"Cerrar",cancel:"Cancelar",go_back:"Regressar",send_another:"Enviar otro",notify_me:"Ser notificado",try_again:"Intentar otra vez"},input:{recipient_address:"Recipiente Dirección",private_key:"Llave Privada",asset_amount:"Cantidad",donation_address:"Balance Manager Dirección",email:"Email",password:"Password",input_text:"Input",email_placeholder:"tu@email.com",password_placeholder:"••••••••••",input_placeholder:"Escribe aquí"},modal:{receive_title:"Recibir a {{walletName}}",exchange_title:"Intercambiar de {{walletName}}",send_title:"Enviar de {{walletName}}",approve_tx:"Aprobar transacción en {{walletType}}",confirm_tx:"Confirmar transacción de {{walletName}}",invalid_address:"Dirección inválida",send_max:"Enviar máximo",exchange_max:"Intercambiar máximo",default_wallet:" Cartera",gas_slow:"Lento",gas_average:"Medio",donate_title:"Enviar de {{walletName}} a Balance Manager",gas_fast:"Rápido",gas_fee:"Tarifa",tx_confirm_sender:"Remitente",tx_confirm_recipient:"Recipiente",tx_confirm_amount:"Cantidad",tx_confirm_fee:"Tarifa de transacción",tx_hash:"Hash de Transacción",tx_verify:"Verifique su transacción aquí",deposit_dropdown_label:"Intercambiar mi",withdrawal_dropdown_label:"por",deposit_input_label:"Pagar",withdrawal_input_label:"Obtener",tx_fee:"Tarifa de transacción",exchange_fee:"Tarifa de cambio"},message:{web3_not_available:"Instala la extension de Chrome de MetaMask",web3_not_unlocked:"Por favor desbloquear su cartera MetaMask",web3_unknown_network:"Red desconocida, por favor cambie a otro",page_not_found:"404 Página no encontrada",coming_soon:"Próximamente...",click_to_copy_to_clipboard:"Haz clic para copiar al clipboard",failed_request:"Solicitud fallida, por favor refrescar",failed_ledger_connection:"Error al conectar a Ledger, por favor verifica tu dispositivo",failed_trezor_connection:"Error al conectar a Trezor, por favor verifica tu dispositivo",no_transactions:"No se encontraron transacciones para esta cuenta",no_interactions:"No se encontraron interacciones para esta cuenta",please_connect_ledger:"Por favor conecta y desbloquea Ledger y luego selecciona Ethereum",please_connect_trezor:"Por favor conecta y desbloquea Trezor y luego selecciona Ethereum",exchange_not_available:"Intercambio no está disponible en su área",learn_more:"Aprende más"},notification:{error:{no_accounts_found:"No se encontraron cuentas de Ethereum",invalid_address:"Dirección inválida, verifica nuevamente",insufficient_balance:"Saldo insuficiente en esta cuenta",insufficient_for_fees:"Saldo insuficiente para cubrir las tarifas de transacción",invalid_address_scanned:"Dirección inválida escaneada, intenta nuevamente",invalid_private_key_scanned:"Llave privada inválida, intenta nuevamente",failed_scanning_qr_code:"Error al escanear el código QR, intenta nuevamente",failed_get_gas_prices:"Error al obtener los precios de Gas Ethereum",failed_get_tx_fee:"Error al estimar la tarifa de transacción",failed_get_account_tx:"Error al obtener transacciones de cuenta",generic_error:"Algo salió mal, intenta nuevamente"},info:{address_copied_to_clipboard:"Dirección copiada al clipboard"}},warning:{user_is_offline:"Conexión offline, por favor verifica tu conexión a Internet",user_is_online:"¡Conectado! Estás de vuelta online"},subscribe_form:{email_already_subscribed:"Lo sentimos, ya te has registrado con este correo electrónico",too_many_signup_request:"Demasiadas solicitudes de registro, inténtalo de nuevo más tarde",successful:"Verifica tu email",sending:"Enviando...",generic_error:"Uy! Algo salió mal"},time:{ms:"ms",milisecond:"milisegundo",miliseconds:"milisegundos",s:"s",sec:"seg",secs:"segs",second:"segundo",seconds:"segundos",min:"min",mins:"mins",minute:"minuto",minutes:"minutos",hr:"hr",hrs:"hrs",hour:"hora",hours:"horas",day:"dia",days:"dias"}}}},function(t){t.exports={translation:{homepage:{connect_metamask:{description:"Połącz z rozszerzeniem przegląrki Chrome MetaMask",button:"Połącz z MetaMask"},connect_ledger:{description:"Połącz za pomocą ",link_text:"Sprzętowego portfela Ledger",link_title:"Kup portfel sprzętowy Ledger",button:"Połącz z Ledger"},connect_trezor:{description:"Połącz i podpisuj za pomocą ",link_text:"Portfel sprzętowy Trezor ",link_title:"Kup portfel Trezor ",button:"Połącz z Trezor "},connect_walletconnect:"Podłącz i podpisz za pomocą WalletConnect-wspierającego portfela mobilnego.",coming_soon:"Dostępne wkrótce."},account:{tab_balances:"Saldo",tab_transactions:"Transakcje",tab_interactions:"Interakcje",tab_uniquetokens:"Unikalne Tokeny",tab_balances_tooltip:"Stany kont Ethereum i tokenów",tab_transactions_tooltip:"Transakcje i transfery tokenów",tab_interactions_tooltip:"Interakcje z smart contractem",tab_uniquetokens_tooltip:"Unikalne tokeny",label_asset:"Aktywa",label_quantity:"Ilość",label_price:"Cena",label_24h:"24h",label_status:"Status",label_total:"Podsumowanie",show:"Pokaż",hide:"Schowaj",token:"token",tokens:"tokeny",no_market_value:"bez wartości rynkowej",low_market_value:"z niewielką wartością rynkową",tx_hash:"Hash transakcji",tx_timestamp:"Znacznik czasu",tx_fee:"Opłata",tx_to:"To",tx_from:"Od",tx_self:"Własna",tx_sent:"Wysłano",tx_received:"Odebrano",tx_failed:"Niepowodzenie",tx_pending:"W trakcie",show_all:"Pokaż wszystkie",show_less:"Pokaż mniej",unknown_token:"Unikalny token"},button:{connect_walletconnect:"Użyj WalletConnect",exchange:"Wymiana",send:"Wyślij",donate:"Donacja ETH",receive:"Odbierz",close:"Zamknij",confirm:"Potwierdź",cancel:"Anuluj",go_back:"Wstecz",send_another:"Wyślij kolejną",exchange_again:"Wymień ponownie",notify_me:"Powiadom mnie",try_again:"Spróbuj ponownie",learn_more:"Dowiedz się więcej",view:"Zobacz"},input:{recipient_address:"Adres odbiorcy",private_key:"Prywatny klucz",donation_address:"Adres Balance Manager",asset_amount:"Ilość",email:"Email",password:"Hasło",input_text:"Wprowadź",email_placeholder:"your@email.com",password_placeholder:"••••••••••",input_placeholder:"Wpisz tutaj"},modal:{receive_title:"Odbierz do{{walletName}}",exchange_title:"Wymień z {{walletName}}",donate_title:"Wyślij z {{walletName}} do Balance Manager",send_title:"Wyślij z {{walletName}}",approve_tx:"Zatwierdź transakcję {{walletType}}",confirm_tx:"Zatwierdź  transakcję z {{walletName}}",invalid_address:"Nieprawdiłowy adres",send_max:"Wyślij wszystko",exchange_max:"Wymień wszystko",default_wallet:" Portfel",gas_slow:"Powolnie",gas_average:"Średnio",gas_fast:"Szybko",gas_fee:"Opłata",tx_confirm_sender:"Nadawca",tx_confirm_recipient:"Odbiorca",tx_confirm_amount:"Ilość",tx_confirm_fee:"Opłata transakcyjna",tx_hash:"Hash transakcji",tx_verify:"Zweryfikuj swoją transakcję tutaj",deposit_dropdown_label:"Wymień moje",withdrawal_dropdown_label:"Na",deposit_input_label:"Płać",withdrawal_input_label:"Otrzymaj",tx_fee:"Opłata transakcyjna",exchange_fee:"Opłata wymiany",previous_short:"poprzednie.",new:"Nowa",helper_balance:"Saldo",helper_value:"Wartość",helper_rate:"Rata",helper_price:"Cena",helper_min:"Min",helper_max:"Max"},message:{web3_not_available:"Proszę zainstalować rozszerzenie Chrome MetaMask",web3_not_unlocked:"Proszę odblokować swój portfel MetaMask",web3_unknown_network:"Nieznana sieć, prosze zmień na inną",page_not_found:"404 Nie znaleziono",coming_soon:"Wkrótce ...",click_to_copy_to_clipboard:"Skopiuj do schowka",failed_request:"Nieudane zapytanie, spróbuj ponownie",failed_ledger_connection:"Nieudane połączenie z Ledger, sprawdź urządzenie",failed_trezor_connection:"Nieudane połączenie z Trezor, sprawdź urządzenie",failed_trezor_popup_blocked:"Włącz pop-up aby używać Trezora z Balance",no_transactions:"Nie znaleziono transakcji dla tego konta",no_unique_tokens:"Brak unikatowych tokenów",no_interactions:"Brak transakcji dla tego konta",please_connect_ledger:"Proszę wybierz i podłącz Ledger a następnie wybierz Ethereum",please_connect_trezor:"Połącz Trezora i podążaj za instrukcjami",opensea_footer:" to rynek unikalnych tokenów. Ich wartość wynika z handlu na rynku. Możesz zastawić swój token aby otrzymać pieniądze. Wszystko działa na sieci Ethereum ",opensea_header:"Jak to działa od środka?",power_by:"Napędzane przez",exchange_not_available:"Wymiana nie jest dostępna w twojej lokalizacji",learn_more:"Dowiedz się więcej"},notification:{error:{no_accounts_found:"Nie znaleziono kont Ethereum",invalid_address:"Adres nieprawidłowy, sprawdź ponownie",insufficient_balance:"Niewystarczające saldo na tym koncie",insufficient_for_fees:"Niewystarczające saldo na pokrycie opłaty transakcyjnej",invalid_address_scanned:"Zeskanowany adres nieprawdiłowy, spróbuj ponownie",invalid_private_key_scanned:"Nieprawidłowy klucz prywatny zeskanowany, spróbuj ponownie",failed_scanning_qr_code:"Nieudana próba skanu QR, spróbuj jeszcze raz",failed_get_gas_prices:"Nie można było pobrać opłat transakcyjnych ethereum (Gas)",failed_get_tx_fee:"Nieduana estymacja opłat transakcyjnych",failed_get_account_tx:"Nieudane pobranie transakcji",generic_error:"Coś się popsuło, spróbuj ponownie"},info:{address_copied_to_clipboard:"Adres skopiowany do schowka"}},warning:{user_is_offline:"Połączenie zerwane, sprawdź swoją sieć",user_is_online:"Połączony! Jesteś online"},subscribe_form:{email_already_subscribed:"Adres już zapisany",too_many_signup_request:"Za dużo zapytań, sprawdź póżniej",successful:"Sprawdź swój email",sending:"Wysyłam...",generic_error:"Ups, coś się popsuło"},time:{ms:"ms",milisecond:"milisekunda",miliseconds:"milisekund",s:"s",sec:"sekunda",secs:"sekund",second:"second",seconds:"sekundy",min:"m",mins:"minut",minute:"minuta",minutes:"minuty",hr:"hr",hrs:"hrs",hour:"godzina",hours:"godziny",day:"dzień",days:"dni",now:"Teraz"}}}},function(t,e,n){"use strict";var r=n(25),i=n(174),o=n(419),a=n(126);function s(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=s(a);u.Axios=o,u.create=function(t){return s(r.merge(a,t))},u.Cancel=n(178),u.CancelToken=n(433),u.isCancel=n(177),u.all=function(t){return Promise.all(t)},u.spread=n(434),t.exports=u,t.exports.default=u},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ -t.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,r){"use strict";var n=r(45),i=r(9),o=r(152),a=r(153);function s(t){this.defaults=t,this.interceptors={request:new o,response:new o}}s.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),(t=i.merge(n,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[a,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)r=r.then(e.shift(),e.shift());return r},i.forEach(["delete","get","head","options"],function(t){s.prototype[t]=function(e,r){return this.request(i.merge(r||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){s.prototype[t]=function(e,r,n){return this.request(i.merge(n||{},{method:t,url:e,data:r}))}}),t.exports=s},function(t,e,r){"use strict";var n=r(9);t.exports=function(t,e){n.forEach(t,function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])})}},function(t,e,r){"use strict";var n=r(65);t.exports=function(t,e,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?e(n("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}},function(t,e,r){"use strict";t.exports=function(t,e,r,n,i){return t.config=e,r&&(t.code=r),t.request=n,t.response=i,t}},function(t,e,r){"use strict";var n=r(9);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var o;if(r)o=r(e);else if(n.isURLSearchParams(e))o=e.toString();else{var a=[];n.forEach(e,function(t,e){null!==t&&void 0!==t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))}))}),o=a.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,r){"use strict";var n=r(9),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,r,o,a={};return t?(n.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=n.trim(t.substr(0,o)).toLowerCase(),r=n.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}}),a):a}},function(t,e,r){"use strict";var n=r(9);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(e){var r=n.isString(e)?i(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,r,o=String(t),a="",s=0,u=n;o.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&e>>8-s%1*8)){if((r=o.charCodeAt(s+=.75))>255)throw new i;e=e<<8|r}return a}},function(t,e,r){"use strict";var n=r(9);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,r){"use strict";var n=r(9);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){n.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},function(t,e,r){"use strict";var n=r(9),i=r(154),o=r(66),a=r(45),s=r(155),u=r(156);function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.baseURL&&!s(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return c(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(c(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,r){"use strict";var n=r(9);t.exports=function(t,e,r){return n.forEach(r,function(r){t=r(t,e)}),t}},function(t,e,r){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,r){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";var n=r(67);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var r=this;t(function(t){r.reason||(r.reason=new n(t),e(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){var n;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c="[BigNumber Error] ",h=c+"Number primitive has more than 15 significant digits: ",f=1e14,l=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,v=1e9;function g(t){var e=0|t;return t>0||t===e?e:e-1}function b(t){for(var e,r,n=1,i=t.length,o=t[0]+"";nc^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;ao[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function _(t,e,r,n){if(tr||t!==(t<0?s(t):u(t)))throw Error(c+(n||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+t)}function w(t){return"[object Array]"==Object.prototype.toString.call(t)}function M(t){var e=t.c.length-1;return g(t.e/l)==e&&t.c[e]%2!=0}function x(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function k(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else e=10;f/=10,c++);return g.e=c,void(g.c=[t])}v=t+""}else{if(!a.test(v=t+""))return i(g,v,p);g.s=45==v.charCodeAt(0)?(v=v.slice(1),-1):1}(c=v.indexOf("."))>-1&&(v=v.replace(".","")),(f=v.search(/e/i))>0?(c<0&&(c=f),c+=+v.slice(f+1),v=v.substring(0,f)):c<0&&(c=v.length)}else{if(_(e,2,B.length,"Base"),v=t+"",10==e)return D(g=new L(t instanceof L?t:v),A+g.e+1,E);if(p="number"==typeof t){if(0*t!=0)return i(g,v,p,e);if(g.s=1/t<0?(v=v.slice(1),-1):1,L.DEBUG&&v.replace(/^0\.0*|\./,"").length>15)throw Error(h+t);p=!1}else g.s=45===v.charCodeAt(0)?(v=v.slice(1),-1):1;for(r=B.slice(0,e),c=f=0,m=v.length;fc){c=m;continue}}else if(!s&&(v==v.toUpperCase()&&(v=v.toLowerCase())||v==v.toLowerCase()&&(v=v.toUpperCase()))){s=!0,f=-1,c=0;continue}return i(g,t+"",p,e)}(c=(v=n(v,e,10,g.s)).indexOf("."))>-1?v=v.replace(".",""):c=v.length}for(f=0;48===v.charCodeAt(f);f++);for(m=v.length;48===v.charCodeAt(--m););if(v=v.slice(f,++m)){if(m-=f,p&&L.DEBUG&&m>15&&(t>d||t!==u(t)))throw Error(h+g.s*t);if((c=c-f-1)>N)g.c=g.e=null;else if(cs){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function q(t,e){var r,n,i=0;for(w(t[0])&&(t=t[0]),r=new L(t[0]);++i=10;i/=10,n++);return(r=n+r*l-1)>N?t.c=t.e=null:r=10;c/=10,i++);if((o=e-i)<0)o+=l,a=e,m=(h=v[d=0])/g[i-a-1]%10|0;else if((d=s((o+1)/l))>=v.length){if(!n)break t;for(;v.length<=d;v.push(0));h=m=0,i=1,a=(o%=l)-l+1}else{for(h=c=v[d],i=1;c>=10;c/=10,i++);m=(a=(o%=l)-l+i)<0?0:h/g[i-a-1]%10|0}if(n=n||e<0||null!=v[d+1]||(a<0?h:h%g[i-a-1]),n=r<4?(m||n)&&(0==r||r==(t.s<0?3:2)):m>5||5==m&&(4==r||n||6==r&&(o>0?a>0?h/g[i-a]:0:v[d-1])%10&1||r==(t.s<0?8:7)),e<1||!v[0])return v.length=0,n?(e-=t.e+1,v[0]=g[(l-e%l)%l],t.e=-e||0):v[0]=t.e=0,t;if(0==o?(v.length=d,c=1,d--):(v.length=d+1,c=g[l-o],v[d]=a>0?u(h/g[i-a]%g[a])*c:0),n)for(;;){if(0==d){for(o=1,a=v[0];a>=10;a/=10,o++);for(a=v[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(t.e++,v[0]==f&&(v[0]=1));break}if(v[d]+=c,v[d]!=f)break;v[d--]=0,c=1}for(o=v.length;0===v[--o];v.pop());}t.e>N?t.c=t.e=null:t.e>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[h]=n[0],r[h+1]=n[1]):(f.push(a%1e14),h+=2);h=o/2}else{if(!crypto.randomBytes)throw O=!1,Error(c+"crypto unavailable");for(r=crypto.randomBytes(o*=7);h=9e15?crypto.randomBytes(7).copy(r,h):(f.push(a%1e14),h+=7);h=o/7}if(!O)for(;h=10;a/=10,h++);hr-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(e,n,i,o,a){var s,u,c,h,f,l,d,p,m=e.indexOf("."),v=A,g=E;for(m>=0&&(h=R,R=0,e=e.replace(".",""),l=(p=new L(n)).pow(e.length-m),R=h,p.c=t(k(b(l.c),l.e,"0"),10,i,"0123456789"),p.e=p.c.length),c=h=(d=t(e,n,i,a?(s=B,"0123456789"):(s="0123456789",B))).length;0==d[--h];d.pop());if(!d[0])return s.charAt(0);if(m<0?--c:(l.c=d,l.e=c,l.s=o,d=(l=r(l,p,v,g,i)).c,f=l.r,c=l.e),m=d[u=c+v+1],h=i/2,f=f||u<0||null!=d[u+1],f=g<4?(null!=m||f)&&(0==g||g==(l.s<0?3:2)):m>h||m==h&&(4==g||f||6==g&&1&d[u-1]||g==(l.s<0?8:7)),u<1||!d[0])e=f?k(s.charAt(1),-v,s.charAt(0)):s.charAt(0);else{if(d.length=u,f)for(--i;++d[--u]>i;)d[u]=0,u||(++c,d=[1].concat(d));for(h=d.length;!d[--h];);for(m=0,e="";m<=h;e+=s.charAt(d[m++]));e=k(e,c,s.charAt(0))}return e}}(),r=function(){function t(t,e,r){var n,i,o,a,s=0,u=t.length,c=e%m,h=e/m|0;for(t=t.slice();u--;)s=((i=c*(o=t[u]%m)+(n=h*o+(a=t[u]/m|0)*c)%m*m+s)/r|0)+(n/m|0)+h*a,t[u]=i%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]1;t.splice(0,1));}return function(n,i,o,a,s){var c,h,d,p,m,v,b,y,_,w,M,x,k,S,A,E,T,C=n.s==i.s?1:-1,P=n.c,N=i.c;if(!(P&&P[0]&&N&&N[0]))return new L(n.s&&i.s&&(P?!N||P[0]!=N[0]:N)?P&&0==P[0]||!N?0*C:C/0:NaN);for(_=(y=new L(C)).c=[],C=o+(h=n.e-i.e)+1,s||(s=f,h=g(n.e/l)-g(i.e/l),C=C/l|0),d=0;N[d]==(P[d]||0);d++);if(N[d]>(P[d]||0)&&h--,C<0)_.push(1),p=!0;else{for(S=P.length,E=N.length,d=0,C+=2,(m=u(s/(N[0]+1)))>1&&(N=t(N,m,s),P=t(P,m,s),E=N.length,S=P.length),k=E,M=(w=P.slice(0,E)).length;M=s/2&&A++;do{if(m=0,(c=e(N,w,E,M))<0){if(x=w[0],E!=M&&(x=x*s+(w[1]||0)),(m=u(x/A))>1)for(m>=s&&(m=s-1),b=(v=t(N,m,s)).length,M=w.length;1==e(v,w,b,M);)m--,r(v,E=10;C/=10,d++);D(y,o+(y.e=d+h*l-1)+1,a,p)}else y.e=h,y.r=+p;return y}}(),i=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var h,f=s?a:a.replace(i,"");if(n.test(f))o.s=isNaN(f)?null:f<0?-1:1,o.c=o.e=null;else{if(!s&&(f=f.replace(t,function(t,e,r){return h="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=h?t:e}),u&&(h=u,f=f.replace(e,"$1").replace(r,"0.$1")),a!=f))return new L(f,h);if(L.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+a);o.c=o.e=o.s=null}}}(),o.absoluteValue=o.abs=function(){var t=new L(this);return t.s<0&&(t.s=1),t},o.comparedTo=function(t,e){return y(this,new L(t,e))},o.decimalPlaces=o.dp=function(t,e){var r,n,i,o=this;if(null!=t)return _(t,0,v),null==e?e=E:_(e,0,8),D(new L(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=((i=r.length-1)-g(this.e/l))*l,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},o.dividedBy=o.div=function(t,e){return r(this,new L(t,e),A,E)},o.dividedToIntegerBy=o.idiv=function(t,e){return r(this,new L(t,e),0,1)},o.exponentiatedBy=o.pow=function(t,e){var r,n,i,o,a,h,f,d=this;if((t=new L(t)).c&&!t.isInteger())throw Error(c+"Exponent not an integer: "+t);if(null!=e&&(e=new L(e)),o=t.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!t.c||!t.c[0])return f=new L(Math.pow(+d.valueOf(),o?2-M(t):+t)),e?f.mod(e):f;if(a=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new L(NaN);(n=!a&&d.isInteger()&&e.isInteger())&&(d=d.mod(e))}else{if(t.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||o&&d.c[1]>=24e7:d.c[0]<8e13||o&&d.c[0]<=9999975e7)))return i=d.s<0&&M(t)?-0:0,d.e>-1&&(i=1/i),new L(a?1/i:i);R&&(i=s(R/l+2))}for(o?(r=new L(.5),h=M(t)):h=t%2,a&&(t.s=1),f=new L(S);;){if(h){if(!(f=f.times(d)).c)break;i?f.c.length>i&&(f.c.length=i):n&&(f=f.mod(e))}if(o){if(D(t=t.times(r),t.e+1,1),!t.c[0])break;o=t.e>14,h=M(t)}else{if(!(t=u(t/2)))break;h=t%2}d=d.times(d),i?d.c&&d.c.length>i&&(d.c.length=i):n&&(d=d.mod(e))}return n?f:(a&&(f=S.div(f)),e?f.mod(e):i?D(f,R,E,void 0):f)},o.integerValue=function(t){var e=new L(this);return null==t?t=E:_(t,0,8),D(e,e.e+1,t)},o.isEqualTo=o.eq=function(t,e){return 0===y(this,new L(t,e))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(t,e){return y(this,new L(t,e))>0},o.isGreaterThanOrEqualTo=o.gte=function(t,e){return 1===(e=y(this,new L(t,e)))||0===e},o.isInteger=function(){return!!this.c&&g(this.e/l)>this.c.length-2},o.isLessThan=o.lt=function(t,e){return y(this,new L(t,e))<0},o.isLessThanOrEqualTo=o.lte=function(t,e){return-1===(e=y(this,new L(t,e)))||0===e},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(t,e){var r,n,i,o,a=this,s=a.s;if(e=(t=new L(t,e)).s,!s||!e)return new L(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/l,c=t.e/l,h=a.c,d=t.c;if(!u||!c){if(!h||!d)return h?(t.s=-e,t):new L(d?a:NaN);if(!h[0]||!d[0])return d[0]?(t.s=-e,t):new L(h[0]?a:3==E?-0:0)}if(u=g(u),c=g(c),h=h.slice(),s=u-c){for((o=s<0)?(s=-s,i=h):(c=u,i=d),i.reverse(),e=s;e--;i.push(0));i.reverse()}else for(n=(o=(s=h.length)<(e=d.length))?s:e,s=e=0;e0)for(;e--;h[r++]=0);for(e=f-1;n>s;){if(h[--n]=0;){for(r=0,p=x[i]%_,v=x[i]/_|0,o=i+(a=u);o>i;)r=((c=p*(c=M[--a]%_)+(s=v*c+(h=M[a]/_|0)*p)%_*_+b[o]+r)/y|0)+(s/_|0)+v*h,b[o--]=c%y;b[o]=r}return r?++n:b.splice(0,1),z(t,b,n)},o.negated=function(){var t=new L(this);return t.s=-t.s||null,t},o.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new L(t,e)).s,!i||!e)return new L(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/l,a=t.e/l,s=n.c,u=t.c;if(!o||!a){if(!s||!u)return new L(i/0);if(!s[0]||!u[0])return u[0]?t:new L(s[0]?n:0*i)}if(o=g(o),a=g(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(e=u.length)<0&&(r=u,u=s,s=r,e=i),i=0;e;)i=(s[--e]=s[e]+u[e]+i)/f|0,s[e]=f===s[e]?0:s[e]%f;return i&&(s=[i].concat(s),++a),z(t,s,a)},o.precision=o.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return _(t,1,v),null==e?e=E:_(e,0,8),D(new L(o),t,e);if(!(r=o.c))return null;if(n=(i=r.length-1)*l+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},o.shiftedBy=function(t){return _(t,-d,d),this.times("1e"+t)},o.squareRoot=o.sqrt=function(){var t,e,n,i,o,a=this,s=a.c,u=a.s,c=a.e,h=A+4,f=new L("0.5");if(1!==u||!s||!s[0])return new L(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+a))||u==1/0?(((e=b(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(e),c=g((c+1)/2)-(c<0||c%2),n=new L(e=u==1/0?"1e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):n=new L(u+""),n.c[0])for((u=(c=n.e)+h)<3&&(u=0);;)if(o=n,n=f.times(o.plus(r(a,o,h,1))),b(o.c).slice(0,u)===(e=b(n.c)).slice(0,u)){if(n.e0&&l>0){for(n=l%o||o,u=f.substr(0,n);n0&&(u+=s+f.slice(n)),h&&(u="-"+u)}r=c?u+j.decimalSeparator+((a=+j.fractionGroupSize)?c.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+j.fractionGroupSeparator):c):u}return r},o.toFraction=function(t){var e,n,i,o,a,s,u,h,f,d,m,v,g=this,y=g.c;if(null!=t&&(!(h=new L(t)).isInteger()&&(h.c||1!==h.s)||h.lt(S)))throw Error(c+"Argument "+(h.isInteger()?"out of range: ":"not an integer: ")+t);if(!y)return g.toString();for(n=new L(S),d=i=new L(S),o=f=new L(S),v=b(y),s=n.e=v.length-g.e-1,n.c[0]=p[(u=s%l)<0?l+u:u],t=!t||h.comparedTo(n)>0?s>0?n:d:h,u=N,N=1/0,h=new L(v),f.c[0]=0;m=r(h,n,0,1),1!=(a=i.plus(m.times(o))).comparedTo(t);)i=o,o=a,d=f.plus(m.times(a=d)),f=a,n=h.minus(m.times(a=n)),h=a;return a=r(t.minus(i),o,0,1),f=f.plus(a.times(d)),i=i.plus(a.times(o)),f.s=d.s=g.s,e=r(d,o,s*=2,E).minus(g).abs().comparedTo(r(f,i,s,E).minus(g).abs())<1?[d.toString(),o.toString()]:[f.toString(),i.toString()],N=u,e},o.toNumber=function(){return+this},o.toPrecision=function(t,e){return null!=t&&_(t,1,v),U(this,t,e,2)},o.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(e=b(r.c),null==t?e=o<=T||o>=C?x(e,o):k(e,o,"0"):(_(t,2,B.length,"Base"),e=n(k(e,o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},o.valueOf=o.toJSON=function(){var t,e=this,r=e.e;return null===r?e.toString():(t=b(e.c),t=r<=T||r>=C?x(t,r):k(t,r,"0"),e.s<0?"-"+t:t)},o._isBigNumber=!0,null!=e&&L.set(e),L}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(e,r,e,t))||(t.exports=n)}()},function(t,e,r){"use strict";var n=r(161).version,i=r(17),o=r(214),a=r(38),s=r(88),u=r(308),c=r(309),h=r(10),f=function(){var t=this;i.packageInit(this,arguments),this.version=n,this.utils=h,this.eth=new o(this),this.shh=new u(this),this.bzz=new c(this);var e=this.setProvider;this.setProvider=function(r,n){return e.apply(t,arguments),this.eth.setProvider(r,n),this.shh.setProvider(r,n),this.bzz.setProvider(r),!0}};f.version=n,f.utils=h,f.modules={Eth:o,Net:a,Personal:s,Shh:u,Bzz:c},i.addProviders(f),t.exports=f},function(t){t.exports={name:"web3",namespace:"ethereum",version:"1.0.0-beta.35",description:"Ethereum JavaScript API",repository:"https://github.com/ethereum/web3.js/tree/master/packages/web3",license:"LGPL-3.0",main:"src/index.js",types:"index.d.ts",bugs:{url:"https://github.com/ethereum/web3.js/issues"},keywords:["Ethereum","JavaScript","API"],author:"ethereum.org",authors:[{name:"Fabian Vogelsteller",email:"fabian@ethereum.org",homepage:"http://frozeman.de"},{name:"Marek Kotewicz",email:"marek@parity.io",url:"https://github.com/debris"},{name:"Marian Oancea",url:"https://github.com/cubedro"},{name:"Gav Wood",email:"g@parity.io",homepage:"http://gavwood.com"},{name:"Jeffery Wilcke",email:"jeffrey.wilcke@ethereum.org",url:"https://github.com/obscuren"}],dependencies:{"web3-bzz":"1.0.0-beta.35","web3-core":"1.0.0-beta.35","web3-eth":"1.0.0-beta.35","web3-eth-personal":"1.0.0-beta.35","web3-net":"1.0.0-beta.35","web3-shh":"1.0.0-beta.35","web3-utils":"1.0.0-beta.35"}}},function(t,e,r){"use strict";var n=r(5),i=r(6).errors,o=r(76),a=r(178),s=r(179),u=function t(e){this.provider=null,this.providers=t.providers,this.setProvider(e),this.subscriptions={}};u.givenProvider=s,u.providers={WebsocketProvider:r(180),HttpProvider:r(189),IpcProvider:r(208)},u.prototype.setProvider=function(t,e){var r=this;if(t&&"string"==typeof t&&this.providers)if(/^http(s)?:\/\//i.test(t))t=new this.providers.HttpProvider(t);else if(/^ws(s)?:\/\//i.test(t))t=new this.providers.WebsocketProvider(t);else if(t&&"object"==typeof e&&"function"==typeof e.connect)t=new this.providers.IpcProvider(t,e);else if(t)throw new Error("Can't autodetect provider for \""+t+'"');this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=t||null,this.provider&&this.provider.on&&this.provider.on("data",function(t,e){(t=t||e).method&&r.subscriptions[t.params.subscription]&&r.subscriptions[t.params.subscription].callback&&r.subscriptions[t.params.subscription].callback(null,t.params.result)})},u.prototype.send=function(t,e){if(e=e||function(){},!this.provider)return e(i.InvalidProvider());var r=o.toPayload(t.method,t.params);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,function(t,n){return n&&n.id&&r.id!==n.id?e(new Error('Wrong response id "'+n.id+'" (expected: "'+r.id+'") in '+JSON.stringify(r))):t?e(t):n&&n.error?e(i.ErrorResponse(n)):o.isValidResponse(n)?void e(null,n.result):e(i.InvalidResponse(n))})},u.prototype.sendBatch=function(t,e){if(!this.provider)return e(i.InvalidProvider());var r=o.toBatchPayload(t);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,function(t,r){return t?e(t):n.isArray(r)?void e(null,r):e(i.InvalidResponse(r))})},u.prototype.addSubscription=function(t,e,r,n){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions[t]={callback:n,type:r,name:e}},u.prototype.removeSubscription=function(t,e){this.subscriptions[t]&&(this.send({method:this.subscriptions[t].type+"_unsubscribe",params:[t]},e),delete this.subscriptions[t])},u.prototype.clearSubscriptions=function(t){var e=this;Object.keys(this.subscriptions).forEach(function(r){t&&"syncing"===e.subscriptions[r].name||e.removeSubscription(r)}),this.provider.reset&&this.provider.reset()},t.exports={Manager:u,BatchManager:a}},function(t,e,r){"use strict";t.exports={ErrorResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:JSON.stringify(t);return new Error("Returned error: "+e)},InvalidNumberOfParams:function(t,e,r){return new Error('Invalid number of parameters for "'+r+'". Got '+t+" expected "+e+"!")},InvalidConnection:function(t){return new Error("CONNECTION ERROR: Couldn't connect to node "+t+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:"Invalid JSON RPC response: "+JSON.stringify(t);return new Error(e)},ConnectionTimeout:function(t){return new Error("CONNECTION TIMEOUT: timeout of "+t+" ms achived")}}},function(t,e,r){"use strict";var n=r(5),i=r(10),o=r(75),a=function(t){return i.toBN(t).toString(10)},s=function(t){if(void 0!==t)return function(t){return"latest"===t||"pending"===t||"earliest"===t}(t)?t:i.isHexStrict(t)?n.isString(t)?t.toLowerCase():t:i.numberToHex(t)},u=function(t){if(t.to&&(t.to=f(t.to)),t.data&&t.input)throw new Error('You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.');if(!t.data&&t.input&&(t.data=t.input,delete t.input),t.data&&!i.isHex(t.data))throw new Error("The data field must be HEX encoded data.");return(t.gas||t.gasLimit)&&(t.gas=t.gas||t.gasLimit),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=i.numberToHex(t[e])}),t},c=function(t){return null!==t.blockNumber&&(t.blockNumber=i.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=i.hexToNumber(t.transactionIndex)),t.nonce=i.hexToNumber(t.nonce),t.gas=i.hexToNumber(t.gas),t.gasPrice=a(t.gasPrice),t.value=a(t.value),t.to&&i.isAddress(t.to)?t.to=i.toChecksumAddress(t.to):t.to=null,t.from&&(t.from=i.toChecksumAddress(t.from)),t},h=function(t){if("string"==typeof t.blockHash&&"string"==typeof t.transactionHash&&"string"==typeof t.logIndex){var e=i.sha3(t.blockHash.replace("0x","")+t.transactionHash.replace("0x","")+t.logIndex.replace("0x",""));t.id="log_"+e.replace("0x","").substr(0,8)}else t.id||(t.id=null);return null!==t.blockNumber&&(t.blockNumber=i.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=i.hexToNumber(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=i.hexToNumber(t.logIndex)),t.address&&(t.address=i.toChecksumAddress(t.address)),t},f=function(t){var e=new o(t);if(e.isValid()&&e.isDirect())return e.toAddress().toLowerCase();if(i.isAddress(t))return"0x"+t.toLowerCase().replace("0x","");throw new Error('Provided address "'+t+"\" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.")};t.exports={inputDefaultBlockNumberFormatter:function(t){return!this||void 0!==t&&null!==t?"genesis"===t||"earliest"===t?"0x0":s(t):this.defaultBlock},inputBlockNumberFormatter:s,inputCallFormatter:function(t){var e=(t=u(t)).from||(this?this.defaultAccount:null);return e&&(t.from=f(e)),t},inputTransactionFormatter:function(t){if(t=u(t),!n.isNumber(t.from)&&!n.isObject(t.from)){if(t.from=t.from||(this?this.defaultAccount:null),!t.from&&!n.isNumber(t.from))throw new Error('The send transactions "from" field must be defined!');t.from=f(t.from)}return t},inputAddressFormatter:f,inputPostFormatter:function(t){return t.ttl&&(t.ttl=i.numberToHex(t.ttl)),t.workToProve&&(t.workToProve=i.numberToHex(t.workToProve)),t.priority&&(t.priority=i.numberToHex(t.priority)),n.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map(function(t){return 0===t.indexOf("0x")?t:i.fromUtf8(t)}),t},inputLogFormatter:function(t){var e=function(t){return null===t||void 0===t?null:0===(t=String(t)).indexOf("0x")?t:i.fromUtf8(t)};return t.topics=t.topics||[],t.topics=t.topics.map(function(t){return n.isArray(t)?t.map(e):e(t)}),e=null,t.address&&(t.address=n.isArray(t.address)?t.address.map(function(t){return f(t)}):f(t.address)),t},inputSignFormatter:function(t){return i.isHexStrict(t)?t:i.utf8ToHex(t)},outputBigNumberFormatter:a,outputTransactionFormatter:c,outputTransactionReceiptFormatter:function(t){if("object"!=typeof t)throw new Error("Received receipt is invalid: "+t);return null!==t.blockNumber&&(t.blockNumber=i.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=i.hexToNumber(t.transactionIndex)),t.cumulativeGasUsed=i.hexToNumber(t.cumulativeGasUsed),t.gasUsed=i.hexToNumber(t.gasUsed),n.isArray(t.logs)&&(t.logs=t.logs.map(h)),t.contractAddress&&(t.contractAddress=i.toChecksumAddress(t.contractAddress)),void 0!==t.status&&(t.status=Boolean(parseInt(t.status))),t},outputBlockFormatter:function(t){return t.gasLimit=i.hexToNumber(t.gasLimit),t.gasUsed=i.hexToNumber(t.gasUsed),t.size=i.hexToNumber(t.size),t.timestamp=i.hexToNumber(t.timestamp),null!==t.number&&(t.number=i.hexToNumber(t.number)),t.difficulty&&(t.difficulty=a(t.difficulty)),t.totalDifficulty&&(t.totalDifficulty=a(t.totalDifficulty)),n.isArray(t.transactions)&&t.transactions.forEach(function(t){if(!n.isString(t))return c(t)}),t.miner&&(t.miner=i.toChecksumAddress(t.miner)),t},outputLogFormatter:h,outputPostFormatter:function(t){return t.expiry=i.hexToNumber(t.expiry),t.sent=i.hexToNumber(t.sent),t.ttl=i.hexToNumber(t.ttl),t.workProved=i.hexToNumber(t.workProved),t.topics||(t.topics=[]),t.topics=t.topics.map(function(t){return i.toUtf8(t)}),t},outputSyncingFormatter:function(t){return t.startingBlock=i.hexToNumber(t.startingBlock),t.currentBlock=i.hexToNumber(t.currentBlock),t.highestBlock=i.hexToNumber(t.highestBlock),t.knownStates&&(t.knownStates=i.hexToNumber(t.knownStates),t.pulledStates=i.hexToNumber(t.pulledStates)),t}}},function(t,e,r){"use strict";var n=r(166),i=r(71),o=new n(0),a=new n(-1),s={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function u(t){var e=t?t.toLowerCase():"ether",r=s[e];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+t+" doesn't exists, please use the one of the following units "+JSON.stringify(s,null,2));return new n(r,10)}function c(t){if("string"==typeof t){if(!t.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+t+"', should be a number matching (^-?[0-9.]+).");return t}if("number"==typeof t)return String(t);if("object"==typeof t&&t.toString&&(t.toTwos||t.dividedToIntegerBy))return t.toPrecision?String(t.toPrecision()):t.toString(10);throw new Error("while converting number to string, invalid number value '"+t+"' type "+typeof t+".")}t.exports={unitMap:s,numberToString:c,getValueOfUnit:u,fromWei:function(t,e,r){var n=i(t),c=n.lt(o),h=u(e),f=s[e].length-1||1,l=r||{};c&&(n=n.mul(a));for(var d=n.mod(h).toString(10);d.length2)throw new Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal points");var l=f[0],d=f[1];if(l||(l="0"),d||(d="0"),d.length>o)throw new Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal places");for(;d.length=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(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,c=0,h=r;h1&&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 c=["","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"],h=[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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(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,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(t=t||10,e=0|e||1,16===t||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+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 l=h[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+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!==a),this.toArrayLike(a,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,s,u="le"===e,c=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),c[s]=a;for(;s=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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,b=v>>>13,y=0|a[3],_=8191&y,w=y>>>13,M=0|a[4],x=8191&M,k=M>>>13,S=0|a[5],A=8191&S,E=S>>>13,T=0|a[6],C=8191&T,P=T>>>13,N=0|a[7],O=8191&N,I=N>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,q=L>>>13,z=0|s[0],D=8191&z,F=z>>>13,H=0|s[1],G=8191&H,K=H>>>13,W=0|s[2],V=8191&W,Z=W>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ht=0|s[8],ft=8191&ht,lt=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,D)|0))<<13)|0;c=((o=Math.imul(l,F))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,F))+Math.imul(m,D)|0,o=Math.imul(m,F);var gt=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,D),i=(i=Math.imul(g,F))+Math.imul(b,D)|0,o=Math.imul(b,F),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(_,D),i=(i=Math.imul(_,F))+Math.imul(w,D)|0,o=Math.imul(w,F),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,D),i=(i=Math.imul(x,F))+Math.imul(k,D)|0,o=Math.imul(k,F),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,F))+Math.imul(E,D)|0,o=Math.imul(E,F),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(C,D),i=(i=Math.imul(C,F))+Math.imul(P,D)|0,o=Math.imul(P,F),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,D),i=(i=Math.imul(O,F))+Math.imul(I,D)|0,o=Math.imul(I,F),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,D),i=(i=Math.imul(j,F))+Math.imul(B,D)|0,o=Math.imul(B,F),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,F))+Math.imul(q,D)|0,o=Math.imul(q,F),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,K))+Math.imul(q,G)|0,o=Math.imul(q,K),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(g,ft)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var At=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,Z))+Math.imul(q,V)|0,o=Math.imul(q,Z),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(q,$)|0,o=Math.imul(q,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var Tt=(c+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(j,rt)|0,i=(i=i+Math.imul(j,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(q,ot)|0,o=Math.imul(q,at),n=n+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,lt)|0;var Nt=(c+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(q,ut)|0,o=Math.imul(q,ct),n=n+Math.imul(j,ft)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,lt))+Math.imul(q,ft)|0,o=Math.imul(q,lt);var It=(c+(n=n+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(q,pt)|0))<<13)|0;return c=((o=Math.imul(q,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=bt,u[3]=yt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=kt,u[9]=St,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Nt,u[16]=Ot,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(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)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.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=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&s}return u&&0!==h&&(u.words[u.length++]=h),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)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;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 s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=l)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},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,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(e.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},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,s&=67108863,this.words[a]=s}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,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=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 M(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 v={k256:null,p224:null,p192:null,p25519:null};function g(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 b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(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 x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.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(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.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")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.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)},M.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},M.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)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.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 s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();n(v=0;n--){for(var c=e.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===h)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.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)},x.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)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(14)(t))},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){for(var e,r=c(t),n=r[0],a=r[1],s=new o(function(t,e,r){return 3*(e+r)/4-r}(0,n,a)),u=0,h=a>0?n-4:n,f=0;f>16&255,s[u++]=e>>8&255,s[u++]=255&e;2===a&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,s[u++]=255&e);1===a&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e);return s},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;as?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function f(t,e,r){for(var n,i=[],o=e;o>1,h=-7,f=r?i-1:0,l=r?-1:1,d=t[e+f];for(f+=l,o=d&(1<<-h)-1,d>>=-h,h+=s;h>0;o=256*o+t[e+f],f+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+t[e+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=h?(s=0,a=h):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,c-=8);t[r+d-p]|=128*m}},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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(1).Buffer}catch(t){}function s(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 u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(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,c=0,h=r;h1&&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 c=["","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"],h=[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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(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,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(t=t||10,e=0|e||1,16===t||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+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 l=h[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+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!==a),this.toArrayLike(a,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,s,u="le"===e,c=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),c[s]=a;for(;s=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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,b=v>>>13,y=0|a[3],_=8191&y,w=y>>>13,M=0|a[4],x=8191&M,k=M>>>13,S=0|a[5],A=8191&S,E=S>>>13,T=0|a[6],C=8191&T,P=T>>>13,N=0|a[7],O=8191&N,I=N>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,q=L>>>13,z=0|s[0],D=8191&z,F=z>>>13,H=0|s[1],G=8191&H,K=H>>>13,W=0|s[2],V=8191&W,Z=W>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ht=0|s[8],ft=8191&ht,lt=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,D)|0))<<13)|0;c=((o=Math.imul(l,F))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,F))+Math.imul(m,D)|0,o=Math.imul(m,F);var gt=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,D),i=(i=Math.imul(g,F))+Math.imul(b,D)|0,o=Math.imul(b,F),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(_,D),i=(i=Math.imul(_,F))+Math.imul(w,D)|0,o=Math.imul(w,F),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,D),i=(i=Math.imul(x,F))+Math.imul(k,D)|0,o=Math.imul(k,F),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,F))+Math.imul(E,D)|0,o=Math.imul(E,F),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(C,D),i=(i=Math.imul(C,F))+Math.imul(P,D)|0,o=Math.imul(P,F),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,D),i=(i=Math.imul(O,F))+Math.imul(I,D)|0,o=Math.imul(I,F),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,D),i=(i=Math.imul(j,F))+Math.imul(B,D)|0,o=Math.imul(B,F),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,F))+Math.imul(q,D)|0,o=Math.imul(q,F),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,K))+Math.imul(q,G)|0,o=Math.imul(q,K),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(g,ft)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var At=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,Z))+Math.imul(q,V)|0,o=Math.imul(q,Z),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(q,$)|0,o=Math.imul(q,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var Tt=(c+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(j,rt)|0,i=(i=i+Math.imul(j,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(q,ot)|0,o=Math.imul(q,at),n=n+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,lt)|0;var Nt=(c+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(q,ut)|0,o=Math.imul(q,ct),n=n+Math.imul(j,ft)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,lt))+Math.imul(q,ft)|0,o=Math.imul(q,lt);var It=(c+(n=n+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(q,pt)|0))<<13)|0;return c=((o=Math.imul(q,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=bt,u[3]=yt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=kt,u[9]=St,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Nt,u[16]=Ot,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(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)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.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=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&s}return u&&0!==h&&(u.words[u.length++]=h),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)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;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 s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=l)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},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,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(e.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},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,s&=67108863,this.words[a]=s}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,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=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 M(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 v={k256:null,p224:null,p192:null,p25519:null};function g(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 b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(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 x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.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(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.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")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.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)},M.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},M.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)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.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 s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();n(v=0;n--){for(var c=e.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===h)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.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)},x.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)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(14)(t))},function(t,e,r){var n=r(171);t.exports=function(t){return"string"!=typeof t?t:n(t)?t.slice(2):t}},function(t,e){t.exports=function(t){if("string"!=typeof t)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},function(t,e,r){(function(t,n){var i;/*! https://mths.be/utf8js v2.0.0 by @mathias */!function(o){var a="object"==typeof e&&e,s=("object"==typeof t&&t&&t.exports,"object"==typeof n&&n);s.global!==s&&s.window;var u,c,h,f=String.fromCharCode;function l(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function p(t,e){return f(t>>e&63|128)}function m(t){if(0==(4294967168&t))return f(t);var e="";return 0==(4294965248&t)?e=f(t>>6&31|192):0==(4294901760&t)?(d(t),e=f(t>>12&15|224),e+=p(t,6)):0==(4292870144&t)&&(e=f(t>>18&7|240),e+=p(t,12),e+=p(t,6)),e+=f(63&t|128)}function v(){if(h>=c)throw Error("Invalid byte index");var t=255&u[h];if(h++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function g(){var t,e;if(h>c)throw Error("Invalid byte index");if(h==c)return!1;if(t=255&u[h],h++,0==(128&t))return t;if(192==(224&t)){if((e=(31&t)<<6|v())>=128)return e;throw Error("Invalid continuation byte")}if(224==(240&t)){if((e=(15&t)<<12|v()<<6|v())>=2048)return d(e),e;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=(15&t)<<18|v()<<12|v()<<6|v())>=65536&&e<=1114111)return e;throw Error("Invalid UTF-8 detected")}var b={version:"2.0.0",encode:function(t){for(var e=l(t),r=e.length,n=-1,i="";++n65535&&(i+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),i+=f(e);return i}(r)}};void 0===(i=function(){return b}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(14)(t),r(4))},function(t,e,r){var n=r(5),i=r(73),o=r(72),a=function(t){var e=typeof t;if("string"===e)return o.isHexStrict(t)?new i(t.replace(/0x/i,""),16):new i(t,10);if("number"===e)return new i(t);if(o.isBigNumber(t))return new i(t.toString(10));if(o.isBN(t))return t;throw new Error(t+" is not a number")},s=function(t,e,r){var n,s;if("bytes"===(t=function(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}(t))){if(e.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+e.length);return e}if("string"===t)return o.utf8ToHex(e);if("bool"===t)return e?"01":"00";if(t.startsWith("address")){if(n=r?64:40,!o.isAddress(e))throw new Error(e+" is not a valid address, or the checksum is invalid.");return o.leftPad(e.toLowerCase(),n)}if(n=function(t){var e=/^\D+(\d+).*$/.exec(t);return e?parseInt(e[1],10):null}(t),t.startsWith("bytes")){if(!n)throw new Error("bytes[] not yet supported in solidity");if(r&&(n=32),n<1||n>32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(e)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(t.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(e)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+t)},u=function(t){if(n.isArray(t))throw new Error("Autodetection of array types is not supported.");var e,r,a="";if(n.isObject(t)&&(t.hasOwnProperty("v")||t.hasOwnProperty("t")||t.hasOwnProperty("value")||t.hasOwnProperty("type"))?(e=t.hasOwnProperty("t")?t.t:t.type,a=t.hasOwnProperty("v")?t.v:t.value):(e=o.toHex(t,!0),a=o.toHex(t),e.startsWith("int")||e.startsWith("uint")||(e="bytes")),!e.startsWith("int")&&!e.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),n.isArray(a)){if((r=function(t){var e=/^\D+\d*\[(\d+)\]$/.exec(t);return e?parseInt(e[1],10):null}(e))&&a.length!==r)throw new Error(e+" is not matching the given array "+JSON.stringify(a));r=a.length}return n.isArray(a)?a.map(function(t){return s(e,t,r).toString("hex").replace("0x","")}).join(""):s(e,a,r).toString("hex").replace("0x","")};t.exports=function(){var t=Array.prototype.slice.call(arguments),e=n.map(t,u);return o.sha3("0x"+e.join(""))}},function(t,e,r){t.exports=function(t,e){var n=r(175),i="function"==typeof e;if(t>65536){if(!i)throw new Error("Requested too many random bytes.");e(new Error("Requested too many random bytes."))}if(void 0!==n&&n.randomBytes){if(!i)return"0x"+n.randomBytes(t).toString("hex");n.randomBytes(t,function(t,r){t?e(u):e(null,"0x"+r.toString("hex"))})}else{var o;if(void 0!==n?o=n:"undefined"!=typeof msCrypto&&(o=msCrypto),o&&o.getRandomValues){var a=o.getRandomValues(new Uint8Array(t)),s="0x"+Array.from(a).map(function(t){return t.toString(16)}).join("");if(!i)return s;e(null,s)}else{var u=new Error('No "crypto" object available. This Browser doesn\'t support generating secure random bytes.');if(!i)throw u;e(u)}}}},function(t,e,r){t.exports=r(176)},function(t,e){t.exports=window.crypto},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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(1).Buffer}catch(t){}function s(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 u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(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,c=0,h=r;h1&&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 c=["","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"],h=[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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(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,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(t=t||10,e=0|e||1,16===t||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+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 l=h[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+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!==a),this.toArrayLike(a,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,s,u="le"===e,c=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),c[s]=a;for(;s=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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,b=v>>>13,y=0|a[3],_=8191&y,w=y>>>13,M=0|a[4],x=8191&M,k=M>>>13,S=0|a[5],A=8191&S,E=S>>>13,T=0|a[6],C=8191&T,P=T>>>13,N=0|a[7],O=8191&N,I=N>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,q=L>>>13,z=0|s[0],D=8191&z,F=z>>>13,H=0|s[1],G=8191&H,K=H>>>13,W=0|s[2],V=8191&W,Z=W>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ht=0|s[8],ft=8191&ht,lt=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,D)|0))<<13)|0;c=((o=Math.imul(l,F))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,F))+Math.imul(m,D)|0,o=Math.imul(m,F);var gt=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,D),i=(i=Math.imul(g,F))+Math.imul(b,D)|0,o=Math.imul(b,F),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(_,D),i=(i=Math.imul(_,F))+Math.imul(w,D)|0,o=Math.imul(w,F),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,D),i=(i=Math.imul(x,F))+Math.imul(k,D)|0,o=Math.imul(k,F),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,F))+Math.imul(E,D)|0,o=Math.imul(E,F),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(C,D),i=(i=Math.imul(C,F))+Math.imul(P,D)|0,o=Math.imul(P,F),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,D),i=(i=Math.imul(O,F))+Math.imul(I,D)|0,o=Math.imul(I,F),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,D),i=(i=Math.imul(j,F))+Math.imul(B,D)|0,o=Math.imul(B,F),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,F))+Math.imul(q,D)|0,o=Math.imul(q,F),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,K))+Math.imul(q,G)|0,o=Math.imul(q,K),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(g,ft)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var At=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,Z))+Math.imul(q,V)|0,o=Math.imul(q,Z),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(q,$)|0,o=Math.imul(q,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var Tt=(c+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(j,rt)|0,i=(i=i+Math.imul(j,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(q,ot)|0,o=Math.imul(q,at),n=n+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,lt)|0;var Nt=(c+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(q,ut)|0,o=Math.imul(q,ct),n=n+Math.imul(j,ft)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,lt))+Math.imul(q,ft)|0,o=Math.imul(q,lt);var It=(c+(n=n+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(q,pt)|0))<<13)|0;return c=((o=Math.imul(q,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=bt,u[3]=yt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=kt,u[9]=St,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Nt,u[16]=Ot,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(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)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.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=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&s}return u&&0!==h&&(u.words[u.length++]=h),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)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;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 s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=l)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},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,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(e.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},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,s&=67108863,this.words[a]=s}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,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=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 M(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 v={k256:null,p224:null,p192:null,p25519:null};function g(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 b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(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 x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.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(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.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")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.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)},M.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},M.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)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.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 s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();n(v=0;n--){for(var c=e.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===h)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.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)},x.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)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(14)(t))},function(t,e,r){"use strict";var n=r(76),i=r(6).errors,o=function(t){this.requestManager=t,this.requests=[]};o.prototype.add=function(t){this.requests.push(t)},o.prototype.execute=function(){var t=this.requests;this.requestManager.sendBatch(t,function(e,r){r=r||[],t.map(function(t,e){return r[e]||{}}).forEach(function(e,r){if(t[r].callback){if(e&&e.error)return t[r].callback(i.ErrorResponse(e));if(!n.isValidResponse(e))return t[r].callback(i.InvalidResponse(e));try{t[r].callback(null,t[r].format?t[r].format(e.result):e.result)}catch(e){t[r].callback(e)}}})})},t.exports=o},function(t,e,r){"use strict";var n=null,i=Function("return this")();void 0!==i.ethereumProvider?n=i.ethereumProvider:void 0!==i.web3&&i.web3.currentProvider&&(i.web3.currentProvider.sendAsync&&(i.web3.currentProvider.send=i.web3.currentProvider.sendAsync,delete i.web3.currentProvider.sendAsync),!i.web3.currentProvider.on&&i.web3.currentProvider.connection&&"ipcProviderWrapper"===i.web3.currentProvider.connection.constructor.name&&(i.web3.currentProvider.on=function(t,e){if("function"!=typeof e)throw new Error("The second parameter callback must be a function.");switch(t){case"data":this.connection.on("data",function(t){var r="";t=t.toString();try{r=JSON.parse(t)}catch(r){return e(new Error("Couldn't parse response data"+t))}r.id||-1===r.method.indexOf("_subscription")||e(null,r)});break;default:this.connection.on(t,e)}}),n=i.web3.currentProvider),t.exports=n},function(t,e,r){"use strict";(function(e){var n=r(5),i=r(6).errors,o=null,a=null,s=null;if("undefined"!=typeof window&&void 0!==window.WebSocket)o=window.WebSocket,a=btoa,s=function(t){return new URL(t)};else{o=r(181).w3cwebsocket,a=function(t){return e(t).toString("base64")};var u=r(24);if(u.URL){var c=u.URL;s=function(t){return new c(t)}}else s=r(24).parse}var h=function(t,e){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],e=e||{},this._customTimeout=e.timeout;var i=s(t),u=e.headers||{},c=e.protocol||void 0;i.username&&i.password&&(u.authorization="Basic "+a(i.username+":"+i.password)),this.connection=new o(t,c,void 0,u),this.addDefaultEvents(),this.connection.onmessage=function(t){var e="string"==typeof t.data?t.data:"";r._parseResponse(e).forEach(function(t){var e=null;n.isArray(t)?t.forEach(function(t){r.responseCallbacks[t.id]&&(e=t.id)}):e=t.id,e||-1===t.method.indexOf("_subscription")?r.responseCallbacks[e]&&(r.responseCallbacks[e](null,t),delete r.responseCallbacks[e]):r.notificationCallbacks.forEach(function(e){n.isFunction(e)&&e(t)})})},Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0})};h.prototype.addDefaultEvents=function(){var t=this;this.connection.onerror=function(){t._timeout()},this.connection.onclose=function(){t._timeout(),t.reset()}},h.prototype._parseResponse=function(t){var e=this,r=[];return t.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(t){e.lastChunk&&(t=e.lastChunk+t);var n=null;try{n=JSON.parse(t)}catch(r){return e.lastChunk=t,clearTimeout(e.lastChunkTimeout),void(e.lastChunkTimeout=setTimeout(function(){throw e._timeout(),i.InvalidResponse(t)},15e3))}clearTimeout(e.lastChunkTimeout),e.lastChunk=null,n&&r.push(n)}),r},h.prototype._addResponseCallback=function(t,e){var r=t.id||t[0].id,n=t.method||t[0].method;this.responseCallbacks[r]=e,this.responseCallbacks[r].method=n;var o=this;this._customTimeout&&setTimeout(function(){o.responseCallbacks[r]&&(o.responseCallbacks[r](i.ConnectionTimeout(o._customTimeout)),delete o.responseCallbacks[r])},this._customTimeout)},h.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](i.InvalidConnection("on WS")),delete this.responseCallbacks[t])},h.prototype.send=function(t,e){var r=this;if(this.connection.readyState!==this.connection.CONNECTING){if(this.connection.readyState!==this.connection.OPEN)return console.error("connection not open on send()"),"function"==typeof this.connection.onerror?this.connection.onerror(new Error("connection not open")):console.error("no error callback"),void e(new Error("connection not open"));this.connection.send(JSON.stringify(t)),this._addResponseCallback(t,e)}else setTimeout(function(){r.send(t,e)},10)},h.prototype.on=function(t,e){if("function"!=typeof e)throw new Error("The second parameter callback must be a function.");switch(t){case"data":this.notificationCallbacks.push(e);break;case"connect":this.connection.onopen=e;break;case"end":this.connection.onclose=e;break;case"error":this.connection.onerror=e}},h.prototype.removeListener=function(t,e){var r=this;switch(t){case"data":this.notificationCallbacks.forEach(function(t,n){t===e&&r.notificationCallbacks.splice(n,1)})}},h.prototype.removeAllListeners=function(t){switch(t){case"data":this.notificationCallbacks=[];break;case"connect":this.connection.onopen=null;break;case"end":this.connection.onclose=null;break;case"error":this.connection.onerror=null}},h.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.addDefaultEvents()},t.exports=h}).call(this,r(1).Buffer)},function(t,e,r){var n=function(){return this||{}}(),i=n.WebSocket||n.MozWebSocket,o=r(182);function a(t,e){return e?new i(t,e):new i(t)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach(function(t){Object.defineProperty(a,t,{get:function(){return i[t]}})}),t.exports={w3cwebsocket:i?a:null,version:o}},function(t,e,r){t.exports=r(183).version},function(t){t.exports={name:"websocket",description:"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.",keywords:["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],author:"Brian McKelvey (https://www.worlize.com/)",contributors:["Iñaki Baz Castillo (http://dev.sipdoc.net)"],version:"1.0.26",repository:{type:"git",url:"https://github.com/theturtle32/WebSocket-Node.git"},homepage:"https://github.com/theturtle32/WebSocket-Node",engines:{node:">=0.10.0"},dependencies:{debug:"^2.2.0",nan:"^2.3.3","typedarray-to-buffer":"^3.1.2",yaeti:"^0.0.6"},devDependencies:{"buffer-equal":"^1.0.0",faucet:"^0.0.1",gulp:"git+https://github.com/gulpjs/gulp.git#4.0","gulp-jshint":"^2.0.4","jshint-stylish":"^2.2.1",jshint:"^2.0.0",tape:"^4.0.1"},config:{verbose:!1},scripts:{install:"(node-gyp rebuild 2> builderror.log) || (exit 0)",test:"faucet test/unit",gulp:"gulp"},main:"index",directories:{lib:"./lib"},browser:"lib/browser.js",license:"Apache-2.0"}},function(t,e,r){(function(t,n){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){"object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType;var a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=36,h=1,f=26,l=38,d=700,p=72,m=128,v="-",g=/^xn--/,b=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=c-h,M=Math.floor,x=String.fromCharCode;function k(t){throw new RangeError(_[t])}function S(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function A(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+S((t=t.replace(y,".")).split("."),e).join(".")}function E(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=x((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=x(t)}).join("")}function C(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:c}function P(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function N(t,e,r){var n=0;for(t=r?M(t/d):t>>1,t+=M(t/e);t>w*f>>1;n+=c)t=M(t/w);return M(n+(w+1)*t/(t+l))}function O(t){var e,r,n,i,o,a,s,l,d,g,b=[],y=t.length,_=0,w=m,x=p;for((r=t.lastIndexOf(v))<0&&(r=0),n=0;n=128&&k("not-basic"),b.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=y&&k("invalid-input"),((l=C(t.charCodeAt(i++)))>=c||l>M((u-_)/a))&&k("overflow"),_+=l*a,!(l<(d=s<=x?h:s>=x+f?f:s-x));s+=c)a>M(u/(g=c-d))&&k("overflow"),a*=g;x=N(_-o,e=b.length+1,0==o),M(_/e)>u-w&&k("overflow"),w+=M(_/e),_%=e,b.splice(_++,0,w)}return T(b)}function I(t){var e,r,n,i,o,a,s,l,d,g,b,y,_,w,S,A=[];for(y=(t=E(t)).length,e=m,r=0,o=p,a=0;a=e&&bM((u-r)/(_=n+1))&&k("overflow"),r+=(s-e)*_,e=s,a=0;au&&k("overflow"),b==e){for(l=r,d=c;!(l<(g=d<=o?h:d>=o+f?f:d-o));d+=c)S=l-g,w=c-g,A.push(x(P(g+S%w,0))),l=M(S/w);A.push(x(P(l,0))),o=N(r,_,n==i),r=0,++n}++r,++e}return A.join("")}s={version:"1.4.1",ucs2:{decode:E,encode:T},decode:O,encode:I,toASCII:function(t){return A(t,function(t){return b.test(t)?"xn--"+I(t):t})},toUnicode:function(t){return A(t,function(t){return g.test(t)?O(t.slice(4).toLowerCase()):t})}},void 0===(i=function(){return s}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(14)(t),r(4))},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";e.decode=e.parse=r(187),e.encode=e.stringify=r(188)},function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,o){e=e||"&",r=r||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var h=0;h=0?(f=m.substr(0,v),l=m.substr(v+1)):(f=m,l=""),d=decodeURIComponent(f),p=decodeURIComponent(l),n(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?o(a(t),function(a){var s=encodeURIComponent(n(a))+r;return i(t[a])?o(t[a],function(t){return s+encodeURIComponent(n(t))}).join(e):s+encodeURIComponent(n(t[a]))}).join(e):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n=0)return this._url=this._parseUrl(e.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),null!=this._headers["Content-Type"]&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=e,this._response.on("data",function(t){return n._onHttpResponseData(e,t)}),this._response.on("end",function(){return n._onHttpResponseEnd(e)}),this._response.on("close",function(){return n._onHttpResponseClose(e)}),this.responseUrl=this._url.href.split("#")[0],this.status=e.statusCode,this.statusText=a.STATUS_CODES[this.status],this._parseResponseHeaders(e);var i=this._responseHeaders["content-length"]||"";this._totalBytes=+i,this._lengthComputable=!!i,this._setReadyState(r.HEADERS_RECEIVED)}},r.prototype._onHttpResponseData=function(t,e){this._response===t&&(this._responseParts.push(new n(e)),this._loadedBytes+=e.length,this.readyState!==r.LOADING&&this._setReadyState(r.LOADING),this._dispatchProgress("progress"))},r.prototype._onHttpResponseEnd=function(t){this._response===t&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(r.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},r.prototype._onHttpResponseClose=function(t){if(this._response===t){var e=this._request;this._setError(),e.abort(),this._setReadyState(r.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},r.prototype._onHttpTimeout=function(t){this._request===t&&(this._setError(),t.abort(),this._setReadyState(r.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},r.prototype._onHttpRequestError=function(t,e){this._request===t&&(this._setError(),t.abort(),this._setReadyState(r.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},r.prototype._dispatchProgress=function(t){var e=new r.ProgressEvent(t);e.lengthComputable=this._lengthComputable,e.loaded=this._loadedBytes,e.total=this._totalBytes,this.dispatchEvent(e)},r.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},r.prototype._parseUrl=function(t,e,r){var n=null==this.nodejsBaseUrl?t:c.resolve(this.nodejsBaseUrl,t),i=c.parse(n,!1,!0);i.hash=null;var o=(i.auth||"").split(":"),a=o[0],s=o[1];return(a||s||e||r)&&(i.auth=(e||a||"")+":"+(r||s||"")),i},r.prototype._parseResponseHeaders=function(t){for(var e in this._responseHeaders={},t.headers){var r=e.toLowerCase();this._privateHeaders[r]||(this._responseHeaders[r]=t.headers[e])}null!=this._mimeOverride&&(this._responseHeaders["content-type"]=this._mimeOverride)},r.prototype._parseResponse=function(){var t=n.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(t.toString("utf-8"))}catch(t){this.response=null}return;case"buffer":return this.responseText=null,void(this.response=t);case"arraybuffer":this.responseText=null;for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),i=0;i0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e=n.allocUnsafe(t>>>0),r=this.head,i=0;r;)o(r.data,e,i),i+=r.data.length,r=r.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(197),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(4))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i=1,o={},a=!1,s=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){h(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&h(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),n=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){h(t.data)},n=function(e){t.port2.postMessage(e)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var t=s.documentElement;n=function(e){var r=s.createElement("script");r.onreadystatechange=function(){h(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():n=function(t){setTimeout(h,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r0;)if(D+=r,r=t.charAt(a++),4===F?(j+=String.fromCharCode(parseInt(D,16)),F=0,c=a-1):F++,!r)break t;if('"'===r&&!L){q=z.pop()||p,j+=t.substring(c,a-1);break}if(!("\\"!==r||L||(L=!0,j+=t.substring(c,a-1),r=t.charAt(a++))))break;if(L){if(L=!1,"n"===r?j+="\n":"r"===r?j+="\r":"t"===r?j+="\t":"f"===r?j+="\f":"b"===r?j+="\b":"u"===r?(F=1,D=""):j+=r,r=t.charAt(a++),c=a-1,r)continue;break}f.lastIndex=a;var l=f.exec(t);if(!l){a=t.length+1,j+=t.substring(c,a-1);break}if(a=l.index+1,!(r=t.charAt(l.index))){j+=t.substring(c,a-1);break}}continue;case M:if(!r)continue;if("r"!==r)return V("Invalid true started with t"+r);q=x;continue;case x:if(!r)continue;if("u"!==r)return V("Invalid true started with tr"+r);q=k;continue;case k:if(!r)continue;if("e"!==r)return V("Invalid true started with tru"+r);o(!0),s(),q=z.pop()||p;continue;case S:if(!r)continue;if("a"!==r)return V("Invalid false started with f"+r);q=A;continue;case A:if(!r)continue;if("l"!==r)return V("Invalid false started with fa"+r);q=E;continue;case E:if(!r)continue;if("s"!==r)return V("Invalid false started with fal"+r);q=T;continue;case T:if(!r)continue;if("e"!==r)return V("Invalid false started with fals"+r);o(!1),s(),q=z.pop()||p;continue;case C:if(!r)continue;if("u"!==r)return V("Invalid null started with n"+r);q=P;continue;case P:if(!r)continue;if("l"!==r)return V("Invalid null started with nu"+r);q=N;continue;case N:if(!r)continue;if("l"!==r)return V("Invalid null started with nul"+r);o(null),s(),q=z.pop()||p;continue;case O:if("."!==r)return V("Leading zero not followed by .");B+=r,q=I;continue;case I:if(-1!=="0123456789".indexOf(r))B+=r;else if("."===r){if(-1!==B.indexOf("."))return V("Invalid number has two dots");B+=r}else if("e"===r||"E"===r){if(-1!==B.indexOf("e")||-1!==B.indexOf("E"))return V("Invalid number has two exponential");B+=r}else if("+"===r||"-"===r){if("e"!==n&&"E"!==n)return V("Invalid symbol in number");B+=r}else B&&(o(parseFloat(B)),s(),B=""),a--,q=z.pop()||p;continue;default:return V("Unknown state: "+q)}G>=R&&function(){var t=0;j!==u&&j.length>h&&(V("Max buffer length exceeded: textNode"),t=Math.max(t,j.length)),B.length>h&&(V("Max buffer length exceeded: numberNode"),t=Math.max(t,B.length)),R=h-t+G}()}),t(Q).on(function(){if(q==d)return o({}),s(),void(U=!0);q===p&&0===H||V("Unexpected end");j!==u&&(o(j),s(),j=u);U=!0})}var j=function(){var t=p(function(t){return t.unshift(/^/),function(t){return t.exec.bind(t)}(RegExp(t.map(f("source")).join("")))}),e=/(\$?)/,r=/(?:{([\w ]*?)})?/,n=t(e,/([\w-_]+|\*)/,r),i=t(e,/\["([^"]+)"\]/,r),o=t(e,/\[(\d+|\*)\]/,r),a=t(e,/()/,/{([\w ]*?)}/),s=t(/\.\./),u=t(/\./),c=t(e,/!/),h=t(/$/);return function(t){return t(l(n,i,o,a),s,u,c,h)}}();function B(t,e){return{key:t,node:e}}var L=f("key"),U=f("node"),q={};function z(t){var e=t(G).emit,r=t(K).emit,n=t($).emit,i=t(X).emit;function a(t,e,r){U(S(t))[e]=r}function s(t,r,n){t&&a(t,r,n);var i=x(B(r,n),t);return e(i),i}var u={};return u[rt]=function(t,e){if(!t)return n(e),s(t,q,e);var r=function(t,e){var r=U(S(t));return b(o,r)?s(t,y(r),e):t}(t,e),i=A(r),u=L(S(r));return a(i,u,e),x(B(u,e),i)},u[nt]=function(t){return r(t),A(t)||i(U(S(t)))},u[et]=s,u}var D=j(function(t,e,r,n,i){var o=1,s=2,u=3,f=h(L,S),d=h(U,S);function p(t,e){return!!e[o]?m(t,S):t}function v(t){if(t==g)return g;return m(function(t){return f(t)!=q},h(t,A))}function b(){return function(t){return f(t)==q}}function _(t,e,r,n,i){var o=t(r);if(o){var a=function(t,e,r){return N(function(t,e){return e(t,r)},e,t)}(e,n,o);return i(r.substr(y(o[0])),a)}}function w(t,e){return c(_,t,e)}var x=l(w(t,T(p,function(t,e){var r=e[u];return r?m(h(c(M,E(r.split(/\W+/))),d),t):t},function(t,e){var r=e[s];return m(r&&"*"!=r?function(t){return f(t)==r}:g,t)},v)),w(e,T(function(t){if(t==g)return g;var e=b(),r=t,n=v(function(t){return i(t)}),i=l(e,r,n);return i})),w(r,T()),w(n,T(p,b)),w(i,T(function(t){return function(e){var r=t(e);return!0===r?S(e):r}})),function(t){throw a('"'+t+'" could not be tokenised')});function k(t,e){return e}function C(t,e){return x(t,e,t?C:k)}return function(t){try{return C(t,g)}catch(e){throw a('Could not compile "'+t+'" because '+e.message)}}});function F(t,e,r){var n,i;function o(t){return function(e){return e.id==t}}return{on:function(r,o){var a={listener:r,id:o||r};return e&&e.emit(t,r,a.id),n=x(a,n),i=x(r,i),this},emit:function(){!function t(e,r){e&&(S(e).apply(null,r),t(A(e),r))}(i,arguments)},un:function(e){var a;n=O(n,o(e),function(t){a=t}),a&&(i=O(i,function(t){return t==a.listener}),r&&r.emit(t,a.listener,a.id))},listeners:function(){return i},hasListener:function(t){return w(function t(e,r){return r&&(e(S(r))?S(r):t(e,A(r)))}(t?o(t):g,n))}}}var H=1,G=H++,K=H++,W=H++,V=H++,Z="fail",X=H++,$=H++,Y="start",J="data",Q="end",tt=H++,et=H++,rt=H++,nt=H++;function it(t,e,r){try{var n=s.parse(e)}catch(t){}return{statusCode:t,body:e,jsonBody:n,thrown:r}}function ot(t,e){var r={node:t(K),path:t(G)};function n(e,r,n){var i=t(e).emit;r.on(function(t){var e=n(t);!1!==e&&function(t,e,r){var n=I(r);t(e,C(A(P(L,n))),C(P(U,n)))}(i,U(e),t)},e),t("removeListener").on(function(n){n==e&&(t(n).listeners()||r.un(e))})}t("newListener").on(function(t){var i=/(node|path):(.*)/.exec(t);if(i){var o=r[i[1]];o.hasListener(t)||n(t,o,e(i[2]))}})}function at(t,e){var r,n=/^(node|path):./,i=t(X),o=t(V).emit,a=t(W).emit,s=p(function(e,i){if(r[e])d(i,r[e]);else{var o=t(e),a=i[0];n.test(e)?u(o,a):o.on(a)}return r});function u(t,e,n){n=n||e;var i=h(e);return t.on(function(){var e=!1;r.forget=function(){e=!0},d(arguments,i),delete r.forget,e&&t.un(n)},n),r}function h(t){return function(){try{return t.apply(r,arguments)}catch(t){setTimeout(function(){throw t})}}}function f(e,r,n){var i;i="node"==e?function(t){return function(){var e=t.apply(this,arguments);w(e)&&(e==ct.drop?o():a(e))}}(n):n,u(function(e,r){return t(e+":"+r)}(e,r),i,n)}function l(t,e,n){return _(e)?f(t,e,n):function(t,e){for(var r in e)f(t,r,e[r])}(t,e),r}return t($).on(function(t){r.root=function(t){return function(){return t}}(t)}),t(Y).on(function(t,e){r.header=function(t){return t?e[t]:e}}),r={on:s,addListener:s,removeListener:function(e,n,o){if("done"==e)i.un(n);else if("node"==e||"path"==e)t.un(e+":"+n,o);else{var a=n;t(e).un(a)}return r},emit:t.emit,node:c(l,"node"),path:c(l,"path"),done:c(u,i),start:c(function(e,n){return t(e).on(h(n),n),r},Y),fail:t(Z).on,abort:t(tt).emit,header:v,root:v,source:e}}function st(t,e,n,i,o){var a=function(){var t={},e=n("newListener"),r=n("removeListener");function n(n){return t[n]=F(n,e,r)}function i(e){return t[e]||n(e)}return["emit","on","un"].forEach(function(t){i[t]=p(function(e,r){d(r,i(e)[t])})}),i}();return e&&function(t,e,n,i,o,a,s){"use strict";var h=t(J).emit,f=t(Z).emit,l=0,d=!0;function p(){var t=e.responseText,r=t.substr(l);r&&h(r),l=y(t)}t(tt).on(function(){e.onreadystatechange=null,e.abort()}),"onprogress"in e&&(e.onprogress=p),e.onreadystatechange=function(){function r(){try{d&&t(Y).emit(e.status,function(t){var e={};return t&&t.split("\r\n").forEach(function(t){var r=t.indexOf(": ");e[t.substring(0,r)]=t.substring(r+2)}),e}(e.getAllResponseHeaders())),d=!1}catch(t){}}switch(e.readyState){case 2:case 3:return r();case 4:r(),2==String(e.status)[0]?(p(),t(Q).emit()):f(it(e.status,e.responseText))}};try{for(var m in e.open(n,i,!0),a)e.setRequestHeader(m,a[m]);(function(t,e){function r(e){return e.port||function(t){return{"http:":80,"https:":443}[t]}(e.protocol||t.protocol)}return!!(e.protocol&&e.protocol!=t.protocol||e.host&&e.host!=t.host||e.host&&r(e)!=r(t))})(r.location,function(t){var e=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(t)||[];return{protocol:e[1]||"",host:e[2]||"",port:e[3]||""}}(i))||e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.withCredentials=s,e.send(o)}catch(t){r.setTimeout(c(f,it(u,u,t)),0)}}(a,new XMLHttpRequest,t,e,n,i,o),R(a),function(t,e){"use strict";var r,n={};function i(t){return function(e){r=t(r,e)}}for(var o in e)t(o).on(i(e[o]),n);t(W).on(function(t){var e=S(r),n=L(e),i=A(r);i&&(U(S(i))[n]=t)}),t(V).on(function(){var t=S(r),e=L(t),n=A(r);n&&delete U(S(n))[e]}),t(tt).on(function(){for(var r in e)t(r).un(n)})}(a,z(a)),ot(a,D),at(a,e)}function ut(t,e,r,n,i,o,a){return i=i?s.parse(s.stringify(i)):{},n?_(n)||(n=s.stringify(n),i["Content-Type"]=i["Content-Type"]||"application/json"):n=null,t(r||"GET",function(t,e){return!1===e&&(-1==t.indexOf("?")?t+="?":t+="&",t+="_="+(new Date).getTime()),t}(e,a),n,i,o||!1)}function ct(t){var e=T("resume","pause","pipe"),r=c(M,e);return t?r(t)||_(t)?ut(st,t):ut(st,t.url,t.method,t.body,t.headers,t.withCredentials,t.cached):st()}ct.drop=function(){return ct.drop},(n=function(){return ct}.apply(e,[]))===u||(t.exports=n)}(function(){try{return window}catch(t){return self}}(),Object,Array,Error,JSON)},function(t,e,r){"use strict";var n=r(6).formatters,i=r(19),o=r(10);t.exports=function(t){var e=function(e){var r;return e.property?(t[e.property]||(t[e.property]={}),r=t[e.property]):r=t,e.methods&&e.methods.forEach(function(e){e instanceof i||(e=new i(e)),e.attachToObject(r),e.setRequestManager(t._requestManager)}),t};return e.formatters=n,e.utils=o,e.Method=i,e}},function(t,e,r){"use strict";t.exports=r(212)(window,function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}})},function(t,e,r){"use strict";var n=null;t.exports=function(t,e){return function(r,i){r=r||null;var o=!1!==(i=i||{}).global;if(null===n&&o&&(n=t["@@any-promise/REGISTRATION"]||null),null!==n&&null!==r&&n.implementation!==r)throw new Error('any-promise already defined as "'+n.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===n&&(n=null!==r&&void 0!==i.Promise?{Promise:i.Promise,implementation:r}:e(r),o&&(t["@@any-promise/REGISTRATION"]=n)),n}}},function(t,e,r){"use strict";var n=r(5),i=r(6).errors,o=r(86);function a(t){o.call(this),this.id=null,this.callback=null,this.arguments=null,this._reconnectIntervalId=null,this.options={subscription:t.subscription,type:t.type,requestManager:t.requestManager}}a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype._extractCallback=function(t){if(n.isFunction(t[t.length-1]))return t.pop()},a.prototype._validateArgs=function(t){var e=this.options.subscription;if(e||(e={}),e.params||(e.params=0),t.length!==e.params)throw i.InvalidNumberOfParams(t.length,e.params+1,t[0])},a.prototype._formatInput=function(t){var e=this.options.subscription;return e&&e.inputFormatter?e.inputFormatter.map(function(e,r){return e?e(t[r]):t[r]}):t},a.prototype._formatOutput=function(t){var e=this.options.subscription;return e&&e.outputFormatter&&t?e.outputFormatter(t):t},a.prototype._toPayload=function(t){var e=[];if(this.callback=this._extractCallback(t),this.subscriptionMethod||(this.subscriptionMethod=t.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(t),this._validateArgs(this.arguments),t=[]),e.push(this.subscriptionMethod),e=e.concat(this.arguments),t.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:e}},a.prototype.unsubscribe=function(t){this.options.requestManager.removeSubscription(this.id,t),this.id=null,this.removeAllListeners(),clearInterval(this._reconnectIntervalId)},a.prototype.subscribe=function(){var t=this,e=Array.prototype.slice.call(arguments),r=this._toPayload(e);if(!r)return this;if(!this.options.requestManager.provider){var i=new Error("No provider set.");return this.callback(i,null,this),this.emit("error",i),this}if(!this.options.requestManager.provider.on){var o=new Error("The current provider doesn't support subscriptions: "+this.options.requestManager.provider.constructor.name);return this.callback(o,null,this),this.emit("error",o),this}return this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&n.isObject(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)&&this.options.requestManager.send({method:"eth_getLogs",params:[r.params[1]]},function(e,r){e?(t.callback(e,null,t),t.emit("error",e)):r.forEach(function(e){var r=t._formatOutput(e);t.callback(null,r,t),t.emit("data",r)})}),"object"==typeof r.params[1]&&delete r.params[1].fromBlock,this.options.requestManager.send(r,function(e,i){!e&&i?(t.id=i,t.options.requestManager.addSubscription(t.id,r.params[0],t.options.type,function(e,r){e?(t.options.requestManager.removeSubscription(t.id),t.options.requestManager.provider.once&&(t._reconnectIntervalId=setInterval(function(){t.options.requestManager.provider.reconnect&&t.options.requestManager.provider.reconnect()},500),t.options.requestManager.provider.once("connect",function(){clearInterval(t._reconnectIntervalId),t.subscribe(t.callback)})),t.emit("error",e),n.isFunction(t.callback)&&t.callback(e,null,t)):(n.isArray(r)||(r=[r]),r.forEach(function(e){var r=t._formatOutput(e);if(n.isFunction(t.options.subscription.subscriptionHandler))return t.options.subscription.subscriptionHandler.call(t,r);t.emit("data",r),n.isFunction(t.callback)&&t.callback(null,r,t)}))})):n.isFunction(t.callback)?(t.callback(e,null,t),t.emit("error",e)):t.emit("error",e)}),this},t.exports=a},function(t,e,r){"use strict";var n=r(5),i=r(17),o=r(6),a=r(37).subscriptions,s=r(19),u=r(10),c=r(38),h=r(88),f=r(215),l=r(75),d=r(224),p=r(89),m=r(307),v=o.formatters,g=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},b=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},y=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},_=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},w=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},M=function(){var t=this;i.packageInit(this,arguments);var e=this.setProvider;this.setProvider=function(){e.apply(t,arguments),t.net.setProvider.apply(t,arguments),t.personal.setProvider.apply(t,arguments),t.accounts.setProvider.apply(t,arguments),t.Contract.setProvider(t.currentProvider,t.accounts)};var r=null,o="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return r},set:function(e){return e&&(r=u.toChecksumAddress(v.inputAddressFormatter(e))),t.Contract.defaultAccount=r,t.personal.defaultAccount=r,k.forEach(function(t){t.defaultAccount=r}),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return o},set:function(e){return o=e,t.Contract.defaultBlock=o,t.personal.defaultBlock=o,k.forEach(function(t){t.defaultBlock=o}),e},enumerable:!0}),this.clearSubscriptions=t._requestManager.clearSubscriptions,this.net=new c(this.currentProvider),this.net.getNetworkType=m.bind(this),this.accounts=new d(this.currentProvider),this.personal=new h(this.currentProvider),this.personal.defaultAccount=this.defaultAccount;var M=this,x=function(){f.apply(this,arguments);var t=this,e=M.setProvider;M.setProvider=function(){e.apply(M,arguments),i.packageInit(t,[M.currentProvider])}};x.setProvider=function(){f.setProvider.apply(this,arguments)},(x.prototype=Object.create(f.prototype)).constructor=x,this.Contract=x,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.setProvider(this.currentProvider,this.accounts),this.Iban=l,this.abi=p;var k=[new s({name:"getNodeInfo",call:"web3_clientVersion"}),new s({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new s({name:"getCoinbase",call:"eth_coinbase",params:0}),new s({name:"isMining",call:"eth_mining",params:0}),new s({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:u.hexToNumber}),new s({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:v.outputSyncingFormatter}),new s({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:v.outputBigNumberFormatter}),new s({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:u.toChecksumAddress}),new s({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:u.hexToNumber}),new s({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[v.inputAddressFormatter,v.inputDefaultBlockNumberFormatter],outputFormatter:v.outputBigNumberFormatter}),new s({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[v.inputAddressFormatter,u.numberToHex,v.inputDefaultBlockNumberFormatter]}),new s({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[v.inputAddressFormatter,v.inputDefaultBlockNumberFormatter]}),new s({name:"getBlock",call:g,params:2,inputFormatter:[v.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:v.outputBlockFormatter}),new s({name:"getUncle",call:y,params:2,inputFormatter:[v.inputBlockNumberFormatter,u.numberToHex],outputFormatter:v.outputBlockFormatter}),new s({name:"getBlockTransactionCount",call:_,params:1,inputFormatter:[v.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getBlockUncleCount",call:w,params:1,inputFormatter:[v.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:v.outputTransactionFormatter}),new s({name:"getTransactionFromBlock",call:b,params:2,inputFormatter:[v.inputBlockNumberFormatter,u.numberToHex],outputFormatter:v.outputTransactionFormatter}),new s({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:v.outputTransactionReceiptFormatter}),new s({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[v.inputAddressFormatter,v.inputDefaultBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),new s({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[v.inputTransactionFormatter]}),new s({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[v.inputTransactionFormatter]}),new s({name:"sign",call:"eth_sign",params:2,inputFormatter:[v.inputSignFormatter,v.inputAddressFormatter],transformPayload:function(t){return t.params.reverse(),t}}),new s({name:"call",call:"eth_call",params:2,inputFormatter:[v.inputCallFormatter,v.inputDefaultBlockNumberFormatter]}),new s({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[v.inputCallFormatter],outputFormatter:u.hexToNumber}),new s({name:"getCompilers",call:"eth_getCompilers",params:0}),new s({name:"compile.solidity",call:"eth_compileSolidity",params:1}),new s({name:"compile.lll",call:"eth_compileLLL",params:1}),new s({name:"compile.serpent",call:"eth_compileSerpent",params:1}),new s({name:"submitWork",call:"eth_submitWork",params:3}),new s({name:"getWork",call:"eth_getWork",params:0}),new s({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[v.inputLogFormatter],outputFormatter:v.outputLogFormatter}),new a({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:v.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[v.inputLogFormatter],outputFormatter:v.outputLogFormatter,subscriptionHandler:function(t){t.removed?this.emit("changed",t):this.emit("data",t),n.isFunction(this.callback)&&this.callback(null,t,this)}},syncing:{params:0,outputFormatter:v.outputSyncingFormatter,subscriptionHandler:function(t){var e=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",e._isSyncing),n.isFunction(this.callback)&&this.callback(null,e._isSyncing,this),setTimeout(function(){e.emit("data",t),n.isFunction(e.callback)&&e.callback(null,t,e)},0)):(this.emit("data",t),n.isFunction(e.callback)&&this.callback(null,t,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout(function(){t.currentBlock>t.highestBlock-200&&(e._isSyncing=!1,e.emit("changed",e._isSyncing),n.isFunction(e.callback)&&e.callback(null,e._isSyncing,e))},500))}}}})];k.forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager,t.accounts),e.defaultBlock=t.defaultBlock,e.defaultAccount=t.defaultAccount})};i.addProviders(M),t.exports=M},function(t,e,r){"use strict";var n=r(5),i=r(17),o=r(19),a=r(10),s=r(37).subscription,u=r(6).formatters,c=r(6).errors,h=r(85),f=r(89),l=function t(e,r,o){var s=this,c=Array.prototype.slice.call(arguments);if(!(this instanceof t))throw new Error('Please use the "new" keyword to instantiate a web3.eth.contract() object!');if(i.packageInit(this,[this.constructor.currentProvider]),this.clearSubscriptions=this._requestManager.clearSubscriptions,!e||!Array.isArray(e))throw new Error("You must provide the json interface of the contract when instantiating a contract object.");this.options={};var h=c[c.length-1];n.isObject(h)&&!n.isArray(h)&&(o=h,this.options=n.extend(this.options,this._getOrSetDefaultOptions(o)),n.isObject(r)&&(r=null)),Object.defineProperty(this.options,"address",{set:function(t){t&&(s._address=a.toChecksumAddress(u.inputAddressFormatter(t)))},get:function(){return s._address},enumerable:!0}),Object.defineProperty(this.options,"jsonInterface",{set:function(t){return s.methods={},s.events={},s._jsonInterface=t.map(function(t){var e,r;if(t.constant="view"===t.stateMutability||"pure"===t.stateMutability||t.constant,t.payable="payable"===t.stateMutability||t.payable,t.name&&(r=a._jsonInterfaceMethodToString(t)),"function"===t.type){if(t.signature=f.encodeFunctionSignature(r),e=s._createTxObject.bind({method:t,parent:s}),s.methods[t.name]){var n=s._createTxObject.bind({method:t,parent:s,nextMethod:s.methods[t.name]});s.methods[t.name]=n}else s.methods[t.name]=e;s.methods[t.signature]=e,s.methods[r]=e}else if("event"===t.type){t.signature=f.encodeEventSignature(r);var i=s._on.bind(s,t.signature);s.events[t.name]&&"bound "!==s.events[t.name].name||(s.events[t.name]=i),s.events[t.signature]=i,s.events[r]=i}return t}),s.events.allEvents=s._on.bind(s,"allevents"),s._jsonInterface},get:function(){return s._jsonInterface},enumerable:!0});var l=this.constructor.defaultAccount,d=this.constructor.defaultBlock||"latest";Object.defineProperty(this,"defaultAccount",{get:function(){return l},set:function(t){return t&&(l=a.toChecksumAddress(u.inputAddressFormatter(t))),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return d},set:function(t){return d=t,t},enumerable:!0}),this.methods={},this.events={},this._address=null,this._jsonInterface=[],this.options.address=r,this.options.jsonInterface=e};l.setProvider=function(t,e){i.packageInit(this,[t]),this._ethAccounts=e},l.prototype._getCallback=function(t){if(t&&n.isFunction(t[t.length-1]))return t.pop()},l.prototype._checkListener=function(t,e){if(e===t)throw new Error('The event "'+t+"\" is a reserved event name, you can't use it.")},l.prototype._getOrSetDefaultOptions=function(t){var e=t.gasPrice?String(t.gasPrice):null,r=t.from?a.toChecksumAddress(u.inputAddressFormatter(t.from)):null;return t.data=t.data||this.options.data,t.from=r||this.options.from,t.gasPrice=e||this.options.gasPrice,t.gas=t.gas||t.gasLimit||this.options.gas,delete t.gasLimit,t},l.prototype._encodeEventABI=function(t,e){var r=(e=e||{}).filter||{},i={};if(["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(t){i[t]=u.inputBlockNumberFormatter(e[t])}),n.isArray(e.topics))i.topics=e.topics;else{if(i.topics=[],t&&!t.anonymous&&"ALLEVENTS"!==t.name&&i.topics.push(t.signature),"ALLEVENTS"!==t.name){var o=t.inputs.filter(function(t){return!0===t.indexed}).map(function(t){var e=r[t.name];return e?n.isArray(e)?e.map(function(e){return f.encodeParameter(t.type,e)}):f.encodeParameter(t.type,e):null});i.topics=i.topics.concat(o)}i.topics.length||delete i.topics}return this.options.address&&(i.address=this.options.address.toLowerCase()),i},l.prototype._decodeEventABI=function(t){var e=this;t.data=t.data||"",t.topics=t.topics||[];var r=u.outputLogFormatter(t);"ALLEVENTS"===e.name&&(e=e.jsonInterface.find(function(e){return e.signature===t.topics[0]})||{anonymous:!0}),e.inputs=e.inputs||[];var n=e.anonymous?t.topics:t.topics.slice(1);return r.returnValues=f.decodeLog(e.inputs,t.data,n),delete r.returnValues.__length__,r.event=e.name,r.signature=e.anonymous||!t.topics[0]?null:t.topics[0],r.raw={data:r.data,topics:r.topics},delete r.data,delete r.topics,r},l.prototype._encodeMethodABI=function(){var t=this._method.signature,e=this.arguments||[],r=!1,i=this._parent.options.jsonInterface.filter(function(e){return"constructor"===t&&e.type===t||(e.signature===t||e.signature===t.replace("0x","")||e.name===t)&&"function"===e.type}).map(function(t){var i=n.isArray(t.inputs)?t.inputs.length:0;if(i!==e.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+i+" arguments.");return"function"===t.type&&(r=t.signature),n.isArray(t.inputs)?t.inputs.map(function(t){return t.type}):[]}).map(function(t){return f.encodeParameters(t,e).replace("0x","")})[0]||"";if("constructor"===t){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData+i}var o=r?r+i:i;if(o)return o;throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".')},l.prototype._decodeMethodReturn=function(t,e){if(!e)return null;e=e.length>=2?e.slice(2):e;var r=f.decodeParameters(t,e);return 1===r.__length__?r[0]:(delete r.__length__,r)},l.prototype.deploy=function(t,e){if((t=t||{}).arguments=t.arguments||[],!(t=this._getOrSetDefaultOptions(t)).data)return a._fireError(new Error('No "data" specified in neither the given options, nor the default options.'),null,null,e);var r=n.find(this.options.jsonInterface,function(t){return"constructor"===t.type})||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:t.data,_ethAccounts:this.constructor._ethAccounts},t.arguments)},l.prototype._generateEventOptions=function(){var t=Array.prototype.slice.call(arguments),e=this._getCallback(t),r=n.isObject(t[t.length-1])?t.pop():{},i=n.isString(t[0])?t[0]:"allevents";if(!(i="allevents"===i.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find(function(t){return"event"===t.type&&(t.name===i||t.signature==="0x"+i.replace("0x",""))})))throw new Error('Event "'+i.name+"\" doesn't exist in this contract.");if(!a.isAddress(this.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return{params:this._encodeEventABI(i,r),event:i,callback:e}},l.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},l.prototype.once=function(t,e,r){var i=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(i)))throw new Error("Once requires a callback as the second parameter.");e&&delete e.fromBlock,this._on(t,e,function(t,e,i){i.unsubscribe(),n.isFunction(r)&&r(t,e,i)})},l.prototype._on=function(){var t=this._generateEventOptions.apply(this,arguments);this._checkListener("newListener",t.event.name,t.callback),this._checkListener("removeListener",t.event.name,t.callback);var e=new s({subscription:{params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(t.event),subscriptionHandler:function(t){t.removed?this.emit("changed",t):this.emit("data",t),n.isFunction(this.callback)&&this.callback(null,t,this)}},type:"eth",requestManager:this._requestManager});return e.subscribe("logs",t.params,t.callback||function(){}),e},l.prototype.getPastEvents=function(){var t=this._generateEventOptions.apply(this,arguments),e=new o({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(t.event)});e.setRequestManager(this._requestManager);var r=e.buildCall();return e=null,r(t.params,t.callback)},l.prototype._createTxObject=function(){var t=Array.prototype.slice.call(arguments),e={};if("function"===this.method.type&&(e.call=this.parent._executeMethod.bind(e,"call"),e.call.request=this.parent._executeMethod.bind(e,"call",!0)),e.send=this.parent._executeMethod.bind(e,"send"),e.send.request=this.parent._executeMethod.bind(e,"send",!0),e.encodeABI=this.parent._encodeMethodABI.bind(e),e.estimateGas=this.parent._executeMethod.bind(e,"estimate"),t&&this.method.inputs&&t.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,t);throw c.InvalidNumberOfParams(t.length,this.method.inputs.length,this.method.name)}return e.arguments=t||[],e._method=this.method,e._parent=this.parent,e._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(e._deployData=this.deployData),e},l.prototype._processExecuteArguments=function(t,e){var r={};if(r.type=t.shift(),r.callback=this._parent._getCallback(t),"call"===r.type&&!0!==t[t.length-1]&&(n.isString(t[t.length-1])||isFinite(t[t.length-1]))&&(r.defaultBlock=t.pop()),r.options=n.isObject(t[t.length-1])?t.pop():{},r.generateRequest=!0===t[t.length-1]&&t.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!a.isAddress(this._parent.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:a._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),e.eventEmitter,e.reject,r.callback)},l.prototype._executeMethod=function(){var t=this,e=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=h("send"!==e.type),i=t.constructor._ethAccounts||t._ethAccounts;if(e.generateRequest){var s={params:[u.inputCallFormatter.call(this._parent,e.options)],callback:e.callback};return"call"===e.type?(s.params.push(u.inputDefaultBlockNumberFormatter.call(this._parent,e.defaultBlock)),s.method="eth_call",s.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):s.method="eth_sendTransaction",s}switch(e.type){case"estimate":return new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[u.inputCallFormatter],outputFormatter:a.hexToNumber,requestManager:t._parent._requestManager,accounts:i,defaultAccount:t._parent.defaultAccount,defaultBlock:t._parent.defaultBlock}).createFunction()(e.options,e.callback);case"call":return new o({name:"call",call:"eth_call",params:2,inputFormatter:[u.inputCallFormatter,u.inputDefaultBlockNumberFormatter],outputFormatter:function(e){return t._parent._decodeMethodReturn(t._method.outputs,e)},requestManager:t._parent._requestManager,accounts:i,defaultAccount:t._parent.defaultAccount,defaultBlock:t._parent.defaultBlock}).createFunction()(e.options,e.defaultBlock,e.callback);case"send":if(!a.isAddress(e.options.from))return a._fireError(new Error('No "from" address specified in neither the given options, nor the default options.'),r.eventEmitter,r.reject,e.callback);if(n.isBoolean(this._method.payable)&&!this._method.payable&&e.options.value&&e.options.value>0)return a._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,e.callback);var c={receiptFormatter:function(e){if(n.isArray(e.logs)){var r=n.map(e.logs,function(e){return t._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:t._parent.options.jsonInterface},e)});e.events={};var i=0;r.forEach(function(t){t.event?e.events[t.event]?Array.isArray(e.events[t.event])?e.events[t.event].push(t):e.events[t.event]=[e.events[t.event],t]:e.events[t.event]=t:(e.events[i]=t,i++)}),delete e.logs}return e},contractDeployFormatter:function(e){var r=t._parent.clone();return r.options.address=e.contractAddress,r}};return new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[u.inputTransactionFormatter],requestManager:t._parent._requestManager,accounts:t.constructor._ethAccounts||t._ethAccounts,defaultAccount:t._parent.defaultAccount,defaultBlock:t._parent.defaultBlock,extraFormatters:c}).createFunction()(e.options,e.callback)}},t.exports=l},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){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(1).Buffer}catch(t){}function s(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 u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(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,c=0,h=r;h1&&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 c=["","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"],h=[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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(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,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|h}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(t=t||10,e=0|e||1,16===t||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+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 l=h[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+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!==a),this.toArrayLike(a,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,s,u="le"===e,c=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),c[s]=a;for(;s=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,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,b=v>>>13,y=0|a[3],_=8191&y,w=y>>>13,M=0|a[4],x=8191&M,k=M>>>13,S=0|a[5],A=8191&S,E=S>>>13,T=0|a[6],C=8191&T,P=T>>>13,N=0|a[7],O=8191&N,I=N>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,q=L>>>13,z=0|s[0],D=8191&z,F=z>>>13,H=0|s[1],G=8191&H,K=H>>>13,W=0|s[2],V=8191&W,Z=W>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ht=0|s[8],ft=8191&ht,lt=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=(c+(n=Math.imul(f,D))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,D)|0))<<13)|0;c=((o=Math.imul(l,F))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,F))+Math.imul(m,D)|0,o=Math.imul(m,F);var gt=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,D),i=(i=Math.imul(g,F))+Math.imul(b,D)|0,o=Math.imul(b,F),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(_,D),i=(i=Math.imul(_,F))+Math.imul(w,D)|0,o=Math.imul(w,F),n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(x,D),i=(i=Math.imul(x,F))+Math.imul(k,D)|0,o=Math.imul(k,F),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(A,D),i=(i=Math.imul(A,F))+Math.imul(E,D)|0,o=Math.imul(E,F),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(C,D),i=(i=Math.imul(C,F))+Math.imul(P,D)|0,o=Math.imul(P,F),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,D),i=(i=Math.imul(O,F))+Math.imul(I,D)|0,o=Math.imul(I,F),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,D),i=(i=Math.imul(j,F))+Math.imul(B,D)|0,o=Math.imul(B,F),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,D),i=(i=Math.imul(U,F))+Math.imul(q,D)|0,o=Math.imul(q,F),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,K))+Math.imul(q,G)|0,o=Math.imul(q,K),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(g,ft)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var At=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,Z))+Math.imul(q,V)|0,o=Math.imul(q,Z),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(q,$)|0,o=Math.imul(q,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var Tt=(c+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(j,rt)|0,i=(i=i+Math.imul(j,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(q,ot)|0,o=Math.imul(q,at),n=n+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,lt)|0;var Nt=(c+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(q,ut)|0,o=Math.imul(q,ct),n=n+Math.imul(j,ft)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var Ot=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,lt))+Math.imul(q,ft)|0,o=Math.imul(q,lt);var It=(c+(n=n+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(q,pt)|0))<<13)|0;return c=((o=Math.imul(q,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=bt,u[3]=yt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=kt,u[9]=St,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Nt,u[16]=Ot,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(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)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.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=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==h||c>=i);c--){var f=0|this.words[c];this.words[c]=h<<26-o|f>>>o,h=f&s}return u&&0!==h&&(u.words[u.length++]=h),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)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;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 s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=l)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},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,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(e.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},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,s&=67108863,this.words[a]=s}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,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=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 M(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 v={k256:null,p224:null,p192:null,p25519:null};function g(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 b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(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 x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.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(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.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")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.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)},M.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},M.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)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.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 s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var f=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();n(v=0;n--){for(var c=e.words[n],h=u-1;h>=0;h--){var f=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===h)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.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)},x.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)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(14)(t))},function(t,e,r){var n=r(12),i=r(6).formatters,o=r(20),a=function(){this._inputFormatter=function(){var t=Array.prototype.slice.call(arguments);return t[0]=t[0]&&"0x0"!==t[0]?i.inputAddressFormatter(t[0]):"",n.formatInputInt.apply(this,t)},this._outputFormatter=n.formatOutputAddress};(a.prototype=new o({})).constructor=a,a.prototype.isType=function(t){return!!t.match(/address(\[([0-9]*)\])?/)},t.exports=a},function(t,e,r){var n=r(12),i=r(20),o=function(){this._inputFormatter=n.formatInputBool,this._outputFormatter=n.formatOutputBool};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^bool(\[([0-9]*)\])*$/)},t.exports=o},function(t,e,r){var n=r(12),i=r(20),o=function(){this._inputFormatter=n.formatInputInt,this._outputFormatter=n.formatOutputInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^int([0-9]*)?(\[([0-9]*)\])*$/)},t.exports=o},function(t,e,r){var n=r(12),i=r(20),o=function(){this._inputFormatter=n.formatInputInt,this._outputFormatter=n.formatOutputUInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/)},t.exports=o},function(t,e,r){var n=r(12),i=r(20),o=function(){this._inputFormatter=n.formatInputDynamicBytes,this._outputFormatter=n.formatOutputDynamicBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^bytes(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},t.exports=o},function(t,e,r){var n=r(12),i=r(20),o=function(){this._inputFormatter=n.formatInputString,this._outputFormatter=n.formatOutputString};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^string(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},t.exports=o},function(t,e,r){var n=r(12),i=r(20),o=function(){this._inputFormatter=n.formatInputBytes,this._outputFormatter=n.formatOutputBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^bytes([0-9]{1,})(\[([0-9]*)\])*$/)},t.exports=o},function(t,e,r){"use strict";(function(e,n){var i=r(5),o=r(17),a=r(19),s=r(87),u=r(225),c=r(122),h=r(121),f=r(120),l=r(50),d=r(39),p=r(303),m=r(305),v=r(10),g=r(6),b=function(t){return i.isUndefined(t)||i.isNull(t)},y=function(t){for(;t&&t.startsWith("0x0");)t="0x"+t.slice(3);return t},_=function(t){return t.length%2==1&&(t=t.replace("0x","0x0")),t},w=function(){var t=this;o.packageInit(this,arguments),delete this.BatchRequest,delete this.extend;var e=[new a({name:"getId",call:"net_version",params:0,outputFormatter:v.hexToNumber}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[function(t){if(v.isAddress(t))return t;throw new Error("Address "+t+' is not a valid address to get the "transactionCount".')},function(){return"latest"}]})];this._ethereumCall={},i.each(e,function(e){e.attachToObject(t._ethereumCall),e.setRequestManager(t._requestManager)}),this.wallet=new M(this)};function M(t){this._accounts=t,this.length=0,this.defaultKeyName="web3js_wallet"}w.prototype._addAccountFunctions=function(t){var e=this;return t.signTransaction=function(r,n){return e.signTransaction(r,t.privateKey,n)},t.sign=function(r){return e.sign(r,t.privateKey)},t.encrypt=function(r,n){return e.encrypt(t.privateKey,r,n)},t},w.prototype.create=function(t){return this._addAccountFunctions(u.create(t||v.randomHex(32)))},w.prototype.privateKeyToAccount=function(t){return this._addAccountFunctions(u.fromPrivate(t))},w.prototype.signTransaction=function(t,e,r){var n,o=!1;if(r=r||function(){},!t)return o=new Error("No transaction object given!"),r(o),s.reject(o);function a(t){if(t.gas||t.gasLimit||(o=new Error('"gas" is missing')),(t.nonce<0||t.gas<0||t.gasPrice<0||t.chainId<0)&&(o=new Error("Gas, gasPrice, nonce or chainId is lower than 0")),o)return r(o),s.reject(new Error('"gas" is missing'));try{var i=t=g.formatters.inputCallFormatter(t);i.to=t.to||"0x",i.data=t.data||"0x",i.value=t.value||"0x",i.chainId=v.numberToHex(t.chainId);var a=h.encode([l.fromNat(i.nonce),l.fromNat(i.gasPrice),l.fromNat(i.gas),i.to.toLowerCase(),l.fromNat(i.value),i.data,l.fromNat(i.chainId||"0x1"),"0x","0x"]),d=c.keccak256(a),p=u.makeSigner(2*f.toNumber(i.chainId||"0x1")+35)(c.keccak256(a),e),m=h.decode(a).slice(0,6).concat(u.decodeSignature(p));m[6]=_(y(m[6])),m[7]=_(y(m[7])),m[8]=_(y(m[8]));var b=h.encode(m),w=h.decode(b);n={messageHash:d,v:y(w[6]),r:y(w[7]),s:y(w[8]),rawTransaction:b}}catch(t){return r(t),s.reject(t)}return r(null,n),n}return void 0!==t.nonce&&void 0!==t.chainId&&void 0!==t.gasPrice?s.resolve(a(t)):s.all([b(t.chainId)?this._ethereumCall.getId():t.chainId,b(t.gasPrice)?this._ethereumCall.getGasPrice():t.gasPrice,b(t.nonce)?this._ethereumCall.getTransactionCount(this.privateKeyToAccount(e).address):t.nonce]).then(function(e){if(b(e[0])||b(e[1])||b(e[2]))throw new Error('One of the values "chainId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(e));return a(i.extend(t,{chainId:e[0],gasPrice:e[1],nonce:e[2]}))})},w.prototype.recoverTransaction=function(t){var e=h.decode(t),r=u.encodeSignature(e.slice(6,9)),n=l.toNumber(e[6]),i=n<35?[]:[l.fromNumber(n-35>>1),"0x","0x"],o=e.slice(0,6).concat(i),a=h.encode(o);return u.recover(c.keccak256(a),r)},w.prototype.hashMessage=function(t){var e=v.isHexStrict(t)?v.hexToBytes(t):t,r=n.from(e),i="Ethereum Signed Message:\n"+e.length,o=n.from(i),a=n.concat([o,r]);return c.keccak256s(a)},w.prototype.sign=function(t,e){var r=this.hashMessage(t),n=u.sign(r,e),i=u.decodeSignature(n);return{message:t,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},w.prototype.recover=function(t,e,r){var n=[].slice.apply(arguments);return i.isObject(t)?this.recover(t.messageHash,u.encodeSignature([t.v,t.r,t.s]),!0):(r||(t=this.hashMessage(t)),n.length>=4?(r=n.slice(-1)[0],r=!!i.isBoolean(r)&&!!r,this.recover(t,u.encodeSignature(n.slice(1,4)),r)):u.recover(t,e))},w.prototype.decrypt=function(t,e,r){if(!i.isString(e))throw new Error("No password given.");var o,a,s=i.isObject(t)?t:JSON.parse(r?t.toLowerCase():t);if(3!==s.version)throw new Error("Not a valid V3 wallet");if("scrypt"===s.crypto.kdf)a=s.crypto.kdfparams,o=p(new n(e),new n(a.salt,"hex"),a.n,a.r,a.p,a.dklen);else{if("pbkdf2"!==s.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(a=s.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");o=d.pbkdf2Sync(new n(e),new n(a.salt,"hex"),a.c,a.dklen,"sha256")}var u=new n(s.crypto.ciphertext,"hex");if(v.sha3(n.concat([o.slice(16,32),u])).replace("0x","")!==s.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var c=d.createDecipheriv(s.crypto.cipher,o.slice(0,16),new n(s.crypto.cipherparams.iv,"hex")),h="0x"+n.concat([c.update(u),c.final()]).toString("hex");return this.privateKeyToAccount(h)},w.prototype.encrypt=function(t,e,r){var i,o=this.privateKeyToAccount(t),a=(r=r||{}).salt||d.randomBytes(32),s=r.iv||d.randomBytes(16),u=r.kdf||"scrypt",c={dklen:r.dklen||32,salt:a.toString("hex")};if("pbkdf2"===u)c.c=r.c||262144,c.prf="hmac-sha256",i=d.pbkdf2Sync(new n(e),a,c.c,c.dklen,"sha256");else{if("scrypt"!==u)throw new Error("Unsupported kdf");c.n=r.n||8192,c.r=r.r||8,c.p=r.p||1,i=p(new n(e),a,c.n,c.r,c.p,c.dklen)}var h=d.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),s);if(!h)throw new Error("Unsupported cipher");var f=n.concat([h.update(new n(o.privateKey.replace("0x",""),"hex")),h.final()]),l=v.sha3(n.concat([i.slice(16,32),new n(f,"hex")])).replace("0x","");return{version:3,id:m.v4({random:r.uuid||d.randomBytes(16)}),address:o.address.toLowerCase().replace("0x",""),crypto:{ciphertext:f.toString("hex"),cipherparams:{iv:s.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:u,kdfparams:c,mac:l.toString("hex")}}},M.prototype._findSafeIndex=function(t){return t=t||0,i.has(this,t)?this._findSafeIndex(t+1):t},M.prototype._currentIndexes=function(){return Object.keys(this).map(function(t){return parseInt(t)}).filter(function(t){return t<9e20})},M.prototype.create=function(t,e){for(var r=0;r7?t[n+2].toUpperCase():t[n+2];return r},l=function(t){var r=new e(t.slice(2),"hex"),n="0x"+s.keyFromPrivate(r).getPublic(!1,"hex").slice(2),i=c(n);return{address:f("0x"+i.slice(-40)),privateKey:t}},d=function(t){var e=n(t,3),r=e[0],o=i.pad(32,e[1]),a=i.pad(32,e[2]);return i.flatten([o,a,r])},p=function(t){return[i.slice(64,i.length(t),t),i.slice(0,32,t),i.slice(32,64,t)]},m=function(t){return function(r,n){var a=s.keyFromPrivate(new e(n.slice(2),"hex")).sign(new e(r.slice(2),"hex"),{canonical:!0});return d([o.fromString(i.fromNumber(t+a.recoveryParam)),i.pad(32,i.fromNat("0x"+a.r.toString(16))),i.pad(32,i.fromNat("0x"+a.s.toString(16)))])}},v=m(27);t.exports={create:function(t){var e=c(i.concat(i.random(32),t||i.random(32))),r=i.concat(i.concat(i.random(32),e),i.random(32)),n=c(r);return l(n)},toChecksum:f,fromPrivate:l,sign:v,makeSigner:m,recover:function(t,r){var n=p(r),o={v:i.toNumber(n[0]),r:n[1].slice(2),s:n[2].slice(2)},a="0x"+s.recoverPubKey(new e(t.slice(2),"hex"),o,o.v<2?o.v:1-o.v%2).encode("hex",!1).slice(2),u=c(a);return f("0x"+u.slice(-40))},encodeSignature:d,decodeSignature:p}}).call(this,r(1).Buffer)},function(t,e){var r=function(t,e){for(var r=[],n=0;n>>27}function h(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=e[u-3]^e[u-8]^e[u-14]^e[u-16];for(var l=0;l<80;++l){var d=~~(l/20),p=c(r)+f(d,n,i,o)+s+e[l]+a[d]|0;s=o,o=i,i=h(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(0),i=r(22),o=r(2).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<1|t>>>31}function h(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=c(e[u-3]^e[u-8]^e[u-14]^e[u-16]);for(var d=0;d<80;++d){var p=~~(d/20),m=h(r)+l(p,n,i,o)+s+e[d]+a[p]|0;s=o,o=i,i=f(n),n=r,r=m}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(0),i=r(92),o=r(22),a=r(2).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var n=r(0),i=r(93),o=r(22),a=r(2).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,r){"use strict";var n=r(0),i=r(2).Buffer,o=r(15),a=i.alloc(128),s=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,r,i){for(var o=0,a=0,s=n.length>>>1,u=0;u>>n[u]&1;for(u=s;u>>n[u]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(t>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(e>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r>>o[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];r=a.r28shl(r,s),i=a.r28shl(i,s),a.pc2(r,i,t.keys,o)}},u.prototype._update=function(t,e,r,n){var i=this._desState,o=a.readUInt32BE(t,e),s=a.readUInt32BE(t,e+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(r,o,n),a.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n>>0,o=l}a.rip(s,o,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var o=r,s=e,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],h=t.keys[u+1];a.expand(o,t.tmp,0),c^=t.tmp[0],h^=t.tmp[1];var f=a.substitute(c,h),l=o;o=(s^a.permute(f))>>>0,s=l}a.rip(o,s,n,i)}},function(t,e,r){"use strict";var n=r(11),i=r(0),o={};e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r>s%8,t._prev=o(t._prev,r?i:a);return u}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,a=n.allocUnsafe(o),s=-1;++s>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,e&&(r[0]=r[0]^225<<24)}this.state=o(n)},a.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},function(t,e,r){var n=r(103),i=r(2).Buffer,o=r(58),a=r(104),s=r(15),u=r(40),c=r(41);function h(t,e,r){s.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function l(t,e,r){var s=o[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===s.type?new a(s.module,e,r,!0):"auth"===s.type?new n(s.module,e,r,!0):new h(s.module,e,r)}r(0)(h,s),h.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},h.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return l(t,n.key,n.iv)},e.createDecipheriv=l},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e,r){(function(t){var n=r(105),i=r(258),o=r(259);var a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var r=new t(i[e].prime,"hex"),n=new t(i[e].gen,"hex");return new o(r,n)},e.createDiffieHellman=e.DiffieHellman=function e(r,i,s,u){return t.isBuffer(i)||void 0===a[i]?e(r,"binary",i,s):(i=i||"binary",u=u||"binary",s=s||new t([2]),t.isBuffer(s)||(s=new t(s,u)),"number"==typeof r?new o(n(r,s),s,!0):(t.isBuffer(r)||(r=new t(r,i)),new o(r,s,!0)))}}).call(this,r(1).Buffer)},function(t,e){},function(t,e){},function(t){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},function(t,e,r){(function(e){var n=r(3),i=new(r(106)),o=new n(24),a=new n(11),s=new n(10),u=new n(3),c=new n(7),h=r(105),f=r(21);function l(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._pub=new n(t),this}function d(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._priv=new n(t),this}t.exports=m;var p={};function m(t,e,r){this.setGenerator(e),this.__prime=new n(t),this._prime=n.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=d):this._primeCode=8}function v(t,r){var n=new e(t.toArray());return r?n.toString(r):n}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in p)return p[n];var f,l=0;if(t.isEven()||!h.simpleSieve||!h.fermatTest(t)||!i.test(t))return l+=1,l+="02"===r||"05"===r?8:4,p[n]=l,l;switch(i.test(t.shrn(1))||(l+=2),r){case"02":t.mod(o).cmp(a)&&(l+=8);break;case"05":(f=t.mod(s)).cmp(u)&&f.cmp(c)&&(l+=8);break;default:l+=4}return p[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new n(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(t){var r=(t=(t=new n(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new e(r.toArray()),o=this.getPrime();if(i.length0&&r.ishrn(n),r}function f(t,r,i){var o,a;do{for(o=new e(0);8*o.length",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},function(t,e,r){"use strict";var n=e,i=r(3),o=r(11),a=r(108);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(t,e){for(var r=[],n=1<=0;){var o;if(i.isOdd()){var a=i.andln(n-1);o=a>(n>>1)-1?(n>>1)-a:a,i.isubn(o)}else o=0;r.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?e+1:1,u=1;u0||e.cmpn(-i)>0;){var o,a,s,u=t.andln(3)+n&3,c=e.andln(3)+i&3;3===u&&(u=-1),3===c&&(c=-1),o=0==(1&u)?0:3!=(s=t.andln(7)+n&7)&&5!==s||2!==c?u:-u,r[0].push(o),a=0==(1&c)?0:3!=(s=e.andln(7)+i&7)&&5!==s||2!==u?c:-c,r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e,r){"use strict";var n=r(3),i=r(7).utils,o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),n=o(e,1),i=(1<=u;e--)c=(c<<1)+n[e];a.push(c)}for(var h=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=i;l>0;l--){for(u=0;u=0;c--){for(e=0;c>=0&&0===a[c];c--)e++;if(c>=0&&e++,u=u.dblp(e),c<0)break;var h=a[c];s(0!==h),u="affine"===t.type?h>0?u.mixedAdd(i[h-1>>1]):u.mixedAdd(i[-h-1>>1].neg()):h>0?u.add(i[h-1>>1]):u.add(i[-h-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,h=0,f=0;f=1;f-=2){var d=f-1,p=f;if(1===s[d]&&1===s[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[d],r[p]);h=Math.max(g[0].length,h),c[d]=new Array(h),c[p]=new Array(h);for(var b=0;b=0;f--){for(var x=0;f>=0;){var k=!0;for(b=0;b=0&&x++,w=w.dblp(x),f<0)break;for(b=0;b0?S=u[b][A-1>>1]:A<0&&(S=u[b][-A-1>>1].neg()),w="affine"===S.type?w.mixedAdd(S):w.add(S))}}for(f=0;f=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=e,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},c.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(a).sub(s),k2:u.add(c).neg()}},c.prototype.pointFromX=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},c.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},h.prototype.isInfinity=function(){return this.inf},h.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},h.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.prototype.mul=function(t){return t=new o(t,16),this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},h.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},h.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},h.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(f,s.BasePoint),c.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),h=c.redMul(s),f=n.redMul(c),l=u.redSqr().redIAdd(h).redISub(f).redISub(f),d=u.redMul(f.redISub(l)).redISub(o.redMul(h)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(l,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),h=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(h).redISub(h),l=s.redMul(h.redISub(f)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(f,l,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){"use strict";var n=r(42),i=r(3),o=r(0),a=n.base,s=r(7).utils;function u(t){a.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(t,e,r){a.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(u,a),t.exports=u,u.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},o(c,a.BasePoint),u.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},u.prototype.point=function(t,e){return new c(this,t,e)},u.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(t,e){return new c(t,e[0],e[1]||t.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=i.redMul(n),s=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},c.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,r){"use strict";var n=r(42),i=r(7),o=r(3),a=r(0),s=n.base,u=i.utils.assert;function c(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new o(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function h(t,e,r,n,i){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(e,16),this.y=new o(r,16),this.z=n?new o(n,16):this.curve.one,this.t=i&&new o(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}a(c,s),t.exports=c,c.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},c.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},c.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},c.prototype.pointFromX=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(i.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(e&&!u||!e&&u)&&(s=s.redNeg()),this.point(t,s)},c.prototype.pointFromY=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(i.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},c.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},a(h,s.BasePoint),c.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},c.prototype.point=function(t,e,r,n){return new h(this,t,e,r,n)},h.fromJSON=function(t,e){return new h(t,e[0],e[1],e[2])},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),a=o.redSub(r),s=n.redSub(e),u=i.redMul(a),c=o.redMul(s),h=i.redMul(s),f=a.redMul(o);return this.curve.point(u,c,f,h)},h.prototype._projDbl=function(){var t,e,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),e=a.redMul(c.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);t=n.redSub(i).redISub(o).redMul(u),e=a.redMul(c.redSub(o)),r=a.redMul(u)}}else{var c=i.redAdd(o);s=this.curve._mulC(this.z).redSqr(),u=c.redSub(s).redSub(s);t=this.curve._mulC(n.redISub(c)).redMul(u),e=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(u)}return this.curve.point(t,e,r)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(e),c=o.redMul(a),h=s.redMul(u),f=o.redMul(u),l=a.redMul(s);return this.curve.point(c,h,l,f)},h.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),h=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),f=n.redMul(u).redMul(h);return this.curve.twisted?(e=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(e=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,e,r)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},h.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},h.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},function(t,e,r){"use strict";var n,i=e,o=r(60),a=r(7),s=a.utils.assert;function u(t){"short"===t.type?this.curve=new a.curve.short(t):"edwards"===t.type?this.curve=new a.curve.edwards(t):this.curve=new a.curve.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(275)}catch(t){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(t,e,r){"use strict";e.sha1=r(270),e.sha224=r(271),e.sha256=r(110),e.sha384=r(272),e.sha512=r(111)},function(t,e,r){"use strict";var n=r(13),i=r(29),o=r(109),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,h=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,h),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;nthis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),c=t.toArray("be",a),h=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),f=this.n.sub(new n(1)),l=0;;l++){var d=o.k?o.k(l):new n(h.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(f)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),v=m.umod(this.n);if(0!==v.cmpn(0)){var g=d.invm(this.n).mul(v.mul(e.getPrivate()).iadd(t));if(0!==(g=g.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(v)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),b^=1),new u({r:v,s:g,recoveryParam:b})}}}}}},c.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new u(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),h=c.mul(t).umod(this.n),f=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(h,r.getPublic(),f)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(h,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(t,e,r,i){a((3&r)===r,"The recovery param is more than two bits"),e=new u(e,i);var o=this.n,s=new n(t),c=e.r,h=e.s,f=1&r,l=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");c=l?this.curve.pointFromX(c.add(this.curve.n),f):this.curve.pointFromX(c,f);var d=e.r.invm(o),p=o.sub(s).mul(d).umod(o),m=h.mul(d).umod(o);return this.g.mulAdd(p,c,m)},c.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new u(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(t,e,r){"use strict";var n=r(60),i=r(108),o=r(11);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=a,a.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length"}},function(t,e,r){"use strict";var n=r(3),i=r(7).utils,o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(t,e){var r=t[e.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,a=e.place;o>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new function(){this.place=0};if(48!==t[r.place++])return!1;if(s(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var o=s(t,r),a=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var u=s(t,r);if(t.length!==u+r.place)return!1;var c=t.slice(r.place,u+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(a),this.s=new n(c),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=u(e),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,e.length),(n=n.concat(e)).push(2),c(n,r.length);var o=n.concat(r),a=[48];return c(a,o.length),a=a.concat(o),i.encode(a,t)}},function(t,e,r){"use strict";var n=r(60),i=r(7),o=i.utils,a=o.assert,s=o.parseBytes,u=r(281),c=r(282);function h(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof h))return new h(t);t=i.curves[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=h,h.prototype.sign=function(t,e){t=s(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},h.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},h.prototype.hashInt=function(){for(var t=this.hash(),e=0;e=e)throw new Error("invalid sig")}t.exports=function(t,r,u,c,h){var f=o(u);if("ec"===f.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new i(n),s=r.data.subjectPrivateKey.data;return o.verify(e,t,s)}(t,r,f)}if("dsa"===f.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var i=r.data.p,a=r.data.q,u=r.data.g,c=r.data.pub_key,h=o.signature.decode(t,"der"),f=h.s,l=h.r;s(f,a),s(l,a);var d=n.mont(i),p=f.invm(a);return 0===u.toRed(d).redPow(new n(e).mul(p).mod(a)).fromRed().mul(c.toRed(d).redPow(l.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(l)}(t,r,f)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");r=e.concat([h,r]);for(var l=f.modulus.byteLength(),d=[1],p=0;r.length+d.length+2n-l-2)throw new Error("message too long");var d=new e(n-c-l-2);d.fill(0);var p=n-f-1,m=i(f),v=s(e.concat([h,d,new e([1]),r],p),a(m,p)),g=s(m,a(v,f));return new u(e.concat([new e([0]),g,v],n))}(p,r);else if(1===l)d=function(t,r,n){var o,a=r.length,s=t.modulus.byteLength();if(a>s-11)throw new Error("message too long");n?(o=new e(s-a-3)).fill(255):o=function(t,r){var n,o=new e(t),a=0,s=i(2*t),u=0;for(;a=0)throw new Error("data too long for modulus")}return f?h(d,p):c(d,p)}}).call(this,r(1).Buffer)},function(t,e,r){(function(e){var n=r(43),i=r(117),o=r(118),a=r(3),s=r(59),u=r(27),c=r(119);t.exports=function(t,r,h){var f;f=t.padding?t.padding:h?1:4;var l,d=n(t),p=d.modulus.byteLength();if(r.length>p||new a(r).cmp(d.modulus)>=0)throw new Error("decryption error");l=h?c(new a(r),d):s(r,d);var m=new e(p-l.length);if(m.fill(0),l=e.concat([m,l],p),4===f)return function(t,r){t.modulus;var n=t.modulus.byteLength(),a=(r.length,u("sha1").update(new e("")).digest()),s=a.length;if(0!==r[0])throw new Error("decryption error");var c=r.slice(1,s+1),h=r.slice(s+1),f=o(c,i(h,s)),l=o(h,i(f,n-s-1));if(function(t,r){t=new e(t),r=new e(r);var n=0,i=t.length;t.length!==r.length&&(n++,i=Math.min(t.length,r.length));var o=-1;for(;++o=e.length){o++;break}var a=e.slice(2,i-1);e.slice(i-1,i);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,l,h);if(3===f)return l;throw new Error("unknown padding")}}).call(this,r(1).Buffer)},function(t,e,r){"use strict";(function(t,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(2),a=r(21),s=o.Buffer,u=o.kMaxLength,c=t.crypto||t.msCrypto,h=Math.pow(2,32)-1;function f(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>h||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function l(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>h||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>u)throw new RangeError("buffer too small")}function d(t,e,r,i){if(n.browser){var o=t.buffer,s=new Uint8Array(o,e,r);return c.getRandomValues(s),i?void n.nextTick(function(){i(null,t)}):t}if(!i)return a(r).copy(t,e),t;a(r,function(r,n){if(r)return i(r);n.copy(t,e),i(null,t)})}c&&c.getRandomValues||!n.browser?(e.randomFill=function(e,r,n,i){if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(r,e.length),l(n,r,e.length),d(e,r,n,i)},e.randomFillSync=function(e,r,n){void 0===r&&(r=0);if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');f(r,e.length),void 0===n&&(n=e.length-r);return l(n,r,e.length),d(e,r,n)}):(e.randomFill=i,e.randomFillSync=i)}).call(this,r(4),r(8))},function(t,e,r){t.exports=r(304)},function(t,e,r){(function(e){var n=r(55).pbkdf2Sync,i=2147483647;function o(t,r,n,i,o){if(e.isBuffer(t)&&e.isBuffer(n))t.copy(n,i,r,r+o);else for(;o--;)n[i++]=t[r++]}t.exports=function(t,r,a,s,u,c,h){if(0===a||0!=(a&a-1))throw Error("N must be > 0 and a power of 2");if(a>i/128/s)throw Error("Parameter N is too large");if(s>i/128/u)throw Error("Parameter r is too large");var f,l=new e(256*s),d=new e(128*s*a),p=new Int32Array(16),m=new Int32Array(16),v=new e(64),g=n(t,r,1,128*u*s,"sha256");if(h){var b=u*a*2,y=0;f=function(){++y%1e3==0&&h({current:y,total:b,percent:y/b*100})}}for(var _=0;_>>32-e}function k(t){var e;for(e=0;e<16;e++)p[e]=(255&t[4*e+0])<<0,p[e]|=(255&t[4*e+1])<<8,p[e]|=(255&t[4*e+2])<<16,p[e]|=(255&t[4*e+3])<<24;for(o(p,0,m,0,16),e=8;e>0;e-=2)m[4]^=x(m[0]+m[12],7),m[8]^=x(m[4]+m[0],9),m[12]^=x(m[8]+m[4],13),m[0]^=x(m[12]+m[8],18),m[9]^=x(m[5]+m[1],7),m[13]^=x(m[9]+m[5],9),m[1]^=x(m[13]+m[9],13),m[5]^=x(m[1]+m[13],18),m[14]^=x(m[10]+m[6],7),m[2]^=x(m[14]+m[10],9),m[6]^=x(m[2]+m[14],13),m[10]^=x(m[6]+m[2],18),m[3]^=x(m[15]+m[11],7),m[7]^=x(m[3]+m[15],9),m[11]^=x(m[7]+m[3],13),m[15]^=x(m[11]+m[7],18),m[1]^=x(m[0]+m[3],7),m[2]^=x(m[1]+m[0],9),m[3]^=x(m[2]+m[1],13),m[0]^=x(m[3]+m[2],18),m[6]^=x(m[5]+m[4],7),m[7]^=x(m[6]+m[5],9),m[4]^=x(m[7]+m[6],13),m[5]^=x(m[4]+m[7],18),m[11]^=x(m[10]+m[9],7),m[8]^=x(m[11]+m[10],9),m[9]^=x(m[8]+m[11],13),m[10]^=x(m[9]+m[8],18),m[12]^=x(m[15]+m[14],7),m[13]^=x(m[12]+m[15],9),m[14]^=x(m[13]+m[12],13),m[15]^=x(m[14]+m[13],18);for(e=0;e<16;++e)p[e]=m[e]+p[e];for(e=0;e<16;e++){var r=4*e;t[r+0]=p[e]>>0&255,t[r+1]=p[e]>>8&255,t[r+2]=p[e]>>16&255,t[r+3]=p[e]>>24&255}}function S(t,e,r,n,i){for(var o=0;of)&&void 0===t.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=a,l=u,h=o;var p=(1e4*(268435455&(a+=122192928e5))+u)%4294967296;i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p;var m=a/4294967296*1e4&268435455;i[n++]=m>>>8&255,i[n++]=255&m,i[n++]=m>>>24&15|16,i[n++]=m>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var v=t.node||c,g=0;g<6;g++)i[n+g]=v[g];return e||s(i)},p.v4=d,p.parse=function(t,e,r){var n=e&&r||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){i<16&&(e[n+i++]=o[t])});i<16;)e[n+i++]=0;return e},p.unparse=s,t.exports=p},function(t,e,r){(function(e){var r;if(e.crypto&&crypto.getRandomValues){var n=new Uint8Array(16);r=function(){return crypto.getRandomValues(n),n}}if(!r){var i=new Array(16);r=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}t.exports=r}).call(this,r(4))},function(t,e,r){"use strict";var n=r(5);t.exports=function(t){var e,r=this;return this.net.getId().then(function(t){return e=t,r.getBlock(0)}).then(function(r){var i="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===e&&(i="main"),"0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303"===r.hash&&2===e&&(i="morden"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===e&&(i="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===e&&(i="rinkeby"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===e&&(i="kovan"),n.isFunction(t)&&t(null,i),i}).catch(function(e){if(!n.isFunction(t))throw e;t(e)})}},function(t,e,r){"use strict";var n=r(17),i=r(37).subscriptions,o=r(19),a=r(38),s=function(){var t=this;n.packageInit(this,arguments);var e=this.setProvider;this.setProvider=function(){e.apply(t,arguments),t.net.setProvider.apply(t,arguments)},this.clearSubscriptions=t._requestManager.clearSubscriptions,this.net=new a(this.currentProvider),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};n.addProviders(s),t.exports=s},function(t,e,r){"use strict";var n=r(5),i=r(310),o=function t(e){this.givenProvider=t.givenProvider,e&&e._requestManager&&(e=e.currentProvider),"undefined"!=typeof document&&(this.pick=i.pick),this.setProvider(e)};o.givenProvider=null,"undefined"!=typeof ethereumProvider&ðereumProvider.bzz&&(o.givenProvider=ethereumProvider.bzz),o.prototype.setProvider=function(t){if(n.isObject(t)&&n.isString(t.bzz)&&(t=t.bzz),!n.isString(t)){this.currentProvider=null;var e=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw e},!1}return this.currentProvider=t,this.download=i.at(t).download,this.upload=i.at(t).upload,this.isAvailable=i.at(t).isAvailable,!0},t.exports=o},function(t,e,r){var n=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},a={platform:n,arch:n},s={join:n,slice:n},u={spawn:n},c={lookup:n},h=r(311),f=r(124),l=r(328),d=r(329),p=r(330);t.exports=p({fsp:i,files:o,os:a,path:s,child_process:u,defaultArchives:{},mimetype:c,request:h,downloadUrl:null,bytes:f,hash:l,pick:d})},function(t,e,r){var n=r(312);t.exports=function(t,e){return new Promise(function(r,i){n(t,e,function(t,e){t?i(t):r(e)})})}},function(t,e,r){var n=r(313),i=r(316),o=r(123),a=r(317),s=r(318),u="application/json",c=function(){};t.exports=function(t,e,r){if(!t||"string"!=typeof t)throw new TypeError("must specify a URL");"function"==typeof e&&(r=e,e={});if(r&&"function"!=typeof r)throw new TypeError("expected cb to be undefined or a function");r=r||c;var h=(e=e||{}).json?"json":"text",f=(e=o({responseType:h},e)).headers||{},l=(e.method||"GET").toUpperCase(),d=e.query;d&&("string"!=typeof d&&(d=n.stringify(d)),t=i(t,d));"json"===e.responseType&&a(f,"Accept",u);e.json&&"GET"!==l&&"HEAD"!==l&&(a(f,"Content-Type",u),e.body=JSON.stringify(e.body));return e.method=l,e.url=t,e.headers=f,delete e.query,delete e.json,s(e,r)}},function(t,e,r){"use strict";var n=r(314),i=r(123),o=r(315);function a(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function s(t){var e=t.indexOf("?");return-1===e?"":t.slice(e+1)}function u(t,e){var r=function(t){var e;switch(t.arrayFormat){case"index":return function(t,r,n){e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return function(t,r,n){e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};default:return function(t,e,r){void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e=i({arrayFormat:"none"},e)),n=Object.create(null);return"string"!=typeof t?n:(t=t.trim().replace(/^[?#&]/,""))?(t.split("&").forEach(function(t){var e=t.replace(/\+/g," ").split("="),i=e.shift(),a=e.length>0?e.join("="):void 0;a=void 0===a?null:o(a),r(o(i),a,n)}),Object.keys(n).sort().reduce(function(t,e){var r=n[e];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort(function(t,e){return Number(t)-Number(e)}).map(function(t){return e[t]}):e}(r):t[e]=r,t},Object.create(null))):n}e.extract=s,e.parse=u,e.stringify=function(t,e){!1===(e=i({encode:!0,strict:!0,arrayFormat:"none"},e)).sort&&(e.sort=function(){});var r=function(t){switch(t.arrayFormat){case"index":return function(e,r,n){return null===r?[a(e,t),"[",n,"]"].join(""):[a(e,t),"[",a(n,t),"]=",a(r,t)].join("")};case"bracket":return function(e,r){return null===r?a(e,t):[a(e,t),"[]=",a(r,t)].join("")};default:return function(e,r){return null===r?a(e,t):[a(e,t),"=",a(r,t)].join("")}}}(e);return t?Object.keys(t).sort(e.sort).map(function(n){var i=t[n];if(void 0===i)return"";if(null===i)return a(n,e);if(Array.isArray(i)){var o=[];return i.slice().forEach(function(t){void 0!==t&&o.push(r(n,t,o.length))}),o.join("&")}return a(n,e)+"="+a(i,e)}).filter(function(t){return t.length>0}).join("&"):""},e.parseUrl=function(t,e){return{url:t.split("?")[0]||"",query:u(s(t),e)}}},function(t,e,r){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}},function(t,e,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],o(r),o(n))}function a(t){try{return decodeURIComponent(t)}catch(i){for(var e=t.match(n),r=1;r0&&(h=setTimeout(function(){if(!s){s=!0,c.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",n(t)}},t.timeout)),c.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&c.setRequestHeader(a,p[a]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(c.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(c),c.send(d||null),c}t.exports=u,t.exports.default=u,u.XMLHttpRequest=n.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:n.XDomainRequest,function(t,e){for(var r=0;r=3&&(a=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n0){var a=i.join(r,o);n.push(y(t)(e[o])(a))}return Promise.all(n).then(function(){return r})})}}},w=function(t){return function(e){return u(t+"/bzzr:/",{body:"string"==typeof e?L(e):e,method:"POST"})}},M=function(t){return function(e){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s=t+"/bzz:/"+e+a,c={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return u(s,c).then(function(t){if(-1!==t.indexOf("error"))throw t;return t}).catch(function(t){return o>0&&i(o-1)})}(3)}}}},x=function(t){return function(e){return S(t)({"":e})}},k=function(t){return function(r){return e.readFile(r).then(function(e){return x(t)({type:a.lookup(r),data:e})})}},S=function(t){return function(e){return w(t)("{}").then(function(r){return Object.keys(e).reduce(function(r,n){return r.then(function(r){return function(n){return M(t)(n)(r)(e[r])}}(n))},Promise.resolve(r))})}},A=function(t){return function(r){return e.readFile(r).then(w(t))}},E=function(t){return function(n){return function(i){return r.directoryTree(i).then(function(t){return Promise.all(t.map(function(t){return e.readFile(t)})).then(function(e){var r=t.map(function(t){return t.slice(i.length)}),n=t.map(function(t){return a.lookup(t)||"text/plain"});return d(r)(e.map(function(t,e){return{type:n[e],data:t}}))})}).then(function(t){return function(t){return function(e){var r={};for(var n in t)r[n]=t[n];for(var i in e)r[i]=e[i];return r}}(n?{"":t[n]}:{})(t)}).then(S(t))}}},T=function(t){return function(e){if("data"===e.pick)return l.data().then(w(t));if("file"===e.pick)return l.file().then(x(t));if("directory"===e.pick)return l.directory().then(S(t));if(e.path)switch(e.kind){case"data":return A(t)(e.path);case"file":return k(t)(e.path);case"directory":return E(t)(e.defaultFile)(e.path)}else{if(e.length||"string"==typeof e)return w(t)(e);if(e instanceof Object)return S(t)(e)}return Promise.reject(new Error("Bad arguments"))}},C=function(t){return function(e){return function(r){return R(t)(e).then(function(n){return n?r?_(t)(e)(r):b(t)(e):r?y(t)(e)(r):m(t)(e)})}}},P=function(t,e){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(e||s)[i],a=c+o.archive+".tar.gz",u=o.archiveMD5,h=o.binaryMD5;return r.safeDownloadArchived(a)(u)(h)(t)},N=function(t){return new Promise(function(e,r){var n=o.spawn,i=function(t){return function(e){return-1!==(""+e).indexOf(t)}},a=t.account,s=t.password,u=t.dataDir,c=t.ensApi,h=t.privateKey,f=0,l=n(t.binPath,["--bzzaccount",a||h,"--datadir",u,"--ens-api",c]),d=function(t){0===f&&i("Passphrase")(t)?setTimeout(function(){f=1,l.stdin.write(s+"\n")},500):i("Swarm http proxy started")(t)&&(f=2,clearTimeout(p),e(l))};l.stdout.on("data",d),l.stderr.on("data",d);var p=setTimeout(function(){return r(new Error("Couldn't start swarm process."))},2e4)})},O=function(t){return new Promise(function(e,r){t.stderr.removeAllListeners("data"),t.stdout.removeAllListeners("data"),t.stdin.removeAllListeners("error"),t.removeAllListeners("error"),t.removeAllListeners("exit"),t.kill("SIGINT");var n=setTimeout(function(){return t.kill("SIGKILL")},8e3);t.once("close",function(){clearTimeout(n),e()})})},I=function(t){return w(t)("test").then(function(t){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===t}).catch(function(){return!1})},R=function(t){return function(e){return m(t)(e).then(function(t){try{return!!JSON.parse(B(t)).entries}catch(t){return!1}})}},j=function(t){return function(e,r,n,i,o){var a;return void 0!==e&&(a=t(e)),void 0!==r&&(a=t(r)),void 0!==n&&(a=t(n)),void 0!==i&&(a=t(i)),void 0!==o&&(a=t(o)),a}},B=function(t){return h.toString(h.fromUint8Array(t))},L=function(t){return h.toUint8Array(h.fromString(t))},U=function(t){return{download:function(e,r){return C(t)(e)(r)},downloadData:j(m(t)),downloadDataToDisk:j(y(t)),downloadDirectory:j(b(t)),downloadDirectoryToDisk:j(_(t)),downloadEntries:j(v(t)),downloadRoutes:j(g(t)),isAvailable:function(){return I(t)},upload:function(e){return T(t)(e)},uploadData:j(w(t)),uploadFile:j(x(t)),uploadFileFromDisk:j(x(t)),uploadDataFromDisk:j(A(t)),uploadDirectory:j(S(t)),uploadDirectoryFromDisk:j(E(t)),uploadToManifest:j(M(t)),pick:l,hash:f,fromString:L,toString:B}};return{at:U,local:function(t){return function(e){return I("http://localhost:8500").then(function(r){return r?e(U("http://localhost:8500")).then(function(){}):P(t.binPath,t.archives).onData(function(e){return(t.onProgress||function(){})(e.length)}).then(function(){return N(t)}).then(function(t){return e(U("http://localhost:8500")).then(function(){return t})}).then(O)})}},download:C,downloadBinary:P,downloadData:m,downloadDataToDisk:y,downloadDirectory:b,downloadDirectoryToDisk:_,downloadEntries:v,downloadRoutes:g,isAvailable:I,startProcess:N,stopProcess:O,upload:T,uploadData:w,uploadDataFromDisk:A,uploadFile:x,uploadFileFromDisk:k,uploadDirectory:S,uploadDirectoryFromDisk:E,uploadToManifest:M,pick:l,hash:f,fromString:L,toString:B}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isValidAddress=e.isValidEmail=void 0;var n=r(35);e.isValidEmail=function(t){return!!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)};e.isValidAddress=function(t){return!("0x"!==t.substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(t)||!/^(0x)?[0-9a-f]{40}$/.test(t)&&!/^(0x)?[0-9A-F]{40}$/.test(t)&&t!==(0,n.toChecksumAddress)(t))}},function(t){t.exports={token_transfer:{method:"transfer(address,uint256)",hash:"0xa9059cbb"},token_balance:{method:"balanceOf(address)",hash:"0x70a08231"}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTimeString=e.getLocalTimeDate=void 0;var n=r(16),i=a(r(68)),o=a(r(32));function a(t){return t&&t.__esModule?t:{default:t}}e.getLocalTimeDate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=Number(t)||Date.now();var e=new Date(t);return"".concat(e.toLocaleDateString()," ").concat(e.toLocaleTimeString())};e.getTimeString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ms",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!t)return null;var a=(0,n.convertStringToNumber)(t),s="",u="";return a&&("miliseconds"===e||"ms"===e?1===a?(s=o.default.t("time.milisecond"),u=o.default.t("time.ms")):a>=i.default.ms.second&&a=i.default.ms.minute&&a=i.default.ms.hour&&a=i.default.ms.day?1===(a=(0,n.formatFixedDecimals)((0,n.divide)(a,i.default.ms.day),2))?(s=o.default.t("time.day"),u=o.default.t("time.day")):(s=o.default.t("time.days"),u=o.default.t("time.days")):(s=o.default.t("time.miliseconds"),u=o.default.t("time.ms")):"seconds"===e||"secs"===e?1===a?(s=o.default.t("time.second"),u=o.default.t("time.sec")):a<1?1===(a=(0,n.formatFixedDecimals)((0,n.multiply)(a,i.default.ms.second)))?(s=o.default.t("time.milisecond"),u=o.default.t("time.ms")):(s=o.default.t("time.miliseconds"),u=o.default.t("time.ms")):a>=i.default.secs.minute&&a=i.default.secs.hour&&a=i.default.secs.day?1===(a=(0,n.formatFixedDecimals)((0,n.divide)(a,i.default.secs.day),2))?(s=o.default.t("time.day"),u=o.default.t("time.day")):(s=o.default.t("time.days"),u=o.default.t("time.days")):(s=o.default.t("time.seconds"),u=o.default.t("time.secs")):"minutes"!==e&&"mins"!==e||(1===a?(s=o.default.t("time.minute"),u=o.default.t("time.min")):a<1?1===(a=(0,n.formatFixedDecimals)((0,n.multiply)(a,i.default.secs.minute)))?(s=o.default.t("time.second"),u=o.default.t("time.sec")):(s=o.default.t("time.seconds"),u=o.default.t("time.secs")):a>i.default.mins.hour&&a=i.default.mins.day?1===(a=(0,n.formatFixedDecimals)((0,n.divide)(a,i.default.mins.day),2))?(s=o.default.t("time.day"),u=o.default.t("time.day")):(s=o.default.t("time.days"),u=o.default.t("time.days")):(s=o.default.t("time.minutes"),u=o.default.t("time.mins")))),r?"".concat(a," ").concat(u):"".concat(a," ").concat(s)}},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.apiGetAccountUniqueTokens=void 0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(62)),i=r(23);function o(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}var a=t.env.REACT_APP_OPENSEA_API_KEY||"",s=n.default.create({baseURL:"https://api.opensea.io/api/v1",timeout:3e4,headers:{Accept:"application/json","X-API-KEY":a}}),u=function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,u,"next",t)}function u(t){o(a,n,i,s,u,"throw",t)}s(void 0)})}}(regeneratorRuntime.mark(function t(){var e,r,n,o=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=o.length>0&&void 0!==o[0]?o[0]:"",t.next=3,s.get("/assets?owner=".concat(e));case 3:return r=t.sent,n=(0,i.parseAccountUniqueTokens)(r),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.apiGetAccountUniqueTokens=u}).call(this,r(8))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.sendClearFields=e.sendMaxBalance=e.sendUpdateSelected=e.sendUpdateNativeAmount=e.sendUpdateAssetAmount=e.sendUpdateRecipient=e.sendToggleConfirmationView=e.sendTransaction=e.sendUpdateGasPrice=e.sendModalInit=void 0;var n=r(44),i=f(r(32)),o=f(r(33)),a=r(16),s=r(23),u=r(35),c=r(126),h=r(61);function f(t){return t&&t.__esModule?t:{default:t}}function l(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:v,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"send/SEND_GET_GAS_PRICES_REQUEST":return l({},t,{fetchingGasPrices:!0,address:e.payload.address,selected:e.payload.selected,gasPrice:e.payload.gasPrices.average,gasPrices:e.payload.gasPrices,gasPriceOption:e.payload.gasPrices.average.option});case"send/SEND_GET_GAS_PRICES_SUCCESS":case"send/SEND_GET_GAS_PRICES_FAILURE":return l({},t,{fetchingGasPrices:!1,gasPrice:e.payload.average,gasPrices:e.payload,gasPriceOption:e.payload.average.option});case"send/SEND_UPDATE_GAS_PRICE_REQUEST":return l({},t,{fetchingGasPrices:!0});case"send/SEND_UPDATE_GAS_PRICE_SUCCESS":return l({},t,{fetchingGasPrices:!1,gasLimit:e.payload.gasLimit,gasPrice:e.payload.gasPrice,gasPrices:e.payload.gasPrices,gasPriceOption:e.payload.gasPriceOption});case"send/SEND_UPDATE_GAS_PRICE_FAILURE":return l({},t,{fetchingGasPrices:!1,gasPrice:e.payload.gasPrice,gasPrices:e.payload.gasPrices,gasPriceOption:e.payload.gasPriceOption});case"send/SEND_TRANSACTION_REQUEST":return l({},t,{fetching:!0});case"send/SEND_TRANSACTION_SUCCESS":return l({},t,{fetching:!1,gasPrices:{},txHash:e.payload});case"send/SEND_TRANSACTION_FAILURE":return l({},t,{fetching:!1,txHash:"",confirm:!1});case"send/SEND_UPDATE_HAS_PENDING_TRANSACTION":return l({},t,{hasPendingTransaction:e.payload});case"send/SEND_TOGGLE_CONFIRMATION_VIEW":return l({},t,{confirm:e.payload});case"send/SEND_UPDATE_RECIPIENT":return l({},t,{recipient:e.payload});case"send/SEND_UPDATE_NATIVE_AMOUNT":case"send/SEND_UPDATE_ASSET_AMOUNT":return l({},t,{assetAmount:e.payload.assetAmount,nativeAmount:e.payload.nativeAmount});case"send/SEND_UPDATE_SELECTED":return l({},t,{selected:e.payload});case"send/SEND_CLEAR_FIELDS":return l({},t,v);default:return t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parseError",{enumerable:!0,get:function(){return n.parseError}}),Object.defineProperty(e,"parseGasPrices",{enumerable:!0,get:function(){return n.parseGasPrices}});var n=r(23)},function(t,e,r){"use strict";r.r(e);var n=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init(e,r)}return t.prototype.init=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||i,this.options=e,this.debug=e.debug},t.prototype.setDebug=function(t){this.debug=t},t.prototype.log=function(){for(var t=arguments.length,e=Array(t),r=0;r-1&&r.observers[t].splice(n,1)}else delete r.observers[t]})},t.prototype.emit=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n-1?t.replace(/###/g,"."):t}function i(){return!t||"string"==typeof t}for(var o="string"!=typeof e?[].concat(e):e.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!t[a]&&r&&(t[a]=new r),t=t[a]}return i()?{}:{obj:t,k:n(o.shift())}}function c(t,e,r){var n=u(t,e,Object);n.obj[n.k]=r}function h(t,e){var r=u(t,e),n=r.obj,i=r.k;if(n)return n[i]}function f(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var l={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function d(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,function(t){return l[t]}):t}var p=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return i.data=r||{},i.options=n,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i}return m(e,t),e.prototype.addNamespaces=function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)},e.prototype.removeNamespaces=function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)},e.prototype.getResource=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[t,e];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(o=t.split(".")),h(this.data,o)},e.prototype.addResource=function(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[t,e];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(n=e,e=(a=t.split("."))[1]),this.addNamespaces(e),c(this.data,a,n),i.silent||this.emit("added",t,e,r,n)},e.prototype.addResources=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"==typeof r[i]&&this.addResource(t,e,i,r[i],{silent:!0});n.silent||this.emit("added",t,e,r)},e.prototype.addResourceBundle=function(t,e,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[t,e];t.indexOf(".")>-1&&(n=r,r=e,e=(a=t.split("."))[1]),this.addNamespaces(e);var s=h(this.data,a)||{};n?function t(e,r,n){for(var i in r)i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof r[i]||r[i]instanceof String?n&&(e[i]=r[i]):t(e[i],r[i],n):e[i]=r[i];return e}(s,r,i):s=p({},s,r),c(this.data,a,s),o.silent||this.emit("added",t,e,r)},e.prototype.removeResourceBundle=function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)},e.prototype.hasResourceBundle=function(t,e){return void 0!==this.getResource(t,e)},e.prototype.getResourceBundle=function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?p({},this.getResource(t,e)):this.getResource(t,e)},e.prototype.getDataByLanguage=function(t){return this.data[t]},e.prototype.toJSON=function(){return this.data},e}(a),g={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,r,n,i){var o=this;return t.forEach(function(t){o.processors[t]&&(e=o.processors[t].process(e,r,n,i))}),e}},b=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return function(t,e,r){t.forEach(function(t){e[t]&&(r[t]=e[t])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],r,i),i.options=n,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=o.create("translator"),i}return _(e,t),e.prototype.changeLanguage=function(t){t&&(this.language=t)},e.prototype.exists=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,e);return r&&void 0!==r.res},e.prototype.extractFromKey=function(t,e){var r=e.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=e.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var o=t.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),t=o.join(n)}return"string"==typeof i&&(i=[i]),{key:t,namespaces:i}},e.prototype.translate=function(t,e){var r=this;if("object"!==(void 0===e?"undefined":y(e))&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),void 0===t||null===t||""===t)return"";"number"==typeof t&&(t=String(t)),"string"==typeof t&&(t=[t]);var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=this.extractFromKey(t[t.length-1],e),o=i.key,a=i.namespaces,s=a[a.length-1],u=e.lng||this.language,c=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(c){var h=e.nsSeparator||this.options.nsSeparator;return s+h+o}return o}var f=this.resolve(t,e),l=f&&f.res,d=f&&f.usedKey||o,p=Object.prototype.toString.apply(l),m=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays;if(l&&("string"!=typeof l&&"boolean"!=typeof l&&"number"!=typeof l)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&(!m||"[object Array]"!==p)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,l,e):"key '"+o+" ("+this.language+")' returned an object instead of string.";if(n){var v="[object Array]"===p?[]:{};for(var g in l)if(Object.prototype.hasOwnProperty.call(l,g)){var _=""+d+n+g;v[g]=this.translate(_,b({},e,{joinArrays:!1,ns:a})),v[g]===_&&(v[g]=l[g])}l=v}}else if(m&&"[object Array]"===p)(l=l.join(m))&&(l=this.extendTranslation(l,t,e));else{var w=!1,M=!1;this.isValidLookup(l)||void 0===e.defaultValue||(w=!0,l=e.defaultValue),this.isValidLookup(l)||(M=!0,l=o);var x=e.defaultValue&&e.defaultValue!==l&&this.options.updateMissing;if(M||w||x){this.logger.log(x?"updateKey":"missingKey",u,s,o,x?e.defaultValue:l);var k=[],S=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&S&&S[0])for(var A=0;A1&&void 0!==arguments[1]?arguments[1]:{},n=void 0,i=void 0,o=void 0,a=void 0;return"string"==typeof t&&(t=[t]),t.forEach(function(t){if(!e.isValidLookup(n)){var s=e.extractFromKey(t,r),u=s.key;i=u;var c=s.namespaces;e.options.fallbackNS&&(c=c.concat(e.options.fallbackNS));var h=void 0!==r.count&&"string"!=typeof r.count,f=void 0!==r.context&&"string"==typeof r.context&&""!==r.context,l=r.lngs?r.lngs:e.languageUtils.toResolveHierarchy(r.lng||e.language);c.forEach(function(t){e.isValidLookup(n)||(a=t,l.forEach(function(i){if(!e.isValidLookup(n)){o=i;var a=u,s=[a];if(e.i18nFormat&&e.i18nFormat.addLookupKeys)e.i18nFormat.addLookupKeys(s,u,i,t,r);else{var c=void 0;h&&(c=e.pluralResolver.getSuffix(i,r.count)),h&&f&&s.push(a+c),f&&s.push(a+=""+e.options.contextSeparator+r.context),h&&s.push(a+=c)}for(var l=void 0;l=s.pop();)e.isValidLookup(n)||(n=e.getResource(i,t,l,r))}}))})}}),{res:n,usedKey:i,usedLng:o,usedNS:a}},e.prototype.isValidLookup=function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)},e.prototype.getResource=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.resourceStore.getResource(t,e,r,n)},e}(a);function M(t){return t.charAt(0).toUpperCase()+t.slice(1)}var x=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=o.create("languageUtils")}return t.prototype.getScriptPartFromCode=function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),this.formatLanguageCode(e.join("-")))},t.prototype.getLanguagePartFromCode=function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])},t.prototype.formatLanguageCode=function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map(function(t){return t.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),e.indexOf(r[1].toLowerCase())>-1&&(r[1]=M(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),e.indexOf(r[1].toLowerCase())>-1&&(r[1]=M(r[1].toLowerCase())),e.indexOf(r[2].toLowerCase())>-1&&(r[2]=M(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t},t.prototype.isWhitelisted=function(t){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(t=this.getLanguagePartFromCode(t)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(t)>-1},t.prototype.getFallbackCodes=function(t,e){if(!t)return[];if("string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var r=t[e];return r||(r=t[this.getScriptPartFromCode(e)]),r||(r=t[this.formatLanguageCode(e)]),r||(r=t.default),r||[]},t.prototype.toResolveHierarchy=function(t,e){var r=this,n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],o=function(t){t&&(r.isWhitelisted(t)?i.push(t):r.logger.warn("rejecting non-whitelisted language code: "+t))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):"string"==typeof t&&o(this.formatLanguageCode(t)),n.forEach(function(t){i.indexOf(t)<0&&o(r.formatLanguageCode(t))}),i},t}();var k=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","he","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21}],S={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0===t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0===t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)}};var A=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.languageUtils=e,this.options=r,this.logger=o.create("pluralResolver"),this.rules=function(){var t={};return k.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:S[e.fc]}})}),t}()}return t.prototype.addRule=function(t,e){this.rules[t]=e},t.prototype.getRule=function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]},t.prototype.needsPlural=function(t){var e=this.getRule(t);return e&&e.numbers.length>1},t.prototype.getPluralFormsOfKey=function(t,e){var r=this,n=[],i=this.getRule(t);return i?(i.numbers.forEach(function(i){var o=r.getSuffix(t,i);n.push(""+e+o)}),n):n},t.prototype.getSuffix=function(t,e){var r=this,n=this.getRule(t);if(n){var i=n.noAbs?n.plurals(e):n.plurals(Math.abs(e)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_"+o.toString():a():"v2"===this.options.compatibilityJSON&&2===n.numbers.length&&1===n.numbers[0]?a():this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: "+t),""},t}(),E=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.logger=o.create("interpolator"),this.init(e,!0)}return t.prototype.init=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};arguments[1]&&(this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t}),t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:d,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?f(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?f(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?f(e.nestingPrefix):e.nestingPrefixEscaped||f("$t("),this.nestingSuffix=e.nestingSuffix?f(e.nestingSuffix):e.nestingSuffixEscaped||f(")"),this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.resetRegExp()},t.prototype.reset=function(){this.options&&this.init(this.options)},t.prototype.resetRegExp=function(){var t=this.prefix+"(.+?)"+this.suffix;this.regexp=new RegExp(t,"g");var e=""+this.prefix+this.unescapePrefix+"(.+?)"+this.unescapeSuffix+this.suffix;this.regexpUnescape=new RegExp(e,"g");var r=this.nestingPrefix+"(.+?)"+this.nestingSuffix;this.nestingRegexp=new RegExp(r,"g")},t.prototype.interpolate=function(t,e,r){var n=this,i=void 0,o=void 0,a=void 0;function u(t){return t.replace(/\$/g,"$$$$")}var c=function(t){if(t.indexOf(n.formatSeparator)<0)return h(e,t);var i=t.split(n.formatSeparator),o=i.shift().trim(),a=i.join(n.formatSeparator).trim();return n.format(h(e,o),a,r)};for(this.resetRegExp(),a=0;(i=this.regexpUnescape.exec(t))&&(o=c(i[1].trim()),t=t.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++a>=this.maxReplaces)););for(a=0;i=this.regexp.exec(t);){if(void 0===(o=c(i[1].trim())))if("function"==typeof this.options.missingInterpolationHandler){var f=this.options.missingInterpolationHandler(t,i);o="string"==typeof f?f:""}else this.logger.warn("missed to pass in variable "+i[1]+" for interpolating "+t),o="";else"string"==typeof o||this.useRawValueToEscape||(o=s(o));if(o=this.escapeValue?u(this.escape(o)):u(o),t=t.replace(i[0],o),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return t},t.prototype.nest=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=void 0,i=void 0,o=E({},r);function a(t,e){if(t.indexOf(",")<0)return t;var r=t.split(",");t=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),e&&(o=E({},e,o))}catch(e){this.logger.error("failed parsing options string in nesting for key "+t,e)}return t}for(o.applyPostProcessor=!1;n=this.nestingRegexp.exec(t);){if((i=e(a.call(this,n[1].trim(),o),o))&&n[0]===t&&"string"!=typeof i)return i;"string"!=typeof i&&(i=s(i)),i||(this.logger.warn("missed to resolve "+n[1]+" for nesting "+t),i=""),t=t.replace(n[0],i),this.regexp.lastIndex=0}return t},t}(),C=Object.assign||function(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return s.backend=r,s.store=n,s.languageUtils=i.languageUtils,s.options=a,s.logger=o.create("backendConnector"),s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(i,a.backend,a),s}return N(e,t),e.prototype.queueLoad=function(t,e,r){var n=this,i=[],o=[],a=[],s=[];return t.forEach(function(t){var r=!0;e.forEach(function(e){var a=t+"|"+e;n.store.hasResourceBundle(t,e)?n.state[a]=2:n.state[a]<0||(1===n.state[a]?o.indexOf(a)<0&&o.push(a):(n.state[a]=1,r=!1,o.indexOf(a)<0&&o.push(a),i.indexOf(a)<0&&i.push(a),s.indexOf(e)<0&&s.push(e)))}),r||a.push(t)}),(i.length||o.length)&&this.queue.push({pending:o,loaded:{},errors:[],callback:r}),{toLoad:i,pending:o,toLoadLanguages:a,toLoadNamespaces:s}},e.prototype.loaded=function(t,e,r){var n=t.split("|"),i=P(n,2),o=i[0],a=i[1];e&&this.emit("failedLoading",o,a,e),r&&this.store.addResourceBundle(o,a,r),this.state[t]=e?-1:2;var s={};this.queue.forEach(function(r){!function(t,e,r,n){var i=u(t,e,Object),o=i.obj,a=i.k;o[a]=o[a]||[],n&&(o[a]=o[a].concat(r)),n||o[a].push(r)}(r.loaded,[o],a),function(t,e){for(var r=t.indexOf(e);-1!==r;)t.splice(r,1),r=t.indexOf(e)}(r.pending,t),e&&r.errors.push(e),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach(function(t){s[t]||(s[t]=[]),r.loaded[t].length&&r.loaded[t].forEach(function(e){s[t].indexOf(e)<0&&s[t].push(e)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(t){return!t.done})},e.prototype.read=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=this,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,a=arguments[5];return t.length?this.backend[r](t,e,function(s,u){s&&u&&n<5?setTimeout(function(){i.read.call(i,t,e,r,n+1,2*o,a)},o):a(s,u)}):a(null,{})},e.prototype.load=function(t,e,r){var n=this;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var i=this.queueLoad(t,e,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(function(t){n.loadOne(t)})},e.prototype.reload=function(t,e){var r=this;this.backend||this.logger.warn("No backend was added via i18next.use. Will not load resources."),"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]),t.forEach(function(t){e.forEach(function(e){r.loadOne(t+"|"+e,"re")})})},e.prototype.loadOne=function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.split("|"),i=P(n,2),o=i[0],a=i[1];this.read(o,a,"read",null,null,function(n,i){n&&e.logger.warn(r+"loading namespace "+a+" for language "+o+" failed",n),!n&&i&&e.logger.log(r+"loaded namespace "+a+" for language "+o,i),e.loaded(t,n,i)})},e.prototype.saveMissing=function(t,e,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(t,e,r,n,null,C({},o,{isUpdate:i})),t&&t[0]&&this.store.addResource(t[0],e,r,n)},e}(a);function I(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}var R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=B(this,t.call(this));if(i.options=I(r),i.services={},i.logger=o,i.modules={external:[]},n&&!i.isInitialized&&!r.isClone){var a;if(!i.options.initImmediate)return a=i.init(r,n),B(i,a);setTimeout(function(){i.init(r,n)},0)}return i}return L(e,t),e.prototype.init=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1];function n(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof e&&(r=e,e={}),this.options=j({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};return t[1]&&(e.defaultValue=t[1]),t[2]&&(e.tDescription=t[2]),e},interpolation:{escapeValue:!0,format:function(t,e,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}},this.options,I(e)),this.format=this.options.interpolation.format,r||(r=U),!this.options.isClone){this.modules.logger?o.init(n(this.modules.logger),this.options):o.init(null,this.options);var i=new x(this.options);this.store=new v(this.options.resources,this.options);var a=this.services;a.logger=o,a.resourceStore=this.store,a.languageUtils=i,a.pluralResolver=new A(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new T(this.options),a.backendConnector=new O(n(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:U;if(this.options.resources)e(null);else{if(this.language&&"cimode"===this.language.toLowerCase())return e();var r=[],n=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(t){r.indexOf(t)<0&&r.push(t)})};if(this.language)n(this.language);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(t){return n(t)});this.options.preload&&this.options.preload.forEach(function(t){return n(t)}),this.services.backendConnector.load(r,this.options.ns,e)}},e.prototype.reloadResources=function(t,e){t||(t=this.languages),e||(e=this.options.ns),this.services.backendConnector.reload(t,e)},e.prototype.use=function(t){return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&g.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this},e.prototype.changeLanguage=function(t,e){var r=this,n=function(t){t&&(r.language=t,r.languages=r.services.languageUtils.toResolveHierarchy(t),r.translator.language||r.translator.changeLanguage(t),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(t)),r.loadResources(function(n){!function(t,n){r.translator.changeLanguage(n),n&&(r.emit("languageChanged",n),r.logger.log("languageChanged",n)),e&&e(t,function(){return r.t.apply(r,arguments)})}(n,t)})};t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(n):n(t):n(this.services.languageDetector.detect())},e.prototype.getFixedT=function(t,e){var r=this,n=function t(e,n){for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a0?this.languages[0]:this.language),!t)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"},e.prototype.createInstance=function(){return new e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments[1])},e.prototype.cloneInstance=function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U,i=j({},this.options,r,{isClone:!0}),o=new e(i);return["store","services","language"].forEach(function(e){o[e]=t[e]}),o.translator=new w(o.services,o.options),o.translator.on("*",function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},function(t,e,n){"use strict";var r=n(25);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,n,o=String(t),a="",s=0,u=r;o.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&e>>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new i;e=e<<8|n}return a}},function(t,e,n){"use strict";var r=n(25);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(25);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},function(t,e,n){"use strict";var r=n(25),i=n(430),o=n(177),a=n(126),s=n(431),u=n(432);function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.baseURL&&!s(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return c(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(c(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(25);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(178);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){var r;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",h=1e14,l=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,v=1e9;function g(t){var e=0|t;return t>0||t===e?e:e-1}function y(t){for(var e,n,r=1,i=t.length,o=t[0]+"";rc^n?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;ao[a]^n?1:-1;return u==c?0:u>c^n?1:-1}function _(t,e,n,r){if(tn||t!==(t<0?s(t):u(t)))throw Error(c+(r||"Argument")+("number"==typeof t?tn?" out of range: ":" not an integer: ":" not a primitive number: ")+t)}function w(t){return"[object Array]"==Object.prototype.toString.call(t)}function M(t){var e=t.c.length-1;return g(t.e/l)==e&&t.c[e]%2!=0}function x(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function S(t,e,n){var r,i;if(e<0){for(i=n+".";++e;i+=n);t=i+t}else if(++e>(r=t.length)){for(i=n,e-=r;--e;i+=n);t+=i}else e=10;h/=10,c++);return g.e=c,void(g.c=[t])}v=t+""}else{if(!a.test(v=t+""))return i(g,v,p);g.s=45==v.charCodeAt(0)?(v=v.slice(1),-1):1}(c=v.indexOf("."))>-1&&(v=v.replace(".","")),(h=v.search(/e/i))>0?(c<0&&(c=h),c+=+v.slice(h+1),v=v.substring(0,h)):c<0&&(c=v.length)}else{if(_(e,2,B.length,"Base"),v=t+"",10==e)return q(g=new L(t instanceof L?t:v),A+g.e+1,E);if(p="number"==typeof t){if(0*t!=0)return i(g,v,p,e);if(g.s=1/t<0?(v=v.slice(1),-1):1,L.DEBUG&&v.replace(/^0\.0*|\./,"").length>15)throw Error(f+t);p=!1}else g.s=45===v.charCodeAt(0)?(v=v.slice(1),-1):1;for(n=B.slice(0,e),c=h=0,m=v.length;hc){c=m;continue}}else if(!s&&(v==v.toUpperCase()&&(v=v.toLowerCase())||v==v.toLowerCase()&&(v=v.toUpperCase()))){s=!0,h=-1,c=0;continue}return i(g,t+"",p,e)}(c=(v=r(v,e,10,g.s)).indexOf("."))>-1?v=v.replace(".",""):c=v.length}for(h=0;48===v.charCodeAt(h);h++);for(m=v.length;48===v.charCodeAt(--m););if(v=v.slice(h,++m)){if(m-=h,p&&L.DEBUG&&m>15&&(t>d||t!==u(t)))throw Error(f+g.s*t);if((c=c-h-1)>O)g.c=g.e=null;else if(cs){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function F(t,e){var n,r,i=0;for(w(t[0])&&(t=t[0]),n=new L(t[0]);++i=10;i/=10,r++);return(n=r+n*l-1)>O?t.c=t.e=null:n=10;c/=10,i++);if((o=e-i)<0)o+=l,a=e,m=(f=v[d=0])/g[i-a-1]%10|0;else if((d=s((o+1)/l))>=v.length){if(!r)break t;for(;v.length<=d;v.push(0));f=m=0,i=1,a=(o%=l)-l+1}else{for(f=c=v[d],i=1;c>=10;c/=10,i++);m=(a=(o%=l)-l+i)<0?0:f/g[i-a-1]%10|0}if(r=r||e<0||null!=v[d+1]||(a<0?f:f%g[i-a-1]),r=n<4?(m||r)&&(0==n||n==(t.s<0?3:2)):m>5||5==m&&(4==n||r||6==n&&(o>0?a>0?f/g[i-a]:0:v[d-1])%10&1||n==(t.s<0?8:7)),e<1||!v[0])return v.length=0,r?(e-=t.e+1,v[0]=g[(l-e%l)%l],t.e=-e||0):v[0]=t.e=0,t;if(0==o?(v.length=d,c=1,d--):(v.length=d+1,c=g[l-o],v[d]=a>0?u(f/g[i-a]%g[a])*c:0),r)for(;;){if(0==d){for(o=1,a=v[0];a>=10;a/=10,o++);for(a=v[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(t.e++,v[0]==h&&(v[0]=1));break}if(v[d]+=c,v[d]!=h)break;v[d--]=0,c=1}for(o=v.length;0===v[--o];v.pop());}t.e>O?t.c=t.e=null:t.e>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[f]=r[0],n[f+1]=r[1]):(h.push(a%1e14),f+=2);f=o/2}else{if(!crypto.randomBytes)throw N=!1,Error(c+"crypto unavailable");for(n=crypto.randomBytes(o*=7);f=9e15?crypto.randomBytes(7).copy(n,f):(h.push(a%1e14),f+=7);f=o/7}if(!N)for(;f=10;a/=10,f++);fn-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(e,r,i,o,a){var s,u,c,f,h,l,d,p,m=e.indexOf("."),v=A,g=E;for(m>=0&&(f=R,R=0,e=e.replace(".",""),l=(p=new L(r)).pow(e.length-m),R=f,p.c=t(S(y(l.c),l.e,"0"),10,i,"0123456789"),p.e=p.c.length),c=f=(d=t(e,r,i,a?(s=B,"0123456789"):(s="0123456789",B))).length;0==d[--f];d.pop());if(!d[0])return s.charAt(0);if(m<0?--c:(l.c=d,l.e=c,l.s=o,d=(l=n(l,p,v,g,i)).c,h=l.r,c=l.e),m=d[u=c+v+1],f=i/2,h=h||u<0||null!=d[u+1],h=g<4?(null!=m||h)&&(0==g||g==(l.s<0?3:2)):m>f||m==f&&(4==g||h||6==g&&1&d[u-1]||g==(l.s<0?8:7)),u<1||!d[0])e=h?S(s.charAt(1),-v,s.charAt(0)):s.charAt(0);else{if(d.length=u,h)for(--i;++d[--u]>i;)d[u]=0,u||(++c,d=[1].concat(d));for(f=d.length;!d[--f];);for(m=0,e="";m<=f;e+=s.charAt(d[m++]));e=S(e,c,s.charAt(0))}return e}}(),n=function(){function t(t,e,n){var r,i,o,a,s=0,u=t.length,c=e%m,f=e/m|0;for(t=t.slice();u--;)s=((i=c*(o=t[u]%m)+(r=f*o+(a=t[u]/m|0)*c)%m*m+s)/n|0)+(r/m|0)+f*a,t[u]=i%n;return s&&(t=[s].concat(t)),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.splice(0,1));}return function(r,i,o,a,s){var c,f,d,p,m,v,y,b,_,w,M,x,S,k,A,E,T,C=r.s==i.s?1:-1,P=r.c,O=i.c;if(!(P&&P[0]&&O&&O[0]))return new L(r.s&&i.s&&(P?!O||P[0]!=O[0]:O)?P&&0==P[0]||!O?0*C:C/0:NaN);for(_=(b=new L(C)).c=[],C=o+(f=r.e-i.e)+1,s||(s=h,f=g(r.e/l)-g(i.e/l),C=C/l|0),d=0;O[d]==(P[d]||0);d++);if(O[d]>(P[d]||0)&&f--,C<0)_.push(1),p=!0;else{for(k=P.length,E=O.length,d=0,C+=2,(m=u(s/(O[0]+1)))>1&&(O=t(O,m,s),P=t(P,m,s),E=O.length,k=P.length),S=E,M=(w=P.slice(0,E)).length;M=s/2&&A++;do{if(m=0,(c=e(O,w,E,M))<0){if(x=w[0],E!=M&&(x=x*s+(w[1]||0)),(m=u(x/A))>1)for(m>=s&&(m=s-1),y=(v=t(O,m,s)).length,M=w.length;1==e(v,w,y,M);)m--,n(v,E=10;C/=10,d++);q(b,o+(b.e=d+f*l-1)+1,a,p)}else b.e=f,b.r=+p;return b}}(),i=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var f,h=s?a:a.replace(i,"");if(r.test(h))o.s=isNaN(h)?null:h<0?-1:1,o.c=o.e=null;else{if(!s&&(h=h.replace(t,function(t,e,n){return f="x"==(n=n.toLowerCase())?16:"b"==n?2:8,u&&u!=f?t:e}),u&&(f=u,h=h.replace(e,"$1").replace(n,"0.$1")),a!=h))return new L(h,f);if(L.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+a);o.c=o.e=o.s=null}}}(),o.absoluteValue=o.abs=function(){var t=new L(this);return t.s<0&&(t.s=1),t},o.comparedTo=function(t,e){return b(this,new L(t,e))},o.decimalPlaces=o.dp=function(t,e){var n,r,i,o=this;if(null!=t)return _(t,0,v),null==e?e=E:_(e,0,8),q(new L(o),t+o.e+1,e);if(!(n=o.c))return null;if(r=((i=n.length-1)-g(this.e/l))*l,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},o.dividedBy=o.div=function(t,e){return n(this,new L(t,e),A,E)},o.dividedToIntegerBy=o.idiv=function(t,e){return n(this,new L(t,e),0,1)},o.exponentiatedBy=o.pow=function(t,e){var n,r,i,o,a,f,h,d=this;if((t=new L(t)).c&&!t.isInteger())throw Error(c+"Exponent not an integer: "+t);if(null!=e&&(e=new L(e)),o=t.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!t.c||!t.c[0])return h=new L(Math.pow(+d.valueOf(),o?2-M(t):+t)),e?h.mod(e):h;if(a=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new L(NaN);(r=!a&&d.isInteger()&&e.isInteger())&&(d=d.mod(e))}else{if(t.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||o&&d.c[1]>=24e7:d.c[0]<8e13||o&&d.c[0]<=9999975e7)))return i=d.s<0&&M(t)?-0:0,d.e>-1&&(i=1/i),new L(a?1/i:i);R&&(i=s(R/l+2))}for(o?(n=new L(.5),f=M(t)):f=t%2,a&&(t.s=1),h=new L(k);;){if(f){if(!(h=h.times(d)).c)break;i?h.c.length>i&&(h.c.length=i):r&&(h=h.mod(e))}if(o){if(q(t=t.times(n),t.e+1,1),!t.c[0])break;o=t.e>14,f=M(t)}else{if(!(t=u(t/2)))break;f=t%2}d=d.times(d),i?d.c&&d.c.length>i&&(d.c.length=i):r&&(d=d.mod(e))}return r?h:(a&&(h=k.div(h)),e?h.mod(e):i?q(h,R,E,void 0):h)},o.integerValue=function(t){var e=new L(this);return null==t?t=E:_(t,0,8),q(e,e.e+1,t)},o.isEqualTo=o.eq=function(t,e){return 0===b(this,new L(t,e))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(t,e){return b(this,new L(t,e))>0},o.isGreaterThanOrEqualTo=o.gte=function(t,e){return 1===(e=b(this,new L(t,e)))||0===e},o.isInteger=function(){return!!this.c&&g(this.e/l)>this.c.length-2},o.isLessThan=o.lt=function(t,e){return b(this,new L(t,e))<0},o.isLessThanOrEqualTo=o.lte=function(t,e){return-1===(e=b(this,new L(t,e)))||0===e},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(t,e){var n,r,i,o,a=this,s=a.s;if(e=(t=new L(t,e)).s,!s||!e)return new L(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/l,c=t.e/l,f=a.c,d=t.c;if(!u||!c){if(!f||!d)return f?(t.s=-e,t):new L(d?a:NaN);if(!f[0]||!d[0])return d[0]?(t.s=-e,t):new L(f[0]?a:3==E?-0:0)}if(u=g(u),c=g(c),f=f.slice(),s=u-c){for((o=s<0)?(s=-s,i=f):(c=u,i=d),i.reverse(),e=s;e--;i.push(0));i.reverse()}else for(r=(o=(s=f.length)<(e=d.length))?s:e,s=e=0;e0)for(;e--;f[n++]=0);for(e=h-1;r>s;){if(f[--r]=0;){for(n=0,p=x[i]%_,v=x[i]/_|0,o=i+(a=u);o>i;)n=((c=p*(c=M[--a]%_)+(s=v*c+(f=M[a]/_|0)*p)%_*_+y[o]+n)/b|0)+(s/_|0)+v*f,y[o--]=c%b;y[o]=n}return n?++r:y.splice(0,1),D(t,y,r)},o.negated=function(){var t=new L(this);return t.s=-t.s||null,t},o.plus=function(t,e){var n,r=this,i=r.s;if(e=(t=new L(t,e)).s,!i||!e)return new L(NaN);if(i!=e)return t.s=-e,r.minus(t);var o=r.e/l,a=t.e/l,s=r.c,u=t.c;if(!o||!a){if(!s||!u)return new L(i/0);if(!s[0]||!u[0])return u[0]?t:new L(s[0]?r:0*i)}if(o=g(o),a=g(a),s=s.slice(),i=o-a){for(i>0?(a=o,n=u):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(e=u.length)<0&&(n=u,u=s,s=n,e=i),i=0;e;)i=(s[--e]=s[e]+u[e]+i)/h|0,s[e]=h===s[e]?0:s[e]%h;return i&&(s=[i].concat(s),++a),D(t,s,a)},o.precision=o.sd=function(t,e){var n,r,i,o=this;if(null!=t&&t!==!!t)return _(t,1,v),null==e?e=E:_(e,0,8),q(new L(o),t,e);if(!(n=o.c))return null;if(r=(i=n.length-1)*l+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return t&&o.e+1>r&&(r=o.e+1),r},o.shiftedBy=function(t){return _(t,-d,d),this.times("1e"+t)},o.squareRoot=o.sqrt=function(){var t,e,r,i,o,a=this,s=a.c,u=a.s,c=a.e,f=A+4,h=new L("0.5");if(1!==u||!s||!s[0])return new L(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+a))||u==1/0?(((e=y(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(e),c=g((c+1)/2)-(c<0||c%2),r=new L(e=u==1/0?"1e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):r=new L(u+""),r.c[0])for((u=(c=r.e)+f)<3&&(u=0);;)if(o=r,r=h.times(o.plus(n(a,o,f,1))),y(o.c).slice(0,u)===(e=y(r.c)).slice(0,u)){if(r.e0&&l>0){for(r=l%o||o,u=h.substr(0,r);r0&&(u+=s+h.slice(r)),f&&(u="-"+u)}n=c?u+j.decimalSeparator+((a=+j.fractionGroupSize)?c.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+j.fractionGroupSeparator):c):u}return n},o.toFraction=function(t){var e,r,i,o,a,s,u,f,h,d,m,v,g=this,b=g.c;if(null!=t&&(!(f=new L(t)).isInteger()&&(f.c||1!==f.s)||f.lt(k)))throw Error(c+"Argument "+(f.isInteger()?"out of range: ":"not an integer: ")+t);if(!b)return g.toString();for(r=new L(k),d=i=new L(k),o=h=new L(k),v=y(b),s=r.e=v.length-g.e-1,r.c[0]=p[(u=s%l)<0?l+u:u],t=!t||f.comparedTo(r)>0?s>0?r:d:f,u=O,O=1/0,f=new L(v),h.c[0]=0;m=n(f,r,0,1),1!=(a=i.plus(m.times(o))).comparedTo(t);)i=o,o=a,d=h.plus(m.times(a=d)),h=a,r=f.minus(m.times(a=r)),f=a;return a=n(t.minus(i),o,0,1),h=h.plus(a.times(d)),i=i.plus(a.times(o)),h.s=d.s=g.s,e=n(d,o,s*=2,E).minus(g).abs().comparedTo(n(h,i,s,E).minus(g).abs())<1?[d.toString(),o.toString()]:[h.toString(),i.toString()],O=u,e},o.toNumber=function(){return+this},o.toPrecision=function(t,e){return null!=t&&_(t,1,v),U(this,t,e,2)},o.toString=function(t){var e,n=this,i=n.s,o=n.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(e=y(n.c),null==t?e=o<=T||o>=C?x(e,o):S(e,o,"0"):(_(t,2,B.length,"Base"),e=r(S(e,o,"0"),10,t,i,!0)),i<0&&n.c[0]&&(e="-"+e)),e},o.valueOf=o.toJSON=function(){var t,e=this,n=e.e;return null===n?e.toString():(t=y(e.c),t=n<=T||n>=C?x(t,n):S(t,n,"0"),e.s<0?"-"+t:t)},o._isBigNumber=!0,null!=e&&L.set(e),L}()).default=o.BigNumber=o,void 0===(r=function(){return o}.call(e,n,e,t))||(t.exports=r)}()},function(t,e,n){"use strict";var r=n(437).version,i=n(53),o=n(490),a=n(94),s=n(199),u=n(584),c=n(585),f=n(26),h=function(){var t=this;i.packageInit(this,arguments),this.version=r,this.utils=f,this.eth=new o(this),this.shh=new u(this),this.bzz=new c(this);var e=this.setProvider;this.setProvider=function(n,r){return e.apply(t,arguments),this.eth.setProvider(n,r),this.shh.setProvider(n,r),this.bzz.setProvider(n),!0}};h.version=r,h.utils=f,h.modules={Eth:o,Net:a,Personal:s,Shh:u,Bzz:c},i.addProviders(h),t.exports=h},function(t){t.exports={name:"web3",namespace:"ethereum",version:"1.0.0-beta.35",description:"Ethereum JavaScript API",repository:"https://github.com/ethereum/web3.js/tree/master/packages/web3",license:"LGPL-3.0",main:"src/index.js",types:"index.d.ts",bugs:{url:"https://github.com/ethereum/web3.js/issues"},keywords:["Ethereum","JavaScript","API"],author:"ethereum.org",authors:[{name:"Fabian Vogelsteller",email:"fabian@ethereum.org",homepage:"http://frozeman.de"},{name:"Marek Kotewicz",email:"marek@parity.io",url:"https://github.com/debris"},{name:"Marian Oancea",url:"https://github.com/cubedro"},{name:"Gav Wood",email:"g@parity.io",homepage:"http://gavwood.com"},{name:"Jeffery Wilcke",email:"jeffrey.wilcke@ethereum.org",url:"https://github.com/obscuren"}],dependencies:{"web3-bzz":"1.0.0-beta.35","web3-core":"1.0.0-beta.35","web3-eth":"1.0.0-beta.35","web3-eth-personal":"1.0.0-beta.35","web3-net":"1.0.0-beta.35","web3-shh":"1.0.0-beta.35","web3-utils":"1.0.0-beta.35"}}},function(t,e,n){"use strict";var r=n(15),i=n(16).errors,o=n(187),a=n(454),s=n(455),u=function t(e){this.provider=null,this.providers=t.providers,this.setProvider(e),this.subscriptions={}};u.givenProvider=s,u.providers={WebsocketProvider:n(456),HttpProvider:n(465),IpcProvider:n(484)},u.prototype.setProvider=function(t,e){var n=this;if(t&&"string"==typeof t&&this.providers)if(/^http(s)?:\/\//i.test(t))t=new this.providers.HttpProvider(t);else if(/^ws(s)?:\/\//i.test(t))t=new this.providers.WebsocketProvider(t);else if(t&&"object"==typeof e&&"function"==typeof e.connect)t=new this.providers.IpcProvider(t,e);else if(t)throw new Error("Can't autodetect provider for \""+t+'"');this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=t||null,this.provider&&this.provider.on&&this.provider.on("data",function(t,e){(t=t||e).method&&n.subscriptions[t.params.subscription]&&n.subscriptions[t.params.subscription].callback&&n.subscriptions[t.params.subscription].callback(null,t.params.result)})},u.prototype.send=function(t,e){if(e=e||function(){},!this.provider)return e(i.InvalidProvider());var n=o.toPayload(t.method,t.params);this.provider[this.provider.sendAsync?"sendAsync":"send"](n,function(t,r){return r&&r.id&&n.id!==r.id?e(new Error('Wrong response id "'+r.id+'" (expected: "'+n.id+'") in '+JSON.stringify(n))):t?e(t):r&&r.error?e(i.ErrorResponse(r)):o.isValidResponse(r)?void e(null,r.result):e(i.InvalidResponse(r))})},u.prototype.sendBatch=function(t,e){if(!this.provider)return e(i.InvalidProvider());var n=o.toBatchPayload(t);this.provider[this.provider.sendAsync?"sendAsync":"send"](n,function(t,n){return t?e(t):r.isArray(n)?void e(null,n):e(i.InvalidResponse(n))})},u.prototype.addSubscription=function(t,e,n,r){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions[t]={callback:r,type:n,name:e}},u.prototype.removeSubscription=function(t,e){this.subscriptions[t]&&(this.send({method:this.subscriptions[t].type+"_unsubscribe",params:[t]},e),delete this.subscriptions[t])},u.prototype.clearSubscriptions=function(t){var e=this;Object.keys(this.subscriptions).forEach(function(n){t&&"syncing"===e.subscriptions[n].name||e.removeSubscription(n)}),this.provider.reset&&this.provider.reset()},t.exports={Manager:u,BatchManager:a}},function(t,e,n){"use strict";t.exports={ErrorResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:JSON.stringify(t);return new Error("Returned error: "+e)},InvalidNumberOfParams:function(t,e,n){return new Error('Invalid number of parameters for "'+n+'". Got '+t+" expected "+e+"!")},InvalidConnection:function(t){return new Error("CONNECTION ERROR: Couldn't connect to node "+t+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:"Invalid JSON RPC response: "+JSON.stringify(t);return new Error(e)},ConnectionTimeout:function(t){return new Error("CONNECTION TIMEOUT: timeout of "+t+" ms achived")}}},function(t,e,n){"use strict";var r=n(15),i=n(26),o=n(186),a=function(t){return i.toBN(t).toString(10)},s=function(t){if(void 0!==t)return function(t){return"latest"===t||"pending"===t||"earliest"===t}(t)?t:i.isHexStrict(t)?r.isString(t)?t.toLowerCase():t:i.numberToHex(t)},u=function(t){if(t.to&&(t.to=h(t.to)),t.data&&t.input)throw new Error('You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.');if(!t.data&&t.input&&(t.data=t.input,delete t.input),t.data&&!i.isHex(t.data))throw new Error("The data field must be HEX encoded data.");return(t.gas||t.gasLimit)&&(t.gas=t.gas||t.gasLimit),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=i.numberToHex(t[e])}),t},c=function(t){return null!==t.blockNumber&&(t.blockNumber=i.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=i.hexToNumber(t.transactionIndex)),t.nonce=i.hexToNumber(t.nonce),t.gas=i.hexToNumber(t.gas),t.gasPrice=a(t.gasPrice),t.value=a(t.value),t.to&&i.isAddress(t.to)?t.to=i.toChecksumAddress(t.to):t.to=null,t.from&&(t.from=i.toChecksumAddress(t.from)),t},f=function(t){if("string"==typeof t.blockHash&&"string"==typeof t.transactionHash&&"string"==typeof t.logIndex){var e=i.sha3(t.blockHash.replace("0x","")+t.transactionHash.replace("0x","")+t.logIndex.replace("0x",""));t.id="log_"+e.replace("0x","").substr(0,8)}else t.id||(t.id=null);return null!==t.blockNumber&&(t.blockNumber=i.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=i.hexToNumber(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=i.hexToNumber(t.logIndex)),t.address&&(t.address=i.toChecksumAddress(t.address)),t},h=function(t){var e=new o(t);if(e.isValid()&&e.isDirect())return e.toAddress().toLowerCase();if(i.isAddress(t))return"0x"+t.toLowerCase().replace("0x","");throw new Error('Provided address "'+t+"\" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.")};t.exports={inputDefaultBlockNumberFormatter:function(t){return!this||void 0!==t&&null!==t?"genesis"===t||"earliest"===t?"0x0":s(t):this.defaultBlock},inputBlockNumberFormatter:s,inputCallFormatter:function(t){var e=(t=u(t)).from||(this?this.defaultAccount:null);return e&&(t.from=h(e)),t},inputTransactionFormatter:function(t){if(t=u(t),!r.isNumber(t.from)&&!r.isObject(t.from)){if(t.from=t.from||(this?this.defaultAccount:null),!t.from&&!r.isNumber(t.from))throw new Error('The send transactions "from" field must be defined!');t.from=h(t.from)}return t},inputAddressFormatter:h,inputPostFormatter:function(t){return t.ttl&&(t.ttl=i.numberToHex(t.ttl)),t.workToProve&&(t.workToProve=i.numberToHex(t.workToProve)),t.priority&&(t.priority=i.numberToHex(t.priority)),r.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map(function(t){return 0===t.indexOf("0x")?t:i.fromUtf8(t)}),t},inputLogFormatter:function(t){var e=function(t){return null===t||void 0===t?null:0===(t=String(t)).indexOf("0x")?t:i.fromUtf8(t)};return t.topics=t.topics||[],t.topics=t.topics.map(function(t){return r.isArray(t)?t.map(e):e(t)}),e=null,t.address&&(t.address=r.isArray(t.address)?t.address.map(function(t){return h(t)}):h(t.address)),t},inputSignFormatter:function(t){return i.isHexStrict(t)?t:i.utf8ToHex(t)},outputBigNumberFormatter:a,outputTransactionFormatter:c,outputTransactionReceiptFormatter:function(t){if("object"!=typeof t)throw new Error("Received receipt is invalid: "+t);return null!==t.blockNumber&&(t.blockNumber=i.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=i.hexToNumber(t.transactionIndex)),t.cumulativeGasUsed=i.hexToNumber(t.cumulativeGasUsed),t.gasUsed=i.hexToNumber(t.gasUsed),r.isArray(t.logs)&&(t.logs=t.logs.map(f)),t.contractAddress&&(t.contractAddress=i.toChecksumAddress(t.contractAddress)),void 0!==t.status&&(t.status=Boolean(parseInt(t.status))),t},outputBlockFormatter:function(t){return t.gasLimit=i.hexToNumber(t.gasLimit),t.gasUsed=i.hexToNumber(t.gasUsed),t.size=i.hexToNumber(t.size),t.timestamp=i.hexToNumber(t.timestamp),null!==t.number&&(t.number=i.hexToNumber(t.number)),t.difficulty&&(t.difficulty=a(t.difficulty)),t.totalDifficulty&&(t.totalDifficulty=a(t.totalDifficulty)),r.isArray(t.transactions)&&t.transactions.forEach(function(t){if(!r.isString(t))return c(t)}),t.miner&&(t.miner=i.toChecksumAddress(t.miner)),t},outputLogFormatter:f,outputPostFormatter:function(t){return t.expiry=i.hexToNumber(t.expiry),t.sent=i.hexToNumber(t.sent),t.ttl=i.hexToNumber(t.ttl),t.workProved=i.hexToNumber(t.workProved),t.topics||(t.topics=[]),t.topics=t.topics.map(function(t){return i.toUtf8(t)}),t},outputSyncingFormatter:function(t){return t.startingBlock=i.hexToNumber(t.startingBlock),t.currentBlock=i.hexToNumber(t.currentBlock),t.highestBlock=i.hexToNumber(t.highestBlock),t.knownStates&&(t.knownStates=i.hexToNumber(t.knownStates),t.pulledStates=i.hexToNumber(t.pulledStates)),t}}},function(t,e,n){"use strict";var r=n(442),i=n(182),o=new r(0),a=new r(-1),s={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function u(t){var e=t?t.toLowerCase():"ether",n=s[e];if("string"!=typeof n)throw new Error("[ethjs-unit] the unit provided "+t+" doesn't exists, please use the one of the following units "+JSON.stringify(s,null,2));return new r(n,10)}function c(t){if("string"==typeof t){if(!t.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+t+"', should be a number matching (^-?[0-9.]+).");return t}if("number"==typeof t)return String(t);if("object"==typeof t&&t.toString&&(t.toTwos||t.dividedToIntegerBy))return t.toPrecision?String(t.toPrecision()):t.toString(10);throw new Error("while converting number to string, invalid number value '"+t+"' type "+typeof t+".")}t.exports={unitMap:s,numberToString:c,getValueOfUnit:u,fromWei:function(t,e,n){var r=i(t),c=r.lt(o),f=u(e),h=s[e].length-1||1,l=n||{};c&&(r=r.mul(a));for(var d=r.mod(f).toString(10);d.length2)throw new Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal points");var l=h[0],d=h[1];if(l||(l="0"),d||(d="0"),d.length>o)throw new Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal places");for(;d.length=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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 n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&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 c=["","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"],f=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}n.words[c]=0|h,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(t=t||10,e=0|e||1,16===t||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=0;nt.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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,y=v>>>13,b=0|a[3],_=8191&b,w=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],A=8191&k,E=k>>>13,T=0|a[6],C=8191&T,P=T>>>13,O=0|a[7],N=8191&O,I=O>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,F=L>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],G=8191&H,W=H>>>13,V=0|s[2],K=8191&V,Z=V>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],ht=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var vt=(c+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var gt=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,q),i=(i=Math.imul(g,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),r=r+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(S,q)|0,o=Math.imul(S,z),r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(A,q),i=(i=Math.imul(A,z))+Math.imul(E,q)|0,o=Math.imul(E,z),r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(_,K)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(l,nt)|0))<<13)|0;c=((o=o+Math.imul(l,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(P,q)|0,o=Math.imul(P,z),r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(I,q)|0,o=Math.imul(I,z),r=r+Math.imul(C,G)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Y)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(C,K)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var St=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(U,G),i=(i=Math.imul(U,W))+Math.imul(F,G)|0,o=Math.imul(F,W),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,Z)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var At=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,Z))+Math.imul(F,K)|0,o=Math.imul(F,Z),r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,r=r+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(r=r+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,r=r+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,lt)|0;var Tt=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(B,nt)|0,o=o+Math.imul(B,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(U,nt),i=(i=Math.imul(U,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,r=r+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var Ot=(c+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),r=r+Math.imul(j,ht)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Nt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(r=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=yt,u[3]=bt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Ot,u[16]=Nt,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?l(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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(r("number"==typeof t),r(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)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(i,l,h);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(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 M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(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 y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):n.strip(),n},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(y,g),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var h=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,n(40)(t))},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){for(var e,n=c(t),r=n[0],a=n[1],s=new o(function(t,e,n){return 3*(e+n)/4-n}(0,r,a)),u=0,f=a>0?r-4:r,h=0;h>16&255,s[u++]=e>>8&255,s[u++]=255&e;2===a&&(e=i[t.charCodeAt(h)]<<2|i[t.charCodeAt(h+1)]>>4,s[u++]=255&e);1===a&&(e=i[t.charCodeAt(h)]<<10|i[t.charCodeAt(h+1)]<<4|i[t.charCodeAt(h+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function h(t,e,n){for(var r,i=[],o=e;o>1,f=-7,h=n?i-1:0,l=n?-1:1,d=t[e+h];for(h+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+h],h+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+t[e+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=f?(s=0,a=f):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[n+d]=255&a,d+=p,a/=256,c-=8);t[n+d-p]|=128*m}},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(2).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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 n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&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 c=["","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"],f=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}n.words[c]=0|h,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(t=t||10,e=0|e||1,16===t||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=0;nt.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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,y=v>>>13,b=0|a[3],_=8191&b,w=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],A=8191&k,E=k>>>13,T=0|a[6],C=8191&T,P=T>>>13,O=0|a[7],N=8191&O,I=O>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,F=L>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],G=8191&H,W=H>>>13,V=0|s[2],K=8191&V,Z=V>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],ht=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var vt=(c+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var gt=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,q),i=(i=Math.imul(g,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),r=r+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(S,q)|0,o=Math.imul(S,z),r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(A,q),i=(i=Math.imul(A,z))+Math.imul(E,q)|0,o=Math.imul(E,z),r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(_,K)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(l,nt)|0))<<13)|0;c=((o=o+Math.imul(l,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(P,q)|0,o=Math.imul(P,z),r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(I,q)|0,o=Math.imul(I,z),r=r+Math.imul(C,G)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Y)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(C,K)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var St=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(U,G),i=(i=Math.imul(U,W))+Math.imul(F,G)|0,o=Math.imul(F,W),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,Z)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var At=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,Z))+Math.imul(F,K)|0,o=Math.imul(F,Z),r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,r=r+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(r=r+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,r=r+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,lt)|0;var Tt=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(B,nt)|0,o=o+Math.imul(B,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(U,nt),i=(i=Math.imul(U,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,r=r+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var Ot=(c+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),r=r+Math.imul(j,ht)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Nt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(r=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=yt,u[3]=bt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Ot,u[16]=Nt,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?l(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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(r("number"==typeof t),r(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)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(i,l,h);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(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 M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(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 y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):n.strip(),n},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(y,g),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var h=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,n(40)(t))},function(t,e,n){var r=n(447);t.exports=function(t){return"string"!=typeof t?t:r(t)?t.slice(2):t}},function(t,e){t.exports=function(t){if("string"!=typeof t)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},function(t,e,n){(function(t,r){var i;/*! https://mths.be/utf8js v2.0.0 by @mathias */!function(o){var a="object"==typeof e&&e,s=("object"==typeof t&&t&&t.exports,"object"==typeof r&&r);s.global!==s&&s.window;var u,c,f,h=String.fromCharCode;function l(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function p(t,e){return h(t>>e&63|128)}function m(t){if(0==(4294967168&t))return h(t);var e="";return 0==(4294965248&t)?e=h(t>>6&31|192):0==(4294901760&t)?(d(t),e=h(t>>12&15|224),e+=p(t,6)):0==(4292870144&t)&&(e=h(t>>18&7|240),e+=p(t,12),e+=p(t,6)),e+=h(63&t|128)}function v(){if(f>=c)throw Error("Invalid byte index");var t=255&u[f];if(f++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function g(){var t,e;if(f>c)throw Error("Invalid byte index");if(f==c)return!1;if(t=255&u[f],f++,0==(128&t))return t;if(192==(224&t)){if((e=(31&t)<<6|v())>=128)return e;throw Error("Invalid continuation byte")}if(224==(240&t)){if((e=(15&t)<<12|v()<<6|v())>=2048)return d(e),e;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=(15&t)<<18|v()<<12|v()<<6|v())>=65536&&e<=1114111)return e;throw Error("Invalid UTF-8 detected")}var y={version:"2.0.0",encode:function(t){for(var e=l(t),n=e.length,r=-1,i="";++r65535&&(i+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),i+=h(e);return i}(n)}};void 0===(i=function(){return y}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n(40)(t),n(10))},function(t,e,n){var r=n(15),i=n(184),o=n(183),a=function(t){var e=typeof t;if("string"===e)return o.isHexStrict(t)?new i(t.replace(/0x/i,""),16):new i(t,10);if("number"===e)return new i(t);if(o.isBigNumber(t))return new i(t.toString(10));if(o.isBN(t))return t;throw new Error(t+" is not a number")},s=function(t,e,n){var r,s;if("bytes"===(t=function(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}(t))){if(e.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+e.length);return e}if("string"===t)return o.utf8ToHex(e);if("bool"===t)return e?"01":"00";if(t.startsWith("address")){if(r=n?64:40,!o.isAddress(e))throw new Error(e+" is not a valid address, or the checksum is invalid.");return o.leftPad(e.toLowerCase(),r)}if(r=function(t){var e=/^\D+(\d+).*$/.exec(t);return e?parseInt(e[1],10):null}(t),t.startsWith("bytes")){if(!r)throw new Error("bytes[] not yet supported in solidity");if(n&&(r=32),r<1||r>32||r256)throw new Error("Invalid uint"+r+" size");if((s=a(e)).bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return r?o.leftPad(s.toString("hex"),r/8*2):s}if(t.startsWith("int")){if(r%8||r<8||r>256)throw new Error("Invalid int"+r+" size");if((s=a(e)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(r).toString("hex"):r?o.leftPad(s.toString("hex"),r/8*2):s}throw new Error("Unsupported or invalid type: "+t)},u=function(t){if(r.isArray(t))throw new Error("Autodetection of array types is not supported.");var e,n,a="";if(r.isObject(t)&&(t.hasOwnProperty("v")||t.hasOwnProperty("t")||t.hasOwnProperty("value")||t.hasOwnProperty("type"))?(e=t.hasOwnProperty("t")?t.t:t.type,a=t.hasOwnProperty("v")?t.v:t.value):(e=o.toHex(t,!0),a=o.toHex(t),e.startsWith("int")||e.startsWith("uint")||(e="bytes")),!e.startsWith("int")&&!e.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),r.isArray(a)){if((n=function(t){var e=/^\D+\d*\[(\d+)\]$/.exec(t);return e?parseInt(e[1],10):null}(e))&&a.length!==n)throw new Error(e+" is not matching the given array "+JSON.stringify(a));n=a.length}return r.isArray(a)?a.map(function(t){return s(e,t,n).toString("hex").replace("0x","")}).join(""):s(e,a,n).toString("hex").replace("0x","")};t.exports=function(){var t=Array.prototype.slice.call(arguments),e=r.map(t,u);return o.sha3("0x"+e.join(""))}},function(t,e,n){t.exports=function(t,e){var r=n(451),i="function"==typeof e;if(t>65536){if(!i)throw new Error("Requested too many random bytes.");e(new Error("Requested too many random bytes."))}if(void 0!==r&&r.randomBytes){if(!i)return"0x"+r.randomBytes(t).toString("hex");r.randomBytes(t,function(t,n){t?e(u):e(null,"0x"+n.toString("hex"))})}else{var o;if(void 0!==r?o=r:"undefined"!=typeof msCrypto&&(o=msCrypto),o&&o.getRandomValues){var a=o.getRandomValues(new Uint8Array(t)),s="0x"+Array.from(a).map(function(t){return t.toString(16)}).join("");if(!i)return s;e(null,s)}else{var u=new Error('No "crypto" object available. This Browser doesn\'t support generating secure random bytes.');if(!i)throw u;e(u)}}}},function(t,e,n){t.exports=n(452)},function(t,e){t.exports=window.crypto},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(2).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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 n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&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 c=["","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"],f=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}n.words[c]=0|h,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(t=t||10,e=0|e||1,16===t||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=0;nt.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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,y=v>>>13,b=0|a[3],_=8191&b,w=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],A=8191&k,E=k>>>13,T=0|a[6],C=8191&T,P=T>>>13,O=0|a[7],N=8191&O,I=O>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,F=L>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],G=8191&H,W=H>>>13,V=0|s[2],K=8191&V,Z=V>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],ht=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var vt=(c+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var gt=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,q),i=(i=Math.imul(g,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),r=r+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(S,q)|0,o=Math.imul(S,z),r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(A,q),i=(i=Math.imul(A,z))+Math.imul(E,q)|0,o=Math.imul(E,z),r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(_,K)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(l,nt)|0))<<13)|0;c=((o=o+Math.imul(l,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(P,q)|0,o=Math.imul(P,z),r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(I,q)|0,o=Math.imul(I,z),r=r+Math.imul(C,G)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Y)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(C,K)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var St=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(U,G),i=(i=Math.imul(U,W))+Math.imul(F,G)|0,o=Math.imul(F,W),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,Z)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var At=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,Z))+Math.imul(F,K)|0,o=Math.imul(F,Z),r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,r=r+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(r=r+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,r=r+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,lt)|0;var Tt=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(B,nt)|0,o=o+Math.imul(B,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(U,nt),i=(i=Math.imul(U,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,r=r+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var Ot=(c+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),r=r+Math.imul(j,ht)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Nt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(r=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=yt,u[3]=bt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Ot,u[16]=Nt,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?l(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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(r("number"==typeof t),r(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)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(i,l,h);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(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 M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(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 y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):n.strip(),n},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(y,g),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var h=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,n(40)(t))},function(t,e,n){"use strict";var r=n(187),i=n(16).errors,o=function(t){this.requestManager=t,this.requests=[]};o.prototype.add=function(t){this.requests.push(t)},o.prototype.execute=function(){var t=this.requests;this.requestManager.sendBatch(t,function(e,n){n=n||[],t.map(function(t,e){return n[e]||{}}).forEach(function(e,n){if(t[n].callback){if(e&&e.error)return t[n].callback(i.ErrorResponse(e));if(!r.isValidResponse(e))return t[n].callback(i.InvalidResponse(e));try{t[n].callback(null,t[n].format?t[n].format(e.result):e.result)}catch(e){t[n].callback(e)}}})})},t.exports=o},function(t,e,n){"use strict";var r=null,i=Function("return this")();void 0!==i.ethereumProvider?r=i.ethereumProvider:void 0!==i.web3&&i.web3.currentProvider&&(i.web3.currentProvider.sendAsync&&(i.web3.currentProvider.send=i.web3.currentProvider.sendAsync,delete i.web3.currentProvider.sendAsync),!i.web3.currentProvider.on&&i.web3.currentProvider.connection&&"ipcProviderWrapper"===i.web3.currentProvider.connection.constructor.name&&(i.web3.currentProvider.on=function(t,e){if("function"!=typeof e)throw new Error("The second parameter callback must be a function.");switch(t){case"data":this.connection.on("data",function(t){var n="";t=t.toString();try{n=JSON.parse(t)}catch(n){return e(new Error("Couldn't parse response data"+t))}n.id||-1===n.method.indexOf("_subscription")||e(null,n)});break;default:this.connection.on(t,e)}}),r=i.web3.currentProvider),t.exports=r},function(t,e,n){"use strict";(function(e){var r=n(15),i=n(16).errors,o=null,a=null,s=null;if("undefined"!=typeof window&&void 0!==window.WebSocket)o=window.WebSocket,a=btoa,s=function(t){return new URL(t)};else{o=n(457).w3cwebsocket,a=function(t){return e(t).toString("base64")};var u=n(69);if(u.URL){var c=u.URL;s=function(t){return new c(t)}}else s=n(69).parse}var f=function(t,e){var n=this;this.responseCallbacks={},this.notificationCallbacks=[],e=e||{},this._customTimeout=e.timeout;var i=s(t),u=e.headers||{},c=e.protocol||void 0;i.username&&i.password&&(u.authorization="Basic "+a(i.username+":"+i.password)),this.connection=new o(t,c,void 0,u),this.addDefaultEvents(),this.connection.onmessage=function(t){var e="string"==typeof t.data?t.data:"";n._parseResponse(e).forEach(function(t){var e=null;r.isArray(t)?t.forEach(function(t){n.responseCallbacks[t.id]&&(e=t.id)}):e=t.id,e||-1===t.method.indexOf("_subscription")?n.responseCallbacks[e]&&(n.responseCallbacks[e](null,t),delete n.responseCallbacks[e]):n.notificationCallbacks.forEach(function(e){r.isFunction(e)&&e(t)})})},Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0})};f.prototype.addDefaultEvents=function(){var t=this;this.connection.onerror=function(){t._timeout()},this.connection.onclose=function(){t._timeout(),t.reset()}},f.prototype._parseResponse=function(t){var e=this,n=[];return t.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(t){e.lastChunk&&(t=e.lastChunk+t);var r=null;try{r=JSON.parse(t)}catch(n){return e.lastChunk=t,clearTimeout(e.lastChunkTimeout),void(e.lastChunkTimeout=setTimeout(function(){throw e._timeout(),i.InvalidResponse(t)},15e3))}clearTimeout(e.lastChunkTimeout),e.lastChunk=null,r&&n.push(r)}),n},f.prototype._addResponseCallback=function(t,e){var n=t.id||t[0].id,r=t.method||t[0].method;this.responseCallbacks[n]=e,this.responseCallbacks[n].method=r;var o=this;this._customTimeout&&setTimeout(function(){o.responseCallbacks[n]&&(o.responseCallbacks[n](i.ConnectionTimeout(o._customTimeout)),delete o.responseCallbacks[n])},this._customTimeout)},f.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](i.InvalidConnection("on WS")),delete this.responseCallbacks[t])},f.prototype.send=function(t,e){var n=this;if(this.connection.readyState!==this.connection.CONNECTING){if(this.connection.readyState!==this.connection.OPEN)return console.error("connection not open on send()"),"function"==typeof this.connection.onerror?this.connection.onerror(new Error("connection not open")):console.error("no error callback"),void e(new Error("connection not open"));this.connection.send(JSON.stringify(t)),this._addResponseCallback(t,e)}else setTimeout(function(){n.send(t,e)},10)},f.prototype.on=function(t,e){if("function"!=typeof e)throw new Error("The second parameter callback must be a function.");switch(t){case"data":this.notificationCallbacks.push(e);break;case"connect":this.connection.onopen=e;break;case"end":this.connection.onclose=e;break;case"error":this.connection.onerror=e}},f.prototype.removeListener=function(t,e){var n=this;switch(t){case"data":this.notificationCallbacks.forEach(function(t,r){t===e&&n.notificationCallbacks.splice(r,1)})}},f.prototype.removeAllListeners=function(t){switch(t){case"data":this.notificationCallbacks=[];break;case"connect":this.connection.onopen=null;break;case"end":this.connection.onclose=null;break;case"error":this.connection.onerror=null}},f.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.addDefaultEvents()},t.exports=f}).call(this,n(2).Buffer)},function(t,e,n){var r=function(){return this||{}}(),i=r.WebSocket||r.MozWebSocket,o=n(458);function a(t,e){return e?new i(t,e):new i(t)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach(function(t){Object.defineProperty(a,t,{get:function(){return i[t]}})}),t.exports={w3cwebsocket:i?a:null,version:o}},function(t,e,n){t.exports=n(459).version},function(t){t.exports={name:"websocket",description:"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.",keywords:["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],author:"Brian McKelvey (https://www.worlize.com/)",contributors:["Iñaki Baz Castillo (http://dev.sipdoc.net)"],version:"1.0.26",repository:{type:"git",url:"https://github.com/theturtle32/WebSocket-Node.git"},homepage:"https://github.com/theturtle32/WebSocket-Node",engines:{node:">=0.10.0"},dependencies:{debug:"^2.2.0",nan:"^2.3.3","typedarray-to-buffer":"^3.1.2",yaeti:"^0.0.6"},devDependencies:{"buffer-equal":"^1.0.0",faucet:"^0.0.1",gulp:"git+https://github.com/gulpjs/gulp.git#4.0","gulp-jshint":"^2.0.4","jshint-stylish":"^2.2.1",jshint:"^2.0.0",tape:"^4.0.1"},config:{verbose:!1},scripts:{install:"(node-gyp rebuild 2> builderror.log) || (exit 0)",test:"faucet test/unit",gulp:"gulp"},main:"index",directories:{lib:"./lib"},browser:"lib/browser.js",license:"Apache-2.0"}},function(t,e,n){(function(t,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){"object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=36,f=1,h=26,l=38,d=700,p=72,m=128,v="-",g=/^xn--/,y=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=c-f,M=Math.floor,x=String.fromCharCode;function S(t){throw new RangeError(_[t])}function k(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function A(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+k((t=t.replace(b,".")).split("."),e).join(".")}function E(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=x((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=x(t)}).join("")}function C(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:c}function P(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function O(t,e,n){var r=0;for(t=n?M(t/d):t>>1,t+=M(t/e);t>w*h>>1;r+=c)t=M(t/w);return M(r+(w+1)*t/(t+l))}function N(t){var e,n,r,i,o,a,s,l,d,g,y=[],b=t.length,_=0,w=m,x=p;for((n=t.lastIndexOf(v))<0&&(n=0),r=0;r=128&&S("not-basic"),y.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=b&&S("invalid-input"),((l=C(t.charCodeAt(i++)))>=c||l>M((u-_)/a))&&S("overflow"),_+=l*a,!(l<(d=s<=x?f:s>=x+h?h:s-x));s+=c)a>M(u/(g=c-d))&&S("overflow"),a*=g;x=O(_-o,e=y.length+1,0==o),M(_/e)>u-w&&S("overflow"),w+=M(_/e),_%=e,y.splice(_++,0,w)}return T(y)}function I(t){var e,n,r,i,o,a,s,l,d,g,y,b,_,w,k,A=[];for(b=(t=E(t)).length,e=m,n=0,o=p,a=0;a=e&&yM((u-n)/(_=r+1))&&S("overflow"),n+=(s-e)*_,e=s,a=0;au&&S("overflow"),y==e){for(l=n,d=c;!(l<(g=d<=o?f:d>=o+h?h:d-o));d+=c)k=l-g,w=c-g,A.push(x(P(g+k%w,0))),l=M(k/w);A.push(x(P(l,0))),o=O(n,_,r==i),n=0,++r}++n,++e}return A.join("")}s={version:"1.4.1",ucs2:{decode:E,encode:T},decode:N,encode:I,toASCII:function(t){return A(t,function(t){return y.test(t)?"xn--"+I(t):t})},toUnicode:function(t){return A(t,function(t){return g.test(t)?N(t.slice(4).toLowerCase()):t})}},void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n(40)(t),n(10))},function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";e.decode=e.parse=n(463),e.encode=e.stringify=n(464)},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var f=0;f=0?(h=m.substr(0,v),l=m.substr(v+1)):(h=m,l=""),d=decodeURIComponent(h),p=decodeURIComponent(l),r(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?o(a(t),function(a){var s=encodeURIComponent(r(a))+n;return i(t[a])?o(t[a],function(t){return s+encodeURIComponent(r(t))}).join(e):s+encodeURIComponent(r(t[a]))}).join(e):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r=0)return this._url=this._parseUrl(e.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),null!=this._headers["Content-Type"]&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=e,this._response.on("data",function(t){return r._onHttpResponseData(e,t)}),this._response.on("end",function(){return r._onHttpResponseEnd(e)}),this._response.on("close",function(){return r._onHttpResponseClose(e)}),this.responseUrl=this._url.href.split("#")[0],this.status=e.statusCode,this.statusText=a.STATUS_CODES[this.status],this._parseResponseHeaders(e);var i=this._responseHeaders["content-length"]||"";this._totalBytes=+i,this._lengthComputable=!!i,this._setReadyState(n.HEADERS_RECEIVED)}},n.prototype._onHttpResponseData=function(t,e){this._response===t&&(this._responseParts.push(new r(e)),this._loadedBytes+=e.length,this.readyState!==n.LOADING&&this._setReadyState(n.LOADING),this._dispatchProgress("progress"))},n.prototype._onHttpResponseEnd=function(t){this._response===t&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(n.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},n.prototype._onHttpResponseClose=function(t){if(this._response===t){var e=this._request;this._setError(),e.abort(),this._setReadyState(n.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},n.prototype._onHttpTimeout=function(t){this._request===t&&(this._setError(),t.abort(),this._setReadyState(n.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},n.prototype._onHttpRequestError=function(t,e){this._request===t&&(this._setError(),t.abort(),this._setReadyState(n.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},n.prototype._dispatchProgress=function(t){var e=new n.ProgressEvent(t);e.lengthComputable=this._lengthComputable,e.loaded=this._loadedBytes,e.total=this._totalBytes,this.dispatchEvent(e)},n.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},n.prototype._parseUrl=function(t,e,n){var r=null==this.nodejsBaseUrl?t:c.resolve(this.nodejsBaseUrl,t),i=c.parse(r,!1,!0);i.hash=null;var o=(i.auth||"").split(":"),a=o[0],s=o[1];return(a||s||e||n)&&(i.auth=(e||a||"")+":"+(n||s||"")),i},n.prototype._parseResponseHeaders=function(t){for(var e in this._responseHeaders={},t.headers){var n=e.toLowerCase();this._privateHeaders[n]||(this._responseHeaders[n]=t.headers[e])}null!=this._mimeOverride&&(this._responseHeaders["content-type"]=this._mimeOverride)},n.prototype._parseResponse=function(){var t=r.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(t.toString("utf-8"))}catch(t){this.response=null}return;case"buffer":return this.responseText=null,void(this.response=t);case"arraybuffer":this.responseText=null;for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),i=0;i0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e=r.allocUnsafe(t>>>0),n=this.head,i=0;n;)o(n.data,e,i),i+=n.data.length,n=n.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(473),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(10))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i=1,o={},a=!1,s=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){f(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&f(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),r=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){f(t.data)},r=function(e){t.port2.postMessage(e)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var t=s.documentElement;r=function(e){var n=s.createElement("script");n.onreadystatechange=function(){f(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():r=function(t){setTimeout(f,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n0;)if(q+=n,n=t.charAt(a++),4===z?(j+=String.fromCharCode(parseInt(q,16)),z=0,c=a-1):z++,!n)break t;if('"'===n&&!L){F=D.pop()||p,j+=t.substring(c,a-1);break}if(!("\\"!==n||L||(L=!0,j+=t.substring(c,a-1),n=t.charAt(a++))))break;if(L){if(L=!1,"n"===n?j+="\n":"r"===n?j+="\r":"t"===n?j+="\t":"f"===n?j+="\f":"b"===n?j+="\b":"u"===n?(z=1,q=""):j+=n,n=t.charAt(a++),c=a-1,n)continue;break}h.lastIndex=a;var l=h.exec(t);if(!l){a=t.length+1,j+=t.substring(c,a-1);break}if(a=l.index+1,!(n=t.charAt(l.index))){j+=t.substring(c,a-1);break}}continue;case M:if(!n)continue;if("r"!==n)return K("Invalid true started with t"+n);F=x;continue;case x:if(!n)continue;if("u"!==n)return K("Invalid true started with tr"+n);F=S;continue;case S:if(!n)continue;if("e"!==n)return K("Invalid true started with tru"+n);o(!0),s(),F=D.pop()||p;continue;case k:if(!n)continue;if("a"!==n)return K("Invalid false started with f"+n);F=A;continue;case A:if(!n)continue;if("l"!==n)return K("Invalid false started with fa"+n);F=E;continue;case E:if(!n)continue;if("s"!==n)return K("Invalid false started with fal"+n);F=T;continue;case T:if(!n)continue;if("e"!==n)return K("Invalid false started with fals"+n);o(!1),s(),F=D.pop()||p;continue;case C:if(!n)continue;if("u"!==n)return K("Invalid null started with n"+n);F=P;continue;case P:if(!n)continue;if("l"!==n)return K("Invalid null started with nu"+n);F=O;continue;case O:if(!n)continue;if("l"!==n)return K("Invalid null started with nul"+n);o(null),s(),F=D.pop()||p;continue;case N:if("."!==n)return K("Leading zero not followed by .");B+=n,F=I;continue;case I:if(-1!=="0123456789".indexOf(n))B+=n;else if("."===n){if(-1!==B.indexOf("."))return K("Invalid number has two dots");B+=n}else if("e"===n||"E"===n){if(-1!==B.indexOf("e")||-1!==B.indexOf("E"))return K("Invalid number has two exponential");B+=n}else if("+"===n||"-"===n){if("e"!==r&&"E"!==r)return K("Invalid symbol in number");B+=n}else B&&(o(parseFloat(B)),s(),B=""),a--,F=D.pop()||p;continue;default:return K("Unknown state: "+F)}G>=R&&function(){var t=0;j!==u&&j.length>f&&(K("Max buffer length exceeded: textNode"),t=Math.max(t,j.length)),B.length>f&&(K("Max buffer length exceeded: numberNode"),t=Math.max(t,B.length)),R=f-t+G}()}),t(Q).on(function(){if(F==d)return o({}),s(),void(U=!0);F===p&&0===H||K("Unexpected end");j!==u&&(o(j),s(),j=u);U=!0})}var j=function(){var t=p(function(t){return t.unshift(/^/),function(t){return t.exec.bind(t)}(RegExp(t.map(h("source")).join("")))}),e=/(\$?)/,n=/(?:{([\w ]*?)})?/,r=t(e,/([\w-_]+|\*)/,n),i=t(e,/\["([^"]+)"\]/,n),o=t(e,/\[(\d+|\*)\]/,n),a=t(e,/()/,/{([\w ]*?)}/),s=t(/\.\./),u=t(/\./),c=t(e,/!/),f=t(/$/);return function(t){return t(l(r,i,o,a),s,u,c,f)}}();function B(t,e){return{key:t,node:e}}var L=h("key"),U=h("node"),F={};function D(t){var e=t(G).emit,n=t(W).emit,r=t($).emit,i=t(X).emit;function a(t,e,n){U(k(t))[e]=n}function s(t,n,r){t&&a(t,n,r);var i=x(B(n,r),t);return e(i),i}var u={};return u[nt]=function(t,e){if(!t)return r(e),s(t,F,e);var n=function(t,e){var n=U(k(t));return y(o,n)?s(t,b(n),e):t}(t,e),i=A(n),u=L(k(n));return a(i,u,e),x(B(u,e),i)},u[rt]=function(t){return n(t),A(t)||i(U(k(t)))},u[et]=s,u}var q=j(function(t,e,n,r,i){var o=1,s=2,u=3,h=f(L,k),d=f(U,k);function p(t,e){return!!e[o]?m(t,k):t}function v(t){if(t==g)return g;return m(function(t){return h(t)!=F},f(t,A))}function y(){return function(t){return h(t)==F}}function _(t,e,n,r,i){var o=t(n);if(o){var a=function(t,e,n){return O(function(t,e){return e(t,n)},e,t)}(e,r,o);return i(n.substr(b(o[0])),a)}}function w(t,e){return c(_,t,e)}var x=l(w(t,T(p,function(t,e){var n=e[u];return n?m(f(c(M,E(n.split(/\W+/))),d),t):t},function(t,e){var n=e[s];return m(n&&"*"!=n?function(t){return h(t)==n}:g,t)},v)),w(e,T(function(t){if(t==g)return g;var e=y(),n=t,r=v(function(t){return i(t)}),i=l(e,n,r);return i})),w(n,T()),w(r,T(p,y)),w(i,T(function(t){return function(e){var n=t(e);return!0===n?k(e):n}})),function(t){throw a('"'+t+'" could not be tokenised')});function S(t,e){return e}function C(t,e){return x(t,e,t?C:S)}return function(t){try{return C(t,g)}catch(e){throw a('Could not compile "'+t+'" because '+e.message)}}});function z(t,e,n){var r,i;function o(t){return function(e){return e.id==t}}return{on:function(n,o){var a={listener:n,id:o||n};return e&&e.emit(t,n,a.id),r=x(a,r),i=x(n,i),this},emit:function(){!function t(e,n){e&&(k(e).apply(null,n),t(A(e),n))}(i,arguments)},un:function(e){var a;r=N(r,o(e),function(t){a=t}),a&&(i=N(i,function(t){return t==a.listener}),n&&n.emit(t,a.listener,a.id))},listeners:function(){return i},hasListener:function(t){return w(function t(e,n){return n&&(e(k(n))?k(n):t(e,A(n)))}(t?o(t):g,r))}}}var H=1,G=H++,W=H++,V=H++,K=H++,Z="fail",X=H++,$=H++,Y="start",J="data",Q="end",tt=H++,et=H++,nt=H++,rt=H++;function it(t,e,n){try{var r=s.parse(e)}catch(t){}return{statusCode:t,body:e,jsonBody:r,thrown:n}}function ot(t,e){var n={node:t(W),path:t(G)};function r(e,n,r){var i=t(e).emit;n.on(function(t){var e=r(t);!1!==e&&function(t,e,n){var r=I(n);t(e,C(A(P(L,r))),C(P(U,r)))}(i,U(e),t)},e),t("removeListener").on(function(r){r==e&&(t(r).listeners()||n.un(e))})}t("newListener").on(function(t){var i=/(node|path):(.*)/.exec(t);if(i){var o=n[i[1]];o.hasListener(t)||r(t,o,e(i[2]))}})}function at(t,e){var n,r=/^(node|path):./,i=t(X),o=t(K).emit,a=t(V).emit,s=p(function(e,i){if(n[e])d(i,n[e]);else{var o=t(e),a=i[0];r.test(e)?u(o,a):o.on(a)}return n});function u(t,e,r){r=r||e;var i=f(e);return t.on(function(){var e=!1;n.forget=function(){e=!0},d(arguments,i),delete n.forget,e&&t.un(r)},r),n}function f(t){return function(){try{return t.apply(n,arguments)}catch(t){setTimeout(function(){throw t})}}}function h(e,n,r){var i;i="node"==e?function(t){return function(){var e=t.apply(this,arguments);w(e)&&(e==ct.drop?o():a(e))}}(r):r,u(function(e,n){return t(e+":"+n)}(e,n),i,r)}function l(t,e,r){return _(e)?h(t,e,r):function(t,e){for(var n in e)h(t,n,e[n])}(t,e),n}return t($).on(function(t){n.root=function(t){return function(){return t}}(t)}),t(Y).on(function(t,e){n.header=function(t){return t?e[t]:e}}),n={on:s,addListener:s,removeListener:function(e,r,o){if("done"==e)i.un(r);else if("node"==e||"path"==e)t.un(e+":"+r,o);else{var a=r;t(e).un(a)}return n},emit:t.emit,node:c(l,"node"),path:c(l,"path"),done:c(u,i),start:c(function(e,r){return t(e).on(f(r),r),n},Y),fail:t(Z).on,abort:t(tt).emit,header:v,root:v,source:e}}function st(t,e,r,i,o){var a=function(){var t={},e=r("newListener"),n=r("removeListener");function r(r){return t[r]=z(r,e,n)}function i(e){return t[e]||r(e)}return["emit","on","un"].forEach(function(t){i[t]=p(function(e,n){d(n,i(e)[t])})}),i}();return e&&function(t,e,r,i,o,a,s){"use strict";var f=t(J).emit,h=t(Z).emit,l=0,d=!0;function p(){var t=e.responseText,n=t.substr(l);n&&f(n),l=b(t)}t(tt).on(function(){e.onreadystatechange=null,e.abort()}),"onprogress"in e&&(e.onprogress=p),e.onreadystatechange=function(){function n(){try{d&&t(Y).emit(e.status,function(t){var e={};return t&&t.split("\r\n").forEach(function(t){var n=t.indexOf(": ");e[t.substring(0,n)]=t.substring(n+2)}),e}(e.getAllResponseHeaders())),d=!1}catch(t){}}switch(e.readyState){case 2:case 3:return n();case 4:n(),2==String(e.status)[0]?(p(),t(Q).emit()):h(it(e.status,e.responseText))}};try{for(var m in e.open(r,i,!0),a)e.setRequestHeader(m,a[m]);(function(t,e){function n(e){return e.port||function(t){return{"http:":80,"https:":443}[t]}(e.protocol||t.protocol)}return!!(e.protocol&&e.protocol!=t.protocol||e.host&&e.host!=t.host||e.host&&n(e)!=n(t))})(n.location,function(t){var e=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(t)||[];return{protocol:e[1]||"",host:e[2]||"",port:e[3]||""}}(i))||e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.withCredentials=s,e.send(o)}catch(t){n.setTimeout(c(h,it(u,u,t)),0)}}(a,new XMLHttpRequest,t,e,r,i,o),R(a),function(t,e){"use strict";var n,r={};function i(t){return function(e){n=t(n,e)}}for(var o in e)t(o).on(i(e[o]),r);t(V).on(function(t){var e=k(n),r=L(e),i=A(n);i&&(U(k(i))[r]=t)}),t(K).on(function(){var t=k(n),e=L(t),r=A(n);r&&delete U(k(r))[e]}),t(tt).on(function(){for(var n in e)t(n).un(r)})}(a,D(a)),ot(a,q),at(a,e)}function ut(t,e,n,r,i,o,a){return i=i?s.parse(s.stringify(i)):{},r?_(r)||(r=s.stringify(r),i["Content-Type"]=i["Content-Type"]||"application/json"):r=null,t(n||"GET",function(t,e){return!1===e&&(-1==t.indexOf("?")?t+="?":t+="&",t+="_="+(new Date).getTime()),t}(e,a),r,i,o||!1)}function ct(t){var e=T("resume","pause","pipe"),n=c(M,e);return t?n(t)||_(t)?ut(st,t):ut(st,t.url,t.method,t.body,t.headers,t.withCredentials,t.cached):st()}ct.drop=function(){return ct.drop},(r=function(){return ct}.apply(e,[]))===u||(t.exports=r)}(function(){try{return window}catch(t){return self}}(),Object,Array,Error,JSON)},function(t,e,n){"use strict";var r=n(16).formatters,i=n(55),o=n(26);t.exports=function(t){var e=function(e){var n;return e.property?(t[e.property]||(t[e.property]={}),n=t[e.property]):n=t,e.methods&&e.methods.forEach(function(e){e instanceof i||(e=new i(e)),e.attachToObject(n),e.setRequestManager(t._requestManager)}),t};return e.formatters=r,e.utils=o,e.Method=i,e}},function(t,e,n){"use strict";t.exports=n(488)(window,function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}})},function(t,e,n){"use strict";var r=null;t.exports=function(t,e){return function(n,i){n=n||null;var o=!1!==(i=i||{}).global;if(null===r&&o&&(r=t["@@any-promise/REGISTRATION"]||null),null!==r&&null!==n&&r.implementation!==n)throw new Error('any-promise already defined as "'+r.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===r&&(r=null!==n&&void 0!==i.Promise?{Promise:i.Promise,implementation:n}:e(n),o&&(t["@@any-promise/REGISTRATION"]=r)),r}}},function(t,e,n){"use strict";var r=n(15),i=n(16).errors,o=n(197);function a(t){o.call(this),this.id=null,this.callback=null,this.arguments=null,this._reconnectIntervalId=null,this.options={subscription:t.subscription,type:t.type,requestManager:t.requestManager}}a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype._extractCallback=function(t){if(r.isFunction(t[t.length-1]))return t.pop()},a.prototype._validateArgs=function(t){var e=this.options.subscription;if(e||(e={}),e.params||(e.params=0),t.length!==e.params)throw i.InvalidNumberOfParams(t.length,e.params+1,t[0])},a.prototype._formatInput=function(t){var e=this.options.subscription;return e&&e.inputFormatter?e.inputFormatter.map(function(e,n){return e?e(t[n]):t[n]}):t},a.prototype._formatOutput=function(t){var e=this.options.subscription;return e&&e.outputFormatter&&t?e.outputFormatter(t):t},a.prototype._toPayload=function(t){var e=[];if(this.callback=this._extractCallback(t),this.subscriptionMethod||(this.subscriptionMethod=t.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(t),this._validateArgs(this.arguments),t=[]),e.push(this.subscriptionMethod),e=e.concat(this.arguments),t.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:e}},a.prototype.unsubscribe=function(t){this.options.requestManager.removeSubscription(this.id,t),this.id=null,this.removeAllListeners(),clearInterval(this._reconnectIntervalId)},a.prototype.subscribe=function(){var t=this,e=Array.prototype.slice.call(arguments),n=this._toPayload(e);if(!n)return this;if(!this.options.requestManager.provider){var i=new Error("No provider set.");return this.callback(i,null,this),this.emit("error",i),this}if(!this.options.requestManager.provider.on){var o=new Error("The current provider doesn't support subscriptions: "+this.options.requestManager.provider.constructor.name);return this.callback(o,null,this),this.emit("error",o),this}return this.id&&this.unsubscribe(),this.options.params=n.params[1],"logs"===n.params[0]&&r.isObject(n.params[1])&&n.params[1].hasOwnProperty("fromBlock")&&isFinite(n.params[1].fromBlock)&&this.options.requestManager.send({method:"eth_getLogs",params:[n.params[1]]},function(e,n){e?(t.callback(e,null,t),t.emit("error",e)):n.forEach(function(e){var n=t._formatOutput(e);t.callback(null,n,t),t.emit("data",n)})}),"object"==typeof n.params[1]&&delete n.params[1].fromBlock,this.options.requestManager.send(n,function(e,i){!e&&i?(t.id=i,t.options.requestManager.addSubscription(t.id,n.params[0],t.options.type,function(e,n){e?(t.options.requestManager.removeSubscription(t.id),t.options.requestManager.provider.once&&(t._reconnectIntervalId=setInterval(function(){t.options.requestManager.provider.reconnect&&t.options.requestManager.provider.reconnect()},500),t.options.requestManager.provider.once("connect",function(){clearInterval(t._reconnectIntervalId),t.subscribe(t.callback)})),t.emit("error",e),r.isFunction(t.callback)&&t.callback(e,null,t)):(r.isArray(n)||(n=[n]),n.forEach(function(e){var n=t._formatOutput(e);if(r.isFunction(t.options.subscription.subscriptionHandler))return t.options.subscription.subscriptionHandler.call(t,n);t.emit("data",n),r.isFunction(t.callback)&&t.callback(null,n,t)}))})):r.isFunction(t.callback)?(t.callback(e,null,t),t.emit("error",e)):t.emit("error",e)}),this},t.exports=a},function(t,e,n){"use strict";var r=n(15),i=n(53),o=n(16),a=n(93).subscriptions,s=n(55),u=n(26),c=n(94),f=n(199),h=n(491),l=n(186),d=n(500),p=n(200),m=n(583),v=o.formatters,g=function(t){return r.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},y=function(t){return r.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},b=function(t){return r.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},_=function(t){return r.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},w=function(t){return r.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},M=function(){var t=this;i.packageInit(this,arguments);var e=this.setProvider;this.setProvider=function(){e.apply(t,arguments),t.net.setProvider.apply(t,arguments),t.personal.setProvider.apply(t,arguments),t.accounts.setProvider.apply(t,arguments),t.Contract.setProvider(t.currentProvider,t.accounts)};var n=null,o="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return n},set:function(e){return e&&(n=u.toChecksumAddress(v.inputAddressFormatter(e))),t.Contract.defaultAccount=n,t.personal.defaultAccount=n,S.forEach(function(t){t.defaultAccount=n}),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return o},set:function(e){return o=e,t.Contract.defaultBlock=o,t.personal.defaultBlock=o,S.forEach(function(t){t.defaultBlock=o}),e},enumerable:!0}),this.clearSubscriptions=t._requestManager.clearSubscriptions,this.net=new c(this.currentProvider),this.net.getNetworkType=m.bind(this),this.accounts=new d(this.currentProvider),this.personal=new f(this.currentProvider),this.personal.defaultAccount=this.defaultAccount;var M=this,x=function(){h.apply(this,arguments);var t=this,e=M.setProvider;M.setProvider=function(){e.apply(M,arguments),i.packageInit(t,[M.currentProvider])}};x.setProvider=function(){h.setProvider.apply(this,arguments)},(x.prototype=Object.create(h.prototype)).constructor=x,this.Contract=x,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.setProvider(this.currentProvider,this.accounts),this.Iban=l,this.abi=p;var S=[new s({name:"getNodeInfo",call:"web3_clientVersion"}),new s({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new s({name:"getCoinbase",call:"eth_coinbase",params:0}),new s({name:"isMining",call:"eth_mining",params:0}),new s({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:u.hexToNumber}),new s({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:v.outputSyncingFormatter}),new s({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:v.outputBigNumberFormatter}),new s({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:u.toChecksumAddress}),new s({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:u.hexToNumber}),new s({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[v.inputAddressFormatter,v.inputDefaultBlockNumberFormatter],outputFormatter:v.outputBigNumberFormatter}),new s({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[v.inputAddressFormatter,u.numberToHex,v.inputDefaultBlockNumberFormatter]}),new s({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[v.inputAddressFormatter,v.inputDefaultBlockNumberFormatter]}),new s({name:"getBlock",call:g,params:2,inputFormatter:[v.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:v.outputBlockFormatter}),new s({name:"getUncle",call:b,params:2,inputFormatter:[v.inputBlockNumberFormatter,u.numberToHex],outputFormatter:v.outputBlockFormatter}),new s({name:"getBlockTransactionCount",call:_,params:1,inputFormatter:[v.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getBlockUncleCount",call:w,params:1,inputFormatter:[v.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:v.outputTransactionFormatter}),new s({name:"getTransactionFromBlock",call:y,params:2,inputFormatter:[v.inputBlockNumberFormatter,u.numberToHex],outputFormatter:v.outputTransactionFormatter}),new s({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:v.outputTransactionReceiptFormatter}),new s({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[v.inputAddressFormatter,v.inputDefaultBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),new s({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[v.inputTransactionFormatter]}),new s({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[v.inputTransactionFormatter]}),new s({name:"sign",call:"eth_sign",params:2,inputFormatter:[v.inputSignFormatter,v.inputAddressFormatter],transformPayload:function(t){return t.params.reverse(),t}}),new s({name:"call",call:"eth_call",params:2,inputFormatter:[v.inputCallFormatter,v.inputDefaultBlockNumberFormatter]}),new s({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[v.inputCallFormatter],outputFormatter:u.hexToNumber}),new s({name:"getCompilers",call:"eth_getCompilers",params:0}),new s({name:"compile.solidity",call:"eth_compileSolidity",params:1}),new s({name:"compile.lll",call:"eth_compileLLL",params:1}),new s({name:"compile.serpent",call:"eth_compileSerpent",params:1}),new s({name:"submitWork",call:"eth_submitWork",params:3}),new s({name:"getWork",call:"eth_getWork",params:0}),new s({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[v.inputLogFormatter],outputFormatter:v.outputLogFormatter}),new a({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:v.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[v.inputLogFormatter],outputFormatter:v.outputLogFormatter,subscriptionHandler:function(t){t.removed?this.emit("changed",t):this.emit("data",t),r.isFunction(this.callback)&&this.callback(null,t,this)}},syncing:{params:0,outputFormatter:v.outputSyncingFormatter,subscriptionHandler:function(t){var e=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",e._isSyncing),r.isFunction(this.callback)&&this.callback(null,e._isSyncing,this),setTimeout(function(){e.emit("data",t),r.isFunction(e.callback)&&e.callback(null,t,e)},0)):(this.emit("data",t),r.isFunction(e.callback)&&this.callback(null,t,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout(function(){t.currentBlock>t.highestBlock-200&&(e._isSyncing=!1,e.emit("changed",e._isSyncing),r.isFunction(e.callback)&&e.callback(null,e._isSyncing,e))},500))}}}})];S.forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager,t.accounts),e.defaultBlock=t.defaultBlock,e.defaultAccount=t.defaultAccount})};i.addProviders(M),t.exports=M},function(t,e,n){"use strict";var r=n(15),i=n(53),o=n(55),a=n(26),s=n(93).subscription,u=n(16).formatters,c=n(16).errors,f=n(196),h=n(200),l=function t(e,n,o){var s=this,c=Array.prototype.slice.call(arguments);if(!(this instanceof t))throw new Error('Please use the "new" keyword to instantiate a web3.eth.contract() object!');if(i.packageInit(this,[this.constructor.currentProvider]),this.clearSubscriptions=this._requestManager.clearSubscriptions,!e||!Array.isArray(e))throw new Error("You must provide the json interface of the contract when instantiating a contract object.");this.options={};var f=c[c.length-1];r.isObject(f)&&!r.isArray(f)&&(o=f,this.options=r.extend(this.options,this._getOrSetDefaultOptions(o)),r.isObject(n)&&(n=null)),Object.defineProperty(this.options,"address",{set:function(t){t&&(s._address=a.toChecksumAddress(u.inputAddressFormatter(t)))},get:function(){return s._address},enumerable:!0}),Object.defineProperty(this.options,"jsonInterface",{set:function(t){return s.methods={},s.events={},s._jsonInterface=t.map(function(t){var e,n;if(t.constant="view"===t.stateMutability||"pure"===t.stateMutability||t.constant,t.payable="payable"===t.stateMutability||t.payable,t.name&&(n=a._jsonInterfaceMethodToString(t)),"function"===t.type){if(t.signature=h.encodeFunctionSignature(n),e=s._createTxObject.bind({method:t,parent:s}),s.methods[t.name]){var r=s._createTxObject.bind({method:t,parent:s,nextMethod:s.methods[t.name]});s.methods[t.name]=r}else s.methods[t.name]=e;s.methods[t.signature]=e,s.methods[n]=e}else if("event"===t.type){t.signature=h.encodeEventSignature(n);var i=s._on.bind(s,t.signature);s.events[t.name]&&"bound "!==s.events[t.name].name||(s.events[t.name]=i),s.events[t.signature]=i,s.events[n]=i}return t}),s.events.allEvents=s._on.bind(s,"allevents"),s._jsonInterface},get:function(){return s._jsonInterface},enumerable:!0});var l=this.constructor.defaultAccount,d=this.constructor.defaultBlock||"latest";Object.defineProperty(this,"defaultAccount",{get:function(){return l},set:function(t){return t&&(l=a.toChecksumAddress(u.inputAddressFormatter(t))),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return d},set:function(t){return d=t,t},enumerable:!0}),this.methods={},this.events={},this._address=null,this._jsonInterface=[],this.options.address=n,this.options.jsonInterface=e};l.setProvider=function(t,e){i.packageInit(this,[t]),this._ethAccounts=e},l.prototype._getCallback=function(t){if(t&&r.isFunction(t[t.length-1]))return t.pop()},l.prototype._checkListener=function(t,e){if(e===t)throw new Error('The event "'+t+"\" is a reserved event name, you can't use it.")},l.prototype._getOrSetDefaultOptions=function(t){var e=t.gasPrice?String(t.gasPrice):null,n=t.from?a.toChecksumAddress(u.inputAddressFormatter(t.from)):null;return t.data=t.data||this.options.data,t.from=n||this.options.from,t.gasPrice=e||this.options.gasPrice,t.gas=t.gas||t.gasLimit||this.options.gas,delete t.gasLimit,t},l.prototype._encodeEventABI=function(t,e){var n=(e=e||{}).filter||{},i={};if(["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(t){i[t]=u.inputBlockNumberFormatter(e[t])}),r.isArray(e.topics))i.topics=e.topics;else{if(i.topics=[],t&&!t.anonymous&&"ALLEVENTS"!==t.name&&i.topics.push(t.signature),"ALLEVENTS"!==t.name){var o=t.inputs.filter(function(t){return!0===t.indexed}).map(function(t){var e=n[t.name];return e?r.isArray(e)?e.map(function(e){return h.encodeParameter(t.type,e)}):h.encodeParameter(t.type,e):null});i.topics=i.topics.concat(o)}i.topics.length||delete i.topics}return this.options.address&&(i.address=this.options.address.toLowerCase()),i},l.prototype._decodeEventABI=function(t){var e=this;t.data=t.data||"",t.topics=t.topics||[];var n=u.outputLogFormatter(t);"ALLEVENTS"===e.name&&(e=e.jsonInterface.find(function(e){return e.signature===t.topics[0]})||{anonymous:!0}),e.inputs=e.inputs||[];var r=e.anonymous?t.topics:t.topics.slice(1);return n.returnValues=h.decodeLog(e.inputs,t.data,r),delete n.returnValues.__length__,n.event=e.name,n.signature=e.anonymous||!t.topics[0]?null:t.topics[0],n.raw={data:n.data,topics:n.topics},delete n.data,delete n.topics,n},l.prototype._encodeMethodABI=function(){var t=this._method.signature,e=this.arguments||[],n=!1,i=this._parent.options.jsonInterface.filter(function(e){return"constructor"===t&&e.type===t||(e.signature===t||e.signature===t.replace("0x","")||e.name===t)&&"function"===e.type}).map(function(t){var i=r.isArray(t.inputs)?t.inputs.length:0;if(i!==e.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+i+" arguments.");return"function"===t.type&&(n=t.signature),r.isArray(t.inputs)?t.inputs.map(function(t){return t.type}):[]}).map(function(t){return h.encodeParameters(t,e).replace("0x","")})[0]||"";if("constructor"===t){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData+i}var o=n?n+i:i;if(o)return o;throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".')},l.prototype._decodeMethodReturn=function(t,e){if(!e)return null;e=e.length>=2?e.slice(2):e;var n=h.decodeParameters(t,e);return 1===n.__length__?n[0]:(delete n.__length__,n)},l.prototype.deploy=function(t,e){if((t=t||{}).arguments=t.arguments||[],!(t=this._getOrSetDefaultOptions(t)).data)return a._fireError(new Error('No "data" specified in neither the given options, nor the default options.'),null,null,e);var n=r.find(this.options.jsonInterface,function(t){return"constructor"===t.type})||{};return n.signature="constructor",this._createTxObject.apply({method:n,parent:this,deployData:t.data,_ethAccounts:this.constructor._ethAccounts},t.arguments)},l.prototype._generateEventOptions=function(){var t=Array.prototype.slice.call(arguments),e=this._getCallback(t),n=r.isObject(t[t.length-1])?t.pop():{},i=r.isString(t[0])?t[0]:"allevents";if(!(i="allevents"===i.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find(function(t){return"event"===t.type&&(t.name===i||t.signature==="0x"+i.replace("0x",""))})))throw new Error('Event "'+i.name+"\" doesn't exist in this contract.");if(!a.isAddress(this.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return{params:this._encodeEventABI(i,n),event:i,callback:e}},l.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},l.prototype.once=function(t,e,n){var i=Array.prototype.slice.call(arguments);if(!(n=this._getCallback(i)))throw new Error("Once requires a callback as the second parameter.");e&&delete e.fromBlock,this._on(t,e,function(t,e,i){i.unsubscribe(),r.isFunction(n)&&n(t,e,i)})},l.prototype._on=function(){var t=this._generateEventOptions.apply(this,arguments);this._checkListener("newListener",t.event.name,t.callback),this._checkListener("removeListener",t.event.name,t.callback);var e=new s({subscription:{params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(t.event),subscriptionHandler:function(t){t.removed?this.emit("changed",t):this.emit("data",t),r.isFunction(this.callback)&&this.callback(null,t,this)}},type:"eth",requestManager:this._requestManager});return e.subscribe("logs",t.params,t.callback||function(){}),e},l.prototype.getPastEvents=function(){var t=this._generateEventOptions.apply(this,arguments),e=new o({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(t.event)});e.setRequestManager(this._requestManager);var n=e.buildCall();return e=null,n(t.params,t.callback)},l.prototype._createTxObject=function(){var t=Array.prototype.slice.call(arguments),e={};if("function"===this.method.type&&(e.call=this.parent._executeMethod.bind(e,"call"),e.call.request=this.parent._executeMethod.bind(e,"call",!0)),e.send=this.parent._executeMethod.bind(e,"send"),e.send.request=this.parent._executeMethod.bind(e,"send",!0),e.encodeABI=this.parent._encodeMethodABI.bind(e),e.estimateGas=this.parent._executeMethod.bind(e,"estimate"),t&&this.method.inputs&&t.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,t);throw c.InvalidNumberOfParams(t.length,this.method.inputs.length,this.method.name)}return e.arguments=t||[],e._method=this.method,e._parent=this.parent,e._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(e._deployData=this.deployData),e},l.prototype._processExecuteArguments=function(t,e){var n={};if(n.type=t.shift(),n.callback=this._parent._getCallback(t),"call"===n.type&&!0!==t[t.length-1]&&(r.isString(t[t.length-1])||isFinite(t[t.length-1]))&&(n.defaultBlock=t.pop()),n.options=r.isObject(t[t.length-1])?t.pop():{},n.generateRequest=!0===t[t.length-1]&&t.pop(),n.options=this._parent._getOrSetDefaultOptions(n.options),n.options.data=this.encodeABI(),!this._deployData&&!a.isAddress(this._parent.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return this._deployData||(n.options.to=this._parent.options.address),n.options.data?n:a._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),e.eventEmitter,e.reject,n.callback)},l.prototype._executeMethod=function(){var t=this,e=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),n),n=f("send"!==e.type),i=t.constructor._ethAccounts||t._ethAccounts;if(e.generateRequest){var s={params:[u.inputCallFormatter.call(this._parent,e.options)],callback:e.callback};return"call"===e.type?(s.params.push(u.inputDefaultBlockNumberFormatter.call(this._parent,e.defaultBlock)),s.method="eth_call",s.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):s.method="eth_sendTransaction",s}switch(e.type){case"estimate":return new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[u.inputCallFormatter],outputFormatter:a.hexToNumber,requestManager:t._parent._requestManager,accounts:i,defaultAccount:t._parent.defaultAccount,defaultBlock:t._parent.defaultBlock}).createFunction()(e.options,e.callback);case"call":return new o({name:"call",call:"eth_call",params:2,inputFormatter:[u.inputCallFormatter,u.inputDefaultBlockNumberFormatter],outputFormatter:function(e){return t._parent._decodeMethodReturn(t._method.outputs,e)},requestManager:t._parent._requestManager,accounts:i,defaultAccount:t._parent.defaultAccount,defaultBlock:t._parent.defaultBlock}).createFunction()(e.options,e.defaultBlock,e.callback);case"send":if(!a.isAddress(e.options.from))return a._fireError(new Error('No "from" address specified in neither the given options, nor the default options.'),n.eventEmitter,n.reject,e.callback);if(r.isBoolean(this._method.payable)&&!this._method.payable&&e.options.value&&e.options.value>0)return a._fireError(new Error("Can not send value to non-payable contract method or constructor"),n.eventEmitter,n.reject,e.callback);var c={receiptFormatter:function(e){if(r.isArray(e.logs)){var n=r.map(e.logs,function(e){return t._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:t._parent.options.jsonInterface},e)});e.events={};var i=0;n.forEach(function(t){t.event?e.events[t.event]?Array.isArray(e.events[t.event])?e.events[t.event].push(t):e.events[t.event]=[e.events[t.event],t]:e.events[t.event]=t:(e.events[i]=t,i++)}),delete e.logs}return e},contractDeployFormatter:function(e){var n=t._parent.clone();return n.options.address=e.contractAddress,n}};return new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[u.inputTransactionFormatter],requestManager:t._parent._requestManager,accounts:t.constructor._ethAccounts||t._ethAccounts,defaultAccount:t._parent.defaultAccount,defaultBlock:t._parent.defaultBlock,extraFormatters:c}).createFunction()(e.options,e.callback)}},t.exports=l},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(2).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=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 n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&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 c=["","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"],f=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,h=67108863&u,l=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=l;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}n.words[c]=0|h,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(t=t||10,e=0|e||1,16===t||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=0;nt.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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=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,d=0|a[1],p=8191&d,m=d>>>13,v=0|a[2],g=8191&v,y=v>>>13,b=0|a[3],_=8191&b,w=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],A=8191&k,E=k>>>13,T=0|a[6],C=8191&T,P=T>>>13,O=0|a[7],N=8191&O,I=O>>>13,R=0|a[8],j=8191&R,B=R>>>13,L=0|a[9],U=8191&L,F=L>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],G=8191&H,W=H>>>13,V=0|s[2],K=8191&V,Z=V>>>13,X=0|s[3],$=8191&X,Y=X>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],ht=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var vt=(c+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var gt=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,q),i=(i=Math.imul(g,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),r=r+Math.imul(g,G)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Z)|0;var bt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(S,q)|0,o=Math.imul(S,z),r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var _t=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(A,q),i=(i=Math.imul(A,z))+Math.imul(E,q)|0,o=Math.imul(E,z),r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(_,K)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(l,nt)|0))<<13)|0;c=((o=o+Math.imul(l,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(P,q)|0,o=Math.imul(P,z),r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(I,q)|0,o=Math.imul(I,z),r=r+Math.imul(C,G)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,W)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Y)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(C,K)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var St=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(l,pt)|0))<<13)|0;c=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(U,G),i=(i=Math.imul(U,W))+Math.imul(F,G)|0,o=Math.imul(F,W),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,Z)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,lt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,lt)|0;var At=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,Z))+Math.imul(F,K)|0,o=Math.imul(F,Z),r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,r=r+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Et=(c+(r=r+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(U,$),i=(i=Math.imul(U,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,r=r+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,lt)|0;var Tt=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(B,nt)|0,o=o+Math.imul(B,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,lt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,lt)|0;var Ct=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(U,nt),i=(i=Math.imul(U,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,lt)|0;var Pt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,r=r+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var Ot=(c+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(U,ut),i=(i=Math.imul(U,ct))+Math.imul(F,ut)|0,o=Math.imul(F,ct),r=r+Math.imul(j,ht)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Nt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,pt)|0))<<13)|0;c=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(r=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,mt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=vt,u[1]=gt,u[2]=yt,u[3]=bt,u[4]=_t,u[5]=wt,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=At,u[11]=Et,u[12]=Tt,u[13]=Ct,u[14]=Pt,u[15]=Ot,u[16]=Nt,u[17]=It,u[18]=Rt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?l(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}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),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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(r("number"==typeof t),r(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)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var l=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(l=Math.min(l/a|0,67108863),r._ishlnsubmul(i,l,h);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.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);var i,a,s},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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,l=1;0==(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(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 M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(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 y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.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)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):n.strip(),n},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(y,g),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var h=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,n(40)(t))},function(t,e,n){var r=n(32),i=n(16).formatters,o=n(56),a=function(){this._inputFormatter=function(){var t=Array.prototype.slice.call(arguments);return t[0]=t[0]&&"0x0"!==t[0]?i.inputAddressFormatter(t[0]):"",r.formatInputInt.apply(this,t)},this._outputFormatter=r.formatOutputAddress};(a.prototype=new o({})).constructor=a,a.prototype.isType=function(t){return!!t.match(/address(\[([0-9]*)\])?/)},t.exports=a},function(t,e,n){var r=n(32),i=n(56),o=function(){this._inputFormatter=r.formatInputBool,this._outputFormatter=r.formatOutputBool};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^bool(\[([0-9]*)\])*$/)},t.exports=o},function(t,e,n){var r=n(32),i=n(56),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^int([0-9]*)?(\[([0-9]*)\])*$/)},t.exports=o},function(t,e,n){var r=n(32),i=n(56),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputUInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/)},t.exports=o},function(t,e,n){var r=n(32),i=n(56),o=function(){this._inputFormatter=r.formatInputDynamicBytes,this._outputFormatter=r.formatOutputDynamicBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^bytes(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},t.exports=o},function(t,e,n){var r=n(32),i=n(56),o=function(){this._inputFormatter=r.formatInputString,this._outputFormatter=r.formatOutputString};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^string(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},t.exports=o},function(t,e,n){var r=n(32),i=n(56),o=function(){this._inputFormatter=r.formatInputBytes,this._outputFormatter=r.formatOutputBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^bytes([0-9]{1,})(\[([0-9]*)\])*$/)},t.exports=o},function(t,e,n){"use strict";(function(e,r){var i=n(15),o=n(53),a=n(55),s=n(198),u=n(501),c=n(233),f=n(232),h=n(231),l=n(131),d=n(95),p=n(579),m=n(581),v=n(26),g=n(16),y=function(t){return i.isUndefined(t)||i.isNull(t)},b=function(t){for(;t&&t.startsWith("0x0");)t="0x"+t.slice(3);return t},_=function(t){return t.length%2==1&&(t=t.replace("0x","0x0")),t},w=function(){var t=this;o.packageInit(this,arguments),delete this.BatchRequest,delete this.extend;var e=[new a({name:"getId",call:"net_version",params:0,outputFormatter:v.hexToNumber}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[function(t){if(v.isAddress(t))return t;throw new Error("Address "+t+' is not a valid address to get the "transactionCount".')},function(){return"latest"}]})];this._ethereumCall={},i.each(e,function(e){e.attachToObject(t._ethereumCall),e.setRequestManager(t._requestManager)}),this.wallet=new M(this)};function M(t){this._accounts=t,this.length=0,this.defaultKeyName="web3js_wallet"}w.prototype._addAccountFunctions=function(t){var e=this;return t.signTransaction=function(n,r){return e.signTransaction(n,t.privateKey,r)},t.sign=function(n){return e.sign(n,t.privateKey)},t.encrypt=function(n,r){return e.encrypt(t.privateKey,n,r)},t},w.prototype.create=function(t){return this._addAccountFunctions(u.create(t||v.randomHex(32)))},w.prototype.privateKeyToAccount=function(t){return this._addAccountFunctions(u.fromPrivate(t))},w.prototype.signTransaction=function(t,e,n){var r,o=!1;if(n=n||function(){},!t)return o=new Error("No transaction object given!"),n(o),s.reject(o);function a(t){if(t.gas||t.gasLimit||(o=new Error('"gas" is missing')),(t.nonce<0||t.gas<0||t.gasPrice<0||t.chainId<0)&&(o=new Error("Gas, gasPrice, nonce or chainId is lower than 0")),o)return n(o),s.reject(new Error('"gas" is missing'));try{var i=t=g.formatters.inputCallFormatter(t);i.to=t.to||"0x",i.data=t.data||"0x",i.value=t.value||"0x",i.chainId=v.numberToHex(t.chainId);var a=f.encode([l.fromNat(i.nonce),l.fromNat(i.gasPrice),l.fromNat(i.gas),i.to.toLowerCase(),l.fromNat(i.value),i.data,l.fromNat(i.chainId||"0x1"),"0x","0x"]),d=c.keccak256(a),p=u.makeSigner(2*h.toNumber(i.chainId||"0x1")+35)(c.keccak256(a),e),m=f.decode(a).slice(0,6).concat(u.decodeSignature(p));m[6]=_(b(m[6])),m[7]=_(b(m[7])),m[8]=_(b(m[8]));var y=f.encode(m),w=f.decode(y);r={messageHash:d,v:b(w[6]),r:b(w[7]),s:b(w[8]),rawTransaction:y}}catch(t){return n(t),s.reject(t)}return n(null,r),r}return void 0!==t.nonce&&void 0!==t.chainId&&void 0!==t.gasPrice?s.resolve(a(t)):s.all([y(t.chainId)?this._ethereumCall.getId():t.chainId,y(t.gasPrice)?this._ethereumCall.getGasPrice():t.gasPrice,y(t.nonce)?this._ethereumCall.getTransactionCount(this.privateKeyToAccount(e).address):t.nonce]).then(function(e){if(y(e[0])||y(e[1])||y(e[2]))throw new Error('One of the values "chainId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(e));return a(i.extend(t,{chainId:e[0],gasPrice:e[1],nonce:e[2]}))})},w.prototype.recoverTransaction=function(t){var e=f.decode(t),n=u.encodeSignature(e.slice(6,9)),r=l.toNumber(e[6]),i=r<35?[]:[l.fromNumber(r-35>>1),"0x","0x"],o=e.slice(0,6).concat(i),a=f.encode(o);return u.recover(c.keccak256(a),n)},w.prototype.hashMessage=function(t){var e=v.isHexStrict(t)?v.hexToBytes(t):t,n=r.from(e),i="Ethereum Signed Message:\n"+e.length,o=r.from(i),a=r.concat([o,n]);return c.keccak256s(a)},w.prototype.sign=function(t,e){var n=this.hashMessage(t),r=u.sign(n,e),i=u.decodeSignature(r);return{message:t,messageHash:n,v:i[0],r:i[1],s:i[2],signature:r}},w.prototype.recover=function(t,e,n){var r=[].slice.apply(arguments);return i.isObject(t)?this.recover(t.messageHash,u.encodeSignature([t.v,t.r,t.s]),!0):(n||(t=this.hashMessage(t)),r.length>=4?(n=r.slice(-1)[0],n=!!i.isBoolean(n)&&!!n,this.recover(t,u.encodeSignature(r.slice(1,4)),n)):u.recover(t,e))},w.prototype.decrypt=function(t,e,n){if(!i.isString(e))throw new Error("No password given.");var o,a,s=i.isObject(t)?t:JSON.parse(n?t.toLowerCase():t);if(3!==s.version)throw new Error("Not a valid V3 wallet");if("scrypt"===s.crypto.kdf)a=s.crypto.kdfparams,o=p(new r(e),new r(a.salt,"hex"),a.n,a.r,a.p,a.dklen);else{if("pbkdf2"!==s.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(a=s.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");o=d.pbkdf2Sync(new r(e),new r(a.salt,"hex"),a.c,a.dklen,"sha256")}var u=new r(s.crypto.ciphertext,"hex");if(v.sha3(r.concat([o.slice(16,32),u])).replace("0x","")!==s.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var c=d.createDecipheriv(s.crypto.cipher,o.slice(0,16),new r(s.crypto.cipherparams.iv,"hex")),f="0x"+r.concat([c.update(u),c.final()]).toString("hex");return this.privateKeyToAccount(f)},w.prototype.encrypt=function(t,e,n){var i,o=this.privateKeyToAccount(t),a=(n=n||{}).salt||d.randomBytes(32),s=n.iv||d.randomBytes(16),u=n.kdf||"scrypt",c={dklen:n.dklen||32,salt:a.toString("hex")};if("pbkdf2"===u)c.c=n.c||262144,c.prf="hmac-sha256",i=d.pbkdf2Sync(new r(e),a,c.c,c.dklen,"sha256");else{if("scrypt"!==u)throw new Error("Unsupported kdf");c.n=n.n||8192,c.r=n.r||8,c.p=n.p||1,i=p(new r(e),a,c.n,c.r,c.p,c.dklen)}var f=d.createCipheriv(n.cipher||"aes-128-ctr",i.slice(0,16),s);if(!f)throw new Error("Unsupported cipher");var h=r.concat([f.update(new r(o.privateKey.replace("0x",""),"hex")),f.final()]),l=v.sha3(r.concat([i.slice(16,32),new r(h,"hex")])).replace("0x","");return{version:3,id:m.v4({random:n.uuid||d.randomBytes(16)}),address:o.address.toLowerCase().replace("0x",""),crypto:{ciphertext:h.toString("hex"),cipherparams:{iv:s.toString("hex")},cipher:n.cipher||"aes-128-ctr",kdf:u,kdfparams:c,mac:l.toString("hex")}}},M.prototype._findSafeIndex=function(t){return t=t||0,i.has(this,t)?this._findSafeIndex(t+1):t},M.prototype._currentIndexes=function(){return Object.keys(this).map(function(t){return parseInt(t)}).filter(function(t){return t<9e20})},M.prototype.create=function(t,e){for(var n=0;n7?t[r+2].toUpperCase():t[r+2];return n},l=function(t){var n=new e(t.slice(2),"hex"),r="0x"+s.keyFromPrivate(n).getPublic(!1,"hex").slice(2),i=c(r);return{address:h("0x"+i.slice(-40)),privateKey:t}},d=function(t){var e=r(t,3),n=e[0],o=i.pad(32,e[1]),a=i.pad(32,e[2]);return i.flatten([o,a,n])},p=function(t){return[i.slice(64,i.length(t),t),i.slice(0,32,t),i.slice(32,64,t)]},m=function(t){return function(n,r){var a=s.keyFromPrivate(new e(r.slice(2),"hex")).sign(new e(n.slice(2),"hex"),{canonical:!0});return d([o.fromString(i.fromNumber(t+a.recoveryParam)),i.pad(32,i.fromNat("0x"+a.r.toString(16))),i.pad(32,i.fromNat("0x"+a.s.toString(16)))])}},v=m(27);t.exports={create:function(t){var e=c(i.concat(i.random(32),t||i.random(32))),n=i.concat(i.concat(i.random(32),e),i.random(32)),r=c(n);return l(r)},toChecksum:h,fromPrivate:l,sign:v,makeSigner:m,recover:function(t,n){var r=p(n),o={v:i.toNumber(r[0]),r:r[1].slice(2),s:r[2].slice(2)},a="0x"+s.recoverPubKey(new e(t.slice(2),"hex"),o,o.v<2?o.v:1-o.v%2).encode("hex",!1).slice(2),u=c(a);return h("0x"+u.slice(-40))},encodeSignature:d,decodeSignature:p}}).call(this,n(2).Buffer)},function(t,e){var n=function(t,e){for(var n=[],r=0;r>>27}function f(t){return t<<30|t>>>2}function h(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=e[u-3]^e[u-8]^e[u-14]^e[u-16];for(var l=0;l<80;++l){var d=~~(l/20),p=c(n)+h(d,r,i,o)+s+e[l]+a[d]|0;s=o,o=i,i=f(r),r=n,n=p}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(1),i=n(65),o=n(3).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<1|t>>>31}function f(t){return t<<5|t>>>27}function h(t){return t<<30|t>>>2}function l(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=c(e[u-3]^e[u-8]^e[u-14]^e[u-16]);for(var d=0;d<80;++d){var p=~~(d/20),m=f(n)+l(p,r,i,o)+s+e[d]+a[p]|0;s=o,o=i,i=h(r),r=n,n=m}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(1),i=n(203),o=n(65),a=n(3).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,n){var r=n(1),i=n(204),o=n(65),a=n(3).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}r(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,n){"use strict";var r=n(1),i=n(3).Buffer,o=n(43),a=i.alloc(128),s=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length>>0},e.writeUInt32BE=function(t,e,n){t[0+n]=e>>>24,t[1+n]=e>>>16&255,t[2+n]=e>>>8&255,t[3+n]=255&e},e.ip=function(t,e,n,r){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}n[r+0]=i>>>0,n[r+1]=o>>>0},e.rip=function(t,e,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},e.pc1=function(t,e,n,r){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},e.expand=function(t,e,n){var r=0,i=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[n+0]=r>>>0,e[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(e>>>18-6*r&63)]}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,n=0;n>>o[n]&1;return e>>>0},e.padSplit=function(t,e,n){for(var r=t.toString(2);r.length0;r--)e+=this._buffer(t,e),n+=this._flushBuffer(i,n);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];n=a.r28shl(n,s),i=a.r28shl(i,s),a.pc2(n,i,t.keys,o)}},u.prototype._update=function(t,e,n,r){var i=this._desState,o=a.readUInt32BE(t,e),s=a.readUInt32BE(t,e+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(n,o,r),a.writeUInt32BE(n,s,r+4)},u.prototype._pad=function(t,e){for(var n=t.length-e,r=e;r>>0,o=l}a.rip(s,o,r,i)},u.prototype._decrypt=function(t,e,n,r,i){for(var o=n,s=e,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],f=t.keys[u+1];a.expand(o,t.tmp,0),c^=t.tmp[0],f^=t.tmp[1];var h=a.substitute(c,f),l=o;o=(s^a.permute(h))>>>0,s=l}a.rip(o,s,r,i)}},function(t,e,n){"use strict";var r=n(27),i=n(1),o={};e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var n=Object.keys(o),r=0;r15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),n=-1;++n>s%8,t._prev=o(t._prev,n?i:a);return u}function o(t,e){var n=t.length,i=-1,o=r.allocUnsafe(t.length);for(t=r.concat([t,r.from([e])]);++i>7;return o}e.encrypt=function(t,e,n){for(var o=e.length,a=r.allocUnsafe(o),s=-1;++s>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,e&&(n[0]=n[0]^225<<24)}this.state=o(r)},a.prototype.update=function(t){var e;for(this.cache=r.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},function(t,e,n){var r=n(214),i=n(3).Buffer,o=n(139),a=n(215),s=n(43),u=n(96),c=n(97);function f(t,e,n){s.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(n),this._mode=t,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function l(t,e,n){var s=o[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof e&&(e=i.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===s.type?new a(s.module,e,n,!0):"auth"===s.type?new r(s.module,e,n,!0):new f(s.module,e,n)}n(1)(f,s),f.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,e),r.push(n);return i.concat(r)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var n=-1;for(;++n16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var n=o[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=c(e,!1,n.key,n.iv);return l(t,r.key,r.iv)},e.createDecipheriv=l},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e,n){(function(t){var r=n(216),i=n(534),o=n(535);var a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var n=new t(i[e].prime,"hex"),r=new t(i[e].gen,"hex");return new o(n,r)},e.createDiffieHellman=e.DiffieHellman=function e(n,i,s,u){return t.isBuffer(i)||void 0===a[i]?e(n,"binary",i,s):(i=i||"binary",u=u||"binary",s=s||new t([2]),t.isBuffer(s)||(s=new t(s,u)),"number"==typeof n?new o(r(n,s),s,!0):(t.isBuffer(n)||(n=new t(n,i)),new o(n,s,!0)))}}).call(this,n(2).Buffer)},function(t,e){},function(t,e){},function(t){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},function(t,e,n){(function(e){var r=n(9),i=new(n(217)),o=new r(24),a=new r(11),s=new r(10),u=new r(3),c=new r(7),f=n(216),h=n(64);function l(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this._pub=new r(t),this}function d(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this._priv=new r(t),this}t.exports=m;var p={};function m(t,e,n){this.setGenerator(e),this.__prime=new r(t),this._prime=r.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=l,this.setPrivateKey=d):this._primeCode=8}function v(t,n){var r=new e(t.toArray());return n?r.toString(n):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var n=e.toString("hex"),r=[n,t.toString(16)].join("_");if(r in p)return p[r];var h,l=0;if(t.isEven()||!f.simpleSieve||!f.fermatTest(t)||!i.test(t))return l+=1,l+="02"===n||"05"===n?8:4,p[r]=l,l;switch(i.test(t.shrn(1))||(l+=2),n){case"02":t.mod(o).cmp(a)&&(l+=8);break;case"05":(h=t.mod(s)).cmp(u)&&h.cmp(c)&&(l+=8);break;default:l+=4}return p[r]=l,l}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(t){var n=(t=(t=new r(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new e(n.toArray()),o=this.getPrime();if(i.length0&&n.ishrn(r),n}function h(t,n,i){var o,a;do{for(o=new e(0);8*o.length",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},function(t,e,n){"use strict";var r=e,i=n(9),o=n(27),a=n(219);r.assert=o,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(t,e){for(var n=[],r=1<=0;){var o;if(i.isOdd()){var a=i.andln(r-1);o=a>(r>>1)-1?(r>>1)-a:a,i.isubn(o)}else o=0;n.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(r-1)?e+1:1,u=1;u0||e.cmpn(-i)>0;){var o,a,s,u=t.andln(3)+r&3,c=e.andln(3)+i&3;3===u&&(u=-1),3===c&&(c=-1),o=0==(1&u)?0:3!=(s=t.andln(7)+r&7)&&5!==s||2!==c?u:-u,n[0].push(o),a=0==(1&c)?0:3!=(s=e.andln(7)+i&7)&&5!==s||2!==u?c:-c,n[1].push(a),2*r===o+1&&(r=1-r),2*i===a+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e,n){"use strict";var r=n(9),i=n(17).utils,o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var n=t._getDoubles(),r=o(e,1),i=(1<=u;e--)c=(c<<1)+r[e];a.push(c)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),l=i;l>0;l--){for(u=0;u=0;c--){for(e=0;c>=0&&0===a[c];c--)e++;if(c>=0&&e++,u=u.dblp(e),c<0)break;var f=a[c];s(0!==f),u="affine"===t.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,n,r,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,f=0,h=0;h=1;h-=2){var d=h-1,p=h;if(1===s[d]&&1===s[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],g=a(n[d],n[p]);f=Math.max(g[0].length,f),c[d]=new Array(f),c[p]=new Array(f);for(var y=0;y=0;h--){for(var x=0;h>=0;){var S=!0;for(y=0;y=0&&x++,w=w.dblp(x),h<0)break;for(y=0;y0?k=u[y][A-1>>1]:A<0&&(k=u[y][-A-1>>1].neg()),w="affine"===k.type?w.mixedAdd(k):w.add(k))}}for(h=0;h=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i=0&&(a=e,s=n),r.negative&&(r=r.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:r,b:i},{a:a,b:s}]},c.prototype._endoSplit=function(t){var e=this.endo.basis,n=e[0],r=e[1],i=r.b.mul(t).divRound(this.n),o=n.b.neg().mul(t).divRound(this.n),a=i.mul(n.a),s=o.mul(r.a),u=i.mul(n.b),c=o.mul(r.b);return{k1:t.sub(a).sub(s),k2:u.add(c).neg()}},c.prototype.pointFromX=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(e&&!i||!e&&i)&&(r=r.redNeg()),this.point(t,r)},c.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,n=t.y,r=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(t,e,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var n=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},f.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,n=this.x.redSqr(),r=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(e).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(t){return t=new o(t,16),this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},f.prototype.jmulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},f.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},f.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return e},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(h,s.BasePoint),c.prototype.jpoint=function(t,e,n){return new h(this,t,e,n)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),n=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(n,r)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(e),i=t.x.redMul(n),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(n.redMul(this.z)),s=r.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),h=r.redMul(c),l=u.redSqr().redIAdd(f).redISub(h).redISub(h),d=u.redMul(h.redISub(l)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(l,d,p)},h.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),n=this.x,r=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=n.redSub(r),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=n.redMul(u),h=s.redSqr().redIAdd(c).redISub(f).redISub(f),l=s.redMul(f.redISub(h)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(h,l,d)},h.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,n=0;n=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,n){"use strict";var r=n(98),i=n(9),o=n(1),a=r.base,s=n(17).utils;function u(t){a.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(t,e,n){a.BasePoint.call(this,t,"projective"),null===e&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,16),this.z=new i(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(u,a),t.exports=u,u.prototype.validate=function(t){var e=t.normalize().x,n=e.redSqr(),r=n.redMul(e).redAdd(n.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},o(c,a.BasePoint),u.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},u.prototype.point=function(t,e){return new c(this,t,e)},u.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(t,e){return new c(t,e[0],e[1]||t.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),n=t.redSub(e),r=t.redMul(e),i=n.redMul(e.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(t,e){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(n),a=i.redMul(r),s=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},c.prototype.mul=function(t){for(var e=t.clone(),n=this,r=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,n){"use strict";var r=n(98),i=n(17),o=n(9),a=n(1),s=r.base,u=i.utils.assert;function c(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new o(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function f(t,e,n,r,i){s.BasePoint.call(this,t,"projective"),null===e&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(e,16),this.y=new o(n,16),this.z=r?new o(r,16):this.curve.one,this.t=i&&new o(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}a(c,s),t.exports=c,c.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},c.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},c.prototype.jpoint=function(t,e,n,r){return this.point(t,e,n,r)},c.prototype.pointFromX=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=r.redMul(i.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(e&&!u||!e&&u)&&(s=s.redNeg()),this.point(t,s)},c.prototype.pointFromY=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(i.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},c.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),n=t.y.redSqr(),r=e.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(n)));return 0===r.cmp(i)},a(f,s.BasePoint),c.prototype.pointFromJSON=function(t){return f.fromJSON(this,t)},c.prototype.point=function(t,e,n,r){return new f(this,t,e,n,r)},f.fromJSON=function(t,e){return new f(t,e[0],e[1],e[2])},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),a=o.redSub(n),s=r.redSub(e),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),h=a.redMul(o);return this.curve.point(u,c,h,f)},f.prototype._projDbl=function(){var t,e,n,r=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=r.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),e=a.redMul(c.redSub(o)),n=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);t=r.redSub(i).redISub(o).redMul(u),e=a.redMul(c.redSub(o)),n=a.redMul(u)}}else{var c=i.redAdd(o);s=this.curve._mulC(this.z).redSqr(),u=c.redSub(s).redSub(s);t=this.curve._mulC(r.redISub(c)).redMul(u),e=this.curve._mulC(c).redMul(i.redISub(o)),n=c.redMul(u)}return this.curve.point(t,e,n)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=n.redSub(e),a=i.redSub(r),s=i.redAdd(r),u=n.redAdd(e),c=o.redMul(a),f=s.redMul(u),h=o.redMul(u),l=a.redMul(s);return this.curve.point(c,f,l,h)},f.prototype._projAdd=function(t){var e,n,r=this.z.redMul(t.z),i=r.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),h=r.redMul(u).redMul(f);return this.curve.twisted?(e=r.redMul(c).redMul(a.redSub(this.curve._mulA(o))),n=u.redMul(c)):(e=r.redMul(c).redMul(a.redSub(o)),n=this.curve._mulC(u).redMul(c)),this.curve.point(h,e,n)},f.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},f.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!1)},f.prototype.jmulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},f.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var n=t.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},function(t,e,n){"use strict";var r,i=e,o=n(141),a=n(17),s=a.utils.assert;function u(t){"short"===t.type?this.curve=new a.curve.short(t):"edwards"===t.type?this.curve=new a.curve.edwards(t):this.curve=new a.curve.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(551)}catch(t){r=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e,n){"use strict";e.sha1=n(546),e.sha224=n(547),e.sha256=n(221),e.sha384=n(548),e.sha512=n(222)},function(t,e,n){"use strict";var r=n(33),i=n(74),o=n(220),a=r.rotl32,s=r.sum32,u=r.sum32_5,c=o.ft_1,f=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(l,f),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;rthis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(t,e){var n=8*t.byteLength()-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(t,e,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),e=this.keyFromPrivate(e,n),t=this._truncateToN(new r(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),c=t.toArray("be",a),f=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new r(1)),l=0;;l++){var d=o.k?o.k(l):new r(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),v=m.umod(this.n);if(0!==v.cmpn(0)){var g=d.invm(this.n).mul(v.mul(e.getPrivate()).iadd(t));if(0!==(g=g.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(v)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1),new u({r:v,s:g,recoveryParam:y})}}}}}},c.prototype.verify=function(t,e,n,i){t=this._truncateToN(new r(t,16)),n=this.keyFromPublic(n,i);var o=(e=new u(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),f=c.mul(t).umod(this.n),h=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(f,n.getPublic(),h)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(f,n.getPublic(),h)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(t,e,n,i){a((3&n)===n,"The recovery param is more than two bits"),e=new u(e,i);var o=this.n,s=new r(t),c=e.r,f=e.s,h=1&n,l=n>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");c=l?this.curve.pointFromX(c.add(this.curve.n),h):this.curve.pointFromX(c,h);var d=e.r.invm(o),p=o.sub(s).mul(d).umod(o),m=f.mul(d).umod(o);return this.g.mulAdd(p,c,m)},c.prototype.getKeyRecoveryParam=function(t,e,n,r){if(null!==(e=new u(e,r)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(t,e,n){"use strict";var r=n(141),i=n(219),o=n(27);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),n=i.toArray(t.nonce,t.nonceEnc||"hex"),r=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}t.exports=a,a.prototype._init=function(t,e,n){var r=t.concat(e).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},a.prototype.generate=function(t,e,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=n,n=e,e=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var o=[];o.length"}},function(t,e,n){"use strict";var r=n(9),i=n(17).utils,o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new r(t.r,16),this.s=new r(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(t,e){var n=t[e.place++];if(!(128&n))return n;for(var r=15&n,i=0,o=0,a=e.place;o>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=i.toArray(t,e);var n=new function(){this.place=0};if(48!==t[n.place++])return!1;if(s(t,n)+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;var o=s(t,n),a=t.slice(n.place,o+n.place);if(n.place+=o,2!==t[n.place++])return!1;var u=s(t,n);if(t.length!==u+n.place)return!1;var c=t.slice(n.place,u+n.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new r(a),this.s=new r(c),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),n=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n)),e=u(e),n=u(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];c(r,e.length),(r=r.concat(e)).push(2),c(r,n.length);var o=r.concat(n),a=[48];return c(a,o.length),a=a.concat(o),i.encode(a,t)}},function(t,e,n){"use strict";var r=n(141),i=n(17),o=i.utils,a=o.assert,s=o.parseBytes,u=n(557),c=n(558);function f(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=i.curves[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=r.sha512}t.exports=f,f.prototype.sign=function(t,e){t=s(t);var n=this.keyFromSecret(e),r=this.hashInt(n.messagePrefix(),t),i=this.g.mul(r),o=this.encodePoint(i),a=this.hashInt(o,n.pubBytes(),t).mul(n.priv()),u=r.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(t,e,n){t=s(t),e=this.makeSignature(e);var r=this.keyFromPublic(n),i=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(r.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e=e)throw new Error("invalid sig")}t.exports=function(t,n,u,c,f){var h=o(u);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var o=new i(r),s=n.data.subjectPrivateKey.data;return o.verify(e,t,s)}(t,n,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,n){var i=n.data.p,a=n.data.q,u=n.data.g,c=n.data.pub_key,f=o.signature.decode(t,"der"),h=f.s,l=f.r;s(h,a),s(l,a);var d=r.mont(i),p=h.invm(a);return 0===u.toRed(d).redPow(new r(e).mul(p).mod(a)).fromRed().mul(c.toRed(d).redPow(l.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(l)}(t,n,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");n=e.concat([f,n]);for(var l=h.modulus.byteLength(),d=[1],p=0;n.length+d.length+2r-l-2)throw new Error("message too long");var d=new e(r-c-l-2);d.fill(0);var p=r-h-1,m=i(h),v=s(e.concat([f,d,new e([1]),n],p),a(m,p)),g=s(m,a(v,h));return new u(e.concat([new e([0]),g,v],r))}(p,n);else if(1===l)d=function(t,n,r){var o,a=n.length,s=t.modulus.byteLength();if(a>s-11)throw new Error("message too long");r?(o=new e(s-a-3)).fill(255):o=function(t,n){var r,o=new e(t),a=0,s=i(2*t),u=0;for(;a=0)throw new Error("data too long for modulus")}return h?f(d,p):c(d,p)}}).call(this,n(2).Buffer)},function(t,e,n){(function(e){var r=n(99),i=n(228),o=n(229),a=n(9),s=n(140),u=n(72),c=n(230);t.exports=function(t,n,f){var h;h=t.padding?t.padding:f?1:4;var l,d=r(t),p=d.modulus.byteLength();if(n.length>p||new a(n).cmp(d.modulus)>=0)throw new Error("decryption error");l=f?c(new a(n),d):s(n,d);var m=new e(p-l.length);if(m.fill(0),l=e.concat([m,l],p),4===h)return function(t,n){t.modulus;var r=t.modulus.byteLength(),a=(n.length,u("sha1").update(new e("")).digest()),s=a.length;if(0!==n[0])throw new Error("decryption error");var c=n.slice(1,s+1),f=n.slice(s+1),h=o(c,i(f,s)),l=o(f,i(h,r-s-1));if(function(t,n){t=new e(t),n=new e(n);var r=0,i=t.length;t.length!==n.length&&(r++,i=Math.min(t.length,n.length));var o=-1;for(;++o=e.length){o++;break}var a=e.slice(2,i-1);e.slice(i-1,i);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,l,f);if(3===h)return l;throw new Error("unknown padding")}}).call(this,n(2).Buffer)},function(t,e,n){"use strict";(function(t,r){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=n(3),a=n(64),s=o.Buffer,u=o.kMaxLength,c=t.crypto||t.msCrypto,f=Math.pow(2,32)-1;function h(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function l(t,e,n){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>n||t>u)throw new RangeError("buffer too small")}function d(t,e,n,i){if(r.browser){var o=t.buffer,s=new Uint8Array(o,e,n);return c.getRandomValues(s),i?void r.nextTick(function(){i(null,t)}):t}if(!i)return a(n).copy(t,e),t;a(n,function(n,r){if(n)return i(n);r.copy(t,e),i(null,t)})}c&&c.getRandomValues||!r.browser?(e.randomFill=function(e,n,r,i){if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(n,e.length),l(r,n,e.length),d(e,n,r,i)},e.randomFillSync=function(e,n,r){void 0===n&&(n=0);if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(n,e.length),void 0===r&&(r=e.length-n);return l(r,n,e.length),d(e,n,r)}):(e.randomFill=i,e.randomFillSync=i)}).call(this,n(10),n(18))},function(t,e,n){t.exports=n(580)},function(t,e,n){(function(e){var r=n(136).pbkdf2Sync,i=2147483647;function o(t,n,r,i,o){if(e.isBuffer(t)&&e.isBuffer(r))t.copy(r,i,n,n+o);else for(;o--;)r[i++]=t[n++]}t.exports=function(t,n,a,s,u,c,f){if(0===a||0!=(a&a-1))throw Error("N must be > 0 and a power of 2");if(a>i/128/s)throw Error("Parameter N is too large");if(s>i/128/u)throw Error("Parameter r is too large");var h,l=new e(256*s),d=new e(128*s*a),p=new Int32Array(16),m=new Int32Array(16),v=new e(64),g=r(t,n,1,128*u*s,"sha256");if(f){var y=u*a*2,b=0;h=function(){++b%1e3==0&&f({current:b,total:y,percent:b/y*100})}}for(var _=0;_>>32-e}function S(t){var e;for(e=0;e<16;e++)p[e]=(255&t[4*e+0])<<0,p[e]|=(255&t[4*e+1])<<8,p[e]|=(255&t[4*e+2])<<16,p[e]|=(255&t[4*e+3])<<24;for(o(p,0,m,0,16),e=8;e>0;e-=2)m[4]^=x(m[0]+m[12],7),m[8]^=x(m[4]+m[0],9),m[12]^=x(m[8]+m[4],13),m[0]^=x(m[12]+m[8],18),m[9]^=x(m[5]+m[1],7),m[13]^=x(m[9]+m[5],9),m[1]^=x(m[13]+m[9],13),m[5]^=x(m[1]+m[13],18),m[14]^=x(m[10]+m[6],7),m[2]^=x(m[14]+m[10],9),m[6]^=x(m[2]+m[14],13),m[10]^=x(m[6]+m[2],18),m[3]^=x(m[15]+m[11],7),m[7]^=x(m[3]+m[15],9),m[11]^=x(m[7]+m[3],13),m[15]^=x(m[11]+m[7],18),m[1]^=x(m[0]+m[3],7),m[2]^=x(m[1]+m[0],9),m[3]^=x(m[2]+m[1],13),m[0]^=x(m[3]+m[2],18),m[6]^=x(m[5]+m[4],7),m[7]^=x(m[6]+m[5],9),m[4]^=x(m[7]+m[6],13),m[5]^=x(m[4]+m[7],18),m[11]^=x(m[10]+m[9],7),m[8]^=x(m[11]+m[10],9),m[9]^=x(m[8]+m[11],13),m[10]^=x(m[9]+m[8],18),m[12]^=x(m[15]+m[14],7),m[13]^=x(m[12]+m[15],9),m[14]^=x(m[13]+m[12],13),m[15]^=x(m[14]+m[13],18);for(e=0;e<16;++e)p[e]=m[e]+p[e];for(e=0;e<16;e++){var n=4*e;t[n+0]=p[e]>>0&255,t[n+1]=p[e]>>8&255,t[n+2]=p[e]>>16&255,t[n+3]=p[e]>>24&255}}function k(t,e,n,r,i){for(var o=0;oh)&&void 0===t.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=a,l=u,f=o;var p=(1e4*(268435455&(a+=122192928e5))+u)%4294967296;i[r++]=p>>>24&255,i[r++]=p>>>16&255,i[r++]=p>>>8&255,i[r++]=255&p;var m=a/4294967296*1e4&268435455;i[r++]=m>>>8&255,i[r++]=255&m,i[r++]=m>>>24&15|16,i[r++]=m>>>16&255,i[r++]=o>>>8|128,i[r++]=255&o;for(var v=t.node||c,g=0;g<6;g++)i[r+g]=v[g];return e||s(i)},p.v4=d,p.parse=function(t,e,n){var r=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){i<16&&(e[r+i++]=o[t])});i<16;)e[r+i++]=0;return e},p.unparse=s,t.exports=p},function(t,e,n){(function(e){var n;if(e.crypto&&crypto.getRandomValues){var r=new Uint8Array(16);n=function(){return crypto.getRandomValues(r),r}}if(!n){var i=new Array(16);n=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}t.exports=n}).call(this,n(10))},function(t,e,n){"use strict";var r=n(15);t.exports=function(t){var e,n=this;return this.net.getId().then(function(t){return e=t,n.getBlock(0)}).then(function(n){var i="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===n.hash&&1===e&&(i="main"),"0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303"===n.hash&&2===e&&(i="morden"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===n.hash&&3===e&&(i="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===n.hash&&4===e&&(i="rinkeby"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===n.hash&&42===e&&(i="kovan"),r.isFunction(t)&&t(null,i),i}).catch(function(e){if(!r.isFunction(t))throw e;t(e)})}},function(t,e,n){"use strict";var r=n(53),i=n(93).subscriptions,o=n(55),a=n(94),s=function(){var t=this;r.packageInit(this,arguments);var e=this.setProvider;this.setProvider=function(){e.apply(t,arguments),t.net.setProvider.apply(t,arguments)},this.clearSubscriptions=t._requestManager.clearSubscriptions,this.net=new a(this.currentProvider),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};r.addProviders(s),t.exports=s},function(t,e,n){"use strict";var r=n(15),i=n(586),o=function t(e){this.givenProvider=t.givenProvider,e&&e._requestManager&&(e=e.currentProvider),"undefined"!=typeof document&&(this.pick=i.pick),this.setProvider(e)};o.givenProvider=null,"undefined"!=typeof ethereumProvider&ðereumProvider.bzz&&(o.givenProvider=ethereumProvider.bzz),o.prototype.setProvider=function(t){if(r.isObject(t)&&r.isString(t.bzz)&&(t=t.bzz),!r.isString(t)){this.currentProvider=null;var e=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw e},!1}return this.currentProvider=t,this.download=i.at(t).download,this.upload=i.at(t).upload,this.isAvailable=i.at(t).isAvailable,!0},t.exports=o},function(t,e,n){var r=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:r},o={download:r,safeDownloadArchived:r,directoryTree:r},a={platform:r,arch:r},s={join:r,slice:r},u={spawn:r},c={lookup:r},f=n(587),h=n(235),l=n(604),d=n(605),p=n(606);t.exports=p({fsp:i,files:o,os:a,path:s,child_process:u,defaultArchives:{},mimetype:c,request:f,downloadUrl:null,bytes:h,hash:l,pick:d})},function(t,e,n){var r=n(588);t.exports=function(t,e){return new Promise(function(n,i){r(t,e,function(t,e){t?i(t):n(e)})})}},function(t,e,n){var r=n(589),i=n(592),o=n(234),a=n(593),s=n(594),u="application/json",c=function(){};t.exports=function(t,e,n){if(!t||"string"!=typeof t)throw new TypeError("must specify a URL");"function"==typeof e&&(n=e,e={});if(n&&"function"!=typeof n)throw new TypeError("expected cb to be undefined or a function");n=n||c;var f=(e=e||{}).json?"json":"text",h=(e=o({responseType:f},e)).headers||{},l=(e.method||"GET").toUpperCase(),d=e.query;d&&("string"!=typeof d&&(d=r.stringify(d)),t=i(t,d));"json"===e.responseType&&a(h,"Accept",u);e.json&&"GET"!==l&&"HEAD"!==l&&(a(h,"Content-Type",u),e.body=JSON.stringify(e.body));return e.method=l,e.url=t,e.headers=h,delete e.query,delete e.json,s(e,n)}},function(t,e,n){"use strict";var r=n(590),i=n(234),o=n(591);function a(t,e){return e.encode?e.strict?r(t):encodeURIComponent(t):t}function s(t){var e=t.indexOf("?");return-1===e?"":t.slice(e+1)}function u(t,e){var n=function(t){var e;switch(t.arrayFormat){case"index":return function(t,n,r){e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return function(t,n,r){e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n};default:return function(t,e,n){void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}(e=i({arrayFormat:"none"},e)),r=Object.create(null);return"string"!=typeof t?r:(t=t.trim().replace(/^[?#&]/,""))?(t.split("&").forEach(function(t){var e=t.replace(/\+/g," ").split("="),i=e.shift(),a=e.length>0?e.join("="):void 0;a=void 0===a?null:o(a),n(o(i),a,r)}),Object.keys(r).sort().reduce(function(t,e){var n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort(function(t,e){return Number(t)-Number(e)}).map(function(t){return e[t]}):e}(n):t[e]=n,t},Object.create(null))):r}e.extract=s,e.parse=u,e.stringify=function(t,e){!1===(e=i({encode:!0,strict:!0,arrayFormat:"none"},e)).sort&&(e.sort=function(){});var n=function(t){switch(t.arrayFormat){case"index":return function(e,n,r){return null===n?[a(e,t),"[",r,"]"].join(""):[a(e,t),"[",a(r,t),"]=",a(n,t)].join("")};case"bracket":return function(e,n){return null===n?a(e,t):[a(e,t),"[]=",a(n,t)].join("")};default:return function(e,n){return null===n?a(e,t):[a(e,t),"=",a(n,t)].join("")}}}(e);return t?Object.keys(t).sort(e.sort).map(function(r){var i=t[r];if(void 0===i)return"";if(null===i)return a(r,e);if(Array.isArray(i)){var o=[];return i.slice().forEach(function(t){void 0!==t&&o.push(n(r,t,o.length))}),o.join("&")}return a(r,e)+"="+a(i,e)}).filter(function(t){return t.length>0}).join("&"):""},e.parseUrl=function(t,e){return{url:t.split("?")[0]||"",query:u(s(t),e)}}},function(t,e,n){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}},function(t,e,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],o(n),o(r))}function a(t){try{return decodeURIComponent(t)}catch(i){for(var e=t.match(r),n=1;n0&&(f=setTimeout(function(){if(!s){s=!0,c.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}},t.timeout)),c.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&c.setRequestHeader(a,p[a]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(c.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(c),c.send(d||null),c}t.exports=u,t.exports.default=u,u.XMLHttpRequest=r.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:r.XDomainRequest,function(t,e){for(var n=0;n=3&&(a=n),"[object Array]"===i.call(t)?function(t,e,n){for(var r=0,i=t.length;r0){var a=i.join(n,o);r.push(b(t)(e[o])(a))}return Promise.all(r).then(function(){return n})})}}},w=function(t){return function(e){return u(t+"/bzzr:/",{body:"string"==typeof e?L(e):e,method:"POST"})}},M=function(t){return function(e){return function(n){return function(r){return function i(o){var a="/"===n[0]?n:"/"+n,s=t+"/bzz:/"+e+a,c={method:"PUT",headers:{"Content-Type":r.type},body:r.data};return u(s,c).then(function(t){if(-1!==t.indexOf("error"))throw t;return t}).catch(function(t){return o>0&&i(o-1)})}(3)}}}},x=function(t){return function(e){return k(t)({"":e})}},S=function(t){return function(n){return e.readFile(n).then(function(e){return x(t)({type:a.lookup(n),data:e})})}},k=function(t){return function(e){return w(t)("{}").then(function(n){return Object.keys(e).reduce(function(n,r){return n.then(function(n){return function(r){return M(t)(r)(n)(e[n])}}(r))},Promise.resolve(n))})}},A=function(t){return function(n){return e.readFile(n).then(w(t))}},E=function(t){return function(r){return function(i){return n.directoryTree(i).then(function(t){return Promise.all(t.map(function(t){return e.readFile(t)})).then(function(e){var n=t.map(function(t){return t.slice(i.length)}),r=t.map(function(t){return a.lookup(t)||"text/plain"});return d(n)(e.map(function(t,e){return{type:r[e],data:t}}))})}).then(function(t){return function(t){return function(e){var n={};for(var r in t)n[r]=t[r];for(var i in e)n[i]=e[i];return n}}(r?{"":t[r]}:{})(t)}).then(k(t))}}},T=function(t){return function(e){if("data"===e.pick)return l.data().then(w(t));if("file"===e.pick)return l.file().then(x(t));if("directory"===e.pick)return l.directory().then(k(t));if(e.path)switch(e.kind){case"data":return A(t)(e.path);case"file":return S(t)(e.path);case"directory":return E(t)(e.defaultFile)(e.path)}else{if(e.length||"string"==typeof e)return w(t)(e);if(e instanceof Object)return k(t)(e)}return Promise.reject(new Error("Bad arguments"))}},C=function(t){return function(e){return function(n){return R(t)(e).then(function(r){return r?n?_(t)(e)(n):y(t)(e):n?b(t)(e)(n):m(t)(e)})}}},P=function(t,e){var i=r.platform().replace("win32","windows")+"-"+("x64"===r.arch()?"amd64":"386"),o=(e||s)[i],a=c+o.archive+".tar.gz",u=o.archiveMD5,f=o.binaryMD5;return n.safeDownloadArchived(a)(u)(f)(t)},O=function(t){return new Promise(function(e,n){var r=o.spawn,i=function(t){return function(e){return-1!==(""+e).indexOf(t)}},a=t.account,s=t.password,u=t.dataDir,c=t.ensApi,f=t.privateKey,h=0,l=r(t.binPath,["--bzzaccount",a||f,"--datadir",u,"--ens-api",c]),d=function(t){0===h&&i("Passphrase")(t)?setTimeout(function(){h=1,l.stdin.write(s+"\n")},500):i("Swarm http proxy started")(t)&&(h=2,clearTimeout(p),e(l))};l.stdout.on("data",d),l.stderr.on("data",d);var p=setTimeout(function(){return n(new Error("Couldn't start swarm process."))},2e4)})},N=function(t){return new Promise(function(e,n){t.stderr.removeAllListeners("data"),t.stdout.removeAllListeners("data"),t.stdin.removeAllListeners("error"),t.removeAllListeners("error"),t.removeAllListeners("exit"),t.kill("SIGINT");var r=setTimeout(function(){return t.kill("SIGKILL")},8e3);t.once("close",function(){clearTimeout(r),e()})})},I=function(t){return w(t)("test").then(function(t){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===t}).catch(function(){return!1})},R=function(t){return function(e){return m(t)(e).then(function(t){try{return!!JSON.parse(B(t)).entries}catch(t){return!1}})}},j=function(t){return function(e,n,r,i,o){var a;return void 0!==e&&(a=t(e)),void 0!==n&&(a=t(n)),void 0!==r&&(a=t(r)),void 0!==i&&(a=t(i)),void 0!==o&&(a=t(o)),a}},B=function(t){return f.toString(f.fromUint8Array(t))},L=function(t){return f.toUint8Array(f.fromString(t))},U=function(t){return{download:function(e,n){return C(t)(e)(n)},downloadData:j(m(t)),downloadDataToDisk:j(b(t)),downloadDirectory:j(y(t)),downloadDirectoryToDisk:j(_(t)),downloadEntries:j(v(t)),downloadRoutes:j(g(t)),isAvailable:function(){return I(t)},upload:function(e){return T(t)(e)},uploadData:j(w(t)),uploadFile:j(x(t)),uploadFileFromDisk:j(x(t)),uploadDataFromDisk:j(A(t)),uploadDirectory:j(k(t)),uploadDirectoryFromDisk:j(E(t)),uploadToManifest:j(M(t)),pick:l,hash:h,fromString:L,toString:B}};return{at:U,local:function(t){return function(e){return I("http://localhost:8500").then(function(n){return n?e(U("http://localhost:8500")).then(function(){}):P(t.binPath,t.archives).onData(function(e){return(t.onProgress||function(){})(e.length)}).then(function(){return O(t)}).then(function(t){return e(U("http://localhost:8500")).then(function(){return t})}).then(N)})}},download:C,downloadBinary:P,downloadData:m,downloadDataToDisk:b,downloadDirectory:y,downloadDirectoryToDisk:_,downloadEntries:v,downloadRoutes:g,isAvailable:I,startProcess:O,stopProcess:N,upload:T,uploadData:w,uploadDataFromDisk:A,uploadFile:x,uploadFileFromDisk:S,uploadDirectory:k,uploadDirectoryFromDisk:E,uploadToManifest:M,pick:l,hash:h,fromString:L,toString:B}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isValidAddress=e.isValidEmail=void 0;var r=n(91);e.isValidEmail=function(t){return!!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)};e.isValidAddress=function(t){return!("0x"!==t.substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(t)||!/^(0x)?[0-9a-f]{40}$/.test(t)&&!/^(0x)?[0-9A-F]{40}$/.test(t)&&t!==(0,r.toChecksumAddress)(t))}},function(t){t.exports={token_transfer:{method:"transfer(address,uint256)",hash:"0xa9059cbb"},token_balance:{method:"balanceOf(address)",hash:"0x70a08231"}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTimeString=e.getLocalTimeDate=void 0;var r=n(52),i=a(n(179)),o=a(n(88));function a(t){return t&&t.__esModule?t:{default:t}}e.getLocalTimeDate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t=Number(t)||Date.now();var e=new Date(t);return"".concat(e.toLocaleDateString()," ").concat(e.toLocaleTimeString())};e.getTimeString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ms",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!t)return null;var a=(0,r.convertStringToNumber)(t),s="",u="";return a&&("miliseconds"===e||"ms"===e?1===a?(s=o.default.t("time.milisecond"),u=o.default.t("time.ms")):a>=i.default.ms.second&&a=i.default.ms.minute&&a=i.default.ms.hour&&a=i.default.ms.day?1===(a=(0,r.formatFixedDecimals)((0,r.divide)(a,i.default.ms.day),2))?(s=o.default.t("time.day"),u=o.default.t("time.day")):(s=o.default.t("time.days"),u=o.default.t("time.days")):(s=o.default.t("time.miliseconds"),u=o.default.t("time.ms")):"seconds"===e||"secs"===e?1===a?(s=o.default.t("time.second"),u=o.default.t("time.sec")):a<1?1===(a=(0,r.formatFixedDecimals)((0,r.multiply)(a,i.default.ms.second)))?(s=o.default.t("time.milisecond"),u=o.default.t("time.ms")):(s=o.default.t("time.miliseconds"),u=o.default.t("time.ms")):a>=i.default.secs.minute&&a=i.default.secs.hour&&a=i.default.secs.day?1===(a=(0,r.formatFixedDecimals)((0,r.divide)(a,i.default.secs.day),2))?(s=o.default.t("time.day"),u=o.default.t("time.day")):(s=o.default.t("time.days"),u=o.default.t("time.days")):(s=o.default.t("time.seconds"),u=o.default.t("time.secs")):"minutes"!==e&&"mins"!==e||(1===a?(s=o.default.t("time.minute"),u=o.default.t("time.min")):a<1?1===(a=(0,r.formatFixedDecimals)((0,r.multiply)(a,i.default.secs.minute)))?(s=o.default.t("time.second"),u=o.default.t("time.sec")):(s=o.default.t("time.seconds"),u=o.default.t("time.secs")):a>i.default.mins.hour&&a=i.default.mins.day?1===(a=(0,r.formatFixedDecimals)((0,r.divide)(a,i.default.mins.day),2))?(s=o.default.t("time.day"),u=o.default.t("time.day")):(s=o.default.t("time.days"),u=o.default.t("time.days")):(s=o.default.t("time.minutes"),u=o.default.t("time.mins")))),n?"".concat(a," ").concat(u):"".concat(a," ").concat(s)}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.apiGetAccountUniqueTokens=void 0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(173)),i=n(68);function o(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}var a=t.env.REACT_APP_OPENSEA_API_KEY||"",s=r.default.create({baseURL:"https://api.opensea.io/api/v1",timeout:3e4,headers:{Accept:"application/json","X-API-KEY":a}}),u=function(){var t=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function s(t){o(a,r,i,s,u,"next",t)}function u(t){o(a,r,i,s,u,"throw",t)}s(void 0)})}}(regeneratorRuntime.mark(function t(){var e,n,r,o=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=o.length>0&&void 0!==o[0]?o[0]:"",t.next=3,s.get("/assets?owner=".concat(e));case 3:return n=t.sent,r=(0,i.parseAccountUniqueTokens)(n),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}();e.apiGetAccountUniqueTokens=u}).call(this,n(18))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.sendClearFields=e.sendMaxBalance=e.sendUpdateSelected=e.sendUpdateNativeAmount=e.sendUpdateAssetAmount=e.sendUpdateRecipient=e.sendToggleConfirmationView=e.sendTransaction=e.sendUpdateGasPrice=e.sendModalInit=void 0;var r=n(125),i=h(n(88)),o=h(n(89)),a=n(52),s=n(68),u=n(91),c=n(237),f=n(172);function h(t){return t&&t.__esModule?t:{default:t}}function l(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:v,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"send/SEND_GET_GAS_PRICES_REQUEST":return l({},t,{fetchingGasPrices:!0,address:e.payload.address,selected:e.payload.selected,gasPrice:e.payload.gasPrices.average,gasPrices:e.payload.gasPrices,gasPriceOption:e.payload.gasPrices.average.option});case"send/SEND_GET_GAS_PRICES_SUCCESS":case"send/SEND_GET_GAS_PRICES_FAILURE":return l({},t,{fetchingGasPrices:!1,gasPrice:e.payload.average,gasPrices:e.payload,gasPriceOption:e.payload.average.option});case"send/SEND_UPDATE_GAS_PRICE_REQUEST":return l({},t,{fetchingGasPrices:!0});case"send/SEND_UPDATE_GAS_PRICE_SUCCESS":return l({},t,{fetchingGasPrices:!1,gasLimit:e.payload.gasLimit,gasPrice:e.payload.gasPrice,gasPrices:e.payload.gasPrices,gasPriceOption:e.payload.gasPriceOption});case"send/SEND_UPDATE_GAS_PRICE_FAILURE":return l({},t,{fetchingGasPrices:!1,gasPrice:e.payload.gasPrice,gasPrices:e.payload.gasPrices,gasPriceOption:e.payload.gasPriceOption});case"send/SEND_TRANSACTION_REQUEST":return l({},t,{fetching:!0});case"send/SEND_TRANSACTION_SUCCESS":return l({},t,{fetching:!1,gasPrices:{},txHash:e.payload});case"send/SEND_TRANSACTION_FAILURE":return l({},t,{fetching:!1,txHash:"",confirm:!1});case"send/SEND_UPDATE_HAS_PENDING_TRANSACTION":return l({},t,{hasPendingTransaction:e.payload});case"send/SEND_TOGGLE_CONFIRMATION_VIEW":return l({},t,{confirm:e.payload});case"send/SEND_UPDATE_RECIPIENT":return l({},t,{recipient:e.payload});case"send/SEND_UPDATE_NATIVE_AMOUNT":case"send/SEND_UPDATE_ASSET_AMOUNT":return l({},t,{assetAmount:e.payload.assetAmount,nativeAmount:e.payload.nativeAmount});case"send/SEND_UPDATE_SELECTED":return l({},t,{selected:e.payload});case"send/SEND_CLEAR_FIELDS":return l({},t,v);default:return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parseError",{enumerable:!0,get:function(){return r.parseError}}),Object.defineProperty(e,"parseGasPrices",{enumerable:!0,get:function(){return r.parseGasPrices}});var r=n(68)},function(t,e,n){"use strict";n.r(e);var r=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init(e,n)}return t.prototype.init=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||i,this.options=e,this.debug=e.debug},t.prototype.setDebug=function(t){this.debug=t},t.prototype.log=function(){for(var t=arguments.length,e=Array(t),n=0;n-1&&n.observers[t].splice(r,1)}else delete n.observers[t]})},t.prototype.emit=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r-1?t.replace(/###/g,"."):t}function i(){return!t||"string"==typeof t}for(var o="string"!=typeof e?[].concat(e):e.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!t[a]&&n&&(t[a]=new n),t=t[a]}return i()?{}:{obj:t,k:r(o.shift())}}function c(t,e,n){var r=u(t,e,Object);r.obj[r.k]=n}function f(t,e){var n=u(t,e),r=n.obj,i=n.k;if(r)return r[i]}function h(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var l={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function d(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,function(t){return l[t]}):t}var p=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return i.data=n||{},i.options=r,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i}return m(e,t),e.prototype.addNamespaces=function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)},e.prototype.removeNamespaces=function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)},e.prototype.getResource=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=[t,e];return n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(o=t.split(".")),f(this.data,o)},e.prototype.addResource=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[t,e];n&&(a=a.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(r=e,e=(a=t.split("."))[1]),this.addNamespaces(e),c(this.data,a,r),i.silent||this.emit("added",t,e,n,r)},e.prototype.addResources=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"==typeof n[i]&&this.addResource(t,e,i,n[i],{silent:!0});r.silent||this.emit("added",t,e,n)},e.prototype.addResourceBundle=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[t,e];t.indexOf(".")>-1&&(r=n,n=e,e=(a=t.split("."))[1]),this.addNamespaces(e);var s=f(this.data,a)||{};r?function t(e,n,r){for(var i in n)i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof n[i]||n[i]instanceof String?r&&(e[i]=n[i]):t(e[i],n[i],r):e[i]=n[i];return e}(s,n,i):s=p({},s,n),c(this.data,a,s),o.silent||this.emit("added",t,e,n)},e.prototype.removeResourceBundle=function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)},e.prototype.hasResourceBundle=function(t,e){return void 0!==this.getResource(t,e)},e.prototype.getResourceBundle=function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?p({},this.getResource(t,e)):this.getResource(t,e)},e.prototype.getDataByLanguage=function(t){return this.data[t]},e.prototype.toJSON=function(){return this.data},e}(a),g={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,r,i){var o=this;return t.forEach(function(t){o.processors[t]&&(e=o.processors[t].process(e,n,r,i))}),e}},y=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return function(t,e,n){t.forEach(function(t){e[t]&&(n[t]=e[t])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],n,i),i.options=r,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=o.create("translator"),i}return _(e,t),e.prototype.changeLanguage=function(t){t&&(this.language=t)},e.prototype.exists=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(t,e);return n&&void 0!==n.res},e.prototype.extractFromKey=function(t,e){var n=e.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=e.ns||this.options.defaultNS;if(n&&t.indexOf(n)>-1){var o=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),t=o.join(r)}return"string"==typeof i&&(i=[i]),{key:t,namespaces:i}},e.prototype.translate=function(t,e){var n=this;if("object"!==(void 0===e?"undefined":b(e))&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),void 0===t||null===t||""===t)return"";"number"==typeof t&&(t=String(t)),"string"==typeof t&&(t=[t]);var r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=this.extractFromKey(t[t.length-1],e),o=i.key,a=i.namespaces,s=a[a.length-1],u=e.lng||this.language,c=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(c){var f=e.nsSeparator||this.options.nsSeparator;return s+f+o}return o}var h=this.resolve(t,e),l=h&&h.res,d=h&&h.usedKey||o,p=Object.prototype.toString.apply(l),m=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays;if(l&&("string"!=typeof l&&"boolean"!=typeof l&&"number"!=typeof l)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&(!m||"[object Array]"!==p)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,l,e):"key '"+o+" ("+this.language+")' returned an object instead of string.";if(r){var v="[object Array]"===p?[]:{};for(var g in l)if(Object.prototype.hasOwnProperty.call(l,g)){var _=""+d+r+g;v[g]=this.translate(_,y({},e,{joinArrays:!1,ns:a})),v[g]===_&&(v[g]=l[g])}l=v}}else if(m&&"[object Array]"===p)(l=l.join(m))&&(l=this.extendTranslation(l,t,e));else{var w=!1,M=!1;this.isValidLookup(l)||void 0===e.defaultValue||(w=!0,l=e.defaultValue),this.isValidLookup(l)||(M=!0,l=o);var x=e.defaultValue&&e.defaultValue!==l&&this.options.updateMissing;if(M||w||x){this.logger.log(x?"updateKey":"missingKey",u,s,o,x?e.defaultValue:l);var S=[],k=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&k&&k[0])for(var A=0;A1&&void 0!==arguments[1]?arguments[1]:{},r=void 0,i=void 0,o=void 0,a=void 0;return"string"==typeof t&&(t=[t]),t.forEach(function(t){if(!e.isValidLookup(r)){var s=e.extractFromKey(t,n),u=s.key;i=u;var c=s.namespaces;e.options.fallbackNS&&(c=c.concat(e.options.fallbackNS));var f=void 0!==n.count&&"string"!=typeof n.count,h=void 0!==n.context&&"string"==typeof n.context&&""!==n.context,l=n.lngs?n.lngs:e.languageUtils.toResolveHierarchy(n.lng||e.language);c.forEach(function(t){e.isValidLookup(r)||(a=t,l.forEach(function(i){if(!e.isValidLookup(r)){o=i;var a=u,s=[a];if(e.i18nFormat&&e.i18nFormat.addLookupKeys)e.i18nFormat.addLookupKeys(s,u,i,t,n);else{var c=void 0;f&&(c=e.pluralResolver.getSuffix(i,n.count)),f&&h&&s.push(a+c),h&&s.push(a+=""+e.options.contextSeparator+n.context),f&&s.push(a+=c)}for(var l=void 0;l=s.pop();)e.isValidLookup(r)||(r=e.getResource(i,t,l,n))}}))})}}),{res:r,usedKey:i,usedLng:o,usedNS:a}},e.prototype.isValidLookup=function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)},e.prototype.getResource=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.resourceStore.getResource(t,e,n,r)},e}(a);function M(t){return t.charAt(0).toUpperCase()+t.slice(1)}var x=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=o.create("languageUtils")}return t.prototype.getScriptPartFromCode=function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),this.formatLanguageCode(e.join("-")))},t.prototype.getLanguagePartFromCode=function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])},t.prototype.formatLanguageCode=function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(t){return t.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=M(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=M(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=M(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t},t.prototype.isWhitelisted=function(t){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(t=this.getLanguagePartFromCode(t)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(t)>-1},t.prototype.getFallbackCodes=function(t,e){if(!t)return[];if("string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t.default),n||[]},t.prototype.toResolveHierarchy=function(t,e){var n=this,r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],o=function(t){t&&(n.isWhitelisted(t)?i.push(t):n.logger.warn("rejecting non-whitelisted language code: "+t))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):"string"==typeof t&&o(this.formatLanguageCode(t)),r.forEach(function(t){i.indexOf(t)<0&&o(n.formatLanguageCode(t))}),i},t}();var S=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","he","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21}],k={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0===t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0===t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)}};var A=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.languageUtils=e,this.options=n,this.logger=o.create("pluralResolver"),this.rules=function(){var t={};return S.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:k[e.fc]}})}),t}()}return t.prototype.addRule=function(t,e){this.rules[t]=e},t.prototype.getRule=function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]},t.prototype.needsPlural=function(t){var e=this.getRule(t);return e&&e.numbers.length>1},t.prototype.getPluralFormsOfKey=function(t,e){var n=this,r=[],i=this.getRule(t);return i?(i.numbers.forEach(function(i){var o=n.getSuffix(t,i);r.push(""+e+o)}),r):r},t.prototype.getSuffix=function(t,e){var n=this,r=this.getRule(t);if(r){var i=r.noAbs?r.plurals(e):r.plurals(Math.abs(e)),o=r.numbers[i];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_"+o.toString():a():"v2"===this.options.compatibilityJSON&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: "+t),""},t}(),E=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.logger=o.create("interpolator"),this.init(e,!0)}return t.prototype.init=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};arguments[1]&&(this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t}),t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:d,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?h(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?h(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?h(e.nestingPrefix):e.nestingPrefixEscaped||h("$t("),this.nestingSuffix=e.nestingSuffix?h(e.nestingSuffix):e.nestingSuffixEscaped||h(")"),this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.resetRegExp()},t.prototype.reset=function(){this.options&&this.init(this.options)},t.prototype.resetRegExp=function(){var t=this.prefix+"(.+?)"+this.suffix;this.regexp=new RegExp(t,"g");var e=""+this.prefix+this.unescapePrefix+"(.+?)"+this.unescapeSuffix+this.suffix;this.regexpUnescape=new RegExp(e,"g");var n=this.nestingPrefix+"(.+?)"+this.nestingSuffix;this.nestingRegexp=new RegExp(n,"g")},t.prototype.interpolate=function(t,e,n){var r=this,i=void 0,o=void 0,a=void 0;function u(t){return t.replace(/\$/g,"$$$$")}var c=function(t){if(t.indexOf(r.formatSeparator)<0)return f(e,t);var i=t.split(r.formatSeparator),o=i.shift().trim(),a=i.join(r.formatSeparator).trim();return r.format(f(e,o),a,n)};for(this.resetRegExp(),a=0;(i=this.regexpUnescape.exec(t))&&(o=c(i[1].trim()),t=t.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++a>=this.maxReplaces)););for(a=0;i=this.regexp.exec(t);){if(void 0===(o=c(i[1].trim())))if("function"==typeof this.options.missingInterpolationHandler){var h=this.options.missingInterpolationHandler(t,i);o="string"==typeof h?h:""}else this.logger.warn("missed to pass in variable "+i[1]+" for interpolating "+t),o="";else"string"==typeof o||this.useRawValueToEscape||(o=s(o));if(o=this.escapeValue?u(this.escape(o)):u(o),t=t.replace(i[0],o),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return t},t.prototype.nest=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=void 0,i=void 0,o=E({},n);function a(t,e){if(t.indexOf(",")<0)return t;var n=t.split(",");t=n.shift();var r=n.join(",");r=(r=this.interpolate(r,o)).replace(/'/g,'"');try{o=JSON.parse(r),e&&(o=E({},e,o))}catch(e){this.logger.error("failed parsing options string in nesting for key "+t,e)}return t}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(t);){if((i=e(a.call(this,r[1].trim(),o),o))&&r[0]===t&&"string"!=typeof i)return i;"string"!=typeof i&&(i=s(i)),i||(this.logger.warn("missed to resolve "+r[1]+" for nesting "+t),i=""),t=t.replace(r[0],i),this.regexp.lastIndex=0}return t},t}(),C=Object.assign||function(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return s.backend=n,s.store=r,s.languageUtils=i.languageUtils,s.options=a,s.logger=o.create("backendConnector"),s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(i,a.backend,a),s}return O(e,t),e.prototype.queueLoad=function(t,e,n){var r=this,i=[],o=[],a=[],s=[];return t.forEach(function(t){var n=!0;e.forEach(function(e){var a=t+"|"+e;r.store.hasResourceBundle(t,e)?r.state[a]=2:r.state[a]<0||(1===r.state[a]?o.indexOf(a)<0&&o.push(a):(r.state[a]=1,n=!1,o.indexOf(a)<0&&o.push(a),i.indexOf(a)<0&&i.push(a),s.indexOf(e)<0&&s.push(e)))}),n||a.push(t)}),(i.length||o.length)&&this.queue.push({pending:o,loaded:{},errors:[],callback:n}),{toLoad:i,pending:o,toLoadLanguages:a,toLoadNamespaces:s}},e.prototype.loaded=function(t,e,n){var r=t.split("|"),i=P(r,2),o=i[0],a=i[1];e&&this.emit("failedLoading",o,a,e),n&&this.store.addResourceBundle(o,a,n),this.state[t]=e?-1:2;var s={};this.queue.forEach(function(n){!function(t,e,n,r){var i=u(t,e,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}(n.loaded,[o],a),function(t,e){for(var n=t.indexOf(e);-1!==n;)t.splice(n,1),n=t.indexOf(e)}(n.pending,t),e&&n.errors.push(e),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach(function(t){s[t]||(s[t]=[]),n.loaded[t].length&&n.loaded[t].forEach(function(e){s[t].indexOf(e)<0&&s[t].push(e)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(t){return!t.done})},e.prototype.read=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=this,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,a=arguments[5];return t.length?this.backend[n](t,e,function(s,u){s&&u&&r<5?setTimeout(function(){i.read.call(i,t,e,n,r+1,2*o,a)},o):a(s,u)}):a(null,{})},e.prototype.load=function(t,e,n){var r=this;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var i=this.queueLoad(t,e,n);if(!i.toLoad.length)return i.pending.length||n(),null;i.toLoad.forEach(function(t){r.loadOne(t)})},e.prototype.reload=function(t,e){var n=this;this.backend||this.logger.warn("No backend was added via i18next.use. Will not load resources."),"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]),t.forEach(function(t){e.forEach(function(e){n.loadOne(t+"|"+e,"re")})})},e.prototype.loadOne=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),i=P(r,2),o=i[0],a=i[1];this.read(o,a,"read",null,null,function(r,i){r&&e.logger.warn(n+"loading namespace "+a+" for language "+o+" failed",r),!r&&i&&e.logger.log(n+"loaded namespace "+a+" for language "+o,i),e.loaded(t,r,i)})},e.prototype.saveMissing=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(t,e,n,r,null,C({},o,{isUpdate:i})),t&&t[0]&&this.store.addResource(t[0],e,n,r)},e}(a);function I(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}var R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=B(this,t.call(this));if(i.options=I(n),i.services={},i.logger=o,i.modules={external:[]},r&&!i.isInitialized&&!n.isClone){var a;if(!i.options.initImmediate)return a=i.init(n,r),B(i,a);setTimeout(function(){i.init(n,r)},0)}return i}return L(e,t),e.prototype.init=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];function r(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof e&&(n=e,e={}),this.options=j({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};return t[1]&&(e.defaultValue=t[1]),t[2]&&(e.tDescription=t[2]),e},interpolation:{escapeValue:!0,format:function(t,e,n){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}},this.options,I(e)),this.format=this.options.interpolation.format,n||(n=U),!this.options.isClone){this.modules.logger?o.init(r(this.modules.logger),this.options):o.init(null,this.options);var i=new x(this.options);this.store=new v(this.options.resources,this.options);var a=this.services;a.logger=o,a.resourceStore=this.store,a.languageUtils=i,a.pluralResolver=new A(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new T(this.options),a.backendConnector=new N(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:U;if(this.options.resources)e(null);else{if(this.language&&"cimode"===this.language.toLowerCase())return e();var n=[],r=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(t){n.indexOf(t)<0&&n.push(t)})};if(this.language)r(this.language);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(t){return r(t)});this.options.preload&&this.options.preload.forEach(function(t){return r(t)}),this.services.backendConnector.load(n,this.options.ns,e)}},e.prototype.reloadResources=function(t,e){t||(t=this.languages),e||(e=this.options.ns),this.services.backendConnector.reload(t,e)},e.prototype.use=function(t){return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&g.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this},e.prototype.changeLanguage=function(t,e){var n=this,r=function(t){t&&(n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t),n.translator.language||n.translator.changeLanguage(t),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(t)),n.loadResources(function(r){!function(t,r){n.translator.changeLanguage(r),r&&(n.emit("languageChanged",r),n.logger.log("languageChanged",r)),e&&e(t,function(){return n.t.apply(n,arguments)})}(r,t)})};t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(r):r(t):r(this.services.languageDetector.detect())},e.prototype.getFixedT=function(t,e){var n=this,r=function t(e,r){for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a0?this.languages[0]:this.language),!t)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"},e.prototype.createInstance=function(){return new e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments[1])},e.prototype.cloneInstance=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U,i=j({},this.options,n,{isClone:!0}),o=new e(i);return["store","services","language"].forEach(function(e){o[e]=t[e]}),o.translator=new w(o.services,o.options),o.translator.on("*",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r