UNPKG

1.35 MBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.loom=e():t.loom=e()}(this,function(){return 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,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=621)}([function(t,e,r){"use strict";(function(t){
2/*!
3 * The buffer module from node.js, for the browser.
4 *
5 * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
6 * @license MIT
7 */
8var n=r(620),i=r(619),o=r(267);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=a(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function f(t,e){var r=e.length<0?0:0|p(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(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 U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(n)return U(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(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:m(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):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,s=1,a=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;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){h=!1;break}if(h)return o}return-1}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(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 s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function v(t,e,r,n){return q(U(e,t.length-r),t,r,n)}function w(t,e,r,n){return q(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function _(t,e,r,n){return w(t,e,r,n)}function M(t,e,r,n){return q(W(e),t,r,n)}function E(t,e,r,n){return q(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function B(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=T));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?B(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(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+=" ... ")),"<Buffer "+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,s=r-e,a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),h=0;h<a;++h)if(c[h]!==l[h]){o=c[h],s=l[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(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 v(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(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 T=4096;function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function S(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=D(t[o]);return i}function k(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function j(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function F(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function O(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 P(t,e,r,n,o){return o||O(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return o||O(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),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||C(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||C(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||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(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||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||C(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||C(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||C(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||C(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||C(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||C(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)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=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||I(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||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||I(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):F(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||I(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):F(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);I(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&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);I(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||I(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||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||I(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):F(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||I(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):F(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return P(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<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:U(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+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 W(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(8))},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){var n=r(0),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.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},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.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 s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(498).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}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<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=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<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=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,s=o%n,a=Math.min(o,o-s)+r,c=0,l=r;l<a;l+=n)c=u(t,l,l+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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 f(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,h=67108863&u,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;l+=(s=(i=0|t.words[d])*(o=0|e.words[p])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|l}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,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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 f=l[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+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!==s),this.toArrayLike(s,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 s,a,u="le"===e,c=new t(o),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],h=8191&l,f=l>>>13,p=0|s[1],d=8191&p,g=p>>>13,y=0|s[2],m=8191&y,b=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],E=8191&M,A=M>>>13,B=0|s[5],T=8191&B,R=B>>>13,x=0|s[6],S=8191&x,k=x>>>13,C=0|s[7],I=8191&C,j=C>>>13,F=0|s[8],O=8191&F,P=F>>>13,L=0|s[9],N=8191&L,D=L>>>13,U=0|a[0],W=8191&U,q=U>>>13,z=0|a[1],G=8191&z,H=z>>>13,V=0|a[2],K=8191&V,$=V>>>13,Y=0|a[3],Z=8191&Y,J=Y>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191&lt,ft=lt>>>13,pt=0|a[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(h,W))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,W)|0))<<13)|0;c=((o=Math.imul(f,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,W),i=(i=Math.imul(d,q))+Math.imul(g,W)|0,o=Math.imul(g,q);var mt=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(f,G)|0))<<13)|0;c=((o=o+Math.imul(f,H)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,W),i=(i=Math.imul(m,q))+Math.imul(b,W)|0,o=Math.imul(b,q),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,H)|0;var bt=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,W),i=(i=Math.imul(w,q))+Math.imul(_,W)|0,o=Math.imul(_,q),n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(d,K)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,$)|0;var vt=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(f,Z)|0))<<13)|0;c=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,W),i=(i=Math.imul(E,q))+Math.imul(A,W)|0,o=Math.imul(A,q),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,$)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,J)|0;var wt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,W),i=(i=Math.imul(T,q))+Math.imul(R,W)|0,o=Math.imul(R,q),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(S,W),i=(i=Math.imul(S,q))+Math.imul(k,W)|0,o=Math.imul(k,q),n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var Mt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;c=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,W),i=(i=Math.imul(I,q))+Math.imul(j,W)|0,o=Math.imul(j,q),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Et=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(f,ut)|0))<<13)|0;c=((o=o+Math.imul(f,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,q))+Math.imul(P,W)|0,o=Math.imul(P,q),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var At=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,q))+Math.imul(D,W)|0,o=Math.imul(D,q),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,ft)|0;var Bt=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,G),i=(i=Math.imul(N,H))+Math.imul(D,G)|0,o=Math.imul(D,H),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ft)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,$))+Math.imul(D,K)|0,o=Math.imul(D,$),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var Rt=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(b,dt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,ft)|0;var xt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ft)|0;var St=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(A,dt)|0))<<13)|0;c=((o=o+Math.imul(A,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var kt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,ft)|0;var Ct=(c+(n=n+Math.imul(S,dt)|0)|0)+((8191&(i=(i=i+Math.imul(S,gt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,ft)|0;var It=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(j,dt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,ft))+Math.imul(D,ht)|0,o=Math.imul(D,ft);var jt=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(P,dt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Ft=(c+(n=Math.imul(N,dt))|0)+((8191&(i=(i=Math.imul(N,gt))+Math.imul(D,dt)|0))<<13)|0;return c=((o=Math.imul(D,gt))+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,u[0]=yt,u[1]=mt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=At,u[9]=Bt,u[10]=Tt,u[11]=Rt,u[12]=xt,u[13]=St,u[14]=kt,u[15]=Ct,u[16]=It,u[17]=jt,u[18]=Ft,0!==c&&(u[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(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<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=u,f=c,p=0;p<s;p++){var d=r[l+p],g=n[l+p],y=r[l+p+s],m=n[l+p+s],b=h*y-f*m;m=h*m+f*y,y=b,r[l+p]=d+y,n[l+p]=g+m,r[l+p+s]=d-y,n[l+p+s]=g-m,p!==a&&(b=u*h-c*f,f=u*f+c*h,h=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,h,n,i);for(var p=0;p<n;p++){var d=a[p]*l[p]-u[p]*h[p];u[p]=a[p]*h[p]+u[p]*l[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=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<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),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<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>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,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||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?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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,s,a},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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=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:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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 y={k256:null,p224:null,p192:null,p25519:null};function m(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(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.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 E(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)}m.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.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=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(b,m),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(v,m),i(w,m),i(_,m),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y<d);var m=this.pow(h,new o(1).iushln(d-y-1));f=f.redMul(m),h=m.redSqr(),p=p.redMul(h),d=y}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var h=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=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 E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.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)},E.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(36)(t))},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){t.exports=r(603)},function(t,e,r){t.exports=r(608)},function(t,e,r){t.exports=r(617)},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,s=Object.prototype,a=Function.prototype,u=o.push,c=o.slice,l=s.toString,h=s.hasOwnProperty,f=Array.isArray,p=Object.keys,d=a.bind,g=Object.create,y=function(){},m=function(t){return t instanceof m?t:this instanceof m?void(this._wrapped=t):new m(t)};void 0!==t&&t.exports&&(e=t.exports=m),e._=m,m.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)}},v=function(t,e,r){return null==t?m.identity:m.isFunction(t)?b(t,e,r):m.isObject(t)?m.matcher(t):m.property(t)};m.iteratee=function(t,e){return v(t,e,1/0)};var w=function(t,e){return function(r){var n=arguments.length;if(n<2||null==r)return r;for(var i=1;i<n;i++)for(var o=arguments[i],s=t(o),a=s.length,u=0;u<a;u++){var c=s[u];e&&void 0!==r[c]||(r[c]=o[c])}return r}},_=function(t){if(!m.isObject(t))return{};if(g)return g(t);y.prototype=t;var e=new y;return y.prototype=null,e},M=function(t){return function(e){return null==e?void 0:e[t]}},E=Math.pow(2,53)-1,A=M("length"),B=function(t){var e=A(t);return"number"==typeof e&&e>=0&&e<=E};function T(t){return function(e,r,n,i){r=b(r,i,4);var o=!B(e)&&m.keys(e),s=(o||e).length,a=t>0?0:s-1;return arguments.length<3&&(n=e[o?o[a]:a],a+=t),function(e,r,n,i,o,s){for(;o>=0&&o<s;o+=t){var a=i?i[o]:o;n=r(n,e[a],a,e)}return n}(e,r,n,o,a,s)}}m.each=m.forEach=function(t,e,r){var n,i;if(e=b(e,r),B(t))for(n=0,i=t.length;n<i;n++)e(t[n],n,t);else{var o=m.keys(t);for(n=0,i=o.length;n<i;n++)e(t[o[n]],o[n],t)}return t},m.map=m.collect=function(t,e,r){e=v(e,r);for(var n=!B(t)&&m.keys(t),i=(n||t).length,o=Array(i),s=0;s<i;s++){var a=n?n[s]:s;o[s]=e(t[a],a,t)}return o},m.reduce=m.foldl=m.inject=T(1),m.reduceRight=m.foldr=T(-1),m.find=m.detect=function(t,e,r){var n;if(void 0!==(n=B(t)?m.findIndex(t,e,r):m.findKey(t,e,r))&&-1!==n)return t[n]},m.filter=m.select=function(t,e,r){var n=[];return e=v(e,r),m.each(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n},m.reject=function(t,e,r){return m.filter(t,m.negate(v(e)),r)},m.every=m.all=function(t,e,r){e=v(e,r);for(var n=!B(t)&&m.keys(t),i=(n||t).length,o=0;o<i;o++){var s=n?n[o]:o;if(!e(t[s],s,t))return!1}return!0},m.some=m.any=function(t,e,r){e=v(e,r);for(var n=!B(t)&&m.keys(t),i=(n||t).length,o=0;o<i;o++){var s=n?n[o]:o;if(e(t[s],s,t))return!0}return!1},m.contains=m.includes=m.include=function(t,e,r,n){return B(t)||(t=m.values(t)),("number"!=typeof r||n)&&(r=0),m.indexOf(t,e,r)>=0},m.invoke=function(t,e){var r=c.call(arguments,2),n=m.isFunction(e);return m.map(t,function(t){var i=n?e:t[e];return null==i?i:i.apply(t,r)})},m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,r){var n,i,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var a=0,u=(t=B(t)?t:m.values(t)).length;a<u;a++)(n=t[a])>o&&(o=n);else e=v(e,r),m.each(t,function(t,r,n){((i=e(t,r,n))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)});return o},m.min=function(t,e,r){var n,i,o=1/0,s=1/0;if(null==e&&null!=t)for(var a=0,u=(t=B(t)?t:m.values(t)).length;a<u;a++)(n=t[a])<o&&(o=n);else e=v(e,r),m.each(t,function(t,r,n){((i=e(t,r,n))<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},m.shuffle=function(t){for(var e,r=B(t)?t:m.values(t),n=r.length,i=Array(n),o=0;o<n;o++)(e=m.random(0,o))!==o&&(i[o]=i[e]),i[e]=r[o];return i},m.sample=function(t,e,r){return null==e||r?(B(t)||(t=m.values(t)),t[m.random(t.length-1)]):m.shuffle(t).slice(0,Math.max(0,e))},m.sortBy=function(t,e,r){return e=v(e,r),m.pluck(m.map(t,function(t,r,n){return{value:t,index:r,criteria:e(t,r,n)}}).sort(function(t,e){var r=t.criteria,n=e.criteria;if(r!==n){if(r>n||void 0===r)return 1;if(r<n||void 0===n)return-1}return t.index-e.index}),"value")};var R=function(t){return function(e,r,n){var i={};return r=v(r,n),m.each(e,function(n,o){var s=r(n,o,e);t(i,n,s)}),i}};m.groupBy=R(function(t,e,r){m.has(t,r)?t[r].push(e):t[r]=[e]}),m.indexBy=R(function(t,e,r){t[r]=e}),m.countBy=R(function(t,e,r){m.has(t,r)?t[r]++:t[r]=1}),m.toArray=function(t){return t?m.isArray(t)?c.call(t):B(t)?m.map(t,m.identity):m.values(t):[]},m.size=function(t){return null==t?0:B(t)?t.length:m.keys(t).length},m.partition=function(t,e,r){e=v(e,r);var n=[],i=[];return m.each(t,function(t,r,o){(e(t,r,o)?n:i).push(t)}),[n,i]},m.first=m.head=m.take=function(t,e,r){if(null!=t)return null==e||r?t[0]:m.initial(t,t.length-e)},m.initial=function(t,e,r){return c.call(t,0,Math.max(0,t.length-(null==e||r?1:e)))},m.last=function(t,e,r){if(null!=t)return null==e||r?t[t.length-1]:m.rest(t,Math.max(0,t.length-e))},m.rest=m.tail=m.drop=function(t,e,r){return c.call(t,null==e||r?1:e)},m.compact=function(t){return m.filter(t,m.identity)};var x=function(t,e,r,n){for(var i=[],o=0,s=n||0,a=A(t);s<a;s++){var u=t[s];if(B(u)&&(m.isArray(u)||m.isArguments(u))){e||(u=x(u,e,r));var c=0,l=u.length;for(i.length+=l;c<l;)i[o++]=u[c++]}else r||(i[o++]=u)}return i};function S(t){return function(e,r,n){r=v(r,n);for(var i=A(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(r(e[o],o,e))return o;return-1}}function k(t,e,r){return function(n,i,o){var s=0,a=A(n);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(r&&o&&a)return n[o=r(n,i)]===i?o:-1;if(i!=i)return(o=e(c.call(n,s,a),m.isNaN))>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o<a;o+=t)if(n[o]===i)return o;return-1}}m.flatten=function(t,e){return x(t,e,!1)},m.without=function(t){return m.difference(t,c.call(arguments,1))},m.uniq=m.unique=function(t,e,r,n){m.isBoolean(e)||(n=r,r=e,e=!1),null!=r&&(r=v(r,n));for(var i=[],o=[],s=0,a=A(t);s<a;s++){var u=t[s],c=r?r(u,s,t):u;e?(s&&o===c||i.push(u),o=c):r?m.contains(o,c)||(o.push(c),i.push(u)):m.contains(i,u)||i.push(u)}return i},m.union=function(){return m.uniq(x(arguments,!0,!0))},m.intersection=function(t){for(var e=[],r=arguments.length,n=0,i=A(t);n<i;n++){var o=t[n];if(!m.contains(e,o)){for(var s=1;s<r&&m.contains(arguments[s],o);s++);s===r&&e.push(o)}}return e},m.difference=function(t){var e=x(arguments,!0,!0,1);return m.filter(t,function(t){return!m.contains(e,t)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(t){for(var e=t&&m.max(t,A).length||0,r=Array(e),n=0;n<e;n++)r[n]=m.pluck(t,n);return r},m.object=function(t,e){for(var r={},n=0,i=A(t);n<i;n++)e?r[t[n]]=e[n]:r[t[n][0]]=t[n][1];return r},m.findIndex=S(1),m.findLastIndex=S(-1),m.sortedIndex=function(t,e,r,n){for(var i=(r=v(r,n,1))(e),o=0,s=A(t);o<s;){var a=Math.floor((o+s)/2);r(t[a])<i?o=a+1:s=a}return o},m.indexOf=k(1,m.findIndex,m.sortedIndex),m.lastIndexOf=k(-1,m.findLastIndex),m.range=function(t,e,r){null==e&&(e=t||0,t=0),r=r||1;for(var n=Math.max(Math.ceil((e-t)/r),0),i=Array(n),o=0;o<n;o++,t+=r)i[o]=t;return i};var C=function(t,e,r,n,i){if(!(n instanceof e))return t.apply(r,i);var o=_(t.prototype),s=t.apply(o,i);return m.isObject(s)?s:o};m.bind=function(t,e){if(d&&t.bind===d)return d.apply(t,c.call(arguments,1));if(!m.isFunction(t))throw new TypeError("Bind must be called on a function");var r=c.call(arguments,2),n=function(){return C(t,n,e,this,r.concat(c.call(arguments)))};return n},m.partial=function(t){var e=c.call(arguments,1),r=function(){for(var n=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===m?arguments[n++]:e[s];for(;n<arguments.length;)o.push(arguments[n++]);return C(t,r,this,this,o)};return r},m.bindAll=function(t){var e,r,n=arguments.length;if(n<=1)throw new Error("bindAll must be passed function names");for(e=1;e<n;e++)t[r=arguments[e]]=m.bind(t[r],t);return t},m.memoize=function(t,e){var r=function(n){var i=r.cache,o=""+(e?e.apply(this,arguments):n);return m.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return r.cache={},r},m.delay=function(t,e){var r=c.call(arguments,2);return setTimeout(function(){return t.apply(null,r)},e)},m.defer=m.partial(m.delay,m,1),m.throttle=function(t,e,r){var n,i,o,s=null,a=0;r||(r={});var u=function(){a=!1===r.leading?0:m.now(),s=null,o=t.apply(n,i),s||(n=i=null)};return function(){var c=m.now();a||!1!==r.leading||(a=c);var l=e-(c-a);return n=this,i=arguments,l<=0||l>e?(s&&(clearTimeout(s),s=null),a=c,o=t.apply(n,i),s||(n=i=null)):s||!1===r.trailing||(s=setTimeout(u,l)),o}},m.debounce=function(t,e,r){var n,i,o,s,a,u=function(){var c=m.now()-s;c<e&&c>=0?n=setTimeout(u,e-c):(n=null,r||(a=t.apply(o,i),n||(o=i=null)))};return function(){o=this,i=arguments,s=m.now();var c=r&&!n;return n||(n=setTimeout(u,e)),c&&(a=t.apply(o,i),o=i=null),a}},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.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}},m.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},m.before=function(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}},m.once=m.partial(m.before,2);var I=!{toString:null}.propertyIsEnumerable("toString"),j=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function F(t,e){var r=j.length,n=t.constructor,i=m.isFunction(n)&&n.prototype||s,o="constructor";for(m.has(t,o)&&!m.contains(e,o)&&e.push(o);r--;)(o=j[r])in t&&t[o]!==i[o]&&!m.contains(e,o)&&e.push(o)}m.keys=function(t){if(!m.isObject(t))return[];if(p)return p(t);var e=[];for(var r in t)m.has(t,r)&&e.push(r);return I&&F(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var r in t)e.push(r);return I&&F(t,e),e},m.values=function(t){for(var e=m.keys(t),r=e.length,n=Array(r),i=0;i<r;i++)n[i]=t[e[i]];return n},m.mapObject=function(t,e,r){e=v(e,r);for(var n,i=m.keys(t),o=i.length,s={},a=0;a<o;a++)s[n=i[a]]=e(t[n],n,t);return s},m.pairs=function(t){for(var e=m.keys(t),r=e.length,n=Array(r),i=0;i<r;i++)n[i]=[e[i],t[e[i]]];return n},m.invert=function(t){for(var e={},r=m.keys(t),n=0,i=r.length;n<i;n++)e[t[r[n]]]=r[n];return e},m.functions=m.methods=function(t){var e=[];for(var r in t)m.isFunction(t[r])&&e.push(r);return e.sort()},m.extend=w(m.allKeys),m.extendOwn=m.assign=w(m.keys),m.findKey=function(t,e,r){e=v(e,r);for(var n,i=m.keys(t),o=0,s=i.length;o<s;o++)if(e(t[n=i[o]],n,t))return n},m.pick=function(t,e,r){var n,i,o={},s=t;if(null==s)return o;m.isFunction(e)?(i=m.allKeys(s),n=b(e,r)):(i=x(arguments,!1,!1,1),n=function(t,e,r){return e in r},s=Object(s));for(var a=0,u=i.length;a<u;a++){var c=i[a],l=s[c];n(l,c,s)&&(o[c]=l)}return o},m.omit=function(t,e,r){if(m.isFunction(e))e=m.negate(e);else{var n=m.map(x(arguments,!1,!1,1),String);e=function(t,e){return!m.contains(n,e)}}return m.pick(t,e,r)},m.defaults=w(m.allKeys,!0),m.create=function(t,e){var r=_(t);return e&&m.extendOwn(r,e),r},m.clone=function(t){return m.isObject(t)?m.isArray(t)?t.slice():m.extend({},t):t},m.tap=function(t,e){return e(t),t},m.isMatch=function(t,e){var r=m.keys(e),n=r.length;if(null==t)return!n;for(var i=Object(t),o=0;o<n;o++){var s=r[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};var O=function(t,e,r,n){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof m&&(t=t._wrapped),e instanceof m&&(e=e._wrapped);var i=l.call(t);if(i!==l.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var s=t.constructor,a=e.constructor;if(s!==a&&!(m.isFunction(s)&&s instanceof s&&m.isFunction(a)&&a instanceof a)&&"constructor"in t&&"constructor"in e)return!1}r=r||[],n=n||[];for(var u=r.length;u--;)if(r[u]===t)return n[u]===e;if(r.push(t),n.push(e),o){if((u=t.length)!==e.length)return!1;for(;u--;)if(!O(t[u],e[u],r,n))return!1}else{var c,h=m.keys(t);if(u=h.length,m.keys(e).length!==u)return!1;for(;u--;)if(c=h[u],!m.has(e,c)||!O(t[c],e[c],r,n))return!1}return r.pop(),n.pop(),!0};m.isEqual=function(t,e){return O(t,e)},m.isEmpty=function(t){return null==t||(B(t)&&(m.isArray(t)||m.isString(t)||m.isArguments(t))?0===t.length:0===m.keys(t).length)},m.isElement=function(t){return!(!t||1!==t.nodeType)},m.isArray=f||function(t){return"[object Array]"===l.call(t)},m.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){m["is"+t]=function(e){return l.call(e)==="[object "+t+"]"}}),m.isArguments(arguments)||(m.isArguments=function(t){return m.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(t){return"function"==typeof t||!1}),m.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},m.isNaN=function(t){return m.isNumber(t)&&t!==+t},m.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===l.call(t)},m.isNull=function(t){return null===t},m.isUndefined=function(t){return void 0===t},m.has=function(t,e){return null!=t&&h.call(t,e)},m.noConflict=function(){return r._=i,this},m.identity=function(t){return t},m.constant=function(t){return function(){return t}},m.noop=function(){},m.property=M,m.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},m.matcher=m.matches=function(t){return t=m.extendOwn({},t),function(e){return m.isMatch(e,t)}},m.times=function(t,e,r){var n=Array(Math.max(0,t));e=b(e,r,1);for(var i=0;i<t;i++)n[i]=e(i);return n},m.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},m.now=Date.now||function(){return(new Date).getTime()};var P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},L=m.invert(P),N=function(t){var e=function(e){return t[e]},r="(?:"+m.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}};m.escape=N(P),m.unescape=N(L),m.result=function(t,e,r){var n=null==t?void 0:t[e];return void 0===n&&(n=r),m.isFunction(n)?n.call(t):n};var D=0;m.uniqueId=function(t){var e=++D+"";return t?t+e:e},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var U=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g,z=function(t){return"\\"+W[t]};m.template=function(t,e,r){!e&&r&&(e=r),e=m.defaults({},e,m.templateSettings);var n=RegExp([(e.escape||U).source,(e.interpolate||U).source,(e.evaluate||U).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(n,function(e,r,n,s,a){return o+=t.slice(i,a).replace(q,z),i=a+e.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\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 s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return s.call(this,t,m)},u=e.variable||"obj";return a.source="function("+u+"){\n"+o+"}",a},m.chain=function(t){var e=m(t);return e._chain=!0,e};var G=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){m.each(m.functions(t),function(e){var r=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return u.apply(t,arguments),G(this,r.apply(m,t))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];m.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)}}),m.each(["concat","join","slice"],function(t){var e=o[t];m.prototype[t]=function(){return G(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},void 0===(n=function(){return m}.apply(e,[]))||(t.exports=n)}).call(this)},function(t,e,r){"use strict";var n=e;n.version=r(454).version,n.utils=r(453),n.rand=r(207),n.curve=r(84),n.curves=r(447),n.ec=r(439),n.eddsa=r(435)},function(t,e){var r=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=r)},function(t,e,r){"use strict";var n=r(426),i=r(425);t.exports={errors:n,formatters:i}},function(t,e){var r=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=r)},function(t,e,r){"use strict";var n=r(41),i=n,o=Function("return this")();i.exportSymbol("proto.Address",null,o),i.exportSymbol("proto.BigUInt",null,o),i.exportSymbol("proto.CallTx",null,o),i.exportSymbol("proto.ContractMethodCall",null,o),i.exportSymbol("proto.DeployResponse",null,o),i.exportSymbol("proto.DeployResponseData",null,o),i.exportSymbol("proto.DeployTx",null,o),i.exportSymbol("proto.EncodingType",null,o),i.exportSymbol("proto.MessageTx",null,o),i.exportSymbol("proto.NonceTx",null,o),i.exportSymbol("proto.PluginCode",null,o),i.exportSymbol("proto.Request",null,o),i.exportSymbol("proto.Response",null,o),i.exportSymbol("proto.SignedTx",null,o),i.exportSymbol("proto.Transaction",null,o),i.exportSymbol("proto.VMType",null,o),proto.SignedTx=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.SignedTx,n.Message),i.DEBUG&&!COMPILED&&(proto.SignedTx.displayName="proto.SignedTx"),n.Message.GENERATE_TO_OBJECT&&(proto.SignedTx.prototype.toObject=function(t){return proto.SignedTx.toObject(t,this)},proto.SignedTx.toObject=function(t,e){var r={inner:e.getInner_asB64(),signature:e.getSignature_asB64(),publicKey:e.getPublicKey_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.SignedTx.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.SignedTx;return proto.SignedTx.deserializeBinaryFromReader(r,e)},proto.SignedTx.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.setInner(r);break;case 2:r=e.readBytes();t.setSignature(r);break;case 3:r=e.readBytes();t.setPublicKey(r);break;default:e.skipField()}}return t},proto.SignedTx.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.SignedTx.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.SignedTx.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getInner_asU8()).length>0&&e.writeBytes(1,r),(r=t.getSignature_asU8()).length>0&&e.writeBytes(2,r),(r=t.getPublicKey_asU8()).length>0&&e.writeBytes(3,r)},proto.SignedTx.prototype.getInner=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.SignedTx.prototype.getInner_asB64=function(){return n.Message.bytesAsB64(this.getInner())},proto.SignedTx.prototype.getInner_asU8=function(){return n.Message.bytesAsU8(this.getInner())},proto.SignedTx.prototype.setInner=function(t){n.Message.setProto3BytesField(this,1,t)},proto.SignedTx.prototype.getSignature=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.SignedTx.prototype.getSignature_asB64=function(){return n.Message.bytesAsB64(this.getSignature())},proto.SignedTx.prototype.getSignature_asU8=function(){return n.Message.bytesAsU8(this.getSignature())},proto.SignedTx.prototype.setSignature=function(t){n.Message.setProto3BytesField(this,2,t)},proto.SignedTx.prototype.getPublicKey=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.SignedTx.prototype.getPublicKey_asB64=function(){return n.Message.bytesAsB64(this.getPublicKey())},proto.SignedTx.prototype.getPublicKey_asU8=function(){return n.Message.bytesAsU8(this.getPublicKey())},proto.SignedTx.prototype.setPublicKey=function(t){n.Message.setProto3BytesField(this,3,t)},proto.NonceTx=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.NonceTx,n.Message),i.DEBUG&&!COMPILED&&(proto.NonceTx.displayName="proto.NonceTx"),n.Message.GENERATE_TO_OBJECT&&(proto.NonceTx.prototype.toObject=function(t){return proto.NonceTx.toObject(t,this)},proto.NonceTx.toObject=function(t,e){var r={inner:e.getInner_asB64(),sequence:n.Message.getFieldWithDefault(e,2,0)};return t&&(r.$jspbMessageInstance=e),r}),proto.NonceTx.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.NonceTx;return proto.NonceTx.deserializeBinaryFromReader(r,e)},proto.NonceTx.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.setInner(r);break;case 2:r=e.readUint64();t.setSequence(r);break;default:e.skipField()}}return t},proto.NonceTx.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.NonceTx.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.NonceTx.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getInner_asU8()).length>0&&e.writeBytes(1,r),0!==(r=t.getSequence())&&e.writeUint64(2,r)},proto.NonceTx.prototype.getInner=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.NonceTx.prototype.getInner_asB64=function(){return n.Message.bytesAsB64(this.getInner())},proto.NonceTx.prototype.getInner_asU8=function(){return n.Message.bytesAsU8(this.getInner())},proto.NonceTx.prototype.setInner=function(t){n.Message.setProto3BytesField(this,1,t)},proto.NonceTx.prototype.getSequence=function(){return n.Message.getFieldWithDefault(this,2,0)},proto.NonceTx.prototype.setSequence=function(t){n.Message.setProto3IntField(this,2,t)},proto.BigUInt=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.BigUInt,n.Message),i.DEBUG&&!COMPILED&&(proto.BigUInt.displayName="proto.BigUInt"),n.Message.GENERATE_TO_OBJECT&&(proto.BigUInt.prototype.toObject=function(t){return proto.BigUInt.toObject(t,this)},proto.BigUInt.toObject=function(t,e){var r={value:e.getValue_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.BigUInt.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.BigUInt;return proto.BigUInt.deserializeBinaryFromReader(r,e)},proto.BigUInt.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.setValue(r);break;default:e.skipField()}}return t},proto.BigUInt.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.BigUInt.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.BigUInt.serializeBinaryToWriter=function(t,e){var r;(r=t.getValue_asU8()).length>0&&e.writeBytes(1,r)},proto.BigUInt.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.BigUInt.prototype.getValue_asB64=function(){return n.Message.bytesAsB64(this.getValue())},proto.BigUInt.prototype.getValue_asU8=function(){return n.Message.bytesAsU8(this.getValue())},proto.BigUInt.prototype.setValue=function(t){n.Message.setProto3BytesField(this,1,t)},proto.Address=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.Address,n.Message),i.DEBUG&&!COMPILED&&(proto.Address.displayName="proto.Address"),n.Message.GENERATE_TO_OBJECT&&(proto.Address.prototype.toObject=function(t){return proto.Address.toObject(t,this)},proto.Address.toObject=function(t,e){var r={chainId:n.Message.getFieldWithDefault(e,1,""),local:e.getLocal_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.Address.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.Address;return proto.Address.deserializeBinaryFromReader(r,e)},proto.Address.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readString();t.setChainId(r);break;case 2:r=e.readBytes();t.setLocal(r);break;default:e.skipField()}}return t},proto.Address.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.Address.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.Address.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getChainId()).length>0&&e.writeString(1,r),(r=t.getLocal_asU8()).length>0&&e.writeBytes(2,r)},proto.Address.prototype.getChainId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.Address.prototype.setChainId=function(t){n.Message.setProto3StringField(this,1,t)},proto.Address.prototype.getLocal=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.Address.prototype.getLocal_asB64=function(){return n.Message.bytesAsB64(this.getLocal())},proto.Address.prototype.getLocal_asU8=function(){return n.Message.bytesAsU8(this.getLocal())},proto.Address.prototype.setLocal=function(t){n.Message.setProto3BytesField(this,2,t)},proto.Transaction=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.Transaction,n.Message),i.DEBUG&&!COMPILED&&(proto.Transaction.displayName="proto.Transaction"),n.Message.GENERATE_TO_OBJECT&&(proto.Transaction.prototype.toObject=function(t){return proto.Transaction.toObject(t,this)},proto.Transaction.toObject=function(t,e){var r={id:n.Message.getFieldWithDefault(e,1,0),data:e.getData_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.Transaction.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.Transaction;return proto.Transaction.deserializeBinaryFromReader(r,e)},proto.Transaction.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readUint32();t.setId(r);break;case 2:r=e.readBytes();t.setData(r);break;default:e.skipField()}}return t},proto.Transaction.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.Transaction.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.Transaction.serializeBinaryToWriter=function(t,e){var r=void 0;0!==(r=t.getId())&&e.writeUint32(1,r),(r=t.getData_asU8()).length>0&&e.writeBytes(2,r)},proto.Transaction.prototype.getId=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.Transaction.prototype.setId=function(t){n.Message.setProto3IntField(this,1,t)},proto.Transaction.prototype.getData=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.Transaction.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},proto.Transaction.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},proto.Transaction.prototype.setData=function(t){n.Message.setProto3BytesField(this,2,t)},proto.MessageTx=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.MessageTx,n.Message),i.DEBUG&&!COMPILED&&(proto.MessageTx.displayName="proto.MessageTx"),n.Message.GENERATE_TO_OBJECT&&(proto.MessageTx.prototype.toObject=function(t){return proto.MessageTx.toObject(t,this)},proto.MessageTx.toObject=function(t,e){var r,n={to:(r=e.getTo())&&proto.Address.toObject(t,r),from:(r=e.getFrom())&&proto.Address.toObject(t,r),data:e.getData_asB64()};return t&&(n.$jspbMessageInstance=e),n}),proto.MessageTx.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.MessageTx;return proto.MessageTx.deserializeBinaryFromReader(r,e)},proto.MessageTx.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.Address;e.readMessage(r,proto.Address.deserializeBinaryFromReader),t.setTo(r);break;case 2:r=new proto.Address;e.readMessage(r,proto.Address.deserializeBinaryFromReader),t.setFrom(r);break;case 3:r=e.readBytes();t.setData(r);break;default:e.skipField()}}return t},proto.MessageTx.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.MessageTx.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.MessageTx.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getTo())&&e.writeMessage(1,r,proto.Address.serializeBinaryToWriter),null!=(r=t.getFrom())&&e.writeMessage(2,r,proto.Address.serializeBinaryToWriter),(r=t.getData_asU8()).length>0&&e.writeBytes(3,r)},proto.MessageTx.prototype.getTo=function(){return n.Message.getWrapperField(this,proto.Address,1)},proto.MessageTx.prototype.setTo=function(t){n.Message.setWrapperField(this,1,t)},proto.MessageTx.prototype.clearTo=function(){this.setTo(void 0)},proto.MessageTx.prototype.hasTo=function(){return null!=n.Message.getField(this,1)},proto.MessageTx.prototype.getFrom=function(){return n.Message.getWrapperField(this,proto.Address,2)},proto.MessageTx.prototype.setFrom=function(t){n.Message.setWrapperField(this,2,t)},proto.MessageTx.prototype.clearFrom=function(){this.setFrom(void 0)},proto.MessageTx.prototype.hasFrom=function(){return null!=n.Message.getField(this,2)},proto.MessageTx.prototype.getData=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.MessageTx.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},proto.MessageTx.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},proto.MessageTx.prototype.setData=function(t){n.Message.setProto3BytesField(this,3,t)},proto.DeployTx=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.DeployTx,n.Message),i.DEBUG&&!COMPILED&&(proto.DeployTx.displayName="proto.DeployTx"),n.Message.GENERATE_TO_OBJECT&&(proto.DeployTx.prototype.toObject=function(t){return proto.DeployTx.toObject(t,this)},proto.DeployTx.toObject=function(t,e){var r={vmType:n.Message.getFieldWithDefault(e,1,0),code:e.getCode_asB64(),name:n.Message.getFieldWithDefault(e,3,"")};return t&&(r.$jspbMessageInstance=e),r}),proto.DeployTx.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.DeployTx;return proto.DeployTx.deserializeBinaryFromReader(r,e)},proto.DeployTx.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readEnum();t.setVmType(r);break;case 2:r=e.readBytes();t.setCode(r);break;case 3:r=e.readString();t.setName(r);break;default:e.skipField()}}return t},proto.DeployTx.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.DeployTx.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.DeployTx.serializeBinaryToWriter=function(t,e){var r=void 0;0!==(r=t.getVmType())&&e.writeEnum(1,r),(r=t.getCode_asU8()).length>0&&e.writeBytes(2,r),(r=t.getName()).length>0&&e.writeString(3,r)},proto.DeployTx.prototype.getVmType=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.DeployTx.prototype.setVmType=function(t){n.Message.setProto3EnumField(this,1,t)},proto.DeployTx.prototype.getCode=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.DeployTx.prototype.getCode_asB64=function(){return n.Message.bytesAsB64(this.getCode())},proto.DeployTx.prototype.getCode_asU8=function(){return n.Message.bytesAsU8(this.getCode())},proto.DeployTx.prototype.setCode=function(t){n.Message.setProto3BytesField(this,2,t)},proto.DeployTx.prototype.getName=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.DeployTx.prototype.setName=function(t){n.Message.setProto3StringField(this,3,t)},proto.DeployResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.DeployResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.DeployResponse.displayName="proto.DeployResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.DeployResponse.prototype.toObject=function(t){return proto.DeployResponse.toObject(t,this)},proto.DeployResponse.toObject=function(t,e){var r,n={contract:(r=e.getContract())&&proto.Address.toObject(t,r),output:e.getOutput_asB64()};return t&&(n.$jspbMessageInstance=e),n}),proto.DeployResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.DeployResponse;return proto.DeployResponse.deserializeBinaryFromReader(r,e)},proto.DeployResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.Address;e.readMessage(r,proto.Address.deserializeBinaryFromReader),t.setContract(r);break;case 2:r=e.readBytes();t.setOutput(r);break;default:e.skipField()}}return t},proto.DeployResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.DeployResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.DeployResponse.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getContract())&&e.writeMessage(1,r,proto.Address.serializeBinaryToWriter),(r=t.getOutput_asU8()).length>0&&e.writeBytes(2,r)},proto.DeployResponse.prototype.getContract=function(){return n.Message.getWrapperField(this,proto.Address,1)},proto.DeployResponse.prototype.setContract=function(t){n.Message.setWrapperField(this,1,t)},proto.DeployResponse.prototype.clearContract=function(){this.setContract(void 0)},proto.DeployResponse.prototype.hasContract=function(){return null!=n.Message.getField(this,1)},proto.DeployResponse.prototype.getOutput=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.DeployResponse.prototype.getOutput_asB64=function(){return n.Message.bytesAsB64(this.getOutput())},proto.DeployResponse.prototype.getOutput_asU8=function(){return n.Message.bytesAsU8(this.getOutput())},proto.DeployResponse.prototype.setOutput=function(t){n.Message.setProto3BytesField(this,2,t)},proto.DeployResponseData=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.DeployResponseData,n.Message),i.DEBUG&&!COMPILED&&(proto.DeployResponseData.displayName="proto.DeployResponseData"),n.Message.GENERATE_TO_OBJECT&&(proto.DeployResponseData.prototype.toObject=function(t){return proto.DeployResponseData.toObject(t,this)},proto.DeployResponseData.toObject=function(t,e){var r={txHash:e.getTxHash_asB64(),bytecode:e.getBytecode_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.DeployResponseData.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.DeployResponseData;return proto.DeployResponseData.deserializeBinaryFromReader(r,e)},proto.DeployResponseData.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.setTxHash(r);break;case 2:r=e.readBytes();t.setBytecode(r);break;default:e.skipField()}}return t},proto.DeployResponseData.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.DeployResponseData.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.DeployResponseData.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getTxHash_asU8()).length>0&&e.writeBytes(1,r),(r=t.getBytecode_asU8()).length>0&&e.writeBytes(2,r)},proto.DeployResponseData.prototype.getTxHash=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.DeployResponseData.prototype.getTxHash_asB64=function(){return n.Message.bytesAsB64(this.getTxHash())},proto.DeployResponseData.prototype.getTxHash_asU8=function(){return n.Message.bytesAsU8(this.getTxHash())},proto.DeployResponseData.prototype.setTxHash=function(t){n.Message.setProto3BytesField(this,1,t)},proto.DeployResponseData.prototype.getBytecode=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.DeployResponseData.prototype.getBytecode_asB64=function(){return n.Message.bytesAsB64(this.getBytecode())},proto.DeployResponseData.prototype.getBytecode_asU8=function(){return n.Message.bytesAsU8(this.getBytecode())},proto.DeployResponseData.prototype.setBytecode=function(t){n.Message.setProto3BytesField(this,2,t)},proto.CallTx=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.CallTx,n.Message),i.DEBUG&&!COMPILED&&(proto.CallTx.displayName="proto.CallTx"),n.Message.GENERATE_TO_OBJECT&&(proto.CallTx.prototype.toObject=function(t){return proto.CallTx.toObject(t,this)},proto.CallTx.toObject=function(t,e){var r={vmType:n.Message.getFieldWithDefault(e,1,0),input:e.getInput_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.CallTx.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.CallTx;return proto.CallTx.deserializeBinaryFromReader(r,e)},proto.CallTx.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readEnum();t.setVmType(r);break;case 2:r=e.readBytes();t.setInput(r);break;default:e.skipField()}}return t},proto.CallTx.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.CallTx.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.CallTx.serializeBinaryToWriter=function(t,e){var r=void 0;0!==(r=t.getVmType())&&e.writeEnum(1,r),(r=t.getInput_asU8()).length>0&&e.writeBytes(2,r)},proto.CallTx.prototype.getVmType=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.CallTx.prototype.setVmType=function(t){n.Message.setProto3EnumField(this,1,t)},proto.CallTx.prototype.getInput=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.CallTx.prototype.getInput_asB64=function(){return n.Message.bytesAsB64(this.getInput())},proto.CallTx.prototype.getInput_asU8=function(){return n.Message.bytesAsU8(this.getInput())},proto.CallTx.prototype.setInput=function(t){n.Message.setProto3BytesField(this,2,t)},proto.PluginCode=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.PluginCode,n.Message),i.DEBUG&&!COMPILED&&(proto.PluginCode.displayName="proto.PluginCode"),n.Message.GENERATE_TO_OBJECT&&(proto.PluginCode.prototype.toObject=function(t){return proto.PluginCode.toObject(t,this)},proto.PluginCode.toObject=function(t,e){var r={name:n.Message.getFieldWithDefault(e,1,""),input:e.getInput_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.PluginCode.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.PluginCode;return proto.PluginCode.deserializeBinaryFromReader(r,e)},proto.PluginCode.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readString();t.setName(r);break;case 2:r=e.readBytes();t.setInput(r);break;default:e.skipField()}}return t},proto.PluginCode.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.PluginCode.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.PluginCode.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getName()).length>0&&e.writeString(1,r),(r=t.getInput_asU8()).length>0&&e.writeBytes(2,r)},proto.PluginCode.prototype.getName=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.PluginCode.prototype.setName=function(t){n.Message.setProto3StringField(this,1,t)},proto.PluginCode.prototype.getInput=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.PluginCode.prototype.getInput_asB64=function(){return n.Message.bytesAsB64(this.getInput())},proto.PluginCode.prototype.getInput_asU8=function(){return n.Message.bytesAsU8(this.getInput())},proto.PluginCode.prototype.setInput=function(t){n.Message.setProto3BytesField(this,2,t)},proto.Request=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.Request,n.Message),i.DEBUG&&!COMPILED&&(proto.Request.displayName="proto.Request"),n.Message.GENERATE_TO_OBJECT&&(proto.Request.prototype.toObject=function(t){return proto.Request.toObject(t,this)},proto.Request.toObject=function(t,e){var r={contentType:n.Message.getFieldWithDefault(e,1,0),accept:n.Message.getFieldWithDefault(e,2,0),body:e.getBody_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.Request.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.Request;return proto.Request.deserializeBinaryFromReader(r,e)},proto.Request.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readEnum();t.setContentType(r);break;case 2:r=e.readEnum();t.setAccept(r);break;case 3:r=e.readBytes();t.setBody(r);break;default:e.skipField()}}return t},proto.Request.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.Request.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.Request.serializeBinaryToWriter=function(t,e){var r=void 0;0!==(r=t.getContentType())&&e.writeEnum(1,r),0!==(r=t.getAccept())&&e.writeEnum(2,r),(r=t.getBody_asU8()).length>0&&e.writeBytes(3,r)},proto.Request.prototype.getContentType=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.Request.prototype.setContentType=function(t){n.Message.setProto3EnumField(this,1,t)},proto.Request.prototype.getAccept=function(){return n.Message.getFieldWithDefault(this,2,0)},proto.Request.prototype.setAccept=function(t){n.Message.setProto3EnumField(this,2,t)},proto.Request.prototype.getBody=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.Request.prototype.getBody_asB64=function(){return n.Message.bytesAsB64(this.getBody())},proto.Request.prototype.getBody_asU8=function(){return n.Message.bytesAsU8(this.getBody())},proto.Request.prototype.setBody=function(t){n.Message.setProto3BytesField(this,3,t)},proto.Response=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.Response,n.Message),i.DEBUG&&!COMPILED&&(proto.Response.displayName="proto.Response"),n.Message.GENERATE_TO_OBJECT&&(proto.Response.prototype.toObject=function(t){return proto.Response.toObject(t,this)},proto.Response.toObject=function(t,e){var r={contentType:n.Message.getFieldWithDefault(e,1,0),body:e.getBody_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.Response.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.Response;return proto.Response.deserializeBinaryFromReader(r,e)},proto.Response.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readEnum();t.setContentType(r);break;case 2:r=e.readBytes();t.setBody(r);break;default:e.skipField()}}return t},proto.Response.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.Response.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.Response.serializeBinaryToWriter=function(t,e){var r=void 0;0!==(r=t.getContentType())&&e.writeEnum(1,r),(r=t.getBody_asU8()).length>0&&e.writeBytes(2,r)},proto.Response.prototype.getContentType=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.Response.prototype.setContentType=function(t){n.Message.setProto3EnumField(this,1,t)},proto.Response.prototype.getBody=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.Response.prototype.getBody_asB64=function(){return n.Message.bytesAsB64(this.getBody())},proto.Response.prototype.getBody_asU8=function(){return n.Message.bytesAsU8(this.getBody())},proto.Response.prototype.setBody=function(t){n.Message.setProto3BytesField(this,2,t)},proto.ContractMethodCall=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.ContractMethodCall,n.Message),i.DEBUG&&!COMPILED&&(proto.ContractMethodCall.displayName="proto.ContractMethodCall"),n.Message.GENERATE_TO_OBJECT&&(proto.ContractMethodCall.prototype.toObject=function(t){return proto.ContractMethodCall.toObject(t,this)},proto.ContractMethodCall.toObject=function(t,e){var r={method:n.Message.getFieldWithDefault(e,1,""),args:e.getArgs_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.ContractMethodCall.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ContractMethodCall;return proto.ContractMethodCall.deserializeBinaryFromReader(r,e)},proto.ContractMethodCall.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readString();t.setMethod(r);break;case 2:r=e.readBytes();t.setArgs(r);break;default:e.skipField()}}return t},proto.ContractMethodCall.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ContractMethodCall.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ContractMethodCall.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getMethod()).length>0&&e.writeString(1,r),(r=t.getArgs_asU8()).length>0&&e.writeBytes(2,r)},proto.ContractMethodCall.prototype.getMethod=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.ContractMethodCall.prototype.setMethod=function(t){n.Message.setProto3StringField(this,1,t)},proto.ContractMethodCall.prototype.getArgs=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.ContractMethodCall.prototype.getArgs_asB64=function(){return n.Message.bytesAsB64(this.getArgs())},proto.ContractMethodCall.prototype.getArgs_asU8=function(){return n.Message.bytesAsU8(this.getArgs())},proto.ContractMethodCall.prototype.setArgs=function(t){n.Message.setProto3BytesField(this,2,t)},proto.VMType={PLUGIN:0,EVM:1},proto.EncodingType={JSON:0,PROTOBUF3:1},i.object.extend(e,proto)},function(t,e,r){var n=r(144)("wks"),i=r(98),o=r(16).Symbol,s="function"==typeof o;(t.exports=function(t){return n[t]||(n[t]=s&&o[t]||(s?o:i)("Symbol."+t))}).store=n},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,r){var n=r(125)("wks"),i=r(93),o=r(18).Symbol,s="function"==typeof o;(t.exports=function(t){return n[t]||(n[t]=s&&o[t]||(s?o:i)("Symbol."+t))}).store=n},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,r){var n=r(16),i=r(11),o=r(44),s=r(43),a=r(52),u=function(t,e,r){var c,l,h,f=t&u.F,p=t&u.G,d=t&u.S,g=t&u.P,y=t&u.B,m=t&u.W,b=p?i:i[e]||(i[e]={}),v=b.prototype,w=p?n:d?n[e]:(n[e]||{}).prototype;for(c in p&&(r=e),r)(l=!f&&w&&void 0!==w[c])&&a(b,c)||(h=l?w[c]:r[c],b[c]=p&&"function"!=typeof w[c]?r[c]:y&&l?o(h,n):m&&w[c]==h?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):g&&"function"==typeof h?o(Function.call,h):h,g&&((b.virtual||(b.virtual={}))[c]=h,t&u.R&&v&&!v[c]&&s(v,c,h)))};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,r){"use strict";var n=r(159),i=r(296),o=Object.prototype.toString;function s(t){return"[object Array]"===o.call(t)}function a(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]),s(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:i,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:u,isStream:function(t){return a(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function r(r,n){"object"==typeof e[n]&&"object"==typeof r?e[n]=t(e[n],r):e[n]=r}for(var n=0,i=arguments.length;n<i;n++)c(arguments[n],r);return e},extend:function(t,e,r){return c(e,function(e,i){t[i]=r&&"function"==typeof e?n(e,r):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e,r){var n=r(9),i=r(424),o=r(197),s=r(420),a=r(419),u=function(t){if(!o.isHexStrict(t))throw new Error("The parameter must be a valid HEX string.");var e="",r=0,n=t.length;for("0x"===t.substring(0,2)&&(r=2);r<n;r+=2){var i=parseInt(t.substr(r,2),16);e+=String.fromCharCode(i)}return e},c=function(t){if(!t)return"0x00";for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return"0x"+e},l=function(t){if(t=t?t.toLowerCase():"ether",!i.unitMap[t])throw new Error('This unit "'+t+"\" doesn't exist, please use the one of the following units"+JSON.stringify(i.unitMap,null,2));return t};t.exports={_fireError:function(t,e,r,i){return!n.isObject(t)||t instanceof Error||!t.data||((n.isObject(t.data)||n.isArray(t.data))&&(t.data=JSON.stringify(t.data,null,2)),t=t.message+"\n"+t.data),n.isString(t)&&(t=new Error(t)),n.isFunction(i)&&i(t),n.isFunction(r)&&((e&&n.isFunction(e.listeners)&&e.listeners("error").length||n.isFunction(i))&&e.catch(function(){}),setTimeout(function(){r(t)},1)),e&&n.isFunction(e.emit)&&setTimeout(function(){e.emit("error",t),e.removeAllListeners()},1),e},_jsonInterfaceMethodToString:function(t){if(n.isObject(t)&&t.name&&-1!==t.name.indexOf("("))return t.name;var e=t.inputs.map(function(t){return t.type}).join(",");return t.name+"("+e+")"},randomHex:a,_:n,BN:o.BN,isBN:o.isBN,isBigNumber:o.isBigNumber,isHex:o.isHex,isHexStrict:o.isHexStrict,sha3:o.sha3,keccak256:o.sha3,soliditySha3:s,isAddress:o.isAddress,checkAddressChecksum:o.checkAddressChecksum,toChecksumAddress:function(t){if(void 0===t)return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(t))throw new Error('Given address "'+t+'" is not a valid Ethereum address.');t=t.toLowerCase().replace(/^0x/i,"");for(var e=o.sha3(t).replace(/^0x/i,""),r="0x",n=0;n<t.length;n++)parseInt(e[n],16)>7?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=l(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=l(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){"use strict";(function(t){var n=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(584));function o(e){return t.from(e.buffer,e.byteOffset,e.byteLength).toString("hex").toUpperCase()}e.bytesToHex=o,e.numberToHex=function(t){return"0x"+t.toString(16)},e.hexToNumber=function(t){return parseInt(t,16)},e.bytesToHexAddr=function(t){return"0x"+o(t)},e.getGUID=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},e.SIGNATURE_LENGTH=i.default.sign.signatureLength,e.PRIVATE_KEY_LENGTH=i.default.sign.secretKeyLength,e.PUBLIC_KEY_LENGTH=i.default.sign.publicKeyLength,e.generatePrivateKey=function(){return i.default.sign.keyPair().secretKey},e.publicKeyFromPrivateKey=function(t){return i.default.sign.keyPair.fromSecretKey(t).publicKey},e.sign=function(t,r){return i.default.sign(t,r).slice(0,e.SIGNATURE_LENGTH)},e.Uint8ArrayToB64=function(e){return t.from(e.buffer,e.byteOffset,e.byteLength).toString("base64")},e.B64ToUint8Array=function(e){return t.from(e,"base64")},e.bufferToProtobufBytes=function(e){return e.constructor===t?new Uint8Array(e):e}}).call(this,r(0).Buffer)},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(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:s}catch(t){n=s}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&p())}function p(){if(!l){var t=a(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||l||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var n=r(9),i=r(21),o=r(393),s=r(187),a=function(t){return n.isNumber(t)&&(t=Math.trunc(t)),new s(i.toTwosComplement(t).replace("0x",""))};t.exports={formatInputInt:a,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 s(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 s(a(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 s(a(r).value+e)},formatInputBool:function(t){return new s("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(22),i=r(1);function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function a(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<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=s(t[r].toString(16));return e},e.htonl=o,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=o(i)),r+=a(i.toString(16))}return r},e.zero2=s,e.zero8=a,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,u=e;a<s.length;a++,u+=4){var c;c="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[a]=c>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>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<<e|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,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,c=e;return u+=(c=c+n>>>0)<e?1:0,u+=(c=c+o>>>0)<o?1:0,t+r+i+s+(u+=(c=c+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,c){var l=0,h=e;return l+=(h=h+n>>>0)<e?1:0,l+=(h=h+o>>>0)<o?1:0,l+=(h=h+a>>>0)<a?1:0,t+r+i+s+u+(l+=(h=h+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,c){return e+n+o+a+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,r){t.exports=r(591)},function(t,e,r){t.exports=r(593)},function(t,e,r){var n=r(38);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var n=r(18),i=r(13),o=r(68),s=r(49),a=function(t,e,r){var u,c,l,h=t&a.F,f=t&a.G,p=t&a.S,d=t&a.P,g=t&a.B,y=t&a.W,m=f?i:i[e]||(i[e]={}),b=m.prototype,v=f?n:p?n[e]:(n[e]||{}).prototype;for(u in f&&(r=e),r)(c=!h&&v&&void 0!==v[u])&&u in m||(l=c?v[u]:r[u],m[u]=f&&"function"!=typeof v[u]?r[u]:g&&c?o(l,n):y&&v[u]==l?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):d&&"function"==typeof l?o(Function.call,l):l,d&&((m.virtual||(m.virtual={}))[u]=l,t&a.R&&b&&!b[u]&&s(b,u,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,r){t.exports=!r(53)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(25);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var n=r(33),i=r(265),o=r(148),s=Object.defineProperty;e.f=r(32)?Object.defineProperty:function(t,e,r){if(n(t),e=o(e,!0),n(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(2).Buffer,i=r(58).Transform,o=r(130).StringDecoder;function s(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(1)(s,i),s.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)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.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=s},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){t.exports=!r(67)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var n=r(30),i=r(242),o=r(123),s=Object.defineProperty;e.f=r(37)?Object.defineProperty:function(t,e,r){if(n(t),e=o(e,!0),n(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){"use strict";(function(t){var n=function(t){return t&&t.__esModule?t:{default:t}},i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var o=n(r(95)),s=r(23),a=i(r(14)),u=function(){function e(t){this.bytes=t}return e.prototype.isEmpty=function(){return this.bytes&&0===this.bytes.length},e.prototype.toString=function(){return"0x"+t.from(this.bytes.buffer,this.bytes.byteOffset,this.bytes.byteLength).toString("hex")},e.prototype.equals=function(e){return 0===t.compare(this.bytes,e.bytes)},e.fromHexString=function(r){if(!r.startsWith("0x"))throw new Error("hexAddr argument has no 0x prefix");var n=t.from(r.slice(2),"hex");if(20!==n.length)throw new Error("Invalid local address, expected 20 bytes, got "+n.length);return new e(n)},e.fromPublicKey=function(r){if(32!==r.length)throw new Error("Invalid public key, expected 32 bytes, go "+r.length);var n=new o.default;return n.update(t.from(r.buffer,r.byteOffset,r.byteLength)),new e(n.digest())},e}();e.LocalAddress=u;var c=function(){function t(t,e){this.chainId=t,this.local=e}return t.prototype.isEmpty=function(){return""===this.chainId&&this.local.isEmpty()},t.prototype.toString=function(){return this.chainId+":"+this.local.toString()},t.prototype.MarshalPB=function(){var t=new a.Address;return t.setChainId(this.chainId),t.setLocal(s.bufferToProtobufBytes(this.local.bytes)),t},t.prototype.equals=function(t){return this.chainId===t.chainId&&this.local.equals(t.local)},t.UmarshalPB=function(e){return new t(e.getChainId(),new u(e.getLocal_asU8()))},t.fromString=function(e){var r=e.split(":");if(2!==r.length)throw new Error("Invalid address string");return new t(r[0],u.fromHexString(r[1]))},t}();e.Address=c}).call(this,r(0).Buffer)},function(module,exports,__webpack_require__){(function(global,Buffer){var $jscomp={scope:{},getGlobal:function(t){return"undefined"!=typeof window&&window===t?t:void 0!==global?global:t}};$jscomp.global=$jscomp.getGlobal(this),$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol),$jscomp.initSymbol=function(){}},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(t){return"jscomp_symbol_"+t+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol(),$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),$jscomp.initSymbolIterator=function(){}},$jscomp.makeIterator=function(t){$jscomp.initSymbolIterator(),$jscomp.initSymbol(),$jscomp.initSymbolIterator();var e=t[Symbol.iterator];if(e)return e.call(t);var r=0;return{next:function(){return r<t.length?{done:!1,value:t[r++]}:{done:!0}}}},$jscomp.arrayFromIterator=function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r},$jscomp.arrayFromIterable=function(t){return t instanceof Array?t:$jscomp.arrayFromIterator($jscomp.makeIterator(t))},$jscomp.inherits=function(t,e){function r(){}for(var n in r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t,e)if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(e,n);i&&Object.defineProperty(t,n,i)}else t[n]=e[n]},$jscomp.array=$jscomp.array||{},$jscomp.iteratorFromArray=function(t,e){$jscomp.initSymbolIterator(),t instanceof String&&(t+="");var r=0,n={next:function(){if(r<t.length){var i=r++;return{value:e(i,t[i]),done:!1}}return n.next=function(){return{done:!0,value:void 0}},n.next()}};return $jscomp.initSymbol(),$jscomp.initSymbolIterator(),n[Symbol.iterator]=function(){return n},n},$jscomp.findInternal=function(t,e,r){t instanceof String&&(t=String(t));for(var n=t.length,i=0;i<n;i++){var o=t[i];if(e.call(r,o,i,t))return{i:i,v:o}}return{i:-1,v:void 0}},$jscomp.array.from=function(t,e,r){$jscomp.initSymbolIterator(),e=null!=e?e:function(t){return t};var n=[];if($jscomp.initSymbol(),$jscomp.initSymbolIterator(),"function"==typeof(i=t[Symbol.iterator])&&(t=i.call(t)),"function"==typeof t.next)for(;!(i=t.next()).done;)n.push(e.call(r,i.value));else for(var i=t.length,o=0;o<i;o++)n.push(e.call(r,t[o]));return n},$jscomp.array.of=function(t){return $jscomp.array.from(arguments)},$jscomp.array.entries=function(){return $jscomp.iteratorFromArray(this,function(t,e){return[t,e]})},$jscomp.array.installHelper_=function(t,e){!Array.prototype[t]&&Object.defineProperties&&Object.defineProperty&&Object.defineProperty(Array.prototype,t,{configurable:!0,enumerable:!1,writable:!0,value:e})},$jscomp.array.entries$install=function(){$jscomp.array.installHelper_("entries",$jscomp.array.entries)},$jscomp.array.keys=function(){return $jscomp.iteratorFromArray(this,function(t){return t})},$jscomp.array.keys$install=function(){$jscomp.array.installHelper_("keys",$jscomp.array.keys)},$jscomp.array.values=function(){return $jscomp.iteratorFromArray(this,function(t,e){return e})},$jscomp.array.values$install=function(){$jscomp.array.installHelper_("values",$jscomp.array.values)},$jscomp.array.copyWithin=function(t,e,r){var n=this.length;if(t=Number(t),e=Number(e),r=Number(null!=r?r:n),t<e)for(r=Math.min(r,n);e<r;)e in this?this[t++]=this[e++]:(delete this[t++],e++);else for(t+=(r=Math.min(r,n+e-t))-e;r>e;)--r in this?this[--t]=this[r]:delete this[t];return this},$jscomp.array.copyWithin$install=function(){$jscomp.array.installHelper_("copyWithin",$jscomp.array.copyWithin)},$jscomp.array.fill=function(t,e,r){var n=this.length||0;for(0>e&&(e=Math.max(0,n+e)),(null==r||r>n)&&(r=n),0>(r=Number(r))&&(r=Math.max(0,n+r)),e=Number(e||0);e<r;e++)this[e]=t;return this},$jscomp.array.fill$install=function(){$jscomp.array.installHelper_("fill",$jscomp.array.fill)},$jscomp.array.find=function(t,e){return $jscomp.findInternal(this,t,e).v},$jscomp.array.find$install=function(){$jscomp.array.installHelper_("find",$jscomp.array.find)},$jscomp.array.findIndex=function(t,e){return $jscomp.findInternal(this,t,e).i},$jscomp.array.findIndex$install=function(){$jscomp.array.installHelper_("findIndex",$jscomp.array.findIndex)},$jscomp.ASSUME_NO_NATIVE_MAP=!1,$jscomp.Map$isConformant=function(){if($jscomp.ASSUME_NO_NATIVE_MAP)return!1;var t=$jscomp.global.Map;if(!t||!t.prototype.entries||"function"!=typeof Object.seal)return!1;try{var e=Object.seal({x:4}),r=new t($jscomp.makeIterator([[e,"s"]]));if("s"!=r.get(e)||1!=r.size||r.get({x:4})||r.set({x:4},"t")!=r||2!=r.size)return!1;var n=r.entries(),i=n.next();return!i.done&&i.value[0]==e&&"s"==i.value[1]&&!((i=n.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!n.next().done)}catch(t){return!1}},$jscomp.Map=function(t){if(this.data_={},this.head_=$jscomp.Map.createHead(),this.size=0,t){t=$jscomp.makeIterator(t);for(var e;!(e=t.next()).done;)e=e.value,this.set(e[0],e[1])}},$jscomp.Map.prototype.set=function(t,e){var r=$jscomp.Map.maybeGetEntry(this,t);return r.list||(r.list=this.data_[r.id]=[]),r.entry?r.entry.value=e:(r.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:t,value:e},r.list.push(r.entry),this.head_.previous.next=r.entry,this.head_.previous=r.entry,this.size++),this},$jscomp.Map.prototype.delete=function(t){return!(!(t=$jscomp.Map.maybeGetEntry(this,t)).entry||!t.list)&&(t.list.splice(t.index,1),t.list.length||delete this.data_[t.id],t.entry.previous.next=t.entry.next,t.entry.next.previous=t.entry.previous,t.entry.head=null,this.size--,!0)},$jscomp.Map.prototype.clear=function(){this.data_={},this.head_=this.head_.previous=$jscomp.Map.createHead(),this.size=0},$jscomp.Map.prototype.has=function(t){return!!$jscomp.Map.maybeGetEntry(this,t).entry},$jscomp.Map.prototype.get=function(t){return(t=$jscomp.Map.maybeGetEntry(this,t).entry)&&t.value},$jscomp.Map.prototype.entries=function(){return $jscomp.Map.makeIterator_(this,function(t){return[t.key,t.value]})},$jscomp.Map.prototype.keys=function(){return $jscomp.Map.makeIterator_(this,function(t){return t.key})},$jscomp.Map.prototype.values=function(){return $jscomp.Map.makeIterator_(this,function(t){return t.value})},$jscomp.Map.prototype.forEach=function(t,e){for(var r,n=this.entries();!(r=n.next()).done;)r=r.value,t.call(e,r[1],r[0],this)},$jscomp.Map.maybeGetEntry=function(t,e){var r=$jscomp.Map.getId(e),n=t.data_[r];if(n&&Object.prototype.hasOwnProperty.call(t.data_,r))for(var i=0;i<n.length;i++){var o=n[i];if(e!=e&&o.key!=o.key||e===o.key)return{id:r,list:n,index:i,entry:o}}return{id:r,list:n,index:-1,entry:void 0}},$jscomp.Map.makeIterator_=function(t,e){var r=t.head_,n={next:function(){if(r){for(;r.head!=t.head_;)r=r.previous;for(;r.next!=r.head;)return r=r.next,{done:!1,value:e(r)};r=null}return{done:!0,value:void 0}}};return $jscomp.initSymbol(),$jscomp.initSymbolIterator(),n[Symbol.iterator]=function(){return n},n},$jscomp.Map.mapIndex_=0,$jscomp.Map.createHead=function(){var t={};return t.previous=t.next=t.head=t},$jscomp.Map.getId=function(t){if(!(t instanceof Object))return"p_"+t;if(!($jscomp.Map.idKey in t))try{$jscomp.Map.defineProperty(t,$jscomp.Map.idKey,{value:++$jscomp.Map.mapIndex_})}catch(t){}return $jscomp.Map.idKey in t?t[$jscomp.Map.idKey]:"o_ "+t},$jscomp.Map.defineProperty=Object.defineProperty?function(t,e,r){Object.defineProperty(t,e,{value:String(r)})}:function(t,e,r){t[e]=String(r)},$jscomp.Map.Entry=function(){},$jscomp.Map$install=function(){$jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.Map$isConformant()?$jscomp.Map=$jscomp.global.Map:($jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.Map.prototype[Symbol.iterator]=$jscomp.Map.prototype.entries,$jscomp.initSymbol(),$jscomp.Map.idKey=Symbol("map-id-key"),$jscomp.Map$install=function(){})},$jscomp.math=$jscomp.math||{},$jscomp.math.clz32=function(t){if(0===(t=Number(t)>>>0))return 32;var e=0;return 0==(4294901760&t)&&(t<<=16,e+=16),0==(4278190080&t)&&(t<<=8,e+=8),0==(4026531840&t)&&(t<<=4,e+=4),0==(3221225472&t)&&(t<<=2,e+=2),0==(2147483648&t)&&e++,e},$jscomp.math.imul=function(t,e){var r=65535&(t=Number(t)),n=65535&(e=Number(e));return r*n+((t>>>16&65535)*n+r*(e>>>16&65535)<<16>>>0)|0},$jscomp.math.sign=function(t){return 0===(t=Number(t))||isNaN(t)?t:0<t?1:-1},$jscomp.math.log10=function(t){return Math.log(t)/Math.LN10},$jscomp.math.log2=function(t){return Math.log(t)/Math.LN2},$jscomp.math.log1p=function(t){if(.25>(t=Number(t))&&-.25<t){for(var e=t,r=1,n=t,i=0,o=1;i!=n;)n=(i=n)+(o*=-1)*(e*=t)/++r;return n}return Math.log(1+t)},$jscomp.math.expm1=function(t){if(.25>(t=Number(t))&&-.25<t){for(var e=t,r=1,n=t,i=0;i!=n;)n=(i=n)+(e*=t/++r);return n}return Math.exp(t)-1},$jscomp.math.cosh=function(t){return t=Number(t),(Math.exp(t)+Math.exp(-t))/2},$jscomp.math.sinh=function(t){return 0===(t=Number(t))?t:(Math.exp(t)-Math.exp(-t))/2},$jscomp.math.tanh=function(t){if(0===(t=Number(t)))return t;var e=(1-(e=Math.exp(-2*Math.abs(t))))/(1+e);return 0>t?-e:e},$jscomp.math.acosh=function(t){return t=Number(t),Math.log(t+Math.sqrt(t*t-1))},$jscomp.math.asinh=function(t){if(0===(t=Number(t)))return t;var e=Math.log(Math.abs(t)+Math.sqrt(t*t+1));return 0>t?-e:e},$jscomp.math.atanh=function(t){return t=Number(t),($jscomp.math.log1p(t)-$jscomp.math.log1p(-t))/2},$jscomp.math.hypot=function(t,e,r){t=Number(t),e=Number(e);var n,i,o,s=Math.max(Math.abs(t),Math.abs(e));for(n=2;n<arguments.length;n++)s=Math.max(s,Math.abs(arguments[n]));if(1e100<s||1e-100>s){for(o=(t/=s)*t+(e/=s)*e,n=2;n<arguments.length;n++)o+=(i=Number(arguments[n])/s)*i;return Math.sqrt(o)*s}for(o=t*t+e*e,n=2;n<arguments.length;n++)o+=(i=Number(arguments[n]))*i;return Math.sqrt(o)},$jscomp.math.trunc=function(t){if(t=Number(t),isNaN(t)||1/0===t||-1/0===t||0===t)return t;var e=Math.floor(Math.abs(t));return 0>t?-e:e},$jscomp.math.cbrt=function(t){if(0===t)return t;t=Number(t);var e=Math.pow(Math.abs(t),1/3);return 0>t?-e:e},$jscomp.number=$jscomp.number||{},$jscomp.number.isFinite=function(t){return"number"==typeof t&&(!isNaN(t)&&1/0!==t&&-1/0!==t)},$jscomp.number.isInteger=function(t){return!!$jscomp.number.isFinite(t)&&t===Math.floor(t)},$jscomp.number.isNaN=function(t){return"number"==typeof t&&isNaN(t)},$jscomp.number.isSafeInteger=function(t){return $jscomp.number.isInteger(t)&&Math.abs(t)<=$jscomp.number.MAX_SAFE_INTEGER},$jscomp.number.EPSILON=Math.pow(2,-52),$jscomp.number.MAX_SAFE_INTEGER=9007199254740991,$jscomp.number.MIN_SAFE_INTEGER=-9007199254740991,$jscomp.object=$jscomp.object||{},$jscomp.object.assign=function(t,e){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},$jscomp.object.is=function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},$jscomp.ASSUME_NO_NATIVE_SET=!1,$jscomp.Set$isConformant=function(){if($jscomp.ASSUME_NO_NATIVE_SET)return!1;var t=$jscomp.global.Set;if(!t||!t.prototype.entries||"function"!=typeof Object.seal)return!1;try{var e=Object.seal({x:4}),r=new t($jscomp.makeIterator([e]));if(!r.has(e)||1!=r.size||r.add(e)!=r||1!=r.size||r.add({x:4})!=r||2!=r.size)return!1;var n=r.entries(),i=n.next();return!i.done&&i.value[0]==e&&i.value[1]==e&&(!(i=n.next()).done&&i.value[0]!=e&&4==i.value[0].x&&i.value[1]==i.value[0]&&n.next().done)}catch(t){return!1}},$jscomp.Set=function(t){if(this.map_=new $jscomp.Map,t){t=$jscomp.makeIterator(t);for(var e;!(e=t.next()).done;)this.add(e.value)}this.size=this.map_.size},$jscomp.Set.prototype.add=function(t){return this.map_.set(t,t),this.size=this.map_.size,this},$jscomp.Set.prototype.delete=function(t){return t=this.map_.delete(t),this.size=this.map_.size,t},$jscomp.Set.prototype.clear=function(){this.map_.clear(),this.size=0},$jscomp.Set.prototype.has=function(t){return this.map_.has(t)},$jscomp.Set.prototype.entries=function(){return this.map_.entries()},$jscomp.Set.prototype.values=function(){return this.map_.values()},$jscomp.Set.prototype.forEach=function(t,e){var r=this;this.map_.forEach(function(n){return t.call(e,n,n,r)})},$jscomp.Set$install=function(){$jscomp.Map$install(),$jscomp.Set$isConformant()?$jscomp.Set=$jscomp.global.Set:($jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.Set.prototype[Symbol.iterator]=$jscomp.Set.prototype.values,$jscomp.Set$install=function(){})},$jscomp.string=$jscomp.string||{},$jscomp.checkStringArgs=function(t,e,r){if(null==t)throw new TypeError("The 'this' value for String.prototype."+r+" must not be null or undefined");if(e instanceof RegExp)throw new TypeError("First argument to String.prototype."+r+" must not be a regular expression");return t+""},$jscomp.string.fromCodePoint=function(t){for(var e="",r=0;r<arguments.length;r++){var n=Number(arguments[r]);if(0>n||1114111<n||n!==Math.floor(n))throw new RangeError("invalid_code_point "+n);65535>=n?e+=String.fromCharCode(n):(n-=65536,e+=String.fromCharCode(n>>>10&1023|55296),e+=String.fromCharCode(1023&n|56320))}return e},$jscomp.string.repeat=function(t){var e=$jscomp.checkStringArgs(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var r="";t;)1&t&&(r+=e),(t>>>=1)&&(e+=e);return r},$jscomp.string.repeat$install=function(){String.prototype.repeat||(String.prototype.repeat=$jscomp.string.repeat)},$jscomp.string.codePointAt=function(t){var e=$jscomp.checkStringArgs(this,null,"codePointAt"),r=e.length;if(0<=(t=Number(t)||0)&&t<r){t|=0;var n=e.charCodeAt(t);return 55296>n||56319<n||t+1===r?n:56320>(t=e.charCodeAt(t+1))||57343<t?n:1024*(n-55296)+t+9216}},$jscomp.string.codePointAt$install=function(){String.prototype.codePointAt||(String.prototype.codePointAt=$jscomp.string.codePointAt)},$jscomp.string.includes=function(t,e){return-1!==$jscomp.checkStringArgs(this,t,"includes").indexOf(t,e||0)},$jscomp.string.includes$install=function(){String.prototype.includes||(String.prototype.includes=$jscomp.string.includes)},$jscomp.string.startsWith=function(t,e){var r=$jscomp.checkStringArgs(this,t,"startsWith");t+="";for(var n=r.length,i=t.length,o=Math.max(0,Math.min(0|e,r.length)),s=0;s<i&&o<n;)if(r[o++]!=t[s++])return!1;return s>=i},$jscomp.string.startsWith$install=function(){String.prototype.startsWith||(String.prototype.startsWith=$jscomp.string.startsWith)},$jscomp.string.endsWith=function(t,e){var r=$jscomp.checkStringArgs(this,t,"endsWith");t+="",void 0===e&&(e=r.length);for(var n=Math.max(0,Math.min(0|e,r.length)),i=t.length;0<i&&0<n;)if(r[--n]!=t[--i])return!1;return 0>=i},$jscomp.string.endsWith$install=function(){String.prototype.endsWith||(String.prototype.endsWith=$jscomp.string.endsWith)};var COMPILED=!0,goog=goog||{};goog.global=this,goog.isDef=function(t){return void 0!==t},goog.exportPath_=function(t,e,r){t=t.split("."),r=r||goog.global,t[0]in r||!r.execScript||r.execScript("var "+t[0]);for(var n;t.length&&(n=t.shift());)!t.length&&goog.isDef(e)?r[n]=e:r=r[n]?r[n]:r[n]={}},goog.define=function(t,e){var r=e;COMPILED||(goog.global.CLOSURE_UNCOMPILED_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES,t)?r=goog.global.CLOSURE_UNCOMPILED_DEFINES[t]:goog.global.CLOSURE_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES,t)&&(r=goog.global.CLOSURE_DEFINES[t])),goog.exportPath_(t,r)},goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(t){if(!COMPILED&&goog.isProvided_(t))throw Error('Namespace "'+t+'" already declared.');goog.constructNamespace_(t)},goog.constructNamespace_=function(t,e){if(!COMPILED){delete goog.implicitNamespaces_[t];for(var r=t;(r=r.substring(0,r.lastIndexOf(".")))&&!goog.getObjectByName(r);)goog.implicitNamespaces_[r]=!0}goog.exportPath_(t,e)},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(t){if(!goog.isString(t)||!t||-1==t.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInModuleLoader_())throw Error("Module "+t+" has been loaded incorrectly.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=t,!COMPILED){if(goog.isProvided_(t))throw Error('Namespace "'+t+'" already declared.');delete goog.implicitNamespaces_[t]}},goog.module.get=function(t){return goog.module.getInternal_(t)},goog.module.getInternal_=function(t){if(!COMPILED)return goog.isProvided_(t)?t in goog.loadedModules_?goog.loadedModules_[t]:goog.getObjectByName(t):null},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return null!=goog.moduleLoaderState_},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.setTestOnly=function(t){if(goog.DISALLOW_TEST_ONLY_CODE)throw t=t||"",Error("Importing test-only code into non-debug environment"+(t?": "+t:"."))},goog.forwardDeclare=function(t){},COMPILED||(goog.isProvided_=function(t){return t in goog.loadedModules_||!goog.implicitNamespaces_[t]&&goog.isDefAndNotNull(goog.getObjectByName(t))},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(t,e){for(var r,n=t.split("."),i=e||goog.global;r=n.shift();){if(!goog.isDefAndNotNull(i[r]))return null;i=i[r]}return i},goog.globalize=function(t,e){var r,n=e||goog.global;for(r in t)n[r]=t[r]},goog.addDependency=function(t,e,r,n){if(goog.DEPENDENCIES_ENABLED){var i;t=t.replace(/\\/g,"/");for(var o=goog.dependencies_,s=0;i=e[s];s++)o.nameToPath[i]=t,o.pathIsModule[t]=!!n;for(n=0;e=r[n];n++)t in o.requires||(o.requires[t]={}),o.requires[t][e]=!0}},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(t){goog.global.console&&goog.global.console.error(t)},goog.require=function(t){if(!COMPILED){if(goog.ENABLE_DEBUG_LOADER&&goog.IS_OLD_IE_&&goog.maybeProcessDeferredDep_(t),goog.isProvided_(t))return goog.isInModuleLoader_()?goog.module.getInternal_(t):null;if(goog.ENABLE_DEBUG_LOADER){var e=goog.getPathFromDeps_(t);if(e)return goog.writeScripts_(e),null}throw t="goog.require could not find: "+t,goog.logToConsole_(t),Error(t)}},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(t){t.getInstance=function(){return t.instance_?t.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=t),t.instance_=new t)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER,goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var t=goog.global.document;return null!=t&&"write"in t},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var t=goog.global.document.getElementsByTagName("SCRIPT"),e=t.length-1;0<=e;--e){var r=t[e].src,n=-1==(n=r.lastIndexOf("?"))?r.length:n;if("base.js"==r.substr(n-7,7)){goog.basePath=r.substr(0,n-7);break}}},goog.importScript_=function(t,e){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(t,e)&&(goog.dependencies_.written[t]=!0)},goog.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.importModule_=function(t){goog.importScript_("",'goog.retrieveAndExecModule_("'+t+'");')&&(goog.dependencies_.written[t]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(t,e){return goog.LOAD_MODULE_USING_EVAL&&goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(e+"\n//# sourceURL="+t+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+e+"\n;return exports});\n//# sourceURL="+t+"\n"},goog.loadQueuedModules_=function(){var t=goog.queuedModules_.length;if(0<t){var e=goog.queuedModules_;goog.queuedModules_=[];for(var r=0;r<t;r++)goog.maybeProcessDeferredPath_(e[r])}},goog.maybeProcessDeferredDep_=function(t){goog.isDeferredModule_(t)&&goog.allDepsAreAvailable_(t)&&(t=goog.getPathFromDeps_(t),goog.maybeProcessDeferredPath_(goog.basePath+t))},goog.isDeferredModule_=function(t){return!(!(t=goog.getPathFromDeps_(t))||!goog.dependencies_.pathIsModule[t])&&goog.basePath+t in goog.dependencies_.deferred},goog.allDepsAreAvailable_=function(t){if((t=goog.getPathFromDeps_(t))&&t in goog.dependencies_.requires)for(var e in goog.dependencies_.requires[t])if(!goog.isProvided_(e)&&!goog.isDeferredModule_(e))return!1;return!0},goog.maybeProcessDeferredPath_=function(t){if(t in goog.dependencies_.deferred){var e=goog.dependencies_.deferred[t];delete goog.dependencies_.deferred[t],goog.globalEval(e)}},goog.loadModuleFromUrl=function(t){goog.retrieveAndExecModule_(t)},goog.loadModule=function(t){var e=goog.moduleLoaderState_;try{var r;if(goog.moduleLoaderState_={moduleName:void 0,declareLegacyNamespace:!1},goog.isFunction(t))r=t.call(goog.global,{});else{if(!goog.isString(t))throw Error("Invalid module definition");r=goog.loadModuleFromSource_.call(goog.global,t)}var n=goog.moduleLoaderState_.moduleName;if(!goog.isString(n)||!n)throw Error('Invalid module name "'+n+'"');goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(n,r):goog.SEAL_MODULE_EXPORTS&&Object.seal&&Object.seal(r),goog.loadedModules_[n]=r}finally{goog.moduleLoaderState_=e}},goog.loadModuleFromSource_=function(a){return eval(a),{}},goog.writeScriptSrcNode_=function(t){goog.global.document.write('<script type="text/javascript" src="'+t+'"><\/script>')},goog.appendScriptSrcNode_=function(t){var e=goog.global.document,r=e.createElement("script");r.type="text/javascript",r.src=t,r.defer=!1,r.async=!1,e.head.appendChild(r)},goog.writeScriptTag_=function(t,e){if(goog.inHtmlDocument_()){var r=goog.global.document;if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==r.readyState){if(/\bdeps.js$/.test(t))return!1;throw Error('Cannot write "'+t+'" after document load')}var n=goog.IS_OLD_IE_;return void 0===e?n?(n=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ",r.write('<script type="text/javascript" src="'+t+'"'+n+"><\/script>")):goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING?goog.appendScriptSrcNode_(t):goog.writeScriptSrcNode_(t):r.write('<script type="text/javascript">'+e+"<\/script>"),!0}return!1},goog.lastNonModuleScriptIndex_=0,goog.onScriptLoad_=function(t,e){return"complete"==t.readyState&&goog.lastNonModuleScriptIndex_==e&&goog.loadQueuedModules_(),!0},goog.writeScripts_=function(t){var e=[],r={},n=goog.dependencies_;for(function t(i){if(!(i in n.written||i in n.visited)){if(n.visited[i]=!0,i in n.requires)for(var o in n.requires[i])if(!goog.isProvided_(o)){if(!(o in n.nameToPath))throw Error("Undefined nameToPath for "+o);t(n.nameToPath[o])}i in r||(r[i]=!0,e.push(i))}}(t),t=0;t<e.length;t++){var i=e[t];goog.dependencies_.written[i]=!0}var o=goog.moduleLoaderState_;for(goog.moduleLoaderState_=null,t=0;t<e.length;t++){if(!(i=e[t]))throw goog.moduleLoaderState_=o,Error("Undefined script input");n.pathIsModule[i]?goog.importModule_(goog.basePath+i):goog.importScript_(goog.basePath+i)}goog.moduleLoaderState_=o},goog.getPathFromDeps_=function(t){return t in goog.dependencies_.nameToPath?goog.dependencies_.nameToPath[t]:null},goog.findBasePath_(),goog.global.CLOSURE_NO_DEPS||goog.importScript_(goog.basePath+"deps.js")),goog.normalizePath_=function(t){t=t.split("/");for(var e=0;e<t.length;)"."==t[e]?t.splice(e,1):e&&".."==t[e]&&t[e-1]&&".."!=t[e-1]?t.splice(--e,2):e++;return t.join("/")},goog.loadFileSync_=function(t){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(t);var e=new goog.global.XMLHttpRequest;return e.open("get",t,!1),e.send(),e.responseText},goog.retrieveAndExecModule_=function(t){if(!COMPILED){var e=t;t=goog.normalizePath_(t);var r=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_,n=goog.loadFileSync_(t);if(null==n)throw Error("load of "+t+"failed");n=goog.wrapModule_(t,n),goog.IS_OLD_IE_?(goog.dependencies_.deferred[e]=n,goog.queuedModules_.push(e)):r(t,n)}},goog.typeOf=function(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var r=Object.prototype.toString.call(t);if("[object Window]"==r)return"object";if("[object Array]"==r||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==r||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e},goog.isNull=function(t){return null===t},goog.isDefAndNotNull=function(t){return null!=t},goog.isArray=function(t){return"array"==goog.typeOf(t)},goog.isArrayLike=function(t){var e=goog.typeOf(t);return"array"==e||"object"==e&&"number"==typeof t.length},goog.isDateLike=function(t){return goog.isObject(t)&&"function"==typeof t.getFullYear},goog.isString=function(t){return"string"==typeof t},goog.isBoolean=function(t){return"boolean"==typeof t},goog.isNumber=function(t){return"number"==typeof t},goog.isFunction=function(t){return"function"==goog.typeOf(t)},goog.isObject=function(t){var e=typeof t;return"object"==e&&null!=t||"function"==e},goog.getUid=function(t){return t[goog.UID_PROPERTY_]||(t[goog.UID_PROPERTY_]=++goog.uidCounter_)},goog.hasUid=function(t){return!!t[goog.UID_PROPERTY_]},goog.removeUid=function(t){null!==t&&"removeAttribute"in t&&t.removeAttribute(goog.UID_PROPERTY_);try{delete t[goog.UID_PROPERTY_]}catch(t){}},goog.UID_PROPERTY_="closure_uid_"+(1e9*Math.random()>>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(t){if("object"==(r=goog.typeOf(t))||"array"==r){if(t.clone)return t.clone();var e,r="array"==r?[]:{};for(e in t)r[e]=goog.cloneObject(t[e]);return r}return t},goog.bindNative_=function(t,e,r){return t.call.apply(t.bind,arguments)},goog.bindJs_=function(t,e,r){if(!t)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(r,n),t.apply(e,r)}}return function(){return t.apply(e,arguments)}},goog.bind=function(t,e,r){return Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_,goog.bind.apply(null,arguments)},goog.partial=function(t,e){var r=Array.prototype.slice.call(arguments,1);return function(){var e=r.slice();return e.push.apply(e,arguments),t.apply(this,e)}},goog.mixin=function(t,e){for(var r in e)t[r]=e[r]},goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date},goog.globalEval=function(t){if(goog.global.execScript)goog.global.execScript(t,"JavaScript");else{if(!goog.global.eval)throw Error("goog.globalEval not available");if(null==goog.evalWorksForGlobals_)if(goog.global.eval("var _evalTest_ = 1;"),void 0!==goog.global._evalTest_){try{delete goog.global._evalTest_}catch(t){}goog.evalWorksForGlobals_=!0}else goog.evalWorksForGlobals_=!1;if(goog.evalWorksForGlobals_)goog.global.eval(t);else{var e=goog.global.document,r=e.createElement("SCRIPT");r.type="text/javascript",r.defer=!1,r.appendChild(e.createTextNode(t)),e.body.appendChild(r),e.body.removeChild(r)}}},goog.evalWorksForGlobals_=null,goog.getCssName=function(t,e){var r=function(t){return goog.cssNameMapping_[t]||t},n=function(t){t=t.split("-");for(var e=[],n=0;n<t.length;n++)e.push(r(t[n]));return e.join("-")};n=goog.cssNameMapping_?"BY_WHOLE"==goog.cssNameMappingStyle_?r:n:function(t){return t};return e?t+"-"+n(e):n(t)},goog.setCssNameMapping=function(t,e){goog.cssNameMapping_=t,goog.cssNameMappingStyle_=e},!COMPILED&&goog.global.CLOSURE_CSS_NAME_MAPPING&&(goog.cssNameMapping_=goog.global.CLOSURE_CSS_NAME_MAPPING),goog.getMsg=function(t,e){return e&&(t=t.replace(/\{\$([^}]+)}/g,function(t,r){return null!=e&&r in e?e[r]:t})),t},goog.getMsgWithFallback=function(t,e){return t},goog.exportSymbol=function(t,e,r){goog.exportPath_(t,e,r)},goog.exportProperty=function(t,e,r){t[e]=r},goog.inherits=function(t,e){function r(){}r.prototype=e.prototype,t.superClass_=e.prototype,t.prototype=new r,t.prototype.constructor=t,t.base=function(t,r,n){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[r].apply(t,i)}},goog.base=function(t,e,r){var n=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!n)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(n.superClass_){for(var i=Array(arguments.length-1),o=1;o<arguments.length;o++)i[o-1]=arguments[o];return n.superClass_.constructor.apply(t,i)}for(i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];o=!1;for(var s=t.constructor;s;s=s.superClass_&&s.superClass_.constructor)if(s.prototype[e]===n)o=!0;else if(o)return s.prototype[e].apply(t,i);if(t[e]===n)return t.constructor.prototype[e].apply(t,i);throw Error("goog.base called from a method of one name to a method of a different name")},goog.scope=function(t){t.call(goog.global)},COMPILED||(goog.global.COMPILED=COMPILED),goog.defineClass=function(t,e){var r=e.constructor,n=e.statics;return r&&r!=Object.prototype.constructor||(r=function(){throw Error("cannot instantiate an interface (no constructor defined).")}),r=goog.defineClass.createSealingConstructor_(r,t),t&&goog.inherits(r,t),delete e.constructor,delete e.statics,goog.defineClass.applyProperties_(r.prototype,e),null!=n&&(n instanceof Function?n(r):goog.defineClass.applyProperties_(r,n)),r},goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG,goog.defineClass.createSealingConstructor_=function(t,e){if(goog.defineClass.SEAL_CLASS_INSTANCES&&Object.seal instanceof Function){if(e&&e.prototype&&e.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_])return t;var r=function(){var e=t.apply(this,arguments)||this;return e[goog.UID_PROPERTY_]=e[goog.UID_PROPERTY_],this.constructor===r&&Object.seal(e),e};return r}return t},goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.defineClass.applyProperties_=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);for(var n=0;n<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;n++)r=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[n],Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},goog.tagUnsealableClass=function(t){!COMPILED&&goog.defineClass.SEAL_CLASS_INSTANCES&&(t.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]=!0)},goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable",goog.dom={},goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},goog.debug={},goog.debug.Error=function(t){if(Error.captureStackTrace)Error.captureStackTrace(this,goog.debug.Error);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t)),this.reportErrorToServer=!0},goog.inherits(goog.debug.Error,Error),goog.debug.Error.prototype.name="CustomError",goog.string={},goog.string.DETECT_DOUBLE_ESCAPING=!1,goog.string.FORCE_NON_DOM_HTML_UNESCAPING=!1,goog.string.Unicode={NBSP:" "},goog.string.startsWith=function(t,e){return 0==t.lastIndexOf(e,0)},goog.string.endsWith=function(t,e){var r=t.length-e.length;return 0<=r&&t.indexOf(e,r)==r},goog.string.caseInsensitiveStartsWith=function(t,e){return 0==goog.string.caseInsensitiveCompare(e,t.substr(0,e.length))},goog.string.caseInsensitiveEndsWith=function(t,e){return 0==goog.string.caseInsensitiveCompare(e,t.substr(t.length-e.length,e.length))},goog.string.caseInsensitiveEquals=function(t,e){return t.toLowerCase()==e.toLowerCase()},goog.string.subs=function(t,e){for(var r=t.split("%s"),n="",i=Array.prototype.slice.call(arguments,1);i.length&&1<r.length;)n+=r.shift()+i.shift();return n+r.join("%s")},goog.string.collapseWhitespace=function(t){return t.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},goog.string.isEmptyOrWhitespace=function(t){return/^[\s\xa0]*$/.test(t)},goog.string.isEmptyString=function(t){return 0==t.length},goog.string.isEmpty=goog.string.isEmptyOrWhitespace,goog.string.isEmptyOrWhitespaceSafe=function(t){return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(t))},goog.string.isEmptySafe=goog.string.isEmptyOrWhitespaceSafe,goog.string.isBreakingWhitespace=function(t){return!/[^\t\n\r ]/.test(t)},goog.string.isAlpha=function(t){return!/[^a-zA-Z]/.test(t)},goog.string.isNumeric=function(t){return!/[^0-9]/.test(t)},goog.string.isAlphaNumeric=function(t){return!/[^a-zA-Z0-9]/.test(t)},goog.string.isSpace=function(t){return" "==t},goog.string.isUnicodeChar=function(t){return 1==t.length&&" "<=t&&"~">=t||"€"<=t&&"�">=t},goog.string.stripNewlines=function(t){return t.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(t){return t.replace(/(\r\n|\r|\n)/g,"\n")},goog.string.normalizeWhitespace=function(t){return t.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(t){return t.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(t){return t.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.TRUSTED_SITE&&String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},goog.string.trimLeft=function(t){return t.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(t){return t.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=function(t,e){var r=String(t).toLowerCase(),n=String(e).toLowerCase();return r<n?-1:r==n?0:1},goog.string.numberAwareCompare_=function(t,e,r){if(t==e)return 0;if(!t)return-1;if(!e)return 1;for(var n=t.toLowerCase().match(r),i=e.toLowerCase().match(r),o=Math.min(n.length,i.length),s=0;s<o;s++){r=n[s];var a=i[s];if(r!=a)return t=parseInt(r,10),!isNaN(t)&&(e=parseInt(a,10),!isNaN(e)&&t-e)?t-e:r<a?-1:1}return n.length!=i.length?n.length-i.length:t<e?-1:1},goog.string.intAwareCompare=function(t,e){return goog.string.numberAwareCompare_(t,e,/\d+|\D+/g)},goog.string.floatAwareCompare=function(t,e){return goog.string.numberAwareCompare_(t,e,/\d+|\.\d+|\D+/g)},goog.string.numerateCompare=goog.string.floatAwareCompare,goog.string.urlEncode=function(t){return encodeURIComponent(String(t))},goog.string.urlDecode=function(t){return decodeURIComponent(t.replace(/\+/g," "))},goog.string.newLineToBr=function(t,e){return t.replace(/(\r\n|\r|\n)/g,e?"<br />":"<br>")},goog.string.htmlEscape=function(t,e){if(e)t=t.replace(goog.string.AMP_RE_,"&amp;").replace(goog.string.LT_RE_,"&lt;").replace(goog.string.GT_RE_,"&gt;").replace(goog.string.QUOT_RE_,"&quot;").replace(goog.string.SINGLE_QUOTE_RE_,"&#39;").replace(goog.string.NULL_RE_,"&#0;"),goog.string.DETECT_DOUBLE_ESCAPING&&(t=t.replace(goog.string.E_RE_,"&#101;"));else{if(!goog.string.ALL_RE_.test(t))return t;-1!=t.indexOf("&")&&(t=t.replace(goog.string.AMP_RE_,"&amp;")),-1!=t.indexOf("<")&&(t=t.replace(goog.string.LT_RE_,"&lt;")),-1!=t.indexOf(">")&&(t=t.replace(goog.string.GT_RE_,"&gt;")),-1!=t.indexOf('"')&&(t=t.replace(goog.string.QUOT_RE_,"&quot;")),-1!=t.indexOf("'")&&(t=t.replace(goog.string.SINGLE_QUOTE_RE_,"&#39;")),-1!=t.indexOf("\0")&&(t=t.replace(goog.string.NULL_RE_,"&#0;")),goog.string.DETECT_DOUBLE_ESCAPING&&-1!=t.indexOf("e")&&(t=t.replace(goog.string.E_RE_,"&#101;"))}return t},goog.string.AMP_RE_=/&/g,goog.string.LT_RE_=/</g,goog.string.GT_RE_=/>/g,goog.string.QUOT_RE_=/"/g,goog.string.SINGLE_QUOTE_RE_=/'/g,goog.string.NULL_RE_=/\x00/g,goog.string.E_RE_=/e/g,goog.string.ALL_RE_=goog.string.DETECT_DOUBLE_ESCAPING?/[\x00&<>"'e]/:/[\x00&<>"']/,goog.string.unescapeEntities=function(t){return goog.string.contains(t,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(t):goog.string.unescapePureXmlEntities_(t):t},goog.string.unescapeEntitiesWithDocument=function(t,e){return goog.string.contains(t,"&")?goog.string.unescapeEntitiesUsingDom_(t,e):t},goog.string.unescapeEntitiesUsingDom_=function(t,e){var r,n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'};return r=e?e.createElement("div"):goog.global.document.createElement("div"),t.replace(goog.string.HTML_ENTITY_PATTERN_,function(t,e){var i=n[t];if(i)return i;if("#"==e.charAt(0)){var o=Number("0"+e.substr(1));isNaN(o)||(i=String.fromCharCode(o))}return i||(r.innerHTML=t+" ",i=r.firstChild.nodeValue.slice(0,-1)),n[t]=i})},goog.string.unescapePureXmlEntities_=function(t){return t.replace(/&([^;]+);/g,function(t,e){switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';default:if("#"==e.charAt(0)){var r=Number("0"+e.substr(1));if(!isNaN(r))return String.fromCharCode(r)}return t}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(t,e){return goog.string.newLineToBr(t.replace(/ /g," &#160;"),e)},goog.string.preserveSpaces=function(t){return t.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(t,e){for(var r=e.length,n=0;n<r;n++){var i=1==r?e:e.charAt(n);if(t.charAt(0)==i&&t.charAt(t.length-1)==i)return t.substring(1,t.length-1)}return t},goog.string.truncate=function(t,e,r){return r&&(t=goog.string.unescapeEntities(t)),t.length>e&&(t=t.substring(0,e-3)+"..."),r&&(t=goog.string.htmlEscape(t)),t},goog.string.truncateMiddle=function(t,e,r,n){if(r&&(t=goog.string.unescapeEntities(t)),n&&t.length>e){n>e&&(n=e);var i=t.length-n;t=t.substring(0,e-n)+"..."+t.substring(i)}else t.length>e&&(n=Math.floor(e/2),i=t.length-n,t=t.substring(0,n+e%2)+"..."+t.substring(i));return r&&(t=goog.string.htmlEscape(t)),t},goog.string.specialEscapeChars_={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"<"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(t){t=String(t);for(var e=['"'],r=0;r<t.length;r++){var n=t.charAt(r),i=n.charCodeAt(0);e[r+1]=goog.string.specialEscapeChars_[n]||(31<i&&127>i?n:goog.string.escapeChar(n))}return e.push('"'),e.join("")},goog.string.escapeString=function(t){for(var e=[],r=0;r<t.length;r++)e[r]=goog.string.escapeChar(t.charAt(r));return e.join("")},goog.string.escapeChar=function(t){if(t in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[t];if(t in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[t]=goog.string.specialEscapeChars_[t];var e,r=t.charCodeAt(0);return 31<r&&127>r?e=t:(256>r?(e="\\x",(16>r||256<r)&&(e+="0")):(e="\\u",4096>r&&(e+="0")),e+=r.toString(16).toUpperCase()),goog.string.jsEscapeCache_[t]=e},goog.string.contains=function(t,e){return-1!=t.indexOf(e)},goog.string.caseInsensitiveContains=function(t,e){return goog.string.contains(t.toLowerCase(),e.toLowerCase())},goog.string.countOf=function(t,e){return t&&e?t.split(e).length-1:0},goog.string.removeAt=function(t,e,r){var n=t;return 0<=e&&e<t.length&&0<r&&(n=t.substr(0,e)+t.substr(e+r,t.length-e-r)),n},goog.string.remove=function(t,e){var r=new RegExp(goog.string.regExpEscape(e),"");return t.replace(r,"")},goog.string.removeAll=function(t,e){var r=new RegExp(goog.string.regExpEscape(e),"g");return t.replace(r,"")},goog.string.regExpEscape=function(t){return String(t).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},goog.string.repeat=String.prototype.repeat?function(t,e){return t.repeat(e)}:function(t,e){return Array(e+1).join(t)},goog.string.padNumber=function(t,e,r){return-1==(r=(t=goog.isDef(r)?t.toFixed(r):String(t)).indexOf("."))&&(r=t.length),goog.string.repeat("0",Math.max(0,e-r))+t},goog.string.makeSafe=function(t){return null==t?"":String(t)},goog.string.buildString=function(t){return Array.prototype.join.call(arguments,"")},goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)},goog.string.compareVersions=function(t,e){for(var r=0,n=goog.string.trim(String(t)).split("."),i=goog.string.trim(String(e)).split("."),o=Math.max(n.length,i.length),s=0;0==r&&s<o;s++){var a=n[s]||"",u=i[s]||"",c=RegExp("(\\d*)(\\D*)","g"),l=RegExp("(\\d*)(\\D*)","g");do{var h=c.exec(a)||["","",""],f=l.exec(u)||["","",""];if(0==h[0].length&&0==f[0].length)break;r=0==h[1].length?0:parseInt(h[1],10);var p=0==f[1].length?0:parseInt(f[1],10);r=goog.string.compareElements_(r,p)||goog.string.compareElements_(0==h[2].length,0==f[2].length)||goog.string.compareElements_(h[2],f[2])}while(0==r)}return r},goog.string.compareElements_=function(t,e){return t<e?-1:t>e?1:0},goog.string.hashCode=function(t){for(var e=0,r=0;r<t.length;++r)e=31*e+t.charCodeAt(r)>>>0;return e},goog.string.uniqueStringCounter_=2147483648*Math.random()|0,goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(t){var e=Number(t);return 0==e&&goog.string.isEmptyOrWhitespace(t)?NaN:e},goog.string.isLowerCamelCase=function(t){return/^[a-z]+([A-Z][a-z]*)*$/.test(t)},goog.string.isUpperCamelCase=function(t){return/^([A-Z][a-z]*)+$/.test(t)},goog.string.toCamelCase=function(t){return String(t).replace(/\-([a-z])/g,function(t,e){return e.toUpperCase()})},goog.string.toSelectorCase=function(t){return String(t).replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(t,e){var r=goog.isString(e)?goog.string.regExpEscape(e):"\\s";return t.replace(new RegExp("(^"+(r?"|["+r+"]+":"")+")([a-z])","g"),function(t,e,r){return e+r.toUpperCase()})},goog.string.capitalize=function(t){return String(t.charAt(0)).toUpperCase()+String(t.substr(1)).toLowerCase()},goog.string.parseInt=function(t){return isFinite(t)&&(t=String(t)),goog.isString(t)?/^\s*-?0x/i.test(t)?parseInt(t,16):parseInt(t,10):NaN},goog.string.splitLimit=function(t,e,r){t=t.split(e);for(var n=[];0<r&&t.length;)n.push(t.shift()),r--;return t.length&&n.push(t.join(e)),n},goog.string.editDistance=function(t,e){var r=[],n=[];if(t==e)return 0;if(!t.length||!e.length)return Math.max(t.length,e.length);for(var i=0;i<e.length+1;i++)r[i]=i;for(i=0;i<t.length;i++){n[0]=i+1;for(var o=0;o<e.length;o++)n[o+1]=Math.min(n[o]+1,r[o+1]+1,r[o]+Number(t[i]!=e[o]));for(o=0;o<r.length;o++)r[o]=n[o]}return n[e.length]},goog.asserts={},goog.asserts.ENABLE_ASSERTS=goog.DEBUG,goog.asserts.AssertionError=function(t,e){e.unshift(t),goog.debug.Error.call(this,goog.string.subs.apply(null,e)),e.shift(),this.messagePattern=t},goog.inherits(goog.asserts.AssertionError,goog.debug.Error),goog.asserts.AssertionError.prototype.name="AssertionError",goog.asserts.DEFAULT_ERROR_HANDLER=function(t){throw t},goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER,goog.asserts.doAssertFailure_=function(t,e,r,n){var i="Assertion failed";if(r){i=i+": "+r;var o=n}else t&&(i+=": "+t,o=e);t=new goog.asserts.AssertionError(""+i,o||[]),goog.asserts.errorHandler_(t)},goog.asserts.setErrorHandler=function(t){goog.asserts.ENABLE_ASSERTS&&(goog.asserts.errorHandler_=t)},goog.asserts.assert=function(t,e,r){return goog.asserts.ENABLE_ASSERTS&&!t&&goog.asserts.doAssertFailure_("",null,e,Array.prototype.slice.call(arguments,2)),t},goog.asserts.fail=function(t,e){goog.asserts.ENABLE_ASSERTS&&goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1)))},goog.asserts.assertNumber=function(t,e,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isNumber(t)&&goog.asserts.doAssertFailure_("Expected number but got %s: %s.",[goog.typeOf(t),t],e,Array.prototype.slice.call(arguments,2)),t},goog.asserts.assertString=function(t,e,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isString(t)&&goog.asserts.doAssertFailure_("Expected string but got %s: %s.",[goog.typeOf(t),t],e,Array.prototype.slice.call(arguments,2)),t},goog.asserts.assertFunction=function(t,e,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isFunction(t)&&goog.asserts.doAssertFailure_("Expected function but got %s: %s.",[goog.typeOf(t),t],e,Array.prototype.slice.call(arguments,2)),t},goog.asserts.assertObject=function(t,e,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isObject(t)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(t),t],e,Array.prototype.slice.call(arguments,2)),t},goog.asserts.assertArray=function(t,e,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isArray(t)&&goog.asserts.doAssertFailure_("Expected array but got %s: %s.",[goog.typeOf(t),t],e,Array.prototype.slice.call(arguments,2)),t},goog.asserts.assertBoolean=function(t,e,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isBoolean(t)&&goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[goog.typeOf(t),t],e,Array.prototype.slice.call(arguments,2)),t},goog.asserts.assertElement=function(t,e,r){return!goog.asserts.ENABLE_ASSERTS||goog.isObject(t)&&t.nodeType==goog.dom.NodeType.ELEMENT||goog.asserts.doAssertFailure_("Expected Element but got %s: %s.",[goog.typeOf(t),t],e,Array.prototype.slice.call(arguments,2)),t},goog.asserts.assertInstanceof=function(t,e,r,n){return!goog.asserts.ENABLE_ASSERTS||t instanceof e||goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[goog.asserts.getType_(e),goog.asserts.getType_(t)],r,Array.prototype.slice.call(arguments,3)),t},goog.asserts.assertObjectPrototypeIsIntact=function(){for(var t in Object.prototype)goog.asserts.fail(t+" should not be enumerable in Object.prototype.")},goog.asserts.getType_=function(t){return t instanceof Function?t.displayName||t.name||"unknown type name":t instanceof Object?t.constructor.displayName||t.constructor.name||Object.prototype.toString.call(t):null===t?"null":typeof t};var jspb={Map:function(t,e){this.arr_=t,this.valueCtor_=e,this.map_={},this.arrClean=!0,0<this.arr_.length&&this.loadFromArray_()}},a,b;jspb.Map.prototype.loadFromArray_=function(){for(var t=0;t<this.arr_.length;t++){var e=this.arr_[t],r=e[0];this.map_[r.toString()]=new jspb.Map.Entry_(r,e[1])}this.arrClean=!0},jspb.Map.prototype.toArray=function(){if(this.arrClean){if(this.valueCtor_){var t,e=this.map_;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var r=e[t].valueWrapper;r&&r.toArray()}}}else{for(this.arr_.length=0,(e=this.stringKeys_()).sort(),t=0;t<e.length;t++){var n=this.map_[e[t]];(r=n.valueWrapper)&&r.toArray(),this.arr_.push([n.key,n.value])}this.arrClean=!0}return this.arr_},jspb.Map.prototype.toObject=function(t,e){for(var r=this.toArray(),n=[],i=0;i<r.length;i++){var o=this.map_[r[i][0].toString()];this.wrapEntry_(o);var s=o.valueWrapper;s?(goog.asserts.assert(e),n.push([o.key,e(t,s)])):n.push([o.key,o.value])}return n},jspb.Map.fromObject=function(t,e,r){e=new jspb.Map([],e);for(var n=0;n<t.length;n++){var i=t[n][0],o=r(t[n][1]);e.set(i,o)}return e},jspb.Map.ArrayIteratorIterable_=function(t){this.idx_=0,this.arr_=t},jspb.Map.ArrayIteratorIterable_.prototype.next=function(){return this.idx_<this.arr_.length?{done:!1,value:this.arr_[this.idx_++]}:{done:!0,value:void 0}},$jscomp.initSymbol(),"undefined"!=typeof Symbol&&($jscomp.initSymbol(),$jscomp.initSymbolIterator(),jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator]=function(){return this}),jspb.Map.prototype.getLength=function(){return this.stringKeys_().length},jspb.Map.prototype.clear=function(){this.map_={},this.arrClean=!1},jspb.Map.prototype.del=function(t){t=t.toString();var e=this.map_.hasOwnProperty(t);return delete this.map_[t],this.arrClean=!1,e},jspb.Map.prototype.getEntryList=function(){var t=[],e=this.stringKeys_();e.sort();for(var r=0;r<e.length;r++){var n=this.map_[e[r]];t.push([n.key,n.value])}return t},jspb.Map.prototype.entries=function(){var t=[],e=this.stringKeys_();e.sort();for(var r=0;r<e.length;r++){var n=this.map_[e[r]];t.push([n.key,this.wrapEntry_(n)])}return new jspb.Map.ArrayIteratorIterable_(t)},jspb.Map.prototype.keys=function(){var t=[],e=this.stringKeys_();e.sort();for(var r=0;r<e.length;r++)t.push(this.map_[e[r]].key);return new jspb.Map.ArrayIteratorIterable_(t)},jspb.Map.prototype.values=function(){var t=[],e=this.stringKeys_();e.sort();for(var r=0;r<e.length;r++)t.push(this.wrapEntry_(this.map_[e[r]]));return new jspb.Map.ArrayIteratorIterable_(t)},jspb.Map.prototype.forEach=function(t,e){var r=this.stringKeys_();r.sort();for(var n=0;n<r.length;n++){var i=this.map_[r[n]];t.call(e,this.wrapEntry_(i),i.key,this)}},jspb.Map.prototype.set=function(t,e){var r=new jspb.Map.Entry_(t);return this.valueCtor_?(r.valueWrapper=e,r.value=e.toArray()):r.value=e,this.map_[t.toString()]=r,this.arrClean=!1,this},jspb.Map.prototype.wrapEntry_=function(t){return this.valueCtor_?(t.valueWrapper||(t.valueWrapper=new this.valueCtor_(t.value)),t.valueWrapper):t.value},jspb.Map.prototype.get=function(t){if(t=this.map_[t.toString()])return this.wrapEntry_(t)},jspb.Map.prototype.has=function(t){return t.toString()in this.map_},jspb.Map.prototype.serializeBinary=function(t,e,r,n,i){var o=this.stringKeys_();o.sort();for(var s=0;s<o.length;s++){var a=this.map_[o[s]];e.beginSubMessage(t),r.call(e,1,a.key),this.valueCtor_?n.call(e,2,this.wrapEntry_(a),i):n.call(e,2,a.value),e.endSubMessage()}},jspb.Map.deserializeBinary=function(t,e,r,n,i,o){for(var s=void 0;e.nextField()&&!e.isEndGroup();){var a=e.getFieldNumber();1==a?o=r.call(e):2==a&&(t.valueCtor_?(goog.asserts.assert(i),s=new t.valueCtor_,n.call(e,s,i)):s=n.call(e))}goog.asserts.assert(void 0!=o),goog.asserts.assert(void 0!=s),t.set(o,s)},jspb.Map.prototype.stringKeys_=function(){var t,e=this.map_,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);return r},jspb.Map.Entry_=function(t,e){this.key=t,this.value=e,this.valueWrapper=void 0},goog.array={},goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE,goog.array.ASSUME_NATIVE_FUNCTIONS=!1,goog.array.peek=function(t){return t[t.length-1]},goog.array.last=goog.array.peek,goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(t,e,r){return goog.asserts.assert(null!=t.length),Array.prototype.indexOf.call(t,e,r)}:function(t,e,r){if(r=null==r?0:0>r?Math.max(0,t.length+r):r,goog.isString(t))return goog.isString(e)&&1==e.length?t.indexOf(e,r):-1;for(;r<t.length;r++)if(r in t&&t[r]===e)return r;return-1},goog.array.lastIndexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(t,e,r){return goog.asserts.assert(null!=t.length),Array.prototype.lastIndexOf.call(t,e,null==r?t.length-1:r)}:function(t,e,r){if(0>(r=null==r?t.length-1:r)&&(r=Math.max(0,t.length+r)),goog.isString(t))return goog.isString(e)&&1==e.length?t.lastIndexOf(e,r):-1;for(;0<=r;r--)if(r in t&&t[r]===e)return r;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(t,e,r){goog.asserts.assert(null!=t.length),Array.prototype.forEach.call(t,e,r)}:function(t,e,r){for(var n=t.length,i=goog.isString(t)?t.split(""):t,o=0;o<n;o++)o in i&&e.call(r,i[o],o,t)},goog.array.forEachRight=function(t,e,r){var n=t.length,i=goog.isString(t)?t.split(""):t;for(n=n-1;0<=n;--n)n in i&&e.call(r,i[n],n,t)},goog.array.filter=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(t,e,r){return goog.asserts.assert(null!=t.length),Array.prototype.filter.call(t,e,r)}:function(t,e,r){for(var n=t.length,i=[],o=0,s=goog.isString(t)?t.split(""):t,a=0;a<n;a++)if(a in s){var u=s[a];e.call(r,u,a,t)&&(i[o++]=u)}return i},goog.array.map=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(t,e,r){return goog.asserts.assert(null!=t.length),Array.prototype.map.call(t,e,r)}:function(t,e,r){for(var n=t.length,i=Array(n),o=goog.isString(t)?t.split(""):t,s=0;s<n;s++)s in o&&(i[s]=e.call(r,o[s],s,t));return i},goog.array.reduce=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(t,e,r,n){return goog.asserts.assert(null!=t.length),n&&(e=goog.bind(e,n)),Array.prototype.reduce.call(t,e,r)}:function(t,e,r,n){var i=r;return goog.array.forEach(t,function(r,o){i=e.call(n,i,r,o,t)}),i},goog.array.reduceRight=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(t,e,r,n){return goog.asserts.assert(null!=t.length),goog.asserts.assert(null!=e),n&&(e=goog.bind(e,n)),Array.prototype.reduceRight.call(t,e,r)}:function(t,e,r,n){var i=r;return goog.array.forEachRight(t,function(r,o){i=e.call(n,i,r,o,t)}),i},goog.array.some=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(t,e,r){return goog.asserts.assert(null!=t.length),Array.prototype.some.call(t,e,r)}:function(t,e,r){for(var n=t.length,i=goog.isString(t)?t.split(""):t,o=0;o<n;o++)if(o in i&&e.call(r,i[o],o,t))return!0;return!1},goog.array.every=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(t,e,r){return goog.asserts.assert(null!=t.length),Array.prototype.every.call(t,e,r)}:function(t,e,r){for(var n=t.length,i=goog.isString(t)?t.split(""):t,o=0;o<n;o++)if(o in i&&!e.call(r,i[o],o,t))return!1;return!0},goog.array.count=function(t,e,r){var n=0;return goog.array.forEach(t,function(t,i,o){e.call(r,t,i,o)&&++n},r),n},goog.array.find=function(t,e,r){return 0>(e=goog.array.findIndex(t,e,r))?null:goog.isString(t)?t.charAt(e):t[e]},goog.array.findIndex=function(t,e,r){for(var n=t.length,i=goog.isString(t)?t.split(""):t,o=0;o<n;o++)if(o in i&&e.call(r,i[o],o,t))return o;return-1},goog.array.findRight=function(t,e,r){return 0>(e=goog.array.findIndexRight(t,e,r))?null:goog.isString(t)?t.charAt(e):t[e]},goog.array.findIndexRight=function(t,e,r){var n=t.length,i=goog.isString(t)?t.split(""):t;for(n=n-1;0<=n;n--)if(n in i&&e.call(r,i[n],n,t))return n;return-1},goog.array.contains=function(t,e){return 0<=goog.array.indexOf(t,e)},goog.array.isEmpty=function(t){return 0==t.length},goog.array.clear=function(t){if(!goog.isArray(t))for(var e=t.length-1;0<=e;e--)delete t[e];t.length=0},goog.array.insert=function(t,e){goog.array.contains(t,e)||t.push(e)},goog.array.insertAt=function(t,e,r){goog.array.splice(t,r,0,e)},goog.array.insertArrayAt=function(t,e,r){goog.partial(goog.array.splice,t,r,0).apply(null,e)},goog.array.insertBefore=function(t,e,r){var n;2==arguments.length||0>(n=goog.array.indexOf(t,r))?t.push(e):goog.array.insertAt(t,e,n)},goog.array.remove=function(t,e){var r,n=goog.array.indexOf(t,e);return(r=0<=n)&&goog.array.removeAt(t,n),r},goog.array.removeAt=function(t,e){return goog.asserts.assert(null!=t.length),1==Array.prototype.splice.call(t,e,1).length},goog.array.removeIf=function(t,e,r){return 0<=(e=goog.array.findIndex(t,e,r))&&(goog.array.removeAt(t,e),!0)},goog.array.removeAllIf=function(t,e,r){var n=0;return goog.array.forEachRight(t,function(i,o){e.call(r,i,o,t)&&goog.array.removeAt(t,o)&&n++}),n},goog.array.concat=function(t){return Array.prototype.concat.apply(Array.prototype,arguments)},goog.array.join=function(t){return Array.prototype.concat.apply(Array.prototype,arguments)},goog.array.toArray=function(t){var e=t.length;if(0<e){for(var r=Array(e),n=0;n<e;n++)r[n]=t[n];return r}return[]},goog.array.clone=goog.array.toArray,goog.array.extend=function(t,e){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(goog.isArrayLike(n)){var i=t.length||0,o=n.length||0;t.length=i+o;for(var s=0;s<o;s++)t[i+s]=n[s]}else t.push(n)}},goog.array.splice=function(t,e,r,n){return goog.asserts.assert(null!=t.length),Array.prototype.splice.apply(t,goog.array.slice(arguments,1))},goog.array.slice=function(t,e,r){return goog.asserts.assert(null!=t.length),2>=arguments.length?Array.prototype.slice.call(t,e):Array.prototype.slice.call(t,e,r)},goog.array.removeDuplicates=function(t,e,r){e=e||t;var n=function(t){return goog.isObject(t)?"o"+goog.getUid(t):(typeof t).charAt(0)+t};r=r||n;n={};for(var i=0,o=0;o<t.length;){var s=t[o++],a=r(s);Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,e[i++]=s)}e.length=i},goog.array.binarySearch=function(t,e,r){return goog.array.binarySearch_(t,r||goog.array.defaultCompare,!1,e)},goog.array.binarySelect=function(t,e,r){return goog.array.binarySearch_(t,e,!0,void 0,r)},goog.array.binarySearch_=function(t,e,r,n,i){for(var o,s=0,a=t.length;s<a;){var u,c=s+a>>1;0<(u=r?e.call(i,t[c],c,t):e(n,t[c]))?s=c+1:(a=c,o=!u)}return o?s:~s},goog.array.sort=function(t,e){t.sort(e||goog.array.defaultCompare)},goog.array.stableSort=function(t,e){for(var r=0;r<t.length;r++)t[r]={index:r,value:t[r]};var n=e||goog.array.defaultCompare;for(goog.array.sort(t,function(t,e){return n(t.value,e.value)||t.index-e.index}),r=0;r<t.length;r++)t[r]=t[r].value},goog.array.sortByKey=function(t,e,r){var n=r||goog.array.defaultCompare;goog.array.sort(t,function(t,r){return n(e(t),e(r))})},goog.array.sortObjectsByKey=function(t,e,r){goog.array.sortByKey(t,function(t){return t[e]},r)},goog.array.isSorted=function(t,e,r){e=e||goog.array.defaultCompare;for(var n=1;n<t.length;n++){var i=e(t[n-1],t[n]);if(0<i||0==i&&r)return!1}return!0},goog.array.equals=function(t,e,r){if(!goog.isArrayLike(t)||!goog.isArrayLike(e)||t.length!=e.length)return!1;var n=t.length;r=r||goog.array.defaultCompareEquality;for(var i=0;i<n;i++)if(!r(t[i],e[i]))return!1;return!0},goog.array.compare3=function(t,e,r){r=r||goog.array.defaultCompare;for(var n=Math.min(t.length,e.length),i=0;i<n;i++){var o=r(t[i],e[i]);if(0!=o)return o}return goog.array.defaultCompare(t.length,e.length)},goog.array.defaultCompare=function(t,e){return t>e?1:t<e?-1:0},goog.array.inverseDefaultCompare=function(t,e){return-goog.array.defaultCompare(t,e)},goog.array.defaultCompareEquality=function(t,e){return t===e},goog.array.binaryInsert=function(t,e,r){return 0>(r=goog.array.binarySearch(t,e,r))&&(goog.array.insertAt(t,e,-(r+1)),!0)},goog.array.binaryRemove=function(t,e,r){return 0<=(e=goog.array.binarySearch(t,e,r))&&goog.array.removeAt(t,e)},goog.array.bucket=function(t,e,r){for(var n={},i=0;i<t.length;i++){var o=t[i],s=e.call(r,o,i,t);goog.isDef(s)&&(n[s]||(n[s]=[])).push(o)}return n},goog.array.toObject=function(t,e,r){var n={};return goog.array.forEach(t,function(i,o){n[e.call(r,i,o,t)]=i}),n},goog.array.range=function(t,e,r){var n=[],i=0,o=t;if(r=r||1,void 0!==e&&(i=t,o=e),0>r*(o-i))return[];if(0<r)for(t=i;t<o;t+=r)n.push(t);else for(t=i;t>o;t+=r)n.push(t);return n},goog.array.repeat=function(t,e){for(var r=[],n=0;n<e;n++)r[n]=t;return r},goog.array.flatten=function(t){for(var e=[],r=0;r<arguments.length;r++){var n=arguments[r];if(goog.isArray(n))for(var i=0;i<n.length;i+=8192)for(var o=goog.array.slice(n,i,i+8192),s=(o=goog.array.flatten.apply(null,o),0);s<o.length;s++)e.push(o[s]);else e.push(n)}return e},goog.array.rotate=function(t,e){return goog.asserts.assert(null!=t.length),t.length&&(0<(e%=t.length)?Array.prototype.unshift.apply(t,t.splice(-e,e)):0>e&&Array.prototype.push.apply(t,t.splice(0,-e))),t},goog.array.moveItem=function(t,e,r){goog.asserts.assert(0<=e&&e<t.length),goog.asserts.assert(0<=r&&r<t.length),e=Array.prototype.splice.call(t,e,1),Array.prototype.splice.call(t,r,0,e[0])},goog.array.zip=function(t){if(!arguments.length)return[];for(var e=[],r=arguments[0].length,n=1;n<arguments.length;n++)arguments[n].length<r&&(r=arguments[n].length);for(n=0;n<r;n++){for(var i=[],o=0;o<arguments.length;o++)i.push(arguments[o][n]);e.push(i)}return e},goog.array.shuffle=function(t,e){for(var r=e||Math.random,n=t.length-1;0<n;n--){var i=Math.floor(r()*(n+1)),o=t[n];t[n]=t[i],t[i]=o}},goog.array.copyByIndex=function(t,e){var r=[];return goog.array.forEach(e,function(e){r.push(t[e])}),r},goog.crypt={},goog.crypt.stringToByteArray=function(t){for(var e=[],r=0,n=0;n<t.length;n++){for(var i=t.charCodeAt(n);255<i;)e[r++]=255&i,i>>=8;e[r++]=i}return e},goog.crypt.byteArrayToString=function(t){if(8192>=t.length)return String.fromCharCode.apply(null,t);for(var e="",r=0;r<t.length;r+=8192){var n=goog.array.slice(t,r,r+8192);e=e+String.fromCharCode.apply(null,n)}return e},goog.crypt.byteArrayToHex=function(t){return goog.array.map(t,function(t){return 1<(t=t.toString(16)).length?t:"0"+t}).join("")},goog.crypt.hexToByteArray=function(t){goog.asserts.assert(0==t.length%2,"Key string length must be multiple of 2");for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substring(r,r+2),16));return e},goog.crypt.stringToUtf8ByteArray=function(t){for(var e=[],r=0,n=0;n<t.length;n++){var i=t.charCodeAt(n);128>i?e[r++]=i:(2048>i?e[r++]=i>>6|192:(55296==(64512&i)&&n+1<t.length&&56320==(64512&t.charCodeAt(n+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++n)),e[r++]=i>>18|240,e[r++]=i>>12&63|128):e[r++]=i>>12|224,e[r++]=i>>6&63|128),e[r++]=63&i|128)}return e},goog.crypt.utf8ByteArrayToString=function(t){for(var e=[],r=0,n=0;r<t.length;){if(128>(s=t[r++]))e[n++]=String.fromCharCode(s);else if(191<s&&224>s){var i=t[r++];e[n++]=String.fromCharCode((31&s)<<6|63&i)}else if(239<s&&365>s){i=t[r++];var o=t[r++],s=((7&s)<<18|(63&i)<<12|(63&o)<<6|63&t[r++])-65536;e[n++]=String.fromCharCode(55296+(s>>10)),e[n++]=String.fromCharCode(56320+(1023&s))}else i=t[r++],o=t[r++],e[n++]=String.fromCharCode((15&s)<<12|(63&i)<<6|63&o)}return e.join("")},goog.crypt.xorByteArray=function(t,e){goog.asserts.assert(t.length==e.length,"XOR array lengths must match");for(var r=[],n=0;n<t.length;n++)r.push(t[n]^e[n]);return r},goog.labs={},goog.labs.userAgent={},goog.labs.userAgent.util={},goog.labs.userAgent.util.getNativeUserAgentString_=function(){var t=goog.labs.userAgent.util.getNavigator_();return t&&(t=t.userAgent)?t:""},goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator},goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_(),goog.labs.userAgent.util.setUserAgent=function(t){goog.labs.userAgent.util.userAgent_=t||goog.labs.userAgent.util.getNativeUserAgentString_()},goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_},goog.labs.userAgent.util.matchUserAgent=function(t){var e=goog.labs.userAgent.util.getUserAgent();return goog.string.contains(e,t)},goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(t){var e=goog.labs.userAgent.util.getUserAgent();return goog.string.caseInsensitiveContains(e,t)},goog.labs.userAgent.util.extractVersionTuples=function(t){for(var e,r=RegExp("(\\w[\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g"),n=[];e=r.exec(t);)n.push([e[1],e[2],e[3]||void 0]);return n},goog.labs.userAgent.platform={},goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")},goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()},goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")},goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")},goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")},goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")},goog.labs.userAgent.platform.getVersion=function(){var t=goog.labs.userAgent.util.getUserAgent(),e="";return goog.labs.userAgent.platform.isWindows()?e=(t=(e=/Windows (?:NT|Phone) ([0-9.]+)/).exec(t))?t[1]:"0.0":goog.labs.userAgent.platform.isIos()?e=(t=(e=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/).exec(t))&&t[1].replace(/_/g,"."):goog.labs.userAgent.platform.isMacintosh()?e=(t=(e=/Mac OS X ([0-9_.]+)/).exec(t))?t[1].replace(/_/g,"."):"10":goog.labs.userAgent.platform.isAndroid()?e=(t=(e=/Android\s+([^\);]+)(\)|;)/).exec(t))&&t[1]:goog.labs.userAgent.platform.isChromeOS()&&(e=(t=(e=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/).exec(t))&&t[1]),e||""},goog.labs.userAgent.platform.isVersionOrHigher=function(t){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),t)},goog.object={},goog.object.forEach=function(t,e,r){for(var n in t)e.call(r,t[n],n,t)},goog.object.filter=function(t,e,r){var n,i={};for(n in t)e.call(r,t[n],n,t)&&(i[n]=t[n]);return i},goog.object.map=function(t,e,r){var n,i={};for(n in t)i[n]=e.call(r,t[n],n,t);return i},goog.object.some=function(t,e,r){for(var n in t)if(e.call(r,t[n],n,t))return!0;return!1},goog.object.every=function(t,e,r){for(var n in t)if(!e.call(r,t[n],n,t))return!1;return!0},goog.object.getCount=function(t){var e,r=0;for(e in t)r++;return r},goog.object.getAnyKey=function(t){for(var e in t)return e},goog.object.getAnyValue=function(t){for(var e in t)return t[e]},goog.object.contains=function(t,e){return goog.object.containsValue(t,e)},goog.object.getValues=function(t){var e,r=[],n=0;for(e in t)r[n++]=t[e];return r},goog.object.getKeys=function(t){var e,r=[],n=0;for(e in t)r[n++]=e;return r},goog.object.getValueByKeys=function(t,e){for(var r=(n=goog.isArrayLike(e))?e:arguments,n=n?0:1;n<r.length&&(t=t[r[n]],goog.isDef(t));n++);return t},goog.object.containsKey=function(t,e){return null!==t&&e in t},goog.object.containsValue=function(t,e){for(var r in t)if(t[r]==e)return!0;return!1},goog.object.findKey=function(t,e,r){for(var n in t)if(e.call(r,t[n],n,t))return n},goog.object.findValue=function(t,e,r){return(e=goog.object.findKey(t,e,r))&&t[e]},goog.object.isEmpty=function(t){for(var e in t)return!1;return!0},goog.object.clear=function(t){for(var e in t)delete t[e]},goog.object.remove=function(t,e){var r;return(r=e in t)&&delete t[e],r},goog.object.add=function(t,e,r){if(null!==t&&e in t)throw Error('The object already contains the key "'+e+'"');goog.object.set(t,e,r)},goog.object.get=function(t,e,r){return null!==t&&e in t?t[e]:r},goog.object.set=function(t,e,r){t[e]=r},goog.object.setIfUndefined=function(t,e,r){return e in t?t[e]:t[e]=r},goog.object.setWithReturnValueIfNotSet=function(t,e,r){return e in t?t[e]:(r=r(),t[e]=r)},goog.object.equals=function(t,e){for(var r in t)if(!(r in e)||t[r]!==e[r])return!1;for(r in e)if(!(r in t))return!1;return!0},goog.object.clone=function(t){var e,r={};for(e in t)r[e]=t[e];return r},goog.object.unsafeClone=function(t){if("object"==(r=goog.typeOf(t))||"array"==r){if(goog.isFunction(t.clone))return t.clone();var e,r="array"==r?[]:{};for(e in t)r[e]=goog.object.unsafeClone(t[e]);return r}return t},goog.object.transpose=function(t){var e,r={};for(e in t)r[t[e]]=e;return r},goog.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.object.extend=function(t,e){for(var r,n,i=1;i<arguments.length;i++){for(r in n=arguments[i])t[r]=n[r];for(var o=0;o<goog.object.PROTOTYPE_FIELDS_.length;o++)r=goog.object.PROTOTYPE_FIELDS_[o],Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}},goog.object.create=function(t){var e=arguments.length;if(1==e&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(e%2)throw Error("Uneven number of arguments");for(var r={},n=0;n<e;n+=2)r[arguments[n]]=arguments[n+1];return r},goog.object.createSet=function(t){var e=arguments.length;if(1==e&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var r={},n=0;n<e;n++)r[arguments[n]]=!0;return r},goog.object.createImmutableView=function(t){var e=t;return Object.isFrozen&&!Object.isFrozen(t)&&(e=Object.create(t),Object.freeze(e)),e},goog.object.isImmutableView=function(t){return!!Object.isFrozen&&Object.isFrozen(t)},goog.labs.userAgent.browser={},goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")||goog.labs.userAgent.util.matchUserAgent("OPR")},goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.browser.matchEdge_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")},goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!(goog.labs.userAgent.browser.matchChrome_()||goog.labs.userAgent.browser.matchCoast_()||goog.labs.userAgent.browser.matchOpera_()||goog.labs.userAgent.browser.matchEdge_()||goog.labs.userAgent.browser.isSilk()||goog.labs.userAgent.util.matchUserAgent("Android"))},goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")},goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")},goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchOpera_()&&!goog.labs.userAgent.browser.matchEdge_()},goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())},goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_,goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_,goog.labs.userAgent.browser.isEdge=goog.labs.userAgent.browser.matchEdge_,goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_,goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_,goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_,goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_,goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_,goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_,goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")},goog.labs.userAgent.browser.getVersion=function(){function t(t){return t=goog.array.find(t,n),r[t]||""}var e=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(e);e=goog.labs.userAgent.util.extractVersionTuples(e);var r={};goog.array.forEach(e,function(t){r[t[0]]=t[1]});var n=goog.partial(goog.object.containsKey,r);return goog.labs.userAgent.browser.isOpera()?t(["Version","Opera","OPR"]):goog.labs.userAgent.browser.isEdge()?t(["Edge"]):goog.labs.userAgent.browser.isChrome()?t(["Chrome","CriOS"]):(e=e[2])&&e[1]||""},goog.labs.userAgent.browser.isVersionOrHigher=function(t){return 0<=goog.string.compareVersions(goog.labs.userAgent.browser.getVersion(),t)},goog.labs.userAgent.browser.getIEVersion_=function(t){if((e=/rv: *([\d\.]*)/.exec(t))&&e[1])return e[1];var e="",r=/MSIE +([\d\.]+)/.exec(t);if(r&&r[1])if(t=/Trident\/(\d.\d)/.exec(t),"7.0"==r[1])if(t&&t[1])switch(t[1]){case"4.0":e="8.0";break;case"5.0":e="9.0";break;case"6.0":e="10.0";break;case"7.0":e="11.0"}else e="7.0";else e=r[1];return e},goog.labs.userAgent.engine={},goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")},goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.getVersion=function(){if(e=goog.labs.userAgent.util.getUserAgent()){var t,e=goog.labs.userAgent.util.extractVersionTuples(e),r=goog.labs.userAgent.engine.getEngineTuple_(e);if(r)return"Gecko"==r[0]?goog.labs.userAgent.engine.getVersionForKey_(e,"Firefox"):r[1];if((e=e[0])&&(t=e[2])&&(t=/Trident\/([^\s;]+)/.exec(t)))return t[1]}return""},goog.labs.userAgent.engine.getEngineTuple_=function(t){if(!goog.labs.userAgent.engine.isEdge())return t[1];for(var e=0;e<t.length;e++){var r=t[e];if("Edge"==r[0])return r}},goog.labs.userAgent.engine.isVersionOrHigher=function(t){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),t)},goog.labs.userAgent.engine.getVersionForKey_=function(t,e){var r=goog.array.find(t,function(t){return e==t[0]});return r&&r[1]||""},goog.userAgent={},goog.userAgent.ASSUME_IE=!1,goog.userAgent.ASSUME_EDGE=!1,goog.userAgent.ASSUME_GECKO=!1,goog.userAgent.ASSUME_WEBKIT=!1,goog.userAgent.ASSUME_MOBILE_WEBKIT=!1,goog.userAgent.ASSUME_OPERA=!1,goog.userAgent.ASSUME_ANY_VERSION=!1,goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA,goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()},goog.userAgent.getNavigator=function(){return goog.global.navigator||null},goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera(),goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE(),goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge(),goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE,goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko(),goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit(),goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")},goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_(),goog.userAgent.SAFARI=goog.userAgent.WEBKIT,goog.userAgent.determinePlatform_=function(){var t=goog.userAgent.getNavigator();return t&&t.platform||""},goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_(),goog.userAgent.ASSUME_MAC=!1,goog.userAgent.ASSUME_WINDOWS=!1,goog.userAgent.ASSUME_LINUX=!1,goog.userAgent.ASSUME_X11=!1,goog.userAgent.ASSUME_ANDROID=!1,goog.userAgent.ASSUME_IPHONE=!1,goog.userAgent.ASSUME_IPAD=!1,goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD,goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh(),goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows(),goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()},goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_(),goog.userAgent.isX11_=function(){var t=goog.userAgent.getNavigator();return!!t&&goog.string.contains(t.appVersion||"","X11")},goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_(),goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid(),goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone(),goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.operaVersion_=function(){var t=goog.global.opera.version;try{return t()}catch(e){return t}},goog.userAgent.determineVersion_=function(){if(goog.userAgent.OPERA&&goog.global.opera)return goog.userAgent.operaVersion_();var t="",e=goog.userAgent.getVersionRegexResult_();return e&&(t=e?e[1]:""),goog.userAgent.IE&&(e=goog.userAgent.getDocumentMode_())>parseFloat(t)?String(e):t},goog.userAgent.getVersionRegexResult_=function(){var t=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv\:([^\);]+)(\)|;)/.exec(t):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(t):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(t):void 0},goog.userAgent.getDocumentMode_=function(){var t=goog.global.document;return t?t.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(t,e){return goog.string.compareVersions(t,e)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(t){return goog.userAgent.ASSUME_ANY_VERSION||goog.userAgent.isVersionOrHigherCache_[t]||(goog.userAgent.isVersionOrHigherCache_[t]=0<=goog.string.compareVersions(goog.userAgent.VERSION,t))},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(t){return Number(goog.userAgent.DOCUMENT_MODE)>=t},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=(a=goog.global.document,b=goog.userAgent.getDocumentMode_(),a&&goog.userAgent.IE?b||("CSS1Compat"==a.compatMode?parseInt(goog.userAgent.VERSION,10):5):void 0),goog.userAgent.product={},goog.userAgent.product.ASSUME_FIREFOX=!1,goog.userAgent.product.ASSUME_IPHONE=!1,goog.userAgent.product.ASSUME_IPAD=!1,goog.userAgent.product.ASSUME_ANDROID=!1,goog.userAgent.product.ASSUME_CHROME=!1,goog.userAgent.product.ASSUME_SAFARI=!1,goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI,goog.userAgent.product.OPERA=goog.userAgent.OPERA,goog.userAgent.product.IE=goog.userAgent.IE,goog.userAgent.product.EDGE=goog.userAgent.EDGE,goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox(),goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()},goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_(),goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser(),goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome(),goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()},goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_(),goog.crypt.base64={},goog.crypt.base64.byteToCharMap_=null,goog.crypt.base64.charToByteMap_=null,goog.crypt.base64.byteToCharMapWebSafe_=null,goog.crypt.base64.ENCODED_VALS_BASE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.ENCODED_VALS_BASE+"+/=",goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.ENCODED_VALS_BASE+"-_.",goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA,goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||"function"==typeof goog.global.btoa,goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&"function"==typeof goog.global.atob,goog.crypt.base64.encodeByteArray=function(t,e){goog.asserts.assert(goog.isArrayLike(t),"encodeByteArray takes an array as a parameter"),goog.crypt.base64.init_();for(var r=e?goog.crypt.base64.byteToCharMapWebSafe_:goog.crypt.base64.byteToCharMap_,n=[],i=0;i<t.length;i+=3){var o=t[i],s=i+1<t.length,a=s?t[i+1]:0,u=i+2<t.length,c=o>>2,l=(o=(3&o)<<4|a>>4,a=(15&a)<<2|(l=u?t[i+2]:0)>>6,63&l);u||(l=64,s||(a=64)),n.push(r[c],r[o],r[a],r[l])}return n.join("")},goog.crypt.base64.encodeString=function(t,e){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!e?goog.global.btoa(t):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(t),e)},goog.crypt.base64.decodeString=function(t,e){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!e)return goog.global.atob(t);var r="";return goog.crypt.base64.decodeStringInternal_(t,function(t){r+=String.fromCharCode(t)}),r},goog.crypt.base64.decodeStringToByteArray=function(t,e){var r=[];return goog.crypt.base64.decodeStringInternal_(t,function(t){r.push(t)}),r},goog.crypt.base64.decodeStringToUint8Array=function(t){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var e=new Uint8Array(Math.ceil(3*t.length/4)),r=0;return goog.crypt.base64.decodeStringInternal_(t,function(t){e[r++]=t}),e.subarray(0,r)},goog.crypt.base64.decodeStringInternal_=function(t,e){function r(e){for(;n<t.length;){var r=t.charAt(n++),i=goog.crypt.base64.charToByteMap_[r];if(null!=i)return i;if(!goog.string.isEmptyOrWhitespace(r))throw Error("Unknown base64 encoding at char: "+r)}return e}goog.crypt.base64.init_();for(var n=0;;){var i=r(-1),o=r(0),s=r(64),a=r(64);if(64===a&&-1===i)break;e(i<<2|o>>4),64!=s&&(e(o<<4&240|s>>2),64!=a&&e(s<<6&192|a))}},goog.crypt.base64.init_=function(){if(!goog.crypt.base64.byteToCharMap_){goog.crypt.base64.byteToCharMap_={},goog.crypt.base64.charToByteMap_={},goog.crypt.base64.byteToCharMapWebSafe_={};for(var t=0;t<goog.crypt.base64.ENCODED_VALS.length;t++)goog.crypt.base64.byteToCharMap_[t]=goog.crypt.base64.ENCODED_VALS.charAt(t),goog.crypt.base64.charToByteMap_[goog.crypt.base64.byteToCharMap_[t]]=t,goog.crypt.base64.byteToCharMapWebSafe_[t]=goog.crypt.base64.ENCODED_VALS_WEBSAFE.charAt(t),t>=goog.crypt.base64.ENCODED_VALS_BASE.length&&(goog.crypt.base64.charToByteMap_[goog.crypt.base64.ENCODED_VALS_WEBSAFE.charAt(t)]=t)}},jspb.ExtensionFieldInfo=function(t,e,r,n,i){this.fieldIndex=t,this.fieldName=e,this.ctor=r,this.toObjectFn=n,this.isRepeated=i},jspb.ExtensionFieldBinaryInfo=function(t,e,r,n,i,o){this.fieldInfo=t,this.binaryReaderFn=e,this.binaryWriterFn=r,this.binaryMessageSerializeFn=n,this.binaryMessageDeserializeFn=i,this.isPacked=o},jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor},jspb.Message=function(){},jspb.Message.GENERATE_TO_OBJECT=!0,jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE,jspb.Message.GENERATE_TO_STRING=!0,jspb.Message.ASSUME_LOCAL_ARRAYS=!1,jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0,jspb.Message.SUPPORTS_UINT8ARRAY_="function"==typeof Uint8Array,jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_},jspb.Message.getIndex_=function(t,e){return e+t.arrayIndexOffset_},jspb.Message.getFieldNumber_=function(t,e){return e-t.arrayIndexOffset_},jspb.Message.initialize=function(t,e,r,n,i,o){if(t.wrappers_=null,e||(e=r?[r]:[]),t.messageId_=r?String(r):void 0,t.arrayIndexOffset_=0===r?-1:0,t.array=e,jspb.Message.initPivotAndExtensionObject_(t,n),t.convertedFloatingPointFields_={},jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(t.repeatedFields=i),i)for(e=0;e<i.length;e++)(r=i[e])<t.pivot_?(r=jspb.Message.getIndex_(t,r),t.array[r]=t.array[r]||jspb.Message.EMPTY_LIST_SENTINEL_):(jspb.Message.maybeInitEmptyExtensionObject_(t),t.extensionObject_[r]=t.extensionObject_[r]||jspb.Message.EMPTY_LIST_SENTINEL_);if(o&&o.length)for(e=0;e<o.length;e++)jspb.Message.computeOneofCase(t,o[e])},jspb.Message.EMPTY_LIST_SENTINEL_=goog.DEBUG&&Object.freeze?Object.freeze([]):[],jspb.Message.isArray_=function(t){return jspb.Message.ASSUME_LOCAL_ARRAYS?t instanceof Array:goog.isArray(t)},jspb.Message.initPivotAndExtensionObject_=function(t,e){if(t.array.length){var r=t.array.length-1,n=t.array[r];if(n&&"object"==typeof n&&!jspb.Message.isArray_(n)&&!(jspb.Message.SUPPORTS_UINT8ARRAY_&&n instanceof Uint8Array))return t.pivot_=jspb.Message.getFieldNumber_(t,r),void(t.extensionObject_=n)}-1<e?(t.pivot_=e,t.extensionObject_=null):t.pivot_=Number.MAX_VALUE},jspb.Message.maybeInitEmptyExtensionObject_=function(t){var e=jspb.Message.getIndex_(t,t.pivot_);t.array[e]||(t.extensionObject_=t.array[e]={})},jspb.Message.toObjectList=function(t,e,r){for(var n=[],i=0;i<t.length;i++)n[i]=e.call(t[i],r,t[i]);return n},jspb.Message.toObjectExtension=function(t,e,r,n,i){for(var o in r){var s=r[o],a=n.call(t,s);if(null!=a){for(var u in s.fieldName)if(s.fieldName.hasOwnProperty(u))break;e[u]=s.toObjectFn?s.isRepeated?jspb.Message.toObjectList(a,s.toObjectFn,i):s.toObjectFn(i,a):a}}},jspb.Message.serializeBinaryExtensions=function(t,e,r,n){for(var i in r){var o=r[i],s=o.fieldInfo;if(!o.binaryWriterFn)throw Error("Message extension present that was generated without binary serialization support");var a=n.call(t,s);if(null!=a)if(s.isMessageType()){if(!o.binaryMessageSerializeFn)throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");o.binaryWriterFn.call(e,s.fieldIndex,a,o.binaryMessageSerializeFn)}else o.binaryWriterFn.call(e,s.fieldIndex,a)}},jspb.Message.readBinaryExtension=function(t,e,r,n,i){var o=r[e.getFieldNumber()];if(o){if(r=o.fieldInfo,!o.binaryReaderFn)throw Error("Deserializing extension whose generated code does not support binary format");var s;r.isMessageType()?(s=new r.ctor,o.binaryReaderFn.call(e,s,o.binaryMessageDeserializeFn)):s=o.binaryReaderFn.call(e),r.isRepeated&&!o.isPacked?(e=n.call(t,r))?e.push(s):i.call(t,r,[s]):i.call(t,r,s)}else e.skipField()},jspb.Message.getField=function(t,e){if(e<t.pivot_){var r=jspb.Message.getIndex_(t,e),n=t.array[r];return n===jspb.Message.EMPTY_LIST_SENTINEL_?t.array[r]=[]:n}if(t.extensionObject_)return(n=t.extensionObject_[e])===jspb.Message.EMPTY_LIST_SENTINEL_?t.extensionObject_[e]=[]:n},jspb.Message.getRepeatedField=function(t,e){if(e<t.pivot_){var r=jspb.Message.getIndex_(t,e),n=t.array[r];return n===jspb.Message.EMPTY_LIST_SENTINEL_?t.array[r]=[]:n}return(n=t.extensionObject_[e])===jspb.Message.EMPTY_LIST_SENTINEL_?t.extensionObject_[e]=[]:n},jspb.Message.getOptionalFloatingPointField=function(t,e){var r=jspb.Message.getField(t,e);return null==r?r:+r},jspb.Message.getRepeatedFloatingPointField=function(t,e){var r=jspb.Message.getRepeatedField(t,e);if(t.convertedFloatingPointFields_||(t.convertedFloatingPointFields_={}),!t.convertedFloatingPointFields_[e]){for(var n=0;n<r.length;n++)r[n]=+r[n];t.convertedFloatingPointFields_[e]=!0}return r},jspb.Message.bytesAsB64=function(t){return null==t||goog.isString(t)?t:jspb.Message.SUPPORTS_UINT8ARRAY_&&t instanceof Uint8Array?goog.crypt.base64.encodeByteArray(t):(goog.asserts.fail("Cannot coerce to b64 string: "+goog.typeOf(t)),null)},jspb.Message.bytesAsU8=function(t){return null==t||t instanceof Uint8Array?t:goog.isString(t)?goog.crypt.base64.decodeStringToUint8Array(t):(goog.asserts.fail("Cannot coerce to Uint8Array: "+goog.typeOf(t)),null)},jspb.Message.bytesListAsB64=function(t){return jspb.Message.assertConsistentTypes_(t),!t.length||goog.isString(t[0])?t:goog.array.map(t,jspb.Message.bytesAsB64)},jspb.Message.bytesListAsU8=function(t){return jspb.Message.assertConsistentTypes_(t),!t.length||t[0]instanceof Uint8Array?t:goog.array.map(t,jspb.Message.bytesAsU8)},jspb.Message.assertConsistentTypes_=function(t){if(goog.DEBUG&&t&&1<t.length){var e=goog.typeOf(t[0]);goog.array.forEach(t,function(t){goog.typeOf(t)!=e&&goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got "+goog.typeOf(t)+" expected "+e)})}},jspb.Message.getFieldWithDefault=function(t,e,r){return null==(t=jspb.Message.getField(t,e))?r:t},jspb.Message.getFieldProto3=jspb.Message.getFieldWithDefault,jspb.Message.getMapField=function(t,e,r,n){return t.wrappers_||(t.wrappers_={}),e in t.wrappers_?t.wrappers_[e]:r?void 0:((r=jspb.Message.getField(t,e))||(r=[],jspb.Message.setField(t,e,r)),t.wrappers_[e]=new jspb.Map(r,n))},jspb.Message.setField=function(t,e,r){e<t.pivot_?t.array[jspb.Message.getIndex_(t,e)]=r:(jspb.Message.maybeInitEmptyExtensionObject_(t),t.extensionObject_[e]=r)},jspb.Message.setProto3IntField=function(t,e,r){jspb.Message.setFieldIgnoringDefault_(t,e,r,0)},jspb.Message.setProto3StringIntField=function(t,e,r){jspb.Message.setFieldIgnoringDefault_(t,e,r,"0")},jspb.Message.setProto3FloatField=function(t,e,r){jspb.Message.setFieldIgnoringDefault_(t,e,r,0)},jspb.Message.setProto3BooleanField=function(t,e,r){jspb.Message.setFieldIgnoringDefault_(t,e,r,!1)},jspb.Message.setProto3StringField=function(t,e,r){jspb.Message.setFieldIgnoringDefault_(t,e,r,"")},jspb.Message.setProto3BytesField=function(t,e,r){jspb.Message.setFieldIgnoringDefault_(t,e,r,"")},jspb.Message.setProto3EnumField=function(t,e,r){jspb.Message.setFieldIgnoringDefault_(t,e,r,0)},jspb.Message.setFieldIgnoringDefault_=function(t,e,r,n){r!=n?jspb.Message.setField(t,e,r):t.array[jspb.Message.getIndex_(t,e)]=null},jspb.Message.addToRepeatedField=function(t,e,r,n){t=jspb.Message.getRepeatedField(t,e),void 0!=n?t.splice(n,0,r):t.push(r)},jspb.Message.setOneofField=function(t,e,r,n){(r=jspb.Message.computeOneofCase(t,r))&&r!==e&&void 0!==n&&(t.wrappers_&&r in t.wrappers_&&(t.wrappers_[r]=void 0),jspb.Message.setField(t,r,void 0)),jspb.Message.setField(t,e,n)},jspb.Message.computeOneofCase=function(t,e){for(var r,n,i=0;i<e.length;i++){var o=e[i],s=jspb.Message.getField(t,o);null!=s&&(r=o,n=s,jspb.Message.setField(t,o,void 0))}return r?(jspb.Message.setField(t,r,n),r):0},jspb.Message.getWrapperField=function(t,e,r,n){if(t.wrappers_||(t.wrappers_={}),!t.wrappers_[r]){var i=jspb.Message.getField(t,r);(n||i)&&(t.wrappers_[r]=new e(i))}return t.wrappers_[r]},jspb.Message.getRepeatedWrapperField=function(t,e,r){return jspb.Message.wrapRepeatedField_(t,e,r),(e=t.wrappers_[r])==jspb.Message.EMPTY_LIST_SENTINEL_&&(e=t.wrappers_[r]=[]),e},jspb.Message.wrapRepeatedField_=function(t,e,r){if(t.wrappers_||(t.wrappers_={}),!t.wrappers_[r]){for(var n=jspb.Message.getRepeatedField(t,r),i=[],o=0;o<n.length;o++)i[o]=new e(n[o]);t.wrappers_[r]=i}},jspb.Message.setWrapperField=function(t,e,r){t.wrappers_||(t.wrappers_={});var n=r?r.toArray():r;t.wrappers_[e]=r,jspb.Message.setField(t,e,n)},jspb.Message.setOneofWrapperField=function(t,e,r,n){t.wrappers_||(t.wrappers_={});var i=n?n.toArray():n;t.wrappers_[e]=n,jspb.Message.setOneofField(t,e,r,i)},jspb.Message.setRepeatedWrapperField=function(t,e,r){t.wrappers_||(t.wrappers_={}),r=r||[];for(var n=[],i=0;i<r.length;i++)n[i]=r[i].toArray();t.wrappers_[e]=r,jspb.Message.setField(t,e,n)},jspb.Message.addToRepeatedWrapperField=function(t,e,r,n,i){jspb.Message.wrapRepeatedField_(t,n,e);var o=t.wrappers_[e];return o||(o=t.wrappers_[e]=[]),r=r||new n,t=jspb.Message.getRepeatedField(t,e),void 0!=i?(o.splice(i,0,r),t.splice(i,0,r.toArray())):(o.push(r),t.push(r.toArray())),r},jspb.Message.toMap=function(t,e,r,n){for(var i={},o=0;o<t.length;o++)i[e.call(t[o])]=r?r.call(t[o],n,t[o]):t[o];return i},jspb.Message.prototype.syncMapFields_=function(){if(this.wrappers_)for(var t in this.wrappers_){var e=this.wrappers_[t];if(goog.isArray(e))for(var r=0;r<e.length;r++)e[r]&&e[r].toArray();else e&&e.toArray()}},jspb.Message.prototype.toArray=function(){return this.syncMapFields_(),this.array},jspb.Message.GENERATE_TO_STRING&&(jspb.Message.prototype.toString=function(){return this.syncMapFields_(),this.array.toString()}),jspb.Message.prototype.getExtension=function(t){if(this.extensionObject_){this.wrappers_||(this.wrappers_={});var e=t.fieldIndex;if(t.isRepeated){if(t.isMessageType())return this.wrappers_[e]||(this.wrappers_[e]=goog.array.map(this.extensionObject_[e]||[],function(e){return new t.ctor(e)})),this.wrappers_[e]}else if(t.isMessageType())return!this.wrappers_[e]&&this.extensionObject_[e]&&(this.wrappers_[e]=new t.ctor(this.extensionObject_[e])),this.wrappers_[e];return this.extensionObject_[e]}},jspb.Message.prototype.setExtension=function(t,e){this.wrappers_||(this.wrappers_={}),jspb.Message.maybeInitEmptyExtensionObject_(this);var r=t.fieldIndex;return t.isRepeated?(e=e||[],t.isMessageType()?(this.wrappers_[r]=e,this.extensionObject_[r]=goog.array.map(e,function(t){return t.toArray()})):this.extensionObject_[r]=e):t.isMessageType()?(this.wrappers_[r]=e,this.extensionObject_[r]=e?e.toArray():e):this.extensionObject_[r]=e,this},jspb.Message.difference=function(t,e){if(!(t instanceof e.constructor))throw Error("Messages have different types.");var r=t.toArray(),n=e.toArray(),i=[],o=0,s=r.length>n.length?r.length:n.length;for(t.getJsPbMessageId()&&(i[0]=t.getJsPbMessageId(),o=1);o<s;o++)jspb.Message.compareFields(r[o],n[o])||(i[o]=n[o]);return new t.constructor(i)},jspb.Message.equals=function(t,e){return t==e||!(!t||!e)&&t instanceof e.constructor&&jspb.Message.compareFields(t.toArray(),e.toArray())},jspb.Message.compareExtensions=function(t,e){t=t||{},e=e||{};var r,n={};for(r in t)n[r]=0;for(r in e)n[r]=0;for(r in n)if(!jspb.Message.compareFields(t[r],e[r]))return!1;return!0},jspb.Message.compareFields=function(t,e){if(t==e)return!0;if(!goog.isObject(t)||!goog.isObject(e))return!!(goog.isNumber(t)&&isNaN(t)||goog.isNumber(e)&&isNaN(e))&&String(t)==String(e);if(t.constructor!=e.constructor)return!1;if(jspb.Message.SUPPORTS_UINT8ARRAY_&&t.constructor===Uint8Array){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!=e[r])return!1;return!0}if(t.constructor===Array){var n=void 0,i=void 0,o=Math.max(t.length,e.length);for(r=0;r<o;r++){var s=t[r],a=e[r];if(s&&s.constructor==Object&&(goog.asserts.assert(void 0===n),goog.asserts.assert(r===t.length-1),n=s,s=void 0),a&&a.constructor==Object&&(goog.asserts.assert(void 0===i),goog.asserts.assert(r===e.length-1),i=a,a=void 0),!jspb.Message.compareFields(s,a))return!1}return!n&&!i||(n=n||{},i=i||{},jspb.Message.compareExtensions(n,i))}if(t.constructor===Object)return jspb.Message.compareExtensions(t,e);throw Error("Invalid type in JSPB array")},jspb.Message.prototype.cloneMessage=function(){return jspb.Message.cloneMessage(this)},jspb.Message.prototype.clone=function(){return jspb.Message.cloneMessage(this)},jspb.Message.clone=function(t){return jspb.Message.cloneMessage(t)},jspb.Message.cloneMessage=function(t){return new t.constructor(jspb.Message.clone_(t.toArray()))},jspb.Message.copyInto=function(t,e){goog.asserts.assertInstanceof(t,jspb.Message),goog.asserts.assertInstanceof(e,jspb.Message),goog.asserts.assert(t.constructor==e.constructor,"Copy source and target message should have the same type.");for(var r=jspb.Message.clone(t),n=e.toArray(),i=r.toArray(),o=n.length=0;o<i.length;o++)n[o]=i[o];e.wrappers_=r.wrappers_,e.extensionObject_=r.extensionObject_},jspb.Message.clone_=function(t){var e;if(goog.isArray(t)){for(var r=Array(t.length),n=0;n<t.length;n++)null!=(e=t[n])&&(r[n]="object"==typeof e?jspb.Message.clone_(goog.asserts.assert(e)):e);return r}if(jspb.Message.SUPPORTS_UINT8ARRAY_&&t instanceof Uint8Array)return new Uint8Array(t);for(n in r={},t)null!=(e=t[n])&&(r[n]="object"==typeof e?jspb.Message.clone_(goog.asserts.assert(e)):e);return r},jspb.Message.registerMessageType=function(t,e){jspb.Message.registry_[t]=e,e.messageId=t},jspb.Message.registry_={},jspb.Message.messageSetExtensions={},jspb.Message.messageSetExtensionsBinary={},jspb.arith={},jspb.arith.UInt64=function(t,e){this.lo=t,this.hi=e},jspb.arith.UInt64.prototype.cmp=function(t){return this.hi<t.hi||this.hi==t.hi&&this.lo<t.lo?-1:this.hi==t.hi&&this.lo==t.lo?0:1},jspb.arith.UInt64.prototype.rightShift=function(){return new jspb.arith.UInt64((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},jspb.arith.UInt64.prototype.msb=function(){return!!(2147483648&this.hi)},jspb.arith.UInt64.prototype.lsb=function(){return!!(1&this.lo)},jspb.arith.UInt64.prototype.zero=function(){return 0==this.lo&&0==this.hi},jspb.arith.UInt64.prototype.add=function(t){return new jspb.arith.UInt64((this.lo+t.lo&4294967295)>>>0>>>0,((this.hi+t.hi&4294967295)>>>0)+(4294967296<=this.lo+t.lo?1:0)>>>0)},jspb.arith.UInt64.prototype.sub=function(t){return new jspb.arith.UInt64((this.lo-t.lo&4294967295)>>>0>>>0,((this.hi-t.hi&4294967295)>>>0)-(0>this.lo-t.lo?1:0)>>>0)},jspb.arith.UInt64.mul32x32=function(t,e){for(var r=t>>>16,n=65535&e,i=e>>>16,o=(s=65535&t)*n+65536*(s*i&65535)+65536*(r*n&65535),s=r*i+(s*i>>>16)+(r*n>>>16);4294967296<=o;)o-=4294967296,s+=1;return new jspb.arith.UInt64(o>>>0,s>>>0)},jspb.arith.UInt64.prototype.mul=function(t){var e=jspb.arith.UInt64.mul32x32(this.lo,t);return(t=jspb.arith.UInt64.mul32x32(this.hi,t)).hi=t.lo,t.lo=0,e.add(t)},jspb.arith.UInt64.prototype.div=function(t){if(0==t)return[];var e=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(this.lo,this.hi);t=new jspb.arith.UInt64(t,0);for(var n=new jspb.arith.UInt64(1,0);!t.msb();)t=t.leftShift(),n=n.leftShift();for(;!n.zero();)0>=t.cmp(r)&&(e=e.add(n),r=r.sub(t)),t=t.rightShift(),n=n.rightShift();return[e,r]},jspb.arith.UInt64.prototype.toString=function(){for(var t="",e=this;!e.zero();){var r=(e=e.div(10))[0];t=e[1].lo+t,e=r}return""==t&&(t="0"),t},jspb.arith.UInt64.fromString=function(t){for(var e=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(0,0),n=0;n<t.length;n++){if("0">t[n]||"9"<t[n])return null;var i=parseInt(t[n],10);r.lo=i,e=e.mul(10).add(r)}return e},jspb.arith.UInt64.prototype.clone=function(){return new jspb.arith.UInt64(this.lo,this.hi)},jspb.arith.Int64=function(t,e){this.lo=t,this.hi=e},jspb.arith.Int64.prototype.add=function(t){return new jspb.arith.Int64((this.lo+t.lo&4294967295)>>>0>>>0,((this.hi+t.hi&4294967295)>>>0)+(4294967296<=this.lo+t.lo?1:0)>>>0)},jspb.arith.Int64.prototype.sub=function(t){return new jspb.arith.Int64((this.lo-t.lo&4294967295)>>>0>>>0,((this.hi-t.hi&4294967295)>>>0)-(0>this.lo-t.lo?1:0)>>>0)},jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)},jspb.arith.Int64.prototype.toString=function(){var t=0!=(2147483648&this.hi),e=new jspb.arith.UInt64(this.lo,this.hi);return t&&(e=new jspb.arith.UInt64(0,0).sub(e)),(t?"-":"")+e.toString()},jspb.arith.Int64.fromString=function(t){var e=0<t.length&&"-"==t[0];return e&&(t=t.substring(1)),null===(t=jspb.arith.UInt64.fromString(t))?null:(e&&(t=new jspb.arith.UInt64(0,0).sub(t)),new jspb.arith.Int64(t.lo,t.hi))},jspb.BinaryConstants={},jspb.ConstBinaryMessage=function(){},jspb.BinaryMessage=function(){},jspb.BinaryConstants.FieldType={INVALID:-1,DOUBLE:1,FLOAT:2,INT64:3,UINT64:4,INT32:5,FIXED64:6,FIXED32:7,BOOL:8,STRING:9,GROUP:10,MESSAGE:11,BYTES:12,UINT32:13,ENUM:14,SFIXED32:15,SFIXED64:16,SINT32:17,SINT64:18,FHASH64:30,VHASH64:31},jspb.BinaryConstants.WireType={INVALID:-1,VARINT:0,FIXED64:1,DELIMITED:2,START_GROUP:3,END_GROUP:4,FIXED32:5},jspb.BinaryConstants.FieldTypeToWireType=function(t){var e=jspb.BinaryConstants.FieldType,r=jspb.BinaryConstants.WireType;switch(t){case e.INT32:case e.INT64:case e.UINT32:case e.UINT64:case e.SINT32:case e.SINT64:case e.BOOL:case e.ENUM:case e.VHASH64:return r.VARINT;case e.DOUBLE:case e.FIXED64:case e.SFIXED64:case e.FHASH64:return r.FIXED64;case e.STRING:case e.MESSAGE:case e.BYTES:return r.DELIMITED;case e.FLOAT:case e.FIXED32:case e.SFIXED32:return r.FIXED32;default:return r.INVALID}},jspb.BinaryConstants.INVALID_FIELD_NUMBER=-1,jspb.BinaryConstants.FLOAT32_EPS=1.401298464324817e-45,jspb.BinaryConstants.FLOAT32_MIN=1.1754943508222875e-38,jspb.BinaryConstants.FLOAT32_MAX=3.4028234663852886e38,jspb.BinaryConstants.FLOAT64_EPS=5e-324,jspb.BinaryConstants.FLOAT64_MIN=2.2250738585072014e-308,jspb.BinaryConstants.FLOAT64_MAX=1.7976931348623157e308,jspb.BinaryConstants.TWO_TO_20=1048576,jspb.BinaryConstants.TWO_TO_23=8388608,jspb.BinaryConstants.TWO_TO_31=2147483648,jspb.BinaryConstants.TWO_TO_32=4294967296,jspb.BinaryConstants.TWO_TO_52=4503599627370496,jspb.BinaryConstants.TWO_TO_63=0x8000000000000000,jspb.BinaryConstants.TWO_TO_64=0x10000000000000000,jspb.BinaryConstants.ZERO_HASH="\0\0\0\0\0\0\0\0",jspb.utils={},jspb.utils.split64Low=0,jspb.utils.split64High=0,jspb.utils.splitUint64=function(t){var e=t>>>0;t=Math.floor((t-e)/jspb.BinaryConstants.TWO_TO_32)>>>0,jspb.utils.split64Low=e,jspb.utils.split64High=t},jspb.utils.splitInt64=function(t){var e=0>t,r=(t=Math.abs(t))>>>0;t=Math.floor((t-r)/jspb.BinaryConstants.TWO_TO_32),t>>>=0,e&&(t=~t>>>0,4294967295<(r=1+(~r>>>0))&&(r=0,4294967295<++t&&(t=0))),jspb.utils.split64Low=r,jspb.utils.split64High=t},jspb.utils.splitZigzag64=function(t){var e=0>t;t=2*Math.abs(t),jspb.utils.splitUint64(t),t=jspb.utils.split64Low;var r=jspb.utils.split64High;e&&(0==t?0==r?r=t=4294967295:(r--,t=4294967295):t--),jspb.utils.split64Low=t,jspb.utils.split64High=r},jspb.utils.splitFloat32=function(t){var e,r=0>t?1:0;0===(t=r?-t:t)?0<1/t?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648):isNaN(t)?(jspb.utils.split64High=0,jspb.utils.split64Low=2147483647):t>jspb.BinaryConstants.FLOAT32_MAX?(jspb.utils.split64High=0,jspb.utils.split64Low=(r<<31|2139095040)>>>0):t<jspb.BinaryConstants.FLOAT32_MIN?(t=Math.round(t/Math.pow(2,-149)),jspb.utils.split64High=0,jspb.utils.split64Low=(r<<31|t)>>>0):(e=Math.floor(Math.log(t)/Math.LN2),t*=Math.pow(2,-e),t=8388607&Math.round(t*jspb.BinaryConstants.TWO_TO_23),jspb.utils.split64High=0,jspb.utils.split64Low=(r<<31|e+127<<23|t)>>>0)},jspb.utils.splitFloat64=function(t){var e=0>t?1:0;if(0===(t=e?-t:t))jspb.utils.split64High=0<1/t?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(t))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(t>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(e<<31|2146435072)>>>0,jspb.utils.split64Low=0;else if(t<jspb.BinaryConstants.FLOAT64_MIN){var r=t/Math.pow(2,-1074);t=r/jspb.BinaryConstants.TWO_TO_32,jspb.utils.split64High=(e<<31|t)>>>0,jspb.utils.split64Low=r>>>0}else{var n=Math.floor(Math.log(t)/Math.LN2);1024==n&&(n=1023),t=(r=t*Math.pow(2,-n))*jspb.BinaryConstants.TWO_TO_20&1048575,r=r*jspb.BinaryConstants.TWO_TO_52>>>0,jspb.utils.split64High=(e<<31|n+1023<<20|t)>>>0,jspb.utils.split64Low=r}},jspb.utils.splitHash64=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),o=t.charCodeAt(4),s=t.charCodeAt(5),a=t.charCodeAt(6);t=t.charCodeAt(7),jspb.utils.split64Low=e+(r<<8)+(n<<16)+(i<<24)>>>0,jspb.utils.split64High=o+(s<<8)+(a<<16)+(t<<24)>>>0},jspb.utils.joinUint64=function(t,e){return e*jspb.BinaryConstants.TWO_TO_32+t},jspb.utils.joinInt64=function(t,e){var r=2147483648&e;r&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0));var n=jspb.utils.joinUint64(t,e);return r?-n:n},jspb.utils.joinZigzag64=function(t,e){var r=1&t;t=(t>>>1|e<<31)>>>0,e>>>=1,r&&(0==(t=t+1>>>0)&&(e=e+1>>>0));var n=jspb.utils.joinUint64(t,e);return r?-n:n},jspb.utils.joinFloat32=function(t,e){var r=2*(t>>31)+1,n=t>>>23&255,i=8388607&t;return 255==n?i?NaN:1/0*r:0==n?r*Math.pow(2,-149)*i:r*Math.pow(2,n-150)*(i+Math.pow(2,23))},jspb.utils.joinFloat64=function(t,e){var r=2*(e>>31)+1,n=e>>>20&2047,i=jspb.BinaryConstants.TWO_TO_32*(1048575&e)+t;return 2047==n?i?NaN:1/0*r:0==n?r*Math.pow(2,-1074)*i:r*Math.pow(2,n-1075)*(i+jspb.BinaryConstants.TWO_TO_52)},jspb.utils.joinHash64=function(t,e){return String.fromCharCode(t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255,e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255)},jspb.utils.DIGITS="0123456789abcdef".split(""),jspb.utils.joinUnsignedDecimalString=function(t,e){function r(t){for(var e=1e7,r=0;7>r;r++){var n=t/(e=e/10)%10>>>0;(0!=n||a)&&(a=!0,u+=s[n])}}if(2097151>=e)return""+(jspb.BinaryConstants.TWO_TO_32*e+t);var n=(16777215&t)+6777216*(i=(t>>>24|e<<8)>>>0&16777215)+6710656*(o=e>>16&65535),i=i+8147497*o,o=2*o;1e7<=n&&(i+=Math.floor(n/1e7),n%=1e7),1e7<=i&&(o+=Math.floor(i/1e7),i%=1e7);var s=jspb.utils.DIGITS,a=!1,u="";return(o||a)&&r(o),(i||a)&&r(i),(n||a)&&r(n),u},jspb.utils.joinSignedDecimalString=function(t,e){var r=2147483648&e;r&&(e=~e+(0==(t=1+~t>>>0)?1:0)>>>0);var n=jspb.utils.joinUnsignedDecimalString(t,e);return r?"-"+n:n},jspb.utils.hash64ToDecimalString=function(t,e){jspb.utils.splitHash64(t);var r=jspb.utils.split64Low,n=jspb.utils.split64High;return e?jspb.utils.joinSignedDecimalString(r,n):jspb.utils.joinUnsignedDecimalString(r,n)},jspb.utils.hash64ArrayToDecimalStrings=function(t,e){for(var r=Array(t.length),n=0;n<t.length;n++)r[n]=jspb.utils.hash64ToDecimalString(t[n],e);return r},jspb.utils.decimalStringToHash64=function(t){function e(t,e){for(var r=0;8>r&&(1!==t||0<e);r++){var i=t*n[r]+e;n[r]=255&i,e=i>>>8}}goog.asserts.assert(0<t.length);var r=!1;"-"===t[0]&&(r=!0,t=t.slice(1));for(var n=[0,0,0,0,0,0,0,0],i=0;i<t.length;i++)e(10,jspb.utils.DIGITS.indexOf(t[i]));return r&&(function(){for(var t=0;8>t;t++)n[t]=255&~n[t]}(),e(1,1)),goog.crypt.byteArrayToString(n)},jspb.utils.splitDecimalString=function(t){jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(t))},jspb.utils.hash64ToHexString=function(t){var e=Array(18);e[0]="0",e[1]="x";for(var r=0;8>r;r++){var n=t.charCodeAt(7-r);e[2*r+2]=jspb.utils.DIGITS[n>>4],e[2*r+3]=jspb.utils.DIGITS[15&n]}return e.join("")},jspb.utils.hexStringToHash64=function(t){t=t.toLowerCase(),goog.asserts.assert(18==t.length),goog.asserts.assert("0"==t[0]),goog.asserts.assert("x"==t[1]);for(var e="",r=0;8>r;r++){var n=jspb.utils.DIGITS.indexOf(t[2*r+2]),i=jspb.utils.DIGITS.indexOf(t[2*r+3]);e=String.fromCharCode(16*n+i)+e}return e},jspb.utils.hash64ToNumber=function(t,e){jspb.utils.splitHash64(t);var r=jspb.utils.split64Low,n=jspb.utils.split64High;return e?jspb.utils.joinInt64(r,n):jspb.utils.joinUint64(r,n)},jspb.utils.numberToHash64=function(t){return jspb.utils.splitInt64(t),jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.utils.countVarints=function(t,e,r){for(var n=0,i=e;i<r;i++)n+=t[i]>>7;return r-e-n},jspb.utils.countVarintFields=function(t,e,r,n){var i=0;if(128>(n=8*n+jspb.BinaryConstants.WireType.VARINT))for(;e<r&&t[e++]==n;)for(i++;;){var o=t[e++];if(0==(128&o))break}else for(;e<r;){for(o=n;128<o;){if(t[e]!=(127&o|128))return i;e++,o>>=7}if(t[e++]!=o)break;for(i++;0!=(128&(o=t[e++])););}return i},jspb.utils.countFixedFields_=function(t,e,r,n,i){var o=0;if(128>n)for(;e<r&&t[e++]==n;)o++,e+=i;else for(;e<r;){for(var s=n;128<s;){if(t[e++]!=(127&s|128))return o;s>>=7}if(t[e++]!=s)break;o++,e+=i}return o},jspb.utils.countFixed32Fields=function(t,e,r,n){return jspb.utils.countFixedFields_(t,e,r,8*n+jspb.BinaryConstants.WireType.FIXED32,4)},jspb.utils.countFixed64Fields=function(t,e,r,n){return jspb.utils.countFixedFields_(t,e,r,8*n+jspb.BinaryConstants.WireType.FIXED64,8)},jspb.utils.countDelimitedFields=function(t,e,r,n){var i=0;for(n=8*n+jspb.BinaryConstants.WireType.DELIMITED;e<r;){for(var o=n;128<o;){if(t[e++]!=(127&o|128))return i;o>>=7}if(t[e++]!=o)break;i++;for(var s=0,a=1;s+=(127&(o=t[e++]))*a,a*=128,0!=(128&o););e+=s}return i},jspb.utils.debugBytesToTextFormat=function(t){var e='"';if(t){t=jspb.utils.byteSourceToUint8Array(t);for(var r=0;r<t.length;r++)e+="\\x",16>t[r]&&(e+="0"),e+=t[r].toString(16)}return e+'"'},jspb.utils.debugScalarToTextFormat=function(t){return goog.isString(t)?goog.string.quote(t):t.toString()},jspb.utils.stringToByteArray=function(t){for(var e=new Uint8Array(t.length),r=0;r<t.length;r++){var n=t.charCodeAt(r);if(255<n)throw Error("Conversion error: string contains codepoint outside of byte range");e[r]=n}return e},jspb.utils.byteSourceToUint8Array=function(t){return t.constructor===Uint8Array?t:t.constructor===ArrayBuffer||t.constructor===Buffer||t.constructor===Array?new Uint8Array(t):t.constructor===String?goog.crypt.base64.decodeStringToUint8Array(t):(goog.asserts.fail("Type not convertible to Uint8Array."),new Uint8Array(0))},jspb.BinaryEncoder=function(){this.buffer_=[]},jspb.BinaryEncoder.prototype.length=function(){return this.buffer_.length},jspb.BinaryEncoder.prototype.end=function(){var t=this.buffer_;return this.buffer_=[],t},jspb.BinaryEncoder.prototype.writeSplitVarint64=function(t,e){for(goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32);0<e||127<t;)this.buffer_.push(127&t|128),t=(t>>>7|e<<25)>>>0,e>>>=7;this.buffer_.push(t)},jspb.BinaryEncoder.prototype.writeSplitFixed64=function(t,e){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),this.writeUint32(t),this.writeUint32(e)},jspb.BinaryEncoder.prototype.writeUnsignedVarint32=function(t){for(goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32);127<t;)this.buffer_.push(127&t|128),t>>>=7;this.buffer_.push(t)},jspb.BinaryEncoder.prototype.writeSignedVarint32=function(t){if(goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),0<=t)this.writeUnsignedVarint32(t);else{for(var e=0;9>e;e++)this.buffer_.push(127&t|128),t>>=7;this.buffer_.push(1)}},jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitInt64(t),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeSignedVarint64=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(t),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint32=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeUnsignedVarint32((t<<1^t>>31)>>>0)},jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitZigzag64(t),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint64String=function(t){this.writeZigzagVarint64(parseInt(t,10))},jspb.BinaryEncoder.prototype.writeUint8=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=t&&256>t),this.buffer_.push(t>>>0&255)},jspb.BinaryEncoder.prototype.writeUint16=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=t&&65536>t),this.buffer_.push(t>>>0&255),this.buffer_.push(t>>>8&255)},jspb.BinaryEncoder.prototype.writeUint32=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.buffer_.push(t>>>0&255),this.buffer_.push(t>>>8&255),this.buffer_.push(t>>>16&255),this.buffer_.push(t>>>24&255)},jspb.BinaryEncoder.prototype.writeUint64=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitUint64(t),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt8=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(-128<=t&&128>t),this.buffer_.push(t>>>0&255)},jspb.BinaryEncoder.prototype.writeInt16=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(-32768<=t&&32768>t),this.buffer_.push(t>>>0&255),this.buffer_.push(t>>>8&255)},jspb.BinaryEncoder.prototype.writeInt32=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.buffer_.push(t>>>0&255),this.buffer_.push(t>>>8&255),this.buffer_.push(t>>>16&255),this.buffer_.push(t>>>24&255)},jspb.BinaryEncoder.prototype.writeInt64=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(t),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt64String=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(+t>=-jspb.BinaryConstants.TWO_TO_63&&+t<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(t)),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFloat=function(t){goog.asserts.assert(t>=-jspb.BinaryConstants.FLOAT32_MAX&&t<=jspb.BinaryConstants.FLOAT32_MAX),jspb.utils.splitFloat32(t),this.writeUint32(jspb.utils.split64Low)},jspb.BinaryEncoder.prototype.writeDouble=function(t){goog.asserts.assert(t>=-jspb.BinaryConstants.FLOAT64_MAX&&t<=jspb.BinaryConstants.FLOAT64_MAX),jspb.utils.splitFloat64(t),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeBool=function(t){goog.asserts.assert(goog.isBoolean(t)||goog.isNumber(t)),this.buffer_.push(t?1:0)},jspb.BinaryEncoder.prototype.writeEnum=function(t){goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32(t)},jspb.BinaryEncoder.prototype.writeBytes=function(t){this.buffer_.push.apply(this.buffer_,t)},jspb.BinaryEncoder.prototype.writeVarintHash64=function(t){jspb.utils.splitHash64(t),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFixedHash64=function(t){jspb.utils.splitHash64(t),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeString=function(t){for(var e=this.buffer_.length,r=0;r<t.length;r++){var n=t.charCodeAt(r);if(128>n)this.buffer_.push(n);else if(2048>n)this.buffer_.push(n>>6|192),this.buffer_.push(63&n|128);else if(65536>n)if(55296<=n&&56319>=n&&r+1<t.length){var i=t.charCodeAt(r+1);56320<=i&&57343>=i&&(n=1024*(n-55296)+i-56320+65536,this.buffer_.push(n>>18|240),this.buffer_.push(n>>12&63|128),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128),r++)}else this.buffer_.push(n>>12|224),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128)}return this.buffer_.length-e},jspb.BinaryWriter=function(){this.blocks_=[],this.totalLength_=0,this.encoder_=new jspb.BinaryEncoder,this.bookmarks_=[]},jspb.BinaryWriter.prototype.appendUint8Array_=function(t){var e=this.encoder_.end();this.blocks_.push(e),this.blocks_.push(t),this.totalLength_+=e.length+t.length},jspb.BinaryWriter.prototype.beginDelimited_=function(t){return this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),t=this.encoder_.end(),this.blocks_.push(t),this.totalLength_+=t.length,t.push(this.totalLength_),t},jspb.BinaryWriter.prototype.endDelimited_=function(t){var e=t.pop();e=this.totalLength_+this.encoder_.length()-e;for(goog.asserts.assert(0<=e);127<e;)t.push(127&e|128),e>>>=7,this.totalLength_++;t.push(e),this.totalLength_++},jspb.BinaryWriter.prototype.writeSerializedMessage=function(t,e,r){this.appendUint8Array_(t.subarray(e,r))},jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(t,e,r){null!=t&&null!=e&&null!=r&&this.writeSerializedMessage(t,e,r)},jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[],this.encoder_.end(),this.totalLength_=0,this.bookmarks_=[]},jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(0==this.bookmarks_.length);for(var t=new Uint8Array(this.totalLength_+this.encoder_.length()),e=this.blocks_,r=e.length,n=0,i=0;i<r;i++){var o=e[i];t.set(o,n),n+=o.length}return e=this.encoder_.end(),t.set(e,n),n+=e.length,goog.asserts.assert(n==t.length),this.blocks_=[t],t},jspb.BinaryWriter.prototype.getResultBase64String=function(t){return goog.crypt.base64.encodeByteArray(this.getResultBuffer(),t)},jspb.BinaryWriter.prototype.beginSubMessage=function(t){this.bookmarks_.push(this.beginDelimited_(t))},jspb.BinaryWriter.prototype.endSubMessage=function(){goog.asserts.assert(0<=this.bookmarks_.length),this.endDelimited_(this.bookmarks_.pop())},jspb.BinaryWriter.prototype.writeFieldHeader_=function(t,e){goog.asserts.assert(1<=t&&t==Math.floor(t)),this.encoder_.writeUnsignedVarint32(8*t+e)},jspb.BinaryWriter.prototype.writeAny=function(t,e,r){var n=jspb.BinaryConstants.FieldType;switch(t){case n.DOUBLE:this.writeDouble(e,r);break;case n.FLOAT:this.writeFloat(e,r);break;case n.INT64:this.writeInt64(e,r);break;case n.UINT64:this.writeUint64(e,r);break;case n.INT32:this.writeInt32(e,r);break;case n.FIXED64:this.writeFixed64(e,r);break;case n.FIXED32:this.writeFixed32(e,r);break;case n.BOOL:this.writeBool(e,r);break;case n.STRING:this.writeString(e,r);break;case n.GROUP:goog.asserts.fail("Group field type not supported in writeAny()");break;case n.MESSAGE:goog.asserts.fail("Message field type not supported in writeAny()");break;case n.BYTES:this.writeBytes(e,r);break;case n.UINT32:this.writeUint32(e,r);break;case n.ENUM:this.writeEnum(e,r);break;case n.SFIXED32:this.writeSfixed32(e,r);break;case n.SFIXED64:this.writeSfixed64(e,r);break;case n.SINT32:this.writeSint32(e,r);break;case n.SINT64:this.writeSint64(e,r);break;case n.FHASH64:this.writeFixedHash64(e,r);break;case n.VHASH64:this.writeVarintHash64(e,r);break;default:goog.asserts.fail("Invalid field type in writeAny()")}},jspb.BinaryWriter.prototype.writeUnsignedVarint32_=function(t,e){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint32(e))},jspb.BinaryWriter.prototype.writeSignedVarint32_=function(t,e){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(e))},jspb.BinaryWriter.prototype.writeUnsignedVarint64_=function(t,e){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint64(e))},jspb.BinaryWriter.prototype.writeSignedVarint64_=function(t,e){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint64(e))},jspb.BinaryWriter.prototype.writeZigzagVarint32_=function(t,e){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint32(e))},jspb.BinaryWriter.prototype.writeZigzagVarint64_=function(t,e){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64(e))},jspb.BinaryWriter.prototype.writeZigzagVarint64String_=function(t,e){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64String(e))},jspb.BinaryWriter.prototype.writeInt32=function(t,e){null!=e&&(goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(t,e))},jspb.BinaryWriter.prototype.writeInt32String=function(t,e){if(null!=e){var r=parseInt(e,10);goog.asserts.assert(r>=-jspb.BinaryConstants.TWO_TO_31&&r<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(t,r)}},jspb.BinaryWriter.prototype.writeInt64=function(t,e){null!=e&&(goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),this.writeSignedVarint64_(t,e))},jspb.BinaryWriter.prototype.writeInt64String=function(t,e){if(null!=e){var r=jspb.arith.Int64.fromString(e);this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(r.lo,r.hi)}},jspb.BinaryWriter.prototype.writeUint32=function(t,e){null!=e&&(goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(t,e))},jspb.BinaryWriter.prototype.writeUint32String=function(t,e){if(null!=e){var r=parseInt(e,10);goog.asserts.assert(0<=r&&r<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(t,r)}},jspb.BinaryWriter.prototype.writeUint64=function(t,e){null!=e&&(goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),this.writeUnsignedVarint64_(t,e))},jspb.BinaryWriter.prototype.writeUint64String=function(t,e){if(null!=e){var r=jspb.arith.UInt64.fromString(e);this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(r.lo,r.hi)}},jspb.BinaryWriter.prototype.writeSint32=function(t,e){null!=e&&(goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeZigzagVarint32_(t,e))},jspb.BinaryWriter.prototype.writeSint64=function(t,e){null!=e&&(goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),this.writeZigzagVarint64_(t,e))},jspb.BinaryWriter.prototype.writeSint64String=function(t,e){null!=e&&(goog.asserts.assert(+e>=-jspb.BinaryConstants.TWO_TO_63&&+e<jspb.BinaryConstants.TWO_TO_63),this.writeZigzagVarint64String_(t,e))},jspb.BinaryWriter.prototype.writeFixed32=function(t,e){null!=e&&(goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeUint32(e))},jspb.BinaryWriter.prototype.writeFixed64=function(t,e){null!=e&&(goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeUint64(e))},jspb.BinaryWriter.prototype.writeFixed64String=function(t,e){if(null!=e){var r=jspb.arith.UInt64.fromString(e);this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(r.lo,r.hi)}},jspb.BinaryWriter.prototype.writeSfixed32=function(t,e){null!=e&&(goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeInt32(e))},jspb.BinaryWriter.prototype.writeSfixed64=function(t,e){null!=e&&(goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeInt64(e))},jspb.BinaryWriter.prototype.writeSfixed64String=function(t,e){if(null!=e){var r=jspb.arith.Int64.fromString(e);this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(r.lo,r.hi)}},jspb.BinaryWriter.prototype.writeFloat=function(t,e){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeFloat(e))},jspb.BinaryWriter.prototype.writeDouble=function(t,e){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeDouble(e))},jspb.BinaryWriter.prototype.writeBool=function(t,e){null!=e&&(goog.asserts.assert(goog.isBoolean(e)||goog.isNumber(e)),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeBool(e))},jspb.BinaryWriter.prototype.writeEnum=function(t,e){null!=e&&(goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(e))},jspb.BinaryWriter.prototype.writeString=function(t,e){if(null!=e){var r=this.beginDelimited_(t);this.encoder_.writeString(e),this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writeBytes=function(t,e){if(null!=e){var r=jspb.utils.byteSourceToUint8Array(e);this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(r.length),this.appendUint8Array_(r)}},jspb.BinaryWriter.prototype.writeMessage=function(t,e,r){null!=e&&(t=this.beginDelimited_(t),r(e,this),this.endDelimited_(t))},jspb.BinaryWriter.prototype.writeGroup=function(t,e,r){null!=e&&(this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.START_GROUP),r(e,this),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeFixedHash64=function(t,e){null!=e&&(goog.asserts.assert(8==e.length),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeFixedHash64(e))},jspb.BinaryWriter.prototype.writeVarintHash64=function(t,e){null!=e&&(goog.asserts.assert(8==e.length),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeVarintHash64(e))},jspb.BinaryWriter.prototype.writeRepeatedInt32=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeSignedVarint32_(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedInt32String=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeInt32String(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedInt64=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeSignedVarint64_(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedInt64String=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeInt64String(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeUnsignedVarint32_(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32String=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeUint32String(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeUnsignedVarint64_(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64String=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeUint64String(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedSint32=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeZigzagVarint32_(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeZigzagVarint64_(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64String=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeZigzagVarint64String_(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed32=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeFixed32(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeFixed64(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64String=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeFixed64String(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed32=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeSfixed32(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeSfixed64(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64String=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeSfixed64String(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedFloat=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeFloat(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedDouble=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeDouble(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedBool=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeBool(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedEnum=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeEnum(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedString=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeString(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedBytes=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeBytes(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedMessage=function(t,e,r){if(null!=e)for(var n=0;n<e.length;n++){var i=this.beginDelimited_(t);r(e[n],this),this.endDelimited_(i)}},jspb.BinaryWriter.prototype.writeRepeatedGroup=function(t,e,r){if(null!=e)for(var n=0;n<e.length;n++)this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.START_GROUP),r(e[n],this),this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.END_GROUP)},jspb.BinaryWriter.prototype.writeRepeatedFixedHash64=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeFixedHash64(t,e[r])},jspb.BinaryWriter.prototype.writeRepeatedVarintHash64=function(t,e){if(null!=e)for(var r=0;r<e.length;r++)this.writeVarintHash64(t,e[r])},jspb.BinaryWriter.prototype.writePackedInt32=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeSignedVarint32(e[n]);this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedInt32String=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeSignedVarint32(parseInt(e[n],10));this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedInt64=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeSignedVarint64(e[n]);this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedInt64String=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++){var i=jspb.arith.Int64.fromString(e[n]);this.encoder_.writeSplitVarint64(i.lo,i.hi)}this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedUint32=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeUnsignedVarint32(e[n]);this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedUint32String=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeUnsignedVarint32(parseInt(e[n],10));this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedUint64=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeUnsignedVarint64(e[n]);this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedUint64String=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++){var i=jspb.arith.UInt64.fromString(e[n]);this.encoder_.writeSplitVarint64(i.lo,i.hi)}this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedSint32=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeZigzagVarint32(e[n]);this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedSint64=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeZigzagVarint64(e[n]);this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedSint64String=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeZigzagVarint64(parseInt(e[n],10));this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedFixed32=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*e.length);for(var r=0;r<e.length;r++)this.encoder_.writeUint32(e[r])}},jspb.BinaryWriter.prototype.writePackedFixed64=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*e.length);for(var r=0;r<e.length;r++)this.encoder_.writeUint64(e[r])}},jspb.BinaryWriter.prototype.writePackedFixed64String=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*e.length);for(var r=0;r<e.length;r++){var n=jspb.arith.UInt64.fromString(e[r]);this.encoder_.writeSplitFixed64(n.lo,n.hi)}}},jspb.BinaryWriter.prototype.writePackedSfixed32=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*e.length);for(var r=0;r<e.length;r++)this.encoder_.writeInt32(e[r])}},jspb.BinaryWriter.prototype.writePackedSfixed64=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*e.length);for(var r=0;r<e.length;r++)this.encoder_.writeInt64(e[r])}},jspb.BinaryWriter.prototype.writePackedSfixed64String=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*e.length);for(var r=0;r<e.length;r++)this.encoder_.writeInt64String(e[r])}},jspb.BinaryWriter.prototype.writePackedFloat=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*e.length);for(var r=0;r<e.length;r++)this.encoder_.writeFloat(e[r])}},jspb.BinaryWriter.prototype.writePackedDouble=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*e.length);for(var r=0;r<e.length;r++)this.encoder_.writeDouble(e[r])}},jspb.BinaryWriter.prototype.writePackedBool=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(e.length);for(var r=0;r<e.length;r++)this.encoder_.writeBool(e[r])}},jspb.BinaryWriter.prototype.writePackedEnum=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeEnum(e[n]);this.endDelimited_(r)}},jspb.BinaryWriter.prototype.writePackedFixedHash64=function(t,e){if(null!=e&&e.length){this.writeFieldHeader_(t,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*e.length);for(var r=0;r<e.length;r++)this.encoder_.writeFixedHash64(e[r])}},jspb.BinaryWriter.prototype.writePackedVarintHash64=function(t,e){if(null!=e&&e.length){for(var r=this.beginDelimited_(t),n=0;n<e.length;n++)this.encoder_.writeVarintHash64(e[n]);this.endDelimited_(r)}},jspb.BinaryIterator=function(t,e,r){this.elements_=this.nextMethod_=this.decoder_=null,this.cursor_=0,this.nextValue_=null,this.atEnd_=!0,this.init_(t,e,r)},jspb.BinaryIterator.prototype.init_=function(t,e,r){t&&e&&(this.decoder_=t,this.nextMethod_=e),this.elements_=r||null,this.cursor_=0,this.nextValue_=null,this.atEnd_=!this.decoder_&&!this.elements_,this.next()},jspb.BinaryIterator.instanceCache_=[],jspb.BinaryIterator.alloc=function(t,e,r){if(jspb.BinaryIterator.instanceCache_.length){var n=jspb.BinaryIterator.instanceCache_.pop();return n.init_(t,e,r),n}return new jspb.BinaryIterator(t,e,r)},jspb.BinaryIterator.prototype.free=function(){this.clear(),100>jspb.BinaryIterator.instanceCache_.length&&jspb.BinaryIterator.instanceCache_.push(this)},jspb.BinaryIterator.prototype.clear=function(){this.decoder_&&this.decoder_.free(),this.elements_=this.nextMethod_=this.decoder_=null,this.cursor_=0,this.nextValue_=null,this.atEnd_=!0},jspb.BinaryIterator.prototype.get=function(){return this.nextValue_},jspb.BinaryIterator.prototype.atEnd=function(){return this.atEnd_},jspb.BinaryIterator.prototype.next=function(){var t=this.nextValue_;return this.decoder_?this.decoder_.atEnd()?(this.nextValue_=null,this.atEnd_=!0):this.nextValue_=this.nextMethod_.call(this.decoder_):this.elements_&&(this.cursor_==this.elements_.length?(this.nextValue_=null,this.atEnd_=!0):this.nextValue_=this.elements_[this.cursor_++]),t},jspb.BinaryDecoder=function(t,e,r){this.bytes_=null,this.tempHigh_=this.tempLow_=this.cursor_=this.end_=this.start_=0,this.error_=!1,t&&this.setBlock(t,e,r)},jspb.BinaryDecoder.instanceCache_=[],jspb.BinaryDecoder.alloc=function(t,e,r){if(jspb.BinaryDecoder.instanceCache_.length){var n=jspb.BinaryDecoder.instanceCache_.pop();return t&&n.setBlock(t,e,r),n}return new jspb.BinaryDecoder(t,e,r)},jspb.BinaryDecoder.prototype.free=function(){this.clear(),100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)},jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)},jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1},jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_},jspb.BinaryDecoder.prototype.setBlock=function(t,e,r){this.bytes_=jspb.utils.byteSourceToUint8Array(t),this.start_=goog.isDef(e)?e:0,this.end_=goog.isDef(r)?this.start_+r:this.bytes_.length,this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_},jspb.BinaryDecoder.prototype.setEnd=function(t){this.end_=t},jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_},jspb.BinaryDecoder.prototype.setCursor=function(t){this.cursor_=t},jspb.BinaryDecoder.prototype.advance=function(t){this.cursor_+=t,goog.asserts.assert(this.cursor_<=this.end_)},jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_},jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_},jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_},jspb.BinaryDecoder.prototype.readSplitVarint64_=function(){for(var t,e,r=0,n=0;4>n;n++)if(r|=(127&(t=this.bytes_[this.cursor_++]))<<7*n,128>t)return this.tempLow_=r>>>0,void(this.tempHigh_=0);if(r|=(127&(t=this.bytes_[this.cursor_++]))<<28,e=0|(127&t)>>4,128>t)this.tempLow_=r>>>0,this.tempHigh_=e>>>0;else{for(n=0;5>n;n++)if(e|=(127&(t=this.bytes_[this.cursor_++]))<<7*n+3,128>t)return this.tempLow_=r>>>0,void(this.tempHigh_=e>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid."),this.error_=!0}},jspb.BinaryDecoder.prototype.skipVarint=function(){for(;128&this.bytes_[this.cursor_];)this.cursor_++;this.cursor_++},jspb.BinaryDecoder.prototype.unskipVarint=function(t){for(;128<t;)this.cursor_--,t>>>=7;this.cursor_--},jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var t,e=this.bytes_,r=127&(t=e[this.cursor_+0]);return 128>t?(this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+1]))<<7,128>t?(this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+2]))<<14,128>t?(this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+3]))<<21,128>t?(this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(15&(t=e[this.cursor_+4]))<<28,128>t?(this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),r>>>0):(this.cursor_+=5,128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&goog.asserts.assert(!1),goog.asserts.assert(this.cursor_<=this.end_),r)))))},jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32,jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()},jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()},jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var t=this.readUnsignedVarint32();return t>>>1^-(1&t)},jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64_(),jspb.utils.joinUint64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64_(),jspb.utils.joinUnsignedDecimalString(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64_(),jspb.utils.joinInt64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64_(),jspb.utils.joinSignedDecimalString(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64_(),jspb.utils.joinZigzag64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readZigzagVarint64().toString()},jspb.BinaryDecoder.prototype.readUint8=function(){var t=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),t},jspb.BinaryDecoder.prototype.readUint16=function(){var t=this.bytes_[this.cursor_+0],e=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),t<<0|e<<8},jspb.BinaryDecoder.prototype.readUint32=function(){var t=this.bytes_[this.cursor_+0],e=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),(t<<0|e<<8|r<<16|n<<24)>>>0},jspb.BinaryDecoder.prototype.readUint64=function(){var t=this.readUint32(),e=this.readUint32();return jspb.utils.joinUint64(t,e)},jspb.BinaryDecoder.prototype.readUint64String=function(){var t=this.readUint32(),e=this.readUint32();return jspb.utils.joinUnsignedDecimalString(t,e)},jspb.BinaryDecoder.prototype.readInt8=function(){var t=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),t<<24>>24},jspb.BinaryDecoder.prototype.readInt16=function(){var t=this.bytes_[this.cursor_+0],e=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),(t<<0|e<<8)<<16>>16},jspb.BinaryDecoder.prototype.readInt32=function(){var t=this.bytes_[this.cursor_+0],e=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),t<<0|e<<8|r<<16|n<<24},jspb.BinaryDecoder.prototype.readInt64=function(){var t=this.readUint32(),e=this.readUint32();return jspb.utils.joinInt64(t,e)},jspb.BinaryDecoder.prototype.readInt64String=function(){var t=this.readUint32(),e=this.readUint32();return jspb.utils.joinSignedDecimalString(t,e)},jspb.BinaryDecoder.prototype.readFloat=function(){var t=this.readUint32();return jspb.utils.joinFloat32(t,0)},jspb.BinaryDecoder.prototype.readDouble=function(){var t=this.readUint32(),e=this.readUint32();return jspb.utils.joinFloat64(t,e)},jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]},jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()},jspb.BinaryDecoder.prototype.readString=function(t){var e=this.bytes_,r=this.cursor_;t=r+t;for(var n=[],i="";r<t;){if(128>(a=e[r++]))n.push(a);else{if(192>a)continue;if(224>a){var o=e[r++];n.push((31&a)<<6|63&o)}else if(240>a){o=e[r++];var s=e[r++];n.push((15&a)<<12|(63&o)<<6|63&s)}else if(248>a){var a=(a=(7&a)<<18|(63&(o=e[r++]))<<12|(63&(s=e[r++]))<<6|63&e[r++])-65536;n.push(55296+(a>>10&1023),56320+(1023&a))}}8192<=n.length&&(i+=String.fromCharCode.apply(null,n),n.length=0)}return i+=goog.crypt.byteArrayToString(n),this.cursor_=r,i},jspb.BinaryDecoder.prototype.readStringWithLength=function(){var t=this.readUnsignedVarint32();return this.readString(t)},jspb.BinaryDecoder.prototype.readBytes=function(t){if(0>t||this.cursor_+t>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var e=this.bytes_.subarray(this.cursor_,this.cursor_+t);return this.cursor_+=t,goog.asserts.assert(this.cursor_<=this.end_),e},jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64_(),jspb.utils.joinHash64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readFixedHash64=function(){var t=this.bytes_,e=this.cursor_,r=t[e+0],n=t[e+1],i=t[e+2],o=t[e+3],s=t[e+4],a=t[e+5],u=t[e+6];t=t[e+7];return this.cursor_+=8,String.fromCharCode(r,n,i,o,s,a,u,t)},jspb.BinaryReader=function(t,e,r){this.decoder_=jspb.BinaryDecoder.alloc(t,e,r),this.fieldCursor_=this.decoder_.getCursor(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null},jspb.BinaryReader.instanceCache_=[],jspb.BinaryReader.alloc=function(t,e,r){if(jspb.BinaryReader.instanceCache_.length){var n=jspb.BinaryReader.instanceCache_.pop();return t&&n.decoder_.setBlock(t,e,r),n}return new jspb.BinaryReader(t,e,r)},jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc,jspb.BinaryReader.prototype.free=function(){this.decoder_.clear(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null,100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)},jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_},jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()},jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()},jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_},jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_},jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP},jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()},jspb.BinaryReader.prototype.setBlock=function(t,e,r){this.decoder_.setBlock(t,e,r),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.advance=function(t){this.decoder_.advance(t)},jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var t,e=(t=this.decoder_.readUnsignedVarint32())>>>3;return(t=7&t)!=jspb.BinaryConstants.WireType.VARINT&&t!=jspb.BinaryConstants.WireType.FIXED32&&t!=jspb.BinaryConstants.WireType.FIXED64&&t!=jspb.BinaryConstants.WireType.DELIMITED&&t!=jspb.BinaryConstants.WireType.START_GROUP&&t!=jspb.BinaryConstants.WireType.END_GROUP?(goog.asserts.fail("Invalid wire type"),this.error_=!0,!1):(this.nextField_=e,this.nextWireType_=t,!0)},jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)},jspb.BinaryReader.prototype.skipMatchingFields=function(){var t=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==t;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()},jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.VARINT?(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField()):this.decoder_.skipVarint()},jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var t=this.decoder_.readUnsignedVarint32();this.decoder_.advance(t)}},jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED32?(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField()):this.decoder_.advance(4)},jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED64?(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField()):this.decoder_.advance(8)},jspb.BinaryReader.prototype.skipGroup=function(){var t=[this.nextField_];do{if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF"),this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP)t.push(this.nextField_);else if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP&&this.nextField_!=t.pop()){goog.asserts.fail("Unmatched end-group tag"),this.error_=!0;break}}while(0<t.length)},jspb.BinaryReader.prototype.skipField=function(){switch(this.nextWireType_){case jspb.BinaryConstants.WireType.VARINT:this.skipVarintField();break;case jspb.BinaryConstants.WireType.FIXED64:this.skipFixed64Field();break;case jspb.BinaryConstants.WireType.DELIMITED:this.skipDelimitedField();break;case jspb.BinaryConstants.WireType.FIXED32:this.skipFixed32Field();break;case jspb.BinaryConstants.WireType.START_GROUP:this.skipGroup();break;default:goog.asserts.fail("Invalid wire encoding for field.")}},jspb.BinaryReader.prototype.registerReadCallback=function(t,e){goog.isNull(this.readCallbacks_)&&(this.readCallbacks_={}),goog.asserts.assert(!this.readCallbacks_[t]),this.readCallbacks_[t]=e},jspb.BinaryReader.prototype.runReadCallback=function(t){return goog.asserts.assert(!goog.isNull(this.readCallbacks_)),t=this.readCallbacks_[t],goog.asserts.assert(t),t(this)},jspb.BinaryReader.prototype.readAny=function(t){this.nextWireType_=jspb.BinaryConstants.FieldTypeToWireType(t);var e=jspb.BinaryConstants.FieldType;switch(t){case e.DOUBLE:return this.readDouble();case e.FLOAT:return this.readFloat();case e.INT64:return this.readInt64();case e.UINT64:return this.readUint64();case e.INT32:return this.readInt32();case e.FIXED64:return this.readFixed64();case e.FIXED32:return this.readFixed32();case e.BOOL:return this.readBool();case e.STRING:return this.readString();case e.GROUP:goog.asserts.fail("Group field type not supported in readAny()");case e.MESSAGE:goog.asserts.fail("Message field type not supported in readAny()");case e.BYTES:return this.readBytes();case e.UINT32:return this.readUint32();case e.ENUM:return this.readEnum();case e.SFIXED32:return this.readSfixed32();case e.SFIXED64:return this.readSfixed64();case e.SINT32:return this.readSint32();case e.SINT64:return this.readSint64();case e.FHASH64:return this.readFixedHash64();case e.VHASH64:return this.readVarintHash64();default:goog.asserts.fail("Invalid field type in readAny()")}return 0},jspb.BinaryReader.prototype.readMessage=function(t,e){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var r=this.decoder_.getEnd(),n=this.decoder_.readUnsignedVarint32();n=this.decoder_.getCursor()+n;this.decoder_.setEnd(n),e(t,this),this.decoder_.setCursor(n),this.decoder_.setEnd(r)},jspb.BinaryReader.prototype.readGroup=function(t,e,r){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP),goog.asserts.assert(this.nextField_==t),r(e,this),this.error_||this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP||(goog.asserts.fail("Group submessage did not end with an END_GROUP tag"),this.error_=!0)},jspb.BinaryReader.prototype.getFieldDecoder=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var t=this.decoder_.readUnsignedVarint32(),e=this.decoder_.getCursor(),r=e+t;t=jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(),e,t);return this.decoder_.setCursor(r),t},jspb.BinaryReader.prototype.readInt32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32()},jspb.BinaryReader.prototype.readInt32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32String()},jspb.BinaryReader.prototype.readInt64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readInt64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64String()},jspb.BinaryReader.prototype.readUint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readUint32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32String()},jspb.BinaryReader.prototype.readUint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64()},jspb.BinaryReader.prototype.readUint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64String()},jspb.BinaryReader.prototype.readSint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint32()},jspb.BinaryReader.prototype.readSint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64()},jspb.BinaryReader.prototype.readSint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64String()},jspb.BinaryReader.prototype.readFixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readUint32()},jspb.BinaryReader.prototype.readFixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64()},jspb.BinaryReader.prototype.readFixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64String()},jspb.BinaryReader.prototype.readSfixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32()},jspb.BinaryReader.prototype.readSfixed32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32().toString()},jspb.BinaryReader.prototype.readSfixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64()},jspb.BinaryReader.prototype.readSfixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64String()},jspb.BinaryReader.prototype.readFloat=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readFloat()},jspb.BinaryReader.prototype.readDouble=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readDouble()},jspb.BinaryReader.prototype.readBool=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),!!this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readEnum=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readString=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var t=this.decoder_.readUnsignedVarint32();return this.decoder_.readString(t)},jspb.BinaryReader.prototype.readBytes=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var t=this.decoder_.readUnsignedVarint32();return this.decoder_.readBytes(t)},jspb.BinaryReader.prototype.readVarintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readVarintHash64()},jspb.BinaryReader.prototype.readFixedHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readFixedHash64()},jspb.BinaryReader.prototype.readPackedField_=function(t){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);for(var e=this.decoder_.readUnsignedVarint32(),r=(e=this.decoder_.getCursor()+e,[]);this.decoder_.getCursor()<e;)r.push(t.call(this.decoder_));return r},jspb.BinaryReader.prototype.readPackedInt32=function(){return this.readPackedField_(this.decoder_.readSignedVarint32)},jspb.BinaryReader.prototype.readPackedInt32String=function(){return this.readPackedField_(this.decoder_.readSignedVarint32String)},jspb.BinaryReader.prototype.readPackedInt64=function(){return this.readPackedField_(this.decoder_.readSignedVarint64)},jspb.BinaryReader.prototype.readPackedInt64String=function(){return this.readPackedField_(this.decoder_.readSignedVarint64String)},jspb.BinaryReader.prototype.readPackedUint32=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32)},jspb.BinaryReader.prototype.readPackedUint32String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32String)},jspb.BinaryReader.prototype.readPackedUint64=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64)},jspb.BinaryReader.prototype.readPackedUint64String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64String)},jspb.BinaryReader.prototype.readPackedSint32=function(){return this.readPackedField_(this.decoder_.readZigzagVarint32)},jspb.BinaryReader.prototype.readPackedSint64=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64)},jspb.BinaryReader.prototype.readPackedSint64String=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64String)},jspb.BinaryReader.prototype.readPackedFixed32=function(){return this.readPackedField_(this.decoder_.readUint32)},jspb.BinaryReader.prototype.readPackedFixed64=function(){return this.readPackedField_(this.decoder_.readUint64)},jspb.BinaryReader.prototype.readPackedFixed64String=function(){return this.readPackedField_(this.decoder_.readUint64String)},jspb.BinaryReader.prototype.readPackedSfixed32=function(){return this.readPackedField_(this.decoder_.readInt32)},jspb.BinaryReader.prototype.readPackedSfixed64=function(){return this.readPackedField_(this.decoder_.readInt64)},jspb.BinaryReader.prototype.readPackedSfixed64String=function(){return this.readPackedField_(this.decoder_.readInt64String)},jspb.BinaryReader.prototype.readPackedFloat=function(){return this.readPackedField_(this.decoder_.readFloat)},jspb.BinaryReader.prototype.readPackedDouble=function(){return this.readPackedField_(this.decoder_.readDouble)},jspb.BinaryReader.prototype.readPackedBool=function(){return this.readPackedField_(this.decoder_.readBool)},jspb.BinaryReader.prototype.readPackedEnum=function(){return this.readPackedField_(this.decoder_.readEnum)},jspb.BinaryReader.prototype.readPackedVarintHash64=function(){return this.readPackedField_(this.decoder_.readVarintHash64)},jspb.BinaryReader.prototype.readPackedFixedHash64=function(){return this.readPackedField_(this.decoder_.readFixedHash64)},jspb.Export={},exports.Map=jspb.Map,exports.Message=jspb.Message,exports.BinaryReader=jspb.BinaryReader,exports.BinaryWriter=jspb.BinaryWriter,exports.ExtensionFieldInfo=jspb.ExtensionFieldInfo,exports.ExtensionFieldBinaryInfo=jspb.ExtensionFieldBinaryInfo,exports.exportSymbol=goog.exportSymbol,exports.inherits=goog.inherits,exports.object={extend:goog.object.extend},exports.typeOf=goog.typeOf}).call(this,__webpack_require__(8),__webpack_require__(0).Buffer)},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("number"!=typeof 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,s,a,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 l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}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:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(i(r))for(a=Array.prototype.slice.call(arguments,1),s=(c=r.slice()).length,u=0;u<s;u++)c[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var s;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?i(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,i(this._events[t])&&!this._events[t].warned&&(s=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[t].length>s&&(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,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(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(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;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){var n=r(34),i=r(100);t.exports=r(32)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(76);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(26),i=r(187),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,i,o,s=this;return this.isDynamicArray(e)?(r=t.length,i=s.nestedName(e),(o=[]).push(n.formatInputInt(r).encode()),t.forEach(function(t){o.push(s.encode(t,i))}),o):this.isStaticArray(e)?function(){for(var r=s.staticArrayLength(e),n=s.nestedName(e),i=[],o=0;o<r;o++)i.push(s.encode(t[o],n));return i}():this._inputFormatter(t,e).encode()},o.prototype.decode=function(t,e,r){var n=this;if(this.isDynamicArray(r))return function(){for(var i=parseInt("0x"+t.substr(2*e,64)),o=parseInt("0x"+t.substr(2*i,64)),s=i+32,a=n.nestedName(r),u=n.staticPartLength(a),c=32*Math.floor((u+31)/32),l=[],h=0;h<o*c;h+=c)l.push(n.decode(t,s+h,a));return l}();if(this.isStaticArray(r))return function(){for(var i=n.staticArrayLength(r),o=e,s=n.nestedName(r),a=n.staticPartLength(s),u=32*Math.floor((a+31)/32),c=[],l=0;l<i*u;l+=u)c.push(n.decode(t,o+l,s));return c}();if(this.isDynamicType(r))return function(){var o=parseInt("0x"+t.substr(2*e,64)),s=parseInt("0x"+t.substr(2*o,64)),a=Math.floor((s+31)/32),u=new i(t.substr(2*o,64*(1+a)),0,t);return n._outputFormatter(u,r)}();var o=this.staticPartLength(r),s=new i(t.substr(2*e,2*o),void 0,t);return this._outputFormatter(s,r)},t.exports=o},function(t,e,r){"use strict";var n=r(9),i=r(12).errors,o=r(12).formatters,s=r(21),a=r(192),u=r(83).subscriptions,c=function(t){if(!t.call||!t.name)throw new Error('When creating a method you need to provide at least the "name" and "call" property.');this.name=t.name,this.call=t.call,this.params=t.params||0,this.inputFormatter=t.inputFormatter,this.outputFormatter=t.outputFormatter,this.transformPayload=t.transformPayload,this.extraFormatters=t.extraFormatters,this.requestManager=t.requestManager,this.accounts=t.accounts,this.defaultBlock=t.defaultBlock||"latest",this.defaultAccount=t.defaultAccount||null};c.prototype.setRequestManager=function(t,e){this.requestManager=t,e&&(this.accounts=e)},c.prototype.createFunction=function(t,e){var r=this.buildCall();return r.call=this.call,this.setRequestManager(t||this.requestManager,e||this.accounts),r},c.prototype.attachToObject=function(t){var e=this.buildCall();e.call=this.call;var r=this.name.split(".");r.length>1?(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,l=!1,h=!0,f=0,p=0,d=null,g=n.isObject(r.params[0])&&r.params[0].gas?r.params[0].gas:null,y=n.isObject(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,m=[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={};n.each(m,function(t){t.attachToObject(b),t.requestManager=i.requestManager});var v=function(r,n,o,u,c){if(!o)return c||(c={unsubscribe:function(){clearInterval(d)}}),(r?a.resolve(r):b.getTransactionReceipt(e)).catch(function(e){c.unsubscribe(),l=!0,s._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===p||t.eventEmitter.emit("confirmation",p,e),h=!1,25===++p&&(c.unsubscribe(),t.eventEmitter.removeAllListeners())),e}).then(function(e){if(y&&!l){if(!e.contractAddress)return h&&(c.unsubscribe(),l=!0),void s._fireError(new Error("The transaction receipt didn't contain a contract address."),t.eventEmitter,t.reject);b.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),h&&t.eventEmitter.removeAllListeners()):s._fireError(new Error("The contract code couldn't be stored, please check your gas limit."),t.eventEmitter,t.reject),h&&c.unsubscribe(),l=!0)})}return e}).then(function(e){y||l||(e.outOfGas||g&&g===e.gasUsed||!0!==e.status&&"0x1"!==e.status&&void 0!==e.status?(e&&(e=JSON.stringify(e,null,2)),!1===e.status||"0x0"===e.status?s._fireError(new Error("Transaction has been reverted by the EVM:\n"+e),t.eventEmitter,t.reject):s._fireError(new Error("Transaction ran out of gas. Please provide more gas:\n"+e),t.eventEmitter,t.reject)):(t.eventEmitter.emit("receipt",e),t.resolve(e),h&&t.eventEmitter.removeAllListeners()),h&&c.unsubscribe(),l=!0)}).catch(function(){f++,n?f-1>=750&&(c.unsubscribe(),l=!0,s._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)):f-1>=50&&(c.unsubscribe(),l=!0,s._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(),l=!0,s._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)?b.subscribe("newBlockHeaders",v.bind(null,t,!1)):d=setInterval(v.bind(null,t,!0),1e3)}.bind(this);b.getTransactionReceipt(e).then(function(e){e&&e.blockHash?(t.eventEmitter.listeners("confirmation").length>0&&w(e),v(e,!1)):l||w()}).catch(function(){l||w()})};var l=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=a(!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),s._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)},h=function(t,e){var i;if(e&&e.accounts&&e.accounts.wallet&&e.accounts.wallet.length)if("eth_sendTransaction"===t.method){var s=t.params[0];if((i=l(n.isObject(s)?s.from:null,e.accounts))&&i.privateKey)return e.accounts.signTransaction(n.omit(s,"from"),i.privateKey).then(u)}else if("eth_sign"===t.method){var a=t.params[1];if((i=l(t.params[0],e.accounts))&&i.privateKey){var c=e.accounts.sign(a,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),h(i,t)}):h(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){"use strict";var n=r(427),i=r(399);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";(function(e){var n=r(1),i=r(112),o=r(95),s=r(111),a=r(35);function u(t){a.call(this,"digest"),this._hash=t,this.buffers=[]}function c(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this.buffers.push(t)},u.prototype._final=function(){var t=e.concat(this.buffers),r=this._hash(t);return this.buffers=null,r},n(c,a),c.prototype._update=function(t){this._hash.update(t)},c.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new u(i):new c("rmd160"===t||"ripemd160"===t?new o:s(t))}}).call(this,r(0).Buffer)},function(t,e,r){var n=r(39),i=r(91);t.exports=r(37)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){"use strict";var n=r(94),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var o=r(69);o.inherits=r(1);var s=r(249),a=r(131);o.inherits(h,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];h.prototype[l]||(h.prototype[l]=a.prototype[l])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){"use strict";(function(e,n){var i=r(2).Buffer,o=e.crypto||e.msCrypto;o&&o.getRandomValues?t.exports=function(t,r){if(t>65536)throw new Error("requested too many random bytes");var s=new e.Uint8Array(t);t>0&&o.getRandomValues(s);var a=i.from(s.buffer);if("function"==typeof r)return n.nextTick(function(){r(null,a)});return a}: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(8),r(24))},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,s=this._len,a=0;a<o;){for(var u=s%i,c=Math.min(o-a,i-u),l=0;l<c;l++)r[u+l]=t[a+l];a+=c,(s+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=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";var n,i=r(4),o=i(r(7)),s=i(r(6)),a=i(r(5)),u=i(r(29)),c=i(r(28)),l=(n=c.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,u.default)(e):(r.prototype=e.prototype,new r)}),h=function(t,e,r,n){return new(r||(r=a.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},f=function(t,e){var r,n,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof s.default&&(a[o.default]=function(){return this}),a;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},p=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var d=r(41),g=p(r(42)),y=r(102),m=r(14),b=r(23),v=function(t){function e(r){var n=t.call(this)||this;n._client=r.client,n.name=r.contractName,n.address=r.contractAddr,n.caller=r.callerAddr;var i=n._emitContractEvent.bind(n);return n.on("newListener",function(t){t===e.EVENT&&0===n.listenerCount(t)&&n._client.on(y.ClientEvent.Contract,i)}),n.on("removeListener",function(t){t===e.EVENT&&0===n.listenerCount(t)&&n._client.removeListener(y.ClientEvent.Contract,i)}),n}return l(e,t),e.prototype.callAsync=function(t,e,r){return h(this,void 0,void 0,function(){var n,i,o,s,a,u,c,l;return f(this,function(h){switch(h.label){case 0:return(n=new m.ContractMethodCall).setMethod(t),n.setArgs(e.serializeBinary()),(i=new m.Request).setContentType(m.EncodingType.PROTOBUF3),i.setAccept(m.EncodingType.PROTOBUF3),i.setBody(n.serializeBinary()),(o=new m.CallTx).setVmType(m.VMType.PLUGIN),o.setInput(i.serializeBinary()),(s=new m.MessageTx).setFrom(this.caller.MarshalPB()),s.setTo(this.address.MarshalPB()),s.setData(o.serializeBinary()),(a=new m.Transaction).setId(2),a.setData(s.serializeBinary()),[4,this._client.commitTxAsync(a)];case 1:return(u=h.sent())&&r&&(c=m.Response.deserializeBinary(b.bufferToProtobufBytes(u)),l=r.constructor,d.Message.copyInto(l.deserializeBinary(c.getBody_asU8()),r)),[2,r]}})})},e.prototype.staticCallAsync=function(t,e,r){return h(this,void 0,void 0,function(){var n,i,o;return f(this,function(s){switch(s.label){case 0:return(n=new m.ContractMethodCall).setMethod(t),n.setArgs(e.serializeBinary()),[4,this._client.queryAsync(this.address,n.serializeBinary(),m.VMType.PLUGIN,this.caller)];case 1:return(i=s.sent())&&r&&(o=r.constructor,d.Message.copyInto(o.deserializeBinary(b.bufferToProtobufBytes(i)),r)),[2,r]}})})},e.prototype._emitContractEvent=function(t){t.contractAddress.equals(this.address)&&this.emit(e.EVENT,t)},e.EVENT="event",e}(g.default);e.Contract=v},function(t,e,r){var n=r(558),i=r(127);t.exports=function(t){return n(i(t))}},function(t,e,r){t.exports=i;var n=r(42).EventEmitter;function i(){n.call(this)}r(1)(i,n),i.Readable=r(132),i.Writable=r(574),i.Duplex=r(573),i.Transform=r(572),i.PassThrough=r(571),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",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",c),t.on("error",c),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},function(t,e,r){var n=r(147),i=r(151);t.exports=function(t){return n(i(t))}},function(t,e,r){var n=e;n.Reporter=r(351).Reporter,n.DecoderBuffer=r(174).DecoderBuffer,n.EncoderBuffer=r(174).EncoderBuffer,n.Node=r(350)},function(t,e,r){var n=e;n.bignum=r(3),n.define=r(354).define,n.base=r(60),n.constants=r(173),n.decoders=r(348),n.encoders=r(346)},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<n;++o)i[o]=t[o]^r[o];return i}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=r(27),i=r(22);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=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<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>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;o<this.padLength;o++)n[i++]=0;return n}},function(t,e,r){"use strict";(function(t){var n=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(3)),o=r(23),s=r(14);e.unmarshalBigUIntPB=function(e){var r=e.getValue_asU8(),n=t.from(r.buffer,r.byteOffset,r.byteLength);return new i.default(n,10,"be")},e.marshalBigUIntPB=function(e){var r=e.toArrayLike(t,"be"),n=new s.BigUInt;return n.setValue(o.bufferToProtobufBytes(r)),n}}).call(this,r(0).Buffer)},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n=r(92);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){(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(0).Buffer)},function(t,e,r){(function(n){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t}(e=t.exports=r(588)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),!r)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,n)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,r(24))},function(t,e,r){var n=r(44),i=r(601),o=r(600),s=r(33),a=r(146),u=r(599),c={},l={};(e=t.exports=function(t,e,r,h,f){var p,d,g,y,m=f?function(){return t}:u(t),b=n(r,h,e?2:1),v=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(o(m)){for(p=a(t.length);p>v;v++)if((y=e?b(s(d=t[v])[0],d[1]):b(t[v]))===c||y===l)return y}else for(g=m.call(t);!(d=g.next()).done;)if((y=i(g,b,d.value,e))===c||y===l)return y}).BREAK=c,e.RETURN=l},function(t,e,r){var n=r(34).f,i=r(52),o=r(15)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){var n=r(263),i=r(143);t.exports=Object.keys||function(t){return n(t,i)}},function(t,e){t.exports={}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){"use strict";(function(t){var n=r(4),i=n(r(7)),o=n(r(6)),s=n(r(5)),a=function(t,e,r,n){return new(r||(r=s.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},u=function(t,e){var r,n,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof o.default&&(a[i.default]=function(){return this}),a;function c(i){return function(o){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(s=(s=u.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){u.label=i[1];break}if(6===i[0]&&u.label<s[1]){u.label=s[1],s=i;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(i);break}s[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},c=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=c(r(202)),h=c(r(3)),f=r(40),p=r(64),d=r(23),g=r(85),y=r(154),m=function(){function e(t){this.slot=t.slot,this.prevBlockNum=t.prevBlockNum,this.denomination=new h.default(t.denomination),this.newOwner=t.newOwner,this.prevOwner=t.prevOwner,this.sigBytes=t.sig,this.proofBytes=t.proof}return e.prototype.rlpEncode=function(){var e=[this.slot.toArrayLike(t,"be"),this.prevBlockNum.toNumber(),this.denomination.toNumber(),this.newOwner];return"0x"+l.default.encode(e).toString("hex")},Object.defineProperty(e.prototype,"sig",{get:function(){return"0x"+(this.sigBytes?d.bytesToHex(this.sigBytes):"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"proof",{get:function(){return"0x"+(this.proofBytes?d.bytesToHex(this.proofBytes):"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){return 0===this.prevBlockNum.cmp(new h.default(0))?g.soliditySha3({type:"uint64",value:this.slot}):g.soliditySha3({type:"bytes",value:this.rlpEncode()})},enumerable:!0,configurable:!0}),e.prototype.signAsync=function(t){return a(this,void 0,void 0,function(){var e;return u(this,function(r){switch(r.label){case 0:return e=this,[4,t.signAsync(this.hash)];case 1:return e.sigBytes=r.sent(),[2]}})})},e}();e.PlasmaCashTx=m,e.unmarshalPlasmaTxPB=function(t){if(!t.hasNewOwner())throw new Error("Invalid PlasmaTx: missing new owner");var e=new m({slot:new h.default(t.getSlot()),prevBlockNum:t.hasPreviousBlock()?p.unmarshalBigUIntPB(t.getPreviousBlock()):new h.default(0),denomination:t.hasDenomination()?p.unmarshalBigUIntPB(t.getDenomination()):new h.default(0),newOwner:f.Address.UmarshalPB(t.getNewOwner()).local.toString(),sig:t.getSignature_asU8(),proof:t.getProof_asU8()}),r=t.getSender();return r&&(e.prevOwner=f.Address.UmarshalPB(r).local.toString()),e},e.marshalPlasmaTxPB=function(t){var e=new f.Address("eth",f.LocalAddress.fromHexString(t.newOwner)),r=new y.PlasmaTx;if(r.setSlot(t.slot.toString(10)),r.setPreviousBlock(p.marshalBigUIntPB(t.prevBlockNum)),r.setDenomination(p.marshalBigUIntPB(t.denomination)),r.setNewOwner(e.MarshalPB()),t.prevOwner){var n=new f.Address("eth",f.LocalAddress.fromHexString(t.prevOwner));r.setSender(n.MarshalPB())}return t.sigBytes&&r.setSignature(d.bufferToProtobufBytes(t.sigBytes)),t.proofBytes&&r.setProof(d.bufferToProtobufBytes(t.proofBytes)),r}}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var n=r(355),i=r(343),o=r(342),s=r(107),a=r(108);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,l=o(t,r),h=l.tag,f=l.data;switch(h){case"CERTIFICATE":c=n.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(f,"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 "+h);case"ENCRYPTED PRIVATE KEY":f=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,l=t.subjectPrivateKey,h=parseInt(u.split("-")[1],10)/8,f=a.pbkdf2Sync(r,n,o,h),p=s.createDecipheriv(u,f,c),d=[];return d.push(p.update(l)),d.push(p.final()),e.concat(d)}(f=n.EncryptedPrivateKey.decode(f,"der"),r);case"PRIVATE KEY":switch(u=(c=n.PrivateKey.decode(f,"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 "+h);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return{curve:(f=n.ECPrivateKey.decode(f,"der")).parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=u,u.signature=n.signature}).call(this,r(0).Buffer)},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<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function s(t,e,r,n,i){for(var o,s,a,u,c=r[0],l=r[1],h=r[2],f=r[3],p=t[0]^e[0],d=t[1]^e[1],g=t[2]^e[2],y=t[3]^e[3],m=4,b=1;b<i;b++)o=c[p>>>24]^l[d>>>16&255]^h[g>>>8&255]^f[255&y]^e[m++],s=c[d>>>24]^l[g>>>16&255]^h[y>>>8&255]^f[255&p]^e[m++],a=c[g>>>24]^l[y>>>16&255]^h[p>>>8&255]^f[255&d]^e[m++],u=c[y>>>24]^l[p>>>16&255]^h[d>>>8&255]^f[255&g]^e[m++],p=o,d=s,g=a,y=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[g>>>8&255]<<8|n[255&y])^e[m++],s=(n[d>>>24]<<24|n[g>>>16&255]<<16|n[y>>>8&255]<<8|n[255&p])^e[m++],a=(n[g>>>24]<<24|n[y>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[m++],u=(n[y>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&g])^e[m++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[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=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[s]=c,n[c]=s;var l=t[s],h=t[l],f=t[h],p=257*t[c]^16843008*c;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*f^65537*h^257*l^16843008*s,o[0][c]=p<<24|p>>>8,o[1][c]=p<<16|p>>>16,o[2][c]=p<<8|p>>>24,o[3][c]=p,0===s?s=a=1:(s=l^t[t[t[f^l]]],a^=t[t[a]])}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<e;o++)i[o]=t[o];for(o=e;o<n;o++){var s=i[o-1];o%e==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-e]^s}for(var c=[],l=0;l<n;l++){var h=n-l,f=i[h-(l%4?0:4)];c[l]=l<4||h<=4?f:u.INV_SUB_MIX[0][u.SBOX[f>>>24]]^u.INV_SUB_MIX[1][u.SBOX[f>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[f>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&f]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return s(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=s(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(378);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 s=r/8,a=n.alloc(s),u=n.alloc(o||0),c=n.alloc(0);s>0||o>0;){var l=new i;l.update(c),l.update(t),e&&l.update(e),c=l.digest();var h=0;if(s>0){var f=a.length-s;h=Math.min(s,c.length),c.copy(a,f,0,h),s-=h}if(h<c.length&&o>0){var p=u.length-o,d=Math.min(o,c.length-h);c.copy(u,p,h,h+d),o-=d}}return c.fill(0),{key:a,iv:u}}},function(t,e,r){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(54),e.createHash=e.Hash=r(48),e.createHmac=e.Hmac=r(186);var n=r(381),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var s=r(108);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var a=r(379);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var u=r(360);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var c=r(357);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=r(340);var l=r(339);e.publicEncrypt=l.publicEncrypt,e.privateEncrypt=l.privateEncrypt,e.publicDecrypt=l.publicDecrypt,e.privateDecrypt=l.privateDecrypt;var h=r(336);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,r){"use strict";var n=r(47),i=r(46),o=r(21),s=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(s),t.exports=s},function(t,e,r){"use strict";var n=r(396),i=function(t){this.name=t.name,this.type=t.type,this.subscriptions=t.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(t){this.requestManager=t},i.prototype.attachToObject=function(t){var e=this.buildCall();e.call=this.call;var r=this.name.split(".");r.length>1?(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=e;n.base=r(451),n.short=r(450),n.mont=r(449),n.edwards=r(448)},function(t,e,r){"use strict";(function(t){var n=r(4),i=n(r(7)),o=n(r(6)),s=n(r(5)),a=function(t,e,r,n){return new(r||(r=s.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},u=function(t,e){var r,n,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof o.default&&(a[i.default]=function(){return this}),a;function c(i){return function(o){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(s=(s=u.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){u.label=i[1];break}if(6===i[0]&&u.label<s[1]){u.label=s[1],s=i;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(i);break}s[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},c=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=c(r(472)),h=new(c(r(199)).default);e.soliditySha3=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(t=h.utils).soliditySha3.apply(t,e)};var f=function(){function e(t,e){this._web3=t,this._address=e}return e.prototype.signAsync=function(e){return a(this,void 0,void 0,function(){var r,n,i,o,s,a;return u(this,function(u){switch(u.label){case 0:return[4,this._web3.eth.sign(e,this._address)];case 1:return r=u.sent(),n=r.slice(2),i=1,o=l.default.toBuffer("0x"+n.substring(0,64)),s=l.default.toBuffer("0x"+n.substring(64,128)),0===(a=parseInt(n.substring(128,130),16))||1===a?a+=27:i=0,[2,t.concat([l.default.toBuffer(i),o,s,l.default.toBuffer(a)])]}})})},e}();e.Web3Signer=f}).call(this,r(0).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.HTTP=0]="HTTP",t[t.WS=1]="WS"}(e.JSONRPCProtocol||(e.JSONRPCProtocol={})),function(t){t.Connected="connected",t.Disconnected="disconnected",t.Error="error",t.Message="message",t.Subscribed="subscribed"}(e.RPCClientEvent||(e.RPCClientEvent={}))},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,r){var n=r(39).f,i=r(50),o=r(17)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(t,e,r){var n=r(235),i=r(119);t.exports=Object.keys||function(t){return n(t,i)}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},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,s,a=arguments.length;switch(a){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(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this,r(24))},function(t,e,r){"use strict";(function(e){var n=r(1),i=r(582);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function s(t,e){return t<<e|t>>>32-e}function a(t,e,r,n,i,o,a,u){return s(t+(e^r^n)+o+a|0,u)+i|0}function u(t,e,r,n,i,o,a,u){return s(t+(e&r|~e&n)+o+a|0,u)+i|0}function c(t,e,r,n,i,o,a,u){return s(t+((e|~r)^n)+o+a|0,u)+i|0}function l(t,e,r,n,i,o,a,u){return s(t+(e&n|r&~n)+o+a|0,u)+i|0}function h(t,e,r,n,i,o,a,u){return s(t+(e^(r|~n))+o+a|0,u)+i|0}n(o,i),o.prototype._update=function(){for(var t=new Array(16),e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d,f=this._e;f=a(f,r=a(r,n,i,o,f,t[0],0,11),n,i=s(i,10),o,t[1],0,14),n=a(n=s(n,10),i=a(i,o=a(o,f,r,n,i,t[2],0,15),f,r=s(r,10),n,t[3],0,12),o,f=s(f,10),r,t[4],0,5),o=a(o=s(o,10),f=a(f,r=a(r,n,i,o,f,t[5],0,8),n,i=s(i,10),o,t[6],0,7),r,n=s(n,10),i,t[7],0,9),r=a(r=s(r,10),n=a(n,i=a(i,o,f,r,n,t[8],0,11),o,f=s(f,10),r,t[9],0,13),i,o=s(o,10),f,t[10],0,14),i=a(i=s(i,10),o=a(o,f=a(f,r,n,i,o,t[11],0,15),r,n=s(n,10),i,t[12],0,6),f,r=s(r,10),n,t[13],0,7),f=u(f=s(f,10),r=a(r,n=a(n,i,o,f,r,t[14],0,9),i,o=s(o,10),f,t[15],0,8),n,i=s(i,10),o,t[7],1518500249,7),n=u(n=s(n,10),i=u(i,o=u(o,f,r,n,i,t[4],1518500249,6),f,r=s(r,10),n,t[13],1518500249,8),o,f=s(f,10),r,t[1],1518500249,13),o=u(o=s(o,10),f=u(f,r=u(r,n,i,o,f,t[10],1518500249,11),n,i=s(i,10),o,t[6],1518500249,9),r,n=s(n,10),i,t[15],1518500249,7),r=u(r=s(r,10),n=u(n,i=u(i,o,f,r,n,t[3],1518500249,15),o,f=s(f,10),r,t[12],1518500249,7),i,o=s(o,10),f,t[0],1518500249,12),i=u(i=s(i,10),o=u(o,f=u(f,r,n,i,o,t[9],1518500249,15),r,n=s(n,10),i,t[5],1518500249,9),f,r=s(r,10),n,t[2],1518500249,11),f=u(f=s(f,10),r=u(r,n=u(n,i,o,f,r,t[14],1518500249,7),i,o=s(o,10),f,t[11],1518500249,13),n,i=s(i,10),o,t[8],1518500249,12),n=c(n=s(n,10),i=c(i,o=c(o,f,r,n,i,t[3],1859775393,11),f,r=s(r,10),n,t[10],1859775393,13),o,f=s(f,10),r,t[14],1859775393,6),o=c(o=s(o,10),f=c(f,r=c(r,n,i,o,f,t[4],1859775393,7),n,i=s(i,10),o,t[9],1859775393,14),r,n=s(n,10),i,t[15],1859775393,9),r=c(r=s(r,10),n=c(n,i=c(i,o,f,r,n,t[8],1859775393,13),o,f=s(f,10),r,t[1],1859775393,15),i,o=s(o,10),f,t[2],1859775393,14),i=c(i=s(i,10),o=c(o,f=c(f,r,n,i,o,t[7],1859775393,8),r,n=s(n,10),i,t[0],1859775393,13),f,r=s(r,10),n,t[6],1859775393,6),f=c(f=s(f,10),r=c(r,n=c(n,i,o,f,r,t[13],1859775393,5),i,o=s(o,10),f,t[11],1859775393,12),n,i=s(i,10),o,t[5],1859775393,7),n=l(n=s(n,10),i=l(i,o=c(o,f,r,n,i,t[12],1859775393,5),f,r=s(r,10),n,t[1],2400959708,11),o,f=s(f,10),r,t[9],2400959708,12),o=l(o=s(o,10),f=l(f,r=l(r,n,i,o,f,t[11],2400959708,14),n,i=s(i,10),o,t[10],2400959708,15),r,n=s(n,10),i,t[0],2400959708,14),r=l(r=s(r,10),n=l(n,i=l(i,o,f,r,n,t[8],2400959708,15),o,f=s(f,10),r,t[12],2400959708,9),i,o=s(o,10),f,t[4],2400959708,8),i=l(i=s(i,10),o=l(o,f=l(f,r,n,i,o,t[13],2400959708,9),r,n=s(n,10),i,t[3],2400959708,14),f,r=s(r,10),n,t[7],2400959708,5),f=l(f=s(f,10),r=l(r,n=l(n,i,o,f,r,t[15],2400959708,6),i,o=s(o,10),f,t[14],2400959708,8),n,i=s(i,10),o,t[5],2400959708,6),n=h(n=s(n,10),i=l(i,o=l(o,f,r,n,i,t[6],2400959708,5),f,r=s(r,10),n,t[2],2400959708,12),o,f=s(f,10),r,t[4],2840853838,9),o=h(o=s(o,10),f=h(f,r=h(r,n,i,o,f,t[0],2840853838,15),n,i=s(i,10),o,t[5],2840853838,5),r,n=s(n,10),i,t[9],2840853838,11),r=h(r=s(r,10),n=h(n,i=h(i,o,f,r,n,t[7],2840853838,6),o,f=s(f,10),r,t[12],2840853838,8),i,o=s(o,10),f,t[2],2840853838,13),i=h(i=s(i,10),o=h(o,f=h(f,r,n,i,o,t[10],2840853838,12),r,n=s(n,10),i,t[14],2840853838,5),f,r=s(r,10),n,t[1],2840853838,12),f=h(f=s(f,10),r=h(r,n=h(n,i,o,f,r,t[3],2840853838,13),i,o=s(o,10),f,t[8],2840853838,14),n,i=s(i,10),o,t[11],2840853838,11),n=h(n=s(n,10),i=h(i,o=h(o,f,r,n,i,t[6],2840853838,8),f,r=s(r,10),n,t[15],2840853838,5),o,f=s(f,10),r,t[13],2840853838,6),o=s(o,10);var p=this._a,d=this._b,g=this._c,y=this._d,m=this._e;m=h(m,p=h(p,d,g,y,m,t[5],1352829926,8),d,g=s(g,10),y,t[14],1352829926,9),d=h(d=s(d,10),g=h(g,y=h(y,m,p,d,g,t[7],1352829926,9),m,p=s(p,10),d,t[0],1352829926,11),y,m=s(m,10),p,t[9],1352829926,13),y=h(y=s(y,10),m=h(m,p=h(p,d,g,y,m,t[2],1352829926,15),d,g=s(g,10),y,t[11],1352829926,15),p,d=s(d,10),g,t[4],1352829926,5),p=h(p=s(p,10),d=h(d,g=h(g,y,m,p,d,t[13],1352829926,7),y,m=s(m,10),p,t[6],1352829926,7),g,y=s(y,10),m,t[15],1352829926,8),g=h(g=s(g,10),y=h(y,m=h(m,p,d,g,y,t[8],1352829926,11),p,d=s(d,10),g,t[1],1352829926,14),m,p=s(p,10),d,t[10],1352829926,14),m=l(m=s(m,10),p=h(p,d=h(d,g,y,m,p,t[3],1352829926,12),g,y=s(y,10),m,t[12],1352829926,6),d,g=s(g,10),y,t[6],1548603684,9),d=l(d=s(d,10),g=l(g,y=l(y,m,p,d,g,t[11],1548603684,13),m,p=s(p,10),d,t[3],1548603684,15),y,m=s(m,10),p,t[7],1548603684,7),y=l(y=s(y,10),m=l(m,p=l(p,d,g,y,m,t[0],1548603684,12),d,g=s(g,10),y,t[13],1548603684,8),p,d=s(d,10),g,t[5],1548603684,9),p=l(p=s(p,10),d=l(d,g=l(g,y,m,p,d,t[10],1548603684,11),y,m=s(m,10),p,t[14],1548603684,7),g,y=s(y,10),m,t[15],1548603684,7),g=l(g=s(g,10),y=l(y,m=l(m,p,d,g,y,t[8],1548603684,12),p,d=s(d,10),g,t[12],1548603684,7),m,p=s(p,10),d,t[4],1548603684,6),m=l(m=s(m,10),p=l(p,d=l(d,g,y,m,p,t[9],1548603684,15),g,y=s(y,10),m,t[1],1548603684,13),d,g=s(g,10),y,t[2],1548603684,11),d=c(d=s(d,10),g=c(g,y=c(y,m,p,d,g,t[15],1836072691,9),m,p=s(p,10),d,t[5],1836072691,7),y,m=s(m,10),p,t[1],1836072691,15),y=c(y=s(y,10),m=c(m,p=c(p,d,g,y,m,t[3],1836072691,11),d,g=s(g,10),y,t[7],1836072691,8),p,d=s(d,10),g,t[14],1836072691,6),p=c(p=s(p,10),d=c(d,g=c(g,y,m,p,d,t[6],1836072691,6),y,m=s(m,10),p,t[9],1836072691,14),g,y=s(y,10),m,t[11],1836072691,12),g=c(g=s(g,10),y=c(y,m=c(m,p,d,g,y,t[8],1836072691,13),p,d=s(d,10),g,t[12],1836072691,5),m,p=s(p,10),d,t[2],1836072691,14),m=c(m=s(m,10),p=c(p,d=c(d,g,y,m,p,t[10],1836072691,13),g,y=s(y,10),m,t[0],1836072691,13),d,g=s(g,10),y,t[4],1836072691,7),d=u(d=s(d,10),g=u(g,y=c(y,m,p,d,g,t[13],1836072691,5),m,p=s(p,10),d,t[8],2053994217,15),y,m=s(m,10),p,t[6],2053994217,5),y=u(y=s(y,10),m=u(m,p=u(p,d,g,y,m,t[4],2053994217,8),d,g=s(g,10),y,t[1],2053994217,11),p,d=s(d,10),g,t[3],2053994217,14),p=u(p=s(p,10),d=u(d,g=u(g,y,m,p,d,t[11],2053994217,14),y,m=s(m,10),p,t[15],2053994217,6),g,y=s(y,10),m,t[0],2053994217,14),g=u(g=s(g,10),y=u(y,m=u(m,p,d,g,y,t[5],2053994217,6),p,d=s(d,10),g,t[12],2053994217,9),m,p=s(p,10),d,t[2],2053994217,12),m=u(m=s(m,10),p=u(p,d=u(d,g,y,m,p,t[13],2053994217,9),g,y=s(y,10),m,t[9],2053994217,12),d,g=s(g,10),y,t[7],2053994217,5),d=a(d=s(d,10),g=u(g,y=u(y,m,p,d,g,t[10],2053994217,15),m,p=s(p,10),d,t[14],2053994217,8),y,m=s(m,10),p,t[12],0,8),y=a(y=s(y,10),m=a(m,p=a(p,d,g,y,m,t[15],0,5),d,g=s(g,10),y,t[10],0,12),p,d=s(d,10),g,t[4],0,9),p=a(p=s(p,10),d=a(d,g=a(g,y,m,p,d,t[1],0,12),y,m=s(m,10),p,t[5],0,5),g,y=s(y,10),m,t[8],0,14),g=a(g=s(g,10),y=a(y,m=a(m,p,d,g,y,t[7],0,6),p,d=s(d,10),g,t[6],0,8),m,p=s(p,10),d,t[2],0,13),m=a(m=s(m,10),p=a(p,d=a(d,g,y,m,p,t[13],0,6),g,y=s(y,10),m,t[14],0,5),d,g=s(g,10),y,t[0],0,15),d=a(d=s(d,10),g=a(g,y=a(y,m,p,d,g,t[3],0,13),m,p=s(p,10),d,t[9],0,11),y,m=s(m,10),p,t[11],0,11),y=s(y,10);var b=this._b+i+y|0;this._b=this._c+o+m|0,this._c=this._d+f+p|0,this._d=this._e+r+d|0,this._e=this._a+n+g|0,this._a=b},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(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=o}).call(this,r(0).Buffer)},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,r){var n=r(151);t.exports=function(t){return Object(n(t))}},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e,r){var n=r(33),i=r(614),o=r(143),s=r(145)("IE_PROTO"),a=function(){},u=function(){var t,e=r(149)("iframe"),n=o.length;for(e.style.display="none",r(262).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[o[n]];return u()};t.exports=Object.create||function(t,e){var r;return null!==t?(a.prototype=n(t),r=new a,a.prototype=null,r[s]=t):r=u(),void 0===e?r:i(r,e)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=!0},function(t,e,r){"use strict";(function(t){var n,i=r(4),o=i(r(266)),s=i(r(7)),a=i(r(6)),u=i(r(5)),c=i(r(29)),l=i(r(28)),h=(n=l.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,c.default)(e):(r.prototype=e.prototype,new r)}),f=function(t,e,r,n){return new(r||(r=u.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},p=function(t,e){var r,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof a.default&&(o[s.default]=function(){return this}),o;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},d=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var g,y=d(r(70)),m=d(r(42)),b=d(r(587)),v=r(14),w=r(250),_=r(23),M=r(40),E=r(129),A=r(86),B=y.default("client");!function(t){t.Contract="contractEvent",t.Error="error",t.Connected="connected",t.Disconnected="disconnected"}(g=e.ClientEvent||(e.ClientEvent={}));var T="Invalid tx nonce";e.isInvalidTxNonceError=function(t){return t instanceof Error&&t.message===T};var R=function(e){function r(t,r,n){var i=e.call(this)||this;i.txMiddleware=[],i.nonceRetryStrategy={retries:5,minTimeout:500,maxTimeout:5e3,randomize:!0},i.chainId=t,i._writeClient="string"==typeof r?new E.WSRPCClient(r):r,i._writeClient.on(A.RPCClientEvent.Error,function(t,e){return i._emitNetEvent(t,g.Error,e)}),i._writeClient.on(A.RPCClientEvent.Connected,function(t){return i._emitNetEvent(t,g.Connected)}),i._writeClient.on(A.RPCClientEvent.Disconnected,function(t){return i._emitNetEvent(t,g.Disconnected)}),n&&r!==n?(i._readClient="string"==typeof n?new E.WSRPCClient(n):n,i._readClient.on(A.RPCClientEvent.Error,function(t,e){return i._emitNetEvent(t,g.Error,e)}),i._readClient.on(A.RPCClientEvent.Connected,function(t){return i._emitNetEvent(t,g.Connected)}),i._readClient.on(A.RPCClientEvent.Disconnected,function(t){return i._emitNetEvent(t,g.Disconnected)})):i._readClient=i._writeClient;var o=function(t,e){return i._emitContractEvent(t,e)};return i.on("newListener",function(t){t===g.Contract&&0===i.listenerCount(g.Contract)&&i._readClient.on(A.RPCClientEvent.Message,o)}),i.on("removeListener",function(t){t===g.Contract&&0===i.listenerCount(g.Contract)&&i._readClient.removeListener(A.RPCClientEvent.Message,o)}),i}return h(r,e),Object.defineProperty(r.prototype,"readUrl",{get:function(){return this._readClient.url},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"writeUrl",{get:function(){return this._writeClient.url},enumerable:!0,configurable:!0}),r.prototype.disconnect=function(){this.removeAllListeners(),this._writeClient.disconnect(),this._readClient&&this._readClient!=this._writeClient&&this._readClient.disconnect()},r.prototype.commitTxAsync=function(t,e){var r=this;void 0===e&&(e={});var n=e.middleware,i=void 0===n?this.txMiddleware:n,o=b.default.operation(this.nonceRetryStrategy);return new u.default(function(e,n){o.attempt(function(s){r._commitTxAsync(t,i).then(e).catch(function(t){t instanceof Error&&t.message===T?o.retry(t)||n(t):(o.stop(),n(t))})})})},r.prototype._commitTxAsync=function(t,e){return f(this,void 0,void 0,function(){var r,n,i;return p(this,function(o){switch(o.label){case 0:r=t.serializeBinary(),n=0,o.label=1;case 1:return n<e.length?[4,e[n].Handle(r)]:[3,4];case 2:r=o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[4,this._writeClient.sendAsync("broadcast_tx_commit",[_.Uint8ArrayToB64(r)])];case 5:if(i=o.sent()){if(0!=(i.check_tx.code||0)){if(!i.check_tx.log)throw new Error("Failed to commit Tx: "+i.check_tx.code);if(1===i.check_tx.code&&"sequence number does not match"===i.check_tx.log)throw new Error(T);throw new Error("Failed to commit Tx: "+i.check_tx.log)}if(0!=(i.deliver_tx.code||0)){if(!i.deliver_tx.log)throw new Error("Failed to commit Tx: "+i.deliver_tx.code);throw new Error("Failed to commit Tx: "+i.deliver_tx.log)}}return i.deliver_tx.data?[2,_.B64ToUint8Array(i.deliver_tx.data)]:[2]}})})},r.prototype.queryAsync=function(t,e,r,n){return void 0===r&&(r=v.VMType.PLUGIN),f(this,void 0,void 0,function(){var i;return p(this,function(o){switch(o.label){case 0:return[4,this._readClient.sendAsync("query",{contract:t.local.toString(),query:e?_.Uint8ArrayToB64(e):void 0,vmType:r,caller:n?n.toString():void 0})];case 1:return(i=o.sent())?[2,_.B64ToUint8Array(i)]:[2]}})})},r.prototype.getEvmTxReceiptAsync=function(t){return f(this,void 0,void 0,function(){var e;return p(this,function(r){switch(r.label){case 0:return[4,this._readClient.sendAsync("evmtxreceipt",{txHash:_.Uint8ArrayToB64(t)})];case 1:return(e=r.sent())?[2,w.EvmTxReceipt.deserializeBinary(_.bufferToProtobufBytes(_.B64ToUint8Array(e)))]:[2,null]}})})},r.prototype.getEvmTxByHashAsync=function(t){return f(this,void 0,void 0,function(){var e;return p(this,function(r){switch(r.label){case 0:return[4,this._readClient.sendAsync("getevmtransactionbyhash",{txHash:_.Uint8ArrayToB64(t)})];case 1:return(e=r.sent())?[2,w.EvmTxObject.deserializeBinary(_.bufferToProtobufBytes(_.B64ToUint8Array(e)))]:[2,null]}})})},r.prototype.getEvmCodeAsync=function(t){return f(this,void 0,void 0,function(){var e;return p(this,function(r){switch(r.label){case 0:return[4,this._readClient.sendAsync("getevmcode",{contract:t.toString()})];case 1:return(e=r.sent())?[2,_.B64ToUint8Array(e)]:[2,null]}})})},r.prototype.getEvmLogsAsync=function(t){return f(this,void 0,void 0,function(){var e,r;return p(this,function(n){switch(n.label){case 0:return e=(0,o.default)(t),B("Send filter "+e+" to getlogs"),[4,this._readClient.sendAsync("getevmlogs",{filter:e})];case 1:return(r=n.sent())?[2,_.B64ToUint8Array(r)]:[2,null]}})})},r.prototype.newEvmFilterAsync=function(t){return f(this,void 0,void 0,function(){var e,r;return p(this,function(n){switch(n.label){case 0:return e=(0,o.default)(t),B("Send filter "+e+" to newfilter"),[4,this._readClient.sendAsync("newevmfilter",{filter:e})];case 1:return(r=n.sent())?[2,r]:[2,null]}})})},r.prototype.getEvmFilterChangesAsync=function(t){return f(this,void 0,void 0,function(){var e,r;return p(this,function(n){switch(n.label){case 0:return B("Get filter changes for "+(0,o.default)({id:t},null,2)),[4,this._readClient.sendAsync("getevmfilterchanges",{id:t})];case 1:if(!(e=n.sent()))return[2,null];switch((r=w.EthFilterEnvelope.deserializeBinary(_.bufferToProtobufBytes(e))).getMessageCase()){case w.EthFilterEnvelope.MessageCase.ETH_BLOCK_HASH_LIST:return[2,r.getEthBlockHashList()];case w.EthFilterEnvelope.MessageCase.ETH_FILTER_LOG_LIST:return[2,r.getEthFilterLogList()];case w.EthFilterEnvelope.MessageCase.ETH_TX_HASH_LIST:return[2,r.getEthTxHashList()];case w.EthFilterEnvelope.MessageCase.MESSAGE_NOT_SET:default:return[2,null]}return[2]}})})},r.prototype.newBlockEvmFilterAsync=function(){return f(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return[4,this._readClient.sendAsync("newblockevmfilter",{})];case 1:return(t=e.sent())?[2,t.toString()]:[2,null]}})})},r.prototype.newPendingTransactionEvmFilterAsync=function(){return f(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return[4,this._readClient.sendAsync("newpendingtransactionevmfilter",{})];case 1:return(t=e.sent())?[2,t.toString()]:[2,null]}})})},r.prototype.uninstallEvmFilterAsync=function(t){return this._readClient.sendAsync("uninstallevmfilter",{id:t})},r.prototype.getEvmBlockByNumberAsync=function(t,e){return void 0===e&&(e=!0),f(this,void 0,void 0,function(){var r;return p(this,function(n){switch(n.label){case 0:return[4,this._readClient.sendAsync("getevmblockbynumber",{number:t,full:e})];case 1:return(r=n.sent())?[2,w.EthBlockInfo.deserializeBinary(_.bufferToProtobufBytes(_.B64ToUint8Array(r)))]:[2,null]}})})},r.prototype.getEvmBlockByHashAsync=function(e,r){return void 0===r&&(r=!0),f(this,void 0,void 0,function(){var n;return p(this,function(i){switch(i.label){case 0:return[4,this._readClient.sendAsync("getevmblockbyhash",{hash:t.from(e.slice(2),"hex").toString("base64"),full:r})];case 1:return(n=i.sent())?[2,w.EthBlockInfo.deserializeBinary(_.bufferToProtobufBytes(_.B64ToUint8Array(n)))]:[2,null]}})})},r.prototype.evmSubscribeAsync=function(t,e){var r=(0,o.default)(e);return this._readClient.sendAsync("evmsubscribe",{method:t,filter:r})},r.prototype.evmUnsubscribeAsync=function(t){return this._readClient.sendAsync("evmunsubscribe",{id:t})},r.prototype.getBlockHeightAsync=function(){return this._readClient.sendAsync("getblockheight",{})},r.prototype.getNonceAsync=function(t){return f(this,void 0,void 0,function(){var e;return p(this,function(r){switch(r.label){case 0:return e=parseInt,[4,this._readClient.sendAsync("nonce",{key:t})];case 1:return[2,e.apply(void 0,[r.sent(),10])]}})})},r.prototype.getContractAddressAsync=function(t){return f(this,void 0,void 0,function(){var e;return p(this,function(r){switch(r.label){case 0:return[4,this._readClient.sendAsync("resolve",{name:t})];case 1:return(e=r.sent())?[2,M.Address.fromString(e)]:[2,null]}})})},r.prototype._emitContractEvent=function(t,e){var r=e.error,n=e.result;if(r){var i={kind:g.Error,url:t,error:r};this.emit(g.Error,i)}else if(n){B("Event",e.id,n);i={id:e.id,kind:g.Contract,url:t,contractAddress:new M.Address(n.address.chain_id,new M.LocalAddress(_.B64ToUint8Array(n.address.local))),callerAddress:new M.Address(n.caller.chain_id,new M.LocalAddress(_.B64ToUint8Array(n.caller.local))),blockHeight:n.block_height,data:_.B64ToUint8Array(n.encoded_body||"0x0"),topics:n.topics,transactionHash:n.tx_hash,transactionHashBytes:n.tx_hash?_.B64ToUint8Array(n.tx_hash):new Uint8Array([])};this.emit(g.Contract,i)}},r.prototype._emitNetEvent=function(t,e,r){if(e===g.Error){var n={kind:e,url:t,error:r};this.emit(e,n)}else{n={kind:e,url:t};this.emit(e,n)}},r}(m.default);e.Client=R}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){var n=r(20),i=r(294),o={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,u={adapter:("undefined"!=typeof XMLHttpRequest?a=r(158):void 0!==e&&(a=r(158)),a),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)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(s(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}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(t){u.headers[t]={}}),n.forEach(["post","put","patch"],function(t){u.headers[t]=n.merge(o)}),t.exports=u}).call(this,r(24))},function(t,e,r){(function(e){var n=r(3),i=r(54);function o(t,r){var i=function(t){var e=s(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(),a=(n.mont(r.modulus),new n(t).mul(i.blinder).umod(r.modulus)),u=a.toRed(n.mont(r.prime1)),c=a.toRed(n.mont(r.prime2)),l=r.coefficient,h=r.prime1,f=r.prime2,p=u.redPow(r.exponent1),d=c.redPow(r.exponent2);p=p.fromRed(),d=d.fromRed();var g=p.isub(d).imul(l).umod(h);return g.imul(f),d.iadd(g),new e(d.imul(i.unblinder).umod(r.modulus).toArray(!1,o))}function s(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=s}).call(this,r(0).Buffer)},function(t,e,r){"use strict";e.utils=r(366),e.Cipher=r(365),e.DES=r(364),e.CBC=r(363),e.EDE=r(362)},function(t,e,r){var n={ECB:r(375),CBC:r(374),CFB:r(373),CFB8:r(372),CFB1:r(371),OFB:r(370),CTR:r(181),GCM:r(181)},i=r(179);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},function(t,e,r){var n=r(376),i=r(368),o=r(179);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){e.pbkdf2=r(380),e.pbkdf2Sync=r(182)},function(t,e,r){r(383);var n=function(t,e){return parseInt(t.slice(2*e+2,2*e+4),16)},i=function(t){return(t.length-2)/2},o=function(t){for(var e=[],r=2,n=t.length;r<n;r+=2)e.push(parseInt(t.slice(r,r+2),16));return e},s=function(t){for(var e="0x",r=0,n=t.length;r<n;++r){var i=t[r];e+=(i<16?"0":"")+i.toString(16)}return e};t.exports={random:function(t){var e=void 0;e="undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues?window.crypto.getRandomValues(new Uint8Array(t)):r(81).randomBytes(t);for(var n="0x",i=0;i<t;++i)n+=("00"+e[i].toString(16)).slice(-2);return n},length:i,concat:function(t,e){return t.concat(e.slice(2))},flatten:function(t){return"0x"+t.reduce(function(t,e){return t+e.slice(2)},"")},slice:function(t,e,r){return"0x"+r.slice(2*t+2,2*e+2)},reverse:function(t){for(var e="0x",r=0,n=i(t);r<n;++r)e+=t.slice(2*(n-r),2*(n-r+1));return e},pad:function t(e,r){return r.length===2*e+2?r:t(e,"0x0"+r.slice(2))},padRight:function t(e,r){return r.length===2*e+2?r:t(e,r+"0")},fromAscii:function(t){for(var e="0x",r=0;r<t.length;++r)e+=("00"+t.charCodeAt(r).toString(16)).slice(-2);return e},toAscii:function(t){for(var e="",r=2;r<t.length;r+=2)e+=String.fromCharCode(parseInt(t.slice(r,r+2),16));return e},fromString:function(t){for(var e=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},r="0x",n=0;n!=t.length;n++){var i=t.charCodeAt(n);if(i<128)r+=e(i);else{if(i<2048)r+=e(i>>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);r<o;){var s=n(t,r++);if(s>127){if(s>191&&s<224){if(r>=o)return null;s=(31&s)<<6|63&n(t,r)}else if(s>223&&s<240){if(r+1>=o)return null;s=(15&s)<<12|(63&n(t,r))<<6|63&n(t,++r)}else{if(!(s>239&&s<248))return null;if(r+2>=o)return null;s=(7&s)<<18|(63&n(t,r))<<12|(63&n(t,++r))<<6|63&n(t,++r)}++r}if(s<=65535)e+=String.fromCharCode(s);else{if(!(s<=1114111))return null;s-=65536,e+=String.fromCharCode(s>>10|55296),e+=String.fromCharCode(1023&s|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:s,toArray:o,fromUint8Array:function(t){return s([].slice.call(t,0))},toUint8Array:function(t){return new Uint8Array(o(t))}}},function(t,e,r){var n=e;n.utils=r(27),n.common=r(63),n.sha=r(446),n.ripemd=r(442),n.hmac=r(441),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){(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(458),e.sha1=r(457),e.sha224=r(456),e.sha256=r(210),e.sha384=r(455),e.sha512=r(209)},function(t,e,r){"use strict";var n=r(459);function i(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,h=0;h<t.length;h+=16){var f=r,p=n,d=i,g=o;n=c(n=c(n=c(n=c(n=u(n=u(n=u(n=u(n=a(n=a(n=a(n=a(n=s(n=s(n=s(n=s(n,i=s(i,o=s(o,r=s(r,n,i,o,t[h+0],7,-680876936),n,i,t[h+1],12,-389564586),r,n,t[h+2],17,606105819),o,r,t[h+3],22,-1044525330),i=s(i,o=s(o,r=s(r,n,i,o,t[h+4],7,-176418897),n,i,t[h+5],12,1200080426),r,n,t[h+6],17,-1473231341),o,r,t[h+7],22,-45705983),i=s(i,o=s(o,r=s(r,n,i,o,t[h+8],7,1770035416),n,i,t[h+9],12,-1958414417),r,n,t[h+10],17,-42063),o,r,t[h+11],22,-1990404162),i=s(i,o=s(o,r=s(r,n,i,o,t[h+12],7,1804603682),n,i,t[h+13],12,-40341101),r,n,t[h+14],17,-1502002290),o,r,t[h+15],22,1236535329),i=a(i,o=a(o,r=a(r,n,i,o,t[h+1],5,-165796510),n,i,t[h+6],9,-1069501632),r,n,t[h+11],14,643717713),o,r,t[h+0],20,-373897302),i=a(i,o=a(o,r=a(r,n,i,o,t[h+5],5,-701558691),n,i,t[h+10],9,38016083),r,n,t[h+15],14,-660478335),o,r,t[h+4],20,-405537848),i=a(i,o=a(o,r=a(r,n,i,o,t[h+9],5,568446438),n,i,t[h+14],9,-1019803690),r,n,t[h+3],14,-187363961),o,r,t[h+8],20,1163531501),i=a(i,o=a(o,r=a(r,n,i,o,t[h+13],5,-1444681467),n,i,t[h+2],9,-51403784),r,n,t[h+7],14,1735328473),o,r,t[h+12],20,-1926607734),i=u(i,o=u(o,r=u(r,n,i,o,t[h+5],4,-378558),n,i,t[h+8],11,-2022574463),r,n,t[h+11],16,1839030562),o,r,t[h+14],23,-35309556),i=u(i,o=u(o,r=u(r,n,i,o,t[h+1],4,-1530992060),n,i,t[h+4],11,1272893353),r,n,t[h+7],16,-155497632),o,r,t[h+10],23,-1094730640),i=u(i,o=u(o,r=u(r,n,i,o,t[h+13],4,681279174),n,i,t[h+0],11,-358537222),r,n,t[h+3],16,-722521979),o,r,t[h+6],23,76029189),i=u(i,o=u(o,r=u(r,n,i,o,t[h+9],4,-640364487),n,i,t[h+12],11,-421815835),r,n,t[h+15],16,530742520),o,r,t[h+2],23,-995338651),i=c(i,o=c(o,r=c(r,n,i,o,t[h+0],6,-198630844),n,i,t[h+7],10,1126891415),r,n,t[h+14],15,-1416354905),o,r,t[h+5],21,-57434055),i=c(i,o=c(o,r=c(r,n,i,o,t[h+12],6,1700485571),n,i,t[h+3],10,-1894986606),r,n,t[h+10],15,-1051523),o,r,t[h+1],21,-2054922799),i=c(i,o=c(o,r=c(r,n,i,o,t[h+8],6,1873313359),n,i,t[h+15],10,-30611744),r,n,t[h+6],15,-1560198380),o,r,t[h+13],21,1309151649),i=c(i,o=c(o,r=c(r,n,i,o,t[h+4],6,-145523070),n,i,t[h+11],10,-1120210379),r,n,t[h+2],15,718787259),o,r,t[h+9],21,-343485551),r=l(r,f),n=l(n,p),i=l(i,d),o=l(o,g)}return[r,n,i,o]}function o(t,e,r,n,i,o){return l((s=l(l(e,t),l(n,o)))<<(a=i)|s>>>32-a,r);var s,a}function s(t,e,r,n,i,s,a){return o(e&r|~e&n,t,e,i,s,a)}function a(t,e,r,n,i,s,a){return o(e&n|r&~n,t,e,i,s,a)}function u(t,e,r,n,i,s,a){return o(e^r^n,t,e,i,s,a)}function c(t,e,r,n,i,s,a){return o(r^(e|~n),t,e,i,s,a)}function l(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}t.exports=function(t){return n(t,i)}},function(t,e){t.exports=function(t){return"string"==typeof t||t instanceof String}},function(t,e,r){var n=r(219);t.exports=function(t){return"object"==typeof t&&n(t)&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof String)&&!(t instanceof Number)}},function(t,e,r){"use strict";var n=r(92);t.exports.f=function(t){return new function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)}(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,r){var n=r(18),i=r(13),o=r(90),s=r(118),a=r(39).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,r){e.f=r(17)},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,r){var n=r(30),i=r(559),o=r(119),s=r(126)("IE_PROTO"),a=function(){},u=function(){var t,e=r(124)("iframe"),n=o.length;for(e.style.display="none",r(233).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[o[n]];return u()};t.exports=Object.create||function(t,e){var r;return null!==t?(a.prototype=n(t),r=new a,a.prototype=null,r[s]=t):r=u(),void 0===e?r:i(r,e)}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e,r){"use strict";e.__esModule=!0;var n=s(r(563)),i=s(r(552)),o="function"==typeof i.default&&"symbol"==typeof n.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};function s(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof i.default&&"symbol"===o(n.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":o(t)}},function(t,e,r){var n=r(38);t.exports=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(38),i=r(18).document,o=n(i)&&n(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,r){var n=r(18),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,r){var n=r(125)("keys"),i=r(93);t.exports=function(t){return n[t]||(n[t]=i(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(127);t.exports=function(t){return Object(n(t))}},function(t,e,r){"use strict";(function(t){var n,i=r(4),o=i(r(7)),s=i(r(6)),a=i(r(5)),u=i(r(29)),c=i(r(28)),l=(n=c.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,u.default)(e):(r.prototype=e.prototype,new r)}),h=function(t,e,r,n){return new(r||(r=a.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},f=function(t,e){var r,n,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof s.default&&(a[o.default]=function(){return this}),a;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},p=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var d=r(570),g=r(42),y=p(r(70)),m=r(86),b=y.default("ws-rpc-client"),v=function(e){function r(r,n){void 0===n&&(n={});var i=e.call(this)||this;i.url=r,i._isSubcribed=!1,i._rpcId=0,i._getNextRequestId=function(){return(++i._rpcId).toString()},i._onEventMessage=function(e){var r=e instanceof ArrayBuffer?t.from(e).toString():e,n=JSON.parse(r);("0"===n.id||/^0x.+$/.test(n.id))&&i.emit(m.RPCClientEvent.Message,i.url,n)};var o=n.autoConnect,s=void 0===o||o,a=n.requestTimeout,u=void 0===a?15e3:a,c=n.reconnectInterval,l=n.maxReconnects,h=void 0===l?0:l,f=n.generateRequestId,p=void 0===f?i._getNextRequestId:f;return i._client=new d.Client(r,{autoconnect:s,reconnect:!0,reconnect_interval:c,max_reconnects:h},p),i.requestTimeout=u,i.on("newListener",function(t){t===m.RPCClientEvent.Message&&0===i.listenerCount(t)&&(i._client.socket.on("message",i._onEventMessage),i._client.ready&&(b("Subscribe for events"),i._client.call("subevents",{topics:null},i.requestTimeout).then(function(){i._isSubcribed=!0,i.emit(m.RPCClientEvent.Subscribed,i.url,!0)}).catch(function(t){return i.emit(m.RPCClientEvent.Error,i.url,t)})))}),i.on("removeListener",function(t){t===m.RPCClientEvent.Message&&0===i.listenerCount(t)&&(i._client.socket.removeListener("message",i._onEventMessage),i._client.ready&&(b("Unsubscribed for events"),i._client.call("unsubevents",{topics:null},i.requestTimeout).then(function(){i._isSubcribed=!1,i.emit(m.RPCClientEvent.Subscribed,i.url,!1)}).catch(function(t){i.emit(m.RPCClientEvent.Error,i.url,t)})))}),i._client.on("open",function(){i.emit(m.RPCClientEvent.Connected,i.url),i.listenerCount(m.RPCClientEvent.Message)>0&&i._client.call("subevents",{topics:null},i.requestTimeout).then(function(){i._isSubcribed=!0,i.emit(m.RPCClientEvent.Subscribed,i.url,!0)}).catch(function(t){return i.emit(m.RPCClientEvent.Error,i.url,t)})}),i._client.on("close",function(){i.listenerCount(m.RPCClientEvent.Message)>0&&(i._isSubcribed=!1,i.emit(m.RPCClientEvent.Subscribed,i.url,!1)),i.emit(m.RPCClientEvent.Disconnected,i.url)}),i._client.on("error",function(t){return i.emit(m.RPCClientEvent.Error,i.url,t)}),i}return l(r,e),Object.defineProperty(r.prototype,"isSubscribed",{get:function(){return this._isSubcribed},enumerable:!0,configurable:!0}),r.prototype.disconnect=function(){this._client.reconnect=!1,this._client.close(0)},r.prototype.ensureConnectionAsync=function(){var t=this;return this._client.ready?a.default.resolve():new a.default(function(e,r){var n=setTimeout(function(){return r(new Error("[WSRPCClient] Timeout while waiting for connection"))},t.requestTimeout);t._client.once("open",function(){clearTimeout(n),e()})})},r.prototype.sendAsync=function(t,e){return h(this,void 0,void 0,function(){return f(this,function(r){switch(r.label){case 0:return[4,this.ensureConnectionAsync()];case 1:return r.sent(),b("Sending RPC msg to "+this.url+", method "+t),[2,this._client.call(t,e,this.requestTimeout)]}})})},r}(g.EventEmitter);e.WSRPCClient=v}).call(this,r(0).Buffer)},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=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(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 l(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 h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function p(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<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[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";(function(e,n,i){var o=r(94);function s(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 a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;b.WritableState=m;var c=r(69);c.inherits=r(1);var l={deprecate:r(576)},h=r(248),f=r(2).Buffer,p=i.Uint8Array||function(){};var d,g=r(247);function y(){}function m(t,e){a=a||r(51),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,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 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(A,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),A(t,e))}(t,r,n,e,i);else{var s=M(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),n?u(w,t,r,s,i):w(t,r,s,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 s(this)}function b(t){if(a=a||r(51),!(d.call(b,this)||this instanceof a))return new b(t);this._writableState=new m(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 v(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),A(t,e)}function _(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 a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,v(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 s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(v(t,e,!1,e.objectMode?1:c.length,c,l,h),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 E(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),A(t,e)})}function A(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(E,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(b,h),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.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]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===b&&(t&&t._writableState instanceof m)}})):d=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,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,f.isBuffer(n)||n instanceof p);return a&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=y),i.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,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else v(t,e,!1,a,n,i,o);return u}(this,i,a,t,e,r)),s},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},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,A(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=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(24),r(578).setImmediate,r(8))},function(t,e,r){(e=t.exports=r(249)).Stream=e,e.Readable=e,e.Writable=r(131),e.Duplex=r(51),e.Transform=r(246),e.PassThrough=r(575)},function(t,e,r){var n=r(43);t.exports=function(t,e,r){for(var i in e)r&&t[i]?t[i]=e[i]:n(t,i,e[i]);return t}},function(t,e,r){"use strict";var n=r(76);t.exports.f=function(t){return new function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)}(t)}},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e,r){var n=r(73),i=r(15)("toStringTag"),o="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:o?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(16),i=r(11),o=r(101),s=r(141),a=r(34).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,r){var n=r(98)("meta"),i=r(25),o=r(52),s=r(34).f,a=0,u=Object.isExtensible||function(){return!0},c=!r(53)(function(){return u(Object.preventExtensions({}))}),l=function(t){s(t,n,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,n)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[n].i},getWeak:function(t,e){if(!o(t,n)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[n].w},onFreeze:function(t){return c&&h.NEED&&u(t)&&!o(t,n)&&l(t),t}}},function(t,e,r){e.f=r(15)},function(t,e,r){r(610);for(var n=r(16),i=r(43),o=r(75),s=r(15)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<a.length;u++){var c=a[u],l=n[c],h=l&&l.prototype;h&&!h[s]&&i(h,s,c),o[c]=o.Array}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,r){var n=r(16),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,r){var n=r(144)("keys"),i=r(98);t.exports=function(t){return n[t]||(n[t]=i(t))}},function(t,e,r){var n=r(152),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},function(t,e,r){var n=r(73);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,r){var n=r(25);t.exports=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(25),i=r(16).document,o=n(i)&&n(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,r){"use strict";var n=r(101),i=r(19),o=r(264),s=r(43),a=r(75),u=r(615),c=r(72),l=r(611),h=r(15)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,r,d,g,y,m){u(r,e,d);var b,v,w,_=function(t){if(!f&&t in B)return B[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},M=e+" Iterator",E="values"==g,A=!1,B=t.prototype,T=B[h]||B["@@iterator"]||g&&B[g],R=T||_(g),x=g?E?_("entries"):R:void 0,S="Array"==e&&B.entries||T;if(S&&(w=l(S.call(new t)))!==Object.prototype&&w.next&&(c(w,M,!0),n||"function"==typeof w[h]||s(w,h,p)),E&&T&&"values"!==T.name&&(A=!0,R=function(){return T.call(this)}),n&&!m||!f&&!A&&B[h]||s(B,h,R),a[e]=R,a[M]=p,g)if(b={values:E?R:_("values"),keys:y?R:_("keys"),entries:x},m)for(v in b)v in B||o(B,v,b[v]);else i(i.P+i.F*(f||A),e,b);return b}},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 r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e,r){"use strict";var n=r(616)(!0);r(150)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e,r){"use strict";var n=r(41),i=n,o=Function("return this")(),s=r(14);i.exportSymbol("proto.DepositRequest",null,o),i.exportSymbol("proto.GetBlockRequest",null,o),i.exportSymbol("proto.GetBlockResponse",null,o),i.exportSymbol("proto.GetCurrentBlockRequest",null,o),i.exportSymbol("proto.GetCurrentBlockResponse",null,o),i.exportSymbol("proto.PlasmaBlock",null,o),i.exportSymbol("proto.PlasmaTx",null,o),i.exportSymbol("proto.PlasmaTxRequest",null,o),i.exportSymbol("proto.PlasmaTxResponse",null,o),i.exportSymbol("proto.SubmitBlockToMainnetRequest",null,o),i.exportSymbol("proto.SubmitBlockToMainnetResponse",null,o),proto.PlasmaBlock=function(t){n.Message.initialize(this,t,0,-1,proto.PlasmaBlock.repeatedFields_,null)},i.inherits(proto.PlasmaBlock,n.Message),i.DEBUG&&!COMPILED&&(proto.PlasmaBlock.displayName="proto.PlasmaBlock"),proto.PlasmaBlock.repeatedFields_=[2],n.Message.GENERATE_TO_OBJECT&&(proto.PlasmaBlock.prototype.toObject=function(t){return proto.PlasmaBlock.toObject(t,this)},proto.PlasmaBlock.toObject=function(t,e){var r,i={uid:(r=e.getUid())&&s.BigUInt.toObject(t,r),transactionsList:n.Message.toObjectList(e.getTransactionsList(),proto.PlasmaTx.toObject,t),signature:e.getSignature_asB64(),merkleHash:e.getMerkleHash_asB64(),hash:e.getHash_asB64(),proof:e.getProof_asB64()};return t&&(i.$jspbMessageInstance=e),i}),proto.PlasmaBlock.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.PlasmaBlock;return proto.PlasmaBlock.deserializeBinaryFromReader(r,e)},proto.PlasmaBlock.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setUid(r);break;case 2:r=new proto.PlasmaTx;e.readMessage(r,proto.PlasmaTx.deserializeBinaryFromReader),t.addTransactions(r);break;case 3:r=e.readBytes();t.setSignature(r);break;case 4:r=e.readBytes();t.setMerkleHash(r);break;case 5:r=e.readBytes();t.setHash(r);break;case 6:r=e.readBytes();t.setProof(r);break;default:e.skipField()}}return t},proto.PlasmaBlock.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.PlasmaBlock.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.PlasmaBlock.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getUid())&&e.writeMessage(1,r,s.BigUInt.serializeBinaryToWriter),(r=t.getTransactionsList()).length>0&&e.writeRepeatedMessage(2,r,proto.PlasmaTx.serializeBinaryToWriter),(r=t.getSignature_asU8()).length>0&&e.writeBytes(3,r),(r=t.getMerkleHash_asU8()).length>0&&e.writeBytes(4,r),(r=t.getHash_asU8()).length>0&&e.writeBytes(5,r),(r=t.getProof_asU8()).length>0&&e.writeBytes(6,r)},proto.PlasmaBlock.prototype.getUid=function(){return n.Message.getWrapperField(this,s.BigUInt,1)},proto.PlasmaBlock.prototype.setUid=function(t){n.Message.setWrapperField(this,1,t)},proto.PlasmaBlock.prototype.clearUid=function(){this.setUid(void 0)},proto.PlasmaBlock.prototype.hasUid=function(){return null!=n.Message.getField(this,1)},proto.PlasmaBlock.prototype.getTransactionsList=function(){return n.Message.getRepeatedWrapperField(this,proto.PlasmaTx,2)},proto.PlasmaBlock.prototype.setTransactionsList=function(t){n.Message.setRepeatedWrapperField(this,2,t)},proto.PlasmaBlock.prototype.addTransactions=function(t,e){return n.Message.addToRepeatedWrapperField(this,2,t,proto.PlasmaTx,e)},proto.PlasmaBlock.prototype.clearTransactionsList=function(){this.setTransactionsList([])},proto.PlasmaBlock.prototype.getSignature=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.PlasmaBlock.prototype.getSignature_asB64=function(){return n.Message.bytesAsB64(this.getSignature())},proto.PlasmaBlock.prototype.getSignature_asU8=function(){return n.Message.bytesAsU8(this.getSignature())},proto.PlasmaBlock.prototype.setSignature=function(t){n.Message.setProto3BytesField(this,3,t)},proto.PlasmaBlock.prototype.getMerkleHash=function(){return n.Message.getFieldWithDefault(this,4,"")},proto.PlasmaBlock.prototype.getMerkleHash_asB64=function(){return n.Message.bytesAsB64(this.getMerkleHash())},proto.PlasmaBlock.prototype.getMerkleHash_asU8=function(){return n.Message.bytesAsU8(this.getMerkleHash())},proto.PlasmaBlock.prototype.setMerkleHash=function(t){n.Message.setProto3BytesField(this,4,t)},proto.PlasmaBlock.prototype.getHash=function(){return n.Message.getFieldWithDefault(this,5,"")},proto.PlasmaBlock.prototype.getHash_asB64=function(){return n.Message.bytesAsB64(this.getHash())},proto.PlasmaBlock.prototype.getHash_asU8=function(){return n.Message.bytesAsU8(this.getHash())},proto.PlasmaBlock.prototype.setHash=function(t){n.Message.setProto3BytesField(this,5,t)},proto.PlasmaBlock.prototype.getProof=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.PlasmaBlock.prototype.getProof_asB64=function(){return n.Message.bytesAsB64(this.getProof())},proto.PlasmaBlock.prototype.getProof_asU8=function(){return n.Message.bytesAsU8(this.getProof())},proto.PlasmaBlock.prototype.setProof=function(t){n.Message.setProto3BytesField(this,6,t)},proto.PlasmaTx=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.PlasmaTx,n.Message),i.DEBUG&&!COMPILED&&(proto.PlasmaTx.displayName="proto.PlasmaTx"),n.Message.GENERATE_TO_OBJECT&&(proto.PlasmaTx.prototype.toObject=function(t){return proto.PlasmaTx.toObject(t,this)},proto.PlasmaTx.toObject=function(t,e){var r,i={slot:n.Message.getFieldWithDefault(e,1,"0"),previousBlock:(r=e.getPreviousBlock())&&s.BigUInt.toObject(t,r),denomination:(r=e.getDenomination())&&s.BigUInt.toObject(t,r),newOwner:(r=e.getNewOwner())&&s.Address.toObject(t,r),signature:e.getSignature_asB64(),hash:e.getHash_asB64(),merkleHash:e.getMerkleHash_asB64(),sender:(r=e.getSender())&&s.Address.toObject(t,r),proof:e.getProof_asB64()};return t&&(i.$jspbMessageInstance=e),i}),proto.PlasmaTx.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.PlasmaTx;return proto.PlasmaTx.deserializeBinaryFromReader(r,e)},proto.PlasmaTx.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readUint64String();t.setSlot(r);break;case 2:r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setPreviousBlock(r);break;case 3:r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setDenomination(r);break;case 4:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setNewOwner(r);break;case 5:r=e.readBytes();t.setSignature(r);break;case 6:r=e.readBytes();t.setHash(r);break;case 7:r=e.readBytes();t.setMerkleHash(r);break;case 8:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setSender(r);break;case 9:r=e.readBytes();t.setProof(r);break;default:e.skipField()}}return t},proto.PlasmaTx.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.PlasmaTx.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.PlasmaTx.serializeBinaryToWriter=function(t,e){var r=void 0;r=t.getSlot(),0!==parseInt(r,10)&&e.writeUint64String(1,r),null!=(r=t.getPreviousBlock())&&e.writeMessage(2,r,s.BigUInt.serializeBinaryToWriter),null!=(r=t.getDenomination())&&e.writeMessage(3,r,s.BigUInt.serializeBinaryToWriter),null!=(r=t.getNewOwner())&&e.writeMessage(4,r,s.Address.serializeBinaryToWriter),(r=t.getSignature_asU8()).length>0&&e.writeBytes(5,r),(r=t.getHash_asU8()).length>0&&e.writeBytes(6,r),(r=t.getMerkleHash_asU8()).length>0&&e.writeBytes(7,r),null!=(r=t.getSender())&&e.writeMessage(8,r,s.Address.serializeBinaryToWriter),(r=t.getProof_asU8()).length>0&&e.writeBytes(9,r)},proto.PlasmaTx.prototype.getSlot=function(){return n.Message.getFieldWithDefault(this,1,"0")},proto.PlasmaTx.prototype.setSlot=function(t){n.Message.setProto3StringIntField(this,1,t)},proto.PlasmaTx.prototype.getPreviousBlock=function(){return n.Message.getWrapperField(this,s.BigUInt,2)},proto.PlasmaTx.prototype.setPreviousBlock=function(t){n.Message.setWrapperField(this,2,t)},proto.PlasmaTx.prototype.clearPreviousBlock=function(){this.setPreviousBlock(void 0)},proto.PlasmaTx.prototype.hasPreviousBlock=function(){return null!=n.Message.getField(this,2)},proto.PlasmaTx.prototype.getDenomination=function(){return n.Message.getWrapperField(this,s.BigUInt,3)},proto.PlasmaTx.prototype.setDenomination=function(t){n.Message.setWrapperField(this,3,t)},proto.PlasmaTx.prototype.clearDenomination=function(){this.setDenomination(void 0)},proto.PlasmaTx.prototype.hasDenomination=function(){return null!=n.Message.getField(this,3)},proto.PlasmaTx.prototype.getNewOwner=function(){return n.Message.getWrapperField(this,s.Address,4)},proto.PlasmaTx.prototype.setNewOwner=function(t){n.Message.setWrapperField(this,4,t)},proto.PlasmaTx.prototype.clearNewOwner=function(){this.setNewOwner(void 0)},proto.PlasmaTx.prototype.hasNewOwner=function(){return null!=n.Message.getField(this,4)},proto.PlasmaTx.prototype.getSignature=function(){return n.Message.getFieldWithDefault(this,5,"")},proto.PlasmaTx.prototype.getSignature_asB64=function(){return n.Message.bytesAsB64(this.getSignature())},proto.PlasmaTx.prototype.getSignature_asU8=function(){return n.Message.bytesAsU8(this.getSignature())},proto.PlasmaTx.prototype.setSignature=function(t){n.Message.setProto3BytesField(this,5,t)},proto.PlasmaTx.prototype.getHash=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.PlasmaTx.prototype.getHash_asB64=function(){return n.Message.bytesAsB64(this.getHash())},proto.PlasmaTx.prototype.getHash_asU8=function(){return n.Message.bytesAsU8(this.getHash())},proto.PlasmaTx.prototype.setHash=function(t){n.Message.setProto3BytesField(this,6,t)},proto.PlasmaTx.prototype.getMerkleHash=function(){return n.Message.getFieldWithDefault(this,7,"")},proto.PlasmaTx.prototype.getMerkleHash_asB64=function(){return n.Message.bytesAsB64(this.getMerkleHash())},proto.PlasmaTx.prototype.getMerkleHash_asU8=function(){return n.Message.bytesAsU8(this.getMerkleHash())},proto.PlasmaTx.prototype.setMerkleHash=function(t){n.Message.setProto3BytesField(this,7,t)},proto.PlasmaTx.prototype.getSender=function(){return n.Message.getWrapperField(this,s.Address,8)},proto.PlasmaTx.prototype.setSender=function(t){n.Message.setWrapperField(this,8,t)},proto.PlasmaTx.prototype.clearSender=function(){this.setSender(void 0)},proto.PlasmaTx.prototype.hasSender=function(){return null!=n.Message.getField(this,8)},proto.PlasmaTx.prototype.getProof=function(){return n.Message.getFieldWithDefault(this,9,"")},proto.PlasmaTx.prototype.getProof_asB64=function(){return n.Message.bytesAsB64(this.getProof())},proto.PlasmaTx.prototype.getProof_asU8=function(){return n.Message.bytesAsU8(this.getProof())},proto.PlasmaTx.prototype.setProof=function(t){n.Message.setProto3BytesField(this,9,t)},proto.GetCurrentBlockRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.GetCurrentBlockRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.GetCurrentBlockRequest.displayName="proto.GetCurrentBlockRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.GetCurrentBlockRequest.prototype.toObject=function(t){return proto.GetCurrentBlockRequest.toObject(t,this)},proto.GetCurrentBlockRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.GetCurrentBlockRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.GetCurrentBlockRequest;return proto.GetCurrentBlockRequest.deserializeBinaryFromReader(r,e)},proto.GetCurrentBlockRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.GetCurrentBlockRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.GetCurrentBlockRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.GetCurrentBlockRequest.serializeBinaryToWriter=function(t,e){},proto.GetCurrentBlockResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.GetCurrentBlockResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.GetCurrentBlockResponse.displayName="proto.GetCurrentBlockResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.GetCurrentBlockResponse.prototype.toObject=function(t){return proto.GetCurrentBlockResponse.toObject(t,this)},proto.GetCurrentBlockResponse.toObject=function(t,e){var r,n={blockHeight:(r=e.getBlockHeight())&&s.BigUInt.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.GetCurrentBlockResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.GetCurrentBlockResponse;return proto.GetCurrentBlockResponse.deserializeBinaryFromReader(r,e)},proto.GetCurrentBlockResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setBlockHeight(r);break;default:e.skipField()}}return t},proto.GetCurrentBlockResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.GetCurrentBlockResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.GetCurrentBlockResponse.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getBlockHeight())&&e.writeMessage(1,r,s.BigUInt.serializeBinaryToWriter)},proto.GetCurrentBlockResponse.prototype.getBlockHeight=function(){return n.Message.getWrapperField(this,s.BigUInt,1)},proto.GetCurrentBlockResponse.prototype.setBlockHeight=function(t){n.Message.setWrapperField(this,1,t)},proto.GetCurrentBlockResponse.prototype.clearBlockHeight=function(){this.setBlockHeight(void 0)},proto.GetCurrentBlockResponse.prototype.hasBlockHeight=function(){return null!=n.Message.getField(this,1)},proto.GetBlockRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.GetBlockRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.GetBlockRequest.displayName="proto.GetBlockRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.GetBlockRequest.prototype.toObject=function(t){return proto.GetBlockRequest.toObject(t,this)},proto.GetBlockRequest.toObject=function(t,e){var r,n={blockHeight:(r=e.getBlockHeight())&&s.BigUInt.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.GetBlockRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.GetBlockRequest;return proto.GetBlockRequest.deserializeBinaryFromReader(r,e)},proto.GetBlockRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setBlockHeight(r);break;default:e.skipField()}}return t},proto.GetBlockRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.GetBlockRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.GetBlockRequest.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getBlockHeight())&&e.writeMessage(1,r,s.BigUInt.serializeBinaryToWriter)},proto.GetBlockRequest.prototype.getBlockHeight=function(){return n.Message.getWrapperField(this,s.BigUInt,1)},proto.GetBlockRequest.prototype.setBlockHeight=function(t){n.Message.setWrapperField(this,1,t)},proto.GetBlockRequest.prototype.clearBlockHeight=function(){this.setBlockHeight(void 0)},proto.GetBlockRequest.prototype.hasBlockHeight=function(){return null!=n.Message.getField(this,1)},proto.GetBlockResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.GetBlockResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.GetBlockResponse.displayName="proto.GetBlockResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.GetBlockResponse.prototype.toObject=function(t){return proto.GetBlockResponse.toObject(t,this)},proto.GetBlockResponse.toObject=function(t,e){var r,n={block:(r=e.getBlock())&&proto.PlasmaBlock.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.GetBlockResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.GetBlockResponse;return proto.GetBlockResponse.deserializeBinaryFromReader(r,e)},proto.GetBlockResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.PlasmaBlock;e.readMessage(r,proto.PlasmaBlock.deserializeBinaryFromReader),t.setBlock(r);break;default:e.skipField()}}return t},proto.GetBlockResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.GetBlockResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.GetBlockResponse.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getBlock())&&e.writeMessage(1,r,proto.PlasmaBlock.serializeBinaryToWriter)},proto.GetBlockResponse.prototype.getBlock=function(){return n.Message.getWrapperField(this,proto.PlasmaBlock,1)},proto.GetBlockResponse.prototype.setBlock=function(t){n.Message.setWrapperField(this,1,t)},proto.GetBlockResponse.prototype.clearBlock=function(){this.setBlock(void 0)},proto.GetBlockResponse.prototype.hasBlock=function(){return null!=n.Message.getField(this,1)},proto.SubmitBlockToMainnetRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.SubmitBlockToMainnetRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.SubmitBlockToMainnetRequest.displayName="proto.SubmitBlockToMainnetRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.SubmitBlockToMainnetRequest.prototype.toObject=function(t){return proto.SubmitBlockToMainnetRequest.toObject(t,this)},proto.SubmitBlockToMainnetRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.SubmitBlockToMainnetRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.SubmitBlockToMainnetRequest;return proto.SubmitBlockToMainnetRequest.deserializeBinaryFromReader(r,e)},proto.SubmitBlockToMainnetRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.SubmitBlockToMainnetRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.SubmitBlockToMainnetRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.SubmitBlockToMainnetRequest.serializeBinaryToWriter=function(t,e){},proto.SubmitBlockToMainnetResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.SubmitBlockToMainnetResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.SubmitBlockToMainnetResponse.displayName="proto.SubmitBlockToMainnetResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.SubmitBlockToMainnetResponse.prototype.toObject=function(t){return proto.SubmitBlockToMainnetResponse.toObject(t,this)},proto.SubmitBlockToMainnetResponse.toObject=function(t,e){var r={merkleHash:e.getMerkleHash_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.SubmitBlockToMainnetResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.SubmitBlockToMainnetResponse;return proto.SubmitBlockToMainnetResponse.deserializeBinaryFromReader(r,e)},proto.SubmitBlockToMainnetResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.setMerkleHash(r);break;default:e.skipField()}}return t},proto.SubmitBlockToMainnetResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.SubmitBlockToMainnetResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.SubmitBlockToMainnetResponse.serializeBinaryToWriter=function(t,e){var r;(r=t.getMerkleHash_asU8()).length>0&&e.writeBytes(1,r)},proto.SubmitBlockToMainnetResponse.prototype.getMerkleHash=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.SubmitBlockToMainnetResponse.prototype.getMerkleHash_asB64=function(){return n.Message.bytesAsB64(this.getMerkleHash())},proto.SubmitBlockToMainnetResponse.prototype.getMerkleHash_asU8=function(){return n.Message.bytesAsU8(this.getMerkleHash())},proto.SubmitBlockToMainnetResponse.prototype.setMerkleHash=function(t){n.Message.setProto3BytesField(this,1,t)},proto.PlasmaTxRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.PlasmaTxRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.PlasmaTxRequest.displayName="proto.PlasmaTxRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.PlasmaTxRequest.prototype.toObject=function(t){return proto.PlasmaTxRequest.toObject(t,this)},proto.PlasmaTxRequest.toObject=function(t,e){var r,n={plasmatx:(r=e.getPlasmatx())&&proto.PlasmaTx.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.PlasmaTxRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.PlasmaTxRequest;return proto.PlasmaTxRequest.deserializeBinaryFromReader(r,e)},proto.PlasmaTxRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.PlasmaTx;e.readMessage(r,proto.PlasmaTx.deserializeBinaryFromReader),t.setPlasmatx(r);break;default:e.skipField()}}return t},proto.PlasmaTxRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.PlasmaTxRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.PlasmaTxRequest.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getPlasmatx())&&e.writeMessage(1,r,proto.PlasmaTx.serializeBinaryToWriter)},proto.PlasmaTxRequest.prototype.getPlasmatx=function(){return n.Message.getWrapperField(this,proto.PlasmaTx,1)},proto.PlasmaTxRequest.prototype.setPlasmatx=function(t){n.Message.setWrapperField(this,1,t)},proto.PlasmaTxRequest.prototype.clearPlasmatx=function(){this.setPlasmatx(void 0)},proto.PlasmaTxRequest.prototype.hasPlasmatx=function(){return null!=n.Message.getField(this,1)},proto.PlasmaTxResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.PlasmaTxResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.PlasmaTxResponse.displayName="proto.PlasmaTxResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.PlasmaTxResponse.prototype.toObject=function(t){return proto.PlasmaTxResponse.toObject(t,this)},proto.PlasmaTxResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.PlasmaTxResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.PlasmaTxResponse;return proto.PlasmaTxResponse.deserializeBinaryFromReader(r,e)},proto.PlasmaTxResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.PlasmaTxResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.PlasmaTxResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.PlasmaTxResponse.serializeBinaryToWriter=function(t,e){},proto.DepositRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.DepositRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.DepositRequest.displayName="proto.DepositRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.DepositRequest.prototype.toObject=function(t){return proto.DepositRequest.toObject(t,this)},proto.DepositRequest.toObject=function(t,e){var r,i={slot:n.Message.getFieldWithDefault(e,1,"0"),depositBlock:(r=e.getDepositBlock())&&s.BigUInt.toObject(t,r),denomination:(r=e.getDenomination())&&s.BigUInt.toObject(t,r),from:(r=e.getFrom())&&s.Address.toObject(t,r),contract:(r=e.getContract())&&s.Address.toObject(t,r)};return t&&(i.$jspbMessageInstance=e),i}),proto.DepositRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.DepositRequest;return proto.DepositRequest.deserializeBinaryFromReader(r,e)},proto.DepositRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readUint64String();t.setSlot(r);break;case 2:r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setDepositBlock(r);break;case 3:r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setDenomination(r);break;case 4:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setFrom(r);break;case 5:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setContract(r);break;default:e.skipField()}}return t},proto.DepositRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.DepositRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.DepositRequest.serializeBinaryToWriter=function(t,e){var r=void 0;r=t.getSlot(),0!==parseInt(r,10)&&e.writeUint64String(1,r),null!=(r=t.getDepositBlock())&&e.writeMessage(2,r,s.BigUInt.serializeBinaryToWriter),null!=(r=t.getDenomination())&&e.writeMessage(3,r,s.BigUInt.serializeBinaryToWriter),null!=(r=t.getFrom())&&e.writeMessage(4,r,s.Address.serializeBinaryToWriter),null!=(r=t.getContract())&&e.writeMessage(5,r,s.Address.serializeBinaryToWriter)},proto.DepositRequest.prototype.getSlot=function(){return n.Message.getFieldWithDefault(this,1,"0")},proto.DepositRequest.prototype.setSlot=function(t){n.Message.setProto3StringIntField(this,1,t)},proto.DepositRequest.prototype.getDepositBlock=function(){return n.Message.getWrapperField(this,s.BigUInt,2)},proto.DepositRequest.prototype.setDepositBlock=function(t){n.Message.setWrapperField(this,2,t)},proto.DepositRequest.prototype.clearDepositBlock=function(){this.setDepositBlock(void 0)},proto.DepositRequest.prototype.hasDepositBlock=function(){return null!=n.Message.getField(this,2)},proto.DepositRequest.prototype.getDenomination=function(){return n.Message.getWrapperField(this,s.BigUInt,3)},proto.DepositRequest.prototype.setDenomination=function(t){n.Message.setWrapperField(this,3,t)},proto.DepositRequest.prototype.clearDenomination=function(){this.setDenomination(void 0)},proto.DepositRequest.prototype.hasDenomination=function(){return null!=n.Message.getField(this,3)},proto.DepositRequest.prototype.getFrom=function(){return n.Message.getWrapperField(this,s.Address,4)},proto.DepositRequest.prototype.setFrom=function(t){n.Message.setWrapperField(this,4,t)},proto.DepositRequest.prototype.clearFrom=function(){this.setFrom(void 0)},proto.DepositRequest.prototype.hasFrom=function(){return null!=n.Message.getField(this,4)},proto.DepositRequest.prototype.getContract=function(){return n.Message.getWrapperField(this,s.Address,5)},proto.DepositRequest.prototype.setContract=function(t){n.Message.setWrapperField(this,5,t)},proto.DepositRequest.prototype.clearContract=function(){this.setContract(void 0)},proto.DepositRequest.prototype.hasContract=function(){return null!=n.Message.getField(this,5)},i.object.extend(e,proto)},function(t,e,r){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,r){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,r){"use strict";var n=r(292);t.exports=function(t,e,r,i,o){var s=new Error(t);return n(s,e,r,i,o)}},function(t,e,r){"use strict";var n=r(20),i=r(293),o=r(291),s=r(290),a=r(289),u=r(157),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(288);t.exports=function(t){return new Promise(function(e,l){var h=t.data,f=t.headers;n.isFormData(h)&&delete f["Content-Type"];var p=new XMLHttpRequest,d="onreadystatechange",g=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in p||a(t.url)||(p=new window.XDomainRequest,d="onload",g=!0,p.onprogress=function(){},p.ontimeout=function(){}),t.auth){var y=t.auth.username||"",m=t.auth.password||"";f.Authorization="Basic "+c(y+":"+m)}if(p.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p[d]=function(){if(p&&(4===p.readyState||g)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,n={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:r,config:t,request:p};i(e,l,n),p=null}},p.onerror=function(){l(u("Network Error",t,null,p)),p=null},p.ontimeout=function(){l(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var b=r(287),v=(t.withCredentials||a(t.url))&&t.xsrfCookieName?b.read(t.xsrfCookieName):void 0;v&&(f[t.xsrfHeaderName]=v)}if("setRequestHeader"in p&&n.forEach(f,function(t,e){void 0===h&&"content-type"===e.toLowerCase()?delete f[e]:p.setRequestHeader(e,t)}),t.withCredentials&&(p.withCredentials=!0),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){p&&(p.abort(),l(t),p=null)}),void 0===h&&(h=null),p.send(h)})}},function(t,e,r){"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}}},function(t,e,r){"use strict";var n,i=r(4),o=i(r(7)),s=i(r(6)),a=i(r(5)),u=i(r(29)),c=i(r(28)),l=(n=c.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,u.default)(e):(r.prototype=e.prototype,new r)}),h=function(t,e,r,n){return new(r||(r=a.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},f=function(t,e){var r,n,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof s.default&&(a[o.default]=function(){return this}),a;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},p=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var d=p(r(298)),g=p(r(42)),y=p(r(70)).default("http-rpc-client"),m=function(t){function e(e,r){void 0===r&&(r={});var n=t.call(this)||this;n.url=e,n._rpcId=0,n._getNextRequestId=function(){return(++n._rpcId).toString()};var i=r.requestTimeout,o=void 0===i?15e3:i,s=r.generateRequestId;void 0===s&&n._getNextRequestId;return n.requestTimeout=o,n}return l(e,t),Object.defineProperty(e.prototype,"isSubscribed",{get:function(){return!1},enumerable:!0,configurable:!0}),e.prototype.disconnect=function(){},e.prototype.ensureConnectionAsync=function(){return a.default.resolve()},e.prototype.sendAsync=function(t,e){return h(this,void 0,void 0,function(){var r,n,i,o,s,a;return f(this,function(u){switch(u.label){case 0:return y("Sending RPC msg to "+this.url+", method "+t),r={jsonrpc:"2.0",method:t,params:e,id:this._getNextRequestId()},[4,d.default.post(this.url,r,{timeout:this.requestTimeout})];case 1:if((n=u.sent()).data.error)throw i=n.data.error,o=i.code,s=i.message,a=i.data,new Error("JSON-RPC Error "+o+" ("+s+"): "+a);return[2,n.data.result]}})})},e}(g.default);e.HTTPRPCClient=m},function(t,e,r){t.exports=r(303)},function(t,e,r){r(310);var n=function(t,e){return parseInt(t.slice(2*e+2,2*e+4),16)},i=function(t){return(t.length-2)/2},o=function(t){for(var e=[],r=2,n=t.length;r<n;r+=2)e.push(parseInt(t.slice(r,r+2),16));return e},s=function(t){for(var e="0x",r=0,n=t.length;r<n;++r){var i=t[r];e+=(i<16?"0":"")+i.toString(16)}return e};t.exports={random:function(t){var e=void 0;e="undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues?window.crypto.getRandomValues(new Uint8Array(t)):r(81).randomBytes(t);for(var n="0x",i=0;i<t;++i)n+=("00"+e[i].toString(16)).slice(-2);return n},length:i,concat:function(t,e){return t.concat(e.slice(2))},flatten:function(t){return"0x"+t.reduce(function(t,e){return t+e.slice(2)},"")},slice:function(t,e,r){return"0x"+r.slice(2*t+2,2*e+2)},reverse:function(t){for(var e="0x",r=0,n=i(t);r<n;++r)e+=t.slice(2*(n-r),2*(n-r+1));return e},pad:function t(e,r){return r.length===2*e+2?r:t(e,"0x0"+r.slice(2))},padRight:function t(e,r){return r.length===2*e+2?r:t(e,r+"0")},fromAscii:function(t){for(var e="0x",r=0;r<t.length;++r)e+=("00"+t.charCodeAt(r).toString(16)).slice(-2);return e},toAscii:function(t){for(var e="",r=2;r<t.length;r+=2)e+=String.fromCharCode(parseInt(t.slice(r,r+2),16));return e},fromString:function(t){for(var e=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},r="0x",n=0;n!=t.length;n++){var i=t.charCodeAt(n);if(i<128)r+=e(i);else{if(i<2048)r+=e(i>>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);r<o;){var s=n(t,r++);if(s>127){if(s>191&&s<224){if(r>=o)return null;s=(31&s)<<6|63&n(t,r)}else if(s>223&&s<240){if(r+1>=o)return null;s=(15&s)<<12|(63&n(t,r))<<6|63&n(t,++r)}else{if(!(s>239&&s<248))return null;if(r+2>=o)return null;s=(7&s)<<18|(63&n(t,r))<<12|(63&n(t,++r))<<6|63&n(t,++r)}++r}if(s<=65535)e+=String.fromCharCode(s);else{if(!(s<=1114111))return null;s-=65536,e+=String.fromCharCode(s>>10|55296),e+=String.fromCharCode(1023&s|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:s,toArray:o,fromUint8Array:function(t){return s([].slice.call(t,0))},toUint8Array:function(t){return new Uint8Array(o(t))}}},function(t,e,r){"use strict";
9/*
10object-assign
11(c) Sindre Sorhus
12@license MIT
13*/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,s,a=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<arguments.length;u++){for(var c in r=Object(arguments[u]))i.call(r,c)&&(a[c]=r[c]);if(n){s=n(r);for(var l=0;l<s.length;l++)o.call(r,s[l])&&(a[s[l]]=r[s[l]])}}return a}},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],s=function(t){var e,r,n,i,s,a,u,c,l,h,f,p,d,g,y,m,b,v,w,_,M,E,A,B,T,R,x,S,k,C,I,j,F,O,P,L,N,D,U,W,q,z,G,H,V,K,$,Y,Z,J,X,Q,tt,et,rt,nt,it,ot,st,at,ut,ct,lt;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],s=t[1]^t[11]^t[21]^t[31]^t[41],a=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],l=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],e=(p=t[8]^t[18]^t[28]^t[38]^t[48])^(a<<1|u>>>31),r=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(u<<1|a>>>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|l>>>31),r=s^(l<<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=a^(h<<1|f>>>31),r=u^(f<<1|h>>>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^(p<<1|d>>>31),r=l^(d<<1|p>>>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=h^(i<<1|s>>>31),r=f^(s<<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,g=t[0],y=t[1],K=t[11]<<4|t[10]>>>28,$=t[10]<<4|t[11]>>>28,S=t[20]<<3|t[21]>>>29,k=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,z=t[40]<<18|t[41]>>>14,G=t[41]<<18|t[40]>>>14,O=t[2]<<1|t[3]>>>31,P=t[3]<<1|t[2]>>>31,m=t[13]<<12|t[12]>>>20,b=t[12]<<12|t[13]>>>20,Y=t[22]<<10|t[23]>>>22,Z=t[23]<<10|t[22]>>>22,C=t[33]<<13|t[32]>>>19,I=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,lt=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,N=t[15]<<6|t[14]>>>26,v=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,J=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,j=t[45]<<29|t[44]>>>3,F=t[44]<<29|t[45]>>>3,B=t[6]<<28|t[7]>>>4,T=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,D=t[26]<<25|t[27]>>>7,U=t[27]<<25|t[26]>>>7,_=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,H=t[8]<<27|t[9]>>>5,V=t[9]<<27|t[8]>>>5,R=t[18]<<20|t[19]>>>12,x=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,W=t[38]<<8|t[39]>>>24,q=t[39]<<8|t[38]>>>24,E=t[48]<<14|t[49]>>>18,A=t[49]<<14|t[48]>>>18,t[0]=g^~m&v,t[1]=y^~b&w,t[10]=B^~R&S,t[11]=T^~x&k,t[20]=O^~L&D,t[21]=P^~N&U,t[30]=H^~K&Y,t[31]=V^~$&Z,t[40]=et^~nt&ot,t[41]=rt^~it&st,t[2]=m^~v&_,t[3]=b^~w&M,t[12]=R^~S&C,t[13]=x^~k&I,t[22]=L^~D&W,t[23]=N^~U&q,t[32]=K^~Y&J,t[33]=$^~Z&X,t[42]=nt^~ot&at,t[43]=it^~st&ut,t[4]=v^~_&E,t[5]=w^~M&A,t[14]=S^~C&j,t[15]=k^~I&F,t[24]=D^~W&z,t[25]=U^~q&G,t[34]=Y^~J&Q,t[35]=Z^~X&tt,t[44]=ot^~at&ct,t[45]=st^~ut&lt,t[6]=_^~E&g,t[7]=M^~A&y,t[16]=C^~j&B,t[17]=I^~F&T,t[26]=W^~z&O,t[27]=q^~G&P,t[36]=J^~Q&H,t[37]=X^~tt&V,t[46]=at^~ct&et,t[47]=ut^~lt&rt,t[8]=E^~g&m,t[9]=A^~y&b,t[18]=j^~B&R,t[19]=F^~T&x,t[28]=z^~O&L,t[29]=G^~P&N,t[38]=Q^~H&K,t[39]=tt^~V&$,t[48]=ct^~et&nt,t[49]=lt^~rt&it,t[0]^=o[n],t[1]^=o[n+1]},a=function(t){return function(e){var o;if("0x"===e.slice(0,2)){o=[];for(var a=2,u=e.length;a<u;a+=2)o.push(parseInt(e.slice(a,a+2),16))}else o=e;return function(t,e){for(var o,a=e.length,u=t.blocks,c=t.blockCount<<2,l=t.blockCount,h=t.outputBlocks,f=t.s,p=0;p<a;){if(t.reset)for(t.reset=!1,u[0]=t.block,y=1;y<l+1;++y)u[y]=0;if("string"!=typeof e)for(y=t.start;p<a&&y<c;++p)u[y>>2]|=e[p]<<i[3&y++];else for(y=t.start;p<a&&y<c;++p)(o=e.charCodeAt(p))<128?u[y>>2]|=o<<i[3&y++]:o<2048?(u[y>>2]|=(192|o>>6)<<i[3&y++],u[y>>2]|=(128|63&o)<<i[3&y++]):o<55296||o>=57344?(u[y>>2]|=(224|o>>12)<<i[3&y++],u[y>>2]|=(128|o>>6&63)<<i[3&y++],u[y>>2]|=(128|63&o)<<i[3&y++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++p)),u[y>>2]|=(240|o>>18)<<i[3&y++],u[y>>2]|=(128|o>>12&63)<<i[3&y++],u[y>>2]|=(128|o>>6&63)<<i[3&y++],u[y>>2]|=(128|63&o)<<i[3&y++]);if(t.lastByteIndex=y,y>=c){for(t.start=y-c,t.block=u[l],y=0;y<l;++y)f[y]^=u[y];s(f),t.reset=!0}else t.start=y}if(u[(y=t.lastByteIndex)>>2]|=n[3&y],t.lastByteIndex===c)for(u[0]=u[l],y=1;y<l+1;++y)u[y]=0;for(u[l-1]|=2147483648,y=0;y<l;++y)f[y]^=u[y];s(f);for(var d,g="",y=0,m=0;m<h;){for(y=0;y<l&&m<h;++y,++m)d=f[y],g+=r[d>>4&15]+r[15&d]+r[d>>12&15]+r[d>>8&15]+r[d>>20&15]+r[d>>16&15]+r[d>>28&15]+r[d>>24&15];m%l==0&&(s(f),y=0)}return"0x"+g}(function(t){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(t<<1)>>5,outputBlocks:t>>5,s:(e=[0,0,0,0,0,0,0,0,0,0],[].concat(e,e,e,e,e))};var e}(t),o)}};t.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},function(t,e){t.exports={encode:function(t){var e=function(t){return(e=t.toString(16)).length%2==0?e:"0"+e;var e},r=function(t,r){return t<56?e(r+t):e(r+e(t).length/2+55)+e(t)};return"0x"+function t(e){if("string"==typeof e){var n=e.slice(2);return(2!=n.length||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<t;)i.push(r());return i};try{return r()}catch(t){return[]}}}},function(t,e,r){var n=r(3),i=r(109),o=function(t){return new n(t.slice(2),16)},s=function(t){var e="0x"+("0x"===t.slice(0,2)?new n(t.slice(2),16):new n(t,10)).toString("hex");return"0x0"===e?"0x":e},a=function(t){return"string"==typeof t?/^0x/.test(t)?t:"0x"+t:"0x"+new n(t).toString("hex")},u=function(t){return o(t).toNumber()},c=function(t){return function(e,r){return"0x"+o(e)[t](o(r)).toString("hex")}},l=c("add"),h=c("mul"),f=c("div"),p=c("sub");t.exports={toString:function(t){return o(t).toString(10)},fromString:s,toNumber:u,fromNumber:a,toEther:function(t){return u(f(t,s("10000000000")))/1e8},fromEther:function(t){return h(a(Math.floor(1e8*t)),s("10000000000"))},toUint256:function(t){return i.pad(32,t)},add:l,mul:h,div:f,sub:p}},function(t,e,r){(function(e){var n=r(3);t.exports=function(t,r){return new e(t.toRed(n.mont(r.modulus)).redPow(new n(r.publicExponent)).fromRed().toArray())}}).call(this,r(0).Buffer)},function(t,e){t.exports=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t}},function(t,e,r){(function(e){var n=r(48);function i(t){var r=new e(4);return r.writeUInt32BE(t,0),r}t.exports=function(t,r){for(var o,s=new e(""),a=0;s.length<r;)o=i(a++),s=e.concat([s,n("sha1").update(t).update(o).digest()]);return s.slice(0,r)}}).call(this,r(0).Buffer)},function(t){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},function(t,e,r){var n=r(1),i=r(0).Buffer,o=r(61),s=o.base,a=o.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){s.Node.call(this,"der",t)}function l(t){return t<10?"0"+t:t}t.exports=u,u.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(c,s.Node),c.prototype._encodeComposite=function(t,e,r,n){var o,s=function(t,e,r,n){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}if(i>=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,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]=s,o[1]=128|u;c=1+u;for(var l=n.length;l>0;c--,l>>=8)o[c]=255&l;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<t.length;n++)r.writeUInt16BE(t.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)?this._createEncoderBuffer(t):"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},c.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(n=0;n<t.length;n++)t[n]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=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<t.length;n++){var s=t[n];for(o++;s>=128;s>>=7)o++}var a=new i(o),u=a.length-1;for(n=t.length-1;n>=0;n--){s=t[n];for(a[u--]=127&s;(s>>=7)>0;)a[u--]=128|127&s}return this._createEncoderBuffer(a)},c.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[l(n.getFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[l(n.getFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(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 s=t;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=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<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},function(t,e,r){var n=r(1),i=r(61),o=i.base,s=i.bignum,a=i.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){o.Node.call(this,"der",t)}function l(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=a.tagClass[r>>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:a.tag[r]}}function h(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<i;o++){n<<=8;var s=t.readUInt8(r);if(t.isError(s))return s;n|=s}return n}t.exports=u,u.prototype.decode=function(t,e){return t instanceof o.DecoderBuffer||(t=new o.DecoderBuffer(t,e)),this.tree._decode(t,e)},n(c,o.Node),c.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var n=t.save(),i=l(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},c.prototype._decodeTag=function(t,e,r){var n=l(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;var i=h(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},c.prototype._skipUntilEnd=function(t,e){for(;;){var r=l(t,e);if(t.isError(r))return r;var n,i=h(t,r.primitive,e);if(t.isError(i))return i;if(n=r.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===r.tagStr)break}},c.prototype._decodeList=function(t,e,r,n){for(var i=[];!t.isEmpty();){var o=this._peekTag(t,"end");if(t.isError(o))return o;var s=r.decode(t,"der",n);if(t.isError(s)&&o)break;i.push(s)}return i},c.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var n=t.raw();if(n.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if("numstr"===e){var s=t.raw().toString("ascii");return this._isNumstr(s)?s:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var a=t.raw().toString("ascii");return this._isPrintstr(a)?a:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},c.prototype._decodeObjid=function(t,e,r){for(var n,i=[],o=0;!t.isEmpty();){var s=t.readUInt8();o<<=7,o|=127&s,0==(128&s)&&(i.push(o),o=0)}128&s&&i.push(o);var a=i[0]/40|0,u=i[0]%40;if(n=r?i:[a,u].concat(i.slice(1)),e){var c=e[n.join(" ")];void 0===c&&(c=e[n.join(".")]),void 0!==c&&(n=c)}return n},c.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),u=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,u,0)},c.prototype._decodeNull=function(t){return null},c.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},c.prototype._decodeInt=function(t,e){var r=t.raw(),n=new s(r);return e&&(n=e[n.toString(10)]||n),n},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},function(t,e,r){var n=e;n._reverse=function(t){var e={};return Object.keys(t).forEach(function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r}),e},n.der=r(349)},function(t,e,r){var n=r(1),i=r(60).Reporter,o=r(0).Buffer;function s(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(t){return t instanceof a||(t=new a(t,e)),this.length+=t.length,t},this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(s,i),e.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){var e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=a,a.prototype.join=function(t,e){return t||(t=new o(this.length)),e||(e=0),0===this.length?t:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(t,e),e+=r.length}):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length),t)}},function(t,e,r){var n=r(3),i=r(207);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),s=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),u=0;!a.testn(u);u++);for(var c=t.shrn(u),l=a.toRed(o);e>0;e--){var h=this._randrange(new n(2),a);r&&r(h);var f=h.toRed(o).redPow(c);if(0!==f.cmp(s)&&0!==f.cmp(l)){for(var p=1;p<u;p++){if(0===(f=f.redSqr()).cmp(s))return!1;if(0===f.cmp(l))break}if(p===u)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var u=t.shrn(a),c=s.toRed(i);e>0;e--){var l=this._randrange(new n(2),s),h=t.gcd(l);if(0!==h.cmpn(1))return h;var f=l.toRed(i).redPow(u);if(0!==f.cmp(o)&&0!==f.cmp(c)){for(var p=1;p<a;p++){if(0===(f=f.redSqr()).cmp(o))return f.fromRed().subn(1).gcd(t);if(0===f.cmp(c))break}if(p===a)return(f=f.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},function(t,e,r){var n=r(54);t.exports=b,b.simpleSieve=y,b.fermatTest=m;var i=r(3),o=new i(24),s=new(r(175)),a=new i(1),u=new i(2),c=new i(5),l=(new i(16),new i(8),new i(10)),h=new i(3),f=(new i(7),new i(11)),p=new i(4),d=(new i(12),null);function g(){if(null!==d)return d;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return d=t,t}function y(t){for(var e=g(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function m(t){var e=i.mont(t);return 0===u.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function b(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var r,d;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(c))for(;r.mod(l).cmp(h);)r.iadd(p)}else for(;r.mod(o).cmp(f);)r.iadd(p);if(y(d=r.shrn(1))&&y(r)&&m(d)&&m(r)&&s.test(d)&&s.test(r))return r}}},function(t,e,r){var n=r(79),i=r(2).Buffer,o=r(35);function s(t,e,r,s){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}r(1)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},function(t,e,r){var n=r(79),i=r(2).Buffer,o=r(35),s=r(1),a=r(369),u=r(62),c=r(180);function l(t,e,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var l=this._cipher.encryptBlock(u);this._ghash=new a(l),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,s=o%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,l=i.alloc(8);l.writeUIntBE(u,0,8),n.update(l),t._finID=n.state;var h=i.from(t._finID);return c(h),h}(this,r,l),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(l,o),l.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},l.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},l.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},l.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=l},function(t){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},function(t,e){t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},function(t,e,r){var n=r(62),i=r(2).Buffer,o=r(180);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var u=s(t),c=o+16*a;t._cache.writeUInt32BE(u[0],c+0),t._cache.writeUInt32BE(u[1],c+4),t._cache.writeUInt32BE(u[2],c+8),t._cache.writeUInt32BE(u[3],c+12)}var l=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,l)}},function(t,e,r){var n=r(112),i=r(95),o=r(111),s=r(184),a=r(183),u=r(2).Buffer,c=u.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(t,e,r){var s=function(t){return"rmd160"===t||"ripemd160"===t?i:"md5"===t?n:function(e){return o(t).update(e).digest()}}(t),a="sha512"===t||"sha384"===t?128:64;e.length>a?e=s(e):e.length<a&&(e=u.concat([e,c],a));for(var h=u.allocUnsafe(a+l[t]),f=u.allocUnsafe(a+l[t]),p=0;p<a;p++)h[p]=54^e[p],f[p]=92^e[p];var d=u.allocUnsafe(a+r+4);h.copy(d,0,0,a),this.ipad1=d,this.ipad2=h,this.opad=f,this.alg=t,this.blocksize=a,this.hash=s,this.size=l[t]}h.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,n,i){u.isBuffer(t)||(t=u.from(t,a)),u.isBuffer(e)||(e=u.from(e,a)),s(r,n);var o=new h(i=i||"sha1",t,e.length),c=u.allocUnsafe(n),f=u.allocUnsafe(e.length+4);e.copy(f,0,0,e.length);for(var p=0,d=l[i],g=Math.ceil(n/d),y=1;y<=g;y++){f.writeUInt32BE(y,e.length);for(var m=o.run(f,o.ipad1),b=m,v=1;v<r;v++){b=o.run(b,o.ipad2);for(var w=0;w<d;w++)m[w]^=b[w]}m.copy(c,p),p+=d}return c}},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(24))},function(t,e){var r=Math.pow(2,30)-1;t.exports=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>r||e!=e)throw new TypeError("Bad key length")}},function(t){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},function(t,e,r){"use strict";var n=r(1),i=r(382),o=r(35),s=r(2).Buffer,a=r(112),u=r(95),c=r(111),l=s.alloc(128);function h(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.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.length<r&&(e=s.concat([e,l],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new u:c(t),this._hash.update(n)}n(h,o),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new h("rmd160",e):"md5"===t?new i(a,e):new h(t,e)}},function(t,e,r){var n=r(26),i=function(t,e,r){this.value=t||"",this.offset=e,this.rawValue=r};i.prototype.dynamicPartLength=function(){return this.dynamicPart().length/2},i.prototype.withOffset=function(t){return new i(this.value,t)},i.prototype.combine=function(t){return new i(this.value+t.value)},i.prototype.isDynamic=function(){return void 0!==this.offset},i.prototype.offsetAsBytes=function(){return this.isDynamic()?n.toTwosComplement(this.offset).replace("0x",""):""},i.prototype.staticPart=function(){return this.isDynamic()?this.offsetAsBytes():this.value},i.prototype.dynamicPart=function(){return this.isDynamic()?this.value:""},i.prototype.encode=function(){return this.staticPart()+this.dynamicPart()},i.encodeList=function(t){var e=32*t.length,r=t.map(function(t){if(!t.isDynamic())return t;var r=e;return e+=t.dynamicPartLength(),t.withOffset(r)});return r.reduce(function(t,e){return t+e.dynamicPart()},r.reduce(function(t,e){return t+e.staticPart()},""))},t.exports=i},function(t,e,r){var n=r(9),i=r(21),o=r(26),s=r(392),a=r(391),u=r(390),c=r(389),l=r(388),h=r(387),f=r(386),p=function(t,e){return t.isDynamicType(e)||t.isDynamicArray(e)};function d(){}var g=function(t){this._types=t};g.prototype._requireType=function(t){var e=this._types.filter(function(e){return e.isType(t)})[0];if(!e)throw Error("Invalid solidity type: "+t);return e},g.prototype._getOffsets=function(t,e){for(var r=e.map(function(e,r){return e.staticPartLength(t[r])}),n=1;n<r.length;n++)r[n]+=r[n-1];return r.map(function(r,n){return r-e[n].staticPartLength(t[n])})},g.prototype._getSolidityTypes=function(t){var e=this;return t.map(function(t){return e._requireType(t)})},g.prototype._encodeMultiWithOffset=function(t,e,r,n){var i="",s=this;return t.forEach(function(a,u){if(p(e[u],t[u])){i+=o.formatInputInt(n).encode();var c=s._encodeWithOffset(t[u],e[u],r[u],n);n+=c.length/2}else i+=s._encodeWithOffset(t[u],e[u],r[u],n)}),t.forEach(function(o,a){if(p(e[a],t[a])){var u=s._encodeWithOffset(t[a],e[a],r[a],n);n+=u.length/2,i+=u}}),i},g.prototype._encodeWithOffset=function(t,e,r,n){var i,s,a,u=this;return e.isDynamicArray(t)?(i=e.nestedName(t),s=e.staticPartLength(i),a=r[0],function(){var t=2;if(e.isDynamicArray(i))for(var u=1;u<r.length;u++)t+=+r[u-1][0]||0,a+=o.formatInputInt(n+u*s+32*t).encode()}(),function(){for(var t=0;t<r.length-1;t++){var o=a/2;a+=u._encodeWithOffset(i,e,r[t+1],n+o)}}(),a):e.isStaticArray(t)?function(){var i=e.nestedName(t),s=e.staticPartLength(i),a="";return e.isDynamicArray(i)&&function(){for(var t=0,e=0;e<r.length;e++)t+=+(r[e-1]||[])[0]||0,a+=o.formatInputInt(n+e*s+32*t).encode()}(),function(){for(var t=0;t<r.length;t++){var o=a/2;a+=u._encodeWithOffset(i,e,r[t],n+o)}}(),a}():r},g.prototype.encodeFunctionSignature=function(t){return n.isObject(t)&&(t=i._jsonInterfaceMethodToString(t)),i.sha3(t).slice(0,10)},g.prototype.encodeEventSignature=function(t){return n.isObject(t)&&(t=i._jsonInterfaceMethodToString(t)),i.sha3(t)},g.prototype.encodeParameter=function(t,e){return this.encodeParameters([t],[e])},g.prototype.encodeParameters=function(t,e){n.isObject(t)&&t.inputs&&(t=n.map(t.inputs,function(t){return t.type}));var r=this._getSolidityTypes(t),i=r.map(function(r,n){return r.encode(e[n],t[n])}),o=r.reduce(function(e,n,i){var o=n.staticPartLength(t[i]),s=32*Math.floor((o+31)/32);return e+(p(r[i],t[i])?32:s)},0);return"0x"+this._encodeMultiWithOffset(t,r,i,o)},g.prototype.encodeFunctionCall=function(t,e){return this.encodeFunctionSignature(t)+this.encodeParameters(t,e).replace("0x","")},g.prototype.decodeParameter=function(t,e){if(!n.isString(t))throw new Error("Given parameter type is not a string: "+t);return this.decodeParameters([{type:t}],e)[0]},g.prototype.decodeParameters=function(t,e){var r=n.isArray(t)&&n.isString(t[0]),i=r?t:[];r||t.forEach(function(t){i.push(t.type)});var o=this._getSolidityTypes(i),s=this._getOffsets(i,o),a=new d;a.__length__=0;var u=0;return t.forEach(function(t,r){var c=o[u].decode(e.replace(/^0x/i,""),s[u],i[u],u);c="0x"===c?null:c,a[r]=c,n.isObject(t)&&t.name&&(a[t.name]=c),a.__length__++,u++}),a},g.prototype.decodeLog=function(t,e,r){e=e||"";var i=[],o=[];t.forEach(function(t,e){t.indexed?o[e]=t:i[e]=t});var s=e.slice(2),a=n.isArray(r)?r.map(function(t){return t.slice(2)}).join(""):r,u=this.decodeParameters(i,s),c=this.decodeParameters(o,a),l=new d;return l.__length__=0,t.forEach(function(t,e){l[e]="string"===t.type?"":null,u[e]&&(l[e]=u[e]),c[e]&&(l[e]=c[e]),t.name&&(l[t.name]=l[e]),l.__length__++}),l};var y=new g([new s,new a,new u,new c,new l,new f,new h]);t.exports=y},function(t,e,r){"use strict";var n=r(47),i=r(46),o=r(21),s=r(82),a=r(12).formatters,u=function(){var t=this;n.packageInit(this,arguments),this.net=new s(this.currentProvider);var e=null,r="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return e},set:function(t){return t&&(e=o.toChecksumAddress(a.inputAddressFormatter(t))),u.forEach(function(t){t.defaultAccount=e}),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return r},set:function(t){return r=t,u.forEach(function(t){t.defaultBlock=r}),t},enumerable:!0});var u=[new i({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:o.toChecksumAddress}),new i({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:o.toChecksumAddress}),new i({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[a.inputAddressFormatter,null,null]}),new i({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[a.inputAddressFormatter]}),new i({name:"importRawKey",call:"personal_importRawKey",params:2}),new i({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[a.inputTransactionFormatter,null]}),new i({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[a.inputTransactionFormatter,null]}),new i({name:"sign",call:"personal_sign",params:3,inputFormatter:[a.inputSignFormatter,a.inputAddressFormatter,null]}),new i({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[a.inputSignFormatter,null]})];u.forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager),e.defaultBlock=t.defaultBlock,e.defaultAccount=t.defaultAccount})};n.addProviders(u),t.exports=u},function(t,e,r){t.exports=r(398)().Promise},function(t,e,r){"use strict";var n="function"!=typeof Object.create&&"~";function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(){}o.prototype._events=void 0,o.prototype.listeners=function(t,e){var r=n?n+t:t,i=this._events&&this._events[r];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,a=new Array(s);o<s;o++)a[o]=i[o].fn;return a},o.prototype.emit=function(t,e,r,i,o,s){var a=n?n+t:t;if(!this._events||!this._events[a])return!1;var u,c,l=this._events[a],h=arguments.length;if("function"==typeof l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,i),!0;case 5:return l.fn.call(l.context,e,r,i,o),!0;case 6:return l.fn.call(l.context,e,r,i,o,s),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,p=l.length;for(c=0;c<p;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,r);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},o.prototype.on=function(t,e,r){var o=new i(e,r||this),s=n?n+t:t;return this._events||(this._events=n?{}:Object.create(null)),this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],o]:this._events[s].push(o):this._events[s]=o,this},o.prototype.once=function(t,e,r){var o=new i(e,r||this,!0),s=n?n+t:t;return this._events||(this._events=n?{}:Object.create(null)),this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],o]:this._events[s].push(o):this._events[s]=o,this},o.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events||!this._events[o])return this;var s=this._events[o],a=[];if(e)if(s.fn)(s.fn!==e||i&&!s.once||r&&s.context!==r)&&a.push(s);else for(var u=0,c=s.length;u<c;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&a.push(s[u]);return a.length?this._events[o]=1===a.length?a[0]:a:delete this._events[o],this},o.prototype.removeAllListeners=function(t){return this._events?(t?delete this._events[n?n+t:t]:this._events=n?{}:Object.create(null),this):this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prototype.setMaxListeners=function(){return this},o.prefixed=n,t.exports=o},function(t,e,r){"use strict";var n=r(191),i=r(190),o=function(t){var e,r,o=new i(function(){e=arguments[0],r=arguments[1]});if(t)return{resolve:e,reject:r,eventEmitter:o};var s=new n;return o._events=s._events,o.emit=s.emit,o.on=s.on,o.once=s.once,o.off=s.off,o.listeners=s.listeners,o.addListener=s.addListener,o.removeListener=s.removeListener,o.removeAllListeners=s.removeAllListeners,{resolve:e,reject:r,eventEmitter:o}};o.resolve=function(t){var e=o(!0);return e.resolve(t),e.eventEmitter},t.exports=o},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){"use strict";var n=r(21),i=r(416),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("")},s=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},a=function(t){this._iban=t};a.toAddress=function(t){if(!(t=new a(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()},a.toIban=function(t){return a.fromAddress(t).toString()},a.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 a.fromBban(e.toUpperCase())},a.fromBban=function(t){var e=("0"+(98-s(o("XE00"+t)))).slice(-2);return new a("XE"+e+t)},a.createIndirect=function(t){return a.fromBban("ETH"+t.institution+t.identifier)},a.isValid=function(t){return new a(t).isValid()},a.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===s(o(this._iban))},a.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},a.prototype.isIndirect=function(){return 20===this._iban.length},a.prototype.checksum=function(){return this._iban.substr(2,2)},a.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},a.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},a.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""},a.prototype.toString=function(){return this._iban},t.exports=a},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],s=function(t){var e,r,n,i,s,a,u,c,l,h,f,p,d,g,y,m,b,v,w,_,M,E,A,B,T,R,x,S,k,C,I,j,F,O,P,L,N,D,U,W,q,z,G,H,V,K,$,Y,Z,J,X,Q,tt,et,rt,nt,it,ot,st,at,ut,ct,lt;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],s=t[1]^t[11]^t[21]^t[31]^t[41],a=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],l=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],e=(p=t[8]^t[18]^t[28]^t[38]^t[48])^(a<<1|u>>>31),r=(d=t[9]^t[19]^t[29]^t[39]^t[49])^(u<<1|a>>>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|l>>>31),r=s^(l<<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=a^(h<<1|f>>>31),r=u^(f<<1|h>>>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^(p<<1|d>>>31),r=l^(d<<1|p>>>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=h^(i<<1|s>>>31),r=f^(s<<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,g=t[0],y=t[1],K=t[11]<<4|t[10]>>>28,$=t[10]<<4|t[11]>>>28,S=t[20]<<3|t[21]>>>29,k=t[21]<<3|t[20]>>>29,at=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,z=t[40]<<18|t[41]>>>14,G=t[41]<<18|t[40]>>>14,O=t[2]<<1|t[3]>>>31,P=t[3]<<1|t[2]>>>31,m=t[13]<<12|t[12]>>>20,b=t[12]<<12|t[13]>>>20,Y=t[22]<<10|t[23]>>>22,Z=t[23]<<10|t[22]>>>22,C=t[33]<<13|t[32]>>>19,I=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,lt=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,N=t[15]<<6|t[14]>>>26,v=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,J=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,j=t[45]<<29|t[44]>>>3,F=t[44]<<29|t[45]>>>3,B=t[6]<<28|t[7]>>>4,T=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,D=t[26]<<25|t[27]>>>7,U=t[27]<<25|t[26]>>>7,_=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,H=t[8]<<27|t[9]>>>5,V=t[9]<<27|t[8]>>>5,R=t[18]<<20|t[19]>>>12,x=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,W=t[38]<<8|t[39]>>>24,q=t[39]<<8|t[38]>>>24,E=t[48]<<14|t[49]>>>18,A=t[49]<<14|t[48]>>>18,t[0]=g^~m&v,t[1]=y^~b&w,t[10]=B^~R&S,t[11]=T^~x&k,t[20]=O^~L&D,t[21]=P^~N&U,t[30]=H^~K&Y,t[31]=V^~$&Z,t[40]=et^~nt&ot,t[41]=rt^~it&st,t[2]=m^~v&_,t[3]=b^~w&M,t[12]=R^~S&C,t[13]=x^~k&I,t[22]=L^~D&W,t[23]=N^~U&q,t[32]=K^~Y&J,t[33]=$^~Z&X,t[42]=nt^~ot&at,t[43]=it^~st&ut,t[4]=v^~_&E,t[5]=w^~M&A,t[14]=S^~C&j,t[15]=k^~I&F,t[24]=D^~W&z,t[25]=U^~q&G,t[34]=Y^~J&Q,t[35]=Z^~X&tt,t[44]=ot^~at&ct,t[45]=st^~ut&lt,t[6]=_^~E&g,t[7]=M^~A&y,t[16]=C^~j&B,t[17]=I^~F&T,t[26]=W^~z&O,t[27]=q^~G&P,t[36]=J^~Q&H,t[37]=X^~tt&V,t[46]=at^~ct&et,t[47]=ut^~lt&rt,t[8]=E^~g&m,t[9]=A^~y&b,t[18]=j^~B&R,t[19]=F^~T&x,t[28]=z^~O&L,t[29]=G^~P&N,t[38]=Q^~H&K,t[39]=tt^~V&$,t[48]=ct^~et&nt,t[49]=lt^~rt&it,t[0]^=o[n],t[1]^=o[n+1]},a=function(t){return function(e){var o;if("0x"===e.slice(0,2)){o=[];for(var a=2,u=e.length;a<u;a+=2)o.push(parseInt(e.slice(a,a+2),16))}else o=e;return function(t,e){for(var o,a=e.length,u=t.blocks,c=t.blockCount<<2,l=t.blockCount,h=t.outputBlocks,f=t.s,p=0;p<a;){if(t.reset)for(t.reset=!1,u[0]=t.block,y=1;y<l+1;++y)u[y]=0;if("string"!=typeof e)for(y=t.start;p<a&&y<c;++p)u[y>>2]|=e[p]<<i[3&y++];else for(y=t.start;p<a&&y<c;++p)(o=e.charCodeAt(p))<128?u[y>>2]|=o<<i[3&y++]:o<2048?(u[y>>2]|=(192|o>>6)<<i[3&y++],u[y>>2]|=(128|63&o)<<i[3&y++]):o<55296||o>=57344?(u[y>>2]|=(224|o>>12)<<i[3&y++],u[y>>2]|=(128|o>>6&63)<<i[3&y++],u[y>>2]|=(128|63&o)<<i[3&y++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++p)),u[y>>2]|=(240|o>>18)<<i[3&y++],u[y>>2]|=(128|o>>12&63)<<i[3&y++],u[y>>2]|=(128|o>>6&63)<<i[3&y++],u[y>>2]|=(128|63&o)<<i[3&y++]);if(t.lastByteIndex=y,y>=c){for(t.start=y-c,t.block=u[l],y=0;y<l;++y)f[y]^=u[y];s(f),t.reset=!0}else t.start=y}if(u[(y=t.lastByteIndex)>>2]|=n[3&y],t.lastByteIndex===c)for(u[0]=u[l],y=1;y<l+1;++y)u[y]=0;for(u[l-1]|=2147483648,y=0;y<l;++y)f[y]^=u[y];s(f);for(var d,g="",y=0,m=0;m<h;){for(y=0;y<l&&m<h;++y,++m)d=f[y],g+=r[d>>4&15]+r[15&d]+r[d>>12&15]+r[d>>8&15]+r[d>>20&15]+r[d>>16&15]+r[d>>28&15]+r[d>>24&15];m%l==0&&(s(f),y=0)}return"0x"+g}(function(t){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(t<<1)>>5,outputBlocks:t>>5,s:(e=[0,0,0,0,0,0,0,0,0,0],[].concat(e,e,e,e,e))};var e}(t),o)}};t.exports={keccak256:a(256),keccak512:a(512),keccak256s:a(256),keccak512s:a(512)}},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 s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(0).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}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<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=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<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=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,s=o%n,a=Math.min(o,o-s)+r,c=0,l=r;l<a;l+=n)c=u(t,l,l+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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 f(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,h=67108863&u,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;l+=(s=(i=0|t.words[d])*(o=0|e.words[p])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|l}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,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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 f=l[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+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!==s),this.toArrayLike(s,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 s,a,u="le"===e,c=new t(o),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],h=8191&l,f=l>>>13,p=0|s[1],d=8191&p,g=p>>>13,y=0|s[2],m=8191&y,b=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],E=8191&M,A=M>>>13,B=0|s[5],T=8191&B,R=B>>>13,x=0|s[6],S=8191&x,k=x>>>13,C=0|s[7],I=8191&C,j=C>>>13,F=0|s[8],O=8191&F,P=F>>>13,L=0|s[9],N=8191&L,D=L>>>13,U=0|a[0],W=8191&U,q=U>>>13,z=0|a[1],G=8191&z,H=z>>>13,V=0|a[2],K=8191&V,$=V>>>13,Y=0|a[3],Z=8191&Y,J=Y>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191&lt,ft=lt>>>13,pt=0|a[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(h,W))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,W)|0))<<13)|0;c=((o=Math.imul(f,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,W),i=(i=Math.imul(d,q))+Math.imul(g,W)|0,o=Math.imul(g,q);var mt=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(f,G)|0))<<13)|0;c=((o=o+Math.imul(f,H)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,W),i=(i=Math.imul(m,q))+Math.imul(b,W)|0,o=Math.imul(b,q),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,H)|0;var bt=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,W),i=(i=Math.imul(w,q))+Math.imul(_,W)|0,o=Math.imul(_,q),n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(d,K)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,$)|0;var vt=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(f,Z)|0))<<13)|0;c=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,W),i=(i=Math.imul(E,q))+Math.imul(A,W)|0,o=Math.imul(A,q),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,$)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,J)|0;var wt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,W),i=(i=Math.imul(T,q))+Math.imul(R,W)|0,o=Math.imul(R,q),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(S,W),i=(i=Math.imul(S,q))+Math.imul(k,W)|0,o=Math.imul(k,q),n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var Mt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;c=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,W),i=(i=Math.imul(I,q))+Math.imul(j,W)|0,o=Math.imul(j,q),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Et=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(f,ut)|0))<<13)|0;c=((o=o+Math.imul(f,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,q))+Math.imul(P,W)|0,o=Math.imul(P,q),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var At=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,q))+Math.imul(D,W)|0,o=Math.imul(D,q),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,ft)|0;var Bt=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,G),i=(i=Math.imul(N,H))+Math.imul(D,G)|0,o=Math.imul(D,H),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ft)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,$))+Math.imul(D,K)|0,o=Math.imul(D,$),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var Rt=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(b,dt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,ft)|0;var xt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ft)|0;var St=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(A,dt)|0))<<13)|0;c=((o=o+Math.imul(A,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var kt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,ft)|0;var Ct=(c+(n=n+Math.imul(S,dt)|0)|0)+((8191&(i=(i=i+Math.imul(S,gt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,ft)|0;var It=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(j,dt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,ft))+Math.imul(D,ht)|0,o=Math.imul(D,ft);var jt=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(P,dt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Ft=(c+(n=Math.imul(N,dt))|0)+((8191&(i=(i=Math.imul(N,gt))+Math.imul(D,dt)|0))<<13)|0;return c=((o=Math.imul(D,gt))+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,u[0]=yt,u[1]=mt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=At,u[9]=Bt,u[10]=Tt,u[11]=Rt,u[12]=xt,u[13]=St,u[14]=kt,u[15]=Ct,u[16]=It,u[17]=jt,u[18]=Ft,0!==c&&(u[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(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<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=u,f=c,p=0;p<s;p++){var d=r[l+p],g=n[l+p],y=r[l+p+s],m=n[l+p+s],b=h*y-f*m;m=h*m+f*y,y=b,r[l+p]=d+y,n[l+p]=g+m,r[l+p+s]=d-y,n[l+p+s]=g-m,p!==a&&(b=u*h-c*f,f=u*f+c*h,h=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,h,n,i);for(var p=0;p<n;p++){var d=a[p]*l[p]-u[p]*h[p];u[p]=a[p]*h[p]+u[p]*l[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=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<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),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<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>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,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||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?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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,s,a},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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=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:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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 y={k256:null,p224:null,p192:null,p25519:null};function m(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(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.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 E(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)}m.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.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=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(b,m),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(v,m),i(w,m),i(_,m),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y<d);var m=this.pow(h,new o(1).iushln(d-y-1));f=f.redMul(m),h=m.redSqr(),p=p.redMul(h),d=y}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var h=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=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 E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.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)},E.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(36)(t))},function(t,e,r){var n=r(9),i=r(196),o=r(198),s=r(421),a=r(195),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},l=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))||f(t))},f=function(t){t=t.replace(/^0x/i,"");for(var e=m(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},p=function(t){var e="";t=(t=(t=(t=(t=s.encode(t)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return"0x"+e},d=function(t){if(n.isNull(t)||n.isUndefined(t))return t;if(!isFinite(t)&&!y(t))throw new Error('Given input "'+t+'" is not a number.');var e=l(t),r=e.toString(16);return e.lt(new i(0))?"-0x"+r.substr(1):"0x"+r},g=function(t){if(t=t.toString(16),!y(t))throw new Error('Given value "'+t+'" is not a valid hex string.');t=t.replace(/^0x/i,"");for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},y=function(t){return(n.isString(t)||n.isNumber(t))&&/^(-)?0x[0-9a-f]*$/i.test(t)},m=function(t){y(t)&&/^0x/i.test(t.toString())&&(t=g(t));var e=a.keccak256(t);return"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"===e?null:e};m._Hash=a,t.exports={BN:i,isBN:u,isBigNumber:c,toBN:l,isAddress:h,isBloom:function(t){return!(!/^(0x)?[0-9a-f]{512}$/i.test(t)||!/^(0x)?[0-9a-f]{512}$/.test(t)&&!/^(0x)?[0-9A-F]{512}$/.test(t))},isTopic:function(t){return!(!/^(0x)?[0-9a-f]{64}$/i.test(t)||!/^(0x)?[0-9a-f]{64}$/.test(t)&&!/^(0x)?[0-9A-F]{64}$/.test(t))},checkAddressChecksum:f,utf8ToHex:p,hexToUtf8:function(t){if(!y(t))throw new Error('The parameter "'+t+'" must be a valid HEX string.');for(var e="",r=0,n=(t=(t=(t=(t=(t=t.replace(/^0x/i,"")).replace(/^(?:00)*/,"")).split("").reverse().join("")).replace(/^(?:00)*/,"")).split("").reverse().join("")).length,i=0;i<n;i+=2)r=parseInt(t.substr(i,2),16),e+=String.fromCharCode(r);return s.decode(e)},hexToNumber:function(t){return t?l(t).toNumber():t},hexToNumberString:function(t){return t?l(t).toString(10):t},numberToHex:d,toHex:function(t,e){if(h(t))return e?"address":"0x"+t.toLowerCase().replace(/^0x/i,"");if(n.isBoolean(t))return e?"bool":t?"0x01":"0x00";if(n.isObject(t)&&!c(t)&&!u(t))return e?"string":p(JSON.stringify(t));if(n.isString(t)){if(0===t.indexOf("-0x")||0===t.indexOf("-0X"))return e?"int256":d(t);if(0===t.indexOf("0x")||0===t.indexOf("0X"))return e?"bytes":t;if(!isFinite(t))return e?"string":p(t)}return e?t<0?"int256":"uint256":d(t)},hexToBytes:g,bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[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:y,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"+l(t).toTwos(256).toString(16,64)},sha3:m}},function(t,e,r){var n=r(422),i=r(200);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),s=i(r);if("-"===s.substr(0,1)&&(s=i(s.slice(1)),e=new n(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===o&&s.match(/^[0-9A-Fa-f]+$/))return new n(s,16).mul(e);if((s.match(/^-?[0-9]+$/)||""===s)&&!1===o)return new n(s,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){"use strict";var n=r(428).version,i=r(47),o=r(395),s=r(82),a=r(189),u=r(330),c=r(329),l=r(21),h=function(){var t=this;i.packageInit(this,arguments),this.version=n,this.utils=l,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}};h.version=n,h.utils=l,h.modules={Eth:o,Net:s,Personal:a,Shh:u,Bzz:c},i.addProviders(h),t.exports=h},function(t,e,r){var n=r(201);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){const n=r(203),i=r(2).Buffer;function o(t,e){if("00"===t.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(t,e)}function s(t,e){if(t<56)return i.from([t+e]);var r=u(t),n=u(e+55+r.length/2);return i.from(n+r,"hex")}function a(t){return"0x"===t.slice(0,2)}function u(t){var e=t.toString(16);return e.length%2&&(e="0"+e),e}function c(t){if(!i.isBuffer(t))if("string"==typeof t)t=a(t)?i.from(((r="string"!=typeof(n=t)?n:a(n)?n.slice(2):n).length%2&&(r="0"+r),r),"hex"):i.from(t);else if("number"==typeof t)t?(e=u(t),t=i.from(e,"hex")):t=i.from([]);else if(null===t||void 0===t)t=i.from([]);else{if(!t.toArray)throw new Error("invalid type");t=i.from(t.toArray())}var e,r,n;return t}e.encode=function(t){if(t instanceof Array){for(var r=[],n=0;n<t.length;n++)r.push(e.encode(t[n]));var o=i.concat(r);return i.concat([s(o.length,192),o])}return 1===(t=c(t)).length&&t[0]<128?t:i.concat([s(t.length,128),t])},e.decode=function(t,e){if(!t||0===t.length)return i.from([]);var r=function t(e){var r,n,s,a,u;var c=[];var l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(r=l-127,s=128===l?i.from([]):e.slice(1,r),2===r&&s[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:s,remainder:e.slice(r)}}if(l<=191){if(n=l-182,r=o(e.slice(1,n).toString("hex"),16),(s=e.slice(n,r+n)).length<r)throw new Error("invalid RLP");return{data:s,remainder:e.slice(r+n)}}if(l<=247){for(r=l-191,a=e.slice(1,r);a.length;)u=t(a),c.push(u.data),a=u.remainder;return{data:c,remainder:e.slice(r)}}n=l-246,r=o(e.slice(1,n).toString("hex"),16);var h=n+r;if(h>e.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(a=e.slice(n,h)).length)throw new Error("invalid rlp, List has a invalid length");for(;a.length;)u=t(a),c.push(u.data),a=u.remainder;return{data:c,remainder:e.slice(h)}}(t=c(t));return e?r:(n.equal(r.remainder.length,0,"invalid remainder"),r.data)},e.getLength=function(t){if(!t||0===t.length)return i.from([]);var e=(t=c(t))[0];if(e<=127)return t.length;if(e<=183)return e-127;if(e<=191)return e-182;if(e<=247)return e-191;var r=e-246;return r+o(t.slice(1,r).toString("hex"),16)}},function(t,e,r){"use strict";(function(e){
14/*!
15 * The buffer module from node.js, for the browser.
16 *
17 * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
18 * @license MIT
19 */
20function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=r(432),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,u="foo"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function l(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=t.exports=m,f=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(f);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(u||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function y(t,e,r,n,i){throw new h.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function m(t,e){t||y(t,!0,e,"==",h.ok)}function b(t,e,r,s){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(l(t)&&l(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var u=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),function(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=v(t),s=v(e);if(i&&!s||!i&&s)return!1;if(i)return t=a.call(t),e=a.call(e),b(t,e,r);var u,c,l=M(t),h=M(e);if(l.length!==h.length)return!1;for(l.sort(),h.sort(),c=l.length-1;c>=0;c--)if(l[c]!==h[c])return!1;for(c=l.length-1;c>=0;c--)if(u=l[c],!b(t[u],e[u],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function v(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&y(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!t&&o.isError(i),u=!t&&i&&!r;if((a&&s&&w(i,r)||u)&&y(i,r,"Got unwanted exception"+n),t&&i&&r&&!w(i,r)||!t&&i)throw i}h.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=d(g((e=this).actual),128)+" "+e.operator+" "+d(g(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=p(r),s=i.indexOf("\n"+o);if(s>=0){var a=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(h.AssertionError,Error),h.fail=y,h.ok=m,h.equal=function(t,e,r){t!=e&&y(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&y(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){b(t,e,!1)||y(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){b(t,e,!0)||y(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){b(t,e,!1)&&y(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){b(e,r,!0)&&y(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&y(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&y(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){_(!0,t,e,r)},h.doesNotThrow=function(t,e,r){_(!1,t,e,r)},h.ifError=function(t){if(t)throw t};var M=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,r(8))},function(t,e,r){"use strict";var n=r(27),i=r(63),o=r(22),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,h=n.sum64_hi,f=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,g=n.sum64_5_hi,y=n.sum64_5_lo,m=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function M(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function E(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function A(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function B(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function R(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function x(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function S(t,e){var r=a(t,e,1)^a(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function k(t,e){var r=s(t,e,19)^s(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function C(t,e){var r=a(t,e,19)^a(e,t,29)^c(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(v,m),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=k(r[n-4],r[n-3]),o=C(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],u=x(r[n-30],r[n-29]),c=S(r[n-30],r[n-29]),l=r[n-32],h=r[n-31];r[n]=p(i,o,s,a,u,c,l,h),r[n+1]=d(i,o,s,a,u,c,l,h)}},v.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],u=this.h[4],c=this.h[5],p=this.h[6],d=this.h[7],m=this.h[8],b=this.h[9],v=this.h[10],x=this.h[11],S=this.h[12],k=this.h[13],C=this.h[14],I=this.h[15];o(this.k.length===r.length);for(var j=0;j<r.length;j+=2){var F=C,O=I,P=T(m,b),L=R(m,b),N=w(m,b,v,x,S),D=_(m,b,v,x,S,k),U=this.k[j],W=this.k[j+1],q=r[j],z=r[j+1],G=g(F,O,P,L,N,D,U,W,q,z),H=y(F,O,P,L,N,D,U,W,q,z);F=A(n,i),O=B(n,i),P=M(n,i,s,a,u),L=E(n,i,s,a,u,c);var V=h(F,O,P,L),K=f(F,O,P,L);C=S,I=k,S=v,k=x,v=m,x=b,m=h(p,d,G,H),b=f(d,d,G,H),p=u,d=c,u=s,c=a,s=n,a=i,n=h(G,H,V,K),i=f(G,H,V,K)}l(this.h,0,n,i),l(this.h,2,s,a),l(this.h,4,u,c),l(this.h,6,p,d),l(this.h,8,m,b),l(this.h,10,v,x),l(this.h,12,S,k),l(this.h,14,C,I)},v.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(27),i=r(63),o=r(206),s=r(22),a=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,h=o.maj32,f=o.s0_256,p=o.s1_256,d=o.g0_256,g=o.g1_256,y=i.BlockHash,m=[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;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(b,y),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<r.length;n++)r[n]=u(g(r[n-2]),r[n-7],d(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],m=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var M=c(_,p(b),l(b,v,w),this.k[n],r[n]),E=a(f(i),h(i,o,y));_=w,w=v,v=b,b=a(m,M),m=y,y=o,o=i,i=a(M,E)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],y),this.h[3]=a(this.h[3],m),this.h[4]=a(this.h[4],b),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},b.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(27).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(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?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,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){var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(452);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},function(t,e,r){"use strict";var n=e;function i(t){return 1===t.length?"0"+t:t}function o(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}n.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},n.zero2=i,n.toHex=o,n.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,r){var n=r(1),i=r(55),o=r(2).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function l(t,e,r){return t&e|r&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function f(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function m(t,e){return t>>>0<e>>>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,a=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,E=0|this._dl,A=0|this._el,B=0|this._fl,T=0|this._gl,R=0|this._hl,x=0;x<32;x+=2)e[x]=t.readInt32BE(4*x),e[x+1]=t.readInt32BE(4*x+4);for(;x<160;x+=2){var S=e[x-30],k=e[x-30+1],C=p(S,k),I=d(k,S),j=g(S=e[x-4],k=e[x-4+1]),F=y(k,S),O=e[x-14],P=e[x-14+1],L=e[x-32],N=e[x-32+1],D=I+P|0,U=C+O+m(D,I)|0;U=(U=U+j+m(D=D+F|0,F)|0)+L+m(D=D+N|0,N)|0,e[x]=U,e[x+1]=D}for(var W=0;W<160;W+=2){U=e[W],D=e[W+1];var q=l(r,n,i),z=l(w,_,M),G=h(r,w),H=h(w,r),V=f(a,A),K=f(A,a),$=s[W],Y=s[W+1],Z=c(a,u,b),J=c(A,B,T),X=R+K|0,Q=v+V+m(X,R)|0;Q=(Q=(Q=Q+Z+m(X=X+J|0,J)|0)+$+m(X=X+Y|0,Y)|0)+U+m(X=X+D|0,D)|0;var tt=H+z|0,et=G+q+m(tt,H)|0;v=b,R=T,b=u,T=B,u=a,B=A,a=o+Q+m(A=E+X|0,E)|0,o=i,E=M,i=n,M=_,n=r,_=w,r=Q+et+m(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+B|0,this._gl=this._gl+T|0,this._hl=this._hl+R|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,M)|0,this._dh=this._dh+o+m(this._dl,E)|0,this._eh=this._eh+a+m(this._el,A)|0,this._fh=this._fh+u+m(this._fl,B)|0,this._gh=this._gh+b+m(this._gl,T)|0,this._hh=this._hh+v+m(this._hl,R)|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){var n=r(1),i=r(55),o=r(2).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function l(t,e,r){return t&e|r&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function f(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function p(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}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,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0|this._f,g=0|this._g,y=0|this._h,m=0;m<16;++m)r[m]=t.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((e=r[m-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[m-7]+p(r[m-15])+r[m-16];for(var b=0;b<64;++b){var v=y+f(u)+c(u,d,g)+s[b]+r[b]|0,w=h(n)+l(n,i,o)|0;y=g,g=d,d=u,u=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=g+this._g|0,this._h=y+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){t.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}},function(t,e,r){var n=r(25);t.exports=function(t,e){if(!n(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(214),i=r(23);e.createDefaultTxMiddleware=function(t,e){var r=i.publicKeyFromPrivateKey(e);return[new n.NonceTxMiddleware(r,t),new n.SignedTxMiddleware(e)]}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(497);e.SignedTxMiddleware=n.SignedTxMiddleware;var i=r(496);e.NonceTxMiddleware=i.NonceTxMiddleware},function(t,e){t.exports=function(t){return/^[aeiou]/i.test(t)}},function(t,e,r){var n=r(505),i=r(504),o=r(87);t.exports=function(t){return i(t)||o(t)&&n(t.name)}},function(t,e){t.exports=function(t,e){if(!t)throw new TypeError(e)}},function(t,e,r){var n=r(87),i=r(506),o=r(114),s=r(113),a=r(217),u=r(216),c=function(){},l=r(215),h={string:String,number:Number,array:Array,regexp:RegExp};t.exports=function(t,e,f,p){if("*"===f)return;var d,g,y,m,b,v='"'+t+'"';if(Array.isArray(f))return r(503)(t,e,f);if(s(f))y=h[d=f]||c,g=l(d)?"an":"a",m=p?v+" must be "+d+"s":v+" must be "+g+" "+d,b="integer"===d?i(e):"object"===d?o(e):e instanceof y||typeof e===f,a(b,m);else if(u(f))d=f.name,a(e instanceof(y=f),m=p?v+' must be instances of "'+d+'"':v+' must be an instance of "'+d+'"');else{if(!n(f))throw new TypeError('"validator" must be a string, class or function');try{f(e)}catch(t){throw t.message=v+=": "+t.message,t}}}},function(t,e){t.exports=function(t){return void 0!==t&&null!==t}},function(t,e,r){var n=r(30),i=r(38),o=r(115);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,r){var n,i,o,s=r(68),a=r(521),u=r(233),c=r(124),l=r(18),h=l.process,f=l.setImmediate,p=l.clearImmediate,d=l.MessageChannel,g=l.Dispatch,y=0,m={},b=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},v=function(t){b.call(t.data)};f&&p||(f=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return m[++y]=function(){a("function"==typeof t?t:Function(t),e)},n(y),y},p=function(t){delete m[t]},"process"==r(65)(h)?n=function(t){h.nextTick(s(b,t,1))}:g&&g.now?n=function(t){g.now(s(b,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=v,n=s(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(n=function(t){l.postMessage(t+"","*")},l.addEventListener("message",v,!1)):n="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(s(b,t,1),0)}),t.exports={set:f,clear:p}},function(t,e,r){var n=r(30),i=r(92),o=r(17)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||void 0==(r=n(s)[o])?e:i(r)}},function(t,e,r){var n=r(65),i=r(17)("toStringTag"),o="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:o?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,r){t.exports={default:r(528),__esModule:!0}},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function s(t,e,r,n,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new function(t,e,r){this.fn=t,this.context=e,this.once=r||!1}(r,n||t,o),a=i?i+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),u.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},u.prototype.listeners=function(t){var e=i?i+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,s=new Array(o);n<o;n++)s[n]=r[n].fn;return s},u.prototype.listenerCount=function(t){var e=i?i+t:t,r=this._events[e];return r?r.fn?1:r.length:0},u.prototype.emit=function(t,e,r,n,o,s){var a=i?i+t:t;if(!this._events[a])return!1;var u,c,l=this._events[a],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,n),!0;case 5:return l.fn.call(l.context,e,r,n,o),!0;case 6:return l.fn.call(l.context,e,r,n,o,s),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,p=l.length;for(c=0;c<p;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,r);break;case 4:l[c].fn.call(l[c].context,e,r,n);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},u.prototype.on=function(t,e,r){return s(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return s(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,r,n){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||n&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==e||n&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&a(this,e)):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,t.exports=u},function(t,e,r){"use strict";e.__esModule=!0;var n=s(r(543)),i=s(r(539)),o=s(r(122));function s(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,o.default)(e)));t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(n.default?(0,n.default)(t,e):t.__proto__=e)}},function(t,e){},function(t,e,r){var n=r(116),i=r(91),o=r(57),s=r(123),a=r(50),u=r(242),c=Object.getOwnPropertyDescriptor;e.f=r(37)?c:function(t,e){if(t=o(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return i(!n.f.call(t,e),t[e])}},function(t,e,r){var n=r(235),i=r(119).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){r(555);for(var n=r(18),i=r(49),o=r(66),s=r(17)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<a.length;u++){var c=a[u],l=n[c],h=l&&l.prototype;h&&!h[s]&&i(h,s,c),o[c]=o.Array}},function(t,e,r){var n=r(18).document;t.exports=n&&n.documentElement},function(t,e,r){var n=r(121),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},function(t,e,r){var n=r(50),i=r(57),o=r(557)(!1),s=r(126)("IE_PROTO");t.exports=function(t,e){var r,a=i(t),u=0,c=[];for(r in a)r!=s&&n(a,r)&&c.push(r);for(;e.length>u;)n(a,r=e[u++])&&(~o(c,r)||c.push(r));return c}},function(t,e,r){t.exports=r(49)},function(t,e,r){"use strict";var n=r(90),i=r(31),o=r(236),s=r(49),a=r(50),u=r(66),c=r(560),l=r(88),h=r(244),f=r(17)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,r,g,y,m,b){c(r,e,g);var v,w,_,M=function(t){if(!p&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},E=e+" Iterator",A="values"==y,B=!1,T=t.prototype,R=T[f]||T["@@iterator"]||y&&T[y],x=!p&&R||M(y),S=y?A?M("entries"):x:void 0,k="Array"==e&&T.entries||R;if(k&&(_=h(k.call(new t)))!==Object.prototype&&_.next&&(l(_,E,!0),n||a(_,f)||s(_,f,d)),A&&R&&"values"!==R.name&&(B=!0,x=function(){return R.call(this)}),n&&!b||!p&&!B&&T[f]||s(T,f,x),u[e]=x,u[E]=d,y)if(v={values:A?x:M("values"),keys:m?x:M("keys"),entries:S},b)for(w in v)w in T||o(T,w,v[w]);else i(i.P+i.F*(p||B),e,v);return v}},function(t,e,r){"use strict";var n=r(561)(!0);r(237)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(122),o=(n=i)&&n.__esModule?n:{default:n};e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,o.default)(e))&&"function"!=typeof e?t:e}},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(566),o=(n=i)&&n.__esModule?n:{default:n};e.default=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,o.default)(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}()},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){t.exports=!r(37)&&!r(67)(function(){return 7!=Object.defineProperty(r(124)("div"),"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(31),i=r(13),o=r(67);t.exports=function(t,e){var r=(i.Object||{})[t]||Object[t],s={};s[t]=e(r),n(n.S+n.F*o(function(){r(1)}),"Object",s)}},function(t,e,r){var n=r(50),i=r(128),o=r(126)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),n(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,r){t.exports={default:r(568),__esModule:!0}},function(t,e,r){"use strict";t.exports=o;var n=r(51),i=r(69);function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){a(t,e,r)}):a(this,null,null)}function a(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(1),i.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},function(t,e,r){"use strict";var n=r(94);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){t.exports=r(42).EventEmitter},function(t,e,r){"use strict";(function(e,n){var i=r(94);t.exports=v;var o,s=r(267);v.ReadableState=b;r(42).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(248),c=r(2).Buffer,l=e.Uint8Array||function(){};var h=r(69);h.inherits=r(1);var f=r(581),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var d,g=r(580),y=r(247);h.inherits(v,u);var m=["error","close","destroy","pause","resume"];function b(t,e){o=o||r(51),t=t||{};var n=e instanceof o;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,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&&(d||(d=r(130).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||r(51),!(this instanceof v))return new v(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 w(t,e,r,n,i){var o,s=t._readableState;null===e?(s.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,A(t)}(t,s)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?_(t,s,e,!1):T(t,s)):_(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function _(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&A(t)),T(t,e)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(t,e){this.push(null),e(t)},v.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=c.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},v.prototype.unshift=function(t){return w(this,t,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return d||(d=r(130).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var M=8388608;function E(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.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 A(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(B,t):B(t))}function B(t){p("emit readable"),t.emit("readable"),k(t)}function T(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function x(t){p("readable nexttick read 0"),t.read(0)}function S(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),k(t),e.flowing&&!e.reading&&t.read(0)}function k(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function C(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=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;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));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,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function I(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(j,e,t))}function j(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}v.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?I(this):A(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&I(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=E(r,e))),null===(n=t>0?C(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.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,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?l:v;function c(e,n){p("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),t.removeListener("close",m),t.removeListener("finish",b),t.removeListener("drain",h),t.removeListener("error",y),t.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",g),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function l(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",c);var h=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,k(t))}}(r);t.on("drain",h);var f=!1;var d=!1;function g(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==F(o.pipes,t))&&!f&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function y(e){p("onerror",e),v(),t.removeListener("error",y),0===a(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",b),v()}function b(){p("onfinish"),t.removeListener("close",m),v()}function v(){p("unpipe"),r.unpipe(t)}return r.on("data",g),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",y),t.once("close",m),t.once("finish",b),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},v.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<i;o++)n[o].emit("unpipe",this,r);return this}var s=F(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},v.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&A(this):i.nextTick(x,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(S,t,e))}(this,t)),this},v.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(p("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<m.length;o++)t.on(m[o],this.emit.bind(this,m[o]));return this._read=function(e){p("wrapped _read",e),n&&(n=!1,t.resume())},this},v._fromList=C}).call(this,r(8),r(24))},function(t,e,r){"use strict";var n=r(41),i=n,o=Function("return this")(),s=r(14);i.exportSymbol("proto.EthBlockHashList",null,o),i.exportSymbol("proto.EthBlockInfo",null,o),i.exportSymbol("proto.EthFilterEnvelope",null,o),i.exportSymbol("proto.EthFilterLog",null,o),i.exportSymbol("proto.EthFilterLogList",null,o),i.exportSymbol("proto.EthTxHashList",null,o),i.exportSymbol("proto.EventData",null,o),i.exportSymbol("proto.EventDataList",null,o),i.exportSymbol("proto.EvmTxObject",null,o),i.exportSymbol("proto.EvmTxReceipt",null,o),i.exportSymbol("proto.TxReceiptList",null,o),proto.EthFilterEnvelope=function(t){n.Message.initialize(this,t,0,-1,null,proto.EthFilterEnvelope.oneofGroups_)},i.inherits(proto.EthFilterEnvelope,n.Message),i.DEBUG&&!COMPILED&&(proto.EthFilterEnvelope.displayName="proto.EthFilterEnvelope"),proto.EthFilterEnvelope.oneofGroups_=[[1,2,3]],proto.EthFilterEnvelope.MessageCase={MESSAGE_NOT_SET:0,ETH_BLOCK_HASH_LIST:1,ETH_FILTER_LOG_LIST:2,ETH_TX_HASH_LIST:3},proto.EthFilterEnvelope.prototype.getMessageCase=function(){return n.Message.computeOneofCase(this,proto.EthFilterEnvelope.oneofGroups_[0])},n.Message.GENERATE_TO_OBJECT&&(proto.EthFilterEnvelope.prototype.toObject=function(t){return proto.EthFilterEnvelope.toObject(t,this)},proto.EthFilterEnvelope.toObject=function(t,e){var r,n={ethBlockHashList:(r=e.getEthBlockHashList())&&proto.EthBlockHashList.toObject(t,r),ethFilterLogList:(r=e.getEthFilterLogList())&&proto.EthFilterLogList.toObject(t,r),ethTxHashList:(r=e.getEthTxHashList())&&proto.EthTxHashList.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.EthFilterEnvelope.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EthFilterEnvelope;return proto.EthFilterEnvelope.deserializeBinaryFromReader(r,e)},proto.EthFilterEnvelope.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.EthBlockHashList;e.readMessage(r,proto.EthBlockHashList.deserializeBinaryFromReader),t.setEthBlockHashList(r);break;case 2:r=new proto.EthFilterLogList;e.readMessage(r,proto.EthFilterLogList.deserializeBinaryFromReader),t.setEthFilterLogList(r);break;case 3:r=new proto.EthTxHashList;e.readMessage(r,proto.EthTxHashList.deserializeBinaryFromReader),t.setEthTxHashList(r);break;default:e.skipField()}}return t},proto.EthFilterEnvelope.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EthFilterEnvelope.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EthFilterEnvelope.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getEthBlockHashList())&&e.writeMessage(1,r,proto.EthBlockHashList.serializeBinaryToWriter),null!=(r=t.getEthFilterLogList())&&e.writeMessage(2,r,proto.EthFilterLogList.serializeBinaryToWriter),null!=(r=t.getEthTxHashList())&&e.writeMessage(3,r,proto.EthTxHashList.serializeBinaryToWriter)},proto.EthFilterEnvelope.prototype.getEthBlockHashList=function(){return n.Message.getWrapperField(this,proto.EthBlockHashList,1)},proto.EthFilterEnvelope.prototype.setEthBlockHashList=function(t){n.Message.setOneofWrapperField(this,1,proto.EthFilterEnvelope.oneofGroups_[0],t)},proto.EthFilterEnvelope.prototype.clearEthBlockHashList=function(){this.setEthBlockHashList(void 0)},proto.EthFilterEnvelope.prototype.hasEthBlockHashList=function(){return null!=n.Message.getField(this,1)},proto.EthFilterEnvelope.prototype.getEthFilterLogList=function(){return n.Message.getWrapperField(this,proto.EthFilterLogList,2)},proto.EthFilterEnvelope.prototype.setEthFilterLogList=function(t){n.Message.setOneofWrapperField(this,2,proto.EthFilterEnvelope.oneofGroups_[0],t)},proto.EthFilterEnvelope.prototype.clearEthFilterLogList=function(){this.setEthFilterLogList(void 0)},proto.EthFilterEnvelope.prototype.hasEthFilterLogList=function(){return null!=n.Message.getField(this,2)},proto.EthFilterEnvelope.prototype.getEthTxHashList=function(){return n.Message.getWrapperField(this,proto.EthTxHashList,3)},proto.EthFilterEnvelope.prototype.setEthTxHashList=function(t){n.Message.setOneofWrapperField(this,3,proto.EthFilterEnvelope.oneofGroups_[0],t)},proto.EthFilterEnvelope.prototype.clearEthTxHashList=function(){this.setEthTxHashList(void 0)},proto.EthFilterEnvelope.prototype.hasEthTxHashList=function(){return null!=n.Message.getField(this,3)},proto.EthBlockHashList=function(t){n.Message.initialize(this,t,0,-1,proto.EthBlockHashList.repeatedFields_,null)},i.inherits(proto.EthBlockHashList,n.Message),i.DEBUG&&!COMPILED&&(proto.EthBlockHashList.displayName="proto.EthBlockHashList"),proto.EthBlockHashList.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.EthBlockHashList.prototype.toObject=function(t){return proto.EthBlockHashList.toObject(t,this)},proto.EthBlockHashList.toObject=function(t,e){var r={ethBlockHashList:e.getEthBlockHashList_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.EthBlockHashList.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EthBlockHashList;return proto.EthBlockHashList.deserializeBinaryFromReader(r,e)},proto.EthBlockHashList.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.addEthBlockHash(r);break;default:e.skipField()}}return t},proto.EthBlockHashList.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EthBlockHashList.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EthBlockHashList.serializeBinaryToWriter=function(t,e){var r;(r=t.getEthBlockHashList_asU8()).length>0&&e.writeRepeatedBytes(1,r)},proto.EthBlockHashList.prototype.getEthBlockHashList=function(){return n.Message.getRepeatedField(this,1)},proto.EthBlockHashList.prototype.getEthBlockHashList_asB64=function(){return n.Message.bytesListAsB64(this.getEthBlockHashList())},proto.EthBlockHashList.prototype.getEthBlockHashList_asU8=function(){return n.Message.bytesListAsU8(this.getEthBlockHashList())},proto.EthBlockHashList.prototype.setEthBlockHashList=function(t){n.Message.setField(this,1,t||[])},proto.EthBlockHashList.prototype.addEthBlockHash=function(t,e){n.Message.addToRepeatedField(this,1,t,e)},proto.EthBlockHashList.prototype.clearEthBlockHashList=function(){this.setEthBlockHashList([])},proto.EthTxHashList=function(t){n.Message.initialize(this,t,0,-1,proto.EthTxHashList.repeatedFields_,null)},i.inherits(proto.EthTxHashList,n.Message),i.DEBUG&&!COMPILED&&(proto.EthTxHashList.displayName="proto.EthTxHashList"),proto.EthTxHashList.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.EthTxHashList.prototype.toObject=function(t){return proto.EthTxHashList.toObject(t,this)},proto.EthTxHashList.toObject=function(t,e){var r={ethTxHashList:e.getEthTxHashList_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.EthTxHashList.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EthTxHashList;return proto.EthTxHashList.deserializeBinaryFromReader(r,e)},proto.EthTxHashList.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.addEthTxHash(r);break;default:e.skipField()}}return t},proto.EthTxHashList.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EthTxHashList.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EthTxHashList.serializeBinaryToWriter=function(t,e){var r;(r=t.getEthTxHashList_asU8()).length>0&&e.writeRepeatedBytes(1,r)},proto.EthTxHashList.prototype.getEthTxHashList=function(){return n.Message.getRepeatedField(this,1)},proto.EthTxHashList.prototype.getEthTxHashList_asB64=function(){return n.Message.bytesListAsB64(this.getEthTxHashList())},proto.EthTxHashList.prototype.getEthTxHashList_asU8=function(){return n.Message.bytesListAsU8(this.getEthTxHashList())},proto.EthTxHashList.prototype.setEthTxHashList=function(t){n.Message.setField(this,1,t||[])},proto.EthTxHashList.prototype.addEthTxHash=function(t,e){n.Message.addToRepeatedField(this,1,t,e)},proto.EthTxHashList.prototype.clearEthTxHashList=function(){this.setEthTxHashList([])},proto.EventDataList=function(t){n.Message.initialize(this,t,0,-1,proto.EventDataList.repeatedFields_,null)},i.inherits(proto.EventDataList,n.Message),i.DEBUG&&!COMPILED&&(proto.EventDataList.displayName="proto.EventDataList"),proto.EventDataList.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.EventDataList.prototype.toObject=function(t){return proto.EventDataList.toObject(t,this)},proto.EventDataList.toObject=function(t,e){var r={eventsList:n.Message.toObjectList(e.getEventsList(),proto.EventData.toObject,t)};return t&&(r.$jspbMessageInstance=e),r}),proto.EventDataList.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EventDataList;return proto.EventDataList.deserializeBinaryFromReader(r,e)},proto.EventDataList.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.EventData;e.readMessage(r,proto.EventData.deserializeBinaryFromReader),t.addEvents(r);break;default:e.skipField()}}return t},proto.EventDataList.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EventDataList.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EventDataList.serializeBinaryToWriter=function(t,e){var r;(r=t.getEventsList()).length>0&&e.writeRepeatedMessage(1,r,proto.EventData.serializeBinaryToWriter)},proto.EventDataList.prototype.getEventsList=function(){return n.Message.getRepeatedWrapperField(this,proto.EventData,1)},proto.EventDataList.prototype.setEventsList=function(t){n.Message.setRepeatedWrapperField(this,1,t)},proto.EventDataList.prototype.addEvents=function(t,e){return n.Message.addToRepeatedWrapperField(this,1,t,proto.EventData,e)},proto.EventDataList.prototype.clearEventsList=function(){this.setEventsList([])},proto.EventData=function(t){n.Message.initialize(this,t,0,-1,proto.EventData.repeatedFields_,null)},i.inherits(proto.EventData,n.Message),i.DEBUG&&!COMPILED&&(proto.EventData.displayName="proto.EventData"),proto.EventData.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.EventData.prototype.toObject=function(t){return proto.EventData.toObject(t,this)},proto.EventData.toObject=function(t,e){var r,i={topicsList:n.Message.getRepeatedField(e,1),caller:(r=e.getCaller())&&s.Address.toObject(t,r),address:(r=e.getAddress())&&s.Address.toObject(t,r),pluginName:n.Message.getFieldWithDefault(e,4,""),blockHeight:n.Message.getFieldWithDefault(e,5,0),encodedBody:e.getEncodedBody_asB64(),originalRequest:e.getOriginalRequest_asB64(),txHash:e.getTxHash_asB64()};return t&&(i.$jspbMessageInstance=e),i}),proto.EventData.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EventData;return proto.EventData.deserializeBinaryFromReader(r,e)},proto.EventData.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readString();t.addTopics(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setCaller(r);break;case 3:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setAddress(r);break;case 4:r=e.readString();t.setPluginName(r);break;case 5:r=e.readUint64();t.setBlockHeight(r);break;case 6:r=e.readBytes();t.setEncodedBody(r);break;case 7:r=e.readBytes();t.setOriginalRequest(r);break;case 8:r=e.readBytes();t.setTxHash(r);break;default:e.skipField()}}return t},proto.EventData.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EventData.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EventData.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getTopicsList()).length>0&&e.writeRepeatedString(1,r),null!=(r=t.getCaller())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter),null!=(r=t.getAddress())&&e.writeMessage(3,r,s.Address.serializeBinaryToWriter),(r=t.getPluginName()).length>0&&e.writeString(4,r),0!==(r=t.getBlockHeight())&&e.writeUint64(5,r),(r=t.getEncodedBody_asU8()).length>0&&e.writeBytes(6,r),(r=t.getOriginalRequest_asU8()).length>0&&e.writeBytes(7,r),(r=t.getTxHash_asU8()).length>0&&e.writeBytes(8,r)},proto.EventData.prototype.getTopicsList=function(){return n.Message.getRepeatedField(this,1)},proto.EventData.prototype.setTopicsList=function(t){n.Message.setField(this,1,t||[])},proto.EventData.prototype.addTopics=function(t,e){n.Message.addToRepeatedField(this,1,t,e)},proto.EventData.prototype.clearTopicsList=function(){this.setTopicsList([])},proto.EventData.prototype.getCaller=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.EventData.prototype.setCaller=function(t){n.Message.setWrapperField(this,2,t)},proto.EventData.prototype.clearCaller=function(){this.setCaller(void 0)},proto.EventData.prototype.hasCaller=function(){return null!=n.Message.getField(this,2)},proto.EventData.prototype.getAddress=function(){return n.Message.getWrapperField(this,s.Address,3)},proto.EventData.prototype.setAddress=function(t){n.Message.setWrapperField(this,3,t)},proto.EventData.prototype.clearAddress=function(){this.setAddress(void 0)},proto.EventData.prototype.hasAddress=function(){return null!=n.Message.getField(this,3)},proto.EventData.prototype.getPluginName=function(){return n.Message.getFieldWithDefault(this,4,"")},proto.EventData.prototype.setPluginName=function(t){n.Message.setProto3StringField(this,4,t)},proto.EventData.prototype.getBlockHeight=function(){return n.Message.getFieldWithDefault(this,5,0)},proto.EventData.prototype.setBlockHeight=function(t){n.Message.setProto3IntField(this,5,t)},proto.EventData.prototype.getEncodedBody=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.EventData.prototype.getEncodedBody_asB64=function(){return n.Message.bytesAsB64(this.getEncodedBody())},proto.EventData.prototype.getEncodedBody_asU8=function(){return n.Message.bytesAsU8(this.getEncodedBody())},proto.EventData.prototype.setEncodedBody=function(t){n.Message.setProto3BytesField(this,6,t)},proto.EventData.prototype.getOriginalRequest=function(){return n.Message.getFieldWithDefault(this,7,"")},proto.EventData.prototype.getOriginalRequest_asB64=function(){return n.Message.bytesAsB64(this.getOriginalRequest())},proto.EventData.prototype.getOriginalRequest_asU8=function(){return n.Message.bytesAsU8(this.getOriginalRequest())},proto.EventData.prototype.setOriginalRequest=function(t){n.Message.setProto3BytesField(this,7,t)},proto.EventData.prototype.getTxHash=function(){return n.Message.getFieldWithDefault(this,8,"")},proto.EventData.prototype.getTxHash_asB64=function(){return n.Message.bytesAsB64(this.getTxHash())},proto.EventData.prototype.getTxHash_asU8=function(){return n.Message.bytesAsU8(this.getTxHash())},proto.EventData.prototype.setTxHash=function(t){n.Message.setProto3BytesField(this,8,t)},proto.TxReceiptList=function(t){n.Message.initialize(this,t,0,-1,proto.TxReceiptList.repeatedFields_,null)},i.inherits(proto.TxReceiptList,n.Message),i.DEBUG&&!COMPILED&&(proto.TxReceiptList.displayName="proto.TxReceiptList"),proto.TxReceiptList.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.TxReceiptList.prototype.toObject=function(t){return proto.TxReceiptList.toObject(t,this)},proto.TxReceiptList.toObject=function(t,e){var r={txReceiptsList:n.Message.toObjectList(e.getTxReceiptsList(),proto.EvmTxReceipt.toObject,t)};return t&&(r.$jspbMessageInstance=e),r}),proto.TxReceiptList.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TxReceiptList;return proto.TxReceiptList.deserializeBinaryFromReader(r,e)},proto.TxReceiptList.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.EvmTxReceipt;e.readMessage(r,proto.EvmTxReceipt.deserializeBinaryFromReader),t.addTxReceipts(r);break;default:e.skipField()}}return t},proto.TxReceiptList.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TxReceiptList.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TxReceiptList.serializeBinaryToWriter=function(t,e){var r;(r=t.getTxReceiptsList()).length>0&&e.writeRepeatedMessage(1,r,proto.EvmTxReceipt.serializeBinaryToWriter)},proto.TxReceiptList.prototype.getTxReceiptsList=function(){return n.Message.getRepeatedWrapperField(this,proto.EvmTxReceipt,1)},proto.TxReceiptList.prototype.setTxReceiptsList=function(t){n.Message.setRepeatedWrapperField(this,1,t)},proto.TxReceiptList.prototype.addTxReceipts=function(t,e){return n.Message.addToRepeatedWrapperField(this,1,t,proto.EvmTxReceipt,e)},proto.TxReceiptList.prototype.clearTxReceiptsList=function(){this.setTxReceiptsList([])},proto.EvmTxReceipt=function(t){n.Message.initialize(this,t,0,-1,proto.EvmTxReceipt.repeatedFields_,null)},i.inherits(proto.EvmTxReceipt,n.Message),i.DEBUG&&!COMPILED&&(proto.EvmTxReceipt.displayName="proto.EvmTxReceipt"),proto.EvmTxReceipt.repeatedFields_=[7],n.Message.GENERATE_TO_OBJECT&&(proto.EvmTxReceipt.prototype.toObject=function(t){return proto.EvmTxReceipt.toObject(t,this)},proto.EvmTxReceipt.toObject=function(t,e){var r={transactionIndex:n.Message.getFieldWithDefault(e,1,0),blockHash:e.getBlockHash_asB64(),blockNumber:n.Message.getFieldWithDefault(e,3,0),cumulativeGasUsed:n.Message.getFieldWithDefault(e,4,0),gasUsed:n.Message.getFieldWithDefault(e,5,0),contractAddress:e.getContractAddress_asB64(),logsList:n.Message.toObjectList(e.getLogsList(),proto.EventData.toObject,t),logsBloom:e.getLogsBloom_asB64(),status:n.Message.getFieldWithDefault(e,9,0),txHash:e.getTxHash_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.EvmTxReceipt.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EvmTxReceipt;return proto.EvmTxReceipt.deserializeBinaryFromReader(r,e)},proto.EvmTxReceipt.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readInt32();t.setTransactionIndex(r);break;case 2:r=e.readBytes();t.setBlockHash(r);break;case 3:r=e.readInt64();t.setBlockNumber(r);break;case 4:r=e.readInt32();t.setCumulativeGasUsed(r);break;case 5:r=e.readInt32();t.setGasUsed(r);break;case 6:r=e.readBytes();t.setContractAddress(r);break;case 7:r=new proto.EventData;e.readMessage(r,proto.EventData.deserializeBinaryFromReader),t.addLogs(r);break;case 8:r=e.readBytes();t.setLogsBloom(r);break;case 9:r=e.readInt32();t.setStatus(r);break;case 10:r=e.readBytes();t.setTxHash(r);break;default:e.skipField()}}return t},proto.EvmTxReceipt.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EvmTxReceipt.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EvmTxReceipt.serializeBinaryToWriter=function(t,e){var r=void 0;0!==(r=t.getTransactionIndex())&&e.writeInt32(1,r),(r=t.getBlockHash_asU8()).length>0&&e.writeBytes(2,r),0!==(r=t.getBlockNumber())&&e.writeInt64(3,r),0!==(r=t.getCumulativeGasUsed())&&e.writeInt32(4,r),0!==(r=t.getGasUsed())&&e.writeInt32(5,r),(r=t.getContractAddress_asU8()).length>0&&e.writeBytes(6,r),(r=t.getLogsList()).length>0&&e.writeRepeatedMessage(7,r,proto.EventData.serializeBinaryToWriter),(r=t.getLogsBloom_asU8()).length>0&&e.writeBytes(8,r),0!==(r=t.getStatus())&&e.writeInt32(9,r),(r=t.getTxHash_asU8()).length>0&&e.writeBytes(10,r)},proto.EvmTxReceipt.prototype.getTransactionIndex=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.EvmTxReceipt.prototype.setTransactionIndex=function(t){n.Message.setProto3IntField(this,1,t)},proto.EvmTxReceipt.prototype.getBlockHash=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.EvmTxReceipt.prototype.getBlockHash_asB64=function(){return n.Message.bytesAsB64(this.getBlockHash())},proto.EvmTxReceipt.prototype.getBlockHash_asU8=function(){return n.Message.bytesAsU8(this.getBlockHash())},proto.EvmTxReceipt.prototype.setBlockHash=function(t){n.Message.setProto3BytesField(this,2,t)},proto.EvmTxReceipt.prototype.getBlockNumber=function(){return n.Message.getFieldWithDefault(this,3,0)},proto.EvmTxReceipt.prototype.setBlockNumber=function(t){n.Message.setProto3IntField(this,3,t)},proto.EvmTxReceipt.prototype.getCumulativeGasUsed=function(){return n.Message.getFieldWithDefault(this,4,0)},proto.EvmTxReceipt.prototype.setCumulativeGasUsed=function(t){n.Message.setProto3IntField(this,4,t)},proto.EvmTxReceipt.prototype.getGasUsed=function(){return n.Message.getFieldWithDefault(this,5,0)},proto.EvmTxReceipt.prototype.setGasUsed=function(t){n.Message.setProto3IntField(this,5,t)},proto.EvmTxReceipt.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.EvmTxReceipt.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},proto.EvmTxReceipt.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},proto.EvmTxReceipt.prototype.setContractAddress=function(t){n.Message.setProto3BytesField(this,6,t)},proto.EvmTxReceipt.prototype.getLogsList=function(){return n.Message.getRepeatedWrapperField(this,proto.EventData,7)},proto.EvmTxReceipt.prototype.setLogsList=function(t){n.Message.setRepeatedWrapperField(this,7,t)},proto.EvmTxReceipt.prototype.addLogs=function(t,e){return n.Message.addToRepeatedWrapperField(this,7,t,proto.EventData,e)},proto.EvmTxReceipt.prototype.clearLogsList=function(){this.setLogsList([])},proto.EvmTxReceipt.prototype.getLogsBloom=function(){return n.Message.getFieldWithDefault(this,8,"")},proto.EvmTxReceipt.prototype.getLogsBloom_asB64=function(){return n.Message.bytesAsB64(this.getLogsBloom())},proto.EvmTxReceipt.prototype.getLogsBloom_asU8=function(){return n.Message.bytesAsU8(this.getLogsBloom())},proto.EvmTxReceipt.prototype.setLogsBloom=function(t){n.Message.setProto3BytesField(this,8,t)},proto.EvmTxReceipt.prototype.getStatus=function(){return n.Message.getFieldWithDefault(this,9,0)},proto.EvmTxReceipt.prototype.setStatus=function(t){n.Message.setProto3IntField(this,9,t)},proto.EvmTxReceipt.prototype.getTxHash=function(){return n.Message.getFieldWithDefault(this,10,"")},proto.EvmTxReceipt.prototype.getTxHash_asB64=function(){return n.Message.bytesAsB64(this.getTxHash())},proto.EvmTxReceipt.prototype.getTxHash_asU8=function(){return n.Message.bytesAsU8(this.getTxHash())},proto.EvmTxReceipt.prototype.setTxHash=function(t){n.Message.setProto3BytesField(this,10,t)},proto.EvmTxObject=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.EvmTxObject,n.Message),i.DEBUG&&!COMPILED&&(proto.EvmTxObject.displayName="proto.EvmTxObject"),n.Message.GENERATE_TO_OBJECT&&(proto.EvmTxObject.prototype.toObject=function(t){return proto.EvmTxObject.toObject(t,this)},proto.EvmTxObject.toObject=function(t,e){var r={hash:e.getHash_asB64(),nonce:n.Message.getFieldWithDefault(e,2,0),blockHash:e.getBlockHash_asB64(),blockNumber:n.Message.getFieldWithDefault(e,4,0),transactionIndex:n.Message.getFieldWithDefault(e,5,0),from:e.getFrom_asB64(),to:e.getTo_asB64(),value:n.Message.getFieldWithDefault(e,8,0),gasPrice:n.Message.getFieldWithDefault(e,9,0),gas:n.Message.getFieldWithDefault(e,10,0),input:e.getInput_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.EvmTxObject.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EvmTxObject;return proto.EvmTxObject.deserializeBinaryFromReader(r,e)},proto.EvmTxObject.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.setHash(r);break;case 2:r=e.readUint64();t.setNonce(r);break;case 3:r=e.readBytes();t.setBlockHash(r);break;case 4:r=e.readInt64();t.setBlockNumber(r);break;case 5:r=e.readInt32();t.setTransactionIndex(r);break;case 6:r=e.readBytes();t.setFrom(r);break;case 7:r=e.readBytes();t.setTo(r);break;case 8:r=e.readInt64();t.setValue(r);break;case 9:r=e.readInt64();t.setGasPrice(r);break;case 10:r=e.readInt64();t.setGas(r);break;case 11:r=e.readBytes();t.setInput(r);break;default:e.skipField()}}return t},proto.EvmTxObject.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EvmTxObject.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EvmTxObject.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getHash_asU8()).length>0&&e.writeBytes(1,r),0!==(r=t.getNonce())&&e.writeUint64(2,r),(r=t.getBlockHash_asU8()).length>0&&e.writeBytes(3,r),0!==(r=t.getBlockNumber())&&e.writeInt64(4,r),0!==(r=t.getTransactionIndex())&&e.writeInt32(5,r),(r=t.getFrom_asU8()).length>0&&e.writeBytes(6,r),(r=t.getTo_asU8()).length>0&&e.writeBytes(7,r),0!==(r=t.getValue())&&e.writeInt64(8,r),0!==(r=t.getGasPrice())&&e.writeInt64(9,r),0!==(r=t.getGas())&&e.writeInt64(10,r),(r=t.getInput_asU8()).length>0&&e.writeBytes(11,r)},proto.EvmTxObject.prototype.getHash=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.EvmTxObject.prototype.getHash_asB64=function(){return n.Message.bytesAsB64(this.getHash())},proto.EvmTxObject.prototype.getHash_asU8=function(){return n.Message.bytesAsU8(this.getHash())},proto.EvmTxObject.prototype.setHash=function(t){n.Message.setProto3BytesField(this,1,t)},proto.EvmTxObject.prototype.getNonce=function(){return n.Message.getFieldWithDefault(this,2,0)},proto.EvmTxObject.prototype.setNonce=function(t){n.Message.setProto3IntField(this,2,t)},proto.EvmTxObject.prototype.getBlockHash=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.EvmTxObject.prototype.getBlockHash_asB64=function(){return n.Message.bytesAsB64(this.getBlockHash())},proto.EvmTxObject.prototype.getBlockHash_asU8=function(){return n.Message.bytesAsU8(this.getBlockHash())},proto.EvmTxObject.prototype.setBlockHash=function(t){n.Message.setProto3BytesField(this,3,t)},proto.EvmTxObject.prototype.getBlockNumber=function(){return n.Message.getFieldWithDefault(this,4,0)},proto.EvmTxObject.prototype.setBlockNumber=function(t){n.Message.setProto3IntField(this,4,t)},proto.EvmTxObject.prototype.getTransactionIndex=function(){return n.Message.getFieldWithDefault(this,5,0)},proto.EvmTxObject.prototype.setTransactionIndex=function(t){n.Message.setProto3IntField(this,5,t)},proto.EvmTxObject.prototype.getFrom=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.EvmTxObject.prototype.getFrom_asB64=function(){return n.Message.bytesAsB64(this.getFrom())},proto.EvmTxObject.prototype.getFrom_asU8=function(){return n.Message.bytesAsU8(this.getFrom())},proto.EvmTxObject.prototype.setFrom=function(t){n.Message.setProto3BytesField(this,6,t)},proto.EvmTxObject.prototype.getTo=function(){return n.Message.getFieldWithDefault(this,7,"")},proto.EvmTxObject.prototype.getTo_asB64=function(){return n.Message.bytesAsB64(this.getTo())},proto.EvmTxObject.prototype.getTo_asU8=function(){return n.Message.bytesAsU8(this.getTo())},proto.EvmTxObject.prototype.setTo=function(t){n.Message.setProto3BytesField(this,7,t)},proto.EvmTxObject.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,8,0)},proto.EvmTxObject.prototype.setValue=function(t){n.Message.setProto3IntField(this,8,t)},proto.EvmTxObject.prototype.getGasPrice=function(){return n.Message.getFieldWithDefault(this,9,0)},proto.EvmTxObject.prototype.setGasPrice=function(t){n.Message.setProto3IntField(this,9,t)},proto.EvmTxObject.prototype.getGas=function(){return n.Message.getFieldWithDefault(this,10,0)},proto.EvmTxObject.prototype.setGas=function(t){n.Message.setProto3IntField(this,10,t)},proto.EvmTxObject.prototype.getInput=function(){return n.Message.getFieldWithDefault(this,11,"")},proto.EvmTxObject.prototype.getInput_asB64=function(){return n.Message.bytesAsB64(this.getInput())},proto.EvmTxObject.prototype.getInput_asU8=function(){return n.Message.bytesAsU8(this.getInput())},proto.EvmTxObject.prototype.setInput=function(t){n.Message.setProto3BytesField(this,11,t)},proto.EthBlockInfo=function(t){n.Message.initialize(this,t,0,-1,proto.EthBlockInfo.repeatedFields_,null)},i.inherits(proto.EthBlockInfo,n.Message),i.DEBUG&&!COMPILED&&(proto.EthBlockInfo.displayName="proto.EthBlockInfo"),proto.EthBlockInfo.repeatedFields_=[18,19],n.Message.GENERATE_TO_OBJECT&&(proto.EthBlockInfo.prototype.toObject=function(t){return proto.EthBlockInfo.toObject(t,this)},proto.EthBlockInfo.toObject=function(t,e){var r={number:n.Message.getFieldWithDefault(e,1,0),hash:e.getHash_asB64(),parentHash:e.getParentHash_asB64(),nonce:e.getNonce_asB64(),sha3Uncles:e.getSha3Uncles_asB64(),logsBloom:e.getLogsBloom_asB64(),transactionsRoot:e.getTransactionsRoot_asB64(),stateRoot:e.getStateRoot_asB64(),receiptsRoot:e.getReceiptsRoot_asB64(),miner:e.getMiner_asB64(),difficulty:n.Message.getFieldWithDefault(e,11,0),totalDifficulty:n.Message.getFieldWithDefault(e,12,0),extraData:e.getExtraData_asB64(),size:n.Message.getFieldWithDefault(e,14,0),gaslimit:n.Message.getFieldWithDefault(e,15,0),gasused:n.Message.getFieldWithDefault(e,16,0),timestamp:n.Message.getFieldWithDefault(e,17,0),transactionsList:e.getTransactionsList_asB64(),unclesList:e.getUnclesList_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.EthBlockInfo.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EthBlockInfo;return proto.EthBlockInfo.deserializeBinaryFromReader(r,e)},proto.EthBlockInfo.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readInt64();t.setNumber(r);break;case 2:r=e.readBytes();t.setHash(r);break;case 3:r=e.readBytes();t.setParentHash(r);break;case 4:r=e.readBytes();t.setNonce(r);break;case 5:r=e.readBytes();t.setSha3Uncles(r);break;case 6:r=e.readBytes();t.setLogsBloom(r);break;case 7:r=e.readBytes();t.setTransactionsRoot(r);break;case 8:r=e.readBytes();t.setStateRoot(r);break;case 9:r=e.readBytes();t.setReceiptsRoot(r);break;case 10:r=e.readBytes();t.setMiner(r);break;case 11:r=e.readInt64();t.setDifficulty(r);break;case 12:r=e.readInt64();t.setTotalDifficulty(r);break;case 13:r=e.readBytes();t.setExtraData(r);break;case 14:r=e.readInt64();t.setSize(r);break;case 15:r=e.readInt64();t.setGaslimit(r);break;case 16:r=e.readInt64();t.setGasused(r);break;case 17:r=e.readInt64();t.setTimestamp(r);break;case 18:r=e.readBytes();t.addTransactions(r);break;case 19:r=e.readBytes();t.addUncles(r);break;default:e.skipField()}}return t},proto.EthBlockInfo.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EthBlockInfo.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EthBlockInfo.serializeBinaryToWriter=function(t,e){var r=void 0;0!==(r=t.getNumber())&&e.writeInt64(1,r),(r=t.getHash_asU8()).length>0&&e.writeBytes(2,r),(r=t.getParentHash_asU8()).length>0&&e.writeBytes(3,r),(r=t.getNonce_asU8()).length>0&&e.writeBytes(4,r),(r=t.getSha3Uncles_asU8()).length>0&&e.writeBytes(5,r),(r=t.getLogsBloom_asU8()).length>0&&e.writeBytes(6,r),(r=t.getTransactionsRoot_asU8()).length>0&&e.writeBytes(7,r),(r=t.getStateRoot_asU8()).length>0&&e.writeBytes(8,r),(r=t.getReceiptsRoot_asU8()).length>0&&e.writeBytes(9,r),(r=t.getMiner_asU8()).length>0&&e.writeBytes(10,r),0!==(r=t.getDifficulty())&&e.writeInt64(11,r),0!==(r=t.getTotalDifficulty())&&e.writeInt64(12,r),(r=t.getExtraData_asU8()).length>0&&e.writeBytes(13,r),0!==(r=t.getSize())&&e.writeInt64(14,r),0!==(r=t.getGaslimit())&&e.writeInt64(15,r),0!==(r=t.getGasused())&&e.writeInt64(16,r),0!==(r=t.getTimestamp())&&e.writeInt64(17,r),(r=t.getTransactionsList_asU8()).length>0&&e.writeRepeatedBytes(18,r),(r=t.getUnclesList_asU8()).length>0&&e.writeRepeatedBytes(19,r)},proto.EthBlockInfo.prototype.getNumber=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.EthBlockInfo.prototype.setNumber=function(t){n.Message.setProto3IntField(this,1,t)},proto.EthBlockInfo.prototype.getHash=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.EthBlockInfo.prototype.getHash_asB64=function(){return n.Message.bytesAsB64(this.getHash())},proto.EthBlockInfo.prototype.getHash_asU8=function(){return n.Message.bytesAsU8(this.getHash())},proto.EthBlockInfo.prototype.setHash=function(t){n.Message.setProto3BytesField(this,2,t)},proto.EthBlockInfo.prototype.getParentHash=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.EthBlockInfo.prototype.getParentHash_asB64=function(){return n.Message.bytesAsB64(this.getParentHash())},proto.EthBlockInfo.prototype.getParentHash_asU8=function(){return n.Message.bytesAsU8(this.getParentHash())},proto.EthBlockInfo.prototype.setParentHash=function(t){n.Message.setProto3BytesField(this,3,t)},proto.EthBlockInfo.prototype.getNonce=function(){return n.Message.getFieldWithDefault(this,4,"")},proto.EthBlockInfo.prototype.getNonce_asB64=function(){return n.Message.bytesAsB64(this.getNonce())},proto.EthBlockInfo.prototype.getNonce_asU8=function(){return n.Message.bytesAsU8(this.getNonce())},proto.EthBlockInfo.prototype.setNonce=function(t){n.Message.setProto3BytesField(this,4,t)},proto.EthBlockInfo.prototype.getSha3Uncles=function(){return n.Message.getFieldWithDefault(this,5,"")},proto.EthBlockInfo.prototype.getSha3Uncles_asB64=function(){return n.Message.bytesAsB64(this.getSha3Uncles())},proto.EthBlockInfo.prototype.getSha3Uncles_asU8=function(){return n.Message.bytesAsU8(this.getSha3Uncles())},proto.EthBlockInfo.prototype.setSha3Uncles=function(t){n.Message.setProto3BytesField(this,5,t)},proto.EthBlockInfo.prototype.getLogsBloom=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.EthBlockInfo.prototype.getLogsBloom_asB64=function(){return n.Message.bytesAsB64(this.getLogsBloom())},proto.EthBlockInfo.prototype.getLogsBloom_asU8=function(){return n.Message.bytesAsU8(this.getLogsBloom())},proto.EthBlockInfo.prototype.setLogsBloom=function(t){n.Message.setProto3BytesField(this,6,t)},proto.EthBlockInfo.prototype.getTransactionsRoot=function(){return n.Message.getFieldWithDefault(this,7,"")},proto.EthBlockInfo.prototype.getTransactionsRoot_asB64=function(){return n.Message.bytesAsB64(this.getTransactionsRoot())},proto.EthBlockInfo.prototype.getTransactionsRoot_asU8=function(){return n.Message.bytesAsU8(this.getTransactionsRoot())},proto.EthBlockInfo.prototype.setTransactionsRoot=function(t){n.Message.setProto3BytesField(this,7,t)},proto.EthBlockInfo.prototype.getStateRoot=function(){return n.Message.getFieldWithDefault(this,8,"")},proto.EthBlockInfo.prototype.getStateRoot_asB64=function(){return n.Message.bytesAsB64(this.getStateRoot())},proto.EthBlockInfo.prototype.getStateRoot_asU8=function(){return n.Message.bytesAsU8(this.getStateRoot())},proto.EthBlockInfo.prototype.setStateRoot=function(t){n.Message.setProto3BytesField(this,8,t)},proto.EthBlockInfo.prototype.getReceiptsRoot=function(){return n.Message.getFieldWithDefault(this,9,"")},proto.EthBlockInfo.prototype.getReceiptsRoot_asB64=function(){return n.Message.bytesAsB64(this.getReceiptsRoot())},proto.EthBlockInfo.prototype.getReceiptsRoot_asU8=function(){return n.Message.bytesAsU8(this.getReceiptsRoot())},proto.EthBlockInfo.prototype.setReceiptsRoot=function(t){n.Message.setProto3BytesField(this,9,t)},proto.EthBlockInfo.prototype.getMiner=function(){return n.Message.getFieldWithDefault(this,10,"")},proto.EthBlockInfo.prototype.getMiner_asB64=function(){return n.Message.bytesAsB64(this.getMiner())},proto.EthBlockInfo.prototype.getMiner_asU8=function(){return n.Message.bytesAsU8(this.getMiner())},proto.EthBlockInfo.prototype.setMiner=function(t){n.Message.setProto3BytesField(this,10,t)},proto.EthBlockInfo.prototype.getDifficulty=function(){return n.Message.getFieldWithDefault(this,11,0)},proto.EthBlockInfo.prototype.setDifficulty=function(t){n.Message.setProto3IntField(this,11,t)},proto.EthBlockInfo.prototype.getTotalDifficulty=function(){return n.Message.getFieldWithDefault(this,12,0)},proto.EthBlockInfo.prototype.setTotalDifficulty=function(t){n.Message.setProto3IntField(this,12,t)},proto.EthBlockInfo.prototype.getExtraData=function(){return n.Message.getFieldWithDefault(this,13,"")},proto.EthBlockInfo.prototype.getExtraData_asB64=function(){return n.Message.bytesAsB64(this.getExtraData())},proto.EthBlockInfo.prototype.getExtraData_asU8=function(){return n.Message.bytesAsU8(this.getExtraData())},proto.EthBlockInfo.prototype.setExtraData=function(t){n.Message.setProto3BytesField(this,13,t)},proto.EthBlockInfo.prototype.getSize=function(){return n.Message.getFieldWithDefault(this,14,0)},proto.EthBlockInfo.prototype.setSize=function(t){n.Message.setProto3IntField(this,14,t)},proto.EthBlockInfo.prototype.getGaslimit=function(){return n.Message.getFieldWithDefault(this,15,0)},proto.EthBlockInfo.prototype.setGaslimit=function(t){n.Message.setProto3IntField(this,15,t)},proto.EthBlockInfo.prototype.getGasused=function(){return n.Message.getFieldWithDefault(this,16,0)},proto.EthBlockInfo.prototype.setGasused=function(t){n.Message.setProto3IntField(this,16,t)},proto.EthBlockInfo.prototype.getTimestamp=function(){return n.Message.getFieldWithDefault(this,17,0)},proto.EthBlockInfo.prototype.setTimestamp=function(t){n.Message.setProto3IntField(this,17,t)},proto.EthBlockInfo.prototype.getTransactionsList=function(){return n.Message.getRepeatedField(this,18)},proto.EthBlockInfo.prototype.getTransactionsList_asB64=function(){return n.Message.bytesListAsB64(this.getTransactionsList())},proto.EthBlockInfo.prototype.getTransactionsList_asU8=function(){return n.Message.bytesListAsU8(this.getTransactionsList())},proto.EthBlockInfo.prototype.setTransactionsList=function(t){n.Message.setField(this,18,t||[])},proto.EthBlockInfo.prototype.addTransactions=function(t,e){n.Message.addToRepeatedField(this,18,t,e)},proto.EthBlockInfo.prototype.clearTransactionsList=function(){this.setTransactionsList([])},proto.EthBlockInfo.prototype.getUnclesList=function(){return n.Message.getRepeatedField(this,19)},proto.EthBlockInfo.prototype.getUnclesList_asB64=function(){return n.Message.bytesListAsB64(this.getUnclesList())},proto.EthBlockInfo.prototype.getUnclesList_asU8=function(){return n.Message.bytesListAsU8(this.getUnclesList())},proto.EthBlockInfo.prototype.setUnclesList=function(t){n.Message.setField(this,19,t||[])},proto.EthBlockInfo.prototype.addUncles=function(t,e){n.Message.addToRepeatedField(this,19,t,e)},proto.EthBlockInfo.prototype.clearUnclesList=function(){this.setUnclesList([])},proto.EthFilterLogList=function(t){n.Message.initialize(this,t,0,-1,proto.EthFilterLogList.repeatedFields_,null)},i.inherits(proto.EthFilterLogList,n.Message),i.DEBUG&&!COMPILED&&(proto.EthFilterLogList.displayName="proto.EthFilterLogList"),proto.EthFilterLogList.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.EthFilterLogList.prototype.toObject=function(t){return proto.EthFilterLogList.toObject(t,this)},proto.EthFilterLogList.toObject=function(t,e){var r={ethBlockLogsList:n.Message.toObjectList(e.getEthBlockLogsList(),proto.EthFilterLog.toObject,t)};return t&&(r.$jspbMessageInstance=e),r}),proto.EthFilterLogList.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EthFilterLogList;return proto.EthFilterLogList.deserializeBinaryFromReader(r,e)},proto.EthFilterLogList.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.EthFilterLog;e.readMessage(r,proto.EthFilterLog.deserializeBinaryFromReader),t.addEthBlockLogs(r);break;default:e.skipField()}}return t},proto.EthFilterLogList.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EthFilterLogList.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EthFilterLogList.serializeBinaryToWriter=function(t,e){var r;(r=t.getEthBlockLogsList()).length>0&&e.writeRepeatedMessage(1,r,proto.EthFilterLog.serializeBinaryToWriter)},proto.EthFilterLogList.prototype.getEthBlockLogsList=function(){return n.Message.getRepeatedWrapperField(this,proto.EthFilterLog,1)},proto.EthFilterLogList.prototype.setEthBlockLogsList=function(t){n.Message.setRepeatedWrapperField(this,1,t)},proto.EthFilterLogList.prototype.addEthBlockLogs=function(t,e){return n.Message.addToRepeatedWrapperField(this,1,t,proto.EthFilterLog,e)},proto.EthFilterLogList.prototype.clearEthBlockLogsList=function(){this.setEthBlockLogsList([])},proto.EthFilterLog=function(t){n.Message.initialize(this,t,0,-1,proto.EthFilterLog.repeatedFields_,null)},i.inherits(proto.EthFilterLog,n.Message),i.DEBUG&&!COMPILED&&(proto.EthFilterLog.displayName="proto.EthFilterLog"),proto.EthFilterLog.repeatedFields_=[9],n.Message.GENERATE_TO_OBJECT&&(proto.EthFilterLog.prototype.toObject=function(t){return proto.EthFilterLog.toObject(t,this)},proto.EthFilterLog.toObject=function(t,e){var r={removed:n.Message.getFieldWithDefault(e,1,!1),logIndex:n.Message.getFieldWithDefault(e,2,0),transactionIndex:n.Message.getFieldWithDefault(e,3,0),transactionHash:e.getTransactionHash_asB64(),blockHash:e.getBlockHash_asB64(),blockNumber:n.Message.getFieldWithDefault(e,6,0),address:e.getAddress_asB64(),data:e.getData_asB64(),topicsList:e.getTopicsList_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.EthFilterLog.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.EthFilterLog;return proto.EthFilterLog.deserializeBinaryFromReader(r,e)},proto.EthFilterLog.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBool();t.setRemoved(r);break;case 2:r=e.readInt64();t.setLogIndex(r);break;case 3:r=e.readInt32();t.setTransactionIndex(r);break;case 4:r=e.readBytes();t.setTransactionHash(r);break;case 5:r=e.readBytes();t.setBlockHash(r);break;case 6:r=e.readInt64();t.setBlockNumber(r);break;case 7:r=e.readBytes();t.setAddress(r);break;case 8:r=e.readBytes();t.setData(r);break;case 9:r=e.readBytes();t.addTopics(r);break;default:e.skipField()}}return t},proto.EthFilterLog.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.EthFilterLog.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.EthFilterLog.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getRemoved())&&e.writeBool(1,r),0!==(r=t.getLogIndex())&&e.writeInt64(2,r),0!==(r=t.getTransactionIndex())&&e.writeInt32(3,r),(r=t.getTransactionHash_asU8()).length>0&&e.writeBytes(4,r),(r=t.getBlockHash_asU8()).length>0&&e.writeBytes(5,r),0!==(r=t.getBlockNumber())&&e.writeInt64(6,r),(r=t.getAddress_asU8()).length>0&&e.writeBytes(7,r),(r=t.getData_asU8()).length>0&&e.writeBytes(8,r),(r=t.getTopicsList_asU8()).length>0&&e.writeRepeatedBytes(9,r)},proto.EthFilterLog.prototype.getRemoved=function(){return n.Message.getFieldWithDefault(this,1,!1)},proto.EthFilterLog.prototype.setRemoved=function(t){n.Message.setProto3BooleanField(this,1,t)},proto.EthFilterLog.prototype.getLogIndex=function(){return n.Message.getFieldWithDefault(this,2,0)},proto.EthFilterLog.prototype.setLogIndex=function(t){n.Message.setProto3IntField(this,2,t)},proto.EthFilterLog.prototype.getTransactionIndex=function(){return n.Message.getFieldWithDefault(this,3,0)},proto.EthFilterLog.prototype.setTransactionIndex=function(t){n.Message.setProto3IntField(this,3,t)},proto.EthFilterLog.prototype.getTransactionHash=function(){return n.Message.getFieldWithDefault(this,4,"")},proto.EthFilterLog.prototype.getTransactionHash_asB64=function(){return n.Message.bytesAsB64(this.getTransactionHash())},proto.EthFilterLog.prototype.getTransactionHash_asU8=function(){return n.Message.bytesAsU8(this.getTransactionHash())},proto.EthFilterLog.prototype.setTransactionHash=function(t){n.Message.setProto3BytesField(this,4,t)},proto.EthFilterLog.prototype.getBlockHash=function(){return n.Message.getFieldWithDefault(this,5,"")},proto.EthFilterLog.prototype.getBlockHash_asB64=function(){return n.Message.bytesAsB64(this.getBlockHash())},proto.EthFilterLog.prototype.getBlockHash_asU8=function(){return n.Message.bytesAsU8(this.getBlockHash())},proto.EthFilterLog.prototype.setBlockHash=function(t){n.Message.setProto3BytesField(this,5,t)},proto.EthFilterLog.prototype.getBlockNumber=function(){return n.Message.getFieldWithDefault(this,6,0)},proto.EthFilterLog.prototype.setBlockNumber=function(t){n.Message.setProto3IntField(this,6,t)},proto.EthFilterLog.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,7,"")},proto.EthFilterLog.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},proto.EthFilterLog.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},proto.EthFilterLog.prototype.setAddress=function(t){n.Message.setProto3BytesField(this,7,t)},proto.EthFilterLog.prototype.getData=function(){return n.Message.getFieldWithDefault(this,8,"")},proto.EthFilterLog.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},proto.EthFilterLog.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},proto.EthFilterLog.prototype.setData=function(t){n.Message.setProto3BytesField(this,8,t)},proto.EthFilterLog.prototype.getTopicsList=function(){return n.Message.getRepeatedField(this,9)},proto.EthFilterLog.prototype.getTopicsList_asB64=function(){return n.Message.bytesListAsB64(this.getTopicsList())},proto.EthFilterLog.prototype.getTopicsList_asU8=function(){return n.Message.bytesListAsU8(this.getTopicsList())},proto.EthFilterLog.prototype.setTopicsList=function(t){n.Message.setField(this,9,t||[])},proto.EthFilterLog.prototype.addTopics=function(t,e){n.Message.addToRepeatedField(this,9,t,e)},proto.EthFilterLog.prototype.clearTopicsList=function(){this.setTopicsList([])},i.object.extend(e,proto)},function(t,e){var r=1e3,n=60*r,i=60*n,o=24*i,s=365.25*o;function a(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}t.exports=function(t,e){e=e||{};var u,c=typeof t;if("string"===c&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===c&&!1===isNaN(t))return e.long?a(u=t,o,"day")||a(u,i,"hour")||a(u,n,"minute")||a(u,r,"second")||u+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=n)return Math.round(t/n)+"m";if(t>=r)return Math.round(t/r)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){"use strict";var n=r(16),i=r(11),o=r(34),s=r(32),a=r(15)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:n[t];s&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(33),i=r(25),o=r(134);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,r){var n,i,o,s=r(44),a=r(598),u=r(262),c=r(149),l=r(16),h=l.process,f=l.setImmediate,p=l.clearImmediate,d=l.MessageChannel,g=l.Dispatch,y=0,m={},b=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},v=function(t){b.call(t.data)};f&&p||(f=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return m[++y]=function(){a("function"==typeof t?t:Function(t),e)},n(y),y},p=function(t){delete m[t]},"process"==r(73)(h)?n=function(t){h.nextTick(s(b,t,1))}:g&&g.now?n=function(t){g.now(s(b,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=v,n=s(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(n=function(t){l.postMessage(t+"","*")},l.addEventListener("message",v,!1)):n="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(s(b,t,1),0)}),t.exports={set:f,clear:p}},function(t,e,r){var n=r(33),i=r(76),o=r(15)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||void 0==(r=n(s)[o])?e:i(r)}},function(t,e,r){var n=r(96),i=r(100),o=r(59),s=r(148),a=r(52),u=r(265),c=Object.getOwnPropertyDescriptor;e.f=r(32)?c:function(t,e){if(t=o(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return i(!n.f.call(t,e),t[e])}},function(t,e,r){var n=r(263),i=r(143).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},function(t,e,r){var n=r(73);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){"use strict";var n=r(16),i=r(52),o=r(32),s=r(19),a=r(264),u=r(140).KEY,c=r(53),l=r(144),h=r(72),f=r(98),p=r(15),d=r(141),g=r(139),y=r(607),m=r(259),b=r(33),v=r(25),w=r(59),_=r(148),M=r(100),E=r(99),A=r(606),B=r(257),T=r(34),R=r(74),x=B.f,S=T.f,k=A.f,C=n.Symbol,I=n.JSON,j=I&&I.stringify,F=p("_hidden"),O=p("toPrimitive"),P={}.propertyIsEnumerable,L=l("symbol-registry"),N=l("symbols"),D=l("op-symbols"),U=Object.prototype,W="function"==typeof C,q=n.QObject,z=!q||!q.prototype||!q.prototype.findChild,G=o&&c(function(){return 7!=E(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=x(U,e);n&&delete U[e],S(t,e,r),n&&t!==U&&S(U,e,n)}:S,H=function(t){var e=N[t]=E(C.prototype);return e._k=t,e},V=W&&"symbol"==typeof C.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof C},K=function(t,e,r){return t===U&&K(D,e,r),b(t),e=_(e,!0),b(r),i(N,e)?(r.enumerable?(i(t,F)&&t[F][e]&&(t[F][e]=!1),r=E(r,{enumerable:M(0,!1)})):(i(t,F)||S(t,F,M(1,{})),t[F][e]=!0),G(t,e,r)):S(t,e,r)},$=function(t,e){b(t);for(var r,n=y(e=w(e)),i=0,o=n.length;o>i;)K(t,r=n[i++],e[r]);return t},Y=function(t){var e=P.call(this,t=_(t,!0));return!(this===U&&i(N,t)&&!i(D,t))&&(!(e||!i(this,t)||!i(N,t)||i(this,F)&&this[F][t])||e)},Z=function(t,e){if(t=w(t),e=_(e,!0),t!==U||!i(N,e)||i(D,e)){var r=x(t,e);return!r||!i(N,e)||i(t,F)&&t[F][e]||(r.enumerable=!0),r}},J=function(t){for(var e,r=k(w(t)),n=[],o=0;r.length>o;)i(N,e=r[o++])||e==F||e==u||n.push(e);return n},X=function(t){for(var e,r=t===U,n=k(r?D:w(t)),o=[],s=0;n.length>s;)!i(N,e=n[s++])||r&&!i(U,e)||o.push(N[e]);return o};W||(a((C=function(){if(this instanceof C)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(r){this===U&&e.call(D,r),i(this,F)&&i(this[F],t)&&(this[F][t]=!1),G(this,t,M(1,r))};return o&&z&&G(U,t,{configurable:!0,set:e}),H(t)}).prototype,"toString",function(){return this._k}),B.f=Z,T.f=K,r(258).f=A.f=J,r(96).f=Y,r(138).f=X,o&&!r(101)&&a(U,"propertyIsEnumerable",Y,!0),d.f=function(t){return H(p(t))}),s(s.G+s.W+s.F*!W,{Symbol:C});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(var et=R(p.store),rt=0;et.length>rt;)g(et[rt++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return i(L,t+="")?L[t]:L[t]=C(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(){z=!0},useSimple:function(){z=!1}}),s(s.S+s.F*!W,"Object",{create:function(t,e){return void 0===e?E(t):$(E(t),e)},defineProperty:K,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:X}),I&&s(s.S+s.F*(!W||c(function(){var t=C();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))})),"JSON",{stringify:function(t){for(var e,r,n=[t],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=e=n[1],(v(e)||void 0!==t)&&!V(t))return m(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!V(e))return e}),n[1]=e,j.apply(I,n)}}),C.prototype[O]||r(43)(C.prototype,O,C.prototype.valueOf),h(C,"Symbol"),h(Math,"Math",!0),h(n.JSON,"JSON",!0)},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,r){var n=r(16).document;t.exports=n&&n.documentElement},function(t,e,r){var n=r(52),i=r(59),o=r(613)(!1),s=r(145)("IE_PROTO");t.exports=function(t,e){var r,a=i(t),u=0,c=[];for(r in a)r!=s&&n(a,r)&&c.push(r);for(;e.length>u;)n(a,r=e[u++])&&(~o(c,r)||c.push(r));return c}},function(t,e,r){t.exports=r(43)},function(t,e,r){t.exports=!r(32)&&!r(53)(function(){return 7!=Object.defineProperty(r(149)("div"),"a",{get:function(){return 7}}).a})},function(t,e,r){t.exports=r(618)},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(19),i=r(11),o=r(53);t.exports=function(t,e){var r=(i.Object||{})[t]||Object[t],s={};s[t]=e(r),n(n.S+n.F*o(function(){r(1)}),"Object",s)}},function(t,e,r){var n=r(97),i=r(74);r(268)("keys",function(){return function(t){return i(n(t))}})},function(t,e,r){r(269),t.exports=r(11).Object.keys},function(t,e,r){t.exports=r(270)},function(t,e,r){"use strict";(function(t){var n=r(4)(r(271)),i=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=i(r(3)),s=new(i(r(199)).default);function a(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(t=s.utils).soliditySha3.apply(t,e)}function u(t){return s.utils.toBN(t)}var c=function(){function e(t,e){this.depth=t,this.leaves=e;var r=this._createDefaultNodes(t);e&&0!==(0,n.default)(e).length?(this.tree=this._createTree(this.leaves,this.depth,r),this.root=this.tree[this.depth][0]):(this.tree=[],this.root=r[this.depth])}return e.prototype._createDefaultNodes=function(t){var e=new Array(t+1);e[0]=a(0);for(var r=1;r<t+1;r++)e[r]=a(e[r-1],e[r-1]);return e},e.prototype._createTree=function(t,e,r){for(var n,i,s=[t],c=t,l={},h=0;h<e;h++){for(var f in l={},c)if(n=u(f).div(new o.default(2)).toString(),i=c[f],u(f).mod(new o.default(2)).isZero()){var p=u(f).add(new o.default(1)).toString();l[n]=a(i,c[p]||r[h])}else{void 0===c[p=u(f).sub(new o.default(1)).toString()]&&(l[n]=a(r[h],i))}c=l,s.push(c)}return s},e.prototype.createMerkleProof=function(e){for(var r=u(e),n="",i=new o.default(0),s=0;s<this.depth;s++){var a=r.mod(new o.default(2)).eq(new o.default(0))?r.add(new o.default(1)):r.sub(new o.default(1));r=r.div(new o.default(2));var c=this.tree[s][a.toString()];c&&(n+=c.replace("0x",""),i=i.bincn(s))}var l=i.toBuffer("be",8);return"0x"+t.concat([l,t.from(n,"hex")]).toString("hex")},e}();e.SparseMerkleTree=c}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=r(4),i=n(r(7)),o=n(r(6)),s=n(r(5)),a=function(t,e,r,n){return new(r||(r=s.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},u=function(t,e){var r,n,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof o.default&&(a[i.default]=function(){return this}),a;function c(i){return function(o){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(s=(s=u.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){u.label=i[1];break}if(6===i[0]&&u.label<s[1]){u.label=s[1],s=i;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(i);break}s[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},c=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=c(r(3)),h=r(77),f=r(85),p=function(){function t(t,e){this._web3=t,this._ethAccount=e.ethAccount,this._ethPlasmaClient=e.ethPlasmaClient,this._dAppPlasmaClient=e.dAppPlasmaClient,this._defaultGas=e.defaultGas,this._childBlockInterval=e.childBlockInterval}return Object.defineProperty(t.prototype,"ethAddress",{get:function(){return this._ethAccount.address},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"plasmaCashContract",{get:function(){return this._ethPlasmaClient.plasmaCashContract},enumerable:!0,configurable:!0}),t.prototype.transferTokenAsync=function(t){return a(this,void 0,void 0,function(){var e,r,n,i,o;return u(this,function(s){switch(s.label){case 0:return e=t.slot,r=t.prevBlockNum,n=t.denomination,i=t.newOwner,[4,(o=new h.PlasmaCashTx({slot:e,prevBlockNum:r,denomination:n,newOwner:i.ethAddress,prevOwner:this.ethAddress})).signAsync(new f.Web3Signer(this._web3,this.ethAddress))];case 1:return s.sent(),[4,this._dAppPlasmaClient.sendTxAsync(o)];case 2:return s.sent(),[2]}})})},t.prototype.getPlasmaCoinAsync=function(t){return this._ethPlasmaClient.getPlasmaCoinAsync({slot:t,from:this.ethAddress})},t.prototype.submitPlasmaBlockAsync=function(){return a(this,void 0,void 0,function(){var t,e;return u(this,function(r){switch(r.label){case 0:return[4,this._dAppPlasmaClient.debugFinalizeBlockAsync()];case 1:return r.sent(),[4,this._dAppPlasmaClient.getCurrentPlasmaBlockNumAsync()];case 2:return t=r.sent(),[4,this._dAppPlasmaClient.getPlasmaBlockAtAsync(t)];case 3:return e=r.sent(),[4,this._ethPlasmaClient.debugSubmitBlockAsync({block:e,from:this.ethAddress})];case 4:return r.sent(),[2,t]}})})},t.prototype.submitPlasmaDepositAsync=function(t){return this._dAppPlasmaClient.debugSubmitDepositAsync(t)},t.prototype.startExitAsync=function(t){return a(this,void 0,void 0,function(){var e,r,n,i,o,s,a,c;return u(this,function(u){switch(u.label){case 0:return e=t.slot,r=t.prevBlockNum,0===(n=t.exitBlockNum).modn(this._childBlockInterval)?[3,2]:[4,(i=new h.PlasmaCashTx({slot:e,prevBlockNum:new l.default(0),denomination:1,newOwner:this.ethAddress})).signAsync(new f.Web3Signer(this._web3,this.ethAddress))];case 1:return u.sent(),[2,this._ethPlasmaClient.startExitAsync({slot:e,exitTx:i,exitBlockNum:n,from:this.ethAddress,gas:this._defaultGas})];case 2:return[4,this._dAppPlasmaClient.getPlasmaBlockAtAsync(n)];case 3:if(o=u.sent(),!(s=o.findTxWithSlot(e)))throw new Error("Invalid exit block: missing tx for slot "+e.toString(10)+".");return[4,this._dAppPlasmaClient.getPlasmaBlockAtAsync(r)];case 4:if(a=u.sent(),!(c=a.findTxWithSlot(e)))throw new Error("Invalid prev block: missing tx for slot "+e.toString(10)+".");return[2,this._ethPlasmaClient.startExitAsync({slot:e,prevTx:c,exitTx:s,prevBlockNum:r,exitBlockNum:n,from:this.ethAddress,gas:this._defaultGas})]}})})},t.prototype.finalizeExitsAsync=function(){return this._ethPlasmaClient.finalizeExitsAsync({from:this.ethAddress,gas:this._defaultGas})},t.prototype.withdrawAsync=function(t){return this._ethPlasmaClient.withdrawAsync({slot:t,from:this.ethAddress,gas:this._defaultGas})},t.prototype.withdrawBondsAsync=function(){return this._ethPlasmaClient.withdrawBondsAsync({from:this.ethAddress,gas:this._defaultGas})},t.prototype.challengeAfterAsync=function(t){return a(this,void 0,void 0,function(){var e,r,n,i;return u(this,function(o){switch(o.label){case 0:return e=t.slot,r=t.challengingBlockNum,[4,this._dAppPlasmaClient.getPlasmaBlockAtAsync(r)];case 1:if(n=o.sent(),!(i=n.findTxWithSlot(e)))throw new Error("Invalid challenging block: missing tx for slot "+e.toString(10)+".");return[2,this._ethPlasmaClient.challengeAfterAsync({slot:e,challengingBlockNum:r,challengingTx:i,from:this.ethAddress,gas:this._defaultGas})]}})})},t.prototype.challengeBetweenAsync=function(t){return a(this,void 0,void 0,function(){var e,r,n,i;return u(this,function(o){switch(o.label){case 0:return e=t.slot,r=t.challengingBlockNum,[4,this._dAppPlasmaClient.getPlasmaBlockAtAsync(r)];case 1:if(n=o.sent(),!(i=n.findTxWithSlot(e)))throw new Error("Invalid challenging block: missing tx for slot "+e.toString(10)+".");return[2,this._ethPlasmaClient.challengeBetweenAsync({slot:e,challengingBlockNum:r,challengingTx:i,from:this.ethAddress,gas:this._defaultGas})]}})})},t.prototype.challengeBeforeAsync=function(t){return a(this,void 0,void 0,function(){var e,r,n,i,o,s,a,c;return u(this,function(u){switch(u.label){case 0:return e=t.slot,r=t.prevBlockNum,0===(n=t.challengingBlockNum).modn(this._childBlockInterval)?[3,2]:[4,(i=new h.PlasmaCashTx({slot:e,prevBlockNum:new l.default(0),denomination:1,newOwner:this.ethAddress})).signAsync(new f.Web3Signer(this._web3,this.ethAddress))];case 1:return u.sent(),[2,this._ethPlasmaClient.challengeBeforeAsync({slot:e,challengingTx:i,challengingBlockNum:n,from:this.ethAddress,gas:this._defaultGas})];case 2:return[4,this._dAppPlasmaClient.getPlasmaBlockAtAsync(n)];case 3:if(o=u.sent(),!(s=o.findTxWithSlot(e)))throw new Error("Invalid exit block: missing tx for slot "+e.toString(10)+".");return[4,this._dAppPlasmaClient.getPlasmaBlockAtAsync(r)];case 4:if(a=u.sent(),!(c=a.findTxWithSlot(e)))throw new Error("Invalid prev block: missing tx for slot "+e.toString(10)+".");return[2,this._ethPlasmaClient.challengeBeforeAsync({slot:e,prevTx:c,challengingTx:s,prevBlockNum:r,challengingBlockNum:n,from:this.ethAddress,gas:this._defaultGas})]}})})},t.prototype.respondChallengeBeforeAsync=function(t){return a(this,void 0,void 0,function(){var e,r,n,i,o;return u(this,function(s){switch(s.label){case 0:return e=t.slot,r=t.challengingTxHash,n=t.respondingBlockNum,[4,this._dAppPlasmaClient.getPlasmaBlockAtAsync(n)];case 1:if(i=s.sent(),!(o=i.findTxWithSlot(e)))throw new Error("Invalid responding block: missing tx for slot "+e.toString(10)+".");return[2,this._ethPlasmaClient.respondChallengeBeforeAsync({slot:e,challengingTxHash:r,respondingBlockNum:n,respondingTx:o,from:this.ethAddress,gas:this._defaultGas})]}})})},t}();e.Entity=p},function(t,e,r){"use strict";var n=r(4),i=n(r(7)),o=n(r(6)),s=n(r(5)),a=function(t,e,r,n){return new(r||(r=s.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},u=function(t,e){var r,n,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof o.default&&(a[i.default]=function(){return this}),a;function c(i){return function(o){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(s=(s=u.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){u.label=i[1];break}if(6===i[0]&&u.label<s[1]){u.label=s[1],s=i;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(i);break}s[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},c=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=c(r(3)),h=function(){function t(t){this.contract=t}return t.prototype.balanceOfAsync=function(t){return a(this,void 0,void 0,function(){var e;return u(this,function(r){switch(r.label){case 0:return[4,this.contract.methods.balanceOf(t).call()];case 1:return e=r.sent(),[2,new l.default(e)]}})})},t}();e.EthErc721Contract=h},function(t){t.exports=[{constant:!0,inputs:[{name:"",type:"address"}],name:"balances",outputs:[{name:"bonded",type:"uint256"},{name:"withdrawable",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"childBlockInterval",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"numCoins",outputs:[{name:"",type:"uint64"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"exitSlots",outputs:[{name:"",type:"uint64"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"currentBlock",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"childChain",outputs:[{name:"root",type:"bytes32"},{name:"createdAt",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_vmc",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"slot",type:"uint64"},{indexed:!1,name:"blockNumber",type:"uint256"},{indexed:!1,name:"denomination",type:"uint256"},{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"contractAddress",type:"address"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"blockNumber",type:"uint256"},{indexed:!1,name:"root",type:"bytes32"},{indexed:!1,name:"timestamp",type:"uint256"}],name:"SubmittedBlock",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"slot",type:"uint64"},{indexed:!0,name:"owner",type:"address"}],name:"StartedExit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"slot",type:"uint64"},{indexed:!1,name:"txHash",type:"bytes32"}],name:"ChallengedExit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"slot",type:"uint64"}],name:"RespondedExitChallenge",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"slot",type:"uint64"},{indexed:!1,name:"owner",type:"address"}],name:"FinalizedExit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"FreedBond",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"SlashedBond",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"WithdrewBonds",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!1,name:"mode",type:"uint8"},{indexed:!1,name:"contractAddress",type:"address"},{indexed:!1,name:"uid",type:"uint256"},{indexed:!1,name:"denomination",type:"uint256"}],name:"Withdrew",type:"event"},{constant:!1,inputs:[{name:"root",type:"bytes32"}],name:"submitBlock",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"slot",type:"uint64"},{name:"prevTxBytes",type:"bytes"},{name:"exitingTxBytes",type:"bytes"},{name:"prevTxInclusionProof",type:"bytes"},{name:"exitingTxInclusionProof",type:"bytes"},{name:"signature",type:"bytes"},{name:"blocks",type:"uint256[2]"}],name:"startExit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"slot",type:"uint64"}],name:"finalizeExit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"finalizeExits",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"slot",type:"uint64"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"slot",type:"uint64"},{name:"prevTxBytes",type:"bytes"},{name:"txBytes",type:"bytes"},{name:"prevTxInclusionProof",type:"bytes"},{name:"txInclusionProof",type:"bytes"},{name:"signature",type:"bytes"},{name:"blocks",type:"uint256[2]"}],name:"challengeBefore",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"slot",type:"uint64"},{name:"challengingTxHash",type:"bytes32"},{name:"respondingBlockNumber",type:"uint256"},{name:"respondingTransaction",type:"bytes"},{name:"proof",type:"bytes"},{name:"signature",type:"bytes"}],name:"respondChallengeBefore",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"slot",type:"uint64"},{name:"challengingBlockNumber",type:"uint256"},{name:"challengingTransaction",type:"bytes"},{name:"proof",type:"bytes"},{name:"signature",type:"bytes"}],name:"challengeBetween",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"slot",type:"uint64"},{name:"challengingBlockNumber",type:"uint256"},{name:"challengingTransaction",type:"bytes"},{name:"proof",type:"bytes"},{name:"signature",type:"bytes"}],name:"challengeAfter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"withdrawBonds",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_amount",type:"uint256"},{name:"",type:"bytes"}],name:"onERC20Received",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_uid",type:"uint256"},{name:"",type:"bytes"}],name:"onERC721Received",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"txHash",type:"bytes32"},{name:"root",type:"bytes32"},{name:"slot",type:"uint64"},{name:"proof",type:"bytes"}],name:"checkMembership",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"slot",type:"uint64"}],name:"getPlasmaCoin",outputs:[{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"address"},{name:"",type:"uint8"},{name:"",type:"uint8"},{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"slot",type:"uint64"}],name:"getExit",outputs:[{name:"",type:"address"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"blockNumber",type:"uint256"}],name:"getBlockRoot",outputs:[{name:"root",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"}]},function(t,e,r){"use strict";var n=r(4),i=n(r(161)),o=n(r(7)),s=n(r(6)),a=n(r(5)),u=function(t,e,r,n){return new(r||(r=a.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},c=function(t,e){var r,n,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof s.default&&(a[o.default]=function(){return this}),a;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},l=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof i.default){var o=0;for(n=(0,i.default)(t);o<n.length;o++)e.indexOf(n[o])<0&&(r[n[o]]=t[n[o]])}return r},h=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var f=h(r(3)),p=r(23);!function(t){t[t.Deposited=0]="Deposited",t[t.Exiting=1]="Exiting",t[t.Challenged=2]="Challenged",t[t.Exited=3]="Exited"}(e.PlasmaCoinState||(e.PlasmaCoinState={})),e.marshalChallengeEvent=function(t){var e=t.slot,r=t.txHash;return{slot:new f.default(e),txHash:r}},e.marshalDepositEvent=function(t){var e=t.slot,r=t.blockNumber,n=t.denomination,i=t.from,o=t.contractAddress;return{slot:new f.default(e),blockNumber:new f.default(r),denomination:new f.default(n),from:i,contractAddress:o}};var d=function(){function t(t,e){this._web3=t;var n=r(275);this._plasmaContract=new this._web3.eth.Contract(n,e)}return Object.defineProperty(t.prototype,"plasmaCashContract",{get:function(){return this._plasmaContract},enumerable:!0,configurable:!0}),t.prototype.getPlasmaCoinAsync=function(t){return u(this,void 0,void 0,function(){var e,r,n;return c(this,function(i){switch(i.label){case 0:return e=t.slot,r=t.from,[4,this._plasmaContract.methods.getPlasmaCoin(e).call({from:r})];case 1:return n=i.sent(),[2,{uid:new f.default(n[0]),depositBlockNum:new f.default(n[1]),denomination:new f.default(n[2]),owner:n[3],contractAddress:n[4],state:parseInt(n[5],10)}]}})})},t.prototype.startExitAsync=function(t){var e=t.slot,r=t.exitTx,n=t.exitBlockNum,i=t.prevTx,o=t.prevBlockNum,s=t.from,a=t.gas,u=t.gasPrice,c=i?i.rlpEncode():"0x",l=r.rlpEncode(),h=this._web3.utils.toWei("0.1","ether");return this._plasmaContract.methods.startExit(e,c,l,i?i.proof:"0x",r.proof,r.sig,[o||0,n]).send({from:s,value:h,gas:a,gasPrice:u})},t.prototype.finalizeExitsAsync=function(t){return this._plasmaContract.methods.finalizeExits().send(t)},t.prototype.withdrawAsync=function(t){var e=t.slot,r=l(t,["slot"]);return this._plasmaContract.methods.withdraw(e).send(r)},t.prototype.withdrawBondsAsync=function(t){return this._plasmaContract.methods.withdrawBonds().send(t)},t.prototype.challengeAfterAsync=function(t){var e=t.slot,r=t.challengingBlockNum,n=t.challengingTx,i=l(t,["slot","challengingBlockNum","challengingTx"]),o=n.rlpEncode();return this._plasmaContract.methods.challengeAfter(e,r,o,n.proof,n.sig).send(i)},t.prototype.challengeBetweenAsync=function(t){var e=t.slot,r=t.challengingBlockNum,n=t.challengingTx,i=l(t,["slot","challengingBlockNum","challengingTx"]),o=n.rlpEncode();return this._plasmaContract.methods.challengeBetween(e,r,o,n.proof,n.sig).send(i)},t.prototype.challengeBeforeAsync=function(t){var e=t.slot,r=t.challengingTx,n=t.challengingBlockNum,i=t.prevTx,o=t.prevBlockNum,s=t.from,a=t.gas,u=t.gasPrice,c=i?i.rlpEncode():"0x",l=r.rlpEncode(),h=this._web3.utils.toWei("0.1","ether");return this._plasmaContract.methods.challengeBefore(e,c,l,i?i.proof:"0x",r.proof,r.sig,[o||0,n]).send({from:s,value:h,gas:a,gasPrice:u})},t.prototype.respondChallengeBeforeAsync=function(t){var e=t.slot,r=t.challengingTxHash,n=t.respondingBlockNum,i=t.respondingTx,o=l(t,["slot","challengingTxHash","respondingBlockNum","respondingTx"]),s=i.rlpEncode();return this._plasmaContract.methods.respondChallengeBefore(e,r,n,s,i.proof,i.sig).send(o)},t.prototype.debugSubmitBlockAsync=function(t){var e=t.block,r=t.from;return this._plasmaContract.methods.submitBlock(p.bytesToHexAddr(e.merkleHash)).send({from:r})},t}();e.EthereumPlasmaClient=d},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(77),i=function(){function t(t){var e=t.txs,r=t.merkleHash;this._txs=e,this.merkleHash=r}return Object.defineProperty(t.prototype,"txs",{get:function(){return this._txs},enumerable:!0,configurable:!0}),t.prototype.findTxWithSlot=function(t){for(var e=0;e<this._txs.length;e++)if(0===this._txs[e].slot.cmp(t))return this._txs[e];return null},t}();e.PlasmaCashBlock=i,e.unmarshalPlasmaBlockPB=function(t){var e=t.getTransactionsList().map(function(t){return n.unmarshalPlasmaTxPB(t)});return new i({txs:e,merkleHash:t.getMerkleHash_asU8()})}},function(t,e,r){"use strict";var n=r(4),i=n(r(7)),o=n(r(6)),s=n(r(5)),a=function(t,e,r,n){return new(r||(r=s.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},u=function(t,e){var r,n,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof o.default&&(a[i.default]=function(){return this}),a;function c(i){return function(o){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(s=(s=u.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){u.label=i[1];break}if(6===i[0]&&u.label<s[1]){u.label=s[1],s=i;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(i);break}s[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var c=r(56),l=r(40),h=r(77),f=r(277),p=r(64),d=r(154),g=function(){function t(t){var e=t.dAppClient,r=t.callerAddress,n=t.contractName,i=void 0===n?"plasmacash":n;this._dAppClient=e,this._callerAddress=r,this._plasmaContractName=i}return t.prototype._resolvePlasmaContractAsync=function(){return a(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return this._plasmaContract?[3,2]:[4,this._dAppClient.getContractAddressAsync(this._plasmaContractName)];case 1:if(!(t=e.sent()))throw new Error("Failed to resolve Plasma Cash contract address.");this._plasmaContract=new c.Contract({contractAddr:t,contractName:this._plasmaContractName,callerAddr:this._callerAddress,client:this._dAppClient}),e.label=2;case 2:return[2,this._plasmaContract]}})})},t.prototype.getCurrentPlasmaBlockNumAsync=function(){return a(this,void 0,void 0,function(){var t,e,r,n;return u(this,function(i){switch(i.label){case 0:return[4,this._resolvePlasmaContractAsync()];case 1:return t=i.sent(),e=new d.GetCurrentBlockRequest,[4,t.staticCallAsync("GetCurrentBlockRequest",e,new d.GetCurrentBlockResponse)];case 2:if(r=i.sent(),!(n=r.getBlockHeight()))throw new Error("Invalid response: missing block height.");return[2,p.unmarshalBigUIntPB(n)]}})})},t.prototype.getPlasmaBlockAtAsync=function(t){return a(this,void 0,void 0,function(){var e,r,n;return u(this,function(i){switch(i.label){case 0:return[4,this._resolvePlasmaContractAsync()];case 1:return e=i.sent(),(r=new d.GetBlockRequest).setBlockHeight(p.marshalBigUIntPB(t)),[4,e.staticCallAsync("GetBlockRequest",r,new d.GetBlockResponse)];case 2:return n=i.sent(),[2,f.unmarshalPlasmaBlockPB(n.getBlock())]}})})},t.prototype.sendTxAsync=function(t){return a(this,void 0,void 0,function(){var e,r;return u(this,function(n){switch(n.label){case 0:if(!t.sig)throw new Error("PlasmaCashTx must be signed before being sent to DAppChain");return[4,this._resolvePlasmaContractAsync()];case 1:return e=n.sent(),(r=new d.PlasmaTxRequest).setPlasmatx(h.marshalPlasmaTxPB(t)),[4,e.callAsync("PlasmaTxRequest",r)];case 2:return n.sent(),[2]}})})},t.prototype.debugFinalizeBlockAsync=function(){return a(this,void 0,void 0,function(){var t,e;return u(this,function(r){switch(r.label){case 0:return[4,this._resolvePlasmaContractAsync()];case 1:return t=r.sent(),e=new d.SubmitBlockToMainnetRequest,[4,t.callAsync("SubmitBlockToMainnet",e)];case 2:return r.sent(),[2]}})})},t.prototype.debugSubmitDepositAsync=function(t){return a(this,void 0,void 0,function(){var e,r,n,i;return u(this,function(o){switch(o.label){case 0:return[4,this._resolvePlasmaContractAsync()];case 1:return e=o.sent(),r=new l.Address("eth",l.LocalAddress.fromHexString(t.from)),n=new l.Address("eth",l.LocalAddress.fromHexString(t.contractAddress)),(i=new d.DepositRequest).setSlot(t.slot.toString(10)),i.setDepositBlock(p.marshalBigUIntPB(t.blockNumber)),i.setDenomination(p.marshalBigUIntPB(t.denomination)),i.setFrom(r.MarshalPB()),i.setContract(n.MarshalPB()),[4,e.callAsync("DepositRequest",i)];case 2:return o.sent(),[2]}})})},t}();e.DAppChainPlasmaClient=g},function(t,e,r){"use strict";var n,i=r(4),o=i(r(29)),s=i(r(28)),a=(n=s.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,o.default)(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var u=r(86),c=r(129),l=r(160),h=function(t){function e(e){var r=t.call(this,e.wsUrl,e)||this,n=e.protocol,i=void 0===n?u.JSONRPCProtocol.HTTP:n,o=e.requestTimeout,s=e.generateRequestId,a=void 0===s?r._getNextRequestId:s;return r._http=new l.HTTPRPCClient(e.httpUrl,{requestTimeout:o,generateRequestId:a}),r._protocol=i,r}return a(e,t),e.prototype.sendAsync=function(t,e){return this._protocol===u.JSONRPCProtocol.HTTP?this._http.sendAsync(t,e):this.sendAsync(t,e)},e}(c.WSRPCClient);e.DualRPCClient=h},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";var n=r(155);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,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):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";var n=r(20);t.exports=function(t,e,r){return n.forEach(r,function(r){t=r(t,e)}),t}},function(t,e,r){"use strict";var n=r(20),i=r(284),o=r(156),s=r(103),a=r(283),u=r(282);function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.baseURL&&!a(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||s.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(20);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(20);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.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="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),s="",a=0,u=n;o.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&e>>8-a%1*8)){if((r=o.charCodeAt(a+=.75))>255)throw new i;e=e<<8|r}return s}},function(t,e,r){"use strict";var n=r(20);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=r(20),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,s={};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(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([r]):s[e]?s[e]+", "+r:r}}),s):s}},function(t,e,r){"use strict";var n=r(20);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 s=[];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)),s.push(i(e)+"="+i(t))}))}),o=s.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},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(157);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";var n=r(20);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(103),i=r(20),o=r(286),s=r(285);function a(t){this.defaults=t,this.interceptors={request:new o,response:new o}}a.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=[s,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){a.prototype[t]=function(e,r){return this.request(i.merge(r||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){a.prototype[t]=function(e,r,n){return this.request(i.merge(n||{},{method:t,url:e,data:r}))}}),t.exports=a},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
21/*!
22 * Determine if an object is a Buffer
23 *
24 * @author Feross Aboukhadijeh <https://feross.org>
25 * @license MIT
26 */
27t.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(20),i=r(159),o=r(295),s=r(103);function a(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=a(s);u.Axios=o,u.create=function(t){return a(n.merge(s,t))},u.Cancel=r(155),u.CancelToken=r(281),u.isCancel=r(156),u.all=function(t){return Promise.all(t)},u.spread=r(280),t.exports=u,t.exports.default=u},function(t,e,r){t.exports=r(297)},function(t,e,r){"use strict";var n=r(74),i=r(138),o=r(96),s=r(97),a=r(147),u=Object.assign;t.exports=!u||r(53)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=u({},t)[r]||Object.keys(u({},e)).join("")!=n})?function(t,e){for(var r=s(t),u=arguments.length,c=1,l=i.f,h=o.f;u>c;)for(var f,p=a(arguments[c++]),d=l?n(p).concat(l(p)):n(p),g=d.length,y=0;g>y;)h.call(p,f=d[y++])&&(r[f]=p[f]);return r}:u},function(t,e,r){var n=r(19);n(n.S+n.F,"Object",{assign:r(299)})},function(t,e,r){r(300),t.exports=r(11).Object.assign},function(t,e,r){t.exports=r(301)},function(t,e,r){r(260),t.exports=r(11).Object.getOwnPropertySymbols},function(t,e,r){"use strict";var n=r(4),i=n(r(161)),o=n(r(302)).default||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof i.default){var o=0;for(n=(0,i.default)(t);o<n.length;o++)e.indexOf(n[o])<0&&(r[n[o]]=t[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0});var a=r(86),u=r(129),c=r(160),l=r(279);function h(t){if(t.startsWith("http://")||t.startsWith("https://"))return a.JSONRPCProtocol.HTTP;if(t.startsWith("ws://")||t.startsWith("wss://"))return a.JSONRPCProtocol.WS;throw new Error("Invalid URL")}e.createJSONRPCClient=function(t){var e=t.protocols,r=t.autoConnect,n=void 0===r||r,i=t.requestTimeout,f=t.generateRequestId;if(1===e.length){var p=e[0],d=p.url,g=s(p,["url"]),y=h(d);if(y===a.JSONRPCProtocol.HTTP)return new c.HTTPRPCClient(d,{requestTimeout:i,generateRequestId:f});if(y===a.JSONRPCProtocol.WS)return new u.WSRPCClient(d,o({autoConnect:n,requestTimeout:i,generateRequestId:f},g))}else if(2===e.length){var m=h(e[0].url),b=h(e[1].url);if(m===a.JSONRPCProtocol.HTTP&&b===a.JSONRPCProtocol.WS){var v=e[1],w=v.reconnectInterval,_=v.maxReconnects;return new l.DualRPCClient({httpUrl:e[0].url,wsUrl:e[1].url,autoConnect:n,protocol:m,requestTimeout:i,generateRequestId:f,reconnectInterval:w,maxReconnects:_})}if(b===a.JSONRPCProtocol.HTTP&&m===a.JSONRPCProtocol.WS){var M=e[0];return w=M.reconnectInterval,_=M.maxReconnects,new l.DualRPCClient({httpUrl:e[1].url,wsUrl:e[0].url,autoConnect:n,protocol:m,requestTimeout:i,generateRequestId:f,reconnectInterval:w,maxReconnects:_})}}throw new Error("Failed to create JSON-RPC client: invalid protocol configuration")}},function(t,e,r){"use strict";var n=r(41),i=n,o=Function("return this")(),s=r(14);i.exportSymbol("proto.TransferGatewayAddContractMappingRequest",null,o),i.exportSymbol("proto.TransferGatewayConfirmWithdrawalReceiptRequest",null,o),i.exportSymbol("proto.TransferGatewayContractMappingConfirmed",null,o),i.exportSymbol("proto.TransferGatewayTokenKind",null,o),i.exportSymbol("proto.TransferGatewayTokenWithdrawalSigned",null,o),i.exportSymbol("proto.TransferGatewayWithdrawERC20Request",null,o),i.exportSymbol("proto.TransferGatewayWithdrawERC721Request",null,o),i.exportSymbol("proto.TransferGatewayWithdrawETHRequest",null,o),i.exportSymbol("proto.TransferGatewayWithdrawalReceipt",null,o),i.exportSymbol("proto.TransferGatewayWithdrawalReceiptRequest",null,o),i.exportSymbol("proto.TransferGatewayWithdrawalReceiptResponse",null,o),proto.TransferGatewayContractMappingConfirmed=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayContractMappingConfirmed,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayContractMappingConfirmed.displayName="proto.TransferGatewayContractMappingConfirmed"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayContractMappingConfirmed.prototype.toObject=function(t){return proto.TransferGatewayContractMappingConfirmed.toObject(t,this)},proto.TransferGatewayContractMappingConfirmed.toObject=function(t,e){var r,n={foreignContract:(r=e.getForeignContract())&&s.Address.toObject(t,r),localContract:(r=e.getLocalContract())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferGatewayContractMappingConfirmed.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayContractMappingConfirmed;return proto.TransferGatewayContractMappingConfirmed.deserializeBinaryFromReader(r,e)},proto.TransferGatewayContractMappingConfirmed.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setForeignContract(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setLocalContract(r);break;default:e.skipField()}}return t},proto.TransferGatewayContractMappingConfirmed.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayContractMappingConfirmed.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayContractMappingConfirmed.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getForeignContract())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getLocalContract())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter)},proto.TransferGatewayContractMappingConfirmed.prototype.getForeignContract=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.TransferGatewayContractMappingConfirmed.prototype.setForeignContract=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayContractMappingConfirmed.prototype.clearForeignContract=function(){this.setForeignContract(void 0)},proto.TransferGatewayContractMappingConfirmed.prototype.hasForeignContract=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayContractMappingConfirmed.prototype.getLocalContract=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.TransferGatewayContractMappingConfirmed.prototype.setLocalContract=function(t){n.Message.setWrapperField(this,2,t)},proto.TransferGatewayContractMappingConfirmed.prototype.clearLocalContract=function(){this.setLocalContract(void 0)},proto.TransferGatewayContractMappingConfirmed.prototype.hasLocalContract=function(){return null!=n.Message.getField(this,2)},proto.TransferGatewayTokenWithdrawalSigned=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayTokenWithdrawalSigned,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayTokenWithdrawalSigned.displayName="proto.TransferGatewayTokenWithdrawalSigned"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayTokenWithdrawalSigned.prototype.toObject=function(t){return proto.TransferGatewayTokenWithdrawalSigned.toObject(t,this)},proto.TransferGatewayTokenWithdrawalSigned.toObject=function(t,e){var r,i={tokenOwner:(r=e.getTokenOwner())&&s.Address.toObject(t,r),tokenContract:(r=e.getTokenContract())&&s.Address.toObject(t,r),tokenKind:n.Message.getFieldWithDefault(e,3,0),value:(r=e.getValue())&&s.BigUInt.toObject(t,r),sig:e.getSig_asB64()};return t&&(i.$jspbMessageInstance=e),i}),proto.TransferGatewayTokenWithdrawalSigned.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayTokenWithdrawalSigned;return proto.TransferGatewayTokenWithdrawalSigned.deserializeBinaryFromReader(r,e)},proto.TransferGatewayTokenWithdrawalSigned.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTokenOwner(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTokenContract(r);break;case 3:r=e.readEnum();t.setTokenKind(r);break;case 4:r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setValue(r);break;case 5:r=e.readBytes();t.setSig(r);break;default:e.skipField()}}return t},proto.TransferGatewayTokenWithdrawalSigned.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayTokenWithdrawalSigned.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayTokenWithdrawalSigned.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getTokenOwner())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getTokenContract())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter),0!==(r=t.getTokenKind())&&e.writeEnum(3,r),null!=(r=t.getValue())&&e.writeMessage(4,r,s.BigUInt.serializeBinaryToWriter),(r=t.getSig_asU8()).length>0&&e.writeBytes(5,r)},proto.TransferGatewayTokenWithdrawalSigned.prototype.getTokenOwner=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.TransferGatewayTokenWithdrawalSigned.prototype.setTokenOwner=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayTokenWithdrawalSigned.prototype.clearTokenOwner=function(){this.setTokenOwner(void 0)},proto.TransferGatewayTokenWithdrawalSigned.prototype.hasTokenOwner=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayTokenWithdrawalSigned.prototype.getTokenContract=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.TransferGatewayTokenWithdrawalSigned.prototype.setTokenContract=function(t){n.Message.setWrapperField(this,2,t)},proto.TransferGatewayTokenWithdrawalSigned.prototype.clearTokenContract=function(){this.setTokenContract(void 0)},proto.TransferGatewayTokenWithdrawalSigned.prototype.hasTokenContract=function(){return null!=n.Message.getField(this,2)},proto.TransferGatewayTokenWithdrawalSigned.prototype.getTokenKind=function(){return n.Message.getFieldWithDefault(this,3,0)},proto.TransferGatewayTokenWithdrawalSigned.prototype.setTokenKind=function(t){n.Message.setProto3EnumField(this,3,t)},proto.TransferGatewayTokenWithdrawalSigned.prototype.getValue=function(){return n.Message.getWrapperField(this,s.BigUInt,4)},proto.TransferGatewayTokenWithdrawalSigned.prototype.setValue=function(t){n.Message.setWrapperField(this,4,t)},proto.TransferGatewayTokenWithdrawalSigned.prototype.clearValue=function(){this.setValue(void 0)},proto.TransferGatewayTokenWithdrawalSigned.prototype.hasValue=function(){return null!=n.Message.getField(this,4)},proto.TransferGatewayTokenWithdrawalSigned.prototype.getSig=function(){return n.Message.getFieldWithDefault(this,5,"")},proto.TransferGatewayTokenWithdrawalSigned.prototype.getSig_asB64=function(){return n.Message.bytesAsB64(this.getSig())},proto.TransferGatewayTokenWithdrawalSigned.prototype.getSig_asU8=function(){return n.Message.bytesAsU8(this.getSig())},proto.TransferGatewayTokenWithdrawalSigned.prototype.setSig=function(t){n.Message.setProto3BytesField(this,5,t)},proto.TransferGatewayWithdrawalReceipt=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayWithdrawalReceipt,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayWithdrawalReceipt.displayName="proto.TransferGatewayWithdrawalReceipt"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayWithdrawalReceipt.prototype.toObject=function(t){return proto.TransferGatewayWithdrawalReceipt.toObject(t,this)},proto.TransferGatewayWithdrawalReceipt.toObject=function(t,e){var r,i={tokenOwner:(r=e.getTokenOwner())&&s.Address.toObject(t,r),tokenContract:(r=e.getTokenContract())&&s.Address.toObject(t,r),tokenKind:n.Message.getFieldWithDefault(e,3,0),value:(r=e.getValue())&&s.BigUInt.toObject(t,r),withdrawalNonce:n.Message.getFieldWithDefault(e,5,"0"),oracleSignature:e.getOracleSignature_asB64()};return t&&(i.$jspbMessageInstance=e),i}),proto.TransferGatewayWithdrawalReceipt.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayWithdrawalReceipt;return proto.TransferGatewayWithdrawalReceipt.deserializeBinaryFromReader(r,e)},proto.TransferGatewayWithdrawalReceipt.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTokenOwner(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTokenContract(r);break;case 3:r=e.readEnum();t.setTokenKind(r);break;case 4:r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setValue(r);break;case 5:r=e.readUint64String();t.setWithdrawalNonce(r);break;case 6:r=e.readBytes();t.setOracleSignature(r);break;default:e.skipField()}}return t},proto.TransferGatewayWithdrawalReceipt.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayWithdrawalReceipt.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayWithdrawalReceipt.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getTokenOwner())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getTokenContract())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter),0!==(r=t.getTokenKind())&&e.writeEnum(3,r),null!=(r=t.getValue())&&e.writeMessage(4,r,s.BigUInt.serializeBinaryToWriter),r=t.getWithdrawalNonce(),0!==parseInt(r,10)&&e.writeUint64String(5,r),(r=t.getOracleSignature_asU8()).length>0&&e.writeBytes(6,r)},proto.TransferGatewayWithdrawalReceipt.prototype.getTokenOwner=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.TransferGatewayWithdrawalReceipt.prototype.setTokenOwner=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayWithdrawalReceipt.prototype.clearTokenOwner=function(){this.setTokenOwner(void 0)},proto.TransferGatewayWithdrawalReceipt.prototype.hasTokenOwner=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayWithdrawalReceipt.prototype.getTokenContract=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.TransferGatewayWithdrawalReceipt.prototype.setTokenContract=function(t){n.Message.setWrapperField(this,2,t)},proto.TransferGatewayWithdrawalReceipt.prototype.clearTokenContract=function(){this.setTokenContract(void 0)},proto.TransferGatewayWithdrawalReceipt.prototype.hasTokenContract=function(){return null!=n.Message.getField(this,2)},proto.TransferGatewayWithdrawalReceipt.prototype.getTokenKind=function(){return n.Message.getFieldWithDefault(this,3,0)},proto.TransferGatewayWithdrawalReceipt.prototype.setTokenKind=function(t){n.Message.setProto3EnumField(this,3,t)},proto.TransferGatewayWithdrawalReceipt.prototype.getValue=function(){return n.Message.getWrapperField(this,s.BigUInt,4)},proto.TransferGatewayWithdrawalReceipt.prototype.setValue=function(t){n.Message.setWrapperField(this,4,t)},proto.TransferGatewayWithdrawalReceipt.prototype.clearValue=function(){this.setValue(void 0)},proto.TransferGatewayWithdrawalReceipt.prototype.hasValue=function(){return null!=n.Message.getField(this,4)},proto.TransferGatewayWithdrawalReceipt.prototype.getWithdrawalNonce=function(){return n.Message.getFieldWithDefault(this,5,"0")},proto.TransferGatewayWithdrawalReceipt.prototype.setWithdrawalNonce=function(t){n.Message.setProto3StringIntField(this,5,t)},proto.TransferGatewayWithdrawalReceipt.prototype.getOracleSignature=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.TransferGatewayWithdrawalReceipt.prototype.getOracleSignature_asB64=function(){return n.Message.bytesAsB64(this.getOracleSignature())},proto.TransferGatewayWithdrawalReceipt.prototype.getOracleSignature_asU8=function(){return n.Message.bytesAsU8(this.getOracleSignature())},proto.TransferGatewayWithdrawalReceipt.prototype.setOracleSignature=function(t){n.Message.setProto3BytesField(this,6,t)},proto.TransferGatewayWithdrawERC721Request=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayWithdrawERC721Request,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayWithdrawERC721Request.displayName="proto.TransferGatewayWithdrawERC721Request"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayWithdrawERC721Request.prototype.toObject=function(t){return proto.TransferGatewayWithdrawERC721Request.toObject(t,this)},proto.TransferGatewayWithdrawERC721Request.toObject=function(t,e){var r,n={tokenId:(r=e.getTokenId())&&s.BigUInt.toObject(t,r),tokenContract:(r=e.getTokenContract())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferGatewayWithdrawERC721Request.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayWithdrawERC721Request;return proto.TransferGatewayWithdrawERC721Request.deserializeBinaryFromReader(r,e)},proto.TransferGatewayWithdrawERC721Request.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setTokenId(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTokenContract(r);break;default:e.skipField()}}return t},proto.TransferGatewayWithdrawERC721Request.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayWithdrawERC721Request.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayWithdrawERC721Request.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getTokenId())&&e.writeMessage(1,r,s.BigUInt.serializeBinaryToWriter),null!=(r=t.getTokenContract())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter)},proto.TransferGatewayWithdrawERC721Request.prototype.getTokenId=function(){return n.Message.getWrapperField(this,s.BigUInt,1)},proto.TransferGatewayWithdrawERC721Request.prototype.setTokenId=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayWithdrawERC721Request.prototype.clearTokenId=function(){this.setTokenId(void 0)},proto.TransferGatewayWithdrawERC721Request.prototype.hasTokenId=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayWithdrawERC721Request.prototype.getTokenContract=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.TransferGatewayWithdrawERC721Request.prototype.setTokenContract=function(t){n.Message.setWrapperField(this,2,t)},proto.TransferGatewayWithdrawERC721Request.prototype.clearTokenContract=function(){this.setTokenContract(void 0)},proto.TransferGatewayWithdrawERC721Request.prototype.hasTokenContract=function(){return null!=n.Message.getField(this,2)},proto.TransferGatewayWithdrawERC20Request=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayWithdrawERC20Request,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayWithdrawERC20Request.displayName="proto.TransferGatewayWithdrawERC20Request"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayWithdrawERC20Request.prototype.toObject=function(t){return proto.TransferGatewayWithdrawERC20Request.toObject(t,this)},proto.TransferGatewayWithdrawERC20Request.toObject=function(t,e){var r,n={amount:(r=e.getAmount())&&s.BigUInt.toObject(t,r),tokenContract:(r=e.getTokenContract())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferGatewayWithdrawERC20Request.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayWithdrawERC20Request;return proto.TransferGatewayWithdrawERC20Request.deserializeBinaryFromReader(r,e)},proto.TransferGatewayWithdrawERC20Request.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setAmount(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTokenContract(r);break;default:e.skipField()}}return t},proto.TransferGatewayWithdrawERC20Request.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayWithdrawERC20Request.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayWithdrawERC20Request.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getAmount())&&e.writeMessage(1,r,s.BigUInt.serializeBinaryToWriter),null!=(r=t.getTokenContract())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter)},proto.TransferGatewayWithdrawERC20Request.prototype.getAmount=function(){return n.Message.getWrapperField(this,s.BigUInt,1)},proto.TransferGatewayWithdrawERC20Request.prototype.setAmount=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayWithdrawERC20Request.prototype.clearAmount=function(){this.setAmount(void 0)},proto.TransferGatewayWithdrawERC20Request.prototype.hasAmount=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayWithdrawERC20Request.prototype.getTokenContract=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.TransferGatewayWithdrawERC20Request.prototype.setTokenContract=function(t){n.Message.setWrapperField(this,2,t)},proto.TransferGatewayWithdrawERC20Request.prototype.clearTokenContract=function(){this.setTokenContract(void 0)},proto.TransferGatewayWithdrawERC20Request.prototype.hasTokenContract=function(){return null!=n.Message.getField(this,2)},proto.TransferGatewayWithdrawETHRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayWithdrawETHRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayWithdrawETHRequest.displayName="proto.TransferGatewayWithdrawETHRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayWithdrawETHRequest.prototype.toObject=function(t){return proto.TransferGatewayWithdrawETHRequest.toObject(t,this)},proto.TransferGatewayWithdrawETHRequest.toObject=function(t,e){var r,n={amount:(r=e.getAmount())&&s.BigUInt.toObject(t,r),mainnetGateway:(r=e.getMainnetGateway())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferGatewayWithdrawETHRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayWithdrawETHRequest;return proto.TransferGatewayWithdrawETHRequest.deserializeBinaryFromReader(r,e)},proto.TransferGatewayWithdrawETHRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setAmount(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setMainnetGateway(r);break;default:e.skipField()}}return t},proto.TransferGatewayWithdrawETHRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayWithdrawETHRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayWithdrawETHRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getAmount())&&e.writeMessage(1,r,s.BigUInt.serializeBinaryToWriter),null!=(r=t.getMainnetGateway())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter)},proto.TransferGatewayWithdrawETHRequest.prototype.getAmount=function(){return n.Message.getWrapperField(this,s.BigUInt,1)},proto.TransferGatewayWithdrawETHRequest.prototype.setAmount=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayWithdrawETHRequest.prototype.clearAmount=function(){this.setAmount(void 0)},proto.TransferGatewayWithdrawETHRequest.prototype.hasAmount=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayWithdrawETHRequest.prototype.getMainnetGateway=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.TransferGatewayWithdrawETHRequest.prototype.setMainnetGateway=function(t){n.Message.setWrapperField(this,2,t)},proto.TransferGatewayWithdrawETHRequest.prototype.clearMainnetGateway=function(){this.setMainnetGateway(void 0)},proto.TransferGatewayWithdrawETHRequest.prototype.hasMainnetGateway=function(){return null!=n.Message.getField(this,2)},proto.TransferGatewayWithdrawalReceiptRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayWithdrawalReceiptRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayWithdrawalReceiptRequest.displayName="proto.TransferGatewayWithdrawalReceiptRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayWithdrawalReceiptRequest.prototype.toObject=function(t){return proto.TransferGatewayWithdrawalReceiptRequest.toObject(t,this)},proto.TransferGatewayWithdrawalReceiptRequest.toObject=function(t,e){var r,n={owner:(r=e.getOwner())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferGatewayWithdrawalReceiptRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayWithdrawalReceiptRequest;return proto.TransferGatewayWithdrawalReceiptRequest.deserializeBinaryFromReader(r,e)},proto.TransferGatewayWithdrawalReceiptRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setOwner(r);break;default:e.skipField()}}return t},proto.TransferGatewayWithdrawalReceiptRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayWithdrawalReceiptRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayWithdrawalReceiptRequest.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getOwner())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter)},proto.TransferGatewayWithdrawalReceiptRequest.prototype.getOwner=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.TransferGatewayWithdrawalReceiptRequest.prototype.setOwner=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayWithdrawalReceiptRequest.prototype.clearOwner=function(){this.setOwner(void 0)},proto.TransferGatewayWithdrawalReceiptRequest.prototype.hasOwner=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayWithdrawalReceiptResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayWithdrawalReceiptResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayWithdrawalReceiptResponse.displayName="proto.TransferGatewayWithdrawalReceiptResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayWithdrawalReceiptResponse.prototype.toObject=function(t){return proto.TransferGatewayWithdrawalReceiptResponse.toObject(t,this)},proto.TransferGatewayWithdrawalReceiptResponse.toObject=function(t,e){var r,n={receipt:(r=e.getReceipt())&&proto.TransferGatewayWithdrawalReceipt.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferGatewayWithdrawalReceiptResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayWithdrawalReceiptResponse;return proto.TransferGatewayWithdrawalReceiptResponse.deserializeBinaryFromReader(r,e)},proto.TransferGatewayWithdrawalReceiptResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.TransferGatewayWithdrawalReceipt;e.readMessage(r,proto.TransferGatewayWithdrawalReceipt.deserializeBinaryFromReader),t.setReceipt(r);break;default:e.skipField()}}return t},proto.TransferGatewayWithdrawalReceiptResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayWithdrawalReceiptResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayWithdrawalReceiptResponse.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getReceipt())&&e.writeMessage(1,r,proto.TransferGatewayWithdrawalReceipt.serializeBinaryToWriter)},proto.TransferGatewayWithdrawalReceiptResponse.prototype.getReceipt=function(){return n.Message.getWrapperField(this,proto.TransferGatewayWithdrawalReceipt,1)},proto.TransferGatewayWithdrawalReceiptResponse.prototype.setReceipt=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayWithdrawalReceiptResponse.prototype.clearReceipt=function(){this.setReceipt(void 0)},proto.TransferGatewayWithdrawalReceiptResponse.prototype.hasReceipt=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayConfirmWithdrawalReceiptRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayConfirmWithdrawalReceiptRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayConfirmWithdrawalReceiptRequest.displayName="proto.TransferGatewayConfirmWithdrawalReceiptRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.toObject=function(t){return proto.TransferGatewayConfirmWithdrawalReceiptRequest.toObject(t,this)},proto.TransferGatewayConfirmWithdrawalReceiptRequest.toObject=function(t,e){var r,n={tokenOwner:(r=e.getTokenOwner())&&s.Address.toObject(t,r),oracleSignature:e.getOracleSignature_asB64(),withdrawalHash:e.getWithdrawalHash_asB64()};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferGatewayConfirmWithdrawalReceiptRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayConfirmWithdrawalReceiptRequest;return proto.TransferGatewayConfirmWithdrawalReceiptRequest.deserializeBinaryFromReader(r,e)},proto.TransferGatewayConfirmWithdrawalReceiptRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTokenOwner(r);break;case 2:r=e.readBytes();t.setOracleSignature(r);break;case 3:r=e.readBytes();t.setWithdrawalHash(r);break;default:e.skipField()}}return t},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayConfirmWithdrawalReceiptRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayConfirmWithdrawalReceiptRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getTokenOwner())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),(r=t.getOracleSignature_asU8()).length>0&&e.writeBytes(2,r),(r=t.getWithdrawalHash_asU8()).length>0&&e.writeBytes(3,r)},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.getTokenOwner=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.setTokenOwner=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.clearTokenOwner=function(){this.setTokenOwner(void 0)},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.hasTokenOwner=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.getOracleSignature=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.getOracleSignature_asB64=function(){return n.Message.bytesAsB64(this.getOracleSignature())},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.getOracleSignature_asU8=function(){return n.Message.bytesAsU8(this.getOracleSignature())},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.setOracleSignature=function(t){n.Message.setProto3BytesField(this,2,t)},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.getWithdrawalHash=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.getWithdrawalHash_asB64=function(){return n.Message.bytesAsB64(this.getWithdrawalHash())},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.getWithdrawalHash_asU8=function(){return n.Message.bytesAsU8(this.getWithdrawalHash())},proto.TransferGatewayConfirmWithdrawalReceiptRequest.prototype.setWithdrawalHash=function(t){n.Message.setProto3BytesField(this,3,t)},proto.TransferGatewayAddContractMappingRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferGatewayAddContractMappingRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferGatewayAddContractMappingRequest.displayName="proto.TransferGatewayAddContractMappingRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferGatewayAddContractMappingRequest.prototype.toObject=function(t){return proto.TransferGatewayAddContractMappingRequest.toObject(t,this)},proto.TransferGatewayAddContractMappingRequest.toObject=function(t,e){var r,n={foreignContract:(r=e.getForeignContract())&&s.Address.toObject(t,r),localContract:(r=e.getLocalContract())&&s.Address.toObject(t,r),foreignContractCreatorSig:e.getForeignContractCreatorSig_asB64(),foreignContractTxHash:e.getForeignContractTxHash_asB64()};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferGatewayAddContractMappingRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferGatewayAddContractMappingRequest;return proto.TransferGatewayAddContractMappingRequest.deserializeBinaryFromReader(r,e)},proto.TransferGatewayAddContractMappingRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setForeignContract(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setLocalContract(r);break;case 3:r=e.readBytes();t.setForeignContractCreatorSig(r);break;case 4:r=e.readBytes();t.setForeignContractTxHash(r);break;default:e.skipField()}}return t},proto.TransferGatewayAddContractMappingRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferGatewayAddContractMappingRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferGatewayAddContractMappingRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getForeignContract())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getLocalContract())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter),(r=t.getForeignContractCreatorSig_asU8()).length>0&&e.writeBytes(3,r),(r=t.getForeignContractTxHash_asU8()).length>0&&e.writeBytes(4,r)},proto.TransferGatewayAddContractMappingRequest.prototype.getForeignContract=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.TransferGatewayAddContractMappingRequest.prototype.setForeignContract=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferGatewayAddContractMappingRequest.prototype.clearForeignContract=function(){this.setForeignContract(void 0)},proto.TransferGatewayAddContractMappingRequest.prototype.hasForeignContract=function(){return null!=n.Message.getField(this,1)},proto.TransferGatewayAddContractMappingRequest.prototype.getLocalContract=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.TransferGatewayAddContractMappingRequest.prototype.setLocalContract=function(t){n.Message.setWrapperField(this,2,t)},proto.TransferGatewayAddContractMappingRequest.prototype.clearLocalContract=function(){this.setLocalContract(void 0)},proto.TransferGatewayAddContractMappingRequest.prototype.hasLocalContract=function(){return null!=n.Message.getField(this,2)},proto.TransferGatewayAddContractMappingRequest.prototype.getForeignContractCreatorSig=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.TransferGatewayAddContractMappingRequest.prototype.getForeignContractCreatorSig_asB64=function(){return n.Message.bytesAsB64(this.getForeignContractCreatorSig())},proto.TransferGatewayAddContractMappingRequest.prototype.getForeignContractCreatorSig_asU8=function(){return n.Message.bytesAsU8(this.getForeignContractCreatorSig())},proto.TransferGatewayAddContractMappingRequest.prototype.setForeignContractCreatorSig=function(t){n.Message.setProto3BytesField(this,3,t)},proto.TransferGatewayAddContractMappingRequest.prototype.getForeignContractTxHash=function(){return n.Message.getFieldWithDefault(this,4,"")},proto.TransferGatewayAddContractMappingRequest.prototype.getForeignContractTxHash_asB64=function(){return n.Message.bytesAsB64(this.getForeignContractTxHash())},proto.TransferGatewayAddContractMappingRequest.prototype.getForeignContractTxHash_asU8=function(){return n.Message.bytesAsU8(this.getForeignContractTxHash())},proto.TransferGatewayAddContractMappingRequest.prototype.setForeignContractTxHash=function(t){n.Message.setProto3BytesField(this,4,t)},proto.TransferGatewayTokenKind={ETH:0,ERC20:1,ERC721:2},i.object.extend(e,proto)},function(t,e,r){"use strict";var n,i=r(4),o=i(r(7)),s=i(r(6)),a=i(r(5)),u=i(r(29)),c=i(r(28)),l=(n=c.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,u.default)(e):(r.prototype=e.prototype,new r)}),h=function(t,e,r,n){return new(r||(r=a.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},f=function(t,e){var r,n,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof s.default&&(a[o.default]=function(){return this}),a;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},p=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var d=p(r(3)),g=r(56),y=r(40),m=r(305),b=r(64),v=r(23),w=function(t){function e(r){var n=t.call(this,r)||this;return n.on(g.Contract.EVENT,function(t){if(t.topics&&0!==t.topics.length){if(t.topics[0]===e.tokenWithdrawalSignedEventTopic){var r=m.TransferGatewayTokenWithdrawalSigned.deserializeBinary(v.B64ToUint8Array(t.data));n.emit(e.EVENT_TOKEN_WITHDRAWAL,{tokenOwner:y.Address.UmarshalPB(r.getTokenOwner()),tokenContract:y.Address.UmarshalPB(r.getTokenContract()),tokenKind:r.getTokenKind(),value:b.unmarshalBigUIntPB(r.getValue()),sig:r.getSig_asU8()})}if(t.topics[0]===e.contractMappingConfirmedEventTopic){var i=m.TransferGatewayContractMappingConfirmed.deserializeBinary(v.B64ToUint8Array(t.data));n.emit(e.EVENT_CONTRACT_MAPPING_CONFIRMED,{foreignContract:y.Address.UmarshalPB(i.getForeignContract()),localContract:y.Address.UmarshalPB(i.getLocalContract())})}}}),n}return l(e,t),e.createAsync=function(t,r){return h(this,void 0,void 0,function(){var n;return f(this,function(i){switch(i.label){case 0:return[4,t.getContractAddressAsync("gateway")];case 1:if(!(n=i.sent()))throw Error("Failed to resolve contract address for TransferGateway");return[2,new e({contractAddr:n,callerAddr:r,client:t})]}})})},e.prototype.addContractMappingAsync=function(t){var e=t.foreignContract,r=t.localContract,n=t.foreignContractCreatorSig,i=t.foreignContractCreatorTxHash,o=new m.TransferGatewayAddContractMappingRequest;return o.setForeignContract(e.MarshalPB()),o.setLocalContract(r.MarshalPB()),o.setForeignContractCreatorSig(n),o.setForeignContractTxHash(i),this.callAsync("AddContractMapping",o)},e.prototype.withdrawERC721Async=function(t,e){var r=new m.TransferGatewayWithdrawERC721Request;return r.setTokenId(b.marshalBigUIntPB(t)),r.setTokenContract(e.MarshalPB()),this.callAsync("WithdrawERC721",r)},e.prototype.withdrawERC20Async=function(t,e){var r=new m.TransferGatewayWithdrawERC20Request;return r.setAmount(b.marshalBigUIntPB(t)),r.setTokenContract(e.MarshalPB()),this.callAsync("WithdrawERC20",r)},e.prototype.withdrawETHAsync=function(t,e){var r=new m.TransferGatewayWithdrawETHRequest;return r.setAmount(b.marshalBigUIntPB(t)),r.setMainnetGateway(e.MarshalPB()),this.callAsync("WithdrawETH",r)},e.prototype.withdrawalReceiptAsync=function(t){return h(this,void 0,void 0,function(){var e,r,n;return f(this,function(i){switch(i.label){case 0:return(e=new m.TransferGatewayWithdrawalReceiptRequest).setOwner(t.MarshalPB()),[4,this.staticCallAsync("WithdrawalReceipt",e,new m.TransferGatewayWithdrawalReceiptResponse)];case 1:return r=i.sent(),(n=r.getReceipt())?[2,{tokenOwner:y.Address.UmarshalPB(n.getTokenOwner()),tokenContract:y.Address.UmarshalPB(n.getTokenContract()),tokenKind:n.getTokenKind(),value:b.unmarshalBigUIntPB(n.getValue()),withdrawalNonce:new d.default(n.getWithdrawalNonce()),oracleSignature:n.getOracleSignature_asU8()}]:[2,null]}})})},e.EVENT_TOKEN_WITHDRAWAL="event_token_withdrawal",e.EVENT_CONTRACT_MAPPING_CONFIRMED="event_contract_mapping_confirmed",e.tokenWithdrawalSignedEventTopic="event:TokenWithdrawalSigned",e.contractMappingConfirmedEventTopic="event:ContractMappingConfirmed",e}(g.Contract);e.TransferGateway=w},function(t,e){t.exports=function(t){var e=t.fsp,r=t.files,n=t.os,i=t.path,o=t.child_process,s=t.mimetype,a=t.defaultArchives,u=t.request,c=t.downloadUrl,l=t.bytes,h=t.hash,f=t.pick,p=function(t){return function(e){for(var r={},n=0,i=t.length;n<i;++n)r[t[n]]=e[n];return r}},d=function(t){return function(e){return t+"/bzzr:/"+e}},g=function(t){return function(e){return u(d(t)(e),{responseType:"arraybuffer"}).then(function(t){var e,r=new Uint8Array(t);if((e=r,function(t){if(e.length!==t.length)return!1;var r=0;for(e.length;r<e;++r)if(e[r]!==t[r])return!1;return!0})([52,48,52,32,112,97,103,101,32,110,111,116,32,102,111,117,110,100,10]))throw"Error 404.";return r})}},y=function(t){return function(e){return function e(r){return function(n){return function(i){var o=function(t){return void 0===t.path?Promise.resolve():"application/bzz-manifest+json"===t.contentType?e(t.hash)(n+t.path)(i):Promise.resolve((r=n+t.path,function(t){return function(e){return e[r]=t,e}})(function(t){return{type:t.contentType,hash:t.hash}}(t))(i));var r};return g(t)(r).then(function(t){return JSON.parse(P(t)).entries}).then(function(t){return Promise.all(t.map(o))}).then(function(){return i})}}}(e)("")({})}},m=function(t){return function(e){return y(t)(e).then(function(t){return p(Object.keys(t))(Object.keys(t).map(function(e){return t[e].hash}))})}},b=function(t){return function(e){return y(t)(e).then(function(e){var r=Object.keys(e),n=r.map(function(t){return e[t].hash}),i=r.map(function(t){return e[t].type}),o=n.map(g(t));return Promise.all(o).then(function(t){return p(r)(function(t){return t.map(function(t,e){return{type:i[e],data:t}})}(t))})})}},v=function(t){return function(e){return function(n){return r.download(d(t)(e))(n)}}},w=function(t){return function(e){return function(r){return m(t)(e).then(function(e){var n=[];for(var o in e)if(o.length>0){var s=i.join(r,o);n.push(v(t)(e[o])(s))}return Promise.all(n).then(function(){return r})})}}},_=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 s="/"===r[0]?r:"/"+r,a=t+"/bzz:/"+e+s,c={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return u(a,c).then(function(t){if(-1!==t.indexOf("error"))throw t;return t}).catch(function(t){return o>0&&i(o-1)})}(3)}}}},E=function(t){return function(e){return B(t)({"":e})}},A=function(t){return function(r){return e.readFile(r).then(function(e){return E(t)({type:s.lookup(r),data:e})})}},B=function(t){return function(e){return _(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))})}},T=function(t){return function(r){return e.readFile(r).then(_(t))}},R=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 s.lookup(t)||"text/plain"});return p(r)(e.map(function(t,e){return{type:n[e],data:t}}))})}).then(function(t){return(e=n?{"":t[n]}:{},function(t){var r={};for(var n in e)r[n]=e[n];for(var i in t)r[i]=t[i];return r})(t);var e}).then(B(t))}}},x=function(t){return function(e){if("data"===e.pick)return f.data().then(_(t));if("file"===e.pick)return f.file().then(E(t));if("directory"===e.pick)return f.directory().then(B(t));if(e.path)switch(e.kind){case"data":return T(t)(e.path);case"file":return A(t)(e.path);case"directory":return R(t)(e.defaultFile)(e.path)}else{if(e.length||"string"==typeof e)return _(t)(e);if(e instanceof Object)return B(t)(e)}return Promise.reject(new Error("Bad arguments"))}},S=function(t){return function(e){return function(r){return F(t)(e).then(function(n){return n?r?w(t)(e)(r):b(t)(e):r?v(t)(e)(r):g(t)(e)})}}},k=function(t,e){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(e||a)[i],s=c+o.archive+".tar.gz",u=o.archiveMD5,l=o.binaryMD5;return r.safeDownloadArchived(s)(u)(l)(t)},C=function(t){return new Promise(function(e,r){var n=o.spawn,i=function(t){return function(e){return-1!==(""+e).indexOf(t)}},s=t.account,a=t.password,u=t.dataDir,c=t.ensApi,l=t.privateKey,h=0,f=n(t.binPath,["--bzzaccount",s||l,"--datadir",u,"--ens-api",c]),p=function(t){0===h&&i("Passphrase")(t)?setTimeout(function(){h=1,f.stdin.write(a+"\n")},500):i("Swarm http proxy started")(t)&&(h=2,clearTimeout(d),e(f))};f.stdout.on("data",p),f.stderr.on("data",p);var d=setTimeout(function(){return r(new Error("Couldn't start swarm process."))},2e4)})},I=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()})})},j=function(t){return _(t)("test").then(function(t){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===t}).catch(function(){return!1})},F=function(t){return function(e){return g(t)(e).then(function(t){try{return!!JSON.parse(P(t)).entries}catch(t){return!1}})}},O=function(t){return function(e,r,n,i,o){var s;return void 0!==e&&(s=t(e)),void 0!==r&&(s=t(r)),void 0!==n&&(s=t(n)),void 0!==i&&(s=t(i)),void 0!==o&&(s=t(o)),s}},P=function(t){return l.toString(l.fromUint8Array(t))},L=function(t){return l.toUint8Array(l.fromString(t))},N=function(t){return{download:function(e,r){return S(t)(e)(r)},downloadData:O(g(t)),downloadDataToDisk:O(v(t)),downloadDirectory:O(b(t)),downloadDirectoryToDisk:O(w(t)),downloadEntries:O(y(t)),downloadRoutes:O(m(t)),isAvailable:function(){return j(t)},upload:function(e){return x(t)(e)},uploadData:O(_(t)),uploadFile:O(E(t)),uploadFileFromDisk:O(E(t)),uploadDataFromDisk:O(T(t)),uploadDirectory:O(B(t)),uploadDirectoryFromDisk:O(R(t)),uploadToManifest:O(M(t)),pick:f,hash:h,fromString:L,toString:P}};return{at:N,local:function(t){return function(e){return j("http://localhost:8500").then(function(r){return r?e(N("http://localhost:8500")).then(function(){}):k(t.binPath,t.archives).onData(function(e){return(t.onProgress||function(){})(e.length)}).then(function(){return C(t)}).then(function(t){return e(N("http://localhost:8500")).then(function(){return t})}).then(I)})}},download:S,downloadBinary:k,downloadData:g,downloadDataToDisk:v,downloadDirectory:b,downloadDirectoryToDisk:w,downloadEntries:y,downloadRoutes:m,isAvailable:j,startProcess:C,stopProcess:I,upload:x,uploadData:_,uploadDataFromDisk:T,uploadFile:E,uploadFileFromDisk:A,uploadDirectory:B,uploadDirectoryFromDisk:R,uploadToManifest:M,pick:f,hash:h,fromString:L,toString:P}}},function(t,e){var r=function(t){return function(){return new Promise(function(e,r){var n=function(r){var n={},i=r.target.files.length,o=0;[].map.call(r.target.files,function(r){var s=new FileReader;s.onload=function(s){var a=new Uint8Array(s.target.result);if("directory"===t){var u=r.webkitRelativePath;n[u.slice(u.indexOf("/")+1)]={type:"text/plain",data:a},++o===i&&e(n)}else if("file"===t){var c=r.webkitRelativePath;e({type:mimetype.lookup(c),data:a})}else e(a)},s.readAsArrayBuffer(r)})},i=void 0;"directory"===t?((i=document.createElement("input")).addEventListener("change",n),i.type="file",i.webkitdirectory=!0,i.mozdirectory=!0,i.msdirectory=!0,i.odirectory=!0,i.directory=!0):((i=document.createElement("input")).addEventListener("change",n),i.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),i.dispatchEvent(o)})}};t.exports={data:r("data"),file:r("file"),directory:r("directory")}},function(t,e,r){var n=r(195).keccak256,i=r(162),o=function(t,e){var r=i.reverse(i.pad(6,i.fromNumber(t))),o=i.flatten([r,"0x0000",e]);return n(o).slice(2)};t.exports=function t(e){"string"==typeof e&&"0x"!==e.slice(0,2)?e=i.fromString(e):"string"!=typeof e&&void 0!==e.length&&(e=i.fromUint8Array(e));var r=i.length(e);if(r<=4096)return o(r,e);for(var n=4096;128*n<r;)n*=128;for(var s=[],a=0;a<r;a+=n){var u=n<r-a?n:r-a;s.push(t(i.slice(e,a,a+u)))}return o(r,i.flatten(s))}},function(t,e){var r=function(t,e){for(var r=[],n=0;n<t;++n)r.push(e(n));return r};t.exports={generate:r,replicate:function(t,e){return r(t,function(){return e})},concat:function(t,e){return t.concat(e)},flatten:function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=0,o=t[r].length;i<o;++i)e.push(t[r][i]);return e},chunksOf:function(t,e){for(var r=[],n=0,i=e.length;n<i;n+=t)r.push(e.slice(n,n+t));return r}}},function(t,e){t.exports=function(t,e){return e?{statusCode:e.statusCode,headers:e.headers,method:t.method,url:t.url,rawRequest:e.rawRequest?e.rawRequest:e}:null}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t};var r=Object.prototype.hasOwnProperty},function(t,e,r){"use strict";var n=Function.prototype.toString,i=/^\s*class /,o=function(t){try{var e=n.call(t).replace(/\/\/.*\n/g,"").replace(/\/\*[.\s\S]*\*\//g,"").replace(/\n/gm," ").replace(/ {2}/g," ");return i.test(e)}catch(t){return!1}},s=Object.prototype.toString,a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(a)return function(t){try{return!o(t)&&(n.call(t),!0)}catch(t){return!1}}(t);if(o(t))return!1;var e=s.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e}},function(t,e,r){"use strict";var n=r(313),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n<i;n++)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s):"string"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,s):function(t,e,r){for(var n in t)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s)}},function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}},function(t,e,r){var n=r(315),i=r(314);t.exports=function(t){if(!t)return{};var e={};return i(n(t).split("\n"),function(t){var r,i=t.indexOf(":"),o=n(t.slice(0,i)).toLowerCase(),s=n(t.slice(i+1));void 0===e[o]?e[o]=s:(r=e[o],"[object Array]"===Object.prototype.toString.call(r)?e[o].push(s):e[o]=[e[o],s])}),e}},function(t,e){t.exports=function(t){var e=r.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var r=Object.prototype.toString},function(t,e,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,r(8))},function(t,e,r){"use strict";var n=r(318),i=r(317),o=r(316),s=r(312);function a(t,e,r){var n=t;return i(e)?(r=e,"string"==typeof t&&(n={uri:t})):n=s(e,{uri:t}),n.callback=r,n}function u(t,e,r){return c(e=a(t,e,r))}function c(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,r=function(r,n,i){e||(e=!0,t.callback(r,n,i))};function n(t){return clearTimeout(l),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,r(t,m)}function i(){if(!a){var e;clearTimeout(l),e=t.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var n=m,i=null;return 0!==e?(n={body:function(){var t=void 0;if(t=c.response?c.response:c.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}(c),y)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:e,method:f,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(n.headers=o(c.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),r(i,n,n.body)}}var s,a,c=t.xhr||null;c||(c=t.cors||t.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var l,h=c.url=t.uri||t.url,f=c.method=t.method||"GET",p=t.body||t.data,d=c.headers=t.headers||{},g=!!t.sync,y=!1,m={body:void 0,headers:{},statusCode:0,method:f,url:h,rawRequest:c};if("json"in t&&!1!==t.json&&(y=!0,d.accept||d.Accept||(d.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(d["content-type"]||d["Content-Type"]||(d["Content-Type"]="application/json"),p=JSON.stringify(!0===t.json?p:t.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(i,0)},c.onload=i,c.onerror=n,c.onprogress=function(){},c.onabort=function(){a=!0},c.ontimeout=n,c.open(f,h,!g,t.username,t.password),g||(c.withCredentials=!!t.withCredentials),!g&&t.timeout>0&&(l=setTimeout(function(){if(!a){a=!0,c.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",n(t)}},t.timeout)),c.setRequestHeader)for(s in d)d.hasOwnProperty(s)&&c.setRequestHeader(s,d[s]);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(p||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<t.length;r++)e(t[r])}(["get","put","post","patch","head","delete"],function(t){u["delete"===t?"del":t]=function(e,r,n){return(r=a(e,r,n)).method=t.toUpperCase(),c(r)}})},function(t,e,r){var n=r(319),i=r(311),o=function(){};t.exports=function(t,e){delete t.uri;var r=!1;"json"===t.responseType&&(t.responseType="text",r=!0);var s=n(t,function(n,s,a){if(r&&!n)try{var u=s.rawRequest.responseText;a=JSON.parse(u)}catch(t){n=t}s=i(t,s),e(n,n?null:a,s),e=o}),a=s.onabort;return s.onabort=function(){var t=a.apply(s,Array.prototype.slice.call(arguments));return e(new Error("XHR Aborted")),e=o,t},s}},function(t,e){t.exports=function(t,e,r){var n=e.toLowerCase();t[e]||t[n]||(t[e]=r)}},function(t,e){t.exports=function(t,e){if(e){e=(e=e.trim().replace(/^(\?|#|&)/,""))?"?"+e:e;var r=t.split(/[\?\#]/),n=r[0];e&&/\:\/\/[^\/]*$/.test(n)&&(n+="/");var i=t.match(/(\#.*)$/);t=n+e,i&&(t+=i[0])}return t}},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 s(t){try{return decodeURIComponent(t)}catch(i){for(var e=t.match(n),r=1;r<e.length;r++)e=(t=o(e,r).join("")).match(n);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},r=i.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch(t){var n=s(r[0]);n!==r[0]&&(e[r[0]]=n)}r=i.exec(t)}e["%C2"]="�";for(var o=Object.keys(e),a=0;a<o.length;a++){var u=o[a];t=t.replace(new RegExp(u,"g"),e[u])}return t}(t)}}},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=r(324),i=r(163),o=r(323);function s(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function a(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(),s=e.length>0?e.join("="):void 0;s=void 0===s?null:o(s),r(o(i),s,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=a,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?[s(e,t),"[",n,"]"].join(""):[s(e,t),"[",s(n,t),"]=",s(r,t)].join("")};case"bracket":return function(e,r){return null===r?s(e,t):[s(e,t),"[]=",s(r,t)].join("")};default:return function(e,r){return null===r?s(e,t):[s(e,t),"=",s(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 s(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 s(n,e)+"="+s(i,e)}).filter(function(t){return t.length>0}).join("&"):""},e.parseUrl=function(t,e){return{url:t.split("?")[0]||"",query:u(a(t),e)}}},function(t,e,r){var n=r(325),i=r(322),o=r(163),s=r(321),a=r(320),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 l=(e=e||{}).json?"json":"text",h=(e=o({responseType:l},e)).headers||{},f=(e.method||"GET").toUpperCase(),p=e.query;p&&("string"!=typeof p&&(p=n.stringify(p)),t=i(t,p));"json"===e.responseType&&s(h,"Accept",u);e.json&&"GET"!==f&&"HEAD"!==f&&(s(h,"Content-Type",u),e.body=JSON.stringify(e.body));return e.method=f,e.url=t,e.headers=h,delete e.query,delete e.json,a(e,r)}},function(t,e,r){var n=r(326);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=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},s={platform:n,arch:n},a={join:n,slice:n},u={spawn:n},c={lookup:n},l=r(327),h=r(162),f=r(309),p=r(308),d=r(307);t.exports=d({fsp:i,files:o,os:s,path:a,child_process:u,defaultArchives:{},mimetype:c,request:l,downloadUrl:null,bytes:h,hash:f,pick:p})},function(t,e,r){"use strict";var n=r(9),i=r(328),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&&ethereumProvider.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){"use strict";var n=r(47),i=r(83).subscriptions,o=r(46),s=r(82),a=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 s(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(a),t.exports=a},function(t,e,r){"use strict";var n=r(9);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){(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(8))},function(t,e,r){for(var n=r(332),i=[],o={},s=0;s<256;s++)i[s]=(s+256).toString(16).substr(1),o[i[s]]=s;function a(t,e){var r=e||0,n=i;return n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]}var u=n(),c=[1|u[0],u[1],u[2],u[3],u[4],u[5]],l=16383&(u[6]<<8|u[7]),h=0,f=0;function p(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var s=0;s<16;s++)e[i+s]=o[s];return e||a(o)}var d=p;d.v1=function(t,e,r){var n=e&&r||0,i=e||[],o=void 0!==(t=t||{}).clockseq?t.clockseq:l,s=void 0!==t.msecs?t.msecs:(new Date).getTime(),u=void 0!==t.nsecs?t.nsecs:f+1,p=s-h+(u-f)/1e4;if(p<0&&void 0===t.clockseq&&(o=o+1&16383),(p<0||s>h)&&void 0===t.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=s,f=u,l=o;var d=(1e4*(268435455&(s+=122192928e5))+u)%4294967296;i[n++]=d>>>24&255,i[n++]=d>>>16&255,i[n++]=d>>>8&255,i[n++]=255&d;var g=s/4294967296*1e4&268435455;i[n++]=g>>>8&255,i[n++]=255&g,i[n++]=g>>>24&15|16,i[n++]=g>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var y=t.node||c,m=0;m<6;m++)i[n+m]=y[m];return e||a(i)},d.v4=p,d.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},d.unparse=a,t.exports=d},function(t,e,r){(function(e){var n=r(108).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,s,a,u,c,l){if(0===s||0!=(s&s-1))throw Error("N must be > 0 and a power of 2");if(s>i/128/a)throw Error("Parameter N is too large");if(a>i/128/u)throw Error("Parameter r is too large");var h,f=new e(256*a),p=new e(128*a*s),d=new Int32Array(16),g=new Int32Array(16),y=new e(64),m=n(t,r,1,128*u*a,"sha256");if(l){var b=u*s*2,v=0;h=function(){++v%1e3==0&&l({current:v,total:b,percent:v/b*100})}}for(var w=0;w<u;w++)_(m,128*w*a,a,s,p,f);return n(t,m,1,c,"sha256");function _(t,e,r,n,i,o){var s,a=128*r;for(t.copy(o,0,e,e+a),s=0;s<n;s++)o.copy(i,s*a,0,0+a),M(o,0,a,r),h&&h();for(s=0;s<n;s++){var u=0+64*(2*r-1);B(i,(o.readUInt32LE(u)&n-1)*a,o,0,a),M(o,0,a,r),h&&h()}o.copy(t,e,0,0+a)}function M(t,e,r,n){var i;for(o(t,e+64*(2*n-1),y,0,64),i=0;i<2*n;i++)B(t,64*i,y,0,64),A(y),o(y,0,t,r+64*i,64);for(i=0;i<n;i++)o(t,r+2*i*64,t,e+64*i,64);for(i=0;i<n;i++)o(t,r+64*(2*i+1),t,e+64*(i+n),64)}function E(t,e){return t<<e|t>>>32-e}function A(t){var e;for(e=0;e<16;e++)d[e]=(255&t[4*e+0])<<0,d[e]|=(255&t[4*e+1])<<8,d[e]|=(255&t[4*e+2])<<16,d[e]|=(255&t[4*e+3])<<24;for(o(d,0,g,0,16),e=8;e>0;e-=2)g[4]^=E(g[0]+g[12],7),g[8]^=E(g[4]+g[0],9),g[12]^=E(g[8]+g[4],13),g[0]^=E(g[12]+g[8],18),g[9]^=E(g[5]+g[1],7),g[13]^=E(g[9]+g[5],9),g[1]^=E(g[13]+g[9],13),g[5]^=E(g[1]+g[13],18),g[14]^=E(g[10]+g[6],7),g[2]^=E(g[14]+g[10],9),g[6]^=E(g[2]+g[14],13),g[10]^=E(g[6]+g[2],18),g[3]^=E(g[15]+g[11],7),g[7]^=E(g[3]+g[15],9),g[11]^=E(g[7]+g[3],13),g[15]^=E(g[11]+g[7],18),g[1]^=E(g[0]+g[3],7),g[2]^=E(g[1]+g[0],9),g[3]^=E(g[2]+g[1],13),g[0]^=E(g[3]+g[2],18),g[6]^=E(g[5]+g[4],7),g[7]^=E(g[6]+g[5],9),g[4]^=E(g[7]+g[6],13),g[5]^=E(g[4]+g[7],18),g[11]^=E(g[10]+g[9],7),g[8]^=E(g[11]+g[10],9),g[9]^=E(g[8]+g[11],13),g[10]^=E(g[9]+g[8],18),g[12]^=E(g[15]+g[14],7),g[13]^=E(g[12]+g[15],9),g[14]^=E(g[13]+g[12],13),g[15]^=E(g[14]+g[13],18);for(e=0;e<16;++e)d[e]=g[e]+d[e];for(e=0;e<16;e++){var r=4*e;t[r+0]=d[e]>>0&255,t[r+1]=d[e]>>8&255,t[r+2]=d[e]>>16&255,t[r+3]=d[e]>>24&255}}function B(t,e,r,n,i){for(var o=0;o<i;o++)r[n+o]^=t[e+o]}}}).call(this,r(0).Buffer)},function(t,e,r){t.exports=r(334)},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),s=r(54),a=o.Buffer,u=o.kMaxLength,c=t.crypto||t.msCrypto,l=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>l||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function f(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>l||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>u)throw new RangeError("buffer too small")}function p(t,e,r,i){if(n.browser){var o=t.buffer,a=new Uint8Array(o,e,r);return c.getRandomValues(a),i?void n.nextTick(function(){i(null,t)}):t}if(!i)return s(r).copy(t,e),t;s(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(!(a.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 h(r,e.length),f(n,r,e.length),p(e,r,n,i)},e.randomFillSync=function(e,r,n){void 0===r&&(r=0);if(!(a.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(r,e.length),void 0===n&&(n=e.length-r);return f(n,r,e.length),p(e,r,n)}):(e.randomFill=i,e.randomFillSync=i)}).call(this,r(8),r(24))},function(t,e,r){(function(e){var n=r(78),i=r(169),o=r(168),s=r(3),a=r(104),u=r(48),c=r(167);t.exports=function(t,r,l){var h;h=t.padding?t.padding:l?1:4;var f,p=n(t),d=p.modulus.byteLength();if(r.length>d||new s(r).cmp(p.modulus)>=0)throw new Error("decryption error");f=l?c(new s(r),p):a(r,p);var g=new e(d-f.length);if(g.fill(0),f=e.concat([g,f],d),4===h)return function(t,r){t.modulus;var n=t.modulus.byteLength(),s=(r.length,u("sha1").update(new e("")).digest()),a=s.length;if(0!==r[0])throw new Error("decryption error");var c=r.slice(1,a+1),l=r.slice(a+1),h=o(c,i(l,a)),f=o(l,i(h,n-a-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<i;)n+=t[o]^r[o];return n}(s,f.slice(0,a)))throw new Error("decryption error");var p=a;for(;0===f[p];)p++;if(1!==f[p++])throw new Error("decryption error");return f.slice(p)}(p,f);if(1===h)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var s=e.slice(2,i-1);e.slice(i-1,i);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,f,l);if(3===h)return f;throw new Error("unknown padding")}}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var n=r(78),i=r(54),o=r(48),s=r(169),a=r(168),u=r(3),c=r(167),l=r(104);t.exports=function(t,r,h){var f;f=t.padding?t.padding:h?1:4;var p,d=n(t);if(4===f)p=function(t,r){var n=t.modulus.byteLength(),c=r.length,l=o("sha1").update(new e("")).digest(),h=l.length,f=2*h;if(c>n-f-2)throw new Error("message too long");var p=new e(n-c-f-2);p.fill(0);var d=n-h-1,g=i(h),y=a(e.concat([l,p,new e([1]),r],d),s(g,d)),m=a(g,s(y,h));return new u(e.concat([new e([0]),m,y],n))}(d,r);else if(1===f)p=function(t,r,n){var o,s=r.length,a=t.modulus.byteLength();if(s>a-11)throw new Error("message too long");n?(o=new e(a-s-3)).fill(255):o=function(t,r){var n,o=new e(t),s=0,a=i(2*t),u=0;for(;s<t;)u===a.length&&(a=i(2*t),u=0),(n=a[u++])&&(o[s++]=n);return o}(a-s-3);return new u(e.concat([new e([0,n?1:2]),o,new e([0]),r],a))}(d,r,h);else{if(3!==f)throw new Error("unknown padding");if((p=new u(r)).cmp(d.modulus)>=0)throw new Error("data too long for modulus")}return h?l(p,d):c(p,d)}}).call(this,r(0).Buffer)},function(t,e,r){e.publicEncrypt=r(338),e.privateDecrypt=r(337),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},function(t,e,r){(function(e){var n=r(10),i=r(3);t.exports=function(t){return new s(t)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(t){this.curveType=o[t],this.curveType||(this.curveType={name:t}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function a(t,r,n){Array.isArray(t)||(t=t.toArray());var i=new e(t);if(n&&i.length<n){var o=new e(n-i.length);o.fill(0),i=e.concat([o,i])}return r?i.toString(r):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,s.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},s.prototype.computeSecret=function(t,r,n){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),a(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},s.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),a(r,t)},s.prototype.getPrivateKey=function(t){return a(this.keys.getPrivate(),t)},s.prototype.setPublicKey=function(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this.keys._importPublic(t),this},s.prototype.setPrivateKey=function(t,r){r=r||"utf8",e.isBuffer(t)||(t=new e(t,r));var n=new i(t);return n=n.toString(16),this.keys._importPrivate(n),this}}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var n=r(3),i=r(10).ec,o=r(78),s=r(170);function a(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,r,u,c,l){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,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new i(n),a=r.data.subjectPrivateKey.data;return o.verify(e,t,a)}(t,r,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var i=r.data.p,s=r.data.q,u=r.data.g,c=r.data.pub_key,l=o.signature.decode(t,"der"),h=l.s,f=l.r;a(h,s),a(f,s);var p=n.mont(i),d=h.invm(s);return 0===u.toRed(p).redPow(new n(e).mul(d).mod(s)).fromRed().mul(c.toRed(p).redPow(f.mul(d).mod(s)).fromRed()).mod(i).mod(s).cmp(f)}(t,r,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");r=e.concat([l,r]);for(var f=h.modulus.byteLength(),p=[1],d=0;r.length+p.length+2<f;)p.push(255),d++;p.push(0);for(var g=-1;++g<r.length;)p.push(r[g]);p=new e(p);var y=n.mont(h.modulus);t=(t=new n(t).toRed(y)).redPow(new n(h.publicExponent)),t=new e(t.fromRed().toArray());var m=d<8?1:0;for(f=Math.min(t.length,p.length),t.length!==p.length&&(m=1),g=-1;++g<f;)m|=t[g]^p[g];return 0===m}}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var n=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,o=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,s=r(80),a=r(107);t.exports=function(t,r){var u,c=t.toString(),l=c.match(n);if(l){var h="aes"+l[1],f=new e(l[2],"hex"),p=new e(l[3].replace(/\r?\n/g,""),"base64"),d=s(r,f.slice(0,8),parseInt(l[1],10)).key,g=[],y=a.createDecipheriv(h,d,f);g.push(y.update(p)),g.push(y.final()),u=e.concat(g)}else{var m=c.match(o);u=new e(m[2].replace(/\r?\n/g,""),"base64")}return{tag:c.match(i)[1],data:u}}}).call(this,r(0).Buffer)},function(t){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},function(t,e,r){"use strict";var n=r(61),i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),s=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}),u=n.define("RelativeDistinguishedName",function(){this.setof(o)}),c=n.define("RDNSequence",function(){this.seqof(u)}),l=n.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),h=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),f=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),p=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(l),this.key("validity").use(h),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())}),d=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())});t.exports=d},function(t,e,r){var n=r(1),i=r(171);function o(t){i.call(this,t),this.enc="pem"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){for(var r=i.prototype.encode.call(this,t).toString("base64"),n=["-----BEGIN "+e.label+"-----"],o=0;o<r.length;o+=64)n.push(r.slice(o,o+64));return n.push("-----END "+e.label+"-----"),n.join("\n")}},function(t,e,r){var n=e;n.der=r(171),n.pem=r(345)},function(t,e,r){var n=r(1),i=r(0).Buffer,o=r(172);function s(t){o.call(this,t),this.enc="pem"}n(s,o),t.exports=s,s.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,u=-1,c=0;c<r.length;c++){var l=r[c].match(s);if(null!==l&&l[2]===n){if(-1!==a){if("END"!==l[1])break;u=c;break}if("BEGIN"!==l[1])break;a=c}}if(-1===a||-1===u)throw new Error("PEM section not found for: "+n);var h=r.slice(a+1,u).join("");h.replace(/[^a-z0-9\+\/=]+/gi,"");var f=new i(h,"base64");return o.prototype.decode.call(this,f,e)}},function(t,e,r){var n=e;n.der=r(172),n.pem=r(347)},function(t,e,r){var n=r(173);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=n._reverse(e.tag)},function(t,e,r){var n=r(60).Reporter,i=r(60).EncoderBuffer,o=r(60).DecoderBuffer,s=r(22),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=c;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var t=this._baseState,e={};l.forEach(function(r){e[r]=t[r]});var r=new this.constructor(e.parent);return r._baseState=e,r},c.prototype._wrap=function(){var t=this._baseState;u.forEach(function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}},this)},c.prototype._init=function(t){var e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter(function(t){return t._baseState.parent===this},this),s.equal(e.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(t){var e=this._baseState,r=t.filter(function(t){return t instanceof this.constructor},this);t=t.filter(function(t){return!(t instanceof this.constructor)},this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach(function(t){t._baseState.parent=this},this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map(function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach(function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r}),e}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(t){c.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),a.forEach(function(t){c.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}}),c.prototype.use=function(t){s(t);var e=this._baseState;return s(null===e.use),e.use=t,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(t){var e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},c.prototype.explicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},c.prototype.implicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},c.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},c.prototype.key=function(t){var e=this._baseState;return s(null===e.key),e.key=t,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(t){var e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},c.prototype.contains=function(t){var e=this._baseState;return s(null===e.use),e.contains=t,this},c.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(s=this._peekTag(t,u,r.any),t.isError(s))return s}else{var c=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(c)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){var l=this._decodeTag(t,r.explicit);if(t.isError(l))return l;t=l}var h=t.offset;if(null===r.use&&null===r.choice){if(r.any)c=t.save();var f=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(f))return f;r.any?i=t.raw(c):t=f}if(e&&e.track&&null!==r.tag&&e.track(t.path(),h,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(t,e)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(p,e)}}return r.obj&&s&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},c.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},c.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var s=t.save(),a=r.choice[o];try{var u=a._decode(t,e);if(t.isError(u))return!1;n={type:o,value:u},i=!0}catch(e){return t.restore(s),!1}return!0},this),i?n:t.error("Choice not matched")},c.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},c.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},c.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var s=null,a=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)s=this._getUse(i.contains,r)._encode(t,e),a=!0;else if(i.children)s=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var n=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i},this).filter(function(t){return t}),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(t.map(function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)},u))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(s=this._encodePrimitive(i.tag,t),a=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,l=null===i.implicit?"universal":"context";null===c?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,a,l,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},c.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},c.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},c.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},function(t,e,r){var n=r(1);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map(function(t){return"["+JSON.stringify(t)+"]"}).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e){var r=[].indexOf;t.exports=function(t,e){if(r)return t.indexOf(e);for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}},function(module,exports,__webpack_require__){var indexOf=__webpack_require__(352),Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(t),function(e){r[e]=t[e]}),forEach(globals,function(e){t[e]&&(r[e]=t[e])});var o=Object_keys(r),s=n.call(r,this.code);return forEach(Object_keys(r),function(e){(e in t||-1===indexOf(o,e))&&(t[e]=r[e])}),forEach(globals,function(e){e in t||defineProp(t,e,r[e])}),document.body.removeChild(e),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return forEach(Object_keys(e),function(r){t[r]=e[r]}),r},forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}}),exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}},function(t,e,r){var n=r(61),i=r(1);function o(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new o(t,e)},o.prototype._createNamed=function(t){var e;try{e=r(353).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},o.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},o.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},function(t,e,r){"use strict";var n=r(61);e.certificate=r(344);var i=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});e.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});e.RSAPublicKey=o;var s=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())});e.PublicKey=s;var a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),u=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())});e.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});e.EncryptedPrivateKey=c;var l=n.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});e.DSAPrivateKey=l,e.DSAparam=n.define("DSAparam",function(){this.int()});var h=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())});e.ECPrivateKey=h;var f=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});e.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},function(t,e,r){(function(e){var n=r(186),i=r(104),o=r(10).ec,s=r(3),a=r(78),u=r(170);function c(t,r,i,o){if((t=new e(t.toArray())).length<r.byteLength()){var s=new e(r.byteLength()-t.length);s.fill(0),t=e.concat([s,t])}var a=i.length,u=function(t,r){t=(t=l(t,r)).mod(r);var n=new e(t.toArray());if(n.length<r.byteLength()){var i=new e(r.byteLength()-n.length);i.fill(0),n=e.concat([i,n])}return n}(i,r),c=new e(a);c.fill(1);var h=new e(a);return h.fill(0),h=n(o,h).update(c).update(new e([0])).update(t).update(u).digest(),c=n(o,h).update(c).digest(),{k:h=n(o,h).update(c).update(new e([1])).update(t).update(u).digest(),v:c=n(o,h).update(c).digest()}}function l(t,e){var r=new s(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function h(t,r,i){var o,s;do{for(o=new e(0);8*o.length<t.bitLength();)r.v=n(i,r.k).update(r.v).digest(),o=e.concat([o,r.v]);s=l(o,t),r.k=n(i,r.k).update(r.v).update(new e([0])).digest(),r.v=n(i,r.k).update(r.v).digest()}while(-1!==s.cmp(t));return s}function f(t,e,r,n){return t.toRed(s.mont(r)).redPow(e).fromRed().mod(n)}t.exports=function(t,r,n,p,d){var g=a(r);if(g.curve){if("ecdsa"!==p&&"ecdsa/rsa"!==p)throw new Error("wrong private key type");return function(t,r){var n=u[r.curve.join(".")];if(!n)throw new Error("unknown curve "+r.curve.join("."));var i=new o(n).keyFromPrivate(r.privateKey).sign(t);return new e(i.toDER())}(t,g)}if("dsa"===g.type){if("dsa"!==p)throw new Error("wrong private key type");return function(t,r,n){for(var i,o=r.params.priv_key,a=r.params.p,u=r.params.q,p=r.params.g,d=new s(0),g=l(t,u).mod(u),y=!1,m=c(o,u,t,n);!1===y;)i=h(u,m,n),d=f(p,i,a,u),0===(y=i.invm(u).imul(g.add(o.mul(d))).mod(u)).cmpn(0)&&(y=!1,d=new s(0));return function(t,r){t=t.toArray(),r=r.toArray(),128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r));var n=[48,t.length+r.length+4,2,t.length];return n=n.concat(t,[2,r.length],r),new e(n)}(d,y)}(t,g,n)}if("rsa"!==p&&"ecdsa/rsa"!==p)throw new Error("wrong private key type");t=e.concat([d,t]);for(var y=g.modulus.byteLength(),m=[0,1];t.length+m.length+1<y;)m.push(255);m.push(0);for(var b=-1;++b<t.length;)m.push(t[b]);return i(m,g)},t.exports.getKey=c,t.exports.makeKey=h}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var n=r(48),i=r(58),o=r(1),s=r(356),a=r(341),u=r(185);function c(t){i.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){i.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){return new c(t)}function f(t){return new l(t)}Object.keys(u).forEach(function(t){u[t].id=new e(u[t].id,"hex"),u[t.toLowerCase()]=u[t]}),o(c,i.Writable),c.prototype._write=function(t,e,r){this._hash.update(t),r()},c.prototype.update=function(t,r){return"string"==typeof t&&(t=new e(t,r)),this._hash.update(t),this},c.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=s(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},o(l,i.Writable),l.prototype._write=function(t,e,r){this._hash.update(t),r()},l.prototype.update=function(t,r){return"string"==typeof t&&(t=new e(t,r)),this._hash.update(t),this},l.prototype.verify=function(t,r,n){"string"==typeof r&&(r=new e(r,n)),this.end();var i=this._hash.digest();return a(r,i,t,this._signType,this._tag)},t.exports={Sign:h,Verify:f,createSign:h,createVerify:f}}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var n=r(3),i=new(r(175)),o=new n(24),s=new n(11),a=new n(10),u=new n(3),c=new n(7),l=r(176),h=r(54);function f(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._pub=new n(t),this}function p(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._priv=new n(t),this}t.exports=g;var d={};function g(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=f,this.setPrivateKey=p):this._primeCode=8}function y(t,r){var n=new e(t.toArray());return r?n.toString(r):n}Object.defineProperty(g.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 d)return d[n];var h,f=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!i.test(t))return f+=1,f+="02"===r||"05"===r?8:4,d[n]=f,f;switch(i.test(t.shrn(1))||(f+=2),r){case"02":t.mod(o).cmp(s)&&(f+=8);break;case"05":(h=t.mod(a)).cmp(u)&&h.cmp(c)&&(f+=8);break;default:f+=4}return d[n]=f,f}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new n(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.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.length<o.length){var s=new e(o.length-i.length);s.fill(0),i=e.concat([s,i])}return i},g.prototype.getPublicKey=function(t){return y(this._pub,t)},g.prototype.getPrivateKey=function(t){return y(this._priv,t)},g.prototype.getPrime=function(t){return y(this.__prime,t)},g.prototype.getGenerator=function(t){return y(this._gen,t)},g.prototype.setGenerator=function(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this.__gen=t,this._gen=new n(t),this}}).call(this,r(0).Buffer)},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(t){var n=r(176),i=r(359),o=r(358);var s={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,a,u){return t.isBuffer(i)||void 0===s[i]?e(r,"binary",i,a):(i=i||"binary",u=u||"binary",a=a||new t([2]),t.isBuffer(a)||(a=new t(a,u)),"number"==typeof r?new o(n(r,a),a,!0):(t.isBuffer(r)||(r=new t(r,i)),new o(r,a,!0)))}}).call(this,r(0).Buffer)},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){"use strict";var n=r(22),i=r(1),o=r(105),s=o.Cipher,a=o.DES;function u(t){s.call(this,t);var e=new function(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}(this.type,this.options.key);this._edeState=e}i(u,s),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},function(t,e,r){"use strict";var n=r(22),i=r(1),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;n<r.length;n++){var s=r[n];e.prototype[s]=o[s]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new function(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=t[e+a];o._update.call(this,s,0,r,n);for(a=0;a<this.blockSize;a++)s[a]=r[n+a]}else{o._update.call(this,t,e,r,n);for(a=0;a<this.blockSize;a++)r[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=t[e+a]}}},function(t,e,r){"use strict";var n=r(22),i=r(1),o=r(105),s=o.utils,a=o.Cipher;function u(t){a.call(this,t);var e=new function(){this.tmp=new Array(2),this.keys=null};this._desState=e,this.deriveKeys(e,t.key)}i(u,a),t.exports=u,u.create=function(t){return new u(t)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,"Invalid key length");var r=s.readUInt32BE(e,0),i=s.readUInt32BE(e,4);s.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var o=0;o<t.keys.length;o+=2){var a=c[o>>>1];r=s.r28shl(r,a),i=s.r28shl(i,a),s.pc2(r,i,t.keys,o)}},u.prototype._update=function(t,e,r,n){var i=this._desState,o=s.readUInt32BE(t,e),a=s.readUInt32BE(t,e+4);s.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],s.writeUInt32BE(r,o,n),s.writeUInt32BE(r,a,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},u.prototype._unpad=function(t){for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,r,n,i){for(var o=e,a=r,u=0;u<t.keys.length;u+=2){var c=t.keys[u],l=t.keys[u+1];s.expand(a,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var h=s.substitute(c,l),f=a;a=(o^s.permute(h))>>>0,o=f}s.rip(a,o,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var o=r,a=e,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],l=t.keys[u+1];s.expand(o,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var h=s.substitute(c,l),f=o;o=(a^s.permute(h))>>>0,a=f}s.rip(o,a,n,i)}},function(t,e,r){"use strict";var n=r(22);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;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<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},function(t,e,r){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>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,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=e>>>a+s&1,i<<=1,i|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|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,s=0,a=n.length>>>1,u=0;u<a;u++)o<<=1,o|=t>>>n[u]&1;for(u=a;u<n.length;u++)s<<=1,s|=e>>>n[u]&1;r[i+0]=o>>>0,r[i+1]=s>>>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.length;r++)e<<=1,e|=t>>>o[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},function(t,e,r){(function(e){var n=r(35),i=r(105),o=r(1),s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function a(t){n.call(this);var r,i=t.mode.toLowerCase(),o=s[i];r=t.decrypt?"decrypt":"encrypt";var a=t.key;"des-ede"!==i&&"des-ede-cbc"!==i||(a=e.concat([a,a.slice(0,8)]));var u=t.iv;this._des=o.create({key:a,iv:u,type:r})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],t.exports=a,o(a,n),a.prototype._update=function(t){return new e(this._des.update(t))},a.prototype._final=function(){return new e(this._des.final())}}).call(this,r(0).Buffer)},function(t,e,r){var n=r(178),i=r(2).Buffer,o=r(106),s=r(177),a=r(35),u=r(79),c=r(80);function l(t,e,r){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function f(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new s(a.module,e,r,!0):"auth"===a.type?new n(a.module,e,r,!0):new l(a.module,e,r)}r(1)(l,a),l.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)},l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15],r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=i.concat([this.cache,t])},h.prototype.get=function(t){var e;if(t){if(this.cache.length>16)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 r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return f(t,n.key,n.iv)},e.createDecipheriv=f},function(t,e,r){var n=r(2).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(0!=(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.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)},s.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=s},function(t,e,r){(function(t){var n=r(62);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(this,r(0).Buffer)},function(t,e,r){var n=r(2).Buffer;function i(t,e,r){for(var n,i,s,a=-1,u=0;++a<8;)n=t._cipher.encryptBlock(t._prev),i=e&1<<7-a?128:0,u+=(128&(s=n[0]^i))>>a%8,t._prev=o(t._prev,r?i:s);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<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},function(t,e,r){var n=r(2).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},function(t,e,r){var n=r(2).Buffer,i=r(62);function o(t,e,r){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){s=n.concat([s,o(t,e,r)]);break}i=t._cache.length,s=n.concat([s,o(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},function(t,e,r){var n=r(62);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){var n=r(106),i=r(178),o=r(2).Buffer,s=r(177),a=r(35),u=r(79),c=r(80);function l(t,e,r){a.call(this),this._cache=new f,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(1)(l,a),l.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var h=o.alloc(16,16);function f(){this.cache=o.allocUnsafe(0)}function p(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,e,r):"auth"===a.type?new i(a.module,e,r):new l(a.module,e,r)}l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},f.prototype.add=function(t){this.cache=o.concat([this.cache,t])},f.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},f.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=p,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(e,!1,r.key,r.iv);return p(t,i.key,i.iv)}},function(t,e,r){"use strict";var n=r(2).Buffer,i=r(58).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);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){"use strict";(function(e){var n=r(1),i=r(377),o=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function a(t,e){return t<<e|t>>>32-e}function u(t,e,r,n,i,o,s){return a(t+(e&r|~e&n)+i+o|0,s)+e|0}function c(t,e,r,n,i,o,s){return a(t+(e&n|r&~n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return a(t+(e^r^n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return a(t+(r^(e|~n))+i+o|0,s)+e|0}n(s,i),s.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,s=this._d;n=h(n=h(n=h(n=h(n=l(n=l(n=l(n=l(n=c(n=c(n=c(n=c(n=u(n=u(n=u(n=u(n,i=u(i,s=u(s,r=u(r,n,i,s,t[0],3614090360,7),n,i,t[1],3905402710,12),r,n,t[2],606105819,17),s,r,t[3],3250441966,22),i=u(i,s=u(s,r=u(r,n,i,s,t[4],4118548399,7),n,i,t[5],1200080426,12),r,n,t[6],2821735955,17),s,r,t[7],4249261313,22),i=u(i,s=u(s,r=u(r,n,i,s,t[8],1770035416,7),n,i,t[9],2336552879,12),r,n,t[10],4294925233,17),s,r,t[11],2304563134,22),i=u(i,s=u(s,r=u(r,n,i,s,t[12],1804603682,7),n,i,t[13],4254626195,12),r,n,t[14],2792965006,17),s,r,t[15],1236535329,22),i=c(i,s=c(s,r=c(r,n,i,s,t[1],4129170786,5),n,i,t[6],3225465664,9),r,n,t[11],643717713,14),s,r,t[0],3921069994,20),i=c(i,s=c(s,r=c(r,n,i,s,t[5],3593408605,5),n,i,t[10],38016083,9),r,n,t[15],3634488961,14),s,r,t[4],3889429448,20),i=c(i,s=c(s,r=c(r,n,i,s,t[9],568446438,5),n,i,t[14],3275163606,9),r,n,t[3],4107603335,14),s,r,t[8],1163531501,20),i=c(i,s=c(s,r=c(r,n,i,s,t[13],2850285829,5),n,i,t[2],4243563512,9),r,n,t[7],1735328473,14),s,r,t[12],2368359562,20),i=l(i,s=l(s,r=l(r,n,i,s,t[5],4294588738,4),n,i,t[8],2272392833,11),r,n,t[11],1839030562,16),s,r,t[14],4259657740,23),i=l(i,s=l(s,r=l(r,n,i,s,t[1],2763975236,4),n,i,t[4],1272893353,11),r,n,t[7],4139469664,16),s,r,t[10],3200236656,23),i=l(i,s=l(s,r=l(r,n,i,s,t[13],681279174,4),n,i,t[0],3936430074,11),r,n,t[3],3572445317,16),s,r,t[6],76029189,23),i=l(i,s=l(s,r=l(r,n,i,s,t[9],3654602809,4),n,i,t[12],3873151461,11),r,n,t[15],530742520,16),s,r,t[2],3299628645,23),i=h(i,s=h(s,r=h(r,n,i,s,t[0],4096336452,6),n,i,t[7],1126891415,10),r,n,t[14],2878612391,15),s,r,t[5],4237533241,21),i=h(i,s=h(s,r=h(r,n,i,s,t[12],1700485571,6),n,i,t[3],2399980690,10),r,n,t[10],4293915773,15),s,r,t[1],2240044497,21),i=h(i,s=h(s,r=h(r,n,i,s,t[8],1873313359,6),n,i,t[15],4264355552,10),r,n,t[6],2734768916,15),s,r,t[13],1309151649,21),i=h(i,s=h(s,r=h(r,n,i,s,t[4],4149444226,6),n,i,t[11],3174756917,10),r,n,t[2],718787259,15),s,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+s|0},s.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=s}).call(this,r(0).Buffer)},function(t,e,r){var n=r(80),i=r(107),o=r(367),s=r(361),a=r(106);function u(t,e,r){if(t=t.toLowerCase(),a[t])return i.createCipheriv(t,e,r);if(s[t])return new o({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function c(t,e,r){if(t=t.toLowerCase(),a[t])return i.createDecipheriv(t,e,r);if(s[t])return new o({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,i;if(t=t.toLowerCase(),a[t])r=a[t].key,i=a[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,i=s[t].iv}var o=n(e,!1,r,i);return u(t,o.key,o.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var r,i;if(t=t.toLowerCase(),a[t])r=a[t].key,i=a[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,i=s[t].iv}var o=n(e,!1,r,i);return c(t,o.key,o.iv)},e.createDecipheriv=e.Decipheriv=c,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},function(t,e,r){(function(e,n){var i,o=r(184),s=r(183),a=r(182),u=r(2).Buffer,c=e.crypto&&e.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function f(t,e,r,n,i){return c.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(t){return c.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)}).then(function(t){return u.from(t)})}t.exports=function(t,r,p,d,g,y){if(u.isBuffer(t)||(t=u.from(t,s)),u.isBuffer(r)||(r=u.from(r,s)),o(p,d),"function"==typeof g&&(y=g,g=void 0),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");var m=l[(g=g||"sha1").toLowerCase()];if(!m||"function"!=typeof e.Promise)return n.nextTick(function(){var e;try{e=a(t,r,p,d,g)}catch(t){return y(t)}y(null,e)});!function(t,e){t.then(function(t){n.nextTick(function(){e(null,t)})},function(t){n.nextTick(function(){e(t)})})}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==h[t])return h[t];var r=f(i=i||u.alloc(8),i,10,128,t).then(function(){return!0}).catch(function(){return!1});return h[t]=r,r}(m).then(function(e){return e?f(t,r,p,d,m):a(t,r,p,d,g)}),y)}}).call(this,r(8),r(24))},function(t,e,r){t.exports=r(185)},function(t,e,r){"use strict";var n=r(1),i=r(2).Buffer,o=r(35),s=i.alloc(128),a=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u<a;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},function(t,e){var r=function(t,e){for(var r=[],n=0;n<t;++n)r.push(e(n));return r};t.exports={generate:r,replicate:function(t,e){return r(t,function(){return e})},concat:function(t,e){return t.concat(e)},flatten:function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=0,o=t[r].length;i<o;++i)e.push(t[r][i]);return e},chunksOf:function(t,e){for(var r=[],n=0,i=e.length;n<i;n+=t)r.push(e.slice(n,n+t));return r}}},function(t,e,r){(function(e){var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=r(109),o=r(166),s=r(10),a=(r(165),new s.ec("secp256k1")),u=r(164),c=u.keccak256,l=u.keccak256s,h=function(t){for(var e=l(t.slice(2)),r="0x",n=0;n<40;n++)r+=parseInt(e[n+2],16)>7?t[n+2].toUpperCase():t[n+2];return r},f=function(t){var r=new e(t.slice(2),"hex"),n="0x"+a.keyFromPrivate(r).getPublic(!1,"hex").slice(2),i=c(n);return{address:h("0x"+i.slice(-40)),privateKey:t}},p=function(t){var e=n(t,3),r=e[0],o=i.pad(32,e[1]),s=i.pad(32,e[2]);return i.flatten([o,s,r])},d=function(t){return[i.slice(64,i.length(t),t),i.slice(0,32,t),i.slice(32,64,t)]},g=function(t){return function(r,n){var s=a.keyFromPrivate(new e(n.slice(2),"hex")).sign(new e(r.slice(2),"hex"),{canonical:!0});return p([o.fromString(i.fromNumber(t+s.recoveryParam)),i.pad(32,i.fromNat("0x"+s.r.toString(16))),i.pad(32,i.fromNat("0x"+s.s.toString(16)))])}},y=g(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 f(n)},toChecksum:h,fromPrivate:f,sign:y,makeSigner:g,recover:function(t,r){var n=d(r),o={v:i.toNumber(n[0]),r:n[1].slice(2),s:n[2].slice(2)},s="0x"+a.recoverPubKey(new e(t.slice(2),"hex"),o,o.v<2?o.v:1-o.v%2).encode("hex",!1).slice(2),u=c(s);return h("0x"+u.slice(-40))},encodeSignature:p,decodeSignature:d}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e,n){var i=r(9),o=r(47),s=r(46),a=r(190),u=r(384),c=r(164),l=r(165),h=r(166),f=r(109),p=r(81),d=r(335),g=r(333),y=r(21),m=r(12),b=function(t){return i.isUndefined(t)||i.isNull(t)},v=function(t){for(;t&&t.startsWith("0x0");)t="0x"+t.slice(3);return t},w=function(t){return t.length%2==1&&(t=t.replace("0x","0x0")),t},_=function(){var t=this;o.packageInit(this,arguments),delete this.BatchRequest,delete this.extend;var e=[new s({name:"getId",call:"net_version",params:0,outputFormatter:y.hexToNumber}),new s({name:"getGasPrice",call:"eth_gasPrice",params:0}),new s({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[function(t){if(y.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"}_.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},_.prototype.create=function(t){return this._addAccountFunctions(u.create(t||y.randomHex(32)))},_.prototype.privateKeyToAccount=function(t){return this._addAccountFunctions(u.fromPrivate(t))},_.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),a.reject(o);function s(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),a.reject(new Error('"gas" is missing'));try{var i=t=m.formatters.inputCallFormatter(t);i.to=t.to||"0x",i.data=t.data||"0x",i.value=t.value||"0x",i.chainId=y.numberToHex(t.chainId);var s=l.encode([f.fromNat(i.nonce),f.fromNat(i.gasPrice),f.fromNat(i.gas),i.to.toLowerCase(),f.fromNat(i.value),i.data,f.fromNat(i.chainId||"0x1"),"0x","0x"]),p=c.keccak256(s),d=u.makeSigner(2*h.toNumber(i.chainId||"0x1")+35)(c.keccak256(s),e),g=l.decode(s).slice(0,6).concat(u.decodeSignature(d));g[6]=w(v(g[6])),g[7]=w(v(g[7])),g[8]=w(v(g[8]));var b=l.encode(g),_=l.decode(b);n={messageHash:p,v:v(_[6]),r:v(_[7]),s:v(_[8]),rawTransaction:b}}catch(t){return r(t),a.reject(t)}return r(null,n),n}return void 0!==t.nonce&&void 0!==t.chainId&&void 0!==t.gasPrice?a.resolve(s(t)):a.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 s(i.extend(t,{chainId:e[0],gasPrice:e[1],nonce:e[2]}))})},_.prototype.recoverTransaction=function(t){var e=l.decode(t),r=u.encodeSignature(e.slice(6,9)),n=f.toNumber(e[6]),i=n<35?[]:[f.fromNumber(n-35>>1),"0x","0x"],o=e.slice(0,6).concat(i),s=l.encode(o);return u.recover(c.keccak256(s),r)},_.prototype.hashMessage=function(t){var e=y.isHexStrict(t)?y.hexToBytes(t):t,r=n.from(e),i="Ethereum Signed Message:\n"+e.length,o=n.from(i),s=n.concat([o,r]);return c.keccak256s(s)},_.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}},_.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))},_.prototype.decrypt=function(t,e,r){if(!i.isString(e))throw new Error("No password given.");var o,s,a=i.isObject(t)?t:JSON.parse(r?t.toLowerCase():t);if(3!==a.version)throw new Error("Not a valid V3 wallet");if("scrypt"===a.crypto.kdf)s=a.crypto.kdfparams,o=d(new n(e),new n(s.salt,"hex"),s.n,s.r,s.p,s.dklen);else{if("pbkdf2"!==a.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(s=a.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");o=p.pbkdf2Sync(new n(e),new n(s.salt,"hex"),s.c,s.dklen,"sha256")}var u=new n(a.crypto.ciphertext,"hex");if(y.sha3(n.concat([o.slice(16,32),u])).replace("0x","")!==a.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var c=p.createDecipheriv(a.crypto.cipher,o.slice(0,16),new n(a.crypto.cipherparams.iv,"hex")),l="0x"+n.concat([c.update(u),c.final()]).toString("hex");return this.privateKeyToAccount(l)},_.prototype.encrypt=function(t,e,r){var i,o=this.privateKeyToAccount(t),s=(r=r||{}).salt||p.randomBytes(32),a=r.iv||p.randomBytes(16),u=r.kdf||"scrypt",c={dklen:r.dklen||32,salt:s.toString("hex")};if("pbkdf2"===u)c.c=r.c||262144,c.prf="hmac-sha256",i=p.pbkdf2Sync(new n(e),s,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=d(new n(e),s,c.n,c.r,c.p,c.dklen)}var l=p.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),a);if(!l)throw new Error("Unsupported cipher");var h=n.concat([l.update(new n(o.privateKey.replace("0x",""),"hex")),l.final()]),f=y.sha3(n.concat([i.slice(16,32),new n(h,"hex")])).replace("0x","");return{version:3,id:g.v4({random:r.uuid||p.randomBytes(16)}),address:o.address.toLowerCase().replace("0x",""),crypto:{ciphertext:h.toString("hex"),cipherparams:{iv:a.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:u,kdfparams:c,mac:f.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;r<t;++r)this.add(this._accounts.create(e).privateKey);return this},M.prototype.add=function(t){return i.isString(t)&&(t=this._accounts.privateKeyToAccount(t)),this[t.address]?this[t.address]:((t=this._accounts.privateKeyToAccount(t.privateKey)).index=this._findSafeIndex(),this[t.index]=t,this[t.address]=t,this[t.address.toLowerCase()]=t,this.length++,t)},M.prototype.remove=function(t){var e=this[t];return!(!e||!e.address)&&(this[e.address].privateKey=null,delete this[e.address],this[e.address.toLowerCase()].privateKey=null,delete this[e.address.toLowerCase()],this[e.index].privateKey=null,delete this[e.index],this.length--,!0)},M.prototype.clear=function(){var t=this;return this._currentIndexes().forEach(function(e){t.remove(e)}),this},M.prototype.encrypt=function(t,e){var r=this;return this._currentIndexes().map(function(n){return r[n].encrypt(t,e)})},M.prototype.decrypt=function(t,e){var r=this;return t.forEach(function(t){var n=r._accounts.decrypt(t,e);if(!n)throw new Error("Couldn't decrypt accounts. Password wrong?");r.add(n)}),this},M.prototype.save=function(t,e){return localStorage.setItem(e||this.defaultKeyName,JSON.stringify(this.encrypt(t))),!0},M.prototype.load=function(t,e){var r=localStorage.getItem(e||this.defaultKeyName);if(r)try{r=JSON.parse(r)}catch(t){}return this.decrypt(r||[],t)},"undefined"==typeof localStorage&&(delete M.prototype.save,delete M.prototype.load),t.exports=_}).call(this,r(8),r(0).Buffer)},function(t,e,r){var n=r(26),i=r(45),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){var n=r(26),i=r(45),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(26),i=r(45),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(26),i=r(45),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(26),i=r(45),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(26),i=r(45),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(26),i=r(12).formatters,o=r(45),s=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};(s.prototype=new o({})).constructor=s,s.prototype.isType=function(t){return!!t.match(/address(\[([0-9]*)\])?/)},t.exports=s},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 s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(0).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}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<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=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<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=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,s=o%n,a=Math.min(o,o-s)+r,c=0,l=r;l<a;l+=n)c=u(t,l,l+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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 f(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,h=67108863&u,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;l+=(s=(i=0|t.words[d])*(o=0|e.words[p])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|l}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,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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 f=l[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+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!==s),this.toArrayLike(s,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 s,a,u="le"===e,c=new t(o),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],h=8191&l,f=l>>>13,p=0|s[1],d=8191&p,g=p>>>13,y=0|s[2],m=8191&y,b=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],E=8191&M,A=M>>>13,B=0|s[5],T=8191&B,R=B>>>13,x=0|s[6],S=8191&x,k=x>>>13,C=0|s[7],I=8191&C,j=C>>>13,F=0|s[8],O=8191&F,P=F>>>13,L=0|s[9],N=8191&L,D=L>>>13,U=0|a[0],W=8191&U,q=U>>>13,z=0|a[1],G=8191&z,H=z>>>13,V=0|a[2],K=8191&V,$=V>>>13,Y=0|a[3],Z=8191&Y,J=Y>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191&lt,ft=lt>>>13,pt=0|a[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(h,W))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,W)|0))<<13)|0;c=((o=Math.imul(f,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,W),i=(i=Math.imul(d,q))+Math.imul(g,W)|0,o=Math.imul(g,q);var mt=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(f,G)|0))<<13)|0;c=((o=o+Math.imul(f,H)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,W),i=(i=Math.imul(m,q))+Math.imul(b,W)|0,o=Math.imul(b,q),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,H)|0;var bt=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,W),i=(i=Math.imul(w,q))+Math.imul(_,W)|0,o=Math.imul(_,q),n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(d,K)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,$)|0;var vt=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(f,Z)|0))<<13)|0;c=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,W),i=(i=Math.imul(E,q))+Math.imul(A,W)|0,o=Math.imul(A,q),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,$)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,J)|0;var wt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,W),i=(i=Math.imul(T,q))+Math.imul(R,W)|0,o=Math.imul(R,q),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(S,W),i=(i=Math.imul(S,q))+Math.imul(k,W)|0,o=Math.imul(k,q),n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var Mt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;c=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,W),i=(i=Math.imul(I,q))+Math.imul(j,W)|0,o=Math.imul(j,q),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Et=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(f,ut)|0))<<13)|0;c=((o=o+Math.imul(f,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,q))+Math.imul(P,W)|0,o=Math.imul(P,q),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var At=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,q))+Math.imul(D,W)|0,o=Math.imul(D,q),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,ft)|0;var Bt=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,G),i=(i=Math.imul(N,H))+Math.imul(D,G)|0,o=Math.imul(D,H),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ft)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,$))+Math.imul(D,K)|0,o=Math.imul(D,$),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var Rt=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(b,dt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,ft)|0;var xt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ft)|0;var St=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(A,dt)|0))<<13)|0;c=((o=o+Math.imul(A,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var kt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,ft)|0;var Ct=(c+(n=n+Math.imul(S,dt)|0)|0)+((8191&(i=(i=i+Math.imul(S,gt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,ft)|0;var It=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(j,dt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,ft))+Math.imul(D,ht)|0,o=Math.imul(D,ft);var jt=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(P,dt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Ft=(c+(n=Math.imul(N,dt))|0)+((8191&(i=(i=Math.imul(N,gt))+Math.imul(D,dt)|0))<<13)|0;return c=((o=Math.imul(D,gt))+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,u[0]=yt,u[1]=mt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=At,u[9]=Bt,u[10]=Tt,u[11]=Rt,u[12]=xt,u[13]=St,u[14]=kt,u[15]=Ct,u[16]=It,u[17]=jt,u[18]=Ft,0!==c&&(u[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(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<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=u,f=c,p=0;p<s;p++){var d=r[l+p],g=n[l+p],y=r[l+p+s],m=n[l+p+s],b=h*y-f*m;m=h*m+f*y,y=b,r[l+p]=d+y,n[l+p]=g+m,r[l+p+s]=d-y,n[l+p+s]=g-m,p!==a&&(b=u*h-c*f,f=u*f+c*h,h=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,h,n,i);for(var p=0;p<n;p++){var d=a[p]*l[p]-u[p]*h[p];u[p]=a[p]*h[p]+u[p]*l[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=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<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),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<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>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,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||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?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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,s,a},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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=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:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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 y={k256:null,p224:null,p192:null,p25519:null};function m(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(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.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 E(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)}m.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.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=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(b,m),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(v,m),i(w,m),i(_,m),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y<d);var m=this.pow(h,new o(1).iushln(d-y-1));f=f.redMul(m),h=m.redSqr(),p=p.redMul(h),d=y}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var h=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=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 E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.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)},E.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(36)(t))},function(t,e,r){"use strict";var n=r(9),i=r(47),o=r(46),s=r(21),a=r(83).subscription,u=r(12).formatters,c=r(12).errors,l=r(192),h=r(188),f=function t(e,r,o){var a=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 l=c[c.length-1];n.isObject(l)&&!n.isArray(l)&&(o=l,this.options=n.extend(this.options,this._getOrSetDefaultOptions(o)),n.isObject(r)&&(r=null)),Object.defineProperty(this.options,"address",{set:function(t){t&&(a._address=s.toChecksumAddress(u.inputAddressFormatter(t)))},get:function(){return a._address},enumerable:!0}),Object.defineProperty(this.options,"jsonInterface",{set:function(t){return a.methods={},a.events={},a._jsonInterface=t.map(function(t){var e,r;if(t.name&&(r=s._jsonInterfaceMethodToString(t)),"function"===t.type){if(t.signature=h.encodeFunctionSignature(r),e=a._createTxObject.bind({method:t,parent:a}),a.methods[t.name]){var n=a._createTxObject.bind({method:t,parent:a,nextMethod:a.methods[t.name]});a.methods[t.name]=n}else a.methods[t.name]=e;a.methods[t.signature]=e,a.methods[r]=e}else if("event"===t.type){t.signature=h.encodeEventSignature(r);var i=a._on.bind(a,t.signature);a.events[t.name]&&"bound "!==a.events[t.name].name||(a.events[t.name]=i),a.events[t.signature]=i,a.events[r]=i}return t}),a.events.allEvents=a._on.bind(a,"allevents"),a._jsonInterface},get:function(){return a._jsonInterface},enumerable:!0});var f=this.constructor.defaultAccount,p=this.constructor.defaultBlock||"latest";Object.defineProperty(this,"defaultAccount",{get:function(){return f},set:function(t){return t&&(f=s.toChecksumAddress(u.inputAddressFormatter(t))),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return p},set:function(t){return p=t,t},enumerable:!0}),this.methods={},this.events={},this._address=null,this._jsonInterface=[],this.options.address=r,this.options.jsonInterface=e};f.setProvider=function(t,e){i.packageInit(this,[t]),this._ethAccounts=e},f.prototype._getCallback=function(t){if(t&&n.isFunction(t[t.length-1]))return t.pop()},f.prototype._checkListener=function(t,e){if(e===t)throw new Error('The event "'+t+"\" is a reserved event name, you can't use it.")},f.prototype._getOrSetDefaultOptions=function(t){var e=t.gasPrice?String(t.gasPrice):null,r=t.from?s.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},f.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 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},f.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=h.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},f.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 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=r?r+i:i;if(o)return o;throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".')},f.prototype._decodeMethodReturn=function(t,e){if(!e)return null;e=e.length>=2?e.slice(2):e;var r=h.decodeParameters(t,e);return 1===r.__length__?r[0]:(delete r.__length__,r)},f.prototype.deploy=function(t,e){if((t=t||{}).arguments=t.arguments||[],!(t=this._getOrSetDefaultOptions(t)).data)return s._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)},f.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(!s.isAddress(this.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return{params:this._encodeEventABI(i,r),event:i,callback:e}},f.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},f.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)})},f.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 a({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},f.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)},f.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},f.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&&!s.isAddress(this._parent.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:s._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),e.eventEmitter,e.reject,r.callback)},f.prototype._executeMethod=function(){var t=this,e=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=l("send"!==e.type),i=t.constructor._ethAccounts||t._ethAccounts;if(e.generateRequest){var a={params:[u.inputCallFormatter.call(this._parent,e.options)],callback:e.callback};return"call"===e.type?(a.params.push(u.inputDefaultBlockNumberFormatter.call(this._parent,e.defaultBlock)),a.method="eth_call",a.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):a.method="eth_sendTransaction",a}switch(e.type){case"estimate":return new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[u.inputCallFormatter],outputFormatter:s.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(!s.isAddress(e.options.from))return s._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 s._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=f},function(t,e,r){"use strict";var n=r(9),i=r(47),o=r(12),s=r(83).subscriptions,a=r(46),u=r(21),c=r(82),l=r(189),h=r(394),f=r(194),p=r(385),d=r(188),g=r(331),y=o.formatters,m=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"},v=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},w=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},_=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(y.inputAddressFormatter(e))),t.Contract.defaultAccount=r,t.personal.defaultAccount=r,E.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,E.forEach(function(t){t.defaultBlock=o}),e},enumerable:!0}),this.clearSubscriptions=t._requestManager.clearSubscriptions,this.net=new c(this.currentProvider),this.net.getNetworkType=g.bind(this),this.accounts=new p(this.currentProvider),this.personal=new l(this.currentProvider),this.personal.defaultAccount=this.defaultAccount;var M=function(){h.apply(this,arguments)};M.setProvider=function(){h.setProvider.apply(this,arguments)},(M.prototype=Object.create(h.prototype)).constructor=M,this.Contract=M,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.setProvider(this.currentProvider,this.accounts),this.Iban=f,this.abi=d;var E=[new a({name:"getNodeInfo",call:"web3_clientVersion"}),new a({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new a({name:"getCoinbase",call:"eth_coinbase",params:0}),new a({name:"isMining",call:"eth_mining",params:0}),new a({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:u.hexToNumber}),new a({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:y.outputSyncingFormatter}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:y.outputBigNumberFormatter}),new a({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:u.toChecksumAddress}),new a({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:u.hexToNumber}),new a({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[y.inputAddressFormatter,y.inputDefaultBlockNumberFormatter],outputFormatter:y.outputBigNumberFormatter}),new a({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[y.inputAddressFormatter,u.numberToHex,y.inputDefaultBlockNumberFormatter]}),new a({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[y.inputAddressFormatter,y.inputDefaultBlockNumberFormatter]}),new a({name:"getBlock",call:m,params:2,inputFormatter:[y.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:y.outputBlockFormatter}),new a({name:"getUncle",call:v,params:2,inputFormatter:[y.inputBlockNumberFormatter,u.numberToHex],outputFormatter:y.outputBlockFormatter}),new a({name:"getBlockTransactionCount",call:w,params:1,inputFormatter:[y.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new a({name:"getBlockUncleCount",call:_,params:1,inputFormatter:[y.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new a({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:y.outputTransactionFormatter}),new a({name:"getTransactionFromBlock",call:b,params:2,inputFormatter:[y.inputBlockNumberFormatter,u.numberToHex],outputFormatter:y.outputTransactionFormatter}),new a({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:y.outputTransactionReceiptFormatter}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[y.inputAddressFormatter,y.inputDefaultBlockNumberFormatter],outputFormatter:u.hexToNumber}),new a({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),new a({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[y.inputTransactionFormatter]}),new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[y.inputTransactionFormatter]}),new a({name:"sign",call:"eth_sign",params:2,inputFormatter:[y.inputSignFormatter,y.inputAddressFormatter],transformPayload:function(t){return t.params.reverse(),t}}),new a({name:"call",call:"eth_call",params:2,inputFormatter:[y.inputCallFormatter,y.inputDefaultBlockNumberFormatter]}),new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[y.inputCallFormatter],outputFormatter:u.hexToNumber}),new a({name:"getCompilers",call:"eth_getCompilers",params:0}),new a({name:"compile.solidity",call:"eth_compileSolidity",params:1}),new a({name:"compile.lll",call:"eth_compileLLL",params:1}),new a({name:"compile.serpent",call:"eth_compileSerpent",params:1}),new a({name:"submitWork",call:"eth_submitWork",params:3}),new a({name:"getWork",call:"eth_getWork",params:0}),new a({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[y.inputLogFormatter],outputFormatter:y.outputLogFormatter}),new s({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:y.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[y.inputLogFormatter],outputFormatter:y.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:y.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))}}}})];E.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(9),i=r(12).errors,o=r(191);function s(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}}s.prototype=Object.create(o.prototype),s.prototype.constructor=s,s.prototype._extractCallback=function(t){if(n.isFunction(t[t.length-1]))return t.pop()},s.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])},s.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},s.prototype._formatOutput=function(t){var e=this.options.subscription;return e&&e.outputFormatter&&t?e.outputFormatter(t):t},s.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}},s.prototype.unsubscribe=function(t){this.options.requestManager.removeSubscription(this.id,t),this.id=null,this.removeAllListeners(),clearInterval(this._reconnectIntervalId)},s.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=s},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";t.exports=r(397)(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=r(12).formatters,i=r(46),o=r(21);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){var n;!function(r,i,o,s,a,u){var c=d(function(t,e){var r=e.length;return d(function(n){for(var i=0;i<n.length;i++)e[r+i]=n[i];return e.length=r+n.length,t.apply(this,e)})});d(function(t){var e=R(t);function r(t,e){return[p(t,e)]}return d(function(t){return C(r,t,e)[0]})});function l(t,e){return function(){return t.call(this,e.apply(this,arguments))}}function h(t){return function(e){return e[t]}}var f=d(function(t){return d(function(e){for(var r,n=0;n<v(t);n++)if(r=p(e,t[n]))return r})});function p(t,e){return e.apply(u,t)}function d(t){var e=t.length-1,r=o.prototype.slice;if(0==e)return function(){return t.call(this,r.call(arguments))};if(1==e)return function(){return t.call(this,arguments[0],r.call(arguments,1))};var n=o(t.length);return function(){for(var i=0;i<e;i++)n[i]=arguments[i];return n[e]=r.call(arguments,e),t.apply(this,n)}}function g(t,e){return function(r){return t(r)&&e(r)}}function y(){}function m(){return!0}function b(t,e){return e&&e.constructor===t}var v=h("length"),w=c(b,String);function _(t){return t!==u}function M(t,e){return e instanceof i&&function t(e,r){return!r||e(B(r))&&t(e,T(r))}(function(t){return t in e},t)}function E(t,e){return[t,e]}var A=null,B=h(0),T=h(1);function R(t){return j(t.reduce((e=E,function(t,r){return e(r,t)}),A));var e}var x=d(R);function S(t){return C(function(t,e){return t.unshift(e),t},[],t)}function k(t,e){return e?E(t(B(e)),k(t,T(e))):A}function C(t,e,r){return r?t(C(t,e,T(r)),B(r)):e}function I(t,e,r){return function t(r,n){return r?e(B(r))?(n(B(r)),T(r)):E(B(r),t(T(r),n)):A}(t,r||y)}function j(t){return function t(e,r){return e?t(T(e),E(B(e),r)):r}(t,A)}function F(t){"use strict";var e,r,n,i=t(ft).emit,o=t(pt).emit,a=t(dt).emit,c=t(ot).emit,l=65536,h=/[\\"\n]/g,f=0,p=f++,d=f++,g=f++,y=f++,m=f++,b=f++,v=f++,w=f++,_=f++,M=f++,E=f++,A=f++,B=f++,T=f++,R=f++,x=f++,S=f++,k=f++,C=f++,I=f++,j=f,F=l,O=u,P="",L=!1,N=!1,D=p,U=[],W=null,q=0,z=0,G=0,H=0,V=1;function K(t){O!==u&&(o(O),a(),O=u),e=s(t+"\nLn: "+V+"\nCol: "+H+"\nChr: "+r),c(gt(u,u,e))}function $(t){return"\r"==t||"\n"==t||" "==t||"\t"==t}t(ct).on(function(t){if(e)return;if(N)return K("Cannot write after close");var s=0;r=t[0];for(;r&&(n=r,r=t[s++]);)switch(G++,"\n"==r?(V++,H=0):H++,D){case p:if("{"===r)D=g;else if("["===r)D=m;else if(!$(r))return K("Non-whitespace before {[.");continue;case w:case g:if($(r))continue;if(D===w)U.push(_);else{if("}"===r){o({}),a(),D=U.pop()||d;continue}U.push(y)}if('"'!==r)return K('Malformed object key should start with " ');D=v;continue;case _:case y:if($(r))continue;if(":"===r)D===y?(U.push(y),O!==u&&(o({}),i(O),O=u),z++):O!==u&&(i(O),O=u),D=d;else if("}"===r)O!==u&&(o(O),a(),O=u),a(),z--,D=U.pop()||d;else{if(","!==r)return K("Bad object");D===y&&U.push(y),O!==u&&(o(O),a(),O=u),D=w}continue;case m:case d:if($(r))continue;if(D===m){if(o([]),z++,D=d,"]"===r){a(),z--,D=U.pop()||d;continue}U.push(b)}if('"'===r)D=v;else if("{"===r)D=g;else if("["===r)D=m;else if("t"===r)D=M;else if("f"===r)D=B;else if("n"===r)D=S;else if("-"===r)P+=r;else if("0"===r)P+=r,D=j;else{if(-1==="123456789".indexOf(r))return K("Bad value");P+=r,D=j}continue;case b:if(","===r)U.push(b),O!==u&&(o(O),a(),O=u),D=d;else{if("]"!==r){if($(r))continue;return K("Bad array")}O!==u&&(o(O),a(),O=u),a(),z--,D=U.pop()||d}continue;case v:O===u&&(O="");var c=s-1;t:for(;;){for(;q>0;)if(W+=r,r=t.charAt(s++),4===q?(O+=String.fromCharCode(parseInt(W,16)),q=0,c=s-1):q++,!r)break t;if('"'===r&&!L){D=U.pop()||d,O+=t.substring(c,s-1);break}if(!("\\"!==r||L||(L=!0,O+=t.substring(c,s-1),r=t.charAt(s++))))break;if(L){if(L=!1,"n"===r?O+="\n":"r"===r?O+="\r":"t"===r?O+="\t":"f"===r?O+="\f":"b"===r?O+="\b":"u"===r?(q=1,W=""):O+=r,r=t.charAt(s++),c=s-1,r)continue;break}h.lastIndex=s;var f=h.exec(t);if(!f){s=t.length+1,O+=t.substring(c,s-1);break}if(s=f.index+1,!(r=t.charAt(f.index))){O+=t.substring(c,s-1);break}}continue;case M:if(!r)continue;if("r"!==r)return K("Invalid true started with t"+r);D=E;continue;case E:if(!r)continue;if("u"!==r)return K("Invalid true started with tr"+r);D=A;continue;case A:if(!r)continue;if("e"!==r)return K("Invalid true started with tru"+r);o(!0),a(),D=U.pop()||d;continue;case B:if(!r)continue;if("a"!==r)return K("Invalid false started with f"+r);D=T;continue;case T:if(!r)continue;if("l"!==r)return K("Invalid false started with fa"+r);D=R;continue;case R:if(!r)continue;if("s"!==r)return K("Invalid false started with fal"+r);D=x;continue;case x:if(!r)continue;if("e"!==r)return K("Invalid false started with fals"+r);o(!1),a(),D=U.pop()||d;continue;case S:if(!r)continue;if("u"!==r)return K("Invalid null started with n"+r);D=k;continue;case k:if(!r)continue;if("l"!==r)return K("Invalid null started with nu"+r);D=C;continue;case C:if(!r)continue;if("l"!==r)return K("Invalid null started with nul"+r);o(null),a(),D=U.pop()||d;continue;case I:if("."!==r)return K("Leading zero not followed by .");P+=r,D=j;continue;case j:if(-1!=="0123456789".indexOf(r))P+=r;else if("."===r){if(-1!==P.indexOf("."))return K("Invalid number has two dots");P+=r}else if("e"===r||"E"===r){if(-1!==P.indexOf("e")||-1!==P.indexOf("E"))return K("Invalid number has two exponential");P+=r}else if("+"===r||"-"===r){if("e"!==n&&"E"!==n)return K("Invalid symbol in number");P+=r}else P&&(o(parseFloat(P)),a(),P=""),s--,D=U.pop()||d;continue;default:return K("Unknown state: "+D)}G>=F&&(Y=0,O!==u&&O.length>l&&(K("Max buffer length exceeded: textNode"),Y=Math.max(Y,O.length)),P.length>l&&(K("Max buffer length exceeded: numberNode"),Y=Math.max(Y,P.length)),F=l-Y+G);var Y}),t(lt).on(function(){if(D==p)return o({}),a(),void(N=!0);D===d&&0===z||K("Unexpected end");O!==u&&(o(O),a(),O=u);N=!0})}var O,P,L,N,D,U,W,q,z,G,H,V=(O=d(function(t){return t.unshift(/^/),(e=RegExp(t.map(h("source")).join(""))).exec.bind(e);var e}),N=O(P=/(\$?)/,/([\w-_]+|\*)/,L=/(?:{([\w ]*?)})?/),D=O(P,/\["([^"]+)"\]/,L),U=O(P,/\[(\d+|\*)\]/,L),W=O(P,/()/,/{([\w ]*?)}/),q=O(/\.\./),z=O(/\./),G=O(P,/!/),H=O(/$/),function(t){return t(f(N,D,U,W),q,z,G,H)});function K(t,e){return{key:t,node:e}}var $=h("key"),Y=h("node"),Z={};function J(t){var e=t(et).emit,r=t(rt).emit,n=t(at).emit,i=t(st).emit;function s(t,e,r){Y(B(t))[e]=r}function a(t,r,n){t&&s(t,r,n);var i=E(K(r,n),t);return e(i),i}var u={};return u[pt]=function(t,e){if(!t)return n(e),a(t,Z,e);var r=function(t,e){var r=Y(B(t));return b(o,r)?a(t,v(r),e):t}(t,e),i=T(r),u=$(B(r));return s(i,u,e),E(K(u,e),i)},u[dt]=function(t){return r(t),T(t)||i(Y(B(t)))},u[ft]=a,u}var X=V(function(t,e,r,n,i){var o=1,a=2,u=3,h=l($,B),p=l(Y,B);function d(t,e){return!!e[o]?g(t,B):t}function y(t){if(t==m)return m;return g(function(t){return h(t)!=Z},l(t,T))}function b(){return function(t){return h(t)==Z}}function w(t,e,r,n,i){var o=t(r);if(o){var s=function(t,e,r){return C(function(t,e){return e(t,r)},e,t)}(e,n,o);return i(r.substr(v(o[0])),s)}}function _(t,e){return c(w,t,e)}var E=f(_(t,x(d,function(t,e){var r=e[u];return r?g(l(c(M,R(r.split(/\W+/))),p),t):t},function(t,e){var r=e[a];return g(r&&"*"!=r?function(t){return h(t)==r}:m,t)},y)),_(e,x(function(t){if(t==m)return m;var e=b(),r=t,n=y(function(t){return i(t)}),i=f(e,r,n);return i})),_(r,x()),_(n,x(d,b)),_(i,x(function(t){return function(e){var r=t(e);return!0===r?B(e):r}})),function(t){throw s('"'+t+'" could not be tokenised')});function A(t,e){return e}function S(t,e){return E(t,e,t?S:A)}return function(t){try{return S(t,m)}catch(e){throw s('Could not compile "'+t+'" because '+e.message)}}});function Q(t,e,r){var n,i;function o(t){return function(e){return e.id==t}}return{on:function(r,o){var s={listener:r,id:o||r};return e&&e.emit(t,r,s.id),n=E(s,n),i=E(r,i),this},emit:function(){!function t(e,r){e&&(B(e).apply(null,r),t(T(e),r))}(i,arguments)},un:function(e){var s;n=I(n,o(e),function(t){s=t}),s&&(i=I(i,function(t){return t==s.listener}),r&&r.emit(t,s.listener,s.id))},listeners:function(){return i},hasListener:function(t){return _(function t(e,r){return r&&(e(B(r))?B(r):t(e,T(r)))}(t?o(t):m,n))}}}var tt=1,et=tt++,rt=tt++,nt=tt++,it=tt++,ot="fail",st=tt++,at=tt++,ut="start",ct="data",lt="end",ht=tt++,ft=tt++,pt=tt++,dt=tt++;function gt(t,e,r){try{var n=a.parse(e)}catch(t){}return{statusCode:t,body:e,jsonBody:n,thrown:r}}function yt(t,e){var r={node:t(rt),path:t(et)};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=j(r);t(e,S(T(k($,n))),S(k(Y,n)))}(i,Y(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 mt(t,e){var r,n=/^(node|path):./,i=t(st),o=t(it).emit,s=t(nt).emit,a=d(function(e,i){if(r[e])p(i,r[e]);else{var o=t(e),s=i[0];n.test(e)?u(o,s):o.on(s)}return r});function u(t,e,n){n=n||e;var i=l(e);return t.on(function(){var e=!1;r.forget=function(){e=!0},p(arguments,i),delete r.forget,e&&t.un(n)},n),r}function l(t){return function(){try{return t.apply(r,arguments)}catch(t){setTimeout(function(){throw t})}}}function h(e,r,n){var i;i="node"==e?function(t){return function(){var e=t.apply(this,arguments);_(e)&&(e==wt.drop?o():s(e))}}(n):n,u(function(e,r){return t(e+":"+r)}(e,r),i,n)}function f(t,e,n){return w(e)?h(t,e,n):function(t,e){for(var r in e)h(t,r,e[r])}(t,e),r}return t(at).on(function(t){var e;r.root=(e=t,function(){return e})}),t(ut).on(function(t,e){r.header=function(t){return t?e[t]:e}}),r={on:a,addListener:a,removeListener:function(e,n,o){if("done"==e)i.un(n);else if("node"==e||"path"==e)t.un(e+":"+n,o);else{var s=n;t(e).un(s)}return r},emit:t.emit,node:c(f,"node"),path:c(f,"path"),done:c(u,i),start:c(function(e,n){return t(e).on(l(n),n),r},ut),fail:t(ot).on,abort:t(ht).emit,header:y,root:y,source:e}}function bt(t,e,n,i,o){var s=function(){var t={},e=n("newListener"),r=n("removeListener");function n(n){return t[n]=Q(n,e,r)}function i(e){return t[e]||n(e)}return["emit","on","un"].forEach(function(t){i[t]=d(function(e,r){p(r,i(e)[t])})}),i}();return e&&function(t,e,n,i,o,s,a){"use strict";var l=t(ct).emit,h=t(ot).emit,f=0,p=!0;function d(){var t=e.responseText,r=t.substr(f);r&&l(r),f=v(t)}t(ht).on(function(){e.onreadystatechange=null,e.abort()}),"onprogress"in e&&(e.onprogress=d),e.onreadystatechange=function(){function r(){try{p&&t(ut).emit(e.status,(r=e.getAllResponseHeaders(),n={},r&&r.split("\r\n").forEach(function(t){var e=t.indexOf(": ");n[t.substring(0,e)]=t.substring(e+2)}),n)),p=!1}catch(t){}var r,n}switch(e.readyState){case 2:case 3:return r();case 4:r(),2==String(e.status)[0]?(d(),t(lt).emit()):h(gt(e.status,e.responseText))}};try{for(var g in e.open(n,i,!0),s)e.setRequestHeader(g,s[g]);(function(t,e){function r(e){return e.port||{"http:":80,"https:":443}[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=a,e.send(o)}catch(t){r.setTimeout(c(h,gt(u,u,t)),0)}}(s,new XMLHttpRequest,t,e,n,i,o),F(s),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(nt).on(function(t){var e=B(r),n=$(e),i=T(r);i&&(Y(B(i))[n]=t)}),t(it).on(function(){var t=B(r),e=$(t),n=T(r);n&&delete Y(B(n))[e]}),t(ht).on(function(){for(var r in e)t(r).un(n)})}(s,J(s)),yt(s,X),mt(s,e)}function vt(t,e,r,n,i,o,s){return i=i?a.parse(a.stringify(i)):{},n?w(n)||(n=a.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,s),n,i,o||!1)}function wt(t){var e=x("resume","pause","pipe"),r=c(M,e);return t?r(t)||w(t)?vt(bt,t):vt(bt,t.url,t.method,t.body,t.headers,t.withCredentials,t.cached):bt()}wt.drop=function(){return wt.drop},(n=function(){return wt}.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(9),i=r(12).errors,o=r(400),s=function(t,e){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=t,this.connection=e.connect({path:this.path}),this.addDefaultEvents();var i=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)})};"Socket"===e.constructor.name?o(this.connection).done(i):this.connection.on("data",function(t){r._parseResponse(t.toString()).forEach(i)})};s.prototype.addDefaultEvents=function(){var t=this;this.connection.on("connect",function(){}),this.connection.on("error",function(){t._timeout()}),this.connection.on("end",function(){t._timeout()}),this.connection.on("timeout",function(){t._timeout()})},s.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},s.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},s.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](i.InvalidConnection("on IPC")),delete this.responseCallbacks[t])},s.prototype.reconnect=function(){this.connection.connect({path:this.path})},s.prototype.send=function(t,e){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(t)),this._addResponseCallback(t,e)},s.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;default:this.connection.on(t,e)}},s.prototype.once=function(t,e){if("function"!=typeof e)throw new Error("The second parameter callback must be a function.");this.connection.once(t,e)},s.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)});break;default:this.connection.removeListener(t,e)}},s.prototype.removeAllListeners=function(t){switch(t){case"data":this.notificationCallbacks=[];break;default:this.connection.removeAllListeners(t)}},s.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},t.exports=s},function(t,e){t.exports=XMLHttpRequest},function(t,e,r){var n=r(12).errors,i=r(402),o=function(t,e,r){this.host=t||"http://localhost:8545",this.timeout=e||0,this.connected=!1,this.headers=r};o.prototype._prepareRequest=function(){var t=new i;return t.open("POST",this.host,!0),t.setRequestHeader("Content-Type","application/json"),this.headers&&this.headers.forEach(function(e){t.setRequestHeader(e.name,e.value)}),t},o.prototype.send=function(t,e){var r=this,i=this._prepareRequest();i.onreadystatechange=function(){if(4===i.readyState&&1!==i.timeout){var t=i.responseText,o=null;try{t=JSON.parse(t)}catch(t){o=n.InvalidResponse(i.responseText)}r.connected=!0,e(o,t)}},i.ontimeout=function(){r.connected=!1,e(n.ConnectionTimeout(this.timeout))};try{i.send(JSON.stringify(t))}catch(t){this.connected=!1,e(n.InvalidConnection(this.host))}},t.exports=o},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,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),function(s){var a=encodeURIComponent(n(s))+r;return i(t[s])?o(t[s],function(t){return a+encodeURIComponent(n(t))}).join(e):a+encodeURIComponent(n(t[s]))}).join(e):a?encodeURIComponent(n(a))+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<t.length;n++)r.push(e(t[n],n));return r}var s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},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 s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/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 l=0;l<c;++l){var h,f,p,d,g=t[l].replace(a,"%20"),y=g.indexOf(r);y>=0?(h=g.substr(0,y),f=g.substr(y+1)):(h=g,f=""),p=decodeURIComponent(h),d=decodeURIComponent(f),n(s,p)?i(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";e.decode=e.parse=r(405),e.encode=e.stringify=r(404)},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){(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 s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,c=36,l=1,h=26,f=38,p=700,d=72,g=128,y="-",m=/^xn--/,b=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=c-l,M=Math.floor,E=String.fromCharCode;function A(t){throw new RangeError(w[t])}function B(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function T(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+B((t=t.replace(v,".")).split("."),e).join(".")}function R(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function x(t){return B(t,function(t){var e="";return t>65535&&(e+=E((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=E(t)}).join("")}function S(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function k(t,e,r){var n=0;for(t=r?M(t/p):t>>1,t+=M(t/e);t>_*h>>1;n+=c)t=M(t/_);return M(n+(_+1)*t/(t+f))}function C(t){var e,r,n,i,o,s,a,f,p,m,b,v=[],w=t.length,_=0,E=g,B=d;for((r=t.lastIndexOf(y))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&A("not-basic"),v.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<w;){for(o=_,s=1,a=c;i>=w&&A("invalid-input"),((f=(b=t.charCodeAt(i++))-48<10?b-22:b-65<26?b-65:b-97<26?b-97:c)>=c||f>M((u-_)/s))&&A("overflow"),_+=f*s,!(f<(p=a<=B?l:a>=B+h?h:a-B));a+=c)s>M(u/(m=c-p))&&A("overflow"),s*=m;B=k(_-o,e=v.length+1,0==o),M(_/e)>u-E&&A("overflow"),E+=M(_/e),_%=e,v.splice(_++,0,E)}return x(v)}function I(t){var e,r,n,i,o,s,a,f,p,m,b,v,w,_,B,T=[];for(v=(t=R(t)).length,e=g,r=0,o=d,s=0;s<v;++s)(b=t[s])<128&&T.push(E(b));for(n=i=T.length,i&&T.push(y);n<v;){for(a=u,s=0;s<v;++s)(b=t[s])>=e&&b<a&&(a=b);for(a-e>M((u-r)/(w=n+1))&&A("overflow"),r+=(a-e)*w,e=a,s=0;s<v;++s)if((b=t[s])<e&&++r>u&&A("overflow"),b==e){for(f=r,p=c;!(f<(m=p<=o?l:p>=o+h?h:p-o));p+=c)B=f-m,_=c-m,T.push(E(S(m+B%_,0))),f=M(B/_);T.push(E(S(f,0))),o=k(r,w,n==i),r=0,++n}++r,++e}return T.join("")}a={version:"1.4.1",ucs2:{decode:R,encode:x},decode:C,encode:I,toASCII:function(t){return T(t,function(t){return b.test(t)?"xn--"+I(t):t})},toUnicode:function(t){return T(t,function(t){return m.test(t)?C(t.slice(4).toLowerCase()):t})}},void 0===(i=function(){return a}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(36)(t),r(8))},function(t,e,r){"use strict";var n=r(408),i=r(407);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=v,e.resolve=function(t,e){return v(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?v(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=v(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(406);function v(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("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(a);c[0]=c[0].replace(/\\/g,"/");var v=t=c.join(a);if(v=v.trim(),!r&&1===t.split("#").length){var w=u.exec(v);if(w)return this.path=v,this.href=v,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?b.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var _=s.exec(v);if(_){var M=(_=_[0]).toLowerCase();this.protocol=M,v=v.substr(_.length)}if(r||_||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===v.substr(0,2);!E||_&&y[_]||(v=v.substr(2),this.slashes=!0)}if(!y[_]&&(E||_&&!m[_])){for(var A,B,T=-1,R=0;R<f.length;R++){-1!==(x=v.indexOf(f[R]))&&(-1===T||x<T)&&(T=x)}-1!==(B=-1===T?v.lastIndexOf("@"):v.lastIndexOf("@",T))&&(A=v.slice(0,B),v=v.slice(B+1),this.auth=decodeURIComponent(A)),T=-1;for(R=0;R<h.length;R++){var x;-1!==(x=v.indexOf(h[R]))&&(-1===T||x<T)&&(T=x)}-1===T&&(T=v.length),this.host=v.slice(0,T),v=v.slice(T),this.parseHost(),this.hostname=this.hostname||"";var S="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!S)for(var k=this.hostname.split(/\./),C=(R=0,k.length);R<C;R++){var I=k[R];if(I&&!I.match(p)){for(var j="",F=0,O=I.length;F<O;F++)I.charCodeAt(F)>127?j+="x":j+=I[F];if(!j.match(p)){var P=k.slice(0,R),L=k.slice(R+1),N=I.match(d);N&&(P.push(N[1]),L.unshift(N[2])),L.length&&(v="/"+L.join(".")+v),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+D,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!g[M])for(R=0,C=l.length;R<C;R++){var W=l[R];if(-1!==v.indexOf(W)){var q=encodeURIComponent(W);q===W&&(q=escape(W)),v=v.split(W).join(q)}}var z=v.indexOf("#");-1!==z&&(this.hash=v.substr(z),v=v.slice(0,z));var G=v.indexOf("?");if(-1!==G?(this.search=v.substr(G),this.query=v.substr(G+1),e&&(this.query=b.parse(this.query)),v=v.slice(0,G)):e&&(this.search="",this.query={}),v&&(this.pathname=v),m[M]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var H=this.search||"";this.path=D+H}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=b.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||m[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(v(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=t[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!m[t.protocol]){for(var h=Object.keys(t),f=0;f<h.length;f++){var p=h[f];r[p]=t[p]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||y[t.protocol])r.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var g=r.pathname||"",b=r.search||"";r.path=g+b}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=w||v||r.host&&t.pathname,M=_,E=r.pathname&&r.pathname.split("/")||[],A=(d=t.pathname&&t.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),_=_&&(""===d[0]||""===E[0])),w)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,E=d;else if(d.length)E||(E=[]),E.pop(),E=E.concat(d),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(A)r.hostname=r.host=E.shift(),(S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=S.shift(),r.host=r.hostname=S.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(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var B=E.slice(-1)[0],T=(r.host||t.host||E.length>1)&&("."===B||".."===B)||""===B,R=0,x=E.length;x>=0;x--)"."===(B=E[x])?E.splice(x,1):".."===B?(E.splice(x,1),R++):R&&(E.splice(x,1),R--);if(!_&&!M)for(;R--;R)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),T&&"/"!==E.join("/").substr(-1)&&E.push("");var S,k=""===E[0]||E[0]&&"/"===E[0].charAt(0);A&&(r.hostname=r.host=k?"":E.length?E.shift():"",(S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=S.shift(),r.host=r.hostname=S.shift()));return(_=_||r.host&&E.length)&&!k&&E.unshift(""),E.length?r.pathname=E.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=a.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){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 <brian@worlize.com> (https://www.worlize.com/)",contributors:["Iñaki Baz Castillo <ibc@aliax.net> (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){t.exports=r(410).version},function(t,e,r){var n=function(){return this||{}}(),i=n.WebSocket||n.MozWebSocket,o=r(411);function s(t,e){return e?new i(t,e):new i(t)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach(function(t){Object.defineProperty(s,t,{get:function(){return i[t]}})}),t.exports={w3cwebsocket:i?s:null,version:o}},function(t,e,r){"use strict";(function(e){var n=r(9),i=r(12).errors,o=null,s=null,a=null;"undefined"!=typeof window?(o=window.WebSocket,s=btoa,a=function(t){return new URL(t)}):(o=r(412).w3cwebsocket,s=function(t){return e(t).toString("base64")},a=r(409).parse);var u=function(t,e){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],e=e||{},this._customTimeout=e.timeout;var i=a(t),u=e.headers||{};i.username&&i.password&&(u.authorization="Basic "+s(i.username+":"+i.password)),this.connection=new o(t,void 0,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)})})}};u.prototype.addDefaultEvents=function(){var t=this;this.connection.onerror=function(){t._timeout()},this.connection.onclose=function(){t._timeout(),t.reset()}},u.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},u.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)},u.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](i.InvalidConnection("on WS")),delete this.responseCallbacks[t])},u.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)},u.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}},u.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)})}},u.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}},u.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.addDefaultEvents()},t.exports=u}).call(this,r(0).Buffer)},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";var n=r(193),i=r(12).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));t[r].callback(null,t[r].format?t[r].format(e.result):e.result)}})})},t.exports=o},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 s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(0).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}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<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=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<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=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,s=o%n,a=Math.min(o,o-s)+r,c=0,l=r;l<a;l+=n)c=u(t,l,l+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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 f(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,h=67108863&u,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;l+=(s=(i=0|t.words[d])*(o=0|e.words[p])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|l}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,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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 f=l[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+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!==s),this.toArrayLike(s,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 s,a,u="le"===e,c=new t(o),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],h=8191&l,f=l>>>13,p=0|s[1],d=8191&p,g=p>>>13,y=0|s[2],m=8191&y,b=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],E=8191&M,A=M>>>13,B=0|s[5],T=8191&B,R=B>>>13,x=0|s[6],S=8191&x,k=x>>>13,C=0|s[7],I=8191&C,j=C>>>13,F=0|s[8],O=8191&F,P=F>>>13,L=0|s[9],N=8191&L,D=L>>>13,U=0|a[0],W=8191&U,q=U>>>13,z=0|a[1],G=8191&z,H=z>>>13,V=0|a[2],K=8191&V,$=V>>>13,Y=0|a[3],Z=8191&Y,J=Y>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191&lt,ft=lt>>>13,pt=0|a[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(h,W))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,W)|0))<<13)|0;c=((o=Math.imul(f,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,W),i=(i=Math.imul(d,q))+Math.imul(g,W)|0,o=Math.imul(g,q);var mt=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(f,G)|0))<<13)|0;c=((o=o+Math.imul(f,H)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,W),i=(i=Math.imul(m,q))+Math.imul(b,W)|0,o=Math.imul(b,q),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,H)|0;var bt=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,W),i=(i=Math.imul(w,q))+Math.imul(_,W)|0,o=Math.imul(_,q),n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(d,K)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,$)|0;var vt=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(f,Z)|0))<<13)|0;c=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,W),i=(i=Math.imul(E,q))+Math.imul(A,W)|0,o=Math.imul(A,q),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,$)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,J)|0;var wt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,W),i=(i=Math.imul(T,q))+Math.imul(R,W)|0,o=Math.imul(R,q),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(S,W),i=(i=Math.imul(S,q))+Math.imul(k,W)|0,o=Math.imul(k,q),n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var Mt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;c=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,W),i=(i=Math.imul(I,q))+Math.imul(j,W)|0,o=Math.imul(j,q),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Et=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(f,ut)|0))<<13)|0;c=((o=o+Math.imul(f,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,q))+Math.imul(P,W)|0,o=Math.imul(P,q),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var At=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,q))+Math.imul(D,W)|0,o=Math.imul(D,q),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,ft)|0;var Bt=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,G),i=(i=Math.imul(N,H))+Math.imul(D,G)|0,o=Math.imul(D,H),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ft)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,$))+Math.imul(D,K)|0,o=Math.imul(D,$),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var Rt=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(b,dt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,ft)|0;var xt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ft)|0;var St=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(A,dt)|0))<<13)|0;c=((o=o+Math.imul(A,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var kt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,ft)|0;var Ct=(c+(n=n+Math.imul(S,dt)|0)|0)+((8191&(i=(i=i+Math.imul(S,gt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,ft)|0;var It=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(j,dt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,ft))+Math.imul(D,ht)|0,o=Math.imul(D,ft);var jt=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(P,dt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Ft=(c+(n=Math.imul(N,dt))|0)+((8191&(i=(i=Math.imul(N,gt))+Math.imul(D,dt)|0))<<13)|0;return c=((o=Math.imul(D,gt))+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,u[0]=yt,u[1]=mt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=At,u[9]=Bt,u[10]=Tt,u[11]=Rt,u[12]=xt,u[13]=St,u[14]=kt,u[15]=Ct,u[16]=It,u[17]=jt,u[18]=Ft,0!==c&&(u[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(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<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=u,f=c,p=0;p<s;p++){var d=r[l+p],g=n[l+p],y=r[l+p+s],m=n[l+p+s],b=h*y-f*m;m=h*m+f*y,y=b,r[l+p]=d+y,n[l+p]=g+m,r[l+p+s]=d-y,n[l+p+s]=g-m,p!==a&&(b=u*h-c*f,f=u*f+c*h,h=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,h,n,i);for(var p=0;p<n;p++){var d=a[p]*l[p]-u[p]*h[p];u[p]=a[p]*h[p]+u[p]*l[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=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<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),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<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>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,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||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?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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,s,a},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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=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:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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 y={k256:null,p224:null,p192:null,p25519:null};function m(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(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.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 E(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)}m.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.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=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(b,m),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(v,m),i(w,m),i(_,m),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y<d);var m=this.pow(h,new o(1).iushln(d-y-1));f=f.redMul(m),h=m.redSqr(),p=p.redMul(h),d=y}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var h=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=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 E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.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)},E.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(36)(t))},function(t,e){t.exports=window.crypto},function(t,e,r){t.exports=r(417)},function(t,e,r){t.exports=function(t,e){var n=r(418),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 s=o.getRandomValues(new Uint8Array(t)),a="0x"+Array.from(s).map(function(t){return t.toString(16)}).join("");if(!i)return a;e(null,a)}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){var n=r(9),i=r(196),o=r(197),s=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")},a=function(t,e,r){var n,a,u;if("bytes"===(t=(u=t).startsWith("int[")?"int256"+u.slice(3):"int"===u?"int256":u.startsWith("uint[")?"uint256"+u.slice(4):"uint"===u?"uint256":u.startsWith("fixed[")?"fixed128x128"+u.slice(5):"fixed"===u?"fixed128x128":u.startsWith("ufixed[")?"ufixed128x128"+u.slice(6):"ufixed"===u?"ufixed128x128":u)){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||n<e.replace(/^0x/i,"").length/2)throw new Error("Invalid bytes"+n+" for "+e);return o.rightPad(e,2*n)}if(t.startsWith("uint")){if(n%8||n<8||n>256)throw new Error("Invalid uint"+n+" size");if((a=s(e)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+a.bitLength());if(a.lt(new i(0)))throw new Error("Supplied uint "+a.toString()+" is negative");return n?o.leftPad(a.toString("hex"),n/8*2):a}if(t.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((a=s(e)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+a.bitLength());return a.lt(new i(0))?a.toTwos(n).toString("hex"):n?o.leftPad(a.toString("hex"),n/8*2):a}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,s="";if(n.isObject(t)&&(t.hasOwnProperty("v")||t.hasOwnProperty("t")||t.hasOwnProperty("value")||t.hasOwnProperty("type"))?(e=t.hasOwnProperty("t")?t.t:t.type,s=t.hasOwnProperty("v")?t.v:t.value):(e=o.toHex(t,!0),s=o.toHex(t),e.startsWith("int")||e.startsWith("uint")||(e="bytes")),!e.startsWith("int")&&!e.startsWith("uint")||"string"!=typeof s||/^(-)?0x/i.test(s)||(s=new i(s)),n.isArray(s)){if((r=function(t){var e=/^\D+\d*\[(\d+)\]$/.exec(t);return e?parseInt(e[1],10):null}(e))&&s.length!==r)throw new Error(e+" is not matching the given array "+JSON.stringify(s));r=s.length}return n.isArray(s)?s.map(function(t){return a(e,t,r).toString("hex").replace("0x","")}).join(""):a(e,s,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){(function(t,n){var i;/*! https://mths.be/utf8js v2.0.0 by @mathias */!function(o){var s="object"==typeof e&&e,a=("object"==typeof t&&t&&t.exports,"object"==typeof n&&n);a.global!==a&&a.window;var u,c,l,h=String.fromCharCode;function f(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function p(t){if(t>=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function d(t,e){return h(t>>e&63|128)}function g(t){if(0==(4294967168&t))return h(t);var e="";return 0==(4294965248&t)?e=h(t>>6&31|192):0==(4294901760&t)?(p(t),e=h(t>>12&15|224),e+=d(t,6)):0==(4292870144&t)&&(e=h(t>>18&7|240),e+=d(t,12),e+=d(t,6)),e+=h(63&t|128)}function y(){if(l>=c)throw Error("Invalid byte index");var t=255&u[l];if(l++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function m(){var t,e;if(l>c)throw Error("Invalid byte index");if(l==c)return!1;if(t=255&u[l],l++,0==(128&t))return t;if(192==(224&t)){if((e=(31&t)<<6|y())>=128)return e;throw Error("Invalid continuation byte")}if(224==(240&t)){if((e=(15&t)<<12|y()<<6|y())>=2048)return p(e),e;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=(15&t)<<18|y()<<12|y()<<6|y())>=65536&&e<=1114111)return e;throw Error("Invalid UTF-8 detected")}var b={version:"2.0.0",encode:function(t){for(var e=f(t),r=e.length,n=-1,i="";++n<r;)i+=g(e[n]);return i},decode:function(t){u=f(t),c=u.length,l=0;for(var e,r=[];!1!==(e=m());)r.push(e);return function(t){for(var e,r=t.length,n=-1,i="";++n<r;)(e=t[n])>65535&&(i+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),i+=h(e);return i}(r)}};void 0===(i=function(){return b}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(36)(t),r(8))},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 s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(0).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}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<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=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<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=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,s=o%n,a=Math.min(o,o-s)+r,c=0,l=r;l<a;l+=n)c=u(t,l,l+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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 f(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,h=67108863&u,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;l+=(s=(i=0|t.words[d])*(o=0|e.words[p])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|l}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,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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 f=l[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+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!==s),this.toArrayLike(s,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 s,a,u="le"===e,c=new t(o),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],h=8191&l,f=l>>>13,p=0|s[1],d=8191&p,g=p>>>13,y=0|s[2],m=8191&y,b=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],E=8191&M,A=M>>>13,B=0|s[5],T=8191&B,R=B>>>13,x=0|s[6],S=8191&x,k=x>>>13,C=0|s[7],I=8191&C,j=C>>>13,F=0|s[8],O=8191&F,P=F>>>13,L=0|s[9],N=8191&L,D=L>>>13,U=0|a[0],W=8191&U,q=U>>>13,z=0|a[1],G=8191&z,H=z>>>13,V=0|a[2],K=8191&V,$=V>>>13,Y=0|a[3],Z=8191&Y,J=Y>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191&lt,ft=lt>>>13,pt=0|a[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(h,W))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,W)|0))<<13)|0;c=((o=Math.imul(f,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,W),i=(i=Math.imul(d,q))+Math.imul(g,W)|0,o=Math.imul(g,q);var mt=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(f,G)|0))<<13)|0;c=((o=o+Math.imul(f,H)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,W),i=(i=Math.imul(m,q))+Math.imul(b,W)|0,o=Math.imul(b,q),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,H)|0;var bt=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,W),i=(i=Math.imul(w,q))+Math.imul(_,W)|0,o=Math.imul(_,q),n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(d,K)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,$)|0;var vt=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(f,Z)|0))<<13)|0;c=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,W),i=(i=Math.imul(E,q))+Math.imul(A,W)|0,o=Math.imul(A,q),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,$)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,J)|0;var wt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,W),i=(i=Math.imul(T,q))+Math.imul(R,W)|0,o=Math.imul(R,q),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(S,W),i=(i=Math.imul(S,q))+Math.imul(k,W)|0,o=Math.imul(k,q),n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var Mt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;c=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,W),i=(i=Math.imul(I,q))+Math.imul(j,W)|0,o=Math.imul(j,q),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Et=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(f,ut)|0))<<13)|0;c=((o=o+Math.imul(f,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,q))+Math.imul(P,W)|0,o=Math.imul(P,q),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var At=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,q))+Math.imul(D,W)|0,o=Math.imul(D,q),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,ft)|0;var Bt=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,G),i=(i=Math.imul(N,H))+Math.imul(D,G)|0,o=Math.imul(D,H),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ft)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,$))+Math.imul(D,K)|0,o=Math.imul(D,$),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var Rt=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(b,dt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,ft)|0;var xt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ft)|0;var St=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(A,dt)|0))<<13)|0;c=((o=o+Math.imul(A,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var kt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,ft)|0;var Ct=(c+(n=n+Math.imul(S,dt)|0)|0)+((8191&(i=(i=i+Math.imul(S,gt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,ft)|0;var It=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(j,dt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,ft))+Math.imul(D,ht)|0,o=Math.imul(D,ft);var jt=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(P,dt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Ft=(c+(n=Math.imul(N,dt))|0)+((8191&(i=(i=Math.imul(N,gt))+Math.imul(D,dt)|0))<<13)|0;return c=((o=Math.imul(D,gt))+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,u[0]=yt,u[1]=mt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=At,u[9]=Bt,u[10]=Tt,u[11]=Rt,u[12]=xt,u[13]=St,u[14]=kt,u[15]=Ct,u[16]=It,u[17]=jt,u[18]=Ft,0!==c&&(u[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(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<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=u,f=c,p=0;p<s;p++){var d=r[l+p],g=n[l+p],y=r[l+p+s],m=n[l+p+s],b=h*y-f*m;m=h*m+f*y,y=b,r[l+p]=d+y,n[l+p]=g+m,r[l+p+s]=d-y,n[l+p+s]=g-m,p!==a&&(b=u*h-c*f,f=u*f+c*h,h=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,h,n,i);for(var p=0;p<n;p++){var d=a[p]*l[p]-u[p]*h[p];u[p]=a[p]*h[p]+u[p]*l[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=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<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),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<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>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,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||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?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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,s,a},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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=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:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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 y={k256:null,p224:null,p192:null,p25519:null};function m(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(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.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 E(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)}m.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.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=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(b,m),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(v,m),i(w,m),i(_,m),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y<d);var m=this.pow(h,new o(1).iushln(d-y-1));f=f.redMul(m),h=m.redSqr(),p=p.redMul(h),d=y}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var h=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=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 E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.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)},E.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(36)(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 s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(0).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}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<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=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<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=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,s=o%n,a=Math.min(o,o-s)+r,c=0,l=r;l<a;l+=n)c=u(t,l,l+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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 f(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],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,h=67108863&u,f=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=f;p++){var d=c-p|0;l+=(s=(i=0|t.words[d])*(o=0|e.words[p])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|l}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,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}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 f=l[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[f-g.length]+g+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!==s),this.toArrayLike(s,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 s,a,u="le"===e,c=new t(o),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,l=0|s[0],h=8191&l,f=l>>>13,p=0|s[1],d=8191&p,g=p>>>13,y=0|s[2],m=8191&y,b=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],E=8191&M,A=M>>>13,B=0|s[5],T=8191&B,R=B>>>13,x=0|s[6],S=8191&x,k=x>>>13,C=0|s[7],I=8191&C,j=C>>>13,F=0|s[8],O=8191&F,P=F>>>13,L=0|s[9],N=8191&L,D=L>>>13,U=0|a[0],W=8191&U,q=U>>>13,z=0|a[1],G=8191&z,H=z>>>13,V=0|a[2],K=8191&V,$=V>>>13,Y=0|a[3],Z=8191&Y,J=Y>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191&lt,ft=lt>>>13,pt=0|a[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(h,W))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(f,W)|0))<<13)|0;c=((o=Math.imul(f,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,W),i=(i=Math.imul(d,q))+Math.imul(g,W)|0,o=Math.imul(g,q);var mt=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(f,G)|0))<<13)|0;c=((o=o+Math.imul(f,H)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,W),i=(i=Math.imul(m,q))+Math.imul(b,W)|0,o=Math.imul(b,q),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,H)|0;var bt=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,W),i=(i=Math.imul(w,q))+Math.imul(_,W)|0,o=Math.imul(_,q),n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(d,K)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,$)|0;var vt=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(f,Z)|0))<<13)|0;c=((o=o+Math.imul(f,J)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,W),i=(i=Math.imul(E,q))+Math.imul(A,W)|0,o=Math.imul(A,q),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,$)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,J)|0;var wt=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,W),i=(i=Math.imul(T,q))+Math.imul(R,W)|0,o=Math.imul(R,q),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(f,rt)|0))<<13)|0;c=((o=o+Math.imul(f,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(S,W),i=(i=Math.imul(S,q))+Math.imul(k,W)|0,o=Math.imul(k,q),n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var Mt=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;c=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,W),i=(i=Math.imul(I,q))+Math.imul(j,W)|0,o=Math.imul(j,q),n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Et=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(f,ut)|0))<<13)|0;c=((o=o+Math.imul(f,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(O,W),i=(i=Math.imul(O,q))+Math.imul(P,W)|0,o=Math.imul(P,q),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var At=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,q))+Math.imul(D,W)|0,o=Math.imul(D,q),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,ft)|0;var Bt=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(f,dt)|0))<<13)|0;c=((o=o+Math.imul(f,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,G),i=(i=Math.imul(N,H))+Math.imul(D,G)|0,o=Math.imul(D,H),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,ft)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ft)|0;var Tt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,$))+Math.imul(D,K)|0,o=Math.imul(D,$),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var Rt=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(b,dt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,J))+Math.imul(D,Z)|0,o=Math.imul(D,J),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,ft)|0;var xt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ft)|0;var St=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(A,dt)|0))<<13)|0;c=((o=o+Math.imul(A,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var kt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,ft)|0;var Ct=(c+(n=n+Math.imul(S,dt)|0)|0)+((8191&(i=(i=i+Math.imul(S,gt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,ft)|0;var It=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(j,dt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,ft))+Math.imul(D,ht)|0,o=Math.imul(D,ft);var jt=(c+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(P,dt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Ft=(c+(n=Math.imul(N,dt))|0)+((8191&(i=(i=Math.imul(N,gt))+Math.imul(D,dt)|0))<<13)|0;return c=((o=Math.imul(D,gt))+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,u[0]=yt,u[1]=mt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=Et,u[8]=At,u[9]=Bt,u[10]=Tt,u[11]=Rt,u[12]=xt,u[13]=St,u[14]=kt,u[15]=Ct,u[16]=It,u[17]=jt,u[18]=Ft,0!==c&&(u[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?f(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<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),f=67108863&h;a=67108863&(f=f+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=u,f=c,p=0;p<s;p++){var d=r[l+p],g=n[l+p],y=r[l+p+s],m=n[l+p+s],b=h*y-f*m;m=h*m+f*y,y=b,r[l+p]=d+y,n[l+p]=g+m,r[l+p+s]=d-y,n[l+p+s]=g-m,p!==a&&(b=u*h-c*f,f=u*f+c*h,h=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,h,n,i);for(var p=0;p<n;p++){var d=a[p]*l[p]-u[p]*h[p];u[p]=a[p]*h[p]+u[p]*l[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=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<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),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<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>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,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||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?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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,s,a},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),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),h=e.clone();!e.isZero();){for(var f=0,p=1;0==(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,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,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=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:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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 y={k256:null,p224:null,p192:null,p25519:null};function m(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(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.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 E(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)}m.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.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=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(b,m),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(v,m),i(w,m),i(_,m),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y<d);var m=this.pow(h,new o(1).iushln(d-y-1));f=f.redMul(m),h=m.redSqr(),p=p.redMul(h),d=y}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],l=u-1;l>=0;l--){var h=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=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 E(t)},i(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.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)},E.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,r(36)(t))},function(t,e,r){"use strict";var n=r(423),i=r(198),o=new n(0),s=new n(-1),a={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=a[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(a,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:a,numberToString:c,getValueOfUnit:u,fromWei:function(t,e,r){var n=i(t),c=n.lt(o),l=u(e),h=a[e].length-1||1,f=r||{};c&&(n=n.mul(s));for(var p=n.mod(l).toString(10);p.length<h;)p="0"+p;f.pad||(p=p.match(/^([0-9]*[1-9]|0)(0*)/)[1]);var d=n.div(l).toString(10);f.commify&&(d=d.replace(/\B(?=(\d{3})+(?!\d))/g,","));var g=d+("0"==p?"":"."+p);return c&&(g="-"+g),g},toWei:function(t,e){var r=c(t),i=u(e),o=a[e].length-1||1,l="-"===r.substring(0,1);if(l&&(r=r.substring(1)),"."===r)throw new Error("[ethjs-unit] while converting number "+t+" to wei, invalid value");var h=r.split(".");if(h.length>2)throw new Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal points");var f=h[0],p=h[1];if(f||(f="0"),p||(p="0"),p.length>o)throw new Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal places");for(;p.length<o;)p+="0";f=new n(f),p=new n(p);var d=f.mul(i).add(p);return l&&(d=d.mul(s)),new n(d.toString(10),10)}}},function(t,e,r){"use strict";var n=r(9),i=r(21),o=r(194),s=function(t){return i.toBN(t).toString(10)},a=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=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=s(t.gasPrice),t.value=s(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},l=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":a(t):this.defaultBlock},inputBlockNumberFormatter:a,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),!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=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)),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 h(t)}):h(t.address)),t},inputSignFormatter:function(t){return i.isHexStrict(t)?t:i.utf8ToHex(t)},outputBigNumberFormatter:s,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(l)),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=s(t.difficulty)),t.totalDifficulty&&(t.totalDifficulty=s(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:l,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";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(9),i=r(12).errors,o=r(193),s=r(415),a=r(414),u=function t(e){this.provider=null,this.providers=t.providers,this.setProvider(e),this.subscriptions={}};u.givenProvider=a,u.providers={WebsocketProvider:r(413),HttpProvider:r(403),IpcProvider:r(401)},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.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:s}},function(t){t.exports={name:"web3",namespace:"ethereum",version:"1.0.0-beta.34",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.34","web3-core":"1.0.0-beta.34","web3-eth":"1.0.0-beta.34","web3-eth-personal":"1.0.0-beta.34","web3-net":"1.0.0-beta.34","web3-shh":"1.0.0-beta.34","web3-utils":"1.0.0-beta.34"}}},function(t,e,r){"use strict";(function(e){var n=r(201),i=r(200);function o(t){var e=t;if("string"!=typeof e)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof e+", while padToEven.");return e.length%2&&(e="0"+e),e}function s(t){return"0x"+t.toString(16)}t.exports={arrayContainsArray:function(t,e,r){if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof t+"'");if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof e+"'");return e[Boolean(r)?"some":"every"](function(e){return t.indexOf(e)>=0})},intToBuffer:function(t){var r=s(t);return new e(o(r.slice(2)),"hex")},getBinarySize:function(t){if("string"!=typeof t)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof t+"'.");return e.byteLength(t,"utf8")},isHexPrefixed:n,stripHexPrefix:i,padToEven:o,intToHex:s,fromAscii:function(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return"0x"+e},fromUtf8:function(t){return"0x"+o(new e(t,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(t){var e="",r=0,n=t.length;for("0x"===t.substring(0,2)&&(r=2);r<n;r+=2){var i=parseInt(t.substr(r,2),16);e+=String.fromCharCode(i)}return e},toUtf8:function(t){return new e(o(i(t).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(t,e,r){if(!Array.isArray(t))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof t+"'");if("string"!=typeof e)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof e+"'.");for(var n=[],i=0;i<t.length;i++){var o=t[i][e];if(r&&!o)o="";else if("string"!=typeof o)throw new Error("invalid abi");n.push(o)}return n},isHexString:function(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}}}).call(this,r(0).Buffer)},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){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e,r){(function(t,n){var i=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),u=n[r];r<o;u=n[++r])g(u)||!w(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(r,i){if(b(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(!0===n.noDeprecation)return r;var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),o=!0}return r.apply(this,arguments)}};var o,s={};function a(t,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function c(t,e){return t}function l(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=l(t,i,n)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),M(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(v(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return t.stylize(Date.prototype.toString.call(r),"date");if(M(r))return h(r)}var c,w="",A=!1,B=["{","}"];(p(r)&&(A=!0,B=["[","]"]),E(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return v(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),M(r)&&(w=" "+h(r)),0!==s.length||A&&0!=r.length?n<0?v(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=A?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)R(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}(t,r,n,a,s):s.map(function(e){return f(t,r,n,a,e,A)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,w,B)):B[0]+w+B[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),R(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function m(t){return"string"==typeof t}function b(t){return void 0===t}function v(t){return w(t)&&"[object RegExp]"===A(t)}function w(t){return"object"==typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===A(t)}function M(t){return w(t)&&("[object Error]"===A(t)||t instanceof Error)}function E(t){return"function"==typeof t}function A(t){return Object.prototype.toString.call(t)}function B(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(b(o)&&(o=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=v,e.isObject=w,e.isDate=_,e.isError=M,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(431);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(t=new Date,r=[B(t.getHours()),B(t.getMinutes()),B(t.getSeconds())].join(":"),[t.getDate(),T[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(430),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,r(8),r(24))},function(t,e,r){"use strict";var n=r(3),i=r(10).utils,o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),s(u,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),s(u,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),s(u,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},function(t,e,r){"use strict";var n=r(10).utils,i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),s(a,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),s(a,"privBytes",function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),s(a,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),s(a,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),s(a,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},function(t,e,r){"use strict";var n=r(110),i=r(10),o=i.utils,s=o.assert,a=o.parseBytes,u=r(434),c=r(433);function l(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof l))return new l(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=l,l.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},l.prototype.verify=function(t,e,r){t=a(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)},l.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},l.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},l.prototype.makeSignature=function(t){return t instanceof c?t:new c(this,t)},l.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},l.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},l.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(t){return o.intFromLE(t)},l.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,r){"use strict";var n=r(3),i=r(10).utils,o=i.assert;function s(t,e){if(t instanceof s)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 a(t,e){var r=t[e.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s];return e.place=s,i}function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function c(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.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(a(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var o=a(t,r),s=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var u=a(t,r);if(t.length!==u+r.place)return!1;var c=t.slice(r.place,u+r.place);return 0===s[0]&&128&s[1]&&(s=s.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(s),this.s=new n(c),this.recoveryParam=null,!0},s.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),s=[48];return c(s,o.length),s=s.concat(o),i.encode(s,t)}},function(t,e,r){"use strict";var n=r(3),i=r(10).utils.assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,r){"use strict";var n=r(110),i=r(208),o=r(22);function s(t){if(!(this instanceof s))return new s(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=s,s.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.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.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<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},function(t,e,r){"use strict";var n=r(3),i=r(438),o=r(10),s=o.utils.assert,a=r(437),u=r(436);function c(t){if(!(this instanceof c))return new c(t);"string"==typeof t&&(s(o.curves.hasOwnProperty(t),"Unknown curve "+t),t=o.curves[t]),t instanceof o.curves.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=c,c.prototype.keyPair=function(t){return new a(this,t)},c.prototype.keyFromPrivate=function(t,e){return a.fromPrivate(this,t,e)},c.prototype.keyFromPublic=function(t,e){return a.fromPublic(this,t,e)},c.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||o.rand(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),s=this.n.sub(new n(2));;){var a=new n(e.generate(r));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},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 s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),c=t.toArray("be",s),l=new i({hash:this.hash,entropy:a,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),f=0;;f++){var p=o.k?o.k(f):new n(l.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(h)>=0)){var d=this.g.mul(p);if(!d.isInfinity()){var g=d.getX(),y=g.umod(this.n);if(0!==y.cmpn(0)){var m=p.invm(this.n).mul(y.mul(e.getPrivate()).iadd(t));if(0!==(m=m.umod(this.n)).cmpn(0)){var b=(d.getY().isOdd()?1:0)|(0!==g.cmp(y)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),b^=1),new u({r:y,s:m,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,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,c=s.invm(this.n),l=c.mul(t).umod(this.n),h=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(l,r.getPublic(),h)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(l,r.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(t,e,r,i){s((3&r)===r,"The recovery param is more than two bits"),e=new u(e,i);var o=this.n,a=new n(t),c=e.r,l=e.s,h=1&r,f=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");c=f?this.curve.pointFromX(c.add(this.curve.n),h):this.curve.pointFromX(c,h);var p=e.r.invm(o),d=o.sub(a).mul(p).umod(o),g=l.mul(p).umod(o);return this.g.mulAdd(d,c,g)},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){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,r){"use strict";var n=r(27),i=r(22);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e,r){"use strict";var n=r(27),i=r(63),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function f(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(l,c),e.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],b=r,v=n,w=i,_=c,M=l,E=0;E<80;E++){var A=s(o(u(r,h(E,n,i,c),t[d[E]+e],f(E)),y[E]),l);r=l,l=c,c=o(i,10),i=n,n=A,A=s(o(u(b,h(79-E,v,w,_),t[g[E]+e],p(E)),m[E]),M),b=M,M=_,_=o(w,10),w=v,v=A}A=a(this.h[1],i,_),this.h[1]=a(this.h[2],c,M),this.h[2]=a(this.h[3],l,b),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=A},l.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[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],g=[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],y=[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],m=[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]},function(t,e,r){"use strict";var n=r(27),i=r(204);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,e,r){"use strict";var n=r(27),i=r(205);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,e,r){"use strict";var n=r(27),i=r(63),o=r(206),s=n.rotl32,a=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(f,l),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],l=this.h[2],f=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var d=~~(n/20),g=u(s(i,5),c(d,o,l,f),p,r[n],h[d]);p=f,f=l,l=s(o,30),o=i,i=g}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],l),this.h[3]=a(this.h[3],f),this.h[4]=a(this.h[4],p)},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";e.sha1=r(445),e.sha224=r(444),e.sha256=r(205),e.sha384=r(443),e.sha512=r(204)},function(t,e,r){"use strict";var n,i=e,o=r(110),s=r(10),a=s.utils.assert;function u(t){"short"===t.type?this.curve=new s.curve.short(t):"edwards"===t.type?this.curve=new s.curve.edwards(t):this.curve=new s.curve.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(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(440)}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";var n=r(84),i=r(10),o=r(3),s=r(1),a=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,a.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 l(t,e,r,n,i){a.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()))))}s(c,a),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)),s=n.redMul(i.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(e&&!u||!e&&u)&&(a=a.redNeg()),this.point(t,a)},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.one),i=r.redMul(this.d).redAdd(this.one),s=n.redMul(i.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.isOdd()!==e&&(a=a.redNeg()),this.point(a,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)},s(l,a.BasePoint),c.prototype.pointFromJSON=function(t){return l.fromJSON(this,t)},c.prototype.point=function(t,e,r,n){return new l(this,t,e,r,n)},l.fromJSON=function(t,e){return new l(t,e[0],e[1],e[2])},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},l.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),s=o.redSub(r),a=n.redSub(e),u=i.redMul(s),c=o.redMul(a),l=i.redMul(a),h=s.redMul(o);return this.curve.point(u,c,h,l)},l.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 s=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=n.redSub(i).redSub(o).redMul(s.redSub(this.curve.two)),e=s.redMul(c.redSub(o)),r=s.redSqr().redSub(s).redSub(s);else{var a=this.z.redSqr(),u=s.redSub(a).redISub(a);t=n.redSub(i).redISub(o).redMul(u),e=s.redMul(c.redSub(o)),r=s.redMul(u)}}else{var c=i.redAdd(o);a=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=c.redSub(a).redSub(a);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)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.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),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(e),c=o.redMul(s),l=a.redMul(u),h=o.redMul(u),f=s.redMul(a);return this.curve.point(c,l,f,h)},l.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),c=i.redAdd(a),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),h=n.redMul(u).redMul(l);return this.curve.twisted?(e=n.redMul(c).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(c)):(e=n.redMul(c).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(h,e,r)},l.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},l.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},l.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},l.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},l.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},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},l.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}return!1},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},function(t,e,r){"use strict";var n=r(84),i=r(3),o=r(1),s=n.base,a=r(10).utils;function u(t){s.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){s.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,s),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,s.BasePoint),u.prototype.decodePoint=function(t,e){return this.point(a.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()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},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),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),u=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,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(84),i=r(10),o=r(3),s=r(1),a=n.base,u=i.utils.assert;function c(t){a.call(this,"short",t),this.a=new o(t.a,16).toRed(this.red),this.b=new o(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(t,e,r,n){a.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(e,16),this.y=new o(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(t,e,r,n){a.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(e,16),this.y=new o(r,16),this.z=new o(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}s(c,a),t.exports=c,c.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new o(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new o(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],u(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map(function(t){return{a:new o(t.a,16),b:new o(t.b,16)}}):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:o.mont(t),r=new o(2).toRed(e).redInvm(),n=r.redNeg(),i=new o(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},c.prototype._getEndoBasis=function(t){for(var e,r,n,i,s,a,u,c,l,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=t,p=this.n.clone(),d=new o(1),g=new o(0),y=new o(0),m=new o(1),b=0;0!==f.cmpn(0);){var v=p.div(f);c=p.sub(v.mul(f)),l=y.sub(v.mul(d));var w=m.sub(v.mul(g));if(!n&&c.cmp(h)<0)e=u.neg(),r=d,n=c.neg(),i=l;else if(n&&2==++b)break;u=c,p=f,f=c,y=d,d=l,m=g,g=w}s=c.neg(),a=l;var _=n.sqr().add(i.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),i=i.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:i},{a:s,b:a}]},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),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(s).sub(a),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<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),l=0;l<2*o;l++)n[l]=null,i[l]=null;return c},s(l,a.BasePoint),c.prototype.point=function(t,e,r){return new l(this,t,e,r)},c.prototype.pointFromJSON=function(t,e){return l.fromJSON(this,t,e)},l.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},l.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},l.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.inf},l.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)},l.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)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.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)},l.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)},l.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)},l.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))},l.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},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(h,a.BasePoint),c.prototype.jpoint=function(t,e,r){return new h(this,t,e,r)},h.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)},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(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),l=c.redMul(a),h=n.redMul(c),f=u.redSqr().redIAdd(l).redISub(h).redISub(h),p=u.redMul(h.redISub(f)).redISub(o.redMul(l)),d=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(f,p,d)},h.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),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),l=r.redMul(u),h=a.redSqr().redIAdd(c).redISub(l).redISub(l),f=a.redMul(l.redISub(h)).redISub(i.redMul(c)),p=this.z.redMul(s);return this.curve.jpoint(h,f,p)},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,r=0;r<t;r++)e=e.dbl();return e}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),c=s.redAdd(s);for(r=0;r<t;r++){var l=o.redSqr(),h=c.redSqr(),f=h.redSqr(),p=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),d=o.redMul(h),g=p.redSqr().redISub(d.redAdd(d)),y=d.redISub(g),m=p.redMul(y);m=m.redIAdd(m).redISub(f);var b=c.redMul(a);r+1<t&&(u=u.redMul(f)),o=g,a=b,c=m}return this.curve.jpoint(o,c.redMul(i),a)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},h.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),h=this.y.redSqr(),f=h.redSqr(),p=this.x.redAdd(h).redSqr().redISub(l).redISub(f);p=p.redIAdd(p);var d=l.redAdd(l).redIAdd(l),g=d.redSqr(),y=f.redIAdd(f);y=(y=y.redIAdd(y)).redIAdd(y),t=g.redISub(p).redISub(p),e=d.redMul(p.redISub(t)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},h.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),h=this.y.redSqr(),f=this.x.redMul(h),p=this.x.redSub(l).redMul(this.x.redAdd(l));p=p.redAdd(p).redIAdd(p);var d=f.redIAdd(f),g=(d=d.redIAdd(d)).redAdd(d);t=p.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(l);var y=h.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),e=p.redMul(d.redISub(t)).redISub(y)}return this.curve.jpoint(t,e,r)},h.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(s),l=a.redSqr().redISub(c.redAdd(c)),h=c.redISub(l),f=s.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var p=a.redMul(h).redISub(f),d=r.redAdd(r).redMul(n);return this.curve.jpoint(l,p,d)},h.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),l=e.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.x.redMul(a).redISub(l);h=(h=h.redIAdd(h)).redIAdd(h);var f=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(a)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var p=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(h,f,p)},h.prototype.mul=function(t,e){return t=new o(t,e),this.curve._wnafMul(this,t)},h.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},h.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},h.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){"use strict";var n=r(3),i=r(10).utils,o=i.getNAF,s=i.getJSF,a=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){a(t.precomputed);var r=t._getDoubles(),n=o(e,1),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;for(var s=[],u=0;u<n.length;u+=r.step){var c=0;for(e=u+r.step-1;e>=u;e--)c=(c<<1)+n[e];s.push(c)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),f=i;f>0;f--){for(u=0;u<s.length;u++){(c=s[u])===f?h=h.mixedAdd(r.points[u]):c===-f&&(h=h.mixedAdd(r.points[u].neg()))}l=l.add(h)}return l.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r),u=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(e=0;c>=0&&0===s[c];c--)e++;if(c>=0&&e++,u=u.dblp(e),c<0)break;var l=s[c];a(0!==l),u="affine"===t.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){for(var a=this._wnafT1,u=this._wnafT2,c=this._wnafT3,l=0,h=0;h<n;h++){var f=(B=e[h])._getNAFPoints(t);a[h]=f.wnd,u[h]=f.points}for(h=n-1;h>=1;h-=2){var p=h-1,d=h;if(1===a[p]&&1===a[d]){var g=[e[p],null,null,e[d]];0===e[p].y.cmp(e[d].y)?(g[1]=e[p].add(e[d]),g[2]=e[p].toJ().mixedAdd(e[d].neg())):0===e[p].y.cmp(e[d].y.redNeg())?(g[1]=e[p].toJ().mixedAdd(e[d]),g[2]=e[p].add(e[d].neg())):(g[1]=e[p].toJ().mixedAdd(e[d]),g[2]=e[p].toJ().mixedAdd(e[d].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=s(r[p],r[d]);l=Math.max(m[0].length,l),c[p]=new Array(l),c[d]=new Array(l);for(var b=0;b<l;b++){var v=0|m[0][b],w=0|m[1][b];c[p][b]=y[3*(v+1)+(w+1)],c[d][b]=0,u[p]=g}}else c[p]=o(r[p],a[p]),c[d]=o(r[d],a[d]),l=Math.max(c[p].length,l),l=Math.max(c[d].length,l)}var _=this.jpoint(null,null,null),M=this._wnafT4;for(h=l;h>=0;h--){for(var E=0;h>=0;){var A=!0;for(b=0;b<n;b++)M[b]=0|c[b][h],0!==M[b]&&(A=!1);if(!A)break;E++,h--}if(h>=0&&E++,_=_.dblp(E),h<0)break;for(b=0;b<n;b++){var B,T=M[b];0!==T&&(T>0?B=u[b][T-1>>1]:T<0&&(B=u[b][-T-1>>1].neg()),_="affine"===B.type?_.mixedAdd(B):_.add(B))}}for(h=0;h<n;h++)u[h]=null;return i?_:_.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=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<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},function(t,e){},function(t,e,r){"use strict";var n=e,i=r(3),o=r(22),s=r(208);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e){for(var r=[],n=1<<e+1,i=t.clone();i.cmpn(1)>=0;){var o;if(i.isOdd()){var s=i.andln(n-1);o=s>(n>>1)-1?(n>>1)-s:s,i.isubn(o)}else o=0;r.push(o);for(var a=0!==i.cmpn(0)&&0===i.andln(n-1)?e+1:1,u=1;u<a;u++)r.push(0);i.iushrn(a)}return r},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||e.cmpn(-i)>0;){var o,s,a,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!=(a=t.andln(7)+n&7)&&5!==a||2!==c?u:-u,r[0].push(o),s=0==(1&c)?0:3!=(a=e.andln(7)+i&7)&&5!==a||2!==u?c:-c,r[1].push(s),2*n===o+1&&(n=1-n),2*i===s+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){t.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",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){var n=r(1),i=r(209),o=r(55),s=r(2).Buffer,a=new Array(160);function u(){this.init(),this._w=a,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=s.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){var n=r(1),i=r(210),o=r(55),s=r(2).Buffer,a=new Array(64);function u(){this.init(),this._w=a,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=s.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(1),i=r(55),o=r(2).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function h(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,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=(e=r[f-3]^r[f-8]^r[f-14]^r[f-16])<<1|e>>>31;for(var p=0;p<80;++p){var d=~~(p/20),g=c(n)+h(d,i,o,a)+u+r[p]+s[d]|0;u=a,a=o,o=l(i),i=n,n=g}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+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(1),i=r(55),o=r(2).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(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,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var f=0;f<80;++f){var p=~~(f/20),d=0|((e=n)<<5|e>>>27)+l(p,i,o,a)+u+r[f]+s[p];u=a,a=o,o=c(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+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){"use strict";(function(e){var r=4,n=new e(r);n.fill(0);t.exports=function(t,i){var o=i(function(t){if(t.length%r!=0){var i=t.length+(r-t.length%r);t=e.concat([t,n],i)}for(var o=new Array(t.length>>>2),s=0,a=0;s<t.length;s+=r,a++)o[a]=t.readInt32LE(s);return o}(t),8*t.length);t=new e(16);for(var s=0;s<o.length;s++)t.writeInt32LE(o[s],s<<2,!0);return t}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=r(2).Buffer,i=r(48),o=r(3),s=r(10).ec,a=r(211),u=new s("secp256k1"),c=u.curve;function l(t){var e=t[0];switch(e){case 2:case 3:return 33!==t.length?null:function(t,e){var r=new o(e);if(r.cmp(c.p)>=0)return null;var n=(r=r.toRed(c.red)).redSqr().redIMul(r).redIAdd(c.b).redSqrt();return 3===t!==n.isOdd()&&(n=n.redNeg()),u.keyPair({pub:{x:r,y:n}})}(e,t.slice(1,33));case 4:case 6:case 7:return 65!==t.length?null:function(t,e,r){var n=new o(e),i=new o(r);if(n.cmp(c.p)>=0||i.cmp(c.p)>=0)return null;if(n=n.toRed(c.red),i=i.toRed(c.red),(6===t||7===t)&&i.isOdd()!==(7===t))return null;var s=n.redSqr().redIMul(n);return i.redSqr().redISub(s.redIAdd(c.b)).isZero()?u.keyPair({pub:{x:n,y:i}}):null}(e,t.slice(1,33),t.slice(33,65));default:return null}}e.privateKeyVerify=function(t){var e=new o(t);return e.cmp(c.n)<0&&!e.isZero()},e.privateKeyExport=function(t,e){var r=new o(t);if(r.cmp(c.n)>=0||r.isZero())throw new Error(a.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return n.from(u.keyFromPrivate(t).getPublic(e,!0))},e.privateKeyNegate=function(t){var e=new o(t);return e.isZero()?n.alloc(32):c.n.sub(e).umod(c.n).toArrayLike(n,"be",32)},e.privateKeyModInverse=function(t){var e=new o(t);if(e.cmp(c.n)>=0||e.isZero())throw new Error(a.EC_PRIVATE_KEY_RANGE_INVALID);return e.invm(c.n).toArrayLike(n,"be",32)},e.privateKeyTweakAdd=function(t,e){var r=new o(e);if(r.cmp(c.n)>=0)throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(new o(t)),r.cmp(c.n)>=0&&r.isub(c.n),r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toArrayLike(n,"be",32)},e.privateKeyTweakMul=function(t,e){var r=new o(e);if(r.cmp(c.n)>=0||r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);return r.imul(new o(t)),r.cmp(c.n)&&(r=r.umod(c.n)),r.toArrayLike(n,"be",32)},e.publicKeyCreate=function(t,e){var r=new o(t);if(r.cmp(c.n)>=0||r.isZero())throw new Error(a.EC_PUBLIC_KEY_CREATE_FAIL);return n.from(u.keyFromPrivate(t).getPublic(e,!0))},e.publicKeyConvert=function(t,e){var r=l(t);if(null===r)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);return n.from(r.getPublic(e,!0))},e.publicKeyVerify=function(t){return null!==l(t)},e.publicKeyTweakAdd=function(t,e,r){var i=l(t);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);if((e=new o(e)).cmp(c.n)>=0)throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return n.from(c.g.mul(e).add(i.pub).encode(!0,r))},e.publicKeyTweakMul=function(t,e,r){var i=l(t);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);if((e=new o(e)).cmp(c.n)>=0||e.isZero())throw new Error(a.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.from(i.pub.mul(e).encode(!0,r))},e.publicKeyCombine=function(t,e){for(var r=new Array(t.length),i=0;i<t.length;++i)if(r[i]=l(t[i]),null===r[i])throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);for(var o=r[0].pub,s=1;s<r.length;++s)o=o.add(r[s].pub);if(o.isInfinity())throw new Error(a.EC_PUBLIC_KEY_COMBINE_FAIL);return n.from(o.encode(!0,e))},e.signatureNormalize=function(t){var e=new o(t.slice(0,32)),r=new o(t.slice(32,64));if(e.cmp(c.n)>=0||r.cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);var i=n.from(t);return 1===r.cmp(u.nh)&&c.n.sub(r).toArrayLike(n,"be",32).copy(i,32),i},e.signatureExport=function(t){var e=t.slice(0,32),r=t.slice(32,64);if(new o(e).cmp(c.n)>=0||new o(r).cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);return{r:e,s:r}},e.signatureImport=function(t){var e=new o(t.r);e.cmp(c.n)>=0&&(e=new o(0));var r=new o(t.s);return r.cmp(c.n)>=0&&(r=new o(0)),n.concat([e.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},e.sign=function(t,e,r,i){if("function"==typeof r){var s=r;r=function(r){var u=s(t,e,null,i,r);if(!n.isBuffer(u)||32!==u.length)throw new Error(a.ECDSA_SIGN_FAIL);return new o(u)}}var l=new o(e);if(l.cmp(c.n)>=0||l.isZero())throw new Error(a.ECDSA_SIGN_FAIL);var h=u.sign(t,e,{canonical:!0,k:r,pers:i});return{signature:n.concat([h.r.toArrayLike(n,"be",32),h.s.toArrayLike(n,"be",32)]),recovery:h.recoveryParam}},e.verify=function(t,e,r){var n={r:e.slice(0,32),s:e.slice(32,64)},i=new o(n.r),s=new o(n.s);if(i.cmp(c.n)>=0||s.cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);if(1===s.cmp(u.nh)||i.isZero()||s.isZero())return!1;var h=l(r);if(null===h)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);return u.verify(t,n,{x:h.pub.x,y:h.pub.y})},e.recover=function(t,e,r,i){var s={r:e.slice(0,32),s:e.slice(32,64)},l=new o(s.r),h=new o(s.s);if(l.cmp(c.n)>=0||h.cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);try{if(l.isZero()||h.isZero())throw new Error;var f=u.recoverPubKey(t,s,r);return n.from(f.encode(!0,i))}catch(t){throw new Error(a.ECDSA_RECOVER_FAIL)}},e.ecdh=function(t,r){var n=e.ecdhUnsafe(t,r,!0);return i("sha256").update(n).digest()},e.ecdhUnsafe=function(t,e,r){var i=l(t);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);var s=new o(e);if(s.cmp(c.n)>=0||s.isZero())throw new Error(a.ECDH_FAIL);return n.from(i.pub.mul(s).encode(!0,r))}},function(t,e,r){var n=r(2).Buffer;t.exports={check:function(t){if(t.length<8)return!1;if(t.length>72)return!1;if(48!==t[0])return!1;if(t[1]!==t.length-2)return!1;if(2!==t[2])return!1;var e=t[3];if(0===e)return!1;if(5+e>=t.length)return!1;if(2!==t[4+e])return!1;var r=t[5+e];return!(0===r||6+e+r!==t.length||128&t[4]||e>1&&0===t[4]&&!(128&t[5])||128&t[e+6]||r>1&&0===t[e+6]&&!(128&t[e+7]))},decode:function(t){if(t.length<8)throw new Error("DER sequence length is too short");if(t.length>72)throw new Error("DER sequence length is too long");if(48!==t[0])throw new Error("Expected DER sequence");if(t[1]!==t.length-2)throw new Error("DER sequence length is invalid");if(2!==t[2])throw new Error("Expected DER integer");var e=t[3];if(0===e)throw new Error("R length is zero");if(5+e>=t.length)throw new Error("R length is too long");if(2!==t[4+e])throw new Error("Expected DER integer (2)");var r=t[5+e];if(0===r)throw new Error("S length is zero");if(6+e+r!==t.length)throw new Error("S length is invalid");if(128&t[4])throw new Error("R value is negative");if(e>1&&0===t[4]&&!(128&t[5]))throw new Error("R value excessively padded");if(128&t[e+6])throw new Error("S value is negative");if(r>1&&0===t[e+6]&&!(128&t[e+7]))throw new Error("S value excessively padded");return{r:t.slice(4,4+e),s:t.slice(6+e)}},encode:function(t,e){var r=t.length,i=e.length;if(0===r)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&t[0])throw new Error("R value is negative");if(128&e[0])throw new Error("S value is negative");if(r>1&&0===t[0]&&!(128&t[1]))throw new Error("R value excessively padded");if(i>1&&0===e[0]&&!(128&e[1]))throw new Error("S value excessively padded");var o=n.allocUnsafe(6+r+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=t.length,t.copy(o,4),o[4+r]=2,o[5+r]=e.length,e.copy(o,6+r),o}}},function(t,e,r){"use strict";var n=r(2).Buffer,i=r(461),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),s=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e.privateKeyExport=function(t,e,r){var i=n.from(r?o:s);return t.copy(i,r?8:9),e.copy(i,r?181:214),i},e.privateKeyImport=function(t){var e=t.length,r=0;if(!(e<r+1||48!==t[r])&&!(e<(r+=1)+1)&&128&t[r]){var n=127&t[r];if(r+=1,!(n<1||n>2||e<r+n)){var i=t[r+n-1]|(n>1?t[r+n-2]<<8:0);if(!(e<(r+=n)+i||e<r+3||2!==t[r]||1!==t[r+1]||1!==t[r+2]||e<(r+=3)+2||4!==t[r]||t[r+1]>32||e<r+2+t[r+1]))return t.slice(r+2,r+2+t[r+1])}}},e.signatureExport=function(t){for(var e=n.concat([n.from([0]),t.r]),r=33,o=0;r>1&&0===e[o]&&!(128&e[o+1]);--r,++o);for(var s=n.concat([n.from([0]),t.s]),a=33,u=0;a>1&&0===s[u]&&!(128&s[u+1]);--a,++u);return i.encode(e.slice(o),s.slice(u))},e.signatureImport=function(t){var e=n.alloc(32,0),r=n.alloc(32,0);try{var o=i.decode(t);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(t){return}return o.r.copy(e,32-o.r.length),o.s.copy(r,32-o.s.length),{r:e,s:r}},e.signatureImportLax=function(t){var e=n.alloc(32,0),r=n.alloc(32,0),i=t.length,o=0;if(48===t[o++]){var s=t[o++];if(!(128&s&&(o+=s-128)>i)&&2===t[o++]){var a=t[o++];if(128&a){if(o+(s=a-128)>i)return;for(;s>0&&0===t[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+t[o]}if(!(a>i-o)){var u=o;if(o+=a,2===t[o++]){var c=t[o++];if(128&c){if(o+(s=c-128)>i)return;for(;s>0&&0===t[o];o+=1,s-=1);for(c=0;s>0;o+=1,s-=1)c=(c<<8)+t[o]}if(!(c>i-o)){var l=o;for(o+=c;a>0&&0===t[u];a-=1,u+=1);if(!(a>32)){var h=t.slice(u,u+a);for(h.copy(e,32-h.length);c>0&&0===t[l];c-=1,l+=1);if(!(c>32)){var f=t.slice(l,l+c);return f.copy(r,32-f.length),{r:e,s:r}}}}}}}}}},function(t,e,r){"use strict";(function(t){var r=Object.prototype.toString;e.isArray=function(t,e){if(!Array.isArray(t))throw TypeError(e)},e.isBoolean=function(t,e){if("[object Boolean]"!==r.call(t))throw TypeError(e)},e.isBuffer=function(e,r){if(!t.isBuffer(e))throw TypeError(r)},e.isFunction=function(t,e){if("[object Function]"!==r.call(t))throw TypeError(e)},e.isNumber=function(t,e){if("[object Number]"!==r.call(t))throw TypeError(e)},e.isObject=function(t,e){if("[object Object]"!==r.call(t))throw TypeError(e)},e.isBufferLength=function(t,e,r){if(t.length!==e)throw RangeError(r)},e.isBufferLength2=function(t,e,r,n){if(t.length!==e&&t.length!==r)throw RangeError(n)},e.isLengthGTZero=function(t,e){if(0===t.length)throw RangeError(e)},e.isNumberInInterval=function(t,e,r,n){if(t<=e||t>=r)throw RangeError(n)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=r(463),i=r(462),o=r(211);function s(t,e){return void 0===t?e:(n.isBoolean(t,o.COMPRESSED_TYPE_INVALID),t)}t.exports=function(t){return{privateKeyVerify:function(e){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),32===e.length&&t.privateKeyVerify(e)},privateKeyExport:function(e,r){n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0);var a=t.privateKeyExport(e,r);return i.privateKeyExport(e,a,r)},privateKeyImport:function(e){if(n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),(e=i.privateKeyImport(e))&&32===e.length&&t.privateKeyVerify(e))return e;throw new Error(o.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(e){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),t.privateKeyNegate(e)},privateKeyModInverse:function(e){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),t.privateKeyModInverse(e)},privateKeyTweakAdd:function(e,r){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),t.privateKeyTweakAdd(e,r)},privateKeyTweakMul:function(e,r){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),t.privateKeyTweakMul(e,r)},publicKeyCreate:function(e,r){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0),t.publicKeyCreate(e,r)},publicKeyConvert:function(e,r){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r=s(r,!0),t.publicKeyConvert(e,r)},publicKeyVerify:function(e){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),t.publicKeyVerify(e)},publicKeyTweakAdd:function(e,r,i){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),t.publicKeyTweakAdd(e,r,i)},publicKeyTweakMul:function(e,r,i){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),t.publicKeyTweakMul(e,r,i)},publicKeyCombine:function(e,r){n.isArray(e,o.EC_PUBLIC_KEYS_TYPE_INVALID),n.isLengthGTZero(e,o.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var i=0;i<e.length;++i)n.isBuffer(e[i],o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e[i],33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID);return r=s(r,!0),t.publicKeyCombine(e,r)},signatureNormalize:function(e){return n.isBuffer(e,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(e,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),t.signatureNormalize(e)},signatureExport:function(e){n.isBuffer(e,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(e,64,o.ECDSA_SIGNATURE_LENGTH_INVALID);var r=t.signatureExport(e);return i.signatureExport(r)},signatureImport:function(e){n.isBuffer(e,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isLengthGTZero(e,o.ECDSA_SIGNATURE_LENGTH_INVALID);var r=i.signatureImport(e);if(r)return t.signatureImport(r);throw new Error(o.ECDSA_SIGNATURE_PARSE_DER_FAIL)},signatureImportLax:function(e){n.isBuffer(e,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isLengthGTZero(e,o.ECDSA_SIGNATURE_LENGTH_INVALID);var r=i.signatureImportLax(e);if(r)return t.signatureImport(r);throw new Error(o.ECDSA_SIGNATURE_PARSE_DER_FAIL)},sign:function(e,r,i){n.isBuffer(e,o.MSG32_TYPE_INVALID),n.isBufferLength(e,32,o.MSG32_LENGTH_INVALID),n.isBuffer(r,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,o.EC_PRIVATE_KEY_LENGTH_INVALID);var s=null,a=null;return void 0!==i&&(n.isObject(i,o.OPTIONS_TYPE_INVALID),void 0!==i.data&&(n.isBuffer(i.data,o.OPTIONS_DATA_TYPE_INVALID),n.isBufferLength(i.data,32,o.OPTIONS_DATA_LENGTH_INVALID),s=i.data),void 0!==i.noncefn&&(n.isFunction(i.noncefn,o.OPTIONS_NONCEFN_TYPE_INVALID),a=i.noncefn)),t.sign(e,r,a,s)},verify:function(e,r,i){return n.isBuffer(e,o.MSG32_TYPE_INVALID),n.isBufferLength(e,32,o.MSG32_LENGTH_INVALID),n.isBuffer(r,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(r,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),n.isBuffer(i,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(i,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),t.verify(e,r,i)},recover:function(e,r,i,a){return n.isBuffer(e,o.MSG32_TYPE_INVALID),n.isBufferLength(e,32,o.MSG32_LENGTH_INVALID),n.isBuffer(r,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(r,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),n.isNumber(i,o.RECOVERY_ID_TYPE_INVALID),n.isNumberInInterval(i,-1,4,o.RECOVERY_ID_VALUE_INVALID),a=s(a,!0),t.recover(e,r,i,a)},ecdh:function(e,r){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),t.ecdh(e,r)},ecdhUnsafe:function(e,r,i){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),i=s(i,!0),t.ecdhUnsafe(e,r,i)}}}},function(t,e,r){"use strict";t.exports=r(464)(r(460))},function(t,e,r){"use strict";var n=[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];e.p1600=function(t){for(var e=0;e<24;++e){var r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],f=t[9]^t[19]^t[29]^t[39]^t[49],p=h^(o<<1|s>>>31),d=f^(s<<1|o>>>31),g=t[0]^p,y=t[1]^d,m=t[10]^p,b=t[11]^d,v=t[20]^p,w=t[21]^d,_=t[30]^p,M=t[31]^d,E=t[40]^p,A=t[41]^d;p=r^(a<<1|u>>>31),d=i^(u<<1|a>>>31);var B=t[2]^p,T=t[3]^d,R=t[12]^p,x=t[13]^d,S=t[22]^p,k=t[23]^d,C=t[32]^p,I=t[33]^d,j=t[42]^p,F=t[43]^d;p=o^(c<<1|l>>>31),d=s^(l<<1|c>>>31);var O=t[4]^p,P=t[5]^d,L=t[14]^p,N=t[15]^d,D=t[24]^p,U=t[25]^d,W=t[34]^p,q=t[35]^d,z=t[44]^p,G=t[45]^d;p=a^(h<<1|f>>>31),d=u^(f<<1|h>>>31);var H=t[6]^p,V=t[7]^d,K=t[16]^p,$=t[17]^d,Y=t[26]^p,Z=t[27]^d,J=t[36]^p,X=t[37]^d,Q=t[46]^p,tt=t[47]^d;p=c^(r<<1|i>>>31),d=l^(i<<1|r>>>31);var et=t[8]^p,rt=t[9]^d,nt=t[18]^p,it=t[19]^d,ot=t[28]^p,st=t[29]^d,at=t[38]^p,ut=t[39]^d,ct=t[48]^p,lt=t[49]^d,ht=g,ft=y,pt=b<<4|m>>>28,dt=m<<4|b>>>28,gt=v<<3|w>>>29,yt=w<<3|v>>>29,mt=M<<9|_>>>23,bt=_<<9|M>>>23,vt=E<<18|A>>>14,wt=A<<18|E>>>14,_t=B<<1|T>>>31,Mt=T<<1|B>>>31,Et=x<<12|R>>>20,At=R<<12|x>>>20,Bt=S<<10|k>>>22,Tt=k<<10|S>>>22,Rt=I<<13|C>>>19,xt=C<<13|I>>>19,St=j<<2|F>>>30,kt=F<<2|j>>>30,Ct=P<<30|O>>>2,It=O<<30|P>>>2,jt=L<<6|N>>>26,Ft=N<<6|L>>>26,Ot=U<<11|D>>>21,Pt=D<<11|U>>>21,Lt=W<<15|q>>>17,Nt=q<<15|W>>>17,Dt=G<<29|z>>>3,Ut=z<<29|G>>>3,Wt=H<<28|V>>>4,qt=V<<28|H>>>4,zt=$<<23|K>>>9,Gt=K<<23|$>>>9,Ht=Y<<25|Z>>>7,Vt=Z<<25|Y>>>7,Kt=J<<21|X>>>11,$t=X<<21|J>>>11,Yt=tt<<24|Q>>>8,Zt=Q<<24|tt>>>8,Jt=et<<27|rt>>>5,Xt=rt<<27|et>>>5,Qt=nt<<20|it>>>12,te=it<<20|nt>>>12,ee=st<<7|ot>>>25,re=ot<<7|st>>>25,ne=at<<8|ut>>>24,ie=ut<<8|at>>>24,oe=ct<<14|lt>>>18,se=lt<<14|ct>>>18;t[0]=ht^~Et&Ot,t[1]=ft^~At&Pt,t[10]=Wt^~Qt&gt,t[11]=qt^~te&yt,t[20]=_t^~jt&Ht,t[21]=Mt^~Ft&Vt,t[30]=Jt^~pt&Bt,t[31]=Xt^~dt&Tt,t[40]=Ct^~zt&ee,t[41]=It^~Gt&re,t[2]=Et^~Ot&Kt,t[3]=At^~Pt&$t,t[12]=Qt^~gt&Rt,t[13]=te^~yt&xt,t[22]=jt^~Ht&ne,t[23]=Ft^~Vt&ie,t[32]=pt^~Bt&Lt,t[33]=dt^~Tt&Nt,t[42]=zt^~ee&mt,t[43]=Gt^~re&bt,t[4]=Ot^~Kt&oe,t[5]=Pt^~$t&se,t[14]=gt^~Rt&Dt,t[15]=yt^~xt&Ut,t[24]=Ht^~ne&vt,t[25]=Vt^~ie&wt,t[34]=Bt^~Lt&Yt,t[35]=Tt^~Nt&Zt,t[44]=ee^~mt&St,t[45]=re^~bt&kt,t[6]=Kt^~oe&ht,t[7]=$t^~se&ft,t[16]=Rt^~Dt&Wt,t[17]=xt^~Ut&qt,t[26]=ne^~vt&_t,t[27]=ie^~wt&Mt,t[36]=Lt^~Yt&Jt,t[37]=Nt^~Zt&Xt,t[46]=mt^~St&Ct,t[47]=bt^~kt&It,t[8]=oe^~ht&Et,t[9]=se^~ft&At,t[18]=Dt^~Wt&Qt,t[19]=Ut^~qt&te,t[28]=vt^~_t&jt,t[29]=wt^~Mt&Ft,t[38]=Yt^~Jt&pt,t[39]=Zt^~Xt&dt,t[48]=St^~Ct&zt,t[49]=kt^~It&Gt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},function(t,e,r){"use strict";var n=r(2).Buffer,i=r(466);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(t,e){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(t){for(var e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0)},o.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!=(128&t)&&this.count===this.blockSize-1&&i.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,i.p1600(this.state),this.count=0,this.squeezing=!0},o.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);for(var e=n.alloc(t),r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return e},o.prototype.copy=function(t){for(var e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=o},function(t,e,r){"use strict";var n=r(2).Buffer,i=r(58).Transform,o=r(1);t.exports=function(t){function e(e,r,n,o){i.call(this,o),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._options=o,this._state=new t,this._state.initialize(e,r),this._finalized=!1}return o(e,i),e.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},e.prototype._flush=function(){},e.prototype._read=function(t){this.push(this.squeeze(t))},e.prototype.update=function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this},e.prototype.squeeze=function(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(t);return void 0!==e&&(r=r.toString(e)),r},e.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},e.prototype._clone=function(){var t=new e(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t},e}},function(t,e,r){"use strict";var n=r(2).Buffer,i=r(58).Transform,o=r(1);t.exports=function(t){function e(e,r,n,o,s){i.call(this,s),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=o,this._options=s,this._state=new t,this._state.initialize(e,r),this._finalized=!1}return o(e,i),e.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},e.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},e.prototype.update=function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this},e.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e},e.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},e.prototype._clone=function(){var t=new e(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t},e}},function(t,e,r){"use strict";var n=r(469),i=r(468);t.exports=function(t){var e=n(t),r=i(t);return function(t,n){switch("string"==typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,n);case"keccak256":return new e(1088,512,null,256,n);case"keccak384":return new e(832,768,null,384,n);case"keccak512":return new e(576,1024,null,512,n);case"sha3-224":return new e(1152,448,6,224,n);case"sha3-256":return new e(1088,512,6,256,n);case"sha3-384":return new e(832,768,6,384,n);case"sha3-512":return new e(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+t)}}}},function(t,e,r){"use strict";t.exports=r(470)(r(467))},function(t,e,r){"use strict";var n="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},i=r(471),o=r(465),s=r(203),a=r(202),u=r(3),c=r(48),l=r(2).Buffer;Object.assign(e,r(429)),e.MAX_INTEGER=new u("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new u("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.SHA3_NULL_S=e.KECCAK256_NULL_S,e.KECCAK256_NULL=l.from(e.KECCAK256_NULL_S,"hex"),e.SHA3_NULL=e.KECCAK256_NULL,e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.SHA3_RLP_ARRAY_S=e.KECCAK256_RLP_ARRAY_S,e.KECCAK256_RLP_ARRAY=l.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.SHA3_RLP_ARRAY=e.KECCAK256_RLP_ARRAY,e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.SHA3_RLP_S=e.KECCAK256_RLP_S,e.KECCAK256_RLP=l.from(e.KECCAK256_RLP_S,"hex"),e.SHA3_RLP=e.KECCAK256_RLP,e.BN=u,e.rlp=a,e.secp256k1=o,e.zeros=function(t){return l.allocUnsafe(t).fill(0)},e.zeroAddress=function(){var t=e.zeros(20);return e.bufferToHex(t)},e.setLengthLeft=e.setLength=function(t,r,n){var i=e.zeros(r);return t=e.toBuffer(t),n?t.length<r?(t.copy(i),i):t.slice(0,r):t.length<r?(t.copy(i,r-t.length),i):t.slice(-r)},e.setLengthRight=function(t,r){return e.setLength(t,r,!0)},e.unpad=e.stripZeros=function(t){for(var r=(t=e.stripHexPrefix(t))[0];t.length>0&&"0"===r.toString();)r=(t=t.slice(1))[0];return t},e.toBuffer=function(t){if(!l.isBuffer(t))if(Array.isArray(t))t=l.from(t);else if("string"==typeof t)t=e.isHexString(t)?l.from(e.padToEven(e.stripHexPrefix(t)),"hex"):l.from(t);else if("number"==typeof t)t=e.intToBuffer(t);else if(null===t||void 0===t)t=l.allocUnsafe(0);else if(u.isBN(t))t=t.toArrayLike(l);else{if(!t.toArray)throw new Error("invalid type");t=l.from(t.toArray())}return t},e.bufferToInt=function(t){return new u(e.toBuffer(t)).toNumber()},e.bufferToHex=function(t){return"0x"+(t=e.toBuffer(t)).toString("hex")},e.fromSigned=function(t){return new u(t).fromTwos(256)},e.toUnsigned=function(t){return l.from(t.toTwos(256).toArray())},e.keccak=function(t,r){return t=e.toBuffer(t),r||(r=256),i("keccak"+r).update(t).digest()},e.keccak256=function(t){return e.keccak(t)},e.sha3=e.keccak,e.sha256=function(t){return t=e.toBuffer(t),c("sha256").update(t).digest()},e.ripemd160=function(t,r){t=e.toBuffer(t);var n=c("rmd160").update(t).digest();return!0===r?e.setLength(n,32):n},e.rlphash=function(t){return e.keccak(a.encode(t))},e.isValidPrivate=function(t){return o.privateKeyVerify(t)},e.isValidPublic=function(t,e){return 64===t.length?o.publicKeyVerify(l.concat([l.from([4]),t])):!!e&&o.publicKeyVerify(t)},e.pubToAddress=e.publicToAddress=function(t,r){return t=e.toBuffer(t),r&&64!==t.length&&(t=o.publicKeyConvert(t,!1).slice(1)),s(64===t.length),e.keccak(t).slice(-20)};var h=e.privateToPublic=function(t){return t=e.toBuffer(t),o.publicKeyCreate(t,!1).slice(1)};e.importPublic=function(t){return 64!==(t=e.toBuffer(t)).length&&(t=o.publicKeyConvert(t,!1).slice(1)),t},e.ecsign=function(t,e){var r=o.sign(t,e),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},e.hashPersonalMessage=function(t){var r=e.toBuffer("Ethereum Signed Message:\n"+t.length.toString());return e.keccak(l.concat([r,t]))},e.ecrecover=function(t,r,n,i){var s=l.concat([e.setLength(n,32),e.setLength(i,32)],64),a=r-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var u=o.recover(t,s,a);return o.publicKeyConvert(u,!1).slice(1)},e.toRpcSig=function(t,r,n){if(27!==t&&28!==t)throw new Error("Invalid recovery id");return e.bufferToHex(l.concat([e.setLengthLeft(r,32),e.setLengthLeft(n,32),e.toBuffer(t-27)]))},e.fromRpcSig=function(t){if(65!==(t=e.toBuffer(t)).length)throw new Error("Invalid signature length");var r=t[64];return r<27&&(r+=27),{v:r,r:t.slice(0,32),s:t.slice(32,64)}},e.privateToAddress=function(t){return e.publicToAddress(h(t))},e.isValidAddress=function(t){return/^0x[0-9a-fA-F]{40}$/.test(t)},e.isZeroAddress=function(t){return e.zeroAddress()===e.addHexPrefix(t)},e.toChecksumAddress=function(t){t=e.stripHexPrefix(t).toLowerCase();for(var r=e.keccak(t).toString("hex"),n="0x",i=0;i<t.length;i++)parseInt(r[i],16)>=8?n+=t[i].toUpperCase():n+=t[i];return n},e.isValidChecksumAddress=function(t){return e.isValidAddress(t)&&e.toChecksumAddress(t)===t},e.generateAddress=function(t,r){return t=e.toBuffer(t),r=(r=new u(r)).isZero()?null:l.from(r.toArray()),e.rlphash([t,r]).slice(-20)},e.isPrecompiled=function(t){var r=e.unpad(t);return 1===r.length&&r[0]>=1&&r[0]<=8},e.addHexPrefix=function(t){return"string"!=typeof t?t:e.isHexPrefixed(t)?t:"0x"+t},e.isValidSignature=function(t,e,r,n){var i=new u("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new u("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===e.length&&32===r.length&&((27===t||28===t)&&(e=new u(e),r=new u(r),!(e.isZero()||e.gt(o)||r.isZero()||r.gt(o))&&(!1!==n||1!==new u(r).cmp(i))))},e.baToJSON=function(t){if(l.isBuffer(t))return"0x"+t.toString("hex");if(t instanceof Array){for(var r=[],n=0;n<t.length;n++)r.push(e.baToJSON(t[n]));return r}},e.defineProperties=function(t,r,i){if(t.raw=[],t._fields=[],t.toJSON=function(r){if(r){var n={};return t._fields.forEach(function(e){n[e]="0x"+t[e].toString("hex")}),n}return e.baToJSON(this.raw)},t.serialize=function(){return a.encode(t.raw)},r.forEach(function(r,n){function i(){return t.raw[n]}function o(i){"00"!==(i=e.toBuffer(i)).toString("hex")||r.allowZero||(i=l.allocUnsafe(0)),r.allowLess&&r.length?(i=e.stripZeros(i),s(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||s(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[n]=i}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})}),i)if("string"==typeof i&&(i=l.from(e.stripHexPrefix(i),"hex")),l.isBuffer(i)&&(i=a.decode(i)),Array.isArray(i)){if(i.length>t._fields.length)throw new Error("wrong number of fields in data");i.forEach(function(r,n){t[t._fields[n]]=e.toBuffer(r)})}else{if("object"!==(void 0===i?"undefined":n(i)))throw new Error("invalid data");var o=Object.keys(i);r.forEach(function(e){-1!==o.indexOf(e.name)&&(t[e.name]=i[e.name]),-1!==o.indexOf(e.alias)&&(t[e.alias]=i[e.alias])})}}},function(t,e,r){"use strict";var n=r(41),i=n,o=Function("return this")(),s=r(14);i.exportSymbol("proto.AddressMapperAddContractMappingRequest",null,o),i.exportSymbol("proto.AddressMapperAddIdentityMappingRequest",null,o),i.exportSymbol("proto.AddressMapperGetMappingRequest",null,o),i.exportSymbol("proto.AddressMapperGetMappingResponse",null,o),i.exportSymbol("proto.AddressMapperInitRequest",null,o),i.exportSymbol("proto.AddressMapperMapping",null,o),i.exportSymbol("proto.AddressMapperRemoveMappingRequest",null,o),proto.AddressMapperMapping=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.AddressMapperMapping,n.Message),i.DEBUG&&!COMPILED&&(proto.AddressMapperMapping.displayName="proto.AddressMapperMapping"),n.Message.GENERATE_TO_OBJECT&&(proto.AddressMapperMapping.prototype.toObject=function(t){return proto.AddressMapperMapping.toObject(t,this)},proto.AddressMapperMapping.toObject=function(t,e){var r,n={from:(r=e.getFrom())&&s.Address.toObject(t,r),to:(r=e.getTo())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.AddressMapperMapping.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.AddressMapperMapping;return proto.AddressMapperMapping.deserializeBinaryFromReader(r,e)},proto.AddressMapperMapping.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setFrom(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTo(r);break;default:e.skipField()}}return t},proto.AddressMapperMapping.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.AddressMapperMapping.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.AddressMapperMapping.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getFrom())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getTo())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter)},proto.AddressMapperMapping.prototype.getFrom=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.AddressMapperMapping.prototype.setFrom=function(t){n.Message.setWrapperField(this,1,t)},proto.AddressMapperMapping.prototype.clearFrom=function(){this.setFrom(void 0)},proto.AddressMapperMapping.prototype.hasFrom=function(){return null!=n.Message.getField(this,1)},proto.AddressMapperMapping.prototype.getTo=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.AddressMapperMapping.prototype.setTo=function(t){n.Message.setWrapperField(this,2,t)},proto.AddressMapperMapping.prototype.clearTo=function(){this.setTo(void 0)},proto.AddressMapperMapping.prototype.hasTo=function(){return null!=n.Message.getField(this,2)},proto.AddressMapperInitRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.AddressMapperInitRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.AddressMapperInitRequest.displayName="proto.AddressMapperInitRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.AddressMapperInitRequest.prototype.toObject=function(t){return proto.AddressMapperInitRequest.toObject(t,this)},proto.AddressMapperInitRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.AddressMapperInitRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.AddressMapperInitRequest;return proto.AddressMapperInitRequest.deserializeBinaryFromReader(r,e)},proto.AddressMapperInitRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.AddressMapperInitRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.AddressMapperInitRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.AddressMapperInitRequest.serializeBinaryToWriter=function(t,e){},proto.AddressMapperAddIdentityMappingRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.AddressMapperAddIdentityMappingRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.AddressMapperAddIdentityMappingRequest.displayName="proto.AddressMapperAddIdentityMappingRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.AddressMapperAddIdentityMappingRequest.prototype.toObject=function(t){return proto.AddressMapperAddIdentityMappingRequest.toObject(t,this)},proto.AddressMapperAddIdentityMappingRequest.toObject=function(t,e){var r,n={from:(r=e.getFrom())&&s.Address.toObject(t,r),to:(r=e.getTo())&&s.Address.toObject(t,r),signature:e.getSignature_asB64()};return t&&(n.$jspbMessageInstance=e),n}),proto.AddressMapperAddIdentityMappingRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.AddressMapperAddIdentityMappingRequest;return proto.AddressMapperAddIdentityMappingRequest.deserializeBinaryFromReader(r,e)},proto.AddressMapperAddIdentityMappingRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setFrom(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTo(r);break;case 3:r=e.readBytes();t.setSignature(r);break;default:e.skipField()}}return t},proto.AddressMapperAddIdentityMappingRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.AddressMapperAddIdentityMappingRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.AddressMapperAddIdentityMappingRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getFrom())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getTo())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter),(r=t.getSignature_asU8()).length>0&&e.writeBytes(3,r)},proto.AddressMapperAddIdentityMappingRequest.prototype.getFrom=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.AddressMapperAddIdentityMappingRequest.prototype.setFrom=function(t){n.Message.setWrapperField(this,1,t)},proto.AddressMapperAddIdentityMappingRequest.prototype.clearFrom=function(){this.setFrom(void 0)},proto.AddressMapperAddIdentityMappingRequest.prototype.hasFrom=function(){return null!=n.Message.getField(this,1)},proto.AddressMapperAddIdentityMappingRequest.prototype.getTo=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.AddressMapperAddIdentityMappingRequest.prototype.setTo=function(t){n.Message.setWrapperField(this,2,t)},proto.AddressMapperAddIdentityMappingRequest.prototype.clearTo=function(){this.setTo(void 0)},proto.AddressMapperAddIdentityMappingRequest.prototype.hasTo=function(){return null!=n.Message.getField(this,2)},proto.AddressMapperAddIdentityMappingRequest.prototype.getSignature=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.AddressMapperAddIdentityMappingRequest.prototype.getSignature_asB64=function(){return n.Message.bytesAsB64(this.getSignature())},proto.AddressMapperAddIdentityMappingRequest.prototype.getSignature_asU8=function(){return n.Message.bytesAsU8(this.getSignature())},proto.AddressMapperAddIdentityMappingRequest.prototype.setSignature=function(t){n.Message.setProto3BytesField(this,3,t)},proto.AddressMapperAddContractMappingRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.AddressMapperAddContractMappingRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.AddressMapperAddContractMappingRequest.displayName="proto.AddressMapperAddContractMappingRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.AddressMapperAddContractMappingRequest.prototype.toObject=function(t){return proto.AddressMapperAddContractMappingRequest.toObject(t,this)},proto.AddressMapperAddContractMappingRequest.toObject=function(t,e){var r,n={from:(r=e.getFrom())&&s.Address.toObject(t,r),to:(r=e.getTo())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.AddressMapperAddContractMappingRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.AddressMapperAddContractMappingRequest;return proto.AddressMapperAddContractMappingRequest.deserializeBinaryFromReader(r,e)},proto.AddressMapperAddContractMappingRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setFrom(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTo(r);break;default:e.skipField()}}return t},proto.AddressMapperAddContractMappingRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.AddressMapperAddContractMappingRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.AddressMapperAddContractMappingRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getFrom())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getTo())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter)},proto.AddressMapperAddContractMappingRequest.prototype.getFrom=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.AddressMapperAddContractMappingRequest.prototype.setFrom=function(t){n.Message.setWrapperField(this,1,t)},proto.AddressMapperAddContractMappingRequest.prototype.clearFrom=function(){this.setFrom(void 0)},proto.AddressMapperAddContractMappingRequest.prototype.hasFrom=function(){return null!=n.Message.getField(this,1)},proto.AddressMapperAddContractMappingRequest.prototype.getTo=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.AddressMapperAddContractMappingRequest.prototype.setTo=function(t){n.Message.setWrapperField(this,2,t)},proto.AddressMapperAddContractMappingRequest.prototype.clearTo=function(){this.setTo(void 0)},proto.AddressMapperAddContractMappingRequest.prototype.hasTo=function(){return null!=n.Message.getField(this,2)},proto.AddressMapperRemoveMappingRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.AddressMapperRemoveMappingRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.AddressMapperRemoveMappingRequest.displayName="proto.AddressMapperRemoveMappingRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.AddressMapperRemoveMappingRequest.prototype.toObject=function(t){return proto.AddressMapperRemoveMappingRequest.toObject(t,this)},proto.AddressMapperRemoveMappingRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.AddressMapperRemoveMappingRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.AddressMapperRemoveMappingRequest;return proto.AddressMapperRemoveMappingRequest.deserializeBinaryFromReader(r,e)},proto.AddressMapperRemoveMappingRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.AddressMapperRemoveMappingRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.AddressMapperRemoveMappingRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.AddressMapperRemoveMappingRequest.serializeBinaryToWriter=function(t,e){},proto.AddressMapperGetMappingRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.AddressMapperGetMappingRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.AddressMapperGetMappingRequest.displayName="proto.AddressMapperGetMappingRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.AddressMapperGetMappingRequest.prototype.toObject=function(t){return proto.AddressMapperGetMappingRequest.toObject(t,this)},proto.AddressMapperGetMappingRequest.toObject=function(t,e){var r,n={from:(r=e.getFrom())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.AddressMapperGetMappingRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.AddressMapperGetMappingRequest;return proto.AddressMapperGetMappingRequest.deserializeBinaryFromReader(r,e)},proto.AddressMapperGetMappingRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setFrom(r);break;default:e.skipField()}}return t},proto.AddressMapperGetMappingRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.AddressMapperGetMappingRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.AddressMapperGetMappingRequest.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getFrom())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter)},proto.AddressMapperGetMappingRequest.prototype.getFrom=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.AddressMapperGetMappingRequest.prototype.setFrom=function(t){n.Message.setWrapperField(this,1,t)},proto.AddressMapperGetMappingRequest.prototype.clearFrom=function(){this.setFrom(void 0)},proto.AddressMapperGetMappingRequest.prototype.hasFrom=function(){return null!=n.Message.getField(this,1)},proto.AddressMapperGetMappingResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.AddressMapperGetMappingResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.AddressMapperGetMappingResponse.displayName="proto.AddressMapperGetMappingResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.AddressMapperGetMappingResponse.prototype.toObject=function(t){return proto.AddressMapperGetMappingResponse.toObject(t,this)},proto.AddressMapperGetMappingResponse.toObject=function(t,e){var r,n={from:(r=e.getFrom())&&s.Address.toObject(t,r),to:(r=e.getTo())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.AddressMapperGetMappingResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.AddressMapperGetMappingResponse;return proto.AddressMapperGetMappingResponse.deserializeBinaryFromReader(r,e)},proto.AddressMapperGetMappingResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setFrom(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTo(r);break;default:e.skipField()}}return t},proto.AddressMapperGetMappingResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.AddressMapperGetMappingResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.AddressMapperGetMappingResponse.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getFrom())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getTo())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter)},proto.AddressMapperGetMappingResponse.prototype.getFrom=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.AddressMapperGetMappingResponse.prototype.setFrom=function(t){n.Message.setWrapperField(this,1,t)},proto.AddressMapperGetMappingResponse.prototype.clearFrom=function(){this.setFrom(void 0)},proto.AddressMapperGetMappingResponse.prototype.hasFrom=function(){return null!=n.Message.getField(this,1)},proto.AddressMapperGetMappingResponse.prototype.getTo=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.AddressMapperGetMappingResponse.prototype.setTo=function(t){n.Message.setWrapperField(this,2,t)},proto.AddressMapperGetMappingResponse.prototype.clearTo=function(){this.setTo(void 0)},proto.AddressMapperGetMappingResponse.prototype.hasTo=function(){return null!=n.Message.getField(this,2)},i.object.extend(e,proto)},function(t,e,r){"use strict";var n,i=r(4),o=i(r(7)),s=i(r(6)),a=i(r(5)),u=i(r(29)),c=i(r(28)),l=(n=c.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,u.default)(e):(r.prototype=e.prototype,new r)}),h=function(t,e,r,n){return new(r||(r=a.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},f=function(t,e){var r,n,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof s.default&&(a[o.default]=function(){return this}),a;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var p=r(56),d=r(40),g=r(473),y=r(85),m=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.createAsync=function(t,r){return h(this,void 0,void 0,function(){var n;return f(this,function(i){switch(i.label){case 0:return[4,t.getContractAddressAsync("addressmapper")];case 1:if(!(n=i.sent()))throw Error("Failed to resolve contract address");return[2,new e({contractAddr:n,callerAddr:r,client:t})]}})})},e.prototype.addIdentityMappingAsync=function(t,e,r){return h(this,void 0,void 0,function(){var n,i,o;return f(this,function(s){switch(s.label){case 0:return(n=new g.AddressMapperAddIdentityMappingRequest).setFrom(t.MarshalPB()),n.setTo(e.MarshalPB()),i=y.soliditySha3({type:"address",value:t.local.toString().slice(2)},{type:"address",value:e.local.toString().slice(2)}),[4,r.signAsync(i)];case 1:return o=s.sent(),n.setSignature(o),[2,this.callAsync("AddIdentityMapping",n)]}})})},e.prototype.getMappingAsync=function(t){return h(this,void 0,void 0,function(){var e,r;return f(this,function(n){switch(n.label){case 0:return(e=new g.AddressMapperGetMappingRequest).setFrom(t.MarshalPB()),[4,this.staticCallAsync("GetMapping",e,new g.AddressMapperGetMappingResponse)];case 1:return r=n.sent(),[2,{from:d.Address.UmarshalPB(r.getFrom()),to:d.Address.UmarshalPB(r.getTo())}]}})})},e}(p.Contract);e.AddressMapper=m},function(t,e,r){"use strict";var n=r(41),i=n,o=Function("return this")(),s=r(14);i.exportSymbol("proto.Candidate",null,o),i.exportSymbol("proto.CandidateList",null,o),i.exportSymbol("proto.ElectRequest",null,o),i.exportSymbol("proto.ElectResponse",null,o),i.exportSymbol("proto.ListCandidateRequest",null,o),i.exportSymbol("proto.ListCandidateResponse",null,o),i.exportSymbol("proto.ListWitnessesRequest",null,o),i.exportSymbol("proto.ListWitnessesResponse",null,o),i.exportSymbol("proto.ProxyVoteRequest",null,o),i.exportSymbol("proto.ProxyVoteResponse",null,o),i.exportSymbol("proto.RegisterCandidateRequest",null,o),i.exportSymbol("proto.RegisterCandidateResponse",null,o),i.exportSymbol("proto.UnproxyVoteRequest",null,o),i.exportSymbol("proto.UnproxyVoteResponse",null,o),i.exportSymbol("proto.UnregisterCandidateRequest",null,o),i.exportSymbol("proto.UnregisterCandidateResponse",null,o),i.exportSymbol("proto.Vote",null,o),i.exportSymbol("proto.VoteList",null,o),i.exportSymbol("proto.VoteRequest",null,o),i.exportSymbol("proto.VoteResponse",null,o),i.exportSymbol("proto.Witness",null,o),proto.Witness=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.Witness,n.Message),i.DEBUG&&!COMPILED&&(proto.Witness.displayName="proto.Witness"),n.Message.GENERATE_TO_OBJECT&&(proto.Witness.prototype.toObject=function(t){return proto.Witness.toObject(t,this)},proto.Witness.toObject=function(t,e){var r={pubKey:e.getPubKey_asB64(),voteTotal:n.Message.getFieldWithDefault(e,2,0),powerTotal:n.Message.getFieldWithDefault(e,3,0)};return t&&(r.$jspbMessageInstance=e),r}),proto.Witness.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.Witness;return proto.Witness.deserializeBinaryFromReader(r,e)},proto.Witness.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.setPubKey(r);break;case 2:r=e.readUint64();t.setVoteTotal(r);break;case 3:r=e.readUint64();t.setPowerTotal(r);break;default:e.skipField()}}return t},proto.Witness.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.Witness.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.Witness.serializeBinaryToWriter=function(t,e){var r=void 0;(r=t.getPubKey_asU8()).length>0&&e.writeBytes(1,r),0!==(r=t.getVoteTotal())&&e.writeUint64(2,r),0!==(r=t.getPowerTotal())&&e.writeUint64(3,r)},proto.Witness.prototype.getPubKey=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.Witness.prototype.getPubKey_asB64=function(){return n.Message.bytesAsB64(this.getPubKey())},proto.Witness.prototype.getPubKey_asU8=function(){return n.Message.bytesAsU8(this.getPubKey())},proto.Witness.prototype.setPubKey=function(t){n.Message.setProto3BytesField(this,1,t)},proto.Witness.prototype.getVoteTotal=function(){return n.Message.getFieldWithDefault(this,2,0)},proto.Witness.prototype.setVoteTotal=function(t){n.Message.setProto3IntField(this,2,t)},proto.Witness.prototype.getPowerTotal=function(){return n.Message.getFieldWithDefault(this,3,0)},proto.Witness.prototype.setPowerTotal=function(t){n.Message.setProto3IntField(this,3,t)},proto.Candidate=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.Candidate,n.Message),i.DEBUG&&!COMPILED&&(proto.Candidate.displayName="proto.Candidate"),n.Message.GENERATE_TO_OBJECT&&(proto.Candidate.prototype.toObject=function(t){return proto.Candidate.toObject(t,this)},proto.Candidate.toObject=function(t,e){var r,n={address:(r=e.getAddress())&&s.Address.toObject(t,r),pubKey:e.getPubKey_asB64()};return t&&(n.$jspbMessageInstance=e),n}),proto.Candidate.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.Candidate;return proto.Candidate.deserializeBinaryFromReader(r,e)},proto.Candidate.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setAddress(r);break;case 2:r=e.readBytes();t.setPubKey(r);break;default:e.skipField()}}return t},proto.Candidate.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.Candidate.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.Candidate.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getAddress())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),(r=t.getPubKey_asU8()).length>0&&e.writeBytes(2,r)},proto.Candidate.prototype.getAddress=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.Candidate.prototype.setAddress=function(t){n.Message.setWrapperField(this,1,t)},proto.Candidate.prototype.clearAddress=function(){this.setAddress(void 0)},proto.Candidate.prototype.hasAddress=function(){return null!=n.Message.getField(this,1)},proto.Candidate.prototype.getPubKey=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.Candidate.prototype.getPubKey_asB64=function(){return n.Message.bytesAsB64(this.getPubKey())},proto.Candidate.prototype.getPubKey_asU8=function(){return n.Message.bytesAsU8(this.getPubKey())},proto.Candidate.prototype.setPubKey=function(t){n.Message.setProto3BytesField(this,2,t)},proto.CandidateList=function(t){n.Message.initialize(this,t,0,-1,proto.CandidateList.repeatedFields_,null)},i.inherits(proto.CandidateList,n.Message),i.DEBUG&&!COMPILED&&(proto.CandidateList.displayName="proto.CandidateList"),proto.CandidateList.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.CandidateList.prototype.toObject=function(t){return proto.CandidateList.toObject(t,this)},proto.CandidateList.toObject=function(t,e){var r={candidatesList:n.Message.toObjectList(e.getCandidatesList(),proto.Candidate.toObject,t)};return t&&(r.$jspbMessageInstance=e),r}),proto.CandidateList.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.CandidateList;return proto.CandidateList.deserializeBinaryFromReader(r,e)},proto.CandidateList.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.Candidate;e.readMessage(r,proto.Candidate.deserializeBinaryFromReader),t.addCandidates(r);break;default:e.skipField()}}return t},proto.CandidateList.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.CandidateList.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.CandidateList.serializeBinaryToWriter=function(t,e){var r;(r=t.getCandidatesList()).length>0&&e.writeRepeatedMessage(1,r,proto.Candidate.serializeBinaryToWriter)},proto.CandidateList.prototype.getCandidatesList=function(){return n.Message.getRepeatedWrapperField(this,proto.Candidate,1)},proto.CandidateList.prototype.setCandidatesList=function(t){n.Message.setRepeatedWrapperField(this,1,t)},proto.CandidateList.prototype.addCandidates=function(t,e){return n.Message.addToRepeatedWrapperField(this,1,t,proto.Candidate,e)},proto.CandidateList.prototype.clearCandidatesList=function(){this.setCandidatesList([])},proto.Vote=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.Vote,n.Message),i.DEBUG&&!COMPILED&&(proto.Vote.displayName="proto.Vote"),n.Message.GENERATE_TO_OBJECT&&(proto.Vote.prototype.toObject=function(t){return proto.Vote.toObject(t,this)},proto.Vote.toObject=function(t,e){var r,i={voterAddress:(r=e.getVoterAddress())&&s.Address.toObject(t,r),candidateAddress:(r=e.getCandidateAddress())&&s.Address.toObject(t,r),amount:n.Message.getFieldWithDefault(e,3,0)};return t&&(i.$jspbMessageInstance=e),i}),proto.Vote.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.Vote;return proto.Vote.deserializeBinaryFromReader(r,e)},proto.Vote.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setVoterAddress(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setCandidateAddress(r);break;case 3:r=e.readUint64();t.setAmount(r);break;default:e.skipField()}}return t},proto.Vote.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.Vote.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.Vote.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getVoterAddress())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getCandidateAddress())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter),0!==(r=t.getAmount())&&e.writeUint64(3,r)},proto.Vote.prototype.getVoterAddress=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.Vote.prototype.setVoterAddress=function(t){n.Message.setWrapperField(this,1,t)},proto.Vote.prototype.clearVoterAddress=function(){this.setVoterAddress(void 0)},proto.Vote.prototype.hasVoterAddress=function(){return null!=n.Message.getField(this,1)},proto.Vote.prototype.getCandidateAddress=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.Vote.prototype.setCandidateAddress=function(t){n.Message.setWrapperField(this,2,t)},proto.Vote.prototype.clearCandidateAddress=function(){this.setCandidateAddress(void 0)},proto.Vote.prototype.hasCandidateAddress=function(){return null!=n.Message.getField(this,2)},proto.Vote.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,3,0)},proto.Vote.prototype.setAmount=function(t){n.Message.setProto3IntField(this,3,t)},proto.VoteList=function(t){n.Message.initialize(this,t,0,-1,proto.VoteList.repeatedFields_,null)},i.inherits(proto.VoteList,n.Message),i.DEBUG&&!COMPILED&&(proto.VoteList.displayName="proto.VoteList"),proto.VoteList.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.VoteList.prototype.toObject=function(t){return proto.VoteList.toObject(t,this)},proto.VoteList.toObject=function(t,e){var r={votesList:n.Message.toObjectList(e.getVotesList(),proto.Vote.toObject,t)};return t&&(r.$jspbMessageInstance=e),r}),proto.VoteList.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.VoteList;return proto.VoteList.deserializeBinaryFromReader(r,e)},proto.VoteList.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.Vote;e.readMessage(r,proto.Vote.deserializeBinaryFromReader),t.addVotes(r);break;default:e.skipField()}}return t},proto.VoteList.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.VoteList.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.VoteList.serializeBinaryToWriter=function(t,e){var r;(r=t.getVotesList()).length>0&&e.writeRepeatedMessage(1,r,proto.Vote.serializeBinaryToWriter)},proto.VoteList.prototype.getVotesList=function(){return n.Message.getRepeatedWrapperField(this,proto.Vote,1)},proto.VoteList.prototype.setVotesList=function(t){n.Message.setRepeatedWrapperField(this,1,t)},proto.VoteList.prototype.addVotes=function(t,e){return n.Message.addToRepeatedWrapperField(this,1,t,proto.Vote,e)},proto.VoteList.prototype.clearVotesList=function(){this.setVotesList([])},proto.RegisterCandidateRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.RegisterCandidateRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.RegisterCandidateRequest.displayName="proto.RegisterCandidateRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.RegisterCandidateRequest.prototype.toObject=function(t){return proto.RegisterCandidateRequest.toObject(t,this)},proto.RegisterCandidateRequest.toObject=function(t,e){var r={pubKey:e.getPubKey_asB64()};return t&&(r.$jspbMessageInstance=e),r}),proto.RegisterCandidateRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.RegisterCandidateRequest;return proto.RegisterCandidateRequest.deserializeBinaryFromReader(r,e)},proto.RegisterCandidateRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=e.readBytes();t.setPubKey(r);break;default:e.skipField()}}return t},proto.RegisterCandidateRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.RegisterCandidateRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.RegisterCandidateRequest.serializeBinaryToWriter=function(t,e){var r;(r=t.getPubKey_asU8()).length>0&&e.writeBytes(1,r)},proto.RegisterCandidateRequest.prototype.getPubKey=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.RegisterCandidateRequest.prototype.getPubKey_asB64=function(){return n.Message.bytesAsB64(this.getPubKey())},proto.RegisterCandidateRequest.prototype.getPubKey_asU8=function(){return n.Message.bytesAsU8(this.getPubKey())},proto.RegisterCandidateRequest.prototype.setPubKey=function(t){n.Message.setProto3BytesField(this,1,t)},proto.RegisterCandidateResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.RegisterCandidateResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.RegisterCandidateResponse.displayName="proto.RegisterCandidateResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.RegisterCandidateResponse.prototype.toObject=function(t){return proto.RegisterCandidateResponse.toObject(t,this)},proto.RegisterCandidateResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.RegisterCandidateResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.RegisterCandidateResponse;return proto.RegisterCandidateResponse.deserializeBinaryFromReader(r,e)},proto.RegisterCandidateResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.RegisterCandidateResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.RegisterCandidateResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.RegisterCandidateResponse.serializeBinaryToWriter=function(t,e){},proto.UnregisterCandidateRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.UnregisterCandidateRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.UnregisterCandidateRequest.displayName="proto.UnregisterCandidateRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.UnregisterCandidateRequest.prototype.toObject=function(t){return proto.UnregisterCandidateRequest.toObject(t,this)},proto.UnregisterCandidateRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.UnregisterCandidateRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.UnregisterCandidateRequest;return proto.UnregisterCandidateRequest.deserializeBinaryFromReader(r,e)},proto.UnregisterCandidateRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.UnregisterCandidateRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.UnregisterCandidateRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.UnregisterCandidateRequest.serializeBinaryToWriter=function(t,e){},proto.UnregisterCandidateResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.UnregisterCandidateResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.UnregisterCandidateResponse.displayName="proto.UnregisterCandidateResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.UnregisterCandidateResponse.prototype.toObject=function(t){return proto.UnregisterCandidateResponse.toObject(t,this)},proto.UnregisterCandidateResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.UnregisterCandidateResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.UnregisterCandidateResponse;return proto.UnregisterCandidateResponse.deserializeBinaryFromReader(r,e)},proto.UnregisterCandidateResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.UnregisterCandidateResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.UnregisterCandidateResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.UnregisterCandidateResponse.serializeBinaryToWriter=function(t,e){},proto.VoteRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.VoteRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.VoteRequest.displayName="proto.VoteRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.VoteRequest.prototype.toObject=function(t){return proto.VoteRequest.toObject(t,this)},proto.VoteRequest.toObject=function(t,e){var r,i={candidateAddress:(r=e.getCandidateAddress())&&s.Address.toObject(t,r),amount:n.Message.getFieldWithDefault(e,2,0)};return t&&(i.$jspbMessageInstance=e),i}),proto.VoteRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.VoteRequest;return proto.VoteRequest.deserializeBinaryFromReader(r,e)},proto.VoteRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setCandidateAddress(r);break;case 2:r=e.readInt64();t.setAmount(r);break;default:e.skipField()}}return t},proto.VoteRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.VoteRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.VoteRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getCandidateAddress())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),0!==(r=t.getAmount())&&e.writeInt64(2,r)},proto.VoteRequest.prototype.getCandidateAddress=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.VoteRequest.prototype.setCandidateAddress=function(t){n.Message.setWrapperField(this,1,t)},proto.VoteRequest.prototype.clearCandidateAddress=function(){this.setCandidateAddress(void 0)},proto.VoteRequest.prototype.hasCandidateAddress=function(){return null!=n.Message.getField(this,1)},proto.VoteRequest.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,2,0)},proto.VoteRequest.prototype.setAmount=function(t){n.Message.setProto3IntField(this,2,t)},proto.VoteResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.VoteResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.VoteResponse.displayName="proto.VoteResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.VoteResponse.prototype.toObject=function(t){return proto.VoteResponse.toObject(t,this)},proto.VoteResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.VoteResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.VoteResponse;return proto.VoteResponse.deserializeBinaryFromReader(r,e)},proto.VoteResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.VoteResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.VoteResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.VoteResponse.serializeBinaryToWriter=function(t,e){},proto.ProxyVoteRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.ProxyVoteRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.ProxyVoteRequest.displayName="proto.ProxyVoteRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.ProxyVoteRequest.prototype.toObject=function(t){return proto.ProxyVoteRequest.toObject(t,this)},proto.ProxyVoteRequest.toObject=function(t,e){var r,n={proxyAddress:(r=e.getProxyAddress())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.ProxyVoteRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ProxyVoteRequest;return proto.ProxyVoteRequest.deserializeBinaryFromReader(r,e)},proto.ProxyVoteRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setProxyAddress(r);break;default:e.skipField()}}return t},proto.ProxyVoteRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ProxyVoteRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ProxyVoteRequest.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getProxyAddress())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter)},proto.ProxyVoteRequest.prototype.getProxyAddress=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.ProxyVoteRequest.prototype.setProxyAddress=function(t){n.Message.setWrapperField(this,1,t)},proto.ProxyVoteRequest.prototype.clearProxyAddress=function(){this.setProxyAddress(void 0)},proto.ProxyVoteRequest.prototype.hasProxyAddress=function(){return null!=n.Message.getField(this,1)},proto.ProxyVoteResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.ProxyVoteResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.ProxyVoteResponse.displayName="proto.ProxyVoteResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.ProxyVoteResponse.prototype.toObject=function(t){return proto.ProxyVoteResponse.toObject(t,this)},proto.ProxyVoteResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.ProxyVoteResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ProxyVoteResponse;return proto.ProxyVoteResponse.deserializeBinaryFromReader(r,e)},proto.ProxyVoteResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.ProxyVoteResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ProxyVoteResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ProxyVoteResponse.serializeBinaryToWriter=function(t,e){},proto.UnproxyVoteRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.UnproxyVoteRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.UnproxyVoteRequest.displayName="proto.UnproxyVoteRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.UnproxyVoteRequest.prototype.toObject=function(t){return proto.UnproxyVoteRequest.toObject(t,this)},proto.UnproxyVoteRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.UnproxyVoteRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.UnproxyVoteRequest;return proto.UnproxyVoteRequest.deserializeBinaryFromReader(r,e)},proto.UnproxyVoteRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.UnproxyVoteRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.UnproxyVoteRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.UnproxyVoteRequest.serializeBinaryToWriter=function(t,e){},proto.UnproxyVoteResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.UnproxyVoteResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.UnproxyVoteResponse.displayName="proto.UnproxyVoteResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.UnproxyVoteResponse.prototype.toObject=function(t){return proto.UnproxyVoteResponse.toObject(t,this)},proto.UnproxyVoteResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.UnproxyVoteResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.UnproxyVoteResponse;return proto.UnproxyVoteResponse.deserializeBinaryFromReader(r,e)},proto.UnproxyVoteResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.UnproxyVoteResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.UnproxyVoteResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.UnproxyVoteResponse.serializeBinaryToWriter=function(t,e){},proto.ElectRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.ElectRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.ElectRequest.displayName="proto.ElectRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.ElectRequest.prototype.toObject=function(t){return proto.ElectRequest.toObject(t,this)},proto.ElectRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.ElectRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ElectRequest;return proto.ElectRequest.deserializeBinaryFromReader(r,e)},proto.ElectRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.ElectRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ElectRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ElectRequest.serializeBinaryToWriter=function(t,e){},proto.ElectResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.ElectResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.ElectResponse.displayName="proto.ElectResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.ElectResponse.prototype.toObject=function(t){return proto.ElectResponse.toObject(t,this)},proto.ElectResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.ElectResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ElectResponse;return proto.ElectResponse.deserializeBinaryFromReader(r,e)},proto.ElectResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.ElectResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ElectResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ElectResponse.serializeBinaryToWriter=function(t,e){},proto.ListWitnessesRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.ListWitnessesRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.ListWitnessesRequest.displayName="proto.ListWitnessesRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.ListWitnessesRequest.prototype.toObject=function(t){return proto.ListWitnessesRequest.toObject(t,this)},proto.ListWitnessesRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.ListWitnessesRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ListWitnessesRequest;return proto.ListWitnessesRequest.deserializeBinaryFromReader(r,e)},proto.ListWitnessesRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.ListWitnessesRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ListWitnessesRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ListWitnessesRequest.serializeBinaryToWriter=function(t,e){},proto.ListWitnessesResponse=function(t){n.Message.initialize(this,t,0,-1,proto.ListWitnessesResponse.repeatedFields_,null)},i.inherits(proto.ListWitnessesResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.ListWitnessesResponse.displayName="proto.ListWitnessesResponse"),proto.ListWitnessesResponse.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.ListWitnessesResponse.prototype.toObject=function(t){return proto.ListWitnessesResponse.toObject(t,this)},proto.ListWitnessesResponse.toObject=function(t,e){var r={witnessesList:n.Message.toObjectList(e.getWitnessesList(),proto.Witness.toObject,t)};return t&&(r.$jspbMessageInstance=e),r}),proto.ListWitnessesResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ListWitnessesResponse;return proto.ListWitnessesResponse.deserializeBinaryFromReader(r,e)},proto.ListWitnessesResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.Witness;e.readMessage(r,proto.Witness.deserializeBinaryFromReader),t.addWitnesses(r);break;default:e.skipField()}}return t},proto.ListWitnessesResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ListWitnessesResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ListWitnessesResponse.serializeBinaryToWriter=function(t,e){var r;(r=t.getWitnessesList()).length>0&&e.writeRepeatedMessage(1,r,proto.Witness.serializeBinaryToWriter)},proto.ListWitnessesResponse.prototype.getWitnessesList=function(){return n.Message.getRepeatedWrapperField(this,proto.Witness,1)},proto.ListWitnessesResponse.prototype.setWitnessesList=function(t){n.Message.setRepeatedWrapperField(this,1,t)},proto.ListWitnessesResponse.prototype.addWitnesses=function(t,e){return n.Message.addToRepeatedWrapperField(this,1,t,proto.Witness,e)},proto.ListWitnessesResponse.prototype.clearWitnessesList=function(){this.setWitnessesList([])},proto.ListCandidateRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.ListCandidateRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.ListCandidateRequest.displayName="proto.ListCandidateRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.ListCandidateRequest.prototype.toObject=function(t){return proto.ListCandidateRequest.toObject(t,this)},proto.ListCandidateRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.ListCandidateRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ListCandidateRequest;return proto.ListCandidateRequest.deserializeBinaryFromReader(r,e)},proto.ListCandidateRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.ListCandidateRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ListCandidateRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ListCandidateRequest.serializeBinaryToWriter=function(t,e){},proto.ListCandidateResponse=function(t){n.Message.initialize(this,t,0,-1,proto.ListCandidateResponse.repeatedFields_,null)},i.inherits(proto.ListCandidateResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.ListCandidateResponse.displayName="proto.ListCandidateResponse"),proto.ListCandidateResponse.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.ListCandidateResponse.prototype.toObject=function(t){return proto.ListCandidateResponse.toObject(t,this)},proto.ListCandidateResponse.toObject=function(t,e){var r={candidatesList:n.Message.toObjectList(e.getCandidatesList(),proto.Candidate.toObject,t)};return t&&(r.$jspbMessageInstance=e),r}),proto.ListCandidateResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ListCandidateResponse;return proto.ListCandidateResponse.deserializeBinaryFromReader(r,e)},proto.ListCandidateResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new proto.Candidate;e.readMessage(r,proto.Candidate.deserializeBinaryFromReader),t.addCandidates(r);break;default:e.skipField()}}return t},proto.ListCandidateResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ListCandidateResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ListCandidateResponse.serializeBinaryToWriter=function(t,e){var r;(r=t.getCandidatesList()).length>0&&e.writeRepeatedMessage(1,r,proto.Candidate.serializeBinaryToWriter)},proto.ListCandidateResponse.prototype.getCandidatesList=function(){return n.Message.getRepeatedWrapperField(this,proto.Candidate,1)},proto.ListCandidateResponse.prototype.setCandidatesList=function(t){n.Message.setRepeatedWrapperField(this,1,t)},proto.ListCandidateResponse.prototype.addCandidates=function(t,e){return n.Message.addToRepeatedWrapperField(this,1,t,proto.Candidate,e)},proto.ListCandidateResponse.prototype.clearCandidatesList=function(){this.setCandidatesList([])},i.object.extend(e,proto)},function(t,e,r){"use strict";var n,i=r(4),o=i(r(7)),s=i(r(6)),a=i(r(5)),u=i(r(29)),c=i(r(28)),l=(n=c.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,u.default)(e):(r.prototype=e.prototype,new r)}),h=function(t,e,r,n){return new(r||(r=a.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},f=function(t,e){var r,n,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof s.default&&(a[o.default]=function(){return this}),a;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},p=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var d=p(r(3)),g=r(56),y=r(40),m=r(475),b=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.createAsync=function(t,r){return h(this,void 0,void 0,function(){var n;return f(this,function(i){switch(i.label){case 0:return[4,t.getContractAddressAsync("dpos")];case 1:if(!(n=i.sent()))throw Error("Failed to resolve contract address");return[2,new e({contractAddr:n,callerAddr:r,client:t})]}})})},e.prototype.registerCandidateAsync=function(t){var e=new m.RegisterCandidateRequest;return e.setPubKey(t),this.callAsync("RegisterCandidate",e)},e.prototype.unregisterCandidateAsync=function(){var t=new m.UnregisterCandidateRequest;return this.callAsync("UnregisterCandidate",t)},e.prototype.voteAsync=function(t,e){var r=new m.VoteRequest;return r.setCandidateAddress(t.MarshalPB()),r.setAmount(e),this.callAsync("Vote",r)},e.prototype.electAsync=function(){var t=new m.ElectRequest;return this.callAsync("Elect",t)},e.prototype.getCandidatesAsync=function(){return h(this,void 0,void 0,function(){var t;return f(this,function(e){switch(e.label){case 0:return t=new m.ListCandidateRequest,[4,this.staticCallAsync("ListCandidates",t,new m.ListCandidateResponse)];case 1:return[2,e.sent().getCandidatesList().map(function(t){return{address:y.Address.UmarshalPB(t.getAddress()),pubKey:t.getPubKey_asU8()}})]}})})},e.prototype.getWitnessesAsync=function(){return h(this,void 0,void 0,function(){var t;return f(this,function(e){switch(e.label){case 0:return t=new m.ListWitnessesRequest,[4,this.staticCallAsync("ListWitnesses",t,new m.ListWitnessesResponse)];case 1:return[2,e.sent().getWitnessesList().map(function(t){return{pubKey:t.getPubKey_asU8(),voteTotal:new d.default(t.getPowerTotal()),powerTotal:new d.default(t.getPowerTotal())}})]}})})},e}(g.Contract);e.DPOS=b},function(t,e,r){"use strict";var n=r(41),i=n,o=Function("return this")(),s=r(14);i.exportSymbol("proto.AllowanceRequest",null,o),i.exportSymbol("proto.AllowanceResponse",null,o),i.exportSymbol("proto.ApproveRequest",null,o),i.exportSymbol("proto.ApproveResponse",null,o),i.exportSymbol("proto.BalanceOfRequest",null,o),i.exportSymbol("proto.BalanceOfResponse",null,o),i.exportSymbol("proto.TotalSupplyRequest",null,o),i.exportSymbol("proto.TotalSupplyResponse",null,o),i.exportSymbol("proto.TransferFromRequest",null,o),i.exportSymbol("proto.TransferFromResponse",null,o),i.exportSymbol("proto.TransferRequest",null,o),i.exportSymbol("proto.TransferResponse",null,o),proto.TotalSupplyRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TotalSupplyRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.TotalSupplyRequest.displayName="proto.TotalSupplyRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.TotalSupplyRequest.prototype.toObject=function(t){return proto.TotalSupplyRequest.toObject(t,this)},proto.TotalSupplyRequest.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.TotalSupplyRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TotalSupplyRequest;return proto.TotalSupplyRequest.deserializeBinaryFromReader(r,e)},proto.TotalSupplyRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.TotalSupplyRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TotalSupplyRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TotalSupplyRequest.serializeBinaryToWriter=function(t,e){},proto.TotalSupplyResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TotalSupplyResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.TotalSupplyResponse.displayName="proto.TotalSupplyResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.TotalSupplyResponse.prototype.toObject=function(t){return proto.TotalSupplyResponse.toObject(t,this)},proto.TotalSupplyResponse.toObject=function(t,e){var r,n={totalSupply:(r=e.getTotalSupply())&&s.BigUInt.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.TotalSupplyResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TotalSupplyResponse;return proto.TotalSupplyResponse.deserializeBinaryFromReader(r,e)},proto.TotalSupplyResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setTotalSupply(r);break;default:e.skipField()}}return t},proto.TotalSupplyResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TotalSupplyResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TotalSupplyResponse.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getTotalSupply())&&e.writeMessage(1,r,s.BigUInt.serializeBinaryToWriter)},proto.TotalSupplyResponse.prototype.getTotalSupply=function(){return n.Message.getWrapperField(this,s.BigUInt,1)},proto.TotalSupplyResponse.prototype.setTotalSupply=function(t){n.Message.setWrapperField(this,1,t)},proto.TotalSupplyResponse.prototype.clearTotalSupply=function(){this.setTotalSupply(void 0)},proto.TotalSupplyResponse.prototype.hasTotalSupply=function(){return null!=n.Message.getField(this,1)},proto.BalanceOfRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.BalanceOfRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.BalanceOfRequest.displayName="proto.BalanceOfRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.BalanceOfRequest.prototype.toObject=function(t){return proto.BalanceOfRequest.toObject(t,this)},proto.BalanceOfRequest.toObject=function(t,e){var r,n={owner:(r=e.getOwner())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.BalanceOfRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.BalanceOfRequest;return proto.BalanceOfRequest.deserializeBinaryFromReader(r,e)},proto.BalanceOfRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setOwner(r);break;default:e.skipField()}}return t},proto.BalanceOfRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.BalanceOfRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.BalanceOfRequest.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getOwner())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter)},proto.BalanceOfRequest.prototype.getOwner=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.BalanceOfRequest.prototype.setOwner=function(t){n.Message.setWrapperField(this,1,t)},proto.BalanceOfRequest.prototype.clearOwner=function(){this.setOwner(void 0)},proto.BalanceOfRequest.prototype.hasOwner=function(){return null!=n.Message.getField(this,1)},proto.BalanceOfResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.BalanceOfResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.BalanceOfResponse.displayName="proto.BalanceOfResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.BalanceOfResponse.prototype.toObject=function(t){return proto.BalanceOfResponse.toObject(t,this)},proto.BalanceOfResponse.toObject=function(t,e){var r,n={balance:(r=e.getBalance())&&s.BigUInt.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.BalanceOfResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.BalanceOfResponse;return proto.BalanceOfResponse.deserializeBinaryFromReader(r,e)},proto.BalanceOfResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setBalance(r);break;default:e.skipField()}}return t},proto.BalanceOfResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.BalanceOfResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.BalanceOfResponse.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getBalance())&&e.writeMessage(1,r,s.BigUInt.serializeBinaryToWriter)},proto.BalanceOfResponse.prototype.getBalance=function(){return n.Message.getWrapperField(this,s.BigUInt,1)},proto.BalanceOfResponse.prototype.setBalance=function(t){n.Message.setWrapperField(this,1,t)},proto.BalanceOfResponse.prototype.clearBalance=function(){this.setBalance(void 0)},proto.BalanceOfResponse.prototype.hasBalance=function(){return null!=n.Message.getField(this,1)},proto.AllowanceRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.AllowanceRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.AllowanceRequest.displayName="proto.AllowanceRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.AllowanceRequest.prototype.toObject=function(t){return proto.AllowanceRequest.toObject(t,this)},proto.AllowanceRequest.toObject=function(t,e){var r,n={owner:(r=e.getOwner())&&s.Address.toObject(t,r),spender:(r=e.getSpender())&&s.Address.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.AllowanceRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.AllowanceRequest;return proto.AllowanceRequest.deserializeBinaryFromReader(r,e)},proto.AllowanceRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setOwner(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setSpender(r);break;default:e.skipField()}}return t},proto.AllowanceRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.AllowanceRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.AllowanceRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getOwner())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getSpender())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter)},proto.AllowanceRequest.prototype.getOwner=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.AllowanceRequest.prototype.setOwner=function(t){n.Message.setWrapperField(this,1,t)},proto.AllowanceRequest.prototype.clearOwner=function(){this.setOwner(void 0)},proto.AllowanceRequest.prototype.hasOwner=function(){return null!=n.Message.getField(this,1)},proto.AllowanceRequest.prototype.getSpender=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.AllowanceRequest.prototype.setSpender=function(t){n.Message.setWrapperField(this,2,t)},proto.AllowanceRequest.prototype.clearSpender=function(){this.setSpender(void 0)},proto.AllowanceRequest.prototype.hasSpender=function(){return null!=n.Message.getField(this,2)},proto.AllowanceResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.AllowanceResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.AllowanceResponse.displayName="proto.AllowanceResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.AllowanceResponse.prototype.toObject=function(t){return proto.AllowanceResponse.toObject(t,this)},proto.AllowanceResponse.toObject=function(t,e){var r,n={amount:(r=e.getAmount())&&s.BigUInt.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.AllowanceResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.AllowanceResponse;return proto.AllowanceResponse.deserializeBinaryFromReader(r,e)},proto.AllowanceResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setAmount(r);break;default:e.skipField()}}return t},proto.AllowanceResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.AllowanceResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.AllowanceResponse.serializeBinaryToWriter=function(t,e){var r;null!=(r=t.getAmount())&&e.writeMessage(1,r,s.BigUInt.serializeBinaryToWriter)},proto.AllowanceResponse.prototype.getAmount=function(){return n.Message.getWrapperField(this,s.BigUInt,1)},proto.AllowanceResponse.prototype.setAmount=function(t){n.Message.setWrapperField(this,1,t)},proto.AllowanceResponse.prototype.clearAmount=function(){this.setAmount(void 0)},proto.AllowanceResponse.prototype.hasAmount=function(){return null!=n.Message.getField(this,1)},proto.ApproveRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.ApproveRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.ApproveRequest.displayName="proto.ApproveRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.ApproveRequest.prototype.toObject=function(t){return proto.ApproveRequest.toObject(t,this)},proto.ApproveRequest.toObject=function(t,e){var r,n={spender:(r=e.getSpender())&&s.Address.toObject(t,r),amount:(r=e.getAmount())&&s.BigUInt.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.ApproveRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ApproveRequest;return proto.ApproveRequest.deserializeBinaryFromReader(r,e)},proto.ApproveRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setSpender(r);break;case 2:r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setAmount(r);break;default:e.skipField()}}return t},proto.ApproveRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ApproveRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ApproveRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getSpender())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getAmount())&&e.writeMessage(2,r,s.BigUInt.serializeBinaryToWriter)},proto.ApproveRequest.prototype.getSpender=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.ApproveRequest.prototype.setSpender=function(t){n.Message.setWrapperField(this,1,t)},proto.ApproveRequest.prototype.clearSpender=function(){this.setSpender(void 0)},proto.ApproveRequest.prototype.hasSpender=function(){return null!=n.Message.getField(this,1)},proto.ApproveRequest.prototype.getAmount=function(){return n.Message.getWrapperField(this,s.BigUInt,2)},proto.ApproveRequest.prototype.setAmount=function(t){n.Message.setWrapperField(this,2,t)},proto.ApproveRequest.prototype.clearAmount=function(){this.setAmount(void 0)},proto.ApproveRequest.prototype.hasAmount=function(){return null!=n.Message.getField(this,2)},proto.ApproveResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.ApproveResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.ApproveResponse.displayName="proto.ApproveResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.ApproveResponse.prototype.toObject=function(t){return proto.ApproveResponse.toObject(t,this)},proto.ApproveResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.ApproveResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.ApproveResponse;return proto.ApproveResponse.deserializeBinaryFromReader(r,e)},proto.ApproveResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.ApproveResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.ApproveResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.ApproveResponse.serializeBinaryToWriter=function(t,e){},proto.TransferRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferRequest.displayName="proto.TransferRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferRequest.prototype.toObject=function(t){return proto.TransferRequest.toObject(t,this)},proto.TransferRequest.toObject=function(t,e){var r,n={to:(r=e.getTo())&&s.Address.toObject(t,r),amount:(r=e.getAmount())&&s.BigUInt.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferRequest;return proto.TransferRequest.deserializeBinaryFromReader(r,e)},proto.TransferRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTo(r);break;case 2:r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setAmount(r);break;default:e.skipField()}}return t},proto.TransferRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getTo())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getAmount())&&e.writeMessage(2,r,s.BigUInt.serializeBinaryToWriter)},proto.TransferRequest.prototype.getTo=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.TransferRequest.prototype.setTo=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferRequest.prototype.clearTo=function(){this.setTo(void 0)},proto.TransferRequest.prototype.hasTo=function(){return null!=n.Message.getField(this,1)},proto.TransferRequest.prototype.getAmount=function(){return n.Message.getWrapperField(this,s.BigUInt,2)},proto.TransferRequest.prototype.setAmount=function(t){n.Message.setWrapperField(this,2,t)},proto.TransferRequest.prototype.clearAmount=function(){this.setAmount(void 0)},proto.TransferRequest.prototype.hasAmount=function(){return null!=n.Message.getField(this,2)},proto.TransferResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferResponse.displayName="proto.TransferResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferResponse.prototype.toObject=function(t){return proto.TransferResponse.toObject(t,this)},proto.TransferResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.TransferResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferResponse;return proto.TransferResponse.deserializeBinaryFromReader(r,e)},proto.TransferResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.TransferResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferResponse.serializeBinaryToWriter=function(t,e){},proto.TransferFromRequest=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferFromRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferFromRequest.displayName="proto.TransferFromRequest"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferFromRequest.prototype.toObject=function(t){return proto.TransferFromRequest.toObject(t,this)},proto.TransferFromRequest.toObject=function(t,e){var r,n={from:(r=e.getFrom())&&s.Address.toObject(t,r),to:(r=e.getTo())&&s.Address.toObject(t,r),amount:(r=e.getAmount())&&s.BigUInt.toObject(t,r)};return t&&(n.$jspbMessageInstance=e),n}),proto.TransferFromRequest.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferFromRequest;return proto.TransferFromRequest.deserializeBinaryFromReader(r,e)},proto.TransferFromRequest.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){switch(e.getFieldNumber()){case 1:var r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setFrom(r);break;case 2:r=new s.Address;e.readMessage(r,s.Address.deserializeBinaryFromReader),t.setTo(r);break;case 3:r=new s.BigUInt;e.readMessage(r,s.BigUInt.deserializeBinaryFromReader),t.setAmount(r);break;default:e.skipField()}}return t},proto.TransferFromRequest.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferFromRequest.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferFromRequest.serializeBinaryToWriter=function(t,e){var r=void 0;null!=(r=t.getFrom())&&e.writeMessage(1,r,s.Address.serializeBinaryToWriter),null!=(r=t.getTo())&&e.writeMessage(2,r,s.Address.serializeBinaryToWriter),null!=(r=t.getAmount())&&e.writeMessage(3,r,s.BigUInt.serializeBinaryToWriter)},proto.TransferFromRequest.prototype.getFrom=function(){return n.Message.getWrapperField(this,s.Address,1)},proto.TransferFromRequest.prototype.setFrom=function(t){n.Message.setWrapperField(this,1,t)},proto.TransferFromRequest.prototype.clearFrom=function(){this.setFrom(void 0)},proto.TransferFromRequest.prototype.hasFrom=function(){return null!=n.Message.getField(this,1)},proto.TransferFromRequest.prototype.getTo=function(){return n.Message.getWrapperField(this,s.Address,2)},proto.TransferFromRequest.prototype.setTo=function(t){n.Message.setWrapperField(this,2,t)},proto.TransferFromRequest.prototype.clearTo=function(){this.setTo(void 0)},proto.TransferFromRequest.prototype.hasTo=function(){return null!=n.Message.getField(this,2)},proto.TransferFromRequest.prototype.getAmount=function(){return n.Message.getWrapperField(this,s.BigUInt,3)},proto.TransferFromRequest.prototype.setAmount=function(t){n.Message.setWrapperField(this,3,t)},proto.TransferFromRequest.prototype.clearAmount=function(){this.setAmount(void 0)},proto.TransferFromRequest.prototype.hasAmount=function(){return null!=n.Message.getField(this,3)},proto.TransferFromResponse=function(t){n.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.TransferFromResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.TransferFromResponse.displayName="proto.TransferFromResponse"),n.Message.GENERATE_TO_OBJECT&&(proto.TransferFromResponse.prototype.toObject=function(t){return proto.TransferFromResponse.toObject(t,this)},proto.TransferFromResponse.toObject=function(t,e){var r={};return t&&(r.$jspbMessageInstance=e),r}),proto.TransferFromResponse.deserializeBinary=function(t){var e=new n.BinaryReader(t),r=new proto.TransferFromResponse;return proto.TransferFromResponse.deserializeBinaryFromReader(r,e)},proto.TransferFromResponse.deserializeBinaryFromReader=function(t,e){for(;e.nextField()&&!e.isEndGroup();){e.getFieldNumber();e.skipField()}return t},proto.TransferFromResponse.prototype.serializeBinary=function(){var t=new n.BinaryWriter;return proto.TransferFromResponse.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.TransferFromResponse.serializeBinaryToWriter=function(t,e){},i.object.extend(e,proto)},function(t,e,r){"use strict";var n,i=r(4),o=i(r(7)),s=i(r(6)),a=i(r(5)),u=i(r(29)),c=i(r(28)),l=(n=c.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,u.default)(e):(r.prototype=e.prototype,new r)}),h=function(t,e,r,n){return new(r||(r=a.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},f=function(t,e){var r,n,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof s.default&&(a[o.default]=function(){return this}),a;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(e,"__esModule",{value:!0});var p=r(56),d=r(477),g=r(64),y=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.createAsync=function(t,r){return h(this,void 0,void 0,function(){var n;return f(this,function(i){switch(i.label){case 0:return[4,t.getContractAddressAsync("coin")];case 1:if(!(n=i.sent()))throw Error("Failed to resolve contract address");return[2,new e({contractAddr:n,callerAddr:r,client:t})]}})})},e.prototype.getTotalSupplyAsync=function(){return h(this,void 0,void 0,function(){var t,e;return f(this,function(r){switch(r.label){case 0:return t=new d.TotalSupplyRequest,[4,this.staticCallAsync("TotalSupply",t,new d.TotalSupplyResponse)];case 1:return e=r.sent(),[2,g.unmarshalBigUIntPB(e.getTotalSupply())]}})})},e.prototype.getBalanceOfAsync=function(t){return h(this,void 0,void 0,function(){var e,r;return f(this,function(n){switch(n.label){case 0:return(e=new d.BalanceOfRequest).setOwner(t.MarshalPB()),[4,this.staticCallAsync("BalanceOf",e,new d.BalanceOfResponse)];case 1:return r=n.sent(),[2,g.unmarshalBigUIntPB(r.getBalance())]}})})},e.prototype.getAllowanceAsync=function(t,e){return h(this,void 0,void 0,function(){var r,n;return f(this,function(i){switch(i.label){case 0:return(r=new d.AllowanceRequest).setOwner(t.MarshalPB()),r.setSpender(e.MarshalPB()),[4,this.staticCallAsync("Allowance",r,new d.AllowanceResponse)];case 1:return n=i.sent(),[2,g.unmarshalBigUIntPB(n.getAmount())]}})})},e.prototype.approveAsync=function(t,e){var r=new d.ApproveRequest;return r.setSpender(t.MarshalPB()),r.setAmount(g.marshalBigUIntPB(e)),this.callAsync("Approve",r)},e.prototype.transferAsync=function(t,e){var r=new d.TransferRequest;return r.setTo(t.MarshalPB()),r.setAmount(g.marshalBigUIntPB(e)),this.callAsync("Transfer",r)},e.prototype.transferFromAsync=function(t,e,r){var n=new d.TransferFromRequest;return n.setFrom(t.MarshalPB()),n.setTo(e.MarshalPB()),n.setAmount(g.marshalBigUIntPB(r)),this.callAsync("TransferFrom",n)},e}(p.Contract);e.Coin=y},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(478);e.Coin=n.Coin;var i=r(476);e.DPOS=i.DPOS;var o=r(474);e.AddressMapper=o.AddressMapper;var s=r(306);e.TransferGateway=s.TransferGateway},function(t,e,r){"use strict";var n=r(19),i=r(76),o=r(44),s=r(71);t.exports=function(t){n(n.S,t,{from:function(t){var e,r,n,a,u=arguments[1];return i(this),(e=void 0!==u)&&i(u),void 0==t?new this:(r=[],e?(n=0,a=o(u,arguments[2],2),s(t,!1,function(t){r.push(a(t,n++))})):s(t,!1,r.push,r),new this(r))}})}},function(t,e,r){r(480)("Map")},function(t,e,r){"use strict";var n=r(19);t.exports=function(t){n(n.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,r){r(482)("Map")},function(t,e,r){var n=r(71);t.exports=function(t,e){var r=[];return n(t,!1,r.push,r,e),r}},function(t,e,r){var n=r(136),i=r(484);t.exports=function(t){return function(){if(n(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,r){var n=r(19);n(n.P+n.R,"Map",{toJSON:r(485)("Map")})},function(t,e,r){var n=r(25),i=r(259),o=r(15)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),n(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,r){var n=r(487);t.exports=function(t,e){return new(n(t))(e)}},function(t,e,r){var n=r(44),i=r(147),o=r(97),s=r(146),a=r(488);t.exports=function(t,e){var r=1==t,u=2==t,c=3==t,l=4==t,h=6==t,f=5==t||h,p=e||a;return function(e,a,d){for(var g,y,m=o(e),b=i(m),v=n(a,d,3),w=s(b.length),_=0,M=r?p(e,w):u?p(e,0):void 0;w>_;_++)if((f||_ in b)&&(y=v(g=b[_],_,m),t))if(r)M[_]=y;else if(y)switch(t){case 3:return!0;case 5:return g;case 6:return _;case 2:M.push(g)}else if(l)return!1;return h?-1:c||l?l:M}}},function(t,e,r){"use strict";var n=r(16),i=r(19),o=r(140),s=r(53),a=r(43),u=r(133),c=r(71),l=r(135),h=r(25),f=r(72),p=r(34).f,d=r(489)(0),g=r(32);t.exports=function(t,e,r,y,m,b){var v=n[t],w=v,_=m?"set":"add",M=w&&w.prototype,E={};return g&&"function"==typeof w&&(b||M.forEach&&!s(function(){(new w).entries().next()}))?(w=e(function(e,r){l(e,w,t,"_c"),e._c=new v,void 0!=r&&c(r,m,e[_],e)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in M&&(!b||"clear"!=t)&&a(w.prototype,t,function(r,n){if(l(this,w,t),!e&&b&&!h(r))return"get"==t&&void 0;var i=this._c[t](0===r?0:r,n);return e?this:i})}),b||p(w.prototype,"size",{get:function(){return this._c.size}})):(w=y.getConstructor(e,t,m,_),u(w.prototype,r),o.NEED=!0),f(w,t),E[t]=w,i(i.G+i.W+i.F,E),b||y.setStrong(w,t,m),w}},function(t,e,r){"use strict";var n=r(34).f,i=r(99),o=r(133),s=r(44),a=r(135),u=r(71),c=r(150),l=r(261),h=r(252),f=r(32),p=r(140).fastKey,d=r(212),g=f?"_s":"size",y=function(t,e){var r,n=p(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r};t.exports={getConstructor:function(t,e,r,c){var l=t(function(t,n){a(t,l,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[g]=0,void 0!=n&&u(n,r,t[c],t)});return o(l.prototype,{clear:function(){for(var t=d(this,e),r=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];t._f=t._l=void 0,t[g]=0},delete:function(t){var r=d(this,e),n=y(r,t);if(n){var i=n.n,o=n.p;delete r._i[n.i],n.r=!0,o&&(o.n=i),i&&(i.p=o),r._f==n&&(r._f=i),r._l==n&&(r._l=o),r[g]--}return!!n},forEach:function(t){d(this,e);for(var r,n=s(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(t){return!!y(d(this,e),t)}}),f&&n(l.prototype,"size",{get:function(){return d(this,e)[g]}}),l},def:function(t,e,r){var n,i,o=y(t,e);return o?o.v=r:(t._l=o={i:i=p(e,!0),k:e,v:r,p:n=t._l,n:void 0,r:!1},t._f||(t._f=o),n&&(n.n=o),t[g]++,"F"!==i&&(t._i[i]=o)),t},getEntry:y,setStrong:function(t,e,r){c(t,e,function(t,r){this._t=d(t,e),this._k=r,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)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))},r?"entries":"values",!r,!0),h(e)}}},function(t,e,r){"use strict";var n=r(491),i=r(212);t.exports=r(490)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=n.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return n.def(i(this,"Map"),0===t?0:t,e)}},n,!0)},function(t,e,r){r(137),r(153),r(142),r(492),r(486),r(483),r(481),t.exports=r(11).Map},function(t,e,r){t.exports=r(493)},function(t,e,r){"use strict";(function(t){var n=r(4),i=n(r(266)),o=n(r(494)),s=n(r(7)),a=n(r(6)),u=n(r(5)),c=function(t,e,r,n){return new(r||(r=u.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},l=function(t,e){var r,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof a.default&&(o[s.default]=function(){return this}),o;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},h=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var f=h(r(70)),p=r(102),d=r(213),g=r(14),y=r(250),m=r(40),b=r(23),v=f.default("loom-provider"),w=f.default("loom-provider:error"),_=function(t){return b.bytesToHexAddr(t).toLowerCase()},M=function(t){return b.numberToHex(t).toLowerCase()},E=function(){function e(t,e){var r=this;this._client=t,this.notificationCallbacks=new Array,this.accounts=new o.default,this.accountsAddrList=new Array,this._client.addListener(p.ClientEvent.Contract,function(t){return r._onWebSocketMessage(t)}),this.addDefaultEvents(),this.addAccounts([e])}return e.prototype.addAccounts=function(t){var e=this;t.forEach(function(t){var r=b.publicKeyFromPrivateKey(t),n=m.LocalAddress.fromPublicKey(r).toString();e.accountsAddrList.push(n),e.accounts.set(n,t),v("New account added "+n)})},e.prototype.on=function(t,e){switch(t){case"data":this.notificationCallbacks.push(e);break;case"connect":this._client.addListener(p.ClientEvent.Connected,e);break;case"end":this._client.addListener(p.ClientEvent.Disconnected,e);break;case"error":this._client.addListener(p.ClientEvent.Error,e)}},e.prototype.addDefaultEvents=function(){var t=this;this._client.addListener(p.ClientEvent.Disconnected,function(){t.reset()})},e.prototype.removeListener=function(t,e){switch(t){case"data":this.notificationCallbacks=[];break;case"connect":this._client.removeListener(p.ClientEvent.Connected,e);break;case"end":this._client.removeListener(p.ClientEvent.Disconnected,e);break;case"error":this._client.removeListener(p.ClientEvent.Error,e)}},e.prototype.removeAllListeners=function(t,e){var r=this;"data"===t&&this.notificationCallbacks.forEach(function(t,n){t===e&&r.notificationCallbacks.splice(n,1)})},e.prototype.reset=function(){this.notificationCallbacks=[]},e.prototype.disconnect=function(){this._client.disconnect()},e.prototype.sendAsync=function(t,e){return c(this,void 0,void 0,function(){var r=this;return l(this,function(n){switch(n.label){case 0:return e?[4,this.send(t,e)]:[3,2];case 1:return n.sent(),[3,3];case 2:return[2,new u.default(function(e,n){r.send(t,function(t,r){t?n(t):e(r)})})];case 3:return[2]}})})},e.prototype.send=function(t,e){return c(this,void 0,void 0,function(){var r,n,o,s,a=this;return l(this,function(u){switch(u.label){case 0:v("Request payload",(0,i.default)(t,null,2)),(r=Array.isArray(t))&&(t=t[0]),n=function(e){switch(e){case"eth_accounts":return a._ethAccounts;case"eth_blockNumber":return a._ethBlockNumber;case"eth_call":return a._ethCall;case"eth_estimateGas":return a._ethEstimateGas;case"eth_gasPrice":return a._ethGasPrice;case"eth_getBlockByHash":return a._ethGetBlockByHash;case"eth_getBlockByNumber":return a._ethGetBlockByNumber;case"eth_getCode":return a._ethGetCode;case"eth_getFilterChanges":return a._ethGetFilterChanges;case"eth_getLogs":return a._ethGetLogs;case"eth_getTransactionByHash":return a._ethGetTransactionByHash;case"eth_getTransactionReceipt":return a._ethGetTransactionReceipt;case"eth_newBlockFilter":return a._ethNewBlockFilter;case"eth_newFilter":return a._ethNewFilter;case"eth_newPendingTransactionFilter":return a._ethNewPendingTransactionFilter;case"eth_sendTransaction":return a._ethSendTransaction;case"eth_subscribe":return a._ethSubscribe;case"eth_uninstallFilter":return a._ethUninstallFilter;case"eth_unsubscribe":return a._ethUnsubscribe;case"net_version":return a._netVersion;default:throw Error('Method "'+t.method+'" not supported on this provider')}},u.label=1;case 1:return u.trys.push([1,3,,4]),[4,n(t.method).bind(this)(t)];case 2:return o=u.sent(),e(null,this._okResponse(t.id,o,r)),[3,4];case 3:return s=u.sent(),w(s),e(s,null),[3,4];case 4:return[2]}})})},e.prototype._ethAccounts=function(){if(0===this.accountsAddrList.length)throw Error("No account available");return this.accountsAddrList},e.prototype._ethBlockNumber=function(){return c(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this._client.getBlockHeightAsync()];case 1:return t=e.sent(),[2,b.numberToHex(t)]}})})},e.prototype._ethCall=function(t){return c(this,void 0,void 0,function(){var e;return l(this,function(r){switch(r.label){case 0:return[4,this._callStaticAsync(t.params[0])];case 1:return[2,(e=r.sent())?_(e):"0x0"]}})})},e.prototype._ethEstimateGas=function(){return null},e.prototype._ethGasPrice=function(){return null},e.prototype._ethGetBlockByHash=function(t){return c(this,void 0,void 0,function(){var e,r,n;return l(this,function(i){switch(i.label){case 0:return e=t.params[0],r=t.params[1]||!0,[4,this._client.getEvmBlockByHashAsync(e,r)];case 1:return(n=i.sent())?[2,this._createBlockInfo(n,r)]:[2,null]}})})},e.prototype._ethGetBlockByNumber=function(t){return c(this,void 0,void 0,function(){var e,r,n;return l(this,function(i){switch(i.label){case 0:return e=t.params[0],r=t.params[1]||!0,[4,this._client.getEvmBlockByNumberAsync(e,r)];case 1:return(n=i.sent())?[2,this._createBlockInfo(n,r)]:[2,null]}})})},e.prototype._ethGetCode=function(t){return c(this,void 0,void 0,function(){var e,r;return l(this,function(n){switch(n.label){case 0:return e=new m.Address(this._client.chainId,m.LocalAddress.fromHexString(t.params[0])),[4,this._client.getEvmCodeAsync(e)];case 1:if(!(r=n.sent()))throw Error("No code returned on eth_getCode");return[2,_(r)]}})})},e.prototype._ethGetFilterChanges=function(t){return c(this,void 0,void 0,function(){var e,r=this;return l(this,function(n){switch(n.label){case 0:return[4,this._client.getEvmFilterChangesAsync(t.params[0])];case 1:return(e=n.sent())?e instanceof y.EthBlockHashList?[2,e.getEthBlockHashList_asU8().map(function(t){return _(t)})]:e instanceof y.EthTxHashList?[2,e.getEthTxHashList_asU8().map(function(t){return _(t)})]:e instanceof y.EthFilterLogList?[2,e.getEthBlockLogsList().map(function(t){return r._createLogResult(t)})]:[2]:[2,[]]}})})},e.prototype._ethGetLogs=function(t){return c(this,void 0,void 0,function(){return l(this,function(e){return[2,this._getLogs(t.params[0])]})})},e.prototype._ethGetTransactionByHash=function(t){return c(this,void 0,void 0,function(){return l(this,function(e){return[2,this._getTransaction(t.params[0])]})})},e.prototype._ethGetTransactionReceipt=function(t){return c(this,void 0,void 0,function(){return l(this,function(e){return[2,this._getReceipt(t.params[0])]})})},e.prototype._ethNewBlockFilter=function(){return c(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this._client.newBlockEvmFilterAsync()];case 1:if(!(t=e.sent()))throw Error("New block filter unexpected result");return[2,t]}})})},e.prototype._ethNewFilter=function(t){return c(this,void 0,void 0,function(){var e;return l(this,function(r){switch(r.label){case 0:return[4,this._client.newEvmFilterAsync(t.params[0])];case 1:if(!(e=r.sent()))throw Error("Cannot create new filter on eth_newFilter");return[2,e]}})})},e.prototype._ethNewPendingTransactionFilter=function(){return c(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this._client.newPendingTransactionEvmFilterAsync()];case 1:if(!(t=e.sent()))throw Error("New pending transaction filter unexpected result");return[2,t]}})})},e.prototype._ethSendTransaction=function(t){return c(this,void 0,void 0,function(){var e;return l(this,function(r){switch(r.label){case 0:return t.params[0].to?[4,this._callAsync(t.params[0])]:[3,2];case 1:return e=r.sent(),[3,4];case 2:return[4,this._deployAsync(t.params[0])];case 3:e=r.sent(),r.label=4;case 4:return[2,_(e)]}})})},e.prototype._ethSubscribe=function(t){return c(this,void 0,void 0,function(){var e,r,n;return l(this,function(i){switch(i.label){case 0:return e=t.params[0],r=t.params[1]||{},[4,this._client.evmSubscribeAsync(e,r)];case 1:if(!(n=i.sent()))throw Error("Subscribe filter failed");return[2,n]}})})},e.prototype._ethUninstallFilter=function(t){return this._client.uninstallEvmFilterAsync(t.params[0])},e.prototype._ethUnsubscribe=function(t){return this._client.evmUnsubscribeAsync(t.params[0])},e.prototype._netVersion=function(){return"474747"},e.prototype._deployAsync=function(e){return c(this,void 0,void 0,function(){var r,n,i,o,s,a,u,c,h;return l(this,function(l){switch(l.label){case 0:return r=new m.Address(this._client.chainId,m.LocalAddress.fromHexString(e.from)),n=new m.Address(this._client.chainId,m.LocalAddress.fromHexString("0x0000000000000000000000000000000000000000")),i="0x"===e.data.substring(0,2),o=t.from(e.data.slice(i?2:0),"hex"),(s=new g.DeployTx).setVmType(g.VMType.EVM),s.setCode(b.bufferToProtobufBytes(o)),(a=new g.MessageTx).setFrom(r.MarshalPB()),a.setTo(n.MarshalPB()),a.setData(s.serializeBinary()),(u=new g.Transaction).setId(1),u.setData(a.serializeBinary()),[4,this._commitTransaction(e.from,u)];case 1:return c=l.sent(),h=g.DeployResponse.deserializeBinary(b.bufferToProtobufBytes(c)),[2,g.DeployResponseData.deserializeBinary(b.bufferToProtobufBytes(h.getOutput_asU8())).getTxHash_asU8()]}})})},e.prototype._callAsync=function(e){var r=new m.Address(this._client.chainId,m.LocalAddress.fromHexString(e.from)),n=new m.Address(this._client.chainId,m.LocalAddress.fromHexString(e.to)),i=t.from(e.data.substring(2),"hex"),o=new g.CallTx;o.setVmType(g.VMType.EVM),o.setInput(b.bufferToProtobufBytes(i));var s=new g.MessageTx;s.setFrom(r.MarshalPB()),s.setTo(n.MarshalPB()),s.setData(o.serializeBinary());var a=new g.Transaction;return a.setId(2),a.setData(s.serializeBinary()),this._commitTransaction(e.from,a)},e.prototype._callStaticAsync=function(e){var r=new m.Address(this._client.chainId,m.LocalAddress.fromHexString(e.from)),n=new m.Address(this._client.chainId,m.LocalAddress.fromHexString(e.to)),i=t.from(e.data.substring(2),"hex");return this._client.queryAsync(n,i,g.VMType.EVM,r)},e.prototype._createBlockInfo=function(t,e){var r=this;return{blockNumber:M(t.getNumber()),transactionHash:_(t.getHash_asU8()),parentHash:_(t.getParentHash_asU8()),logsBloom:_(t.getLogsBloom_asU8()),timestamp:t.getTimestamp(),transactions:t.getTransactionsList_asU8().map(function(t){return e?r._createReceiptResult(y.EvmTxReceipt.deserializeBinary(b.bufferToProtobufBytes(t))):_(t)})}},e.prototype._createReceiptResult=function(t){var e=_(t.getTxHash_asU8()),r=M(t.getTransactionIndex()),n=_(t.getBlockHash_asU8()),i=M(t.getBlockNumber()),o=_(t.getContractAddress_asU8()),s=t.getLogsList().map(function(t,e){return{logIndex:M(e),address:o,blockHash:n,blockNumber:i,transactionHash:_(t.getTxHash_asU8()),transactionIndex:r,type:"mined",data:_(t.getEncodedBody_asU8()),topics:t.getTopicsList().map(function(t){return t.toLowerCase()})}});return{transactionHash:e,transactionIndex:r,blockHash:n,blockNumber:i,contractAddress:o,gasUsed:M(t.getGasUsed()),cumulativeGasUsed:M(t.getCumulativeGasUsed()),logs:s,status:M(t.getStatus())}},e.prototype._getTransaction=function(e){return c(this,void 0,void 0,function(){var r,n,i,o,s,a,u,c,h,f,p,d;return l(this,function(l){switch(l.label){case 0:return r=t.from(e.substring(2),"hex"),[4,this._client.getEvmTxByHashAsync(b.bufferToProtobufBytes(r))];case 1:if(!(n=l.sent()))throw Error("Transaction cannot be empty");return i=_(n.getHash_asU8()),o=M(n.getNonce()),s=M(n.getTransactionIndex()),a=_(n.getBlockHash_asU8()),u=M(n.getBlockNumber()),c=_(n.getFrom_asU8()),h=_(n.getTo_asU8()),f=M(n.getValue()),p=M(n.getGasPrice()),d=M(n.getGas()),[2,{hash:i,nonce:o,blockHash:a,blockNumber:u,transactionIndex:s,from:c,to:h,value:f,gasPrice:p,gas:d,input:"0x0"}]}})})},e.prototype._getReceipt=function(e){return c(this,void 0,void 0,function(){var r,n;return l(this,function(i){switch(i.label){case 0:return r=t.from(e.substring(2),"hex"),[4,this._client.getEvmTxReceiptAsync(b.bufferToProtobufBytes(r))];case 1:if(!(n=i.sent()))throw Error("Receipt cannot be empty");return[2,this._createReceiptResult(n)]}})})},e.prototype._createLogResult=function(t){return{removed:t.getRemoved(),logIndex:M(t.getLogIndex()),transactionIndex:b.numberToHex(t.getTransactionIndex()),transactionHash:_(t.getTransactionHash_asU8()),blockHash:_(t.getBlockHash_asU8()),blockNumber:b.numberToHex(t.getBlockNumber()),address:_(t.getAddress_asU8()),data:_(t.getData_asU8()),topics:t.getTopicsList().map(function(t){return String.fromCharCode.apply(null,t)})}},e.prototype._getLogs=function(t){return c(this,void 0,void 0,function(){var e,r=this;return l(this,function(n){switch(n.label){case 0:return[4,this._client.getEvmLogsAsync(t)];case 1:return(e=n.sent())?[2,y.EthFilterLogList.deserializeBinary(b.bufferToProtobufBytes(e)).getEthBlockLogsList().map(function(t){return r._createLogResult(t)})]:[2,[]]}})})},e.prototype._onWebSocketMessage=function(t){t.data&&"0"!==t.id&&(v("Socket message arrived "+(0,i.default)(t)),this.notificationCallbacks.forEach(function(e){e({jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t.id,result:{transactionHash:_(t.transactionHashBytes),logIndex:"0x0",transactionIndex:"0x0",blockHash:"0x0",blockNumber:"0x0",address:t.contractAddress.local.toString(),type:"mined",data:_(t.data),topics:t.topics}}})}))},e.prototype._commitTransaction=function(t,e){return c(this,void 0,void 0,function(){var r,n;return l(this,function(i){if(!(r=this.accounts.get(t)))throw Error("Account not found for address "+t);return n=d.createDefaultTxMiddleware(this._client,r),[2,this._client.commitTxAsync(e,{middleware:n})]})})},e.prototype._okResponse=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=!1);var n={id:t,jsonrpc:"2.0",result:e},o=r?[n]:n;return v("Response payload",(0,i.default)(o,null,2)),o},e}();e.LoomProvider=E}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=r(4),i=n(r(7)),o=n(r(6)),s=n(r(5)),a=function(t,e,r,n){return new(r||(r=s.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},u=function(t,e){var r,n,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof o.default&&(a[i.default]=function(){return this}),a;function c(i){return function(o){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(s=(s=u.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){u.label=i[1];break}if(6===i[0]&&u.label<s[1]){u.label=s[1],s=i;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(i);break}s[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},c=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=c(r(70)),h=r(14),f=r(23),p=l.default("nonce-tx-middleware"),d=function(){function t(t,e){this._publicKey=t,this._client=e}return t.prototype.Handle=function(t){return a(this,void 0,void 0,function(){var e,r,n;return u(this,function(i){switch(i.label){case 0:return e=f.bytesToHex(this._publicKey),[4,this._client.getNonceAsync(e)];case 1:return r=i.sent(),p("Next nonce "+(r+1)),(n=new h.NonceTx).setInner(t),n.setSequence(r+1),[2,n.serializeBinary()]}})})},t}();e.NonceTxMiddleware=d},function(t,e,r){"use strict";var n=r(4)(r(5));Object.defineProperty(e,"__esModule",{value:!0});var i=r(14),o=r(23),s=function(){function t(t){this.privateKey=t}return t.prototype.Handle=function(t){var e=o.sign(t,this.privateKey),r=new i.SignedTx;return r.setInner(t),r.setSignature(e),r.setPublicKey(o.publicKeyFromPrivateKey(this.privateKey)),n.default.resolve(r.serializeBinary())},t}();e.SignedTxMiddleware=s},function(t,e){},function(t,e,r){"use strict";var n,i=r(4),o=i(r(7)),s=i(r(6)),a=i(r(5)),u=i(r(29)),c=i(r(28)),l=(n=c.default||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?(0,u.default)(e):(r.prototype=e.prototype,new r)}),h=function(t,e,r,n){return new(r||(r=a.default))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},f=function(t,e){var r,n,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof s.default&&(a[o.default]=function(){return this}),a;function c(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=e.call(t,u)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},p=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var d=p(r(42)),g=r(102),y=r(14),m=function(t){function e(r){var n=t.call(this)||this;n._client=r.client,n.address=r.contractAddr,n.caller=r.callerAddr;var i=n._emitContractEvent.bind(n);return n.on("newListener",function(t){t===e.EVENT&&0===n.listenerCount(t)&&n._client.on(g.ClientEvent.Contract,i)}),n.on("removeListener",function(t){t===e.EVENT&&0===n.listenerCount(t)&&n._client.removeListener(g.ClientEvent.Contract,i)}),n}return l(e,t),e.prototype.callAsync=function(t,e){return h(this,void 0,void 0,function(){var e,r,n,i;return f(this,function(o){return e=Uint8Array.from(t),(r=new y.CallTx).setVmType(y.VMType.EVM),r.setInput(e),(n=new y.MessageTx).setFrom(this.caller.MarshalPB()),n.setTo(this.address.MarshalPB()),n.setData(r.serializeBinary()),(i=new y.Transaction).setId(2),i.setData(n.serializeBinary()),[2,this._client.commitTxAsync(i)]})})},e.prototype.staticCallAsync=function(t,e){return h(this,void 0,void 0,function(){var e;return f(this,function(r){return e=Uint8Array.from(t),[2,this._client.queryAsync(this.address,e,y.VMType.EVM,this.caller)]})})},e.prototype._emitContractEvent=function(t){t.contractAddress.equals(this.address)&&this.emit(e.EVENT,t)},e.EVENT="event",e}(d.default);e.EvmContract=m},function(t,e){
28/*!
29Copyright (C) 2013-2017 by Andrea Giammarchi - @WebReflection
30
31Permission is hereby granted, free of charge, to any person obtaining a copy
32of this software and associated documentation files (the "Software"), to deal
33in the Software without restriction, including without limitation the rights
34to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35copies of the Software, and to permit persons to whom the Software is
36furnished to do so, subject to the following conditions:
37
38The above copyright notice and this permission notice shall be included in
39all copies or substantial portions of the Software.
40
41THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
47THE SOFTWARE.
48
49*/
50var r="~",n="\\x"+("0"+r.charCodeAt(0).toString(16)).slice(-2),i="\\"+n,o=new RegExp(n,"g"),s=new RegExp(i,"g"),a=new RegExp("(?:^|([^\\\\]))"+i),u=[].indexOf||function(t){for(var e=this.length;e--&&this[e]!==t;);return e},c=String;function l(t,e,n){return e instanceof Array?function(t,e,r){for(var n=0,i=e.length;n<i;n++)e[n]=l(t,e[n],r);return e}(t,e,n):e instanceof c?e.length?n.hasOwnProperty(e)?n[e]:n[e]=function(t,e){for(var n=0,i=e.length;n<i;t=t[e[n++].replace(s,r)]);return t}(t,e.split(r)):t:e instanceof Object?function(t,e,r){for(var n in e)e.hasOwnProperty(n)&&(e[n]=l(t,e[n],r));return e}(t,e,n):e}var h={stringify:function(t,e,s,a){return h.parser.stringify(t,function(t,e,s){var a,c,l=!1,h=!!e,f=[],p=[t],d=[t],g=[s?r:"[Circular]"],y=t,m=1;return h&&(c="object"==typeof e?function(t,r){return""!==t&&e.indexOf(t)<0?void 0:r}:e),function(t,e){return h&&(e=c.call(this,t,e)),l?(y!==this&&(a=m-u.call(p,this)-1,m-=a,p.splice(m,p.length),f.splice(m-1,f.length),y=this),"object"==typeof e&&e?(u.call(p,e)<0&&p.push(y=e),m=p.length,(a=u.call(d,e))<0?(a=d.push(e)-1,s?(f.push((""+t).replace(o,n)),g[a]=r+f.join(r)):g[a]=g[0]):e=g[a]):"string"==typeof e&&s&&(e=e.replace(n,i).replace(r,n))):l=!0,e}}(t,e,!a),s)},parse:function(t,e){return h.parser.parse(t,function(t){return function(e,o){var s="string"==typeof o;return s&&o.charAt(0)===r?new c(o.slice(1)):(""===e&&(o=l(o,o,{})),s&&(o=o.replace(a,"$1"+r).replace(i,n)),t?t.call(this,e,o):o)}}(e))},parser:JSON};t.exports=h},function(t,e,r){var n=r(113),i=r(114),o=Array.isArray;t.exports=function(t){if(n(t)||o(t))return 0===t.length;if(i(t)){for(var e in t)return!1;return!0}throw new TypeError("Val must be a string, array or object")}},function(t,e,r){!function(){"use strict";t.exports=function(t){var e={},r="and",n=!1,i=",";return e.endWith=function(t){return"string"!=typeof t?e:(r=t,e)},e.delimitAll=function(){var t=arguments[0];return n="boolean"!=typeof t||t,e},e.delimitWith=function(t){return"string"!=typeof t?e:(i=t,e)},e.make=function(){var e,o,s=n?i+" "+r+" ":" "+r+" ";return void 0===t||!t instanceof Array?"":(e=t.slice(0,-2).join(i+" "),o=t.slice(t.length-2).join(s),e.length?e+i+" "+o:o)},e}}()},function(t,e,r){var n=r(502),i=r(501),o=r(113),s=r(87),a=r(217),u=r(216),c=r(218),l=r(215);t.exports=function(t,e,r){var h='"'+t+'" must be ';a(!i(r),'"validators" cannot be empty');var f=r.map(function(t){if(o(t))return t;if(u(t))return'"'+t.name+'"';if(s(t))return'pass "'+(t.name||"anonymous")+'"';throw new TypeError('"validators" must be an array containing only strings, classes, or functions')}),p=n(f).endWith("or").make(),d=l(p)?"an":"a";if(h+=d+" "+p,!r.some(function(r){try{return c(t,e,r),!0}catch(t){return!1}}))throw new TypeError(h)}},function(t,e,r){!function(r){var n=Function.prototype.toString;function i(t){return"function"==typeof t&&(/^class\s/.test(n.call(t))||/^.*classCallCheck\(/.test(function(t){return n.call(t).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}(t)))}void 0!==t&&t.exports&&(e=t.exports=i),e.isClass=i}()},function(t,e){var r=/^[A-Z]/,n=/^[A-Z]([a-z]|$)/;t.exports=function(t,e){return e?n.test(t):r.test(t)}},function(t,e){t.exports=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}},function(t,e){t.exports=function(t){return/^[.]{3}.+/.test(t)||/^\[[.]{3}[^\]]+\]$/.test(t)}},function(t,e){t.exports=function(t){return/^\[.+\]$/.test(t)}},function(t,e,r){var n=r(87);t.exports=function t(e){return n(e)?function(){return t(e.apply(this,arguments))}:!e}},function(t,e,r){var n;function i(t){function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;u++;var i=e.formatters[n];if("function"==typeof i){var o=s[u];r=i.call(t,o),s.splice(u,1),u--}return r}),e.formatArgs.call(t,s),(r.log||e.log||console.log.bind(console)).apply(t,s)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var r,n=0;for(r in t)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e.colors[Math.abs(n)%e.colors.length]}(t),"function"==typeof e.init&&e.init(r),r}(e=t.exports=i.debug=i.default=i).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];for(var r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&("-"===(t=r[i].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(251),e.names=[],e.skips=[],e.formatters={}},function(t,e,r){(function(n){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t}(e=t.exports=r(510)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),!r)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,n)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,r(24))},function(t,e,r){var n=r(511)("assert-args"),i=r(219),o=r(114),s=r(509),a=r(508),u=r(507),c=r(218),l=s(a);t.exports=function(t,e){if("object"!=typeof t||!i(t.length))throw new TypeError('"args" must be an array or array-like object (arguments)');if(!o(e))throw new TypeError('"validation" must be an object');var r,s,h=Array.prototype.slice.call(t),f={},p=Object.keys(e);if(p.filter(u).length>1)throw new Error("assert-args only supports a single spread argument");if(p.forEach(function(t,o){var d,g=e[t],y=h[0];if(u(t)){n("is spread key: "+t),n("argKeys.length",p.length),n("argsLeft.length",h.length);var m=p.slice(o+1).filter(l);if(n("requiredKeysLeft",m),d=h.slice(0,h.length-m.length),n("spreadArgs",d),n("spreadArgs.length",d.length),a(t))n("is optional spread key: "+t),s=t.slice(4,-1),f[s]=[],d.forEach(function(e){if(!i(e))return r=null,void h.shift();try{c(t.slice(1,-1),e,g,!0),r=null,f[s].push(e),h.shift()}catch(t){if(n("spread validate err: "+t.message),n("spread validate argsLeft: "+h),r)throw r;r=t}});else{if(n("is required spread key: "+t),s=t.slice(3),f[s]=[],0===d.length)throw new TypeError('"'+t+'" is required');d.forEach(function(e){try{c(t,e,g,!0),r=null,f[s].push(e),h.shift()}catch(t){if(n("spread validate err: "+t.message),n("spread validate argsLeft: "+h),n("spread validate argKeys: "+p),o===p.length-1)throw r&&h.length-1>m.length?r:t;if(r)throw r;r=t}})}}else if(a(t))if(n("is optional key: "+t),t=t.slice(1,-1),0!==h.length){if(!i(y))return r=null,void(f[t]=h.shift());try{return c(t,y,g),r=null,void(f[t]=h.shift())}catch(e){return r=r||e,void(f[t]=void 0)}}else f[t]=void 0;else{if(n("is required key: "+t),0===h.length)throw new TypeError('"'+t+'" is required');try{c(t,y,g),r=null,f[t]=h.shift()}catch(t){if(r&&h.length>1)throw r;throw t}}}),r)throw r;return f}},function(t,e,r){var n=r(13),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return i.stringify.apply(i,arguments)}},function(t,e,r){t.exports={default:r(513),__esModule:!0}},function(t,e,r){"use strict";var n=r(31),i=r(115),o=r(221);n(n.S,"Promise",{try:function(t){var e=i.f(this),r=o(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},function(t,e,r){"use strict";var n=r(31),i=r(13),o=r(18),s=r(223),a=r(220);n(n.P+n.R,"Promise",{finally:function(t){var e=s(this,i.Promise||o.Promise),r="function"==typeof t;return this.then(r?function(r){return a(e,t()).then(function(){return r})}:t,r?function(r){return a(e,t()).then(function(){throw r})}:t)}})},function(t,e,r){var n=r(17)("iterator"),i=!1;try{var o=[7][n]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o=[7],s=o[n]();s.next=function(){return{done:r=!0}},o[n]=function(){return s},t(o)}catch(t){}return r}},function(t,e,r){"use strict";var n=r(18),i=r(13),o=r(39),s=r(37),a=r(17)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:n[t];s&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(49);t.exports=function(t,e,r){for(var i in e)r&&t[i]?t[i]=e[i]:n(t,i,e[i]);return t}},function(t,e,r){var n=r(18),i=r(222).set,o=n.MutationObserver||n.WebKitMutationObserver,s=n.process,a=n.Promise,u="process"==r(65)(s);t.exports=function(){var t,e,r,c=function(){var n,i;for(u&&(n=s.domain)&&n.exit();t;){i=t.fn,t=t.next;try{i()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(u)r=function(){s.nextTick(c)};else if(!o||n.navigator&&n.navigator.standalone)if(a&&a.resolve){var l=a.resolve();r=function(){l.then(c)}}else r=function(){i.call(n,c)};else{var h=!0,f=document.createTextNode("");new o(c).observe(f,{characterData:!0}),r=function(){f.data=h=!h}}return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}},function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},function(t,e,r){var n=r(224),i=r(17)("iterator"),o=r(66);t.exports=r(13).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){var n=r(66),i=r(17)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[i]===t)}},function(t,e,r){var n=r(30);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&n(o.call(t)),e}}},function(t,e,r){var n=r(68),i=r(524),o=r(523),s=r(30),a=r(234),u=r(522),c={},l={};(e=t.exports=function(t,e,r,h,f){var p,d,g,y,m=f?function(){return t}:u(t),b=n(r,h,e?2:1),v=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(o(m)){for(p=a(t.length);p>v;v++)if((y=e?b(s(d=t[v])[0],d[1]):b(t[v]))===c||y===l)return y}else for(g=m.call(t);!(d=g.next()).done;)if((y=i(g,b,d.value,e))===c||y===l)return y}).BREAK=c,e.RETURN=l},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e,r){"use strict";var n,i,o,s,a=r(90),u=r(18),c=r(68),l=r(224),h=r(31),f=r(38),p=r(92),d=r(526),g=r(525),y=r(223),m=r(222).set,b=r(520)(),v=r(115),w=r(221),_=r(220),M=u.TypeError,E=u.process,A=u.Promise,B="process"==l(E),T=function(){},R=i=v.f,x=!!function(){try{var t=A.resolve(1),e=(t.constructor={})[r(17)("species")]=function(t){t(T,T)};return(B||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e}catch(t){}}(),S=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},k=function(t,e){if(!t._n){t._n=!0;var r=t._c;b(function(){for(var n=t._v,i=1==t._s,o=0,s=function(e){var r,o,s=i?e.ok:e.fail,a=e.resolve,u=e.reject,c=e.domain;try{s?(i||(2==t._h&&j(t),t._h=1),!0===s?r=n:(c&&c.enter(),r=s(n),c&&c.exit()),r===e.promise?u(M("Promise-chain cycle")):(o=S(r))?o.call(r,a,u):a(r)):u(n)}catch(t){u(t)}};r.length>o;)s(r[o++]);t._c=[],t._n=!1,e&&!t._h&&C(t)})}},C=function(t){m.call(u,function(){var e,r,n,i=t._v,o=I(t);if(o&&(e=w(function(){B?E.emit("unhandledRejection",i,t):(r=u.onunhandledrejection)?r({promise:t,reason:i}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",i)}),t._h=B||I(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},I=function(t){return 1!==t._h&&0===(t._a||t._c).length},j=function(t){m.call(u,function(){var e;B?E.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=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()),k(e,!0))},O=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw M("Promise can't be resolved itself");(e=S(t))?b(function(){var n={_w:r,_d:!1};try{e.call(t,c(O,n,1),c(F,n,1))}catch(t){F.call(n,t)}}):(r._v=t,r._s=1,k(r,!1))}catch(t){F.call({_w:r,_d:!1},t)}}};x||(A=function(t){d(this,A,"Promise","_h"),p(t),n.call(this);try{t(c(O,this,1),c(F,this,1))}catch(t){F.call(this,t)}},(n=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=r(519)(A.prototype,{then:function(t,e){var r=R(y(this,A));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=B?E.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&k(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n;this.promise=t,this.resolve=c(O,t,1),this.reject=c(F,t,1)},v.f=R=function(t){return t===A||t===s?new o(t):i(t)}),h(h.G+h.W+h.F*!x,{Promise:A}),r(88)(A,"Promise"),r(518)("Promise"),s=r(13).Promise,h(h.S+h.F*!x,"Promise",{reject:function(t){var e=R(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(a||!x),"Promise",{resolve:function(t){return _(a&&this===s?A:this,t)}}),h(h.S+h.F*!(x&&r(517)(function(t){A.all(t).catch(T)})),"Promise",{all:function(t){var e=this,r=R(e),n=r.resolve,i=r.reject,o=w(function(){var r=[],o=0,s=1;g(t,!1,function(t){var a=o++,u=!1;r.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,r[a]=t,--s||n(r))},i)}),--s||n(r)});return o.e&&i(o.v),r.promise},race:function(t){var e=this,r=R(e),n=r.reject,i=w(function(){g(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return i.e&&n(i.v),r.promise}})},function(t,e,r){r(228),r(238),r(232),r(527),r(516),r(515),t.exports=r(13).Promise},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(225),o=(n=i)&&n.__esModule?n:{default:n};e.default=function(t){return function(){var e=t.apply(this,arguments);return new o.default(function(t,r){return function n(i,s){try{var a=e[i](s),u=a.value}catch(t){return void r(t)}if(!a.done)return o.default.resolve(u).then(function(t){n("next",t)},function(t){n("throw",t)});t(u)}("next")})}}},function(t,e){!function(e){"use strict";var r,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",c="object"==typeof t,l=e.regeneratorRuntime;if(l)c&&(t.exports=l);else{(l=e.regeneratorRuntime=c?t.exports:{}).wrap=w;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",g={},y={};y[s]=function(){return this};var m=Object.getPrototypeOf,b=m&&m(m(C([])));b&&b!==n&&i.call(b,s)&&(y=b);var v=A.prototype=M.prototype=Object.create(y);E.prototype=v.constructor=A,A.constructor=E,A[u]=E.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===E||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(v),t},l.awrap=function(t){return{__await:t}},B(T.prototype),T.prototype[a]=function(){return this},l.AsyncIterator=T,l.async=function(t,e,r,n){var i=new T(w(t,e,r,n));return l.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},B(v),v[u]="Generator",v[s]=function(){return this},v.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},l.values=C,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,i){return a.type="throw",a.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}}}function w(t,e,r,n){var i=e&&e.prototype instanceof M?e:M,o=Object.create(i.prototype),s=new k(n||[]);return o._invoke=function(t,e,r){var n=h;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===i)throw o;return I()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=R(s,r);if(a){if(a===g)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=_(t,e,r);if("normal"===u.type){if(n=r.done?d:f,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,s),o}function _(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function M(){}function E(){}function A(){}function B(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function T(t){var e;this._invoke=function(r,n){function o(){return new Promise(function(e,o){!function e(r,n,o,s){var a=_(t[r],t,n);if("throw"!==a.type){var u=a.arg,c=u.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,o,s)},function(t){e("throw",t,o,s)}):Promise.resolve(c).then(function(t){u.value=t,o(u)},s)}s(a.arg)}(r,n,e,o)})}return e=e?e.then(o,o):o()}}function R(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,R(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=_(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;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=r),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function x(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function C(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=r,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,r){var n=function(){return this}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,o=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(530),i)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},function(t,e,r){t.exports=r(531)},function(t,e,r){var n=r(128),i=r(89);r(243)("keys",function(){return function(t){return i(n(t))}})},function(t,e,r){r(533),t.exports=r(13).Object.keys},function(t,e,r){t.exports={default:r(534),__esModule:!0}},function(t,e,r){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0});var i=b(r(535)),o=b(r(532)),s=b(r(529)),a=b(r(514)),u=b(r(225)),c=b(r(122)),l=b(r(245)),h=b(r(241)),f=b(r(240)),p=b(r(239)),d=b(r(227)),g=b(r(512)),y=b(r(226)),m=b(r(500));function b(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){return function(e){function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ws://localhost:8080",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.autoconnect,i=void 0===n||n,o=e.reconnect,s=void 0===o||o,a=e.reconnect_interval,u=void 0===a?1e3:a,c=e.max_reconnects,f=void 0===c?5:c,d=arguments[2];(0,h.default)(this,r);var g=(0,p.default)(this,(r.__proto__||(0,l.default)(r)).call(this));return g.queue={},g.rpc_id=0,g.autoconnect=i,g.ready=!1,g.reconnect=s,g.reconnect_interval=u,g.max_reconnects=f,g.current_reconnects=0,g.generate_request_id=d||function(){return++g.rpc_id},g.autoconnect&&g._connect(t,arguments[1]),g}return(0,d.default)(r,e),(0,f.default)(r,[{key:"call",value:function(t,e,r,n){var i=this;return(0,g.default)(arguments,{method:"string","[params]":["object",Array],"[timeout]":"number","[ws_opts]":"object"}),n||"object"!==(void 0===r?"undefined":(0,c.default)(r))||(n=r,r=null),new u.default(function(o,s){if(!i.ready)return s(new Error("socket not ready"));var u=i.generate_request_id(t,e),c={jsonrpc:"2.0",method:t,params:e||null,id:u};i.socket.send((0,a.default)(c),n,function(t){if(t)return s(t);i.queue[u]={promise:[o,s]},r&&(i.queue[u].timeout=setTimeout(function(){i.queue[u]=null,s(new Error("reply timeout"))},r))})})}},{key:"notify",value:function(t,e){var r=this;return(0,g.default)(arguments,{method:"string","[params]":["object",Array]}),new u.default(function(n,i){if(!r.ready)return i(new Error("socket not ready"));var o={jsonrpc:"2.0",method:t,params:e||null};r.socket.send((0,a.default)(o),function(t){if(t)return i(t);n()})})}},{key:"subscribe",value:function(){var t=(0,s.default)(o.default.mark(function t(e){var r,n=arguments;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(0,g.default)(n,{event:"string"}),t.next=3,this.call("rpc.on",[e]);case 3:if("ok"===(r=t.sent)[e]){t.next=6;break}throw new Error("Failed subscribing to an event '"+e+"' with: "+r[e]);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"unsubscribe",value:function(){var t=(0,s.default)(o.default.mark(function t(e){var r,n=arguments;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(0,g.default)(n,{event:"string"}),t.next=3,this.call("rpc.off",[e]);case 3:if("ok"===(r=t.sent)[e]){t.next=6;break}throw new Error("Failed unsubscribing from an event with: "+r);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"close",value:function(t,e){this.socket.close(t||1e3,e)}},{key:"_connect",value:function(e,r){var o=this;this.socket=new t(e,r),this.socket.on("open",function(){o.ready=!0,o.emit("open"),o.current_reconnects=0}),this.socket.on("message",function(t){t instanceof ArrayBuffer&&(t=n.from(t).toString());try{t=m.default.parse(t)}catch(t){return}if(t.notification&&o.listeners(t.notification).length){if(!(0,i.default)(t.params).length)return o.emit(t.notification);var e=[t.notification];if(t.params.constructor===Object)e.push(t.params);else for(var r=0;r<t.params.length;r++)e.push(t.params[r]);return o.emit.apply(o,e)}if(!o.queue[t.id])return t.method&&t.params?o.emit(t.method,t.params):void 0;o.queue[t.id].timeout&&clearTimeout(o.queue[t.id].timeout),t.error?o.queue[t.id].promise[1](t.error):o.queue[t.id].promise[0](t.result),o.queue[t.id]=null}),this.socket.on("error",function(t){return o.emit("error",t)}),this.socket.on("close",function(t,n){o.ready&&o.emit("close",t,n),o.ready=!1,1e3!==t&&(o.current_reconnects++,(o.reconnect&&o.max_reconnects>o.current_reconnects||0===o.max_reconnects)&&setTimeout(function(){return o._connect(e,r)},o.reconnect_interval))})}}]),r}(y.default)},t.exports=e.default}).call(this,r(0).Buffer)},function(t,e,r){var n=r(31);n(n.S,"Object",{create:r(120)})},function(t,e,r){r(537);var n=r(13).Object;t.exports=function(t,e){return n.create(t,e)}},function(t,e,r){t.exports={default:r(538),__esModule:!0}},function(t,e,r){var n=r(38),i=r(30),o=function(t,e){if(i(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{(n=r(68)(Function.call,r(229).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,r){return o(t,r),e?t.__proto__=r:n(t,r),t}}({},!1):void 0),check:o}},function(t,e,r){var n=r(31);n(n.S,"Object",{setPrototypeOf:r(540).set})},function(t,e,r){r(541),t.exports=r(13).Object.setPrototypeOf},function(t,e,r){t.exports={default:r(542),__esModule:!0}},function(t,e,r){r(117)("observable")},function(t,e,r){r(117)("asyncIterator")},function(t,e,r){var n=r(57),i=r(230).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return s.slice()}}(t):i(n(t))}},function(t,e,r){var n=r(65);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(89),i=r(231),o=r(116);t.exports=function(t){var e=n(t),r=i.f;if(r)for(var s,a=r(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,r){var n=r(93)("meta"),i=r(38),o=r(50),s=r(39).f,a=0,u=Object.isExtensible||function(){return!0},c=!r(67)(function(){return u(Object.preventExtensions({}))}),l=function(t){s(t,n,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,n)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[n].i},getWeak:function(t,e){if(!o(t,n)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[n].w},onFreeze:function(t){return c&&h.NEED&&u(t)&&!o(t,n)&&l(t),t}}},function(t,e,r){"use strict";var n=r(18),i=r(50),o=r(37),s=r(31),a=r(236),u=r(549).KEY,c=r(67),l=r(125),h=r(88),f=r(93),p=r(17),d=r(118),g=r(117),y=r(548),m=r(547),b=r(30),v=r(38),w=r(57),_=r(123),M=r(91),E=r(120),A=r(546),B=r(229),T=r(39),R=r(89),x=B.f,S=T.f,k=A.f,C=n.Symbol,I=n.JSON,j=I&&I.stringify,F=p("_hidden"),O=p("toPrimitive"),P={}.propertyIsEnumerable,L=l("symbol-registry"),N=l("symbols"),D=l("op-symbols"),U=Object.prototype,W="function"==typeof C,q=n.QObject,z=!q||!q.prototype||!q.prototype.findChild,G=o&&c(function(){return 7!=E(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=x(U,e);n&&delete U[e],S(t,e,r),n&&t!==U&&S(U,e,n)}:S,H=function(t){var e=N[t]=E(C.prototype);return e._k=t,e},V=W&&"symbol"==typeof C.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof C},K=function(t,e,r){return t===U&&K(D,e,r),b(t),e=_(e,!0),b(r),i(N,e)?(r.enumerable?(i(t,F)&&t[F][e]&&(t[F][e]=!1),r=E(r,{enumerable:M(0,!1)})):(i(t,F)||S(t,F,M(1,{})),t[F][e]=!0),G(t,e,r)):S(t,e,r)},$=function(t,e){b(t);for(var r,n=y(e=w(e)),i=0,o=n.length;o>i;)K(t,r=n[i++],e[r]);return t},Y=function(t){var e=P.call(this,t=_(t,!0));return!(this===U&&i(N,t)&&!i(D,t))&&(!(e||!i(this,t)||!i(N,t)||i(this,F)&&this[F][t])||e)},Z=function(t,e){if(t=w(t),e=_(e,!0),t!==U||!i(N,e)||i(D,e)){var r=x(t,e);return!r||!i(N,e)||i(t,F)&&t[F][e]||(r.enumerable=!0),r}},J=function(t){for(var e,r=k(w(t)),n=[],o=0;r.length>o;)i(N,e=r[o++])||e==F||e==u||n.push(e);return n},X=function(t){for(var e,r=t===U,n=k(r?D:w(t)),o=[],s=0;n.length>s;)!i(N,e=n[s++])||r&&!i(U,e)||o.push(N[e]);return o};W||(a((C=function(){if(this instanceof C)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(r){this===U&&e.call(D,r),i(this,F)&&i(this[F],t)&&(this[F][t]=!1),G(this,t,M(1,r))};return o&&z&&G(U,t,{configurable:!0,set:e}),H(t)}).prototype,"toString",function(){return this._k}),B.f=Z,T.f=K,r(230).f=A.f=J,r(116).f=Y,r(231).f=X,o&&!r(90)&&a(U,"propertyIsEnumerable",Y,!0),d.f=function(t){return H(p(t))}),s(s.G+s.W+s.F*!W,{Symbol:C});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(var et=R(p.store),rt=0;et.length>rt;)g(et[rt++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return i(L,t+="")?L[t]:L[t]=C(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(){z=!0},useSimple:function(){z=!1}}),s(s.S+s.F*!W,"Object",{create:function(t,e){return void 0===e?E(t):$(E(t),e)},defineProperty:K,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:X}),I&&s(s.S+s.F*(!W||c(function(){var t=C();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))})),"JSON",{stringify:function(t){for(var e,r,n=[t],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=e=n[1],(v(e)||void 0!==t)&&!V(t))return m(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!V(e))return e}),n[1]=e,j.apply(I,n)}}),C.prototype[O]||r(49)(C.prototype,O,C.prototype.valueOf),h(C,"Symbol"),h(Math,"Math",!0),h(n.JSON,"JSON",!0)},function(t,e,r){r(550),r(228),r(545),r(544),t.exports=r(13).Symbol},function(t,e,r){t.exports={default:r(551),__esModule:!0}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(){}},function(t,e,r){"use strict";var n=r(554),i=r(553),o=r(66),s=r(57);t.exports=r(237)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(t,e,r){var n=r(121),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=n(t))<0?i(t+e,0):o(t,e)}},function(t,e,r){var n=r(57),i=r(234),o=r(556);t.exports=function(t){return function(e,r,s){var a,u=n(e),c=i(u.length),l=o(s,c);if(t&&r!=r){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===r)return t||l||0;return!t&&-1}}},function(t,e,r){var n=r(65);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,r){var n=r(39),i=r(30),o=r(89);t.exports=r(37)?Object.defineProperties:function(t,e){i(t);for(var r,s=o(e),a=s.length,u=0;a>u;)n.f(t,r=s[u++],e[r]);return t}},function(t,e,r){"use strict";var n=r(120),i=r(91),o=r(88),s={};r(49)(s,r(17)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(s,{next:i(1,r)}),o(t,e+" Iterator")}},function(t,e,r){var n=r(121),i=r(127);t.exports=function(t){return function(e,r){var o,s,a=String(i(e)),u=n(r),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u))<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536}}},function(t,e,r){r(238),r(232),t.exports=r(118).f("iterator")},function(t,e,r){t.exports={default:r(562),__esModule:!0}},function(t,e,r){var n=r(31);n(n.S+n.F*!r(37),"Object",{defineProperty:r(39).f})},function(t,e,r){r(564);var n=r(13).Object;t.exports=function(t,e,r){return n.defineProperty(t,e,r)}},function(t,e,r){t.exports={default:r(565),__esModule:!0}},function(t,e,r){var n=r(128),i=r(244);r(243)("getPrototypeOf",function(){return function(t){return i(n(t))}})},function(t,e,r){r(567),t.exports=r(13).Object.getPrototypeOf},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=u(r(245)),i=u(r(241)),o=u(r(240)),s=u(r(239)),a=u(r(227));function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t,r,o){(0,i.default)(this,e);var a=(0,s.default)(this,(e.__proto__||(0,n.default)(e)).call(this));return a.socket=new window.WebSocket(t,o),a.socket.onopen=function(){return a.emit("open")},a.socket.onmessage=function(t){return a.emit("message",t.data)},a.socket.onerror=function(t){return a.emit("error",t)},a.socket.onclose=function(){return a.emit("close")},a}return(0,a.default)(e,t),(0,o.default)(e,[{key:"send",value:function(t,e,r){r=r||e;try{this.socket.send(t),r()}catch(t){r(t)}}},{key:"close",value:function(t,e){this.socket.close(t,e)}}]),e}(u(r(226)).default);e.default=c,t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=void 0;var n=o(r(569)),i=o(r(536));function o(t){return t&&t.__esModule?t:{default:t}}e.Client=(0,i.default)(n.default)},function(t,e,r){t.exports=r(132).PassThrough},function(t,e,r){t.exports=r(132).Transform},function(t,e,r){t.exports=r(51)},function(t,e,r){t.exports=r(131)},function(t,e,r){"use strict";t.exports=o;var n=r(246),i=r(69);function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(1),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(8))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,o,s,a,u=1,c={},l=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){d(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}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},n=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,n=function(t){var e=h.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(d,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&d(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(e){t.postMessage(s+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var i={callback:t,args:e};return c[u]=i,n(u),u++},f.clearImmediate=p}function p(t){delete c[t]}function d(t){if(l)setTimeout(d,0,t);else{var e=c[t];if(e){l=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}(e)}finally{p(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(8),r(24))},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(577),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(8))},function(t,e){},function(t,e,r){"use strict";var n=r(2).Buffer,i=r(579);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?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,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},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){"use strict";(function(e){var n=r(58).Transform;function i(t){n.call(this),this._block=new e(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1)(i,n),i.prototype._transform=function(t,r,n){var i=null;try{"buffer"!==r&&(t=new e(t,r)),this.update(t)}catch(t){i=t}n(i)},i.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},i.prototype.update=function(t,r){if(!e.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");e.isBuffer(t)||(t=new e(t,r||"binary"));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},i.prototype._update=function(t){throw new Error("_update is not implemented")},i.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();return void 0!==t&&(e=e.toString(t)),e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(this,r(0).Buffer)},function(t,e){},function(t,e,r){!function(t){"use strict";var e=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e<t.length;e++)r[e]=t[e];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=e(),a=e([1]),u=e([56129,1]),c=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(t,e,r,n){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function g(t,e,r,n,i){var o,s=0;for(o=0;o<i;o++)s|=t[e+o]^r[n+o];return(1&s-1>>>8)-1}function y(t,e,r,n){return g(t,e,r,n,16)}function m(t,e,r,n){return g(t,e,r,n,32)}function b(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,f=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=o,M=s,E=a,A=u,B=c,T=l,R=h,x=f,S=p,k=d,C=g,I=y,j=m,F=b,O=v,P=w,L=0;L<20;L+=2)_^=(i=(j^=(i=(S^=(i=(B^=(i=_+j|0)<<7|i>>>25)+_|0)<<9|i>>>23)+B|0)<<13|i>>>19)+S|0)<<18|i>>>14,T^=(i=(M^=(i=(F^=(i=(k^=(i=T+M|0)<<7|i>>>25)+T|0)<<9|i>>>23)+k|0)<<13|i>>>19)+F|0)<<18|i>>>14,C^=(i=(R^=(i=(E^=(i=(O^=(i=C+R|0)<<7|i>>>25)+C|0)<<9|i>>>23)+O|0)<<13|i>>>19)+E|0)<<18|i>>>14,P^=(i=(I^=(i=(x^=(i=(A^=(i=P+I|0)<<7|i>>>25)+P|0)<<9|i>>>23)+A|0)<<13|i>>>19)+x|0)<<18|i>>>14,_^=(i=(A^=(i=(E^=(i=(M^=(i=_+A|0)<<7|i>>>25)+_|0)<<9|i>>>23)+M|0)<<13|i>>>19)+E|0)<<18|i>>>14,T^=(i=(B^=(i=(x^=(i=(R^=(i=T+B|0)<<7|i>>>25)+T|0)<<9|i>>>23)+R|0)<<13|i>>>19)+x|0)<<18|i>>>14,C^=(i=(k^=(i=(S^=(i=(I^=(i=C+k|0)<<7|i>>>25)+C|0)<<9|i>>>23)+I|0)<<13|i>>>19)+S|0)<<18|i>>>14,P^=(i=(O^=(i=(F^=(i=(j^=(i=P+O|0)<<7|i>>>25)+P|0)<<9|i>>>23)+j|0)<<13|i>>>19)+F|0)<<18|i>>>14;_=_+o|0,M=M+s|0,E=E+a|0,A=A+u|0,B=B+c|0,T=T+l|0,R=R+h|0,x=x+f|0,S=S+p|0,k=k+d|0,C=C+g|0,I=I+y|0,j=j+m|0,F=F+b|0,O=O+v|0,P=P+w|0,t[0]=_>>>0&255,t[1]=_>>>8&255,t[2]=_>>>16&255,t[3]=_>>>24&255,t[4]=M>>>0&255,t[5]=M>>>8&255,t[6]=M>>>16&255,t[7]=M>>>24&255,t[8]=E>>>0&255,t[9]=E>>>8&255,t[10]=E>>>16&255,t[11]=E>>>24&255,t[12]=A>>>0&255,t[13]=A>>>8&255,t[14]=A>>>16&255,t[15]=A>>>24&255,t[16]=B>>>0&255,t[17]=B>>>8&255,t[18]=B>>>16&255,t[19]=B>>>24&255,t[20]=T>>>0&255,t[21]=T>>>8&255,t[22]=T>>>16&255,t[23]=T>>>24&255,t[24]=R>>>0&255,t[25]=R>>>8&255,t[26]=R>>>16&255,t[27]=R>>>24&255,t[28]=x>>>0&255,t[29]=x>>>8&255,t[30]=x>>>16&255,t[31]=x>>>24&255,t[32]=S>>>0&255,t[33]=S>>>8&255,t[34]=S>>>16&255,t[35]=S>>>24&255,t[36]=k>>>0&255,t[37]=k>>>8&255,t[38]=k>>>16&255,t[39]=k>>>24&255,t[40]=C>>>0&255,t[41]=C>>>8&255,t[42]=C>>>16&255,t[43]=C>>>24&255,t[44]=I>>>0&255,t[45]=I>>>8&255,t[46]=I>>>16&255,t[47]=I>>>24&255,t[48]=j>>>0&255,t[49]=j>>>8&255,t[50]=j>>>16&255,t[51]=j>>>24&255,t[52]=F>>>0&255,t[53]=F>>>8&255,t[54]=F>>>16&255,t[55]=F>>>24&255,t[56]=O>>>0&255,t[57]=O>>>8&255,t[58]=O>>>16&255,t[59]=O>>>24&255,t[60]=P>>>0&255,t[61]=P>>>8&255,t[62]=P>>>16&255,t[63]=P>>>24&255}(t,e,r,n)}function v(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,f=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=0;_<20;_+=2)o^=(i=(m^=(i=(p^=(i=(c^=(i=o+m|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,l^=(i=(s^=(i=(b^=(i=(d^=(i=l+s|0)<<7|i>>>25)+l|0)<<9|i>>>23)+d|0)<<13|i>>>19)+b|0)<<18|i>>>14,g^=(i=(h^=(i=(a^=(i=(v^=(i=g+h|0)<<7|i>>>25)+g|0)<<9|i>>>23)+v|0)<<13|i>>>19)+a|0)<<18|i>>>14,w^=(i=(y^=(i=(f^=(i=(u^=(i=w+y|0)<<7|i>>>25)+w|0)<<9|i>>>23)+u|0)<<13|i>>>19)+f|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,l^=(i=(c^=(i=(f^=(i=(h^=(i=l+c|0)<<7|i>>>25)+l|0)<<9|i>>>23)+h|0)<<13|i>>>19)+f|0)<<18|i>>>14,g^=(i=(d^=(i=(p^=(i=(y^=(i=g+d|0)<<7|i>>>25)+g|0)<<9|i>>>23)+y|0)<<13|i>>>19)+p|0)<<18|i>>>14,w^=(i=(v^=(i=(b^=(i=(m^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+m|0)<<13|i>>>19)+b|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=l>>>0&255,t[5]=l>>>8&255,t[6]=l>>>16&255,t[7]=l>>>24&255,t[8]=g>>>0&255,t[9]=g>>>8&255,t[10]=g>>>16&255,t[11]=g>>>24&255,t[12]=w>>>0&255,t[13]=w>>>8&255,t[14]=w>>>16&255,t[15]=w>>>24&255,t[16]=h>>>0&255,t[17]=h>>>8&255,t[18]=h>>>16&255,t[19]=h>>>24&255,t[20]=f>>>0&255,t[21]=f>>>8&255,t[22]=f>>>16&255,t[23]=f>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function _(t,e,r,n,i,o,s){var a,u,c=new Uint8Array(16),l=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(b(l,c,s,w),u=0;u<64;u++)t[e+u]=r[n+u]^l[u];for(a=1,u=8;u<16;u++)a=a+(255&c[u])|0,c[u]=255&a,a>>>=8;i-=64,e+=64,n+=64}if(i>0)for(b(l,c,s,w),u=0;u<i;u++)t[e+u]=r[n+u]^l[u];return 0}function M(t,e,r,n,i){var o,s,a=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(b(u,a,i,w),s=0;s<64;s++)t[e+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(b(u,a,i,w),s=0;s<r;s++)t[e+s]=u[s];return 0}function E(t,e,r,n,i){var o=new Uint8Array(32);v(o,n,i,w);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return M(t,e,r,s,o)}function A(t,e,r,n,i,o,s){var a=new Uint8Array(32);v(a,o,s,w);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=o[c+16];return _(t,e,r,n,i,u,a)}var B=function(t){var e,r,n,i,o,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,r=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(e>>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function T(t,e,r,n,i,o){var s=new B(o);return s.update(r,n,i),s.finish(t,e),0}function R(t,e,r,n,i,o){var s=new Uint8Array(16);return T(s,0,r,n,i,o),y(t,e,s,0)}function x(t,e,r,n,i){var o;if(r<32)return-1;for(A(t,0,e,0,r,n,i),T(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function S(t,e,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(E(s,0,32,n,i),0!==R(e,16,e,32,r-32,s))return-1;for(A(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function k(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function C(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function I(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function j(t,r){var n,i,o,s=e(),a=e();for(n=0;n<16;n++)a[n]=r[n];for(C(a),C(a),C(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,I(a,s,1-o)}for(n=0;n<16;n++)t[2*n]=255&a[n],t[2*n+1]=a[n]>>8}function F(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return j(r,t),j(n,e),m(r,0,n,0)}function O(t){var e=new Uint8Array(32);return j(e,t),1&e[0]}function P(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function L(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function N(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function D(t,e,r){var n,i,o=0,s=0,a=0,u=0,c=0,l=0,h=0,f=0,p=0,d=0,g=0,y=0,m=0,b=0,v=0,w=0,_=0,M=0,E=0,A=0,B=0,T=0,R=0,x=0,S=0,k=0,C=0,I=0,j=0,F=0,O=0,P=r[0],L=r[1],N=r[2],D=r[3],U=r[4],W=r[5],q=r[6],z=r[7],G=r[8],H=r[9],V=r[10],K=r[11],$=r[12],Y=r[13],Z=r[14],J=r[15];o+=(n=e[0])*P,s+=n*L,a+=n*N,u+=n*D,c+=n*U,l+=n*W,h+=n*q,f+=n*z,p+=n*G,d+=n*H,g+=n*V,y+=n*K,m+=n*$,b+=n*Y,v+=n*Z,w+=n*J,s+=(n=e[1])*P,a+=n*L,u+=n*N,c+=n*D,l+=n*U,h+=n*W,f+=n*q,p+=n*z,d+=n*G,g+=n*H,y+=n*V,m+=n*K,b+=n*$,v+=n*Y,w+=n*Z,_+=n*J,a+=(n=e[2])*P,u+=n*L,c+=n*N,l+=n*D,h+=n*U,f+=n*W,p+=n*q,d+=n*z,g+=n*G,y+=n*H,m+=n*V,b+=n*K,v+=n*$,w+=n*Y,_+=n*Z,M+=n*J,u+=(n=e[3])*P,c+=n*L,l+=n*N,h+=n*D,f+=n*U,p+=n*W,d+=n*q,g+=n*z,y+=n*G,m+=n*H,b+=n*V,v+=n*K,w+=n*$,_+=n*Y,M+=n*Z,E+=n*J,c+=(n=e[4])*P,l+=n*L,h+=n*N,f+=n*D,p+=n*U,d+=n*W,g+=n*q,y+=n*z,m+=n*G,b+=n*H,v+=n*V,w+=n*K,_+=n*$,M+=n*Y,E+=n*Z,A+=n*J,l+=(n=e[5])*P,h+=n*L,f+=n*N,p+=n*D,d+=n*U,g+=n*W,y+=n*q,m+=n*z,b+=n*G,v+=n*H,w+=n*V,_+=n*K,M+=n*$,E+=n*Y,A+=n*Z,B+=n*J,h+=(n=e[6])*P,f+=n*L,p+=n*N,d+=n*D,g+=n*U,y+=n*W,m+=n*q,b+=n*z,v+=n*G,w+=n*H,_+=n*V,M+=n*K,E+=n*$,A+=n*Y,B+=n*Z,T+=n*J,f+=(n=e[7])*P,p+=n*L,d+=n*N,g+=n*D,y+=n*U,m+=n*W,b+=n*q,v+=n*z,w+=n*G,_+=n*H,M+=n*V,E+=n*K,A+=n*$,B+=n*Y,T+=n*Z,R+=n*J,p+=(n=e[8])*P,d+=n*L,g+=n*N,y+=n*D,m+=n*U,b+=n*W,v+=n*q,w+=n*z,_+=n*G,M+=n*H,E+=n*V,A+=n*K,B+=n*$,T+=n*Y,R+=n*Z,x+=n*J,d+=(n=e[9])*P,g+=n*L,y+=n*N,m+=n*D,b+=n*U,v+=n*W,w+=n*q,_+=n*z,M+=n*G,E+=n*H,A+=n*V,B+=n*K,T+=n*$,R+=n*Y,x+=n*Z,S+=n*J,g+=(n=e[10])*P,y+=n*L,m+=n*N,b+=n*D,v+=n*U,w+=n*W,_+=n*q,M+=n*z,E+=n*G,A+=n*H,B+=n*V,T+=n*K,R+=n*$,x+=n*Y,S+=n*Z,k+=n*J,y+=(n=e[11])*P,m+=n*L,b+=n*N,v+=n*D,w+=n*U,_+=n*W,M+=n*q,E+=n*z,A+=n*G,B+=n*H,T+=n*V,R+=n*K,x+=n*$,S+=n*Y,k+=n*Z,C+=n*J,m+=(n=e[12])*P,b+=n*L,v+=n*N,w+=n*D,_+=n*U,M+=n*W,E+=n*q,A+=n*z,B+=n*G,T+=n*H,R+=n*V,x+=n*K,S+=n*$,k+=n*Y,C+=n*Z,I+=n*J,b+=(n=e[13])*P,v+=n*L,w+=n*N,_+=n*D,M+=n*U,E+=n*W,A+=n*q,B+=n*z,T+=n*G,R+=n*H,x+=n*V,S+=n*K,k+=n*$,C+=n*Y,I+=n*Z,j+=n*J,v+=(n=e[14])*P,w+=n*L,_+=n*N,M+=n*D,E+=n*U,A+=n*W,B+=n*q,T+=n*z,R+=n*G,x+=n*H,S+=n*V,k+=n*K,C+=n*$,I+=n*Y,j+=n*Z,F+=n*J,w+=(n=e[15])*P,s+=38*(M+=n*N),a+=38*(E+=n*D),u+=38*(A+=n*U),c+=38*(B+=n*W),l+=38*(T+=n*q),h+=38*(R+=n*z),f+=38*(x+=n*G),p+=38*(S+=n*H),d+=38*(k+=n*V),g+=38*(C+=n*K),y+=38*(I+=n*$),m+=38*(j+=n*Y),b+=38*(F+=n*Z),v+=38*(O+=n*J),o=(n=(o+=38*(_+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=c,t[5]=l,t[6]=h,t[7]=f,t[8]=p,t[9]=d,t[10]=g,t[11]=y,t[12]=m,t[13]=b,t[14]=v,t[15]=w}function U(t,e){D(t,e,e)}function W(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)U(i,i),2!==n&&4!==n&&D(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function q(t,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),c=e(),l=e(),h=e(),f=e(),p=e(),d=e();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,P(a,n),o=0;o<16;o++)l[o]=a[o],f[o]=c[o]=h[o]=0;for(c[0]=f[0]=1,o=254;o>=0;--o)I(c,l,i=s[o>>>3]>>>(7&o)&1),I(h,f,i),L(p,c,h),N(c,c,h),L(h,l,f),N(l,l,f),U(f,p),U(d,c),D(c,h,c),D(h,l,p),L(p,c,h),N(c,c,h),U(l,c),N(h,f,d),D(c,h,u),L(c,c,f),D(h,h,c),D(c,f,d),D(f,l,a),U(l,p),I(c,l,i),I(h,f,i);for(o=0;o<16;o++)a[o+16]=c[o],a[o+32]=h[o],a[o+48]=l[o],a[o+64]=f[o];var g=a.subarray(32),y=a.subarray(16);return W(g,g),D(y,y,g),j(t,y),0}function z(t,e){return q(t,e,o)}function G(t,e){return n(e,32),z(t,e)}function H(t,e,r){var n=new Uint8Array(32);return q(n,r,e),v(t,i,n,w)}B.prototype.blocks=function(t,e,r){for(var n,i,o,s,a,u,c,l,h,f,p,d,g,y,m,b,v,w,_,M=this.fin?0:2048,E=this.h[0],A=this.h[1],B=this.h[2],T=this.h[3],R=this.h[4],x=this.h[5],S=this.h[6],k=this.h[7],C=this.h[8],I=this.h[9],j=this.r[0],F=this.r[1],O=this.r[2],P=this.r[3],L=this.r[4],N=this.r[5],D=this.r[6],U=this.r[7],W=this.r[8],q=this.r[9];r>=16;)E+=8191&(n=255&t[e+0]|(255&t[e+1])<<8),A+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3),B+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6),T+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9),R+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12),x+=a>>>1&8191,S+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2),k+=8191&(u>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5),l=255&t[e+14]|(255&t[e+15])<<8,f=h=0,f+=E*j,f+=A*(5*q),f+=B*(5*W),f+=T*(5*U),h=(f+=R*(5*D))>>>13,f&=8191,f+=x*(5*N),f+=S*(5*L),f+=k*(5*P),f+=(C+=8191&(c>>>8|l<<8))*(5*O),p=h+=(f+=(I+=l>>>5|M)*(5*F))>>>13,p+=E*F,p+=A*j,p+=B*(5*q),p+=T*(5*W),h=(p+=R*(5*U))>>>13,p&=8191,p+=x*(5*D),p+=S*(5*N),p+=k*(5*L),p+=C*(5*P),h+=(p+=I*(5*O))>>>13,p&=8191,d=h,d+=E*O,d+=A*F,d+=B*j,d+=T*(5*q),h=(d+=R*(5*W))>>>13,d&=8191,d+=x*(5*U),d+=S*(5*D),d+=k*(5*N),d+=C*(5*L),g=h+=(d+=I*(5*P))>>>13,g+=E*P,g+=A*O,g+=B*F,g+=T*j,h=(g+=R*(5*q))>>>13,g&=8191,g+=x*(5*W),g+=S*(5*U),g+=k*(5*D),g+=C*(5*N),y=h+=(g+=I*(5*L))>>>13,y+=E*L,y+=A*P,y+=B*O,y+=T*F,h=(y+=R*j)>>>13,y&=8191,y+=x*(5*q),y+=S*(5*W),y+=k*(5*U),y+=C*(5*D),m=h+=(y+=I*(5*N))>>>13,m+=E*N,m+=A*L,m+=B*P,m+=T*O,h=(m+=R*F)>>>13,m&=8191,m+=x*j,m+=S*(5*q),m+=k*(5*W),m+=C*(5*U),b=h+=(m+=I*(5*D))>>>13,b+=E*D,b+=A*N,b+=B*L,b+=T*P,h=(b+=R*O)>>>13,b&=8191,b+=x*F,b+=S*j,b+=k*(5*q),b+=C*(5*W),v=h+=(b+=I*(5*U))>>>13,v+=E*U,v+=A*D,v+=B*N,v+=T*L,h=(v+=R*P)>>>13,v&=8191,v+=x*O,v+=S*F,v+=k*j,v+=C*(5*q),w=h+=(v+=I*(5*W))>>>13,w+=E*W,w+=A*U,w+=B*D,w+=T*N,h=(w+=R*L)>>>13,w&=8191,w+=x*P,w+=S*O,w+=k*F,w+=C*j,_=h+=(w+=I*(5*q))>>>13,_+=E*q,_+=A*W,_+=B*U,_+=T*D,h=(_+=R*N)>>>13,_&=8191,_+=x*L,_+=S*P,_+=k*O,_+=C*F,E=f=8191&(h=(h=((h+=(_+=I*j)>>>13)<<2)+h|0)+(f&=8191)|0),A=p+=h>>>=13,B=d&=8191,T=g&=8191,R=y&=8191,x=m&=8191,S=b&=8191,k=v&=8191,C=w&=8191,I=_&=8191,e+=16,r-=16;this.h[0]=E,this.h[1]=A,this.h[2]=B,this.h[3]=T,this.h[4]=R,this.h[5]=x,this.h[6]=S,this.h[7]=k,this.h[8]=C,this.h[9]=I},B.prototype.finish=function(t,e){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},B.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=t[e+n];if(r-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=t[e+n];this.leftover+=r}};var V=x,K=S;var $=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(t,e,r,n){for(var i,o,s,a,u,c,l,h,f,p,d,g,y,m,b,v,w,_,M,E,A,B,T,R,x,S,k=new Int32Array(16),C=new Int32Array(16),I=t[0],j=t[1],F=t[2],O=t[3],P=t[4],L=t[5],N=t[6],D=t[7],U=e[0],W=e[1],q=e[2],z=e[3],G=e[4],H=e[5],V=e[6],K=e[7],Y=0;n>=128;){for(M=0;M<16;M++)E=8*M+Y,k[M]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],C[M]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(M=0;M<80;M++)if(i=I,o=j,s=F,a=O,u=P,c=L,l=N,h=D,f=U,p=W,d=q,g=z,y=G,m=H,b=V,v=K,T=65535&(B=K),R=B>>>16,x=65535&(A=D),S=A>>>16,T+=65535&(B=(G>>>14|P<<18)^(G>>>18|P<<14)^(P>>>9|G<<23)),R+=B>>>16,x+=65535&(A=(P>>>14|G<<18)^(P>>>18|G<<14)^(G>>>9|P<<23)),S+=A>>>16,T+=65535&(B=G&H^~G&V),R+=B>>>16,x+=65535&(A=P&L^~P&N),S+=A>>>16,A=$[2*M],T+=65535&(B=$[2*M+1]),R+=B>>>16,x+=65535&A,S+=A>>>16,A=k[M%16],R+=(B=C[M%16])>>>16,x+=65535&A,S+=A>>>16,x+=(R+=(T+=65535&B)>>>16)>>>16,T=65535&(B=_=65535&T|R<<16),R=B>>>16,x=65535&(A=w=65535&x|(S+=x>>>16)<<16),S=A>>>16,T+=65535&(B=(U>>>28|I<<4)^(I>>>2|U<<30)^(I>>>7|U<<25)),R+=B>>>16,x+=65535&(A=(I>>>28|U<<4)^(U>>>2|I<<30)^(U>>>7|I<<25)),S+=A>>>16,R+=(B=U&W^U&q^W&q)>>>16,x+=65535&(A=I&j^I&F^j&F),S+=A>>>16,h=65535&(x+=(R+=(T+=65535&B)>>>16)>>>16)|(S+=x>>>16)<<16,v=65535&T|R<<16,T=65535&(B=g),R=B>>>16,x=65535&(A=a),S=A>>>16,R+=(B=_)>>>16,x+=65535&(A=w),S+=A>>>16,j=i,F=o,O=s,P=a=65535&(x+=(R+=(T+=65535&B)>>>16)>>>16)|(S+=x>>>16)<<16,L=u,N=c,D=l,I=h,W=f,q=p,z=d,G=g=65535&T|R<<16,H=y,V=m,K=b,U=v,M%16==15)for(E=0;E<16;E++)A=k[E],T=65535&(B=C[E]),R=B>>>16,x=65535&A,S=A>>>16,A=k[(E+9)%16],T+=65535&(B=C[(E+9)%16]),R+=B>>>16,x+=65535&A,S+=A>>>16,w=k[(E+1)%16],T+=65535&(B=((_=C[(E+1)%16])>>>1|w<<31)^(_>>>8|w<<24)^(_>>>7|w<<25)),R+=B>>>16,x+=65535&(A=(w>>>1|_<<31)^(w>>>8|_<<24)^w>>>7),S+=A>>>16,w=k[(E+14)%16],R+=(B=((_=C[(E+14)%16])>>>19|w<<13)^(w>>>29|_<<3)^(_>>>6|w<<26))>>>16,x+=65535&(A=(w>>>19|_<<13)^(_>>>29|w<<3)^w>>>6),S+=A>>>16,S+=(x+=(R+=(T+=65535&B)>>>16)>>>16)>>>16,k[E]=65535&x|S<<16,C[E]=65535&T|R<<16;T=65535&(B=U),R=B>>>16,x=65535&(A=I),S=A>>>16,A=t[0],R+=(B=e[0])>>>16,x+=65535&A,S+=A>>>16,S+=(x+=(R+=(T+=65535&B)>>>16)>>>16)>>>16,t[0]=I=65535&x|S<<16,e[0]=U=65535&T|R<<16,T=65535&(B=W),R=B>>>16,x=65535&(A=j),S=A>>>16,A=t[1],R+=(B=e[1])>>>16,x+=65535&A,S+=A>>>16,S+=(x+=(R+=(T+=65535&B)>>>16)>>>16)>>>16,t[1]=j=65535&x|S<<16,e[1]=W=65535&T|R<<16,T=65535&(B=q),R=B>>>16,x=65535&(A=F),S=A>>>16,A=t[2],R+=(B=e[2])>>>16,x+=65535&A,S+=A>>>16,S+=(x+=(R+=(T+=65535&B)>>>16)>>>16)>>>16,t[2]=F=65535&x|S<<16,e[2]=q=65535&T|R<<16,T=65535&(B=z),R=B>>>16,x=65535&(A=O),S=A>>>16,A=t[3],R+=(B=e[3])>>>16,x+=65535&A,S+=A>>>16,S+=(x+=(R+=(T+=65535&B)>>>16)>>>16)>>>16,t[3]=O=65535&x|S<<16,e[3]=z=65535&T|R<<16,T=65535&(B=G),R=B>>>16,x=65535&(A=P),S=A>>>16,A=t[4],R+=(B=e[4])>>>16,x+=65535&A,S+=A>>>16,S+=(x+=(R+=(T+=65535&B)>>>16)>>>16)>>>16,t[4]=P=65535&x|S<<16,e[4]=G=65535&T|R<<16,T=65535&(B=H),R=B>>>16,x=65535&(A=L),S=A>>>16,A=t[5],R+=(B=e[5])>>>16,x+=65535&A,S+=A>>>16,S+=(x+=(R+=(T+=65535&B)>>>16)>>>16)>>>16,t[5]=L=65535&x|S<<16,e[5]=H=65535&T|R<<16,T=65535&(B=V),R=B>>>16,x=65535&(A=N),S=A>>>16,A=t[6],R+=(B=e[6])>>>16,x+=65535&A,S+=A>>>16,S+=(x+=(R+=(T+=65535&B)>>>16)>>>16)>>>16,t[6]=N=65535&x|S<<16,e[6]=V=65535&T|R<<16,T=65535&(B=K),R=B>>>16,x=65535&(A=D),S=A>>>16,A=t[7],R+=(B=e[7])>>>16,x+=65535&A,S+=A>>>16,S+=(x+=(R+=(T+=65535&B)>>>16)>>>16)>>>16,t[7]=D=65535&x|S<<16,e[7]=K=65535&T|R<<16,Y+=128,n-=128}return n}function Z(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Y(i,o,e,r),r%=128,n=0;n<r;n++)s[n]=e[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,d(s,r-8,a/536870912|0,a<<3),Y(i,o,s,r),n=0;n<8;n++)d(t,8*n,i[n],o[n]);return 0}function J(t,r){var n=e(),i=e(),o=e(),s=e(),a=e(),u=e(),c=e(),h=e(),f=e();N(n,t[1],t[0]),N(f,r[1],r[0]),D(n,n,f),L(i,t[0],t[1]),L(f,r[0],r[1]),D(i,i,f),D(o,t[3],r[3]),D(o,o,l),D(s,t[2],r[2]),L(s,s,s),N(a,i,n),N(u,s,o),L(c,s,o),L(h,i,n),D(t[0],a,u),D(t[1],h,c),D(t[2],c,u),D(t[3],a,h)}function X(t,e,r){var n;for(n=0;n<4;n++)I(t[n],e[n],r)}function Q(t,r){var n=e(),i=e(),o=e();W(o,r[2]),D(n,r[0],o),D(i,r[1],o),j(t,i),t[31]^=O(n)<<7}function tt(t,e,r){var n,i;for(k(t[0],s),k(t[1],a),k(t[2],a),k(t[3],s),i=255;i>=0;--i)X(t,e,n=r[i/8|0]>>(7&i)&1),J(e,t),J(t,t),X(t,e,n)}function et(t,r){var n=[e(),e(),e(),e()];k(n[0],h),k(n[1],f),k(n[2],a),D(n[3],h,f),tt(t,n,r)}function rt(t,r,i){var o,s=new Uint8Array(64),a=[e(),e(),e(),e()];for(i||n(r,32),Z(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,et(a,s),Q(t,a),o=0;o<32;o++)r[o+32]=t[o];return 0}var nt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function it(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)e[i]+=r-16*e[n]*nt[i-(n-32)],r=e[i]+128>>8,e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*nt[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*nt[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function ot(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;it(t,r)}function st(t,r,n,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),h=[e(),e(),e(),e()];Z(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var f=n+64;for(o=0;o<n;o++)t[64+o]=r[o];for(o=0;o<32;o++)t[32+o]=a[32+o];for(Z(c,t.subarray(32),n+32),ot(c),et(h,c),Q(t,h),o=32;o<64;o++)t[o]=i[o];for(Z(u,t,n+64),ot(u),o=0;o<64;o++)l[o]=0;for(o=0;o<32;o++)l[o]=c[o];for(o=0;o<32;o++)for(s=0;s<32;s++)l[o+s]+=u[o]*a[s];return it(t.subarray(32),l),f}function at(t,r){var n=e(),i=e(),o=e(),u=e(),l=e(),h=e(),f=e();return k(t[2],a),P(t[1],r),U(o,t[1]),D(u,o,c),N(o,o,t[2]),L(u,t[2],u),U(l,u),U(h,l),D(f,h,l),D(n,f,o),D(n,n,u),function(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)U(i,i),1!==n&&D(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}(n,n),D(n,n,o),D(n,n,u),D(n,n,u),D(t[0],n,u),U(i,t[0]),D(i,i,u),F(i,o)&&D(t[0],t[0],p),U(i,t[0]),D(i,i,u),F(i,o)?-1:(O(t[0])===r[31]>>7&&N(t[0],s,t[0]),D(t[3],t[0],t[1]),0)}function ut(t,r,n,i){var o,s=new Uint8Array(32),a=new Uint8Array(64),u=[e(),e(),e(),e()],c=[e(),e(),e(),e()];if(-1,n<64)return-1;if(at(c,i))return-1;for(o=0;o<n;o++)t[o]=r[o];for(o=0;o<32;o++)t[o+32]=i[o];if(Z(a,t,n),ot(a),tt(u,c,a),et(c,r.subarray(32)),J(u,c),Q(s,u),n-=64,m(r,0,s,0)){for(o=0;o<n;o++)t[o]=0;return-1}for(o=0;o<n;o++)t[o]=r[o+64];return n}var ct=32,lt=24,ht=32,ft=32,pt=lt;function dt(t,e){if(t.length!==ct)throw new Error("bad key size");if(e.length!==lt)throw new Error("bad nonce size")}function gt(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function yt(t){for(var e=0;e<t.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:A,crypto_stream:E,crypto_stream_salsa20_xor:_,crypto_stream_salsa20:M,crypto_onetimeauth:T,crypto_onetimeauth_verify:R,crypto_verify_16:y,crypto_verify_32:m,crypto_secretbox:x,crypto_secretbox_open:S,crypto_scalarmult:q,crypto_scalarmult_base:z,crypto_box_beforenm:H,crypto_box_afternm:V,crypto_box:function(t,e,r,n,i,o){var s=new Uint8Array(32);return H(s,i,o),V(t,e,r,n,s)},crypto_box_open:function(t,e,r,n,i,o){var s=new Uint8Array(32);return H(s,i,o),K(t,e,r,n,s)},crypto_box_keypair:G,crypto_hash:Z,crypto_sign:st,crypto_sign_keypair:rt,crypto_sign_open:ut,crypto_secretbox_KEYBYTES:ct,crypto_secretbox_NONCEBYTES:lt,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:ht,crypto_box_SECRETKEYBYTES:ft,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:pt,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},t.randomBytes=function(t){var e=new Uint8Array(t);return n(e,t),e},t.secretbox=function(t,e,r){gt(t,e,r),dt(r,e);for(var n=new Uint8Array(32+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+32]=t[o];return x(i,n,n.length,e,r),i.subarray(16)},t.secretbox.open=function(t,e,r){gt(t,e,r),dt(r,e);for(var n=new Uint8Array(16+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+16]=t[o];return n.length<32?null:0!==S(i,n,n.length,e,r)?null:i.subarray(32)},t.secretbox.keyLength=ct,t.secretbox.nonceLength=lt,t.secretbox.overheadLength=16,t.scalarMult=function(t,e){if(gt(t,e),32!==t.length)throw new Error("bad n size");if(32!==e.length)throw new Error("bad p size");var r=new Uint8Array(32);return q(r,t,e),r},t.scalarMult.base=function(t){if(gt(t),32!==t.length)throw new Error("bad n size");var e=new Uint8Array(32);return z(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox(e,r,o)},t.box.before=function(t,e){gt(t,e),function(t,e){if(t.length!==ht)throw new Error("bad public key size");if(e.length!==ft)throw new Error("bad secret key size")}(t,e);var r=new Uint8Array(32);return H(r,t,e),r},t.box.after=t.secretbox,t.box.open=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox.open(e,r,o)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(ht),e=new Uint8Array(ft);return G(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(gt(t),t.length!==ft)throw new Error("bad secret key size");var e=new Uint8Array(ht);return z(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=ht,t.box.secretKeyLength=ft,t.box.sharedKeyLength=32,t.box.nonceLength=pt,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(gt(t,e),64!==e.length)throw new Error("bad secret key size");var r=new Uint8Array(64+t.length);return st(r,t,t.length,e),r},t.sign.open=function(t,e){if(gt(t,e),32!==e.length)throw new Error("bad public key size");var r=new Uint8Array(t.length),n=ut(r,t,t.length,e);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},t.sign.detached=function(e,r){for(var n=t.sign(e,r),i=new Uint8Array(64),o=0;o<i.length;o++)i[o]=n[o];return i},t.sign.detached.verify=function(t,e,r){if(gt(t,e,r),64!==e.length)throw new Error("bad signature size");if(32!==r.length)throw new Error("bad public key size");var n,i=new Uint8Array(64+t.length),o=new Uint8Array(64+t.length);for(n=0;n<64;n++)i[n]=e[n];for(n=0;n<t.length;n++)i[n+64]=t[n];return ut(o,i,i.length,r)>=0},t.sign.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(64);return rt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(gt(t),64!==t.length)throw new Error("bad secret key size");for(var e=new Uint8Array(32),r=0;r<e.length;r++)e[r]=t[32+r];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(gt(t),32!==t.length)throw new Error("bad seed size");for(var e=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=t[n];return rt(e,r,!0),{publicKey:e,secretKey:r}},t.sign.publicKeyLength=32,t.sign.secretKeyLength=64,t.sign.seedLength=32,t.sign.signatureLength=64,t.hash=function(t){gt(t);var e=new Uint8Array(64);return Z(e,t,t.length),e},t.hash.hashLength=64,t.verify=function(t,e){return gt(t,e),0!==t.length&&0!==e.length&&(t.length===e.length&&0===g(t,0,e,0,t.length))},t.setPRNG=function(t){n=t},function(){var e="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(e&&e.getRandomValues){t.setPRNG(function(t,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)e.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)t[n]=i[n];yt(i)})}else(e=r(583))&&e.randomBytes&&t.setPRNG(function(t,r){var n,i=e.randomBytes(r);for(n=0;n<r;n++)t[n]=i[n];yt(i)})}()}(void 0!==t&&t.exports?t.exports:self.nacl=self.nacl||{})},function(t,e){function r(t,e){"boolean"==typeof e&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=(new Date).getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(void 0===r){if(!this._cachedTimeouts)return!1;this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift()}var n=this,i=setTimeout(function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout(function(){n._operationTimeoutCb(n._attempts)},n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)},r);return this._options.unref&&i.unref(),!0},r.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},r.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},r.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(0===this._errors.length)return null;for(var t={},e=null,r=0,n=0;n<this._errors.length;n++){var i=this._errors[n],o=i.message,s=(t[o]||0)+1;t[o]=s,s>=r&&(e=i,r=s)}return e}},function(t,e,r){var n=r(585);e.operation=function(t){var r=e.timeouts(t);return new n(r,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],i=0;i<e.retries;i++)n.push(this.createTimeout(i,e));return t&&t.forever&&!n.length&&n.push(this.createTimeout(i,e)),n.sort(function(t,e){return t-e}),n},e.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,n=Math.round(r*e.minTimeout*Math.pow(e.factor,t));return n=Math.min(n,e.maxTimeout)},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var i in n=[],t)"function"==typeof t[i]&&n.push(i);for(var o=0;o<n.length;o++){var s=n[o],a=t[s];t[s]=function(n){var i=e.operation(r),o=Array.prototype.slice.call(arguments,1),s=o.pop();o.push(function(t){i.retry(t)||(t&&(arguments[0]=i.mainError()),s.apply(this,arguments))}),i.attempt(function(){n.apply(t,o)})}.bind(t,a),t[s].options=r}}},function(t,e,r){t.exports=r(586)},function(t,e,r){function n(t){var r;function n(){if(n.enabled){var t=n,i=+new Date,o=i-(r||i);t.diff=o,t.prev=r,t.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;u++;var i=e.formatters[n];if("function"==typeof i){var o=s[u];r=i.call(t,o),s.splice(u,1),u--}return r}),e.formatArgs.call(t,s),(n.log||e.log||console.log.bind(console)).apply(t,s)}}return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=function(t){var r,n=0;for(r in t)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e.colors[Math.abs(n)%e.colors.length]}(t),n.destroy=i,"function"==typeof e.init&&e.init(n),e.instances.push(n),n}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=n.debug=n.default=n).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var r;e.save(t),e.names=[],e.skips=[];var n=("string"==typeof t?t:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(t=n[r].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(r=0;r<e.instances.length;r++){var o=e.instances[r];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(251),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,r){var n=r(25),i=r(33),o=function(t,e){if(i(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{(n=r(44)(Function.call,r(257).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,r){return o(t,r),e?t.__proto__=r:n(t,r),t}}({},!1):void 0),check:o}},function(t,e,r){var n=r(19);n(n.S,"Object",{setPrototypeOf:r(589).set})},function(t,e,r){r(590),t.exports=r(11).Object.setPrototypeOf},function(t,e,r){var n=r(19);n(n.S,"Object",{create:r(99)})},function(t,e,r){r(592);var n=r(11).Object;t.exports=function(t,e){return n.create(t,e)}},function(t,e,r){"use strict";var n=r(19),i=r(134),o=r(254);n(n.S,"Promise",{try:function(t){var e=i.f(this),r=o(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},function(t,e,r){"use strict";var n=r(19),i=r(11),o=r(16),s=r(256),a=r(253);n(n.P+n.R,"Promise",{finally:function(t){var e=s(this,i.Promise||o.Promise),r="function"==typeof t;return this.then(r?function(r){return a(e,t()).then(function(){return r})}:t,r?function(r){return a(e,t()).then(function(){throw r})}:t)}})},function(t,e,r){var n=r(15)("iterator"),i=!1;try{var o=[7][n]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o=[7],s=o[n]();s.next=function(){return{done:r=!0}},o[n]=function(){return s},t(o)}catch(t){}return r}},function(t,e,r){var n=r(16),i=r(255).set,o=n.MutationObserver||n.WebKitMutationObserver,s=n.process,a=n.Promise,u="process"==r(73)(s);t.exports=function(){var t,e,r,c=function(){var n,i;for(u&&(n=s.domain)&&n.exit();t;){i=t.fn,t=t.next;try{i()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(u)r=function(){s.nextTick(c)};else if(!o||n.navigator&&n.navigator.standalone)if(a&&a.resolve){var l=a.resolve();r=function(){l.then(c)}}else r=function(){i.call(n,c)};else{var h=!0,f=document.createTextNode("");new o(c).observe(f,{characterData:!0}),r=function(){f.data=h=!h}}return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}},function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},function(t,e,r){var n=r(136),i=r(15)("iterator"),o=r(75);t.exports=r(11).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){var n=r(75),i=r(15)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[i]===t)}},function(t,e,r){var n=r(33);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&n(o.call(t)),e}}},function(t,e,r){"use strict";var n,i,o,s,a=r(101),u=r(16),c=r(44),l=r(136),h=r(19),f=r(25),p=r(76),d=r(135),g=r(71),y=r(256),m=r(255).set,b=r(597)(),v=r(134),w=r(254),_=r(253),M=u.TypeError,E=u.process,A=u.Promise,B="process"==l(E),T=function(){},R=i=v.f,x=!!function(){try{var t=A.resolve(1),e=(t.constructor={})[r(15)("species")]=function(t){t(T,T)};return(B||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e}catch(t){}}(),S=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},k=function(t,e){if(!t._n){t._n=!0;var r=t._c;b(function(){for(var n=t._v,i=1==t._s,o=0,s=function(e){var r,o,s,a=i?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{a?(i||(2==t._h&&j(t),t._h=1),!0===a?r=n:(l&&l.enter(),r=a(n),l&&(l.exit(),s=!0)),r===e.promise?c(M("Promise-chain cycle")):(o=S(r))?o.call(r,u,c):u(r)):c(n)}catch(t){l&&!s&&l.exit(),c(t)}};r.length>o;)s(r[o++]);t._c=[],t._n=!1,e&&!t._h&&C(t)})}},C=function(t){m.call(u,function(){var e,r,n,i=t._v,o=I(t);if(o&&(e=w(function(){B?E.emit("unhandledRejection",i,t):(r=u.onunhandledrejection)?r({promise:t,reason:i}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",i)}),t._h=B||I(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},I=function(t){return 1!==t._h&&0===(t._a||t._c).length},j=function(t){m.call(u,function(){var e;B?E.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=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()),k(e,!0))},O=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw M("Promise can't be resolved itself");(e=S(t))?b(function(){var n={_w:r,_d:!1};try{e.call(t,c(O,n,1),c(F,n,1))}catch(t){F.call(n,t)}}):(r._v=t,r._s=1,k(r,!1))}catch(t){F.call({_w:r,_d:!1},t)}}};x||(A=function(t){d(this,A,"Promise","_h"),p(t),n.call(this);try{t(c(O,this,1),c(F,this,1))}catch(t){F.call(this,t)}},(n=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=r(133)(A.prototype,{then:function(t,e){var r=R(y(this,A));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=B?E.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&k(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n;this.promise=t,this.resolve=c(O,t,1),this.reject=c(F,t,1)},v.f=R=function(t){return t===A||t===s?new o(t):i(t)}),h(h.G+h.W+h.F*!x,{Promise:A}),r(72)(A,"Promise"),r(252)("Promise"),s=r(11).Promise,h(h.S+h.F*!x,"Promise",{reject:function(t){var e=R(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(a||!x),"Promise",{resolve:function(t){return _(a&&this===s?A:this,t)}}),h(h.S+h.F*!(x&&r(596)(function(t){A.all(t).catch(T)})),"Promise",{all:function(t){var e=this,r=R(e),n=r.resolve,i=r.reject,o=w(function(){var r=[],o=0,s=1;g(t,!1,function(t){var a=o++,u=!1;r.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,r[a]=t,--s||n(r))},i)}),--s||n(r)});return o.e&&i(o.v),r.promise},race:function(t){var e=this,r=R(e),n=r.reject,i=w(function(){g(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return i.e&&n(i.v),r.promise}})},function(t,e,r){r(137),r(153),r(142),r(602),r(595),r(594),t.exports=r(11).Promise},function(t,e,r){r(139)("observable")},function(t,e,r){r(139)("asyncIterator")},function(t,e,r){var n=r(59),i=r(258).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return s.slice()}}(t):i(n(t))}},function(t,e,r){var n=r(74),i=r(138),o=r(96);t.exports=function(t){var e=n(t),r=i.f;if(r)for(var s,a=r(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,r){r(260),r(137),r(605),r(604),t.exports=r(11).Symbol},function(t,e){t.exports=function(){}},function(t,e,r){"use strict";var n=r(609),i=r(261),o=r(75),s=r(59);t.exports=r(150)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(t,e,r){var n=r(52),i=r(97),o=r(145)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),n(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,r){var n=r(152),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=n(t))<0?i(t+e,0):o(t,e)}},function(t,e,r){var n=r(59),i=r(146),o=r(612);t.exports=function(t){return function(e,r,s){var a,u=n(e),c=i(u.length),l=o(s,c);if(t&&r!=r){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===r)return t||l||0;return!t&&-1}}},function(t,e,r){var n=r(34),i=r(33),o=r(74);t.exports=r(32)?Object.defineProperties:function(t,e){i(t);for(var r,s=o(e),a=s.length,u=0;a>u;)n.f(t,r=s[u++],e[r]);return t}},function(t,e,r){"use strict";var n=r(99),i=r(100),o=r(72),s={};r(43)(s,r(15)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(s,{next:i(1,r)}),o(t,e+" Iterator")}},function(t,e,r){var n=r(152),i=r(151);t.exports=function(t){return function(e,r){var o,s,a=String(i(e)),u=n(r),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u))<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536}}},function(t,e,r){r(153),r(142),t.exports=r(141).f("iterator")},function(t,e,r){var n=r(11),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return i.stringify.apply(i,arguments)}},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*g}},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],s=r[1],a=new o(function(t,e,r){return 3*(e+r)/4-r}(0,n,s)),u=0,l=s>0?n-4:n,h=0;h<l;h+=4)e=i[t.charCodeAt(h)]<<18|i[t.charCodeAt(h+1)]<<12|i[t.charCodeAt(h+2)]<<6|i[t.charCodeAt(h+3)],a[u++]=e>>16&255,a[u++]=e>>8&255,a[u++]=255&e;2===s&&(e=i[t.charCodeAt(h)]<<2|i[t.charCodeAt(h+1)]>>4,a[u++]=255&e);1===s&&(e=i[t.charCodeAt(h)]<<10|i[t.charCodeAt(h+1)]<<4|i[t.charCodeAt(h+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e);return a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(l(t,s,s+16383>a?a:s+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,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)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 l(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var i=r(102);e.Client=i.Client,e.ClientEvent=i.ClientEvent;var o=r(56);e.Contract=o.Contract;var s=r(499);e.EvmContract=s.EvmContract;var a=r(40);e.Address=a.Address,e.LocalAddress=a.LocalAddress;var u=r(64);e.unmarshalBigUIntPB=u.unmarshalBigUIntPB,e.marshalBigUIntPB=u.marshalBigUIntPB;var c=r(214);e.SignedTxMiddleware=c.SignedTxMiddleware,e.NonceTxMiddleware=c.NonceTxMiddleware;var l=r(213);e.createDefaultTxMiddleware=l.createDefaultTxMiddleware;var h=r(495);e.LoomProvider=h.LoomProvider;var f=n(r(479));e.Contracts=f;var p=n(r(23));e.CryptoUtils=p;var d=r(304);e.createJSONRPCClient=d.createJSONRPCClient;var g=r(278);e.DAppChainPlasmaClient=g.DAppChainPlasmaClient;var y=r(276);e.EthereumPlasmaClient=y.EthereumPlasmaClient,e.PlasmaCoinState=y.PlasmaCoinState,e.marshalDepositEvent=y.marshalDepositEvent,e.marshalChallengeEvent=y.marshalChallengeEvent;var m=r(77);e.PlasmaCashTx=m.PlasmaCashTx;var b=r(85);e.Web3Signer=b.Web3Signer,e.soliditySha3=b.soliditySha3;var v=r(274);e.EthErc721Contract=v.EthErc721Contract;var w=r(273);e.Entity=w.Entity;var _=r(272);e.SparseMerkleTree=_.SparseMerkleTree}])});
\No newline at end of file