-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathde4167cde1d84d609446.worker.js
43 lines (40 loc) · 344 KB
/
de4167cde1d84d609446.worker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var r=e.slice(1),n=t[e[0]];return function(t,e,i){n.apply(this,[t,e,i].concat(r))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,r){"use strict";var n=r(96),i=n.key;onmessage=function(t){try{console.log("AddressIndexWorker start");var e=t.data,r=e.pubkeys,n=e.address_prefix,o=[],s=!0,a=!1,f=void 0;try{for(var u,c=r[Symbol.iterator]();!(s=(u=c.next()).done);s=!0){var h=u.value;o.push(i.addresses(h,n))}}catch(t){a=!0,f=t}finally{try{!s&&c.return&&c.return()}finally{if(a)throw f}}postMessage(o),console.log("AddressIndexWorker done")}catch(t){console.error("AddressIndexWorker",t)}}},function(t,e,r){(function(t,n){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/
"use strict";function i(){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}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,r){if(o()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return a(this,e,r,n)}function a(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?p(t,e,r,n):"string"==typeof e?h(t,e,r):d(t,e)}function f(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 u(t,e,r,n){return f(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}function c(e,r){if(f(r),e=s(e,r<0?0:0|_(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function h(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|y(r,n);e=s(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=e.length<0?0:0|_(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|_(r.length);return e=s(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||G(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&Q(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function v(e){return+e!=e&&(e=0),t.alloc(+e)}function y(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(e).length;default:if(i)return K(e).length;r=(""+r).toLowerCase(),i=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return j(this,e,r);case"latin1":case"binary":return L(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:w(e,r,n,i,o);if("number"==typeof r)return r&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):w(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,f=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,f/=2,r/=2}var u;if(i){var c=-1;for(u=r;u<a;u++)if(o(t,u)===o(e,c===-1?0:u-c)){if(c===-1&&(c=u),u-c+1===f)return c*s}else c!==-1&&(u-=u-c),c=-1}else for(r+f>a&&(r=a-f),u=r;u>=0;u--){for(var h=!0,l=0;l<f;l++)if(o(t,u+l)!==o(e,l)){h=!1;break}if(h)return u}return-1}function E(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),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 S(t,e,r,n){return J(K(e,t.length-r),t,r,n)}function B(t,e,r,n){return J(W(e),t,r,n)}function k(t,e,r,n){return B(t,e,r,n)}function I(t,e,r,n){return J(Z(e),t,r,n)}function x(t,e,r,n){return J(Y(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?X.fromByteArray(t):X.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=r){var f,u,c,h;switch(a){case 1:o<128&&(s=o);break;case 2:f=t[i+1],128===(192&f)&&(h=(31&o)<<6|63&f,h>127&&(s=h));break;case 3:f=t[i+1],u=t[i+2],128===(192&f)&&128===(192&u)&&(h=(15&o)<<12|(63&f)<<6|63&u,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:f=t[i+1],u=t[i+2],c=t[i+3],128===(192&f)&&128===(192&u)&&128===(192&c)&&(h=(15&o)<<18|(63&f)<<12|(63&u)<<6|63&c,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return O(n)}function O(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function j(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 L(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 R(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+=V(t[o]);return i}function D(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 z(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 M(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function q(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 U(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 C(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 N(t,e,r,n,i){return i||C(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return i||C(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(t,e,r,n,52,8),r+8}function F(t){if(t=H(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function V(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if(r=t.charCodeAt(s),r>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=(i-55296<<10|r-56320)+65536}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){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function Y(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}function Z(t){return X.toByteArray(F(t))}function J(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}function G(t){return t!==t}var X=r(53),$=r(103),Q=r(55);e.Buffer=t,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return a(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return u(null,t,e,r)},t.allocUnsafe=function(t){return c(null,t)},t.allocUnsafeSlow=function(t){return c(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,s=Math.min(n,i);o<s;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.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}},t.concat=function(e,r){if(!Q(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},t.byteLength=y,t.prototype._isBuffer=!0,t.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)b(this,e,e+1);return this},t.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)b(this,e,e+3),b(this,e+1,e+2);return this},t.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)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):g.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.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+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=n-r,f=Math.min(s,a),u=this.slice(i,o),c=e.slice(r,n),h=0;h<f;++h)if(u[h]!==c[h]){s=u[h],a=c[h];break}return s<a?-1:a<s?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},t.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 E(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":return B(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return I(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+e]}return i},t.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||z(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||z(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||z(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||z(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||z(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||z(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||z(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||z(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||z(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||z(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||z(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||z(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||z(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||z(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||z(t,4,this.length),$.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||z(t,4,this.length),$.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||z(t,8,this.length),$.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||z(t,8,this.length),$.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;M(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s<r&&(o*=256);)this[e+s]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;M(this,t,e,r,i,0)}var o=r-1,s=1;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):q(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):q(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):U(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(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},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(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},t.prototype.writeInt8=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):q(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):q(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):U(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r|=0,n||M(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&n<r&&r<i)for(o=s-1;o>=0;--o)e[o+r]=this[o+n];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),r);return s},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s<n;++s)this[s]=e;else{var a=t.isBuffer(e)?e:K(new t(e,i).toString()),f=a.length;for(s=0;s<n-r;++s)this[s+r]=a[s%f]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(1).Buffer,function(){return this}())},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){(function(e){"use strict";/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/
function 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)}function o(t){return Object.prototype.toString.call(t)}function s(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))))}function a(t){if(m.isFunction(t)){if(S)return t.name;var e=t.toString(),r=e.match(k);return r&&r[1]}}function f(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function u(t){if(S||!m.isFunction(t))return m.inspect(t);var e=a(t),r=e?": "+e:"";return"[Function"+r+"]"}function c(t){return f(u(t.actual),128)+" "+t.operator+" "+f(u(t.expected),128)}function h(t,e,r,n,i){throw new B.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function l(t,e){t||h(t,!0,e,"==",B.ok)}function p(t,e,r,a){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(m.isDate(t)&&m.isDate(e))return t.getTime()===e.getTime();if(m.isRegExp(t)&&m.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(s(t)&&s(e)&&o(t)===o(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;a=a||{actual:[],expected:[]};var f=a.actual.indexOf(t);return f!==-1&&f===a.expected.indexOf(e)||(a.actual.push(t),a.expected.push(e),_(t,e,r,a))}return r?t===e:t==e}function d(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(m.isPrimitive(t)||m.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=d(t),o=d(e);if(i&&!o||!i&&o)return!1;if(i)return t=E.call(t),e=E.call(e),p(t,e,r);var s,a,f=I(t),u=I(e);if(f.length!==u.length)return!1;for(f.sort(),u.sort(),a=f.length-1;a>=0;a--)if(f[a]!==u[a])return!1;for(a=f.length-1;a>=0;a--)if(s=f[a],!p(t[s],e[s],r,n))return!1;return!0}function v(t,e,r){p(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",v)}function y(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)&&e.call({},t)===!0}function g(t){var e;try{t()}catch(t){e=t}return e}function b(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=g(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var o="string"==typeof n,s=!t&&m.isError(i),a=!t&&i&&!r;if((s&&o&&y(i,r)||a)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!y(i,r)||!t&&i)throw i}var m=r(121),w=Object.prototype.hasOwnProperty,E=Array.prototype.slice,S=function(){return"foo"===function(){}.name}(),B=t.exports=l,k=/\s*function\s+([^\(\s]*)\s*/;B.AssertionError=function(t){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=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=a(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},m.inherits(B.AssertionError,Error),B.fail=h,B.ok=l,B.equal=function(t,e,r){t!=e&&h(t,e,r,"==",B.equal)},B.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",B.notEqual)},B.deepEqual=function(t,e,r){p(t,e,!1)||h(t,e,r,"deepEqual",B.deepEqual)},B.deepStrictEqual=function(t,e,r){p(t,e,!0)||h(t,e,r,"deepStrictEqual",B.deepStrictEqual)},B.notDeepEqual=function(t,e,r){p(t,e,!1)&&h(t,e,r,"notDeepEqual",B.notDeepEqual)},B.notDeepStrictEqual=v,B.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",B.strictEqual)},B.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",B.notStrictEqual)},B.throws=function(t,e,r){b(!0,t,e,r)},B.doesNotThrow=function(t,e,r){b(!1,t,e,r)},B.ifError=function(t){if(t)throw t};var I=Object.keys||function(t){var e=[];for(var r in t)w.call(t,r)&&e.push(r);return e}}).call(e,function(){return this}())},function(t,e,r){var n=r(26);r(54),t.exports=n},function(t,e,r){!function(r,n){t.exports=e=n()}(this,function(){var t=t||function(t,e){var r=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),n={},i=n.lib={},o=i.Base=function(){return{extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=i.WordArray=o.extend({init:function(t,r){t=this.words=t||[],r!=e?this.sigBytes=r:this.sigBytes=4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var o=0;o<i;o+=4)e[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,n=[],i=function(e){var e=e,r=987654321,n=4294967295;return function(){r=36969*(65535&r)+(r>>16)&n,e=18e3*(65535&e)+(e>>16)&n;var i=(r<<16)+e&n;return i/=4294967296,i+=.5,i*(t.random()>.5?1:-1)}},o=0;o<e;o+=4){var a=i(4294967296*(r||t.random()));r=987654071*a(),n.push(4294967296*a()|0)}return new s.init(n,e)}}),a=n.enc={},f=a.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new s.init(r,e/2)}},u=a.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new s.init(r,e)}},c=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},h=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,a=4*o,f=i/a;f=e?t.ceil(f):t.max((0|f)-this._minBufferSize,0);var u=f*o,c=t.min(4*u,i);if(u){for(var h=0;h<u;h+=o)this._doProcessBlock(n,h);var l=n.splice(0,u);r.sigBytes-=c}return new s.init(l,c)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),l=(i.Hasher=h.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new l.HMAC.init(t,r).finalize(e)}}}),n.algo={});return n}(Math);return t})},function(t,e,r){"use strict";function n(t,e){return f("sha1").update(t).digest(e)}function i(t,e){return f("sha256").update(t).digest(e)}function o(t,e){return f("sha512").update(t).digest(e)}function s(t,e){return u("sha256",e).update(t).digest()}function a(t){return f("rmd160").update(t).digest()}var f=r(27),u=r(59);t.exports={sha1:n,sha256:i,sha512:o,HmacSHA256:s,ripemd160:a}},function(t,e,r){"use strict";var n=r(100),i=r(42);t.exports={Apis:n,ChainConfig:i}},function(t,e,r){(function(e){function n(t){return this instanceof n?(f.call(this,t),u.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||e.nextTick(this.end.bind(this))}function o(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}t.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=r(13);a.inherits=r(2);var f=r(45),u=r(24);a.inherits(n,f),o(s(u.prototype),function(t){n.prototype[t]||(n.prototype[t]=u.prototype[t])})}).call(e,r(9))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){_&&p&&(_=!1,p.length?d=p.concat(d):v=-1,d.length&&a())}function a(){if(!_){var t=i(s);_=!0;for(var e=d.length;e;){for(p=d,d=[];++v<e;)p&&p[v].run();v=-1,e=d.length}p=null,_=!1,o(t)}}function f(t,e){this.fun=t,this.array=e}function u(){}var c,h,l=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(t){c=r}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var p,d=[],_=!1,v=-1;l.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];d.push(new f(t,e)),1!==d.length||_||i(a)},f.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=u,l.addListener=u,l.once=u,l.off=u,l.removeListener=u,l.removeAllListeners=u,l.emit=u,l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(t,e,r){(function(e){function r(t,r){this._block=new e(t),this._finalSize=r,this._blockSize=t,this._len=0,this._s=0}r.prototype.update=function(t,r){"string"==typeof t&&(r=r||"utf8",t=new e(t,r));for(var n=this._len+=t.length,i=this._s||0,o=0,s=this._block;i<n;){for(var a=Math.min(t.length,o+this._blockSize-i%this._blockSize),f=a-o,u=0;u<f;u++)s[i%this._blockSize+u]=t[u+o];i+=f,o+=f,i%this._blockSize===0&&this._update(s)}return this._s=i,this},r.prototype.digest=function(t){var e=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),e%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var r=this._update(this._block)||this._hash();return t?r.toString(t):r},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r}).call(e,r(1).Buffer)},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(31).EventEmitter,o=r(2);o(n,i),n.Readable=r(110),n.Writable=r(112),n.Duplex=r(108),n.Transform=r(111),n.PassThrough=r(109),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){c||(c=!0,t.end())}function s(){c||(c=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(f(),0===i.listenerCount(this,"error"))throw t}function f(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",f),u.removeListener("close",f),t.removeListener("close",f)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",s));var c=!1;return u.on("error",a),t.on("error",a),u.on("end",f),u.on("close",f),t.on("close",f),t.emit("pipe",u),t}},function(t,e,r){var n,i,o;(function(t){/**
* @license bytebuffer.js (c) 2015 Daniel Wirtz <[email protected]>
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/bytebuffer.js for details
*/
!function(s,a){r(49).amd?(i=[r(43)],n=a,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))):"object"==typeof t&&t&&t.exports?t.exports=function(){var t;try{t=r(43)}catch(t){}return a(t)}():(s.dcodeIO=s.dcodeIO||{}).ByteBuffer=a(s.dcodeIO.Long)}(this,function(t){"use strict";function e(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function r(){var t=[],e=[];return function(){return 0===arguments.length?e.join("")+f.apply(String,t):(t.length+arguments.length>1024&&(e.push(f.apply(String,t)),t.length=0),void Array.prototype.push.apply(t,arguments))}}function n(t,e,r,n,i){var o,s,a=8*i-n-1,f=(1<<a)-1,u=f>>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===o)o=1-u;else{if(o===f)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)}function i(t,e,r,n,i,o){var s,a,f,u=8*o-i-1,c=(1<<u)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,_=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=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-s))<1&&(s--,f*=2),e+=s+h>=1?l/f:l*Math.pow(2,1-h),e*f>=2&&(s++,f/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*f-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,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-d]|=128*_}var o=function(t,e,r){if("undefined"==typeof t&&(t=o.DEFAULT_CAPACITY),"undefined"==typeof e&&(e=o.DEFAULT_ENDIAN),"undefined"==typeof r&&(r=o.DEFAULT_NOASSERT),!r){if(t|=0,t<0)throw RangeError("Illegal capacity");e=!!e,r=!!r}this.buffer=0===t?a:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=e,this.noAssert=r};o.VERSION="5.0.1",o.LITTLE_ENDIAN=!0,o.BIG_ENDIAN=!1,o.DEFAULT_CAPACITY=16,o.DEFAULT_ENDIAN=o.BIG_ENDIAN,o.DEFAULT_NOASSERT=!1,o.Long=t||null;var s=o.prototype;s.__isByteBuffer__,Object.defineProperty(s,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var a=new ArrayBuffer(0),f=String.fromCharCode;o.accessor=function(){return Uint8Array},o.allocate=function(t,e,r){return new o(t,e,r)},o.concat=function(t,e,r,n){"boolean"!=typeof e&&"string"==typeof e||(n=r,r=e,e=void 0);for(var i,s=0,a=0,f=t.length;a<f;++a)o.isByteBuffer(t[a])||(t[a]=o.wrap(t[a],e)),i=t[a].limit-t[a].offset,i>0&&(s+=i);if(0===s)return new o(0,r,n);var u,c=new o(s,r,n);for(a=0;a<f;)u=t[a++],i=u.limit-u.offset,i<=0||(c.view.set(u.view.subarray(u.offset,u.limit),c.offset),c.offset+=i);return c.limit=c.offset,c.offset=0,c},o.isByteBuffer=function(t){return(t&&t.__isByteBuffer__)===!0},o.type=function(){return ArrayBuffer},o.wrap=function(t,e,r,n){if("string"!=typeof e&&(n=r,r=e,e=void 0),"string"==typeof t)switch("undefined"==typeof e&&(e="utf8"),e){case"base64":return o.fromBase64(t,r);case"hex":return o.fromHex(t,r);case"binary":return o.fromBinary(t,r);case"utf8":return o.fromUTF8(t,r);case"debug":return o.fromDebug(t,r);default:throw Error("Unsupported encoding: "+e)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var i;if(o.isByteBuffer(t))return i=s.clone.call(t),i.markedOffset=-1,i;if(t instanceof Uint8Array)i=new o(0,r,n),t.length>0&&(i.buffer=t.buffer,i.offset=t.byteOffset,i.limit=t.byteOffset+t.byteLength,i.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)i=new o(0,r,n),t.byteLength>0&&(i.buffer=t,i.offset=0,i.limit=t.byteLength,i.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");i=new o(t.length,r,n),i.limit=t.length;for(var a=0;a<t.length;++a)i.view[a]=t[a]}return i},s.writeBitSet=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e,o=t.length,s=o>>3,a=0;for(e+=this.writeVarint32(o,e);s--;)n=1&!!t[a++]|(1&!!t[a++])<<1|(1&!!t[a++])<<2|(1&!!t[a++])<<3|(1&!!t[a++])<<4|(1&!!t[a++])<<5|(1&!!t[a++])<<6|(1&!!t[a++])<<7,this.writeByte(n,e++);if(a<o){var f=0;for(n=0;a<o;)n|=(1&!!t[a++])<<f++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},s.readBitSet=function(t){var e="undefined"==typeof t;e&&(t=this.offset);var r,n=this.readVarint32(t),i=n.value,o=i>>3,s=0,a=[];for(t+=n.length;o--;)r=this.readByte(t++),a[s++]=!!(1&r),a[s++]=!!(2&r),a[s++]=!!(4&r),a[s++]=!!(8&r),a[s++]=!!(16&r),a[s++]=!!(32&r),a[s++]=!!(64&r),a[s++]=!!(128&r);if(s<i){var f=0;for(r=this.readByte(t++);s<i;)a[s++]=!!(r>>f++&1)}return e&&(this.offset=t),a},s.readBytes=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var n=this.slice(e,e+t);return r&&(this.offset+=t),n},s.writeBytes=s.append,s.writeInt8=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},s.writeByte=s.writeInt8,s.readInt8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return 128===(128&r)&&(r=-(255-r+1)),e&&(this.offset+=1),r},s.readByte=s.readInt8,s.writeUint8=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},s.writeUInt8=s.writeUint8,s.readUint8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return e&&(this.offset+=1),r},s.readUInt8=s.readUint8,s.writeInt16=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},s.writeShort=s.writeInt16,s.readInt16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),32768===(32768&r)&&(r=-(65535-r+1)),e&&(this.offset+=2),r},s.readShort=s.readInt16,s.writeUint16=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},s.writeUInt16=s.writeUint16,s.readUint16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),e&&(this.offset+=2),r},s.readUInt16=s.readUint16,s.writeInt32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},s.writeInt=s.writeInt32,s.readInt32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),r|=0,e&&(this.offset+=4),r},s.readInt=s.readInt32,s.writeUint32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},s.writeUInt32=s.writeUint32,s.readUint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),e&&(this.offset+=4),r},s.readUInt32=s.readUint32,t&&(s.writeInt64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=s>>>24&255,this.view[r+2]=s>>>16&255,this.view[r+1]=s>>>8&255,this.view[r]=255&s):(this.view[r]=s>>>24&255,this.view[r+1]=s>>>16&255,this.view[r+2]=s>>>8&255,this.view[r+3]=255&s,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},s.writeLong=s.writeInt64,s.readInt64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!1);return r&&(this.offset+=8),o},s.readLong=s.readInt64,s.writeUint64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=s>>>24&255,this.view[r+2]=s>>>16&255,this.view[r+1]=s>>>8&255,this.view[r]=255&s):(this.view[r]=s>>>24&255,this.view[r+1]=s>>>16&255,this.view[r+2]=s>>>8&255,this.view[r+3]=255&s,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},s.writeUInt64=s.writeUint64,s.readUint64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!0);return r&&(this.offset+=8),o},s.readUInt64=s.readUint64),s.writeFloat32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,i(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},s.writeFloat=s.writeFloat32,s.readFloat32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},s.readFloat=s.readFloat32,s.writeFloat64=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=8,i(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},s.writeDouble=s.writeFloat64,s.readFloat64=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},s.readDouble=s.readFloat64,o.MAX_VARINT32_BYTES=5,o.calculateVarint32=function(t){return t>>>=0,t<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},o.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},o.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},s.writeVarint32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=o.calculateVarint32(t);e+=i;var s=this.buffer.byteLength;for(e>s&&this.resize((s*=2)>e?s:e),e-=i,t>>>=0;t>=128;)n=127&t|128,this.view[e++]=n,t>>>=7;return this.view[e++]=t,r?(this.offset=e,this):i},s.writeVarint32ZigZag=function(t,e){return this.writeVarint32(o.zigZagEncode32(t),e)},s.readVarint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=0,i=0;do{if(!this.noAssert&&t>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}r=this.view[t++],n<5&&(i|=(127&r)<<7*n),++n}while(0!==(128&r));return i|=0,e?(this.offset=t,i):{value:i,length:n}},s.readVarint32ZigZag=function(t){var e=this.readVarint32(t);return"object"==typeof e?e.value=o.zigZagDecode32(e.value):e=o.zigZagDecode32(e),e},t&&(o.MAX_VARINT64_BYTES=10,o.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var r=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,i=e.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==n?r<16384?r<128?1:2:r<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:i<128?9:10},o.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},o.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},s.writeVarint64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned());var i=o.calculateVarint64(e),s=e.toInt()>>>0,a=e.shiftRightUnsigned(28).toInt()>>>0,f=e.shiftRightUnsigned(56).toInt()>>>0;r+=i;var u=this.buffer.byteLength;switch(r>u&&this.resize((u*=2)>r?u:r),r-=i,i){case 10:this.view[r+9]=f>>>7&1;case 9:this.view[r+8]=9!==i?128|f:127&f;case 8:this.view[r+7]=8!==i?a>>>21|128:a>>>21&127;case 7:this.view[r+6]=7!==i?a>>>14|128:a>>>14&127;case 6:this.view[r+5]=6!==i?a>>>7|128:a>>>7&127;case 5:this.view[r+4]=5!==i?128|a:127&a;case 4:this.view[r+3]=4!==i?s>>>21|128:s>>>21&127;case 3:this.view[r+2]=3!==i?s>>>14|128:s>>>14&127;case 2:this.view[r+1]=2!==i?s>>>7|128:s>>>7&127;case 1:this.view[r]=1!==i?128|s:127&s}return n?(this.offset+=i,this):i},s.writeVarint64ZigZag=function(t,e){return this.writeVarint64(o.zigZagEncode64(t),e)},s.readVarint64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=0,o=0,s=0,a=0;if(a=this.view[e++],i=127&a,128&a&&(a=this.view[e++],i|=(127&a)<<7,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],i|=(127&a)<<14,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],i|=(127&a)<<21,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o=127&a,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o|=(127&a)<<7,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o|=(127&a)<<14,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o|=(127&a)<<21,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],s=127&a,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],s|=(127&a)<<7,128&a||this.noAssert&&"undefined"==typeof a))))))))))throw Error("Buffer overrun");var f=t.fromBits(i|o<<28,o>>>4|s<<24,!1);return r?(this.offset=e,f):{value:f,length:e-n}},s.readVarint64ZigZag=function(e){var r=this.readVarint64(e);return r&&r.value instanceof t?r.value=o.zigZagDecode64(r.value):r=o.zigZagDecode64(r),r}),s.writeCString=function(t,r){var n="undefined"==typeof r;n&&(r=this.offset);var i,o=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(i=0;i<o;++i)if(0===t.charCodeAt(i))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}o=c.calculateUTF16asUTF8(e(t))[1],r+=o+1;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=o+1,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),this.view[r++]=0,n?(this.offset=r,this):o},s.readCString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n,i=t,o=-1;return c.decodeUTF8toUTF16(function(){if(0===o)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return o=this.view[t++],0===o?null:o}.bind(this),n=r(),!0),e?(this.offset=t,n()):{string:n(),length:t-i}},s.writeIString=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=c.calculateUTF16asUTF8(e(t),this.noAssert)[1],r+=4+i;var s=this.buffer.byteLength;if(r>s&&this.resize((s*=2)>r?s:r),r-=4+i,this.littleEndian?(this.view[r+3]=i>>>24&255,this.view[r+2]=i>>>16&255,this.view[r+1]=i>>>8&255,this.view[r]=255&i):(this.view[r]=i>>>24&255,this.view[r+1]=i>>>16&255,this.view[r+2]=i>>>8&255,this.view[r+3]=255&i),r+=4,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==o+4+i)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+4+i));return n?(this.offset=r,this):r-o},s.readIString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=t,n=this.readUint32(t),i=this.readUTF8String(n,o.METRICS_BYTES,t+=4);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},o.METRICS_CHARS="c",o.METRICS_BYTES="b",s.writeUTF8String=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=c.calculateUTF16asUTF8(e(t))[1],r+=i;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=i,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),n?(this.offset=r,this):r-o},s.writeString=s.writeUTF8String,o.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(e(t))[0]},o.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(e(t))[1]},o.calculateString=o.calculateUTF8Bytes,s.readUTF8String=function(t,e,n){"number"==typeof e&&(n=e,e=void 0);var i="undefined"==typeof n;if(i&&(n=this.offset),"undefined"==typeof e&&(e=o.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var s,a=0,f=n;if(e===o.METRICS_CHARS){if(s=r(),c.decodeUTF8(function(){return a<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++a,c.UTF8toUTF16(t,s)}),a!==t)throw RangeError("Illegal range: Truncated data, "+a+" == "+t);return i?(this.offset=n,s()):{string:s(),length:n-f}}if(e===o.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var u=n+t;if(c.decodeUTF8toUTF16(function(){return n<u?this.view[n++]:null}.bind(this),s=r(),this.noAssert),n!==u)throw RangeError("Illegal range: Truncated data, "+n+" == "+u);return i?(this.offset=n,s()):{string:s(),length:n-f}}throw TypeError("Unsupported metrics: "+e)},s.readString=s.readUTF8String,s.writeVString=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,s,a=r;i=c.calculateUTF16asUTF8(e(t),this.noAssert)[1],s=o.calculateVarint32(i),r+=s+i;var f=this.buffer.byteLength;if(r>f&&this.resize((f*=2)>r?f:r),r-=s+i,r+=this.writeVarint32(i,r),c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==a+i+s)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+i+s));return n?(this.offset=r,this):r-a},s.readVString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,n=this.readVarint32(t),i=this.readUTF8String(n.value,o.METRICS_BYTES,t+=n.length);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},s.append=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;r+=i;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=i,this.view.set(t.view.subarray(t.offset,t.limit),r),t.offset+=i,n&&(this.offset+=i),this},s.appendTo=function(t,e){return t.append(this,e),this},s.assert=function(t){return this.noAssert=!t,this},s.capacity=function(){return this.buffer.byteLength},s.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},s.clone=function(t){var e=new o(0,this.littleEndian,this.noAssert);return t?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},s.compact=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var r=e-t;if(0===r)return this.buffer=a,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(r),i=new Uint8Array(n);return i.set(this.view.subarray(t,e)),this.buffer=n,this.view=i,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},s.copy=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(t===e)return new o(0,this.littleEndian,this.noAssert);var r=e-t,n=new o(r,this.littleEndian,this.noAssert);return n.offset=0,n.limit=r,n.markedOffset>=0&&(n.markedOffset-=t),this.copyTo(n,0,t,e),n},s.copyTo=function(t,e,r,n){var i,s;if(!this.noAssert&&!o.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(s="undefined"==typeof e)?t.offset:0|e,r=(i="undefined"==typeof r)?this.offset:0|r,n="undefined"==typeof n?this.limit:0|n,e<0||e>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+t.buffer.byteLength);if(r<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var a=n-r;return 0===a?t:(t.ensureCapacity(e+a),t.view.set(this.view.subarray(r,n),e),i&&(this.offset+=a),s&&(t.offset+=a),this)},s.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},s.fill=function(t,e,r){var n="undefined"==typeof e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),"undefined"==typeof e&&(e=this.offset),"undefined"==typeof r&&(r=this.limit),
!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(e>=r)return this;for(;e<r;)this.view[e++]=t;return n&&(this.offset=e),this},s.flip=function(){return this.limit=this.offset,this.offset=0,this},s.mark=function(t){if(t="undefined"==typeof t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},s.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},s.LE=function(t){return this.littleEndian="undefined"==typeof t||!!t,this},s.BE=function(t){return this.littleEndian="undefined"!=typeof t&&!t,this},s.prepend=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;var s=i-r;if(s>0){var a=new ArrayBuffer(this.buffer.byteLength+s),f=new Uint8Array(a);f.set(this.view.subarray(r,this.buffer.byteLength),i),this.buffer=a,this.view=f,this.offset+=s,this.markedOffset>=0&&(this.markedOffset+=s),this.limit+=s,r+=s}else{new Uint8Array(this.buffer)}return this.view.set(t.view.subarray(t.offset,t.limit),r-i),t.offset=t.limit,n&&(this.offset-=i),this},s.prependTo=function(t,e){return t.prepend(this,e),this},s.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},s.remaining=function(){return this.limit-this.offset},s.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},s.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if(t|=0,t<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),r=new Uint8Array(e);r.set(this.view),this.buffer=e,this.view=r}return this},s.reverse=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},s.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},s.slice=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r=this.clone();return r.offset=t,r.limit=e,r},s.toBuffer=function(t){var e=this.offset,r=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal limit: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(!t&&0===e&&r===this.buffer.byteLength)return this.buffer;if(e===r)return a;var n=new ArrayBuffer(r-e);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(e,r),0),n},s.toArrayBuffer=s.toBuffer,s.toString=function(t,e,r){if("undefined"==typeof t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(t="utf8",e=t,r=e),t){case"utf8":return this.toUTF8(e,r);case"base64":return this.toBase64(e,r);case"hex":return this.toHex(e,r);case"binary":return this.toBinary(e,r);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var u=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],r=[],n=0,i=e.length;n<i;++n)r[e[n]]=n;return t.encode=function(t,r){for(var n,i;null!==(n=t());)r(e[n>>2&63]),i=(3&n)<<4,null!==(n=t())?(i|=n>>4&15,r(e[63&(i|n>>4&15)]),i=(15&n)<<2,null!==(n=t())?(r(e[63&(i|n>>6&3)]),r(e[63&n])):(r(e[63&i]),r(61))):(r(e[63&i]),r(61),r(61))},t.decode=function(t,e){function n(t){throw Error("Illegal character code: "+t)}for(var i,o,s;null!==(i=t());)if(o=r[i],"undefined"==typeof o&&n(i),null!==(i=t())&&(s=r[i],"undefined"==typeof s&&n(i),e(o<<2>>>0|(48&s)>>4),null!==(i=t()))){if(o=r[i],"undefined"==typeof o){if(61===i)break;n(i)}if(e((15&s)<<4>>>0|(60&o)>>2),null!==(i=t())){if(s=r[i],"undefined"==typeof s){if(61===i)break;n(i)}e((3&o)<<6>>>0|s)}}},t.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)},t}();s.toBase64=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity||t>e)throw RangeError("begin, end");var n;return u.encode(function(){return t<e?this.view[t++]:null}.bind(this),n=r()),n()},o.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new o(t.length/4*3,r),i=0;return u.decode(e(t),function(t){n.view[i++]=t}),n.limit=i,n},o.btoa=function(t){return o.fromBinary(t).toBase64()},o.atob=function(t){return o.fromBase64(t).toBinary()},s.toBinary=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var r=[],n=[];t<e;)r.push(this.view[t++]),r.length>=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},o.fromBinary=function(t,e){if("string"!=typeof t)throw TypeError("str");for(var r,n=0,i=t.length,s=new o(i,e);n<i;){if(r=t.charCodeAt(n),r>255)throw RangeError("illegal char code: "+r);s.view[n++]=r}return s.limit=i,s},s.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",s="";r<n;){if(r!==-1&&(e=this.view[r],i+=e<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(o+=e>32&&e<127?String.fromCharCode(e):".")),++r,t&&r>0&&r%16===0&&r!==n){for(;i.length<51;)i+=" ";s+=i+o+"\n",i=o=""}i+=r===this.offset&&r===this.limit?r===this.markedOffset?"!":"|":r===this.offset?r===this.markedOffset?"[":"<":r===this.limit?r===this.markedOffset?"]":">":r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return t?s:i},o.fromDebug=function(t,e,r){for(var n,i,s=t.length,a=new o((s+1)/3|0,e,r),f=0,u=0,c=!1,h=!1,l=!1,p=!1,d=!1;f<s;){switch(n=t.charAt(f++)){case"!":if(!r){if(h||l||p){d=!0;break}h=l=p=!0}a.offset=a.markedOffset=a.limit=u,c=!1;break;case"|":if(!r){if(h||p){d=!0;break}h=p=!0}a.offset=a.limit=u,c=!1;break;case"[":if(!r){if(h||l){d=!0;break}h=l=!0}a.offset=a.markedOffset=u,c=!1;break;case"<":if(!r){if(h){d=!0;break}h=!0}a.offset=u,c=!1;break;case"]":if(!r){if(p||l){d=!0;break}p=l=!0}a.limit=a.markedOffset=u,c=!1;break;case">":if(!r){if(p){d=!0;break}p=!0}a.limit=u,c=!1;break;case"'":if(!r){if(l){d=!0;break}l=!0}a.markedOffset=u,c=!1;break;case" ":c=!1;break;default:if(!r&&c){d=!0;break}if(i=parseInt(n+t.charAt(f++),16),!r&&(isNaN(i)||i<0||i>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[u++]=i,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+f)}if(!r){if(!h||!p)throw TypeError("Illegal str: Missing offset or limit");if(u<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+u+" < "+s)}return a},s.toHex=function(t,e){if(t="undefined"==typeof t?this.offset:t,e="undefined"==typeof e?this.limit:e,!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var r,n=new Array(e-t);t<e;)r=this.view[t++],r<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},o.fromHex=function(t,e,r){if(!r){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!==0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,i=t.length,s=new o(i/2|0,e),a=0,f=0;a<i;a+=2){if(n=parseInt(t.substring(a,a+2),16),!r&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");s.view[f++]=n}return s.limit=f,s};var c=function(){var t={};return t.MAX_CODEPOINT=1114111,t.encodeUTF8=function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<128?e(127&r):r<2048?(e(r>>6&31|192),e(63&r|128)):r<65536?(e(r>>12&15|224),e(r>>6&63|128),e(63&r|128)):(e(r>>18&7|240),e(r>>12&63|128),e(r>>6&63|128),e(63&r|128)),r=null},t.decodeUTF8=function(t,e){for(var r,n,i,o,s=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(r=t());)if(0===(128&r))e(r);else if(192===(224&r))null===(n=t())&&s([r,n]),e((31&r)<<6|63&n);else if(224===(240&r))(null===(n=t())||null===(i=t()))&&s([r,n,i]),e((15&r)<<12|(63&n)<<6|63&i);else{if(240!==(248&r))throw RangeError("Illegal starting byte: "+r);(null===(n=t())||null===(i=t())||null===(o=t()))&&s([r,n,i,o]),e((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o)}},t.UTF16toUTF8=function(t,e){for(var r,n=null;;){if(null===(r=null!==n?n:t()))break;r>=55296&&r<=57343&&null!==(n=t())&&n>=56320&&n<=57343?(e(1024*(r-55296)+n-56320+65536),n=null):e(r)}null!==n&&e(n)},t.UTF8toUTF16=function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<=65535?e(r):(r-=65536,e((r>>10)+55296),e(r%1024+56320)),r=null},t.encodeUTF16toUTF8=function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},t.decodeUTF8toUTF16=function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},t.calculateCodePoint=function(t){return t<128?1:t<2048?2:t<65536?3:4},t.calculateUTF8=function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},t.calculateUTF16asUTF8=function(e){var r=0,n=0;return t.UTF16toUTF8(e,function(t){++r,n+=t<128?1:t<2048?2:t<65536?3:4}),[r,n]},t}();return s.toUTF8=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var n;try{c.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),n=r())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return n()},o.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new o(c.calculateUTF16asUTF8(e(t),!0)[1],r,n),s=0;return c.encodeUTF16toUTF8(e(t),function(t){i.view[s++]=t}),i.limit=s,i},o})}).call(e,r(50)(t))},function(t,e,r){(function(t){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===v(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function s(t){return"number"==typeof t}function a(t){return"string"==typeof t}function f(t){return"symbol"==typeof t}function u(t){return void 0===t}function c(t){return"[object RegExp]"===v(t)}function h(t){return"object"==typeof t&&null!==t}function l(t){return"[object Date]"===v(t)}function p(t){return"[object Error]"===v(t)||t instanceof Error}function d(t){return"function"==typeof t}function _(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function v(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=n,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=s,e.isString=a,e.isSymbol=f,e.isUndefined=u,e.isRegExp=c,e.isObject=h,e.isDate=l,e.isError=p,e.isFunction=d,e.isPrimitive=_,e.isBuffer=t.isBuffer}).call(e,r(1).Buffer)},function(t,e){"use strict";var r={};r.reserved_spaces={relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},r.object_type={null:0,base:1,account:2,asset:3,force_settlement:4,committee_member:5,witness:6,limit_order:7,call_order:8,custom:9,proposal:10,operation_history:11,withdraw_permission:12,vesting_balance:13,worker:14,balance:15},r.impl_object_type={global_property:0,dynamic_global_property:1,index_meta:2,asset_dynamic_data:3,asset_bitasset_data:4,account_balance:5,account_statistics:6,transaction:7,block_summary:8,account_transaction_history:9,blinded_balance:10,chain_property:11,witness_schedule:12,budget_record:13},r.vote_type={committee:0,witness:1,worker:2},r.operations={transfer:0,limit_order_create:1,limit_order_cancel:2,call_order_update:3,fill_order:4,account_create:5,account_update:6,account_whitelist:7,account_upgrade:8,account_transfer:9,asset_create:10,asset_update:11,asset_update_bitasset:12,asset_update_feed_producers:13,asset_issue:14,asset_reserve:15,asset_fund_fee_pool:16,asset_settle:17,asset_global_settle:18,asset_publish_feed:19,witness_create:20,witness_update:21,proposal_create:22,proposal_update:23,proposal_delete:24,withdraw_permission_create:25,withdraw_permission_update:26,withdraw_permission_claim:27,withdraw_permission_delete:28,committee_member_create:29,committee_member_update:30,committee_member_update_global_parameters:31,vesting_balance_create:32,vesting_balance_withdraw:33,worker_create:34,custom:35,assert:36,balance_claim:37,override_transfer:38,transfer_to_blind:39,blind_transfer:40,transfer_from_blind:41,asset_settle_cancel:42,asset_claim_fees:43},t.exports=r},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(4),s=r(16),a=s.Point,f=s.getCurveByName,u=f("secp256k1"),c=r(18),h=c.encode,l=c.decode,p=r(6),d=r(7),_=d.ChainConfig,v=r(3),y=r(19),g=u.G,b=u.n,m=function(){function t(e){n(this,t),this.Q=e}return i(t,[{key:"toBuffer",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.Q?this.Q.compressed:null:arguments[0];return null===this.Q?new e("000000000000000000000000000000000000000000000000000000000000000000","hex"):this.Q.getEncoded(t)}},{key:"toUncompressed",value:function(){var e=this.Q.getEncoded(!1),r=a.decodeFrom(u,e);return t.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var t=this.toBuffer(),e=p.sha512(t);return p.ripemd160(e)}},{key:"toString",value:function(){var t=arguments.length<=0||void 0===arguments[0]?_.address_prefix:arguments[0];return this.toPublicKeyString(t)}},{key:"toPublicKeyString",value:function(){var t=arguments.length<=0||void 0===arguments[0]?_.address_prefix:arguments[0],r=this.toBuffer(),n=p.ripemd160(r),i=e.concat([r,n.slice(0,4)]);return t+h(i)}},{key:"toAddressString",value:function(){var t=arguments.length<=0||void 0===arguments[0]?_.address_prefix:arguments[0],r=this.toBuffer(),n=p.sha512(r),i=p.ripemd160(n),o=p.ripemd160(i);return i=e.concat([i,o.slice(0,4)]),t+h(i)}},{key:"toPtsAddy",value:function(){var t=this.toBuffer(),r=p.sha256(t),n=p.ripemd160(r);n=e.concat([new e([56]),n]);var i=p.sha256(n);return i=p.sha256(i),n=e.concat([n,i.slice(0,4)]),h(n)}},{key:"child",value:function(r){v(e.isBuffer(r),"Buffer required: offset"),v.equal(r.length,32,"offset length"),r=e.concat([this.toBuffer(),r]),r=p.sha256(r);var n=o.fromBuffer(r);if(n.compareTo(b)>=0)throw new Error("Child offset went out of bounds, try again");var i=g.multiply(n),s=this.Q.add(i);if(u.isInfinity(s))throw new Error("Child offset derived to an invalid key, try again");return t.fromPoint(s)}},{key:"toByteBuffer",value:function(){var t=new ByteBuffer(ByteBuffer.DEFAULT_CAPACITY,ByteBuffer.LITTLE_ENDIAN);return this.appendByteBuffer(t),t.copy(0,t.offset)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBinary",value:function(r){return t.fromBuffer(new e(r,"binary"))}},{key:"fromBuffer",value:function(e){return new t("000000000000000000000000000000000000000000000000000000000000000000"===e.toString("hex")?null:a.decodeFrom(u,e))}},{key:"fromPoint",value:function(e){return new t(e)}},{key:"fromPublicKeyString",value:function(e){var r=arguments.length<=1||void 0===arguments[1]?_.address_prefix:arguments[1];try{return t.fromStringOrThrow(e,r)}catch(t){return null}}},{key:"fromStringOrThrow",value:function(r){var n=arguments.length<=1||void 0===arguments[1]?_.address_prefix:arguments[1],i=r.slice(0,n.length);v.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),r=r.slice(n.length),r=new e(l(r),"binary");var o=r.slice(-4);r=r.slice(0,-4);var s=p.ripemd160(r);s=s.slice(0,4);var a=y(o,s);if(!a)throw new Error("Checksum did not match");return t.fromBuffer(r)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"fromPublicKeyStringHex",value:function(r){return t.fromPublicKeyString(new e(r,"hex"))}}]),t}();t.exports=m}).call(e,r(1).Buffer)},function(t,e,r){var n=r(30),i=r(29),o=r(70);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){"use strict";t.exports={Address:r(36),Aes:r(37),PrivateKey:r(20),PublicKey:r(15),Signature:r(95),brainKey:r(92),hash:r(6),key:r(35)}},function(t,e,r){var n=r(52),i="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",o=n(i);t.exports={encode:o.encode,decode:o.decode}},function(t,e,r){function n(t){return null===t||void 0===t}function i(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}function o(t,e,r){var o,c;if(n(t)||n(e))return!1;if(t.prototype!==e.prototype)return!1;if(f(t))return!!f(e)&&(t=s.call(t),e=s.call(e),u(t,e,r));if(i(t)){if(!i(e))return!1;if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}try{var h=a(t),l=a(e)}catch(t){return!1}if(h.length!=l.length)return!1;for(h.sort(),l.sort(),o=h.length-1;o>=0;o--)if(h[o]!=l[o])return!1;for(o=h.length-1;o>=0;o--)if(c=h[o],!u(t[c],e[c],r))return!1;return typeof t==typeof e}var s=Array.prototype.slice,a=r(69),f=r(68),u=t.exports=function(t,e,r){return r||(r={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?t===e:t==e:o(t,e,r))}},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=(r(16),r(16)),s=o.Point,a=o.getCurveByName,f=a("secp256k1"),u=r(4),c=r(18),h=c.encode,l=c.decode,p=r(3),d=r(6),_=r(15),v=r(19),y=(f.G,f.n),g=function(){function t(e){n(this,t),this.d=e}return i(t,[{key:"toWif",value:function(){var t=this.toBuffer();t=e.concat([new e([128]),t]);var r=d.sha256(t);r=d.sha256(r),r=r.slice(0,4);var n=e.concat([t,r]);return h(n)}},{key:"toPublicKeyPoint",value:function(){var t;return t=f.G.multiply(this.d)}},{key:"toPublicKey",value:function(){return this.public_key?this.public_key:this.public_key=_.fromPoint(this.toPublicKeyPoint())}},{key:"toBuffer",value:function(){return this.d.toBuffer(32)}},{key:"get_shared_secret",value:function(t){var r=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];t=b(t);var n=t.toUncompressed().toBuffer(),i=s.fromAffine(f,u.fromBuffer(n.slice(1,33)),u.fromBuffer(n.slice(33,65))),o=this.toBuffer(),a=i.multiply(u.fromBuffer(o)),c=a.affineX.toBuffer({size:32});return!r&&c.length<32&&(pad=new e(32-c.length).fill(0),c=e.concat([pad,c])),d.sha512(c)}},{key:"child",value:function(r){r=e.concat([this.toPublicKey().toBuffer(),r]),r=d.sha256(r);var n=u.fromBuffer(r);if(n.compareTo(y)>=0)throw new Error("Child offset went out of bounds, try again");var i=this.d.add(n);if(0===i.signum())throw new Error("Child offset derived to an invalid key, try again");return new t(i)}},{key:"toByteBuffer",value:function(){var t=new ByteBuffer(ByteBuffer.DEFAULT_CAPACITY,ByteBuffer.LITTLE_ENDIAN);return this.appendByteBuffer(t),t.copy(0,t.offset)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBuffer",value:function(r){if(!e.isBuffer(r))throw new Error("Expecting paramter to be a Buffer type");if(32!==r.length&&console.log("WARN: Expecting 32 bytes, instead got "+r.length+", stack trace:",(new Error).stack),0===r.length)throw new Error("Empty buffer");return new t(u.fromBuffer(r))}},{key:"fromSeed",value:function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(d.sha256(e))}},{key:"fromWif",value:function(r){var n=new e(l(r)),i=n.readUInt8(0);p.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),s=n.slice(-4),a=d.sha256(o);a=d.sha256(a),a=a.slice(0,4);var f=v(s,a);if(!f)throw new Error("Checksum did not match");return o=o.slice(1),t.fromBuffer(o)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}}]),t}();t.exports=g;var b=function(t){return null==t?t:t.Q?t:_.fromStringOrThrow(t)}}).call(e,r(1).Buffer)},function(t,e,r){"use strict";t.exports={Serializer:r(40),fp:r(39),types:r(41),ops:r(98),template:r(99),SerializerValidation:r(22)}},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?"symbol":typeof t},i=r(12),o=i.Long,s=r(14),a=9007199254740991,f=-9007199254740991,u={is_empty:function(t){return null===t||void 0===t},required:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))throw new Error("value required "+e+" "+t);return t},require_long:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(!o.isLong(t))throw new Error("Long value required "+e+" "+t);return t},string:function(t){if(this.is_empty(t))return t;if("string"!=typeof t)throw new Error("string required: "+t);return t},number:function(t){if(this.is_empty(t))return t;if("number"!=typeof t)throw new Error("number required: "+t);return t},whole_number:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))return t;if(/\./.test(t))throw new Error("whole number required "+e+" "+t);return t},unsigned:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))return t;if(/-/.test(t))throw new Error("unsigned required "+e+" "+t);return t},is_digits:function(t){return"numeric"==typeof t||/^[0-9]+$/.test(t)},to_number:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))return t;this.no_overflow53(t,e);var r=function(){return"number"==typeof t?t:parseInt(t)}();return r},to_long:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];return this.is_empty(t)?t:o.isLong(t)?t:(this.no_overflow64(t,e),"number"==typeof t&&(t=""+t),o.fromString(t))},to_string:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))return t;if("string"==typeof t)return t;if("number"==typeof t)return this.no_overflow53(t,e),""+t;if(o.isLong(t))return t.toString();throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":n(t))+") "+t},require_test:function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"":arguments[2];if(this.is_empty(e))return e;if(!t.test(e))throw new Error("unmatched "+t+" "+r+" "+e);return e},require_match:function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"":arguments[2];if(this.is_empty(e))return e;var n=e.match(t);if(null===n)throw new Error("unmatched "+t+" "+r+" "+e);return n},require_object_id:function(t,e){return require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,t,e)},require_range:function(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?"":arguments[3];if(this.is_empty(r))return r;this.to_number(r);if(r<t||r>e)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:function(){var t=arguments.length<=0||void 0===arguments[0]?1:arguments[0],e=arguments[1],r=arguments[2],n=arguments.length<=3||void 0===arguments[3]?"":arguments[3];if(this.is_empty(r))return r;var i=s.object_type[e];if(!i)throw new Error("Unknown object type "+e+" "+n+" "+r);var o=new RegExp(t+"."+i+".[0-9]+$");if(!o.test(r))throw new Error("Expecting "+e+" in format "+(t+"."+i+".[0-9]+ ")+("instead of "+r+" "+n+" "+r));return r},get_instance:function(t,e,r,n){return this.is_empty(r)?r:(this.require_object_type(t,e,r,n),this.to_number(r.split(".")[2]))},require_relative_type:function(t,e,r){return this.require_object_type(0,t,e,r),e},get_relative_instance:function(t,e,r){return this.is_empty(e)?e:(this.require_object_type(0,t,e,r),this.to_number(e.split(".")[2]))},require_protocol_type:function(t,e,r){return this.require_object_type(1,t,e,r),e},get_protocol_instance:function(t,e,r){return this.is_empty(e)?e:(this.require_object_type(1,t,e,r),this.to_number(e.split(".")[2]))},get_protocol_type:function(t,e){if(this.is_empty(t))return t;this.require_object_id(t,e);var r=t.split(".");return this.to_number(r[1])},get_protocol_type_name:function(t,e){if(this.is_empty(t))return t;var r=this.get_protocol_type(t,e);return Object.keys(s.object_type)[r]},require_implementation_type:function(t,e,r){return this.require_object_type(2,t,e,r),e},get_implementation_instance:function(t,e,r){return this.is_empty(e)?e:(this.require_object_type(2,t,e,r),this.to_number(e.split(".")[2]))},no_overflow53:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if("number"!=typeof t){if("string"!=typeof t){if(o.isLong(t))return void this.no_overflow53(t.toInt(),e);throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":n(t))+") "+t}parseInt(t);if(t>a||t<f)throw new Error("overflow "+e+" "+t)}else if(t>a||t<f)throw new Error("overflow "+e+" "+t)},no_overflow64:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(!o.isLong(t)){if(void 0!==t.t&&void 0!==t.s)return void this.no_overflow64(t.toString(),e);if("string"!=typeof t){if("number"!=typeof t)throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":n(t))+") "+t;if(t>a||t<f)throw new Error("overflow "+e+" "+t)}else{for(t=t.replace(/^0+/,"");/0$/.test(t);)t=t.substring(0,t.length-1);/\.$/.test(t)&&(t=t.substring(0,t.length-1)),""===t&&(t="0");var r=o.fromString(t).toString();if(r!==t.trim())throw new Error("overflow "+e+" "+t)}}}};t.exports=u},function(t,e,r){function n(t,e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,f.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){f.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(8),f=r(13);f.inherits=r(2),f.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("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;f.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(8);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(8);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void S.call(this)):new o(t)}function s(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function a(t,r,n,i){var o=!0;if(!(E.isBuffer(n)||E.isString(n)||E.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),e.nextTick(function(){i(s)}),o=!1}return o}function f(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&E.isString(e)&&(e=new w(e,r)),e}function u(t,e,r,i,o){r=f(e,r,i),E.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):c(t,e,!1,s,r,i,o),a}function c(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 h(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function l(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(l(n),r)h(t,n,i,r,o);else{var s=y(t,n);s||n.corked||n.bufferProcessing||!n.buffer.length||v(t,n),
i?e.nextTick(function(){d(t,n,s,o)}):d(t,n,s,o)}}function d(t,e,r,n){r||_(t,e),e.pendingcb--,n(),b(t,e)}function _(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function v(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,c(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,f=e.objectMode?1:o.length;if(c(t,e,!1,f,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function y(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function g(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function b(t,e){var r=y(t,e);return r&&(0===e.pendingcb?(g(t,e),e.finished=!0,t.emit("finish")):g(t,e)),r}function m(t,r,n){r.ending=!0,b(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(1).Buffer;o.WritableState=i;var E=r(13);E.inherits=r(2);var S=r(11);E.inherits(o,S),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return E.isFunction(e)&&(r=e,e=null),E.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),E.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=u(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||v(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;E.isFunction(t)?(r=t,t=null,e=null):E.isFunction(e)&&(r=e,e=null),E.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||m(this,n,r)}}).call(e,r(9))},function(t,e,r){function n(t){if(t&&!f(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(1).Buffer,f=a.isEncoding||function(t){switch(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}},u=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},u.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},function(t,e,r){function n(t,e,r){return this instanceof n?void(null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))):new n(t,e,r)}function i(t,e,r,n,i,o){for(;--o>=0;){var s=e*this[t++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i}function o(t){return oe.charAt(t)}function s(t,e){var r=se[t.charCodeAt(e)];return null==r?-1:r}function a(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function f(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+ee:this.t=0}function u(t){var e=new n;return e.fromInt(t),e}function c(t,e){var r,i=this;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void i.fromRadix(t,e);r=2}i.t=0,i.s=0;for(var o=t.length,a=!1,f=0;--o>=0;){var u=8==r?255&t[o]:s(t,o);u<0?"-"==t.charAt(o)&&(a=!0):(a=!1,0==f?i[i.t++]=u:f+r>i.DB?(i[i.t-1]|=(u&(1<<i.DB-f)-1)<<f,i[i.t++]=u>>i.DB-f):i[i.t-1]|=u<<f,f+=r,f>=i.DB&&(f-=i.DB))}8==r&&0!=(128&t[0])&&(i.s=-1,f>0&&(i[i.t-1]|=(1<<i.DB-f)-1<<f)),i.clamp(),a&&n.ZERO.subTo(i,i)}function h(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function l(t){var e=this;if(e.s<0)return"-"+e.negate().toString(t);var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return e.toRadix(t);r=2}var n,i=(1<<r)-1,s=!1,a="",f=e.t,u=e.DB-f*e.DB%r;if(f-- >0)for(u<e.DB&&(n=e[f]>>u)>0&&(s=!0,a=o(n));f>=0;)u<r?(n=(e[f]&(1<<u)-1)<<r-u,n|=e[--f]>>(u+=e.DB-r)):(n=e[f]>>(u-=r)&i,u<=0&&(u+=e.DB,--f)),n>0&&(s=!0),s&&(a+=o(n));return s?a:"0"}function p(){var t=new n;return n.ZERO.subTo(this,t),t}function d(){return this.s<0?this.negate():this}function _(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(e=r-t.t,0!=e)return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0}function v(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function y(){return this.t<=0?0:this.DB*(this.t-1)+v(this[this.t-1]^this.s&this.DM)}function g(){return this.bitLength()>>3}function b(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function m(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s}function w(t,e){var r,n=this,i=t%n.DB,o=n.DB-i,s=(1<<o)-1,a=Math.floor(t/n.DB),f=n.s<<i&n.DM;for(r=n.t-1;r>=0;--r)e[r+a+1]=n[r]>>o|f,f=(n[r]&s)<<i;for(r=a-1;r>=0;--r)e[r]=0;e[a]=f,e.t=n.t+a+1,e.s=n.s,e.clamp()}function E(t,e){var r=this;e.s=r.s;var n=Math.floor(t/r.DB);if(n>=r.t)return void(e.t=0);var i=t%r.DB,o=r.DB-i,s=(1<<i)-1;e[0]=r[n]>>i;for(var a=n+1;a<r.t;++a)e[a-n-1]|=(r[a]&s)<<o,e[a-n]=r[a]>>i;i>0&&(e[r.t-n-1]|=(r.s&s)<<o),e.t=r.t-n,e.clamp()}function S(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]-t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i-=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i-=t[n],e[n++]=i&r.DM,i>>=r.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=r.DV+i:i>0&&(e[n++]=i),e.t=n,e.clamp()}function B(t,e){var r=this.abs(),i=t.abs(),o=r.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)}function k(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function I(t,e,r){var i=this,o=t.abs();if(!(o.t<=0)){var s=i.abs();if(s.t<o.t)return null!=e&&e.fromInt(0),void(null!=r&&i.copyTo(r));null==r&&(r=new n);var a=new n,f=i.s,u=t.s,c=i.DB-v(o[o.t-1]);c>0?(o.lShiftTo(c,a),s.lShiftTo(c,r)):(o.copyTo(a),s.copyTo(r));var h=a.t,l=a[h-1];if(0!=l){var p=l*(1<<i.F1)+(h>1?a[h-2]>>i.F2:0),d=i.FV/p,_=(1<<i.F1)/p,y=1<<i.F2,g=r.t,b=g-h,m=null==e?new n:e;for(a.dlShiftTo(b,m),r.compareTo(m)>=0&&(r[r.t++]=1,r.subTo(m,r)),n.ONE.dlShiftTo(h,m),m.subTo(a,a);a.t<h;)a[a.t++]=0;for(;--b>=0;){var w=r[--g]==l?i.DM:Math.floor(r[g]*d+(r[g-1]+y)*_);if((r[g]+=a.am(0,w,r,b,0,h))<w)for(a.dlShiftTo(b,m),r.subTo(m,r);r[g]<--w;)r.subTo(m,r)}null!=e&&(r.drShiftTo(h,e),f!=u&&n.ZERO.subTo(e,e)),r.t=h,r.clamp(),c>0&&r.rShiftTo(c,r),f<0&&n.ZERO.subTo(r,r)}}}function x(t){var e=new n;return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e}function T(t){this.m=t}function A(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function O(t){return t}function j(t){t.divRemTo(this.m,null,t)}function L(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function R(t,e){t.squareTo(e),this.reduce(e)}function D(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function z(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function M(t){var e=new n;return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e}function q(t){var e=new n;return t.copyTo(e),this.reduce(e),e}function U(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function C(t,e){t.squareTo(e),this.reduce(e)}function N(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function P(){return 0==(this.t>0?1&this[0]:this.s)}function F(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),s=v(t)-1;for(o.copyTo(r);--s>=0;)if(e.sqrTo(r,i),(t&1<<s)>0)e.mulTo(i,o,r);else{var a=r;r=i,i=a}return e.revert(r)}function H(t,e){var r;return r=t<256||e.isEven()?new T(e):new z(e),this.exp(t,r)}function V(){var t=new n;return this.copyTo(t),t}function K(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function W(){return 0==this.t?this.s:this[0]<<24>>24}function Y(){return 0==this.t?this.s:this[0]<<16>>16}function Z(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function J(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function G(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=u(r),o=new n,s=new n,a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a}function X(t,e){var r=this;r.fromInt(0),null==e&&(e=10);for(var i=r.chunkSize(e),o=Math.pow(e,i),a=!1,f=0,u=0,c=0;c<t.length;++c){var h=s(t,c);h<0?"-"==t.charAt(c)&&0==r.signum()&&(a=!0):(u=e*u+h,++f>=i&&(r.dMultiply(o),r.dAddOffset(u,0),f=0,u=0))}f>0&&(r.dMultiply(Math.pow(e,f)),r.dAddOffset(u,0)),a&&n.ZERO.subTo(r,r)}function $(t,e,r){var i=this;if("number"==typeof e)if(t<2)i.fromInt(1);else for(i.fromNumber(t,r),i.testBit(t-1)||i.bitwiseTo(n.ONE.shiftLeft(t-1),st,i),i.isEven()&&i.dAddOffset(1,0);!i.isProbablePrime(e);)i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(n.ONE.shiftLeft(t-1),i);else{var o=new Array,s=7&t;o.length=(t>>3)+1,e.nextBytes(o),s>0?o[0]&=(1<<s)-1:o[0]=0,i.fromString(o,256)}}function Q(){var t=this,e=t.t,r=new Array;r[0]=t.s;var n,i=t.DB-e*t.DB%8,o=0;if(e-- >0)for(i<t.DB&&(n=t[e]>>i)!=(t.s&t.DM)>>i&&(r[o++]=n|t.s<<t.DB-i);e>=0;)i<8?(n=(t[e]&(1<<i)-1)<<8-i,n|=t[--e]>>(i+=t.DB-8)):(n=t[e]>>(i-=8)&255,i<=0&&(i+=t.DB,--e)),0!=(128&n)&&(n|=-256),0===o&&(128&t.s)!=(128&n)&&++o,(o>0||n!=t.s)&&(r[o++]=n);return r}function tt(t){return 0==this.compareTo(t)}function et(t){return this.compareTo(t)<0?this:t}function rt(t){return this.compareTo(t)>0?this:t}function nt(t,e,r){var n,i,o=this,s=Math.min(t.t,o.t);for(n=0;n<s;++n)r[n]=e(o[n],t[n]);if(t.t<o.t){for(i=t.s&o.DM,n=s;n<o.t;++n)r[n]=e(o[n],i);r.t=o.t}else{for(i=o.s&o.DM,n=s;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(o.s,t.s),r.clamp()}function it(t,e){return t&e}function ot(t){var e=new n;return this.bitwiseTo(t,it,e),e}function st(t,e){return t|e}function at(t){var e=new n;return this.bitwiseTo(t,st,e),e}function ft(t,e){return t^e}function ut(t){var e=new n;return this.bitwiseTo(t,ft,e),e}function ct(t,e){return t&~e}function ht(t){var e=new n;return this.bitwiseTo(t,ct,e),e}function lt(){for(var t=new n,e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t}function pt(t){var e=new n;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e}function dt(t){var e=new n;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e}function _t(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function vt(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+_t(this[t]);return this.s<0?this.t*this.DB:-1}function yt(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function gt(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=yt(this[r]^e);return t}function bt(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)}function mt(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r}function wt(t){return this.changeBit(t,st)}function Et(t){return this.changeBit(t,ct)}function St(t){return this.changeBit(t,ft)}function Bt(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]+t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i+=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i+=t[n],e[n++]=i&r.DM,i>>=r.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[n++]=i:i<-1&&(e[n++]=r.DV+i),e.t=n,e.clamp()}function kt(t){var e=new n;return this.addTo(t,e),e}function It(t){var e=new n;return this.subTo(t,e),e}function xt(t){var e=new n;return this.multiplyTo(t,e),e}function Tt(){var t=new n;return this.squareTo(t),t}function At(t){var e=new n;return this.divRemTo(t,e,null),e}function Ot(t){var e=new n;return this.divRemTo(t,null,e),e}function jt(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)}function Lt(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Rt(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function Dt(){}function zt(t){return t}function Mt(t,e,r){t.multiplyTo(e,r)}function qt(t,e){t.squareTo(e)}function Ut(t){return this.exp(t,new Dt)}function Ct(t,e,r){var n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r[--n]=0;var i;for(i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,t[n],r,n,0,this.t);for(i=Math.min(t.t,e);n<i;++n)this.am(0,t[n],r,n,0,e-n);r.clamp()}function Nt(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)}function Pt(t){this.r2=new n,this.q3=new n,n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function Ft(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=new n;return t.copyTo(e),this.reduce(e),e}function Ht(t){return t}function Vt(t){var e=this;for(t.drShiftTo(e.m.t-1,e.r2),t.t>e.m.t+1&&(t.t=e.m.t+1,t.clamp()),e.mu.multiplyUpperTo(e.r2,e.m.t+1,e.q3),e.m.multiplyLowerTo(e.q3,e.m.t+1,e.r2);t.compareTo(e.r2)<0;)t.dAddOffset(1,e.m.t+1);for(t.subTo(e.r2,t);t.compareTo(e.m)>=0;)t.subTo(e.m,t)}function Kt(t,e){t.squareTo(e),this.reduce(e)}function Wt(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function Yt(t,e){var r,i,o=t.bitLength(),s=u(1);if(o<=0)return s;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new T(e):e.isEven()?new Pt(e):new z(e);var a=new Array,f=3,c=r-1,h=(1<<r)-1;if(a[1]=i.convert(this),r>1){var l=new n;for(i.sqrTo(a[1],l);f<=h;)a[f]=new n,i.mulTo(l,a[f-2],a[f]),f+=2}var p,d,_=t.t-1,y=!0,g=new n;for(o=v(t[_])-1;_>=0;){for(o>=c?p=t[_]>>o-c&h:(p=(t[_]&(1<<o+1)-1)<<c-o,_>0&&(p|=t[_-1]>>this.DB+o-c)),f=r;0==(1&p);)p>>=1,--f;if((o-=f)<0&&(o+=this.DB,--_),y)a[p].copyTo(s),y=!1;else{for(;f>1;)i.sqrTo(s,g),i.sqrTo(g,s),f-=2;f>0?i.sqrTo(s,g):(d=s,s=g,g=d),i.mulTo(g,a[p],s)}for(;_>=0&&0==(t[_]&1<<o);)i.sqrTo(s,g),d=s,s=g,g=d,--o<0&&(o=this.DB-1,--_)}return i.revert(s)}function Zt(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}function Jt(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r}function Gt(t){var e=t.isEven();if(0===this.signum())throw new Error("division by zero");if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),o=u(1),s=u(0),a=u(0),f=u(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&f.isEven()||(a.addTo(this,a),f.subTo(t,f)),a.rShiftTo(1,a)):f.isEven()||f.subTo(t,f),f.rShiftTo(1,f);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(a,o),s.subTo(f,s)):(i.subTo(r,i),e&&a.subTo(o,a),f.subTo(s,f))}if(0!=i.compareTo(n.ONE))return n.ZERO;for(;f.compareTo(t)>=0;)f.subTo(t,f);for(;f.signum()<0;)f.addTo(t,f);return f}function Xt(t){var e,r=this.abs();if(1==r.t&&r[0]<=ae[ae.length-1]){for(e=0;e<ae.length;++e)if(r[0]==ae[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<ae.length;){for(var n=ae[e],i=e+1;i<ae.length&&n<fe;)n*=ae[i++];for(n=r.modInt(n);e<i;)if(n%ae[e++]==0)return!1}return r.millerRabin(t)}function $t(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);t=t+1>>1,t>ae.length&&(t=ae.length);for(var o,s=new n(null),a=[],f=0;f<t;++f){for(;o=ae[Math.floor(Math.random()*ae.length)],a.indexOf(o)!=-1;);a.push(o),s.fromInt(o);var u=s.modPow(i,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var o=1;o++<r&&0!=u.compareTo(e);)if(u=u.modPowInt(2,this),0==u.compareTo(n.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0}var Qt=n.prototype;Qt.__bigi=r(106).version,n.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===Qt.__bigi)};var te;n.prototype.am=i,te=26,n.prototype.DB=te,n.prototype.DM=(1<<te)-1;var ee=n.prototype.DV=1<<te,re=52;n.prototype.FV=Math.pow(2,re),n.prototype.F1=re-te,n.prototype.F2=2*te-re;var ne,ie,oe="0123456789abcdefghijklmnopqrstuvwxyz",se=new Array;for(ne="0".charCodeAt(0),ie=0;ie<=9;++ie)se[ne++]=ie;for(ne="a".charCodeAt(0),ie=10;ie<36;++ie)se[ne++]=ie;for(ne="A".charCodeAt(0),ie=10;ie<36;++ie)se[ne++]=ie;T.prototype.convert=A,T.prototype.revert=O,T.prototype.reduce=j,T.prototype.mulTo=L,T.prototype.sqrTo=R,z.prototype.convert=M,z.prototype.revert=q,z.prototype.reduce=U,z.prototype.mulTo=N,z.prototype.sqrTo=C,Qt.copyTo=a,Qt.fromInt=f,Qt.fromString=c,Qt.clamp=h,Qt.dlShiftTo=b,Qt.drShiftTo=m,Qt.lShiftTo=w,Qt.rShiftTo=E,Qt.subTo=S,Qt.multiplyTo=B,Qt.squareTo=k,Qt.divRemTo=I,Qt.invDigit=D,Qt.isEven=P,Qt.exp=F,Qt.toString=l,Qt.negate=p,Qt.abs=d,Qt.compareTo=_,Qt.bitLength=y,Qt.byteLength=g,Qt.mod=x,Qt.modPowInt=H,Dt.prototype.convert=zt,Dt.prototype.revert=zt,Dt.prototype.mulTo=Mt,Dt.prototype.sqrTo=qt,Pt.prototype.convert=Ft,Pt.prototype.revert=Ht,Pt.prototype.reduce=Vt,Pt.prototype.mulTo=Wt,Pt.prototype.sqrTo=Kt;var ae=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],fe=(1<<26)/ae[ae.length-1];Qt.chunkSize=Z,Qt.toRadix=G,Qt.fromRadix=X,Qt.fromNumber=$,Qt.bitwiseTo=nt,Qt.changeBit=mt,Qt.addTo=Bt,Qt.dMultiply=Lt,Qt.dAddOffset=Rt,Qt.multiplyLowerTo=Ct,Qt.multiplyUpperTo=Nt,Qt.modInt=Jt,Qt.millerRabin=$t,Qt.clone=V,Qt.intValue=K,Qt.byteValue=W,Qt.shortValue=Y,Qt.signum=J,Qt.toByteArray=Q,Qt.equals=tt,Qt.min=et,Qt.max=rt,Qt.and=ot,Qt.or=at,Qt.xor=ut,Qt.andNot=ht,Qt.not=lt,Qt.shiftLeft=pt,Qt.shiftRight=dt,Qt.getLowestSetBit=vt,Qt.bitCount=gt,Qt.testBit=bt,Qt.setBit=wt,Qt.clearBit=Et,Qt.flipBit=St,Qt.add=kt,Qt.subtract=It,Qt.multiply=xt,Qt.divide=At,Qt.remainder=Ot,Qt.divideAndRemainder=jt,Qt.modPow=Yt,Qt.modInverse=Gt,Qt.pow=Ut,Qt.gcd=Zt,Qt.isProbablePrime=Xt,Qt.square=Tt,n.ZERO=u(0),n.ONE=u(1),n.valueOf=u,t.exports=n},function(t,e,r){(function(e){"use strict";function n(t){u.call(this,"digest"),this._hash=t,this.buffers=[]}function i(t){u.call(this,"digest"),this._hash=t}var o=r(2),s=r(58),a=r(113),f=r(114),u=r(56);o(n,u),n.prototype._update=function(t){this.buffers.push(t)},n.prototype._final=function(){var t=e.concat(this.buffers),r=this._hash(t);return this.buffers=null,r},o(i,u),i.prototype._update=function(t){this._hash.update(t)},i.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return t=t.toLowerCase(),"md5"===t?new n(s):"rmd160"===t||"ripemd160"===t?new n(a):new i(f(t))}}).call(e,r(1).Buffer)},function(t,e,r){!function(n,i){t.exports=e=i(r(5))}(this,function(t){return function(){function e(t,e,r){for(var n=[],o=0,s=0;s<e;s++)if(s%4){var a=r[t.charCodeAt(s-1)]<<s%4*2,f=r[t.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=(a|f)<<24-o%4*8,o++}return i.create(n,o)}var r=t,n=r.lib,i=n.WordArray,o=r.enc;o.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var i=[],o=0;o<r;o+=3)for(var s=e[o>>>2]>>>24-o%4*8&255,a=e[o+1>>>2]>>>24-(o+1)%4*8&255,f=e[o+2>>>2]>>>24-(o+2)%4*8&255,u=s<<16|a<<8|f,c=0;c<4&&o+.75*c<r;c++)i.push(n.charAt(u>>>6*(3-c)&63));var h=n.charAt(64);if(h)for(;i.length%4;)i.push(h);return i.join("")},parse:function(t){var r=t.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=t.indexOf(s);a!==-1&&(r=a)}return e(t,r,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64})},function(t,e,r){function n(t,e,r,n,i,a,f){this.p=t,this.a=e,this.b=r,this.G=s.fromAffine(this,n,i),this.n=a,this.h=f,this.infinity=new s(this,null,null,o.ZERO),this.pOverFour=t.add(o.ONE).shiftRight(2)}var i=r(3),o=r(4),s=r(30);n.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p),n=r.modPow(this.pOverFour,this.p),i=n;return n.isEven()^!t&&(i=this.p.subtract(i)),s.fromAffine(this,e,i)},n.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},n.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,r=t.affineY,n=this.a,i=this.b,o=this.p;if(e.signum()<0||e.compareTo(o)>=0)return!1;if(r.signum()<0||r.compareTo(o)>=0)return!1;var s=r.square().mod(o),a=e.pow(3).add(n.multiply(e)).add(i).mod(o);return s.equals(a)},n.prototype.validate=function(t){i(!this.isInfinity(t),"Point is at infinity"),i(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return i(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=n},function(t,e,r){(function(e){function n(t,e,r,n){i.notStrictEqual(n,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=n,this._zInv=null,this.compressed=!0}var i=r(3),o=r(4),s=o.valueOf(3);Object.defineProperty(n.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(n.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(n.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),n.fromAffine=function(t,e,r){return new n(t,e,r,o.ONE)},n.prototype.equals=function(t){if(t===this)return!0;if(this.curve.isInfinity(this))return this.curve.isInfinity(t);if(this.curve.isInfinity(t))return this.curve.isInfinity(this);var e=t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p);if(0!==e.signum())return!1;var r=t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p);return 0===r.signum()},n.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new n(this.curve,this.x,t,this.z)},n.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,i=t.x,o=t.y,a=o.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),f=i.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===f.signum())return 0===a.signum()?this.twice():this.curve.infinity;var u=f.square(),c=u.multiply(f),h=e.multiply(u),l=a.square().multiply(this.z),p=l.subtract(h.shiftLeft(1)).multiply(t.z).subtract(c).multiply(f).mod(this.curve.p),d=h.multiply(s).multiply(a).subtract(r.multiply(c)).subtract(l.multiply(a)).multiply(t.z).add(a.multiply(c)).mod(this.curve.p),_=c.multiply(this.z).multiply(t.z).mod(this.curve.p);return new n(this.curve,p,d,_)},n.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z).mod(this.curve.p),i=r.multiply(e).mod(this.curve.p),o=this.curve.a,a=t.square().multiply(s);0!==o.signum()&&(a=a.add(this.z.square().multiply(o))),a=a.mod(this.curve.p);var f=a.square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.p),u=a.multiply(s).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(a.pow(3)).mod(this.curve.p),c=r.pow(3).shiftLeft(3).mod(this.curve.p);return new n(this.curve,f,u,c)},n.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.signum())return this.curve.infinity;for(var e=t,r=e.multiply(s),n=this.negate(),i=this,o=r.bitLength()-2;o>0;--o){var a=r.testBit(o),f=e.testBit(o);i=i.twice(),a!==f&&(i=i.add(a?this:n))}return i},n.prototype.multiplyTwo=function(t,e,r){for(var n=Math.max(t.bitLength(),r.bitLength())-1,i=this.curve.infinity,o=this.add(e);n>=0;){var s=t.testBit(n),a=r.testBit(n);i=i.twice(),s?i=a?i.add(o):i.add(this):a&&(i=i.add(e)),--n}return i},n.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return new e("00","hex");var r,n=this.affineX,i=this.affineY,o=Math.floor((this.curve.p.bitLength()+7)/8);return t?(r=new e(1+o),r.writeUInt8(i.isEven()?2:3,0)):(r=new e(1+o+o),r.writeUInt8(4,0),i.toBuffer(o).copy(r,1+o)),n.toBuffer(o).copy(r,1),r},n.decodeFrom=function(t,e){var r,s=e.readUInt8(0),a=4!==s,f=Math.floor((t.p.bitLength()+7)/8),u=o.fromBuffer(e.slice(1,1+f));if(a){i.equal(e.length,f+1,"Invalid sequence length"),i(2===s||3===s,"Invalid sequence tag");var c=3===s;r=t.pointFromX(c,u)}else{i.equal(e.length,1+f+f,"Invalid sequence length");var h=o.fromBuffer(e.slice(1+f));r=n.fromAffine(t,u,h)}return r.compressed=a,r},n.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=n}).call(e,r(1).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"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(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(!i(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,i,a,f,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(r=this._events[t],s(r))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(o(r))for(a=Array.prototype.slice.call(arguments,1),u=r.slice(),i=u.length,f=0;f<i;f++)u[f].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;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]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(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){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,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(r=this._events[t],n(r))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){var e;return e=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){"use strict";var r=/\b\d+\.\d+\.(\d+)\b/,n={is_account_name:function(t){var e,r,n,i,o,s=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if(this.is_empty(t))return!1;if(i=t.length,!s&&i<3||i>63)return!1;for(o=t.split("."),e=0,n=o.length;e<n;e++)if(r=o[e],!/^[a-z][a-z0-9-]*$/.test(r)||/--/.test(r)||!/[a-z0-9]$/.test(r))return!1;return!0},is_object_id:function(t){if("string"!=typeof t)return!1;var e=r.exec(t);return null!==e&&3===t.split(".").length},is_empty:function(t){return null==t||0===t.length},is_account_name_error:function(t,e){
var r,n,i,o,s,a;if(null==e&&(e=!1),a="Account name should ",this.is_empty(t))return a+"not be empty.";if(o=t.length,!e&&o<3)return a+"be longer.";if(o>63)return a+"be shorter.";for(/\./.test(t)&&(a="Each account segment should "),s=t.split("."),r=0,i=s.length;r<i;r++){if(n=s[r],!/^[~a-z]/.test(n))return a+"start with a letter.";if(!/^[~a-z0-9-]*$/.test(n))return a+"have only letters, digits, or dashes.";if(/--/.test(n))return a+"have only one dash in a row.";if(!/[a-z0-9]$/.test(n))return a+"end with a letter or digit.";if(!(n.length>=3))return a+"be longer"}return null},is_cheap_name:function(t){return/[0-9-]/.test(t)||!/[aeiouy]/.test(t)},is_empty_user_input:function(t){return!!this.is_empty(t)||""===(t+"").trim()},required:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))throw new Error("value required for "+e+": "+t);return t},is_valid_symbol_error:function(t){var e="Asset name should ";return this.is_empty(t)?e+"not be empty.":t.split(".").length>2?e+"have only one dot.":t.length<3?e+"be longer.":t.length>16?e+"be shorter.":/^[A-Z]/.test(t)?/[A-Z]$/.test(t)?/^[A-Z0-9\.]$/.test(t)?e+"contain only letters numbers and perhaps a dot.":null:e+"end with a letter":e+"start with a letter"}};t.exports=n},function(t,e,r){"use strict";var n,i=r(84);t.exports={emitter:function(){return n||(n=i({})),n}}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(12),s=o.Long,a=r(22),f=s.fromNumber(Math.pow(2,48)-1),u=function(){function t(e,r,i){n(this,t),this.space=e,this.type=r,this.instance=i;var o=this.instance.toString(),s=this.space+"."+this.type+"."+o;if(!a.is_digits(o))throw new("Invalid object id "+s)}return i(t,[{key:"toLong",value:function(){return s.fromNumber(this.space).shiftLeft(56).or(s.fromNumber(this.type).shiftLeft(48).or(this.instance))}},{key:"appendByteBuffer",value:function(t){return t.writeUint64(this.toLong())}},{key:"toString",value:function(){return this.space+"."+this.type+"."+this.instance.toString()}}],[{key:"fromString",value:function(e){if(void 0!==e.space&&void 0!==e.type&&void 0!==e.instance)return e;var r=a.require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,a.required(e,"ObjectId"),"ObjectId");return new t(parseInt(r[1]),parseInt(r[2]),s.fromString(r[3]))}},{key:"fromLong",value:function(e){var r=e.shiftRight(56).toInt(),n=255&e.shiftRight(48).toInt(),i=e.and(f);return new t(r,n,i)}},{key:"fromByteBuffer",value:function(e){return t.fromLong(e.readUint64())}}]),t}();t.exports=u},function(t,e,r){(function(e){"use strict";var n,i=function(){function t(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}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=r(20),s=r(15),a=r(36),f=r(37),u=r(6),c=r(46),h=r(7),l=h.ChainConfig,p=250;t.exports=n={aes_checksum:function(t){if("string"!=typeof t)throw new"password string required";for(var e=c.randomBuffer(4).toString("hex"),r=0,n=e+t,i=Date.now();Date.now()-i<p;)n=u.sha256(n),r+=1;var o=u.sha256(n),s=[r,e.toString("hex"),o.slice(0,4).toString("hex")].join(",");return{aes_private:f.fromSeed(n),checksum:s}},aes_private:function(t,e){for(var r=e.split(","),n=i(r,3),o=n[0],s=n[1],a=n[2],c=s+t,h=0;0<o?h<o:h>o;0<o?h++:h++)c=u.sha256(c);var l=u.sha256(c);if(l.slice(0,4).toString("hex")!==a)throw new Error("wrong password");return f.fromSeed(c)},random32ByteBuffer:function(){var t=arguments.length<=0||void 0===arguments[0]?this.browserEntropy():arguments[0];if("string"!=typeof t)throw new Error("string required for entropy");if(t.length<32)throw new Error("expecting at least 32 bytes of entropy");for(var r=Date.now();Date.now()-r<p;)t=u.sha256(t);var n=[];return n.push(t),n.push(c.randomBuffer(32)),u.sha256(e.concat(n))},suggest_brain_key:function(){var t=arguments.length<=0||void 0===arguments[0]?",":arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.browserEntropy():arguments[1],r=this.random32ByteBuffer(e),n=16,i=t.split(",");if(49744!==i.length)throw new Error("expecting 49744 but got "+i.length+" dictionary words");for(var o=[],s=2*n,a=0;a<s;a+=2){var f=(r[a]<<8)+r[a+1],u=f/Math.pow(2,16),c=Math.round(i.length*u);o.push(i[c])}return this.normalize_brainKey(o.join(" "))},get_random_key:function(t){return o.fromBuffer(this.random32ByteBuffer(t))},get_brainPrivateKey:function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];if(e<0)throw new Error("invalid sequence");return t=n.normalize_brainKey(t),o.fromBuffer(u.sha256(u.sha512(t+" "+e)))},normalize_brainKey:function(t){if("string"!=typeof t)throw new Error("string required for brainKey");return t=t.trim(),t.split(/[\t\n\v\f\r ]+/).join(" ")},browserEntropy:function(){var t="";try{t=(new Date).toString()+" "+window.screen.height+" "+window.screen.width+" "+window.screen.colorDepth+" "+window.screen.availHeight+" "+window.screen.availWidth+" "+window.screen.pixelDepth+navigator.language+" "+window.location+" "+window.history.length;for(var r,n=0;n<navigator.mimeTypes.length;n++)r=navigator.mimeTypes[n],t+=r.description+" "+r.type+" "+r.suffixes+" ";console.log("INFO\tbrowserEntropy gathered")}catch(e){t=u.sha256((new Date).toString())}var i=new e(t);return t+=i.toString("binary")+" "+(new Date).toString()},addresses:function(t){var e=arguments.length<=1||void 0===arguments[1]?l.address_prefix:arguments[1],r=s.fromPublicKeyString(t,e),n=[a.fromPublic(r,!1,0).toString(e),a.fromPublic(r,!0,0).toString(e),a.fromPublic(r,!1,56).toString(e),a.fromPublic(r,!0,56).toString(e),r.toAddressString(e)];return n}}}).call(e,r(1).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(3),s=r(7),a=s.ChainConfig,f=r(6),u=r(18),c=u.encode,h=u.decode,l=r(19),p=function(){function t(e){n(this,t),this.addy=e}return i(t,[{key:"toBuffer",value:function(){return this.addy}},{key:"toString",value:function(){var t=arguments.length<=0||void 0===arguments[0]?a.address_prefix:arguments[0],r=f.ripemd160(this.addy),n=e.concat([this.addy,r.slice(0,4)]);return t+c(n)}}],[{key:"fromBuffer",value:function(e){var r=f.sha512(e),n=f.ripemd160(r);return new t(n)}},{key:"fromString",value:function(r){var n=arguments.length<=1||void 0===arguments[1]?a.address_prefix:arguments[1],i=r.slice(0,n.length);o.equal(n,i,"Expecting key to begin with "+n+", instead got "+i);var s=r.slice(n.length);s=new e(h(s),"binary");var u=s.slice(-4);s=s.slice(0,-4);var c=f.ripemd160(s);c=c.slice(0,4);var p=l(u,c);if(!p)throw new Error("Checksum did not match");return new t(s)}},{key:"fromPublic",value:function(r){var n=arguments.length<=1||void 0===arguments[1]||arguments[1],i=arguments.length<=2||void 0===arguments[2]?56:arguments[2],o=f.sha256(r.toBuffer(n)),s=f.ripemd160(o),a=new e(1);a.writeUInt8(255&i,0);var u=e.concat([a,s]),c=f.sha256(u);c=f.sha256(c);var h=e.concat([u,c.slice(0,4)]);return new t(f.ripemd160(h))}}]),t}();t.exports=p}).call(e,r(1).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(60),s=r(62),a=r(28),f=r(3),u=r(12),c=(u.Long,r(6)),h=function(){function t(e,r){n(this,t),this.iv=e,this.key=r}return i(t,[{key:"clear",value:function(){return this.iv=this.key=void 0}},{key:"_decrypt_word_array",value:function(t){return o.decrypt({ciphertext:t,salt:null},this.key,{iv:this.iv})}},{key:"_encrypt_word_array",value:function(t){var e=o.encrypt(t,this.key,{iv:this.iv});return a.parse(e.toString())}},{key:"decrypt",value:function(t){if("string"==typeof t&&(t=new e(t,"binary")),!e.isBuffer(t))throw new Error("buffer required");f(t,"Missing cipher text");var r=this.decryptHex(t.toString("hex"));return new e(r,"hex")}},{key:"encrypt",value:function(t){if("string"==typeof t&&(t=new e(t,"binary")),!e.isBuffer(t))throw new Error("buffer required");var r=this.encryptHex(t.toString("hex"));return new e(r,"hex")}},{key:"encryptToHex",value:function(t){if("string"==typeof t&&(t=new e(t,"binary")),!e.isBuffer(t))throw new Error("buffer required");return this.encryptHex(t.toString("hex"))}},{key:"decryptHex",value:function(t){f(t,"Missing cipher text");var e=s.parse(t),r=this._decrypt_word_array(e);return s.stringify(r)}},{key:"decryptHexToBuffer",value:function(t){f(t,"Missing cipher text");var r=s.parse(t),n=this._decrypt_word_array(r),i=s.stringify(n);return new e(i,"hex")}},{key:"decryptHexToText",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?"binary":arguments[1];return this.decryptHexToBuffer(t).toString(e)}},{key:"encryptHex",value:function(t){var e=s.parse(t),r=this._encrypt_word_array(e);return s.stringify(r)}}],[{key:"fromSeed",value:function(e){if(void 0===e)throw new Error("seed is required");var r=c.sha512(e);return r=r.toString("hex"),t.fromSha512(r)}},{key:"fromSha512",value:function(e){f.equal(e.length,128,"A Sha512 in HEX should be 128 characters long, instead got "+e.length);var r=s.parse(e.substring(64,96)),n=s.parse(e.substring(0,64));return new t(r,n)}},{key:"fromBuffer",value:function(r){return f(e.isBuffer(r),"Expecting Buffer"),f.equal(r.length,64,"A Sha512 Buffer should be 64 characters long, instead got "+r.length),t.fromSha512(r.toString("hex"))}},{key:"decrypt_with_checksum",value:function(r,n,i,o){var s=!(arguments.length<=4||void 0===arguments[4])&&arguments[4];null==i&&(i=""),e.isBuffer(o)||(o=new e(o,"hex"));var a=r.get_shared_secret(n,s),f=t.fromSeed(e.concat([new e(""+i),new e(a.toString("hex"))])),u=f.decrypt(o);if(!(u.length>=4))throw new Error("Invalid key, could not decrypt message(1)");var h=u.slice(0,4),l=u.slice(4),p=c.sha256(l);if(p=p.slice(0,4),p=p.toString("hex"),h.toString("hex")!==p)throw new Error("Invalid key, could not decrypt message(2)");return l}},{key:"encrypt_with_checksum",value:function(r,n,i,o){null==i&&(i=""),e.isBuffer(o)||(o=new e(o,"binary"));var s=r.get_shared_secret(n),a=t.fromSeed(e.concat([new e(""+i),new e(s.toString("hex"))])),f=c.sha256(o).slice(0,4),u=e.concat([f,o]);return a.encrypt(u)}}]),t}();t.exports=h}).call(e,r(1).Buffer)},function(t,e,r){(function(e){"use strict";function r(t){var e=t.toString().match(/function (.*?)\(/);return e?e[1]:null}t.exports=function(t,n){switch(t){case"Array":if(Array.isArray(n))return;break;case"Boolean":if("boolean"==typeof n)return;break;case"Buffer":if(e.isBuffer(n))return;break;case"Number":if("number"==typeof n)return;break;case"String":if("string"==typeof n)return;break;default:if(r(n.constructor)===r(t))return}throw new TypeError("Expected "+(r(t)||t)+", got "+n)}}).call(e,r(1).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(15),s=function(){function t(){n(this,t)}return i(t,null,[{key:"fixed_data",value:function(t,r,n){if(t){if(!n){var i=t.copy(t.offset,t.offset+r);return t.skip(r),new e(i.toBinary(),"binary")}var o=n.slice(0,r).toString("binary");for(t.append(o,"binary");r-- >o.length;)t.writeUint8(0)}}},{key:"public_key",value:function(e,r){if(e){if(r){var n=r.toBuffer();return void e.append(n.toString("binary"),"binary")}return n=t.fixed_data(e,33),o.fromBuffer(n)}}},{key:"ripemd160",value:function(e,r){if(e)return r?void t.fixed_data(e,20,r):t.fixed_data(e,20)}},{key:"time_point_sec",value:function(t,e){return e?(e=Math.ceil(e/1e3),void t.writeInt32(e)):(e=t.readInt32(),new Date(1e3*e))}}]),t}();t.exports=s}).call(e,r(1).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(12),s=r(97),a={NODE_ENV:"production"}.npm_config__graphene_serializer_hex_dump,f=function(){function t(e,r){n(this,t),this.operation_name=e,this.types=r,this.types&&(this.keys=Object.keys(this.types)),t.printDebug=!0}return i(t,[{key:"fromByteBuffer",value:function(e){var r={},n=null;try{for(var n,i=this.keys,o=0;o<i.length;o++){n=i[o];var f=this.types[n];try{if(a)if(f.operation_name)console.error(f.operation_name);else{var u=e.offset;f.fromByteBuffer(e);var c=e.offset;e.offset=u;var h=e.copy(u,c);console.error(this.operation_name+"."+n+"\t",h.toHex())}r[n]=f.fromByteBuffer(e)}catch(r){throw t.printDebug&&(console.error("Error reading "+this.operation_name+"."+n+" in data:"),e.printDebug()),r}}}catch(t){s.throw(this.operation_name+"."+n,t)}return r}},{key:"appendByteBuffer",value:function(t,e){var r=null;try{for(var r,n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r];o.appendByteBuffer(t,e[r])}}catch(t){try{s.throw(this.operation_name+"."+r+" = "+JSON.stringify(e[r]),t)}catch(n){s.throw(this.operation_name+"."+r+" = "+e[r],t)}}}},{key:"fromObject",value:function(t){var e={},r=null;try{for(var r,n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r],a=t[r],f=o.fromObject(a);e[r]=f}}catch(t){s.throw(this.operation_name+"."+r,t)}return e}},{key:"toObject",value:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=arguments.length<=1||void 0===arguments[1]?{use_default:!1,annotate:!1}:arguments[1],r={},n=null;try{if(!this.types)return r;for(var n,i=this.keys,f=0;f<i.length;f++){n=i[f];var u=this.types[n],c=u.toObject("undefined"!=typeof t&&null!==t?t[n]:void 0,e);if(r[n]=c,a){var h=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN);u.appendByteBuffer(h,"undefined"!=typeof t&&null!==t?t[n]:void 0),h=h.copy(0,h.offset),console.error(this.operation_name+"."+n,h.toHex())}}}catch(t){s.throw(this.operation_name+"."+n,t)}return r}},{key:"compare",value:function(t,r){var n=this.keys[0],i=this.types[n],o=t[n],s=r[n];if(i.compare)return i.compare(o,s);if("number"==typeof o&&"number"==typeof s)return o-s;var a=void 0;e.isBuffer(o)&&e.isBuffer(s)&&(a="hex");var f=o.toString(a),u=s.toString(a);return f>u?1:f<u?-1:0}},{key:"fromHex",value:function(t){var e=o.fromHex(t,o.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"fromBuffer",value:function(t){var e=o.fromBinary(t.toString("binary"),o.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"toHex",value:function(t){var e=this.toByteBuffer(t);return e.toHex()}},{key:"toByteBuffer",value:function(t){var e=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN);return this.appendByteBuffer(e,t),e.copy(0,e.offset)}},{key:"toBuffer",value:function(t){return new e(this.toByteBuffer(t).toBinary(),"binary")}}]),t}();t.exports=f}).call(e,r(1).Buffer)},function(t,e,r){(function(e){"use strict";var n=function(){function t(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}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o=r(22),s=r(39),a=r(14),f=r(34),u=r(17),c=u.PublicKey,h=u.Address,l=r(7),p=l.ChainConfig,d={};t.exports=d;var _={NODE_ENV:"production"}.npm_config__graphene_serializer_hex_dump;d.uint8={fromByteBuffer:function(t){return t.readUint8()},appendByteBuffer:function(t,e){o.require_range(0,255,e,"uint8 "+e),t.writeUint8(e)},fromObject:function(t){return o.require_range(0,255,t,"uint8 "+t),t},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?0:(o.require_range(0,255,t,"uint8 "+t),parseInt(t))}},d.uint16={fromByteBuffer:function(t){return t.readUint16()},appendByteBuffer:function(t,e){o.require_range(0,65535,e,"uint16 "+e),t.writeUint16(e)},fromObject:function(t){return o.require_range(0,65535,t,"uint16 "+t),t},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?0:(o.require_range(0,65535,t,"uint16 "+t),parseInt(t))}},d.uint32={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){o.require_range(0,4294967295,e,"uint32 "+e),t.writeUint32(e)},fromObject:function(t){return o.require_range(0,4294967295,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?0:(o.require_range(0,4294967295,t,"uint32 "+t),parseInt(t))}};var v=-1*Math.pow(2,31),y=Math.pow(2,31)-1;d.varint32={fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(t,e){o.require_range(v,y,e,"uint32 "+e),t.writeVarint32(e)},fromObject:function(t){return o.require_range(v,y,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?0:(o.require_range(v,y,t,"uint32 "+t),parseInt(t))}},d.int64={fromByteBuffer:function(t){return t.readInt64()},appendByteBuffer:function(t,e){o.required(e),t.writeInt64(o.to_long(e))},fromObject:function(t){return o.required(t),o.to_long(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"0":(o.required(t),o.to_long(t).toString())}},d.uint64={fromByteBuffer:function(t){return t.readUint64()},appendByteBuffer:function(t,e){t.writeUint64(o.to_long(o.unsigned(e)))},fromObject:function(t){return o.to_long(o.unsigned(t))},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"0":o.to_long(t).toString()}},d.string={fromByteBuffer:function(t){var r,n=t.readVarint32();return r=t.copy(t.offset,t.offset+n),t.skip(n),new e(r.toBinary(),"binary")},appendByteBuffer:function(t,e){o.required(e),t.writeVarint32(e.length),t.append(e.toString("binary"),"binary")},fromObject:function(t){return o.required(t),new e(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"":t.toString()}},d.bytes=function(t){return{fromByteBuffer:function(r){if(void 0===t){var n,i=r.readVarint32();return n=r.copy(r.offset,r.offset+i),r.skip(i),new e(n.toBinary(),"binary")}return n=r.copy(r.offset,r.offset+t),r.skip(t),new e(n.toBinary(),"binary")},appendByteBuffer:function(r,n){o.required(n),"string"==typeof n&&(n=new e(n,"hex")),void 0===t&&r.writeVarint32(n.length),r.append(n.toString("binary"),"binary")},fromObject:function(t){return o.required(t),e.isBuffer(t)?t:new e(t,"hex")},toObject:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(r.use_default&&void 0===e){var n=function(t){return new Array(t).join("00")};return n(t)}return o.required(e),e.toString("hex")}}},d.bool={fromByteBuffer:function(t){return 1===t.readUint8()},appendByteBuffer:function(t,e){t.writeUint8(JSON.parse(e)?1:0)},fromObject:function(t){return!!JSON.parse(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return(!e.use_default||void 0!==t)&&!!JSON.parse(t)}},d.void={fromByteBuffer:function(t){throw new Error("(void) undefined type")},appendByteBuffer:function(t,e){throw new Error("(void) undefined type")},fromObject:function(t){throw new Error("(void) undefined type")},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(!e.use_default||void 0!==t)throw new Error("(void) undefined type")}},d.array=function(t){return{fromByteBuffer:function(e){var r=e.readVarint32();_&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0<r?i<r:i>r;0<r?i++:i++)n.push(t.fromByteBuffer(e));return w(n,t)},appendByteBuffer:function(e,r){o.required(r),r=w(r,t),e.writeVarint32(r.length);for(var n,i=0;i<r.length;i++)n=r[i],t.appendByteBuffer(e,n)},fromObject:function(e){o.required(e),e=w(e,t);for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n},toObject:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(r.use_default&&void 0===e)return[t.toObject(e,r)];o.required(e),e=w(e,t);for(var n,i=[],s=0;s<e.length;s++)n=e[s],i.push(t.toObject(n,r));return i}}},d.time_point_sec={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){"number"!=typeof e&&(e=d.time_point_sec.fromObject(e)),t.writeUint32(e)},fromObject:function(t){if(o.required(t),"number"==typeof t)return t;if(t.getTime)return Math.floor(t.getTime()/1e3);if("string"!=typeof t)throw new Error("Unknown date type: "+t);return Math.floor(new Date(t).getTime()/1e3)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(e.use_default&&void 0===t)return new Date(0).toISOString().split(".")[0];if(o.required(t),"string"==typeof t)return t;if(t.getTime)return t.toISOString().split(".")[0];var r=parseInt(t);return o.require_range(0,4294967295,r,"uint32 "+t),new Date(1e3*r).toISOString().split(".")[0]}},d.set=function(t){return{validate:function(e){for(var r,n={},o=0;o<e.length;o++){r=e[o];var s;if(s="undefined"==typeof r?"undefined":i(r),["string","number"].indexOf(s)>=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return w(e,t)},fromByteBuffer:function(e){var r=e.readVarint32();return _&&console.log("varint32 size = "+r.toString(16)),this.validate(function(){for(var n=[],i=0;0<r?i<r:i>r;0<r?i++:i++)n.push(t.fromByteBuffer(e));return n}())},appendByteBuffer:function(e,r){r||(r=[]),e.writeVarint32(r.length);for(var n,i=this.validate(r),o=0;o<i.length;o++)n=i[o],t.appendByteBuffer(e,n)},fromObject:function(e){return e||(e=[]),this.validate(function(){for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n}())},toObject:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return r.use_default&&void 0===e?[t.toObject(e,r)]:(e||(e=[]),this.validate(function(){for(var n,i=[],o=0;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}()))}}},d.fixed_array=function(t,e){return{fromByteBuffer:function(r){var n,i,o,s;for(s=[],n=i=0,o=t;i<o;n=i+=1)s.push(e.fromByteBuffer(r));return w(s,e)},appendByteBuffer:function(r,n){var i,s,a;for(0!==t&&(o.required(n),n=w(n,e)),i=s=0,a=t;s<a;i=s+=1)e.appendByteBuffer(r,n[i])},fromObject:function(r){var n,i,s,a;for(0!==t&&o.required(r),a=[],n=i=0,s=t;i<s;n=i+=1)a.push(e.fromObject(r[n]));return a},toObject:function(r,n){var i,s,a,f,u,c,h;if(null==n&&(n={}),n.use_default&&void 0===r){for(c=[],i=s=0,f=t;s<f;i=s+=1)c.push(e.toObject(void 0,n));return c}for(0!==t&&o.required(r),h=[],i=a=0,u=t;a<u;i=a+=1)h.push(e.toObject(r[i],n));return h}}};var g=function(t,e){return o.required(t,"reserved_spaces"),o.required(e,"object_type"),{fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(r,n){o.required(n),void 0!==n.resolve&&(n=n.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(n)&&(n=o.get_instance(t,e,n)),r.writeVarint32(o.to_number(n))},fromObject:function(r){return o.required(r),void 0!==r.resolve&&(r=r.resolve),o.is_digits(r)?o.to_number(r):o.get_instance(t,e,r)},toObject:function(r){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=a.object_type[e];return n.use_default&&void 0===r?t+"."+i+".0":(o.required(r),void 0!==r.resolve&&(r=r.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(r)&&(r=o.get_instance(t,e,r)),t+"."+i+"."+r)}}};d.protocol_id_type=function(t){return o.required(t,"name"),g(a.reserved_spaces.protocol_ids,t)},d.object_id_type={fromByteBuffer:function(t){return f.fromByteBuffer(t)},appendByteBuffer:function(t,e){o.required(e),void 0!==e.resolve&&(e=e.resolve),e=f.fromString(e),e.appendByteBuffer(t)},fromObject:function(t){return o.required(t),void 0!==t.resolve&&(t=t.resolve),f.fromString(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"0.0.0":(o.required(t),void 0!==t.resolve&&(t=t.resolve),t=f.fromString(t),t.toString())}},d.vote_id={TYPE:255,ID:4294967040,fromByteBuffer:function(t){var e=t.readUint32();return{type:e&this.TYPE,id:e&this.ID}},appendByteBuffer:function(t,e){o.required(e),"string"===e&&(e=d.vote_id.fromObject(e));var r=e.id<<8|e.type;t.writeUint32(r)},fromObject:function(t){if(o.required(t,"(type vote_id)"),"object"===("undefined"==typeof t?"undefined":i(t)))return o.required(t.type,"type"),o.required(t.id,"id"),t;o.require_test(/^[0-9]+:[0-9]+$/,t,"vote_id format "+t);var e=t.split(":"),r=n(e,2),s=r[0],a=r[1];return o.require_range(0,255,s,"vote type "+t),o.require_range(0,16777215,a,"vote id "+t),{type:s,id:a}},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"0:0":(o.required(t),"string"==typeof t&&(t=d.vote_id.fromObject(t)),t.type+":"+t.id)},compare:function(t,e){return"object"!==("undefined"==typeof t?"undefined":i(t))&&(t=d.vote_id.fromObject(t)),"object"!==("undefined"==typeof e?"undefined":i(e))&&(e=d.vote_id.fromObject(e)),parseInt(t.id)-parseInt(e.id)}},d.optional=function(t){return o.required(t,"st_operation"),{fromByteBuffer:function(e){if(1===e.readUint8())return t.fromByteBuffer(e)},appendByteBuffer:function(e,r){null!==r&&void 0!==r?(e.writeUint8(1),t.appendByteBuffer(e,r)):e.writeUint8(0)},fromObject:function(e){if(void 0!==e)return t.fromObject(e)},toObject:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=function(){return r.use_default||void 0!==e?t.toObject(e,r):void 0}();return r.annotate&&("object"===("undefined"==typeof n?"undefined":i(n))?n.__optional="parent is optional":n={__optional:n}),n}}},d.static_variant=function(t){return{nosort:!0,st_operations:t,fromByteBuffer:function(t){var e=t.readVarint32(),r=this.st_operations[e];return _&&console.error("static_variant id 0x"+e.toString(16)+" ("+e+")"),o.required(r,"operation "+e),[e,r.fromByteBuffer(t)]},appendByteBuffer:function(t,e){o.required(e);var r=e[0],n=this.st_operations[r];o.required(n,"operation "+r),t.writeVarint32(r),n.appendByteBuffer(t,e[1])},fromObject:function(t){o.required(t);var e=t[0],r=this.st_operations[e];return o.required(r,"operation "+e),[e,r.fromObject(t[1])]},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(e.use_default&&void 0===t)return[0,this.st_operations[0].toObject(void 0,e)];o.required(t);var r=t[0],n=this.st_operations[r];return o.required(n,"operation "+r),[r,n.toObject(t[1],e)]}}},d.map=function(t,e){return{validate:function(e){if(!Array.isArray(e))throw new Error("expecting array");for(var r,n={},o=0;o<e.length;o++){r=e[o];var s;if(2!==r.length)throw new Error("expecting two elements");if(s=i(r[0]),["number","string"].indexOf(s)>=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return w(e,t)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0<i?o<i:o>i;0<i?o++:o++)n.push([t.fromByteBuffer(r),e.fromByteBuffer(r)]);return this.validate(n)},appendByteBuffer:function(r,n){this.validate(n),r.writeVarint32(n.length);for(var i,o=0;o<n.length;o++)i=n[o],t.appendByteBuffer(r,i[0]),e.appendByteBuffer(r,i[1])},fromObject:function(r){o.required(r);for(var n,i=[],s=0;s<r.length;s++)n=r[s],i.push([t.fromObject(n[0]),e.fromObject(n[1])]);return this.validate(i)},toObject:function(r){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(n.use_default&&void 0===r)return[[t.toObject(void 0,n),e.toObject(void 0,n)]];o.required(r),r=this.validate(r);for(var i,s=[],a=0;a<r.length;a++)i=r[a],s.push([t.toObject(i[0],n),e.toObject(i[1],n)]);return s}}},d.public_key={toPublic:function(t){return void 0!==t.resolve&&(t=t.resolve),null==t?t:t.Q?t:c.fromStringOrThrow(t)},fromByteBuffer:function(t){return s.public_key(t)},appendByteBuffer:function(t,e){o.required(e),s.public_key(t,d.public_key.toPublic(e))},fromObject:function(t){return o.required(t),t.Q?t:d.public_key.toPublic(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?p.address_prefix+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(o.required(t),t.toString())},compare:function(t,e){return b(t.toAddressString(),e.toAddressString())}},d.address={_to_address:function(t){return o.required(t),t.addy?t:h.fromString(t)},fromByteBuffer:function(t){return new h(s.ripemd160(t))},appendByteBuffer:function(t,e){s.ripemd160(t,d.address._to_address(e).toBuffer())},fromObject:function(t){return d.address._to_address(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?p.address_prefix+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":d.address._to_address(t).toString()},compare:function(t,e){return b(t.toString(),e.toString())}};var b=function(t,e){return t>e?1:t<e?-1:0},m=function(t){return Array.isArray(t)?t[0]:t},w=function(t,r){return r.nosort?t:r.compare?t.sort(function(t,e){return r.compare(m(t),m(e))}):t.sort(function(t,r){return"number"==typeof m(t)&&"number"==typeof m(r)?m(t)-m(r):e.isBuffer(m(t))&&e.isBuffer(m(r))?b(m(t).toString("hex"),m(r).toString("hex")):b(m(t).toString(),m(r).toString())})}}).call(e,r(1).Buffer)},function(t,e,r){"use strict";var n,i={address_prefix:{NODE_ENV:"production"}.npm_config__graphene_ecc_default_address_prefix||"GPH"};t.exports=n={core_asset:"CORE",address_prefix:"GPH",expire_in_secs:15,expire_in_secs_proposal:86400,networks:{BitShares:{core_asset:"BTS",address_prefix:"BTS",chain_id:"4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8"},Muse:{core_asset:"MUSE",address_prefix:"MUSE",chain_id:"45ad2d3f9ef92a49b55c2227eb06123f613bb35dd08bd876f2aea21925a67a67"},Test:{core_asset:"TEST",address_prefix:"TEST",chain_id:"39f5e2ede1f8bc1a3a54a7914414e3779e33193f1f5693510e73cb7a87617447"},Obelisk:{core_asset:"GOV",address_prefix:"FEW",chain_id:"1cfde7c388b9e8ac06462d68aadbd966b58f88797637d9af805b4560b0e9661e"}},setChainId:function(t){var e,r,o,s,a;for(a=Object.keys(n.networks),e=0,r=a.length;e<r;e++)if(s=a[e],o=n.networks[s],o.chain_id===t)return n.network_name=s,o.address_prefix&&(n.address_prefix=o.address_prefix,i.address_prefix=o.address_prefix),{network_name:s,network:o};n.network_name||console.log("Unknown chain id (this may be a testnet)",t)},reset:function(){n.core_asset="CORE",n.address_prefix="GPH",i.address_prefix="GPH",n.expire_in_secs=15,n.expire_in_secs_proposal=86400,console.log("Chain config reset")},setPrefix:function(){var t=arguments.length<=0||void 0===arguments[0]?"GPH":arguments[0];n.address_prefix=t,i.address_prefix=t}}},function(t,e,r){var n,i,o;(function(t){/**
* @license long.js (c) 2013 Daniel Wirtz <[email protected]>
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/long.js for details
*/
!function(s,a){r(49).amd?(i=[],n=a,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))):"object"==typeof t&&t&&t.exports?t.exports=a():(s.dcodeIO=s.dcodeIO||{}).Long=a()}(this,function(){"use strict";function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return(t&&t.__isLong__)===!0}function r(t,e){var r,n,o;return e?(t>>>=0,(o=0<=t&&t<256)&&(n=f[t])?n:(r=i(t,(0|t)<0?-1:0,!0),o&&(f[t]=r),r)):(t|=0,(o=-128<=t&&t<128)&&(n=a[t])?n:(r=i(t,t<0?-1:0,!1),o&&(a[t]=r),r))}function n(t,e){if(isNaN(t)||!isFinite(t))return e?v:_;if(e){if(t<0)return v;if(t>=l)return w}else{if(t<=-p)return E;if(t+1>=p)return m}return t<0?n(-t,e).neg():i(t%h|0,t/h|0,e)}function i(e,r,n){return new t(e,r,n)}function o(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return _;if("number"==typeof e?(r=e,e=!1):e=!!e,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return o(t.substring(1),e,r).neg();for(var s=n(u(r,8)),a=_,f=0;f<t.length;f+=8){var c=Math.min(8,t.length-f),h=parseInt(t.substring(f,f+c),r);if(c<8){var l=n(u(r,c));a=a.mul(l).add(n(h))}else a=a.mul(s),a=a.add(n(h))}return a.unsigned=e,a}function s(e){return e instanceof t?e:"number"==typeof e?n(e):"string"==typeof e?o(e):i(e.low,e.high,e.unsigned)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var a={},f={};t.fromInt=r,t.fromNumber=n,t.fromBits=i;var u=Math.pow;t.fromString=o,t.fromValue=s;var c=1<<24,h=4294967296,l=0x10000000000000000,p=l/2,d=r(c),_=r(0);t.ZERO=_;var v=r(0,!0);t.UZERO=v;var y=r(1);t.ONE=y;var g=r(1,!0);t.UONE=g;var b=r(-1);t.NEG_ONE=b;var m=i(-1,2147483647,!1);t.MAX_VALUE=m;var w=i(-1,-1,!0);t.MAX_UNSIGNED_VALUE=w;var E=i(0,-2147483648,!1);t.MIN_VALUE=E;var S=t.prototype;return S.toInt=function(){return this.unsigned?this.low>>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},S.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var e=n(t),r=this.div(e),i=r.mul(e).sub(this);return r.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=n(u(t,6),this.unsigned),s=this,a="";;){var f=s.div(o),c=s.sub(f.mul(o)).toInt()>>>0,h=c.toString(t);if(s=f,s.isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+a}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},S.isZero=function(){return 0===this.high&&0===this.low},S.isNegative=function(){return!this.unsigned&&this.high<0},S.isPositive=function(){return this.unsigned||this.high>=0},S.isOdd=function(){return 1===(1&this.low)},S.isEven=function(){return 0===(1&this.low)},S.equals=function(t){return e(t)||(t=s(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},S.eq=S.equals,S.notEquals=function(t){return!this.eq(t)},S.neq=S.notEquals,S.lessThan=function(t){return this.comp(t)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(t){return this.comp(t)<=0},S.lte=S.lessThanOrEqual,S.greaterThan=function(t){return this.comp(t)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(t){return this.comp(t)>=0},S.gte=S.greaterThanOrEqual,S.compare=function(t){if(e(t)||(t=s(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(y)},S.neg=S.negate,S.add=function(t){e(t)||(t=s(t));var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,a=65535&this.low,f=t.high>>>16,u=65535&t.high,c=t.low>>>16,h=65535&t.low,l=0,p=0,d=0,_=0;return _+=a+h,d+=_>>>16,_&=65535,d+=o+c,p+=d>>>16,d&=65535,p+=n+u,l+=p>>>16,p&=65535,l+=r+f,l&=65535,i(d<<16|_,l<<16|p,this.unsigned)},S.subtract=function(t){return e(t)||(t=s(t)),this.add(t.neg())},S.sub=S.subtract,S.multiply=function(t){if(this.isZero())return _;if(e(t)||(t=s(t)),t.isZero())return _;if(this.eq(E))return t.isOdd()?E:_;if(t.eq(E))return this.isOdd()?E:_;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(d)&&t.lt(d))return n(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,a=this.low>>>16,f=65535&this.low,u=t.high>>>16,c=65535&t.high,h=t.low>>>16,l=65535&t.low,p=0,v=0,y=0,g=0;return g+=f*l,y+=g>>>16,g&=65535,y+=a*l,v+=y>>>16,y&=65535,y+=f*h,v+=y>>>16,y&=65535,v+=o*l,p+=v>>>16,v&=65535,v+=a*h,p+=v>>>16,v&=65535,v+=f*c,p+=v>>>16,v&=65535,p+=r*l+o*h+a*c+f*u,p&=65535,i(y<<16|g,p<<16|v,this.unsigned)},S.mul=S.multiply,S.divide=function(t){if(e(t)||(t=s(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?v:_;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return v;if(t.gt(this.shru(1)))return g;o=v}else{if(this.eq(E)){if(t.eq(y)||t.eq(b))return E;if(t.eq(E))return y;var a=this.shr(1);return r=a.div(t).shl(1),r.eq(_)?t.isNegative()?y:b:(i=this.sub(t.mul(r)),o=r.add(i.div(t)))}if(t.eq(E))return this.unsigned?v:_;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=_}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var f=Math.ceil(Math.log(r)/Math.LN2),c=f<=48?1:u(2,f-48),h=n(r),l=h.mul(t);l.isNegative()||l.gt(i);)r-=c,h=n(r,this.unsigned),l=h.mul(t);h.isZero()&&(h=y),o=o.add(h),i=i.sub(l)}return o},S.div=S.divide,S.modulo=function(t){return e(t)||(t=s(t)),this.sub(this.div(t).mul(t))},S.mod=S.modulo,S.not=function(){return i(~this.low,~this.high,this.unsigned)},S.and=function(t){return e(t)||(t=s(t)),i(this.low&t.low,this.high&t.high,this.unsigned)},S.or=function(t){return e(t)||(t=s(t)),i(this.low|t.low,this.high|t.high,this.unsigned)},S.xor=function(t){return e(t)||(t=s(t)),i(this.low^t.low,this.high^t.high,this.unsigned)},S.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?i(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):i(0,this.low<<t-32,this.unsigned)},S.shl=S.shiftLeft,S.shiftRight=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?i(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):i(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),t&=63,0===t)return this;var r=this.high;if(t<32){var n=this.low;return i(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?i(r,0,this.unsigned):i(r>>>t-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.toSigned=function(){return this.unsigned?i(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:i(this.low,this.high,!0)},S.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},S.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})}).call(e,r(50)(t))},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(23),o=r(13);o.inherits=r(2),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){(function(e){function n(t,e){var n=r(8);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(T||(T=r(25).StringDecoder),this.decoder=new T(t.encoding),this.encoding=t.encoding)}function i(t){r(8);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void I.call(this)):new i(t)}function o(t,e,r,n,i){var o=u(e,r);if(o)t.emit("error",o);else if(x.isNullOrUndefined(r))e.reading=!1,e.ended||c(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&h(t)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=O)t=O;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}function f(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||x.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var r=null;return x.isBuffer(e)||x.isString(e)||x.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function c(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,h(t)}function h(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(A("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){l(t)}):l(t))}function l(t){A("emit readable"),t.emit("readable"),g(t)}function p(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(function(){d(t,r)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(A("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function _(t){return function(){var e=t._readableState;A("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&k.listenerCount(t,"data")&&(e.flowing=!0,g(t))}}function v(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){y(t,r)}))}function y(t,e){e.resumeScheduled=!1,t.emit("resume"),g(t),e.flowing&&!e.reading&&t.read(0)}function g(t){var e=t._readableState;if(A("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):B.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new B(t);for(var f=0,u=0,c=n.length;u<c&&f<t;u++){var a=n[0],h=Math.min(t-f,a.length);o?r+=a.slice(0,h):a.copy(r,f,0,h),h<a.length?n[0]=a.slice(h):n.shift(),f+=h}}return r}function m(t){var r=t._readableState;if(r.length>0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,e.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function w(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}function E(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var S=r(105),B=r(1).Buffer;i.ReadableState=n;var k=r(31).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var I=r(11),x=r(13);x.inherits=r(2);var T,A=r(123);A=A&&A.debuglog?A.debuglog("stream"):function(){},x.inherits(i,I),i.prototype.push=function(t,e){var r=this._readableState;return x.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new B(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return T||(T=r(25).StringDecoder),this._readableState.decoder=new T(t),this._readableState.encoding=t,this};var O=8388608;i.prototype.read=function(t){A("read",t);var e=this._readableState,r=t;if((!x.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return A("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?m(this):h(this),null;if(t=f(t,e),0===t&&e.ended)return 0===e.length&&m(this),null;var n=e.needReadable;A("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,A("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,A("reading or ended",n)),n&&(A("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=f(r,e));var i;return i=t>0?b(t,e):null,x.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&m(this),x.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,r){function n(t){A("onunpipe"),t===h&&o()}function i(){A("onend"),t.end()}function o(){A("cleanup"),t.removeListener("close",f),t.removeListener("finish",u),t.removeListener("drain",v),t.removeListener("error",a),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!l.awaitDrain||t._writableState&&!t._writableState.needDrain||v()}function s(e){A("ondata");var r=t.write(e);!1===r&&(A("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(e){A("onerror",e),c(),t.removeListener("error",a),0===k.listenerCount(t,"error")&&t.emit("error",e)}function f(){t.removeListener("finish",u),c()}function u(){A("onfinish"),t.removeListener("close",f),c()}function c(){A("unpipe"),h.unpipe(t)}var h=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=t;break;case 1:l.pipes=[l.pipes,t];break;default:l.pipes.push(t)}l.pipesCount+=1,A("pipe count=%d opts=%j",l.pipesCount,r);var p=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=p?i:o;l.endEmitted?e.nextTick(d):h.once("end",d),t.on("unpipe",n);var v=_(h);return t.on("drain",v),h.on("data",s),t._events&&t._events.error?S(t._events.error)?t._events.error.unshift(a):t._events.error=[a,t._events.error]:t.on("error",a),t.once("close",f),t.once("finish",u),t.emit("pipe",h),l.flowing||(A("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;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),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var i=E(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=I.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;e.nextTick(function(){A("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(A("resume"),t.flowing=!0,t.reading||(A("resume read 0"),this.read(0)),v(this,t)),this},i.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(A("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(A("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)x.isFunction(t[i])&&x.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){A("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b}).call(e,r(9))},function(t,e,r){var n,i;(function(o,s){!function(a){"use strict";function f(t,e){if(e=e||{type:"Array"},"undefined"!=typeof o&&"number"==typeof o.pid)return u(t,e);var r=window.crypto||window.msCrypto;if(!r)throw new Error("Your browser does not support window.crypto.");return c(t,e)}function u(t,e){var n=r(124),i=n.randomBytes(t);switch(e.type){case"Array":return[].slice.call(i);case"Buffer":return i;case"Uint8Array":for(var o=new Uint8Array(t),s=0;s<t;++s)o[s]=i.readUInt8(s);return o;default:throw new Error(e.type+" is unsupported.")}}function c(t,e){var r=new Uint8Array(t),n=window.crypto||window.msCrypto;switch(n.getRandomValues(r),e.type){case"Array":return[].slice.call(r);case"Buffer":try{new s(1)}catch(t){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new s(r);case"Uint8Array":return r;default:throw new Error(e.type+" is unsupported.")}}n=[],i=function(){return f}.apply(e,n),!(void 0!==i&&(t.exports=i)),f.randomArray=function(t){return f(t,{type:"Array"})},f.randomUint8Array=function(t){return f(t,{type:"Uint8Array"})},f.randomBuffer=function(t){return f(t,{type:"Buffer"})}}(this)}).call(e,r(9),r(1).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=p,h.call(this,64,56)}function i(t,e,r){return r^t&(e^r)}function o(t,e,r){return t&e|r&(t|e)}function s(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function a(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function f(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function u(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}var c=r(2),h=r(10),l=[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],p=new Array(64);c(n,h),n.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},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,c=0|this._c,h=0|this._d,p=0|this._e,d=0|this._f,_=0|this._g,v=0|this._h,y=0;y<16;++y)e[y]=t.readInt32BE(4*y);for(;y<64;++y)e[y]=u(e[y-2])+e[y-7]+f(e[y-15])+e[y-16]|0;for(var g=0;g<64;++g){var b=v+a(p)+i(p,d,_)+l[g]+e[g]|0,m=s(r)+o(r,n,c)|0;v=_,_=d,d=p,p=h+b|0,h=c,c=n,n=r,r=b+m|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=c+this._c|0,this._d=h+this._d|0,this._e=p+this._e|0,this._f=d+this._f|0,this._g=_+this._g|0,this._h=v+this._h|0},n.prototype._hash=function(){var t=new e(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=n}).call(e,r(1).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=v,d.call(this,128,112)}function i(t,e,r){return r^t&(e^r)}function o(t,e,r){return t&e|r&(t|e)}function s(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function a(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function u(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function c(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function h(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function l(t,e){return t>>>0<e>>>0?1:0}var p=r(2),d=r(10),_=[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],v=new Array(160);p(n,d),n.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},n.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,p=0|this._ch,d=0|this._dh,v=0|this._eh,y=0|this._fh,g=0|this._gh,b=0|this._hh,m=0|this._al,w=0|this._bl,E=0|this._cl,S=0|this._dl,B=0|this._el,k=0|this._fl,I=0|this._gl,x=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var A=e[T-30],O=e[T-30+1],j=f(A,O),L=u(O,A);A=e[T-4],O=e[T-4+1];var R=c(A,O),D=h(O,A),z=e[T-14],M=e[T-14+1],q=e[T-32],U=e[T-32+1],C=L+M|0,N=j+z+l(C,L)|0;C=C+D|0,N=N+R+l(C,D)|0,C=C+U|0,N=N+q+l(C,U)|0,e[T]=N,e[T+1]=C}for(var P=0;P<160;P+=2){N=e[P],C=e[P+1];var F=o(r,n,p),H=o(m,w,E),V=s(r,m),K=s(m,r),W=a(v,B),Y=a(B,v),Z=_[P],J=_[P+1],G=i(v,y,g),X=i(B,k,I),$=x+Y|0,Q=b+W+l($,x)|0;$=$+X|0,Q=Q+G+l($,X)|0,$=$+J|0,Q=Q+Z+l($,J)|0,$=$+C|0,Q=Q+N+l($,C)|0;var tt=K+H|0,et=V+F+l(tt,K)|0;b=g,x=I,g=y,I=k,y=v,k=B,B=S+$|0,v=d+Q+l(B,S)|0,d=p,S=E,p=n,E=w,n=r,w=m,m=$+tt|0,r=Q+et+l(m,$)|0}this._al=this._al+m|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+B|0,this._fl=this._fl+k|0,this._gl=this._gl+I|0,this._hl=this._hl+x|0,this._ah=this._ah+r+l(this._al,m)|0,this._bh=this._bh+n+l(this._bl,w)|0,this._ch=this._ch+p+l(this._cl,E)|0,this._dh=this._dh+d+l(this._dl,S)|0,this._eh=this._eh+v+l(this._el,B)|0,this._fh=this._fh+y+l(this._fl,k)|0,this._gh=this._gh+g+l(this._gl,I)|0,this._hh=this._hh+b+l(this._hl,x)|0},n.prototype._hash=function(){function t(t,e,n){r.writeInt32BE(t,n),r.writeInt32BE(e,n+4)}var r=new e(64);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),r},t.exports=n}).call(e,r(1).Buffer)},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,r){var n,i,o;!function(r,s){i=[],n=s,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))}(this,function(){function t(e,r,n){function i(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,!1,!1,e),r}var o={debug:!1,automaticOpen:!0,reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,timeoutInterval:2e3,maxReconnectAttempts:null,binaryType:"blob"};n||(n={});for(var s in o)"undefined"!=typeof n[s]?this[s]=n[s]:this[s]=o[s];this.url=e,this.reconnectAttempts=0,this.readyState=WebSocket.CONNECTING,this.protocol=null;var a,f=this,u=!1,c=!1,h=null,l=document.createElement("div");l.addEventListener("open",function(t){f.onopen(t)}),l.addEventListener("close",function(t){f.onclose(t)}),l.addEventListener("connecting",function(t){f.onconnecting(t)}),l.addEventListener("message",function(t){f.onmessage(t)}),l.addEventListener("error",function(t){f.onerror(t)}),this.addEventListener=l.addEventListener.bind(l),this.removeEventListener=l.removeEventListener.bind(l),this.dispatchEvent=l.dispatchEvent.bind(l),this.open=function(e){if(a=new WebSocket(f.url,r||[]),a.binaryType=this.binaryType,e){if(this.maxReconnectAttempts&&this.reconnectAttempts>this.maxReconnectAttempts)return}else l.dispatchEvent(i("connecting")),this.reconnectAttempts=0;(f.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","attempt-connect",f.url);var n=a,o=setTimeout(function(){(f.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","connection-timeout",f.url),c=!0,n.close(),c=!1},f.timeoutInterval);a.onopen=function(r){clearTimeout(o),(f.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","onopen",f.url),f.protocol=a.protocol,f.readyState=WebSocket.OPEN,f.reconnectAttempts=0;var n=i("open");n.isReconnect=e,e=!1,l.dispatchEvent(n)},a.onclose=function(r){if(clearTimeout(o),a=null,u)f.readyState=WebSocket.CLOSED,l.dispatchEvent(i("close"));else{f.readyState=WebSocket.CONNECTING;var n=i("connecting");n.code=r.code,n.reason=r.reason,n.wasClean=r.wasClean,l.dispatchEvent(n),e||c||((f.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","onclose",f.url),l.dispatchEvent(i("close")));var o=f.reconnectInterval*Math.pow(f.reconnectDecay,f.reconnectAttempts);h=setTimeout(function(){f.reconnectAttempts++,f.open(!0)},o>f.maxReconnectInterval?f.maxReconnectInterval:o)}},a.onmessage=function(e){(f.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","onmessage",f.url,e.data);var r=i("message");r.data=e.data,l.dispatchEvent(r)},a.onerror=function(e){(f.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","onerror",f.url,e),l.dispatchEvent(i("error"))}},1==this.automaticOpen&&this.open(!1),this.send=function(e){if(a)return(f.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","send",f.url,e),a.send(e);throw"INVALID_STATE_ERR : Pausing to reconnect websocket"},this.close=function(t,e){"undefined"==typeof t&&(t=1e3),u=!0,a&&a.close(t,e),h&&(clearTimeout(h),h=null)},this.refresh=function(){a&&a.close()}}if("undefined"!=typeof window&&"WebSocket"in window)return t.prototype.onopen=function(t){},t.prototype.onclose=function(t){},t.prototype.onconnecting=function(t){},t.prototype.onmessage=function(t){},t.prototype.onerror=function(t){},t.debugAll=!1,t.CONNECTING=WebSocket.CONNECTING,t.OPEN=WebSocket.OPEN,t.CLOSING=WebSocket.CLOSING,t.CLOSED=WebSocket.CLOSED,t})},function(t,e){t.exports=function(t){function e(e){if(0===e.length)return"";for(var r=[0],n=0;n<e.length;++n){for(var o=0,s=e[n];o<r.length;++o)s+=r[o]<<8,r[o]=s%i,s=s/i|0;for(;s>0;)r.push(s%i),s=s/i|0}for(var a=0;0===e[a]&&a<e.length-1;++a)r.push(0);for(var f=0,u=r.length-1;f<=u;++f,--u){var c=t[r[f]];r[f]=t[r[u]],r[u]=c}return r.join("")}function r(t){if(0===t.length)return[];for(var e=[0],r=0;r<t.length;r++){var s=n[t[r]];if(void 0===s)throw new Error("Non-base"+i+" character");for(var a=0,f=s;a<e.length;++a)f+=e[a]*i,e[a]=255&f,f>>=8;for(;f>0;)e.push(255&f),f>>=8}for(var u=0;t[u]===o&&u<t.length-1;++u)e.push(0);return e.reverse()}for(var n={},i=t.length,o=t.charAt(0),s=0;s<t.length;s++)n[t.charAt(s)]=s;return{encode:e,decode:r}}},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function i(t){var e,n,i,o,s,a,f=t.length;s=r(t),a=new c(3*f/4-s),i=s>0?f-4:f;var h=0;for(e=0,n=0;e<i;e+=4,n+=3)o=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],a[h++]=o>>16&255,a[h++]=o>>8&255,a[h++]=255&o;return 2===s?(o=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,a[h++]=255&o):1===s&&(o=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,a[h++]=o>>8&255,a[h++]=255&o),a}function o(t){return f[t>>18&63]+f[t>>12&63]+f[t>>6&63]+f[63&t]}function s(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(o(n));return i.join("")}function a(t){for(var e,r=t.length,n=r%3,i="",o=[],a=16383,u=0,c=r-n;u<c;u+=a)o.push(s(t,u,u+a>c?c:u+a));return 1===n?(e=t[r-1],i+=f[e>>2],i+=f[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=f[e>>10],i+=f[e>>4&63],i+=f[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=a;for(var f=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=h.length;l<p;++l)f[l]=h[l],u[h.charCodeAt(l)]=l;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},function(t,e,r){(function(t){var e=r(3),n=r(26);n.fromByteArrayUnsigned=function(t){return new n(128&t[0]?[0].concat(t):t)},n.prototype.toByteArrayUnsigned=function(){var t=this.toByteArray();return 0===t[0]?t.slice(1):t},n.fromDERInteger=function(t){return new n(t)},n.prototype.toDERInteger=n.prototype.toByteArray,n.fromBuffer=function(t){if(128&t[0]){var e=Array.prototype.slice.call(t);return new n([0].concat(e))}return new n(t)},n.fromHex=function(t){return""===t?n.ZERO:(e.equal(t,t.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),e.equal(t.length%2,0,"Incomplete hex"),new n(t,16))},n.prototype.toBuffer=function(e){for(var r=this.toByteArrayUnsigned(),n=[],i=e-r.length;n.length<i;)n.push(0);return new t(n.concat(r))},n.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")}}).call(e,r(1).Buffer)},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(e){function n(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}var i=r(11).Transform,o=r(2),s=r(25).StringDecoder;t.exports=n,o(n,i),n.prototype.update=function(t,r,n){"string"==typeof t&&(t=new e(t,r));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},n.prototype.setAutoPadding=function(){},n.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},n.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},n.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},n.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)}},n.prototype._flush=function(t){var e;try{this.push(this._final())}catch(t){e=t}finally{t(e)}},n.prototype._finalOrDigest=function(t){var r=this._final()||new e("");return t&&(r=this._toString(r,t,!0)),r},n.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new s(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}}).call(e,r(1).Buffer)},function(t,e,r){(function(t){"use strict";function r(e,r){if(e.length%o!==0){var n=e.length+(o-e.length%o);e=t.concat([e,s],n)}for(var i=[],a=r?e.readInt32BE:e.readInt32LE,f=0;f<e.length;f+=o)i.push(a.call(e,f));return i}function n(e,r,n){for(var i=new t(r),o=n?i.writeInt32BE:i.writeInt32LE,s=0;s<e.length;s++)o.call(i,e[s],4*s,!0);return i}function i(e,i,o,s){t.isBuffer(e)||(e=new t(e));var f=i(r(e,s),e.length*a);return n(f,o,s)}var o=4,s=new t(o);s.fill(0);var a=8;e.hash=i}).call(e,r(1).Buffer)},function(t,e,r){"use strict";function n(t,e){t[e>>5]|=128<<e%32,t[(e+64>>>9<<4)+14]=e;for(var r=1732584193,n=-271733879,i=-1732584194,c=271733878,h=0;h<t.length;h+=16){var l=r,p=n,d=i,_=c;r=o(r,n,i,c,t[h+0],7,-680876936),c=o(c,r,n,i,t[h+1],12,-389564586),i=o(i,c,r,n,t[h+2],17,606105819),n=o(n,i,c,r,t[h+3],22,-1044525330),r=o(r,n,i,c,t[h+4],7,-176418897),c=o(c,r,n,i,t[h+5],12,1200080426),i=o(i,c,r,n,t[h+6],17,-1473231341),n=o(n,i,c,r,t[h+7],22,-45705983),r=o(r,n,i,c,t[h+8],7,1770035416),c=o(c,r,n,i,t[h+9],12,-1958414417),i=o(i,c,r,n,t[h+10],17,-42063),n=o(n,i,c,r,t[h+11],22,-1990404162),r=o(r,n,i,c,t[h+12],7,1804603682),c=o(c,r,n,i,t[h+13],12,-40341101),i=o(i,c,r,n,t[h+14],17,-1502002290),n=o(n,i,c,r,t[h+15],22,1236535329),r=s(r,n,i,c,t[h+1],5,-165796510),c=s(c,r,n,i,t[h+6],9,-1069501632),i=s(i,c,r,n,t[h+11],14,643717713),n=s(n,i,c,r,t[h+0],20,-373897302),r=s(r,n,i,c,t[h+5],5,-701558691),c=s(c,r,n,i,t[h+10],9,38016083),i=s(i,c,r,n,t[h+15],14,-660478335),n=s(n,i,c,r,t[h+4],20,-405537848),r=s(r,n,i,c,t[h+9],5,568446438),c=s(c,r,n,i,t[h+14],9,-1019803690),i=s(i,c,r,n,t[h+3],14,-187363961),n=s(n,i,c,r,t[h+8],20,1163531501),r=s(r,n,i,c,t[h+13],5,-1444681467),c=s(c,r,n,i,t[h+2],9,-51403784),i=s(i,c,r,n,t[h+7],14,1735328473),n=s(n,i,c,r,t[h+12],20,-1926607734),r=a(r,n,i,c,t[h+5],4,-378558),c=a(c,r,n,i,t[h+8],11,-2022574463),i=a(i,c,r,n,t[h+11],16,1839030562),n=a(n,i,c,r,t[h+14],23,-35309556),r=a(r,n,i,c,t[h+1],4,-1530992060),c=a(c,r,n,i,t[h+4],11,1272893353),i=a(i,c,r,n,t[h+7],16,-155497632),n=a(n,i,c,r,t[h+10],23,-1094730640),r=a(r,n,i,c,t[h+13],4,681279174),c=a(c,r,n,i,t[h+0],11,-358537222),i=a(i,c,r,n,t[h+3],16,-722521979),n=a(n,i,c,r,t[h+6],23,76029189),r=a(r,n,i,c,t[h+9],4,-640364487),c=a(c,r,n,i,t[h+12],11,-421815835),i=a(i,c,r,n,t[h+15],16,530742520),n=a(n,i,c,r,t[h+2],23,-995338651),r=f(r,n,i,c,t[h+0],6,-198630844),c=f(c,r,n,i,t[h+7],10,1126891415),i=f(i,c,r,n,t[h+14],15,-1416354905),n=f(n,i,c,r,t[h+5],21,-57434055),r=f(r,n,i,c,t[h+12],6,1700485571),c=f(c,r,n,i,t[h+3],10,-1894986606),i=f(i,c,r,n,t[h+10],15,-1051523),n=f(n,i,c,r,t[h+1],21,-2054922799),r=f(r,n,i,c,t[h+8],6,1873313359),c=f(c,r,n,i,t[h+15],10,-30611744),i=f(i,c,r,n,t[h+6],15,-1560198380),n=f(n,i,c,r,t[h+13],21,1309151649),r=f(r,n,i,c,t[h+4],6,-145523070),c=f(c,r,n,i,t[h+11],10,-1120210379),i=f(i,c,r,n,t[h+2],15,718787259),n=f(n,i,c,r,t[h+9],21,-343485551),r=u(r,l),n=u(n,p),i=u(i,d),c=u(c,_)}return Array(r,n,i,c)}function i(t,e,r,n,i,o){return u(c(u(u(e,t),u(n,o)),i),r)}function o(t,e,r,n,o,s,a){return i(e&r|~e&n,t,e,o,s,a)}function s(t,e,r,n,o,s,a){return i(e&n|r&~n,t,e,o,s,a)}function a(t,e,r,n,o,s,a){return i(e^r^n,t,e,o,s,a)}function f(t,e,r,n,o,s,a){return i(r^(e|~n),t,e,o,s,a)}function u(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r}function c(t,e){return t<<e|t>>>32-e}var h=r(57);t.exports=function(t){return h.hash(t,n,16)}},function(t,e,r){(function(e){"use strict";function n(t,r){s.call(this),t=t.toLowerCase(),"string"==typeof r&&(r=new e(r));var n="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=r,r.length>n?r=i(t).update(r).digest():r.length<n&&(r=e.concat([r,a],n));for(var o=this._ipad=new e(n),f=this._opad=new e(n),u=0;u<n;u++)o[u]=54^r[u],f[u]=92^r[u];this._hash=i(t).update(o)}var i=r(27),o=r(2),s=r(11).Transform,a=new e(128);a.fill(0),o(n,s),n.prototype.update=function(t,e){return this._hash.update(t,e),this},n.prototype._transform=function(t,e,r){this._hash.update(t),r()},n.prototype._flush=function(t){this.push(this.digest()),t()},n.prototype.digest=function(t){var e=this._hash.digest();return i(this._alg).update(this._opad).update(e).digest(t)},t.exports=function(t,e){return new n(t,e)}}).call(e,r(1).Buffer)},function(t,e,r){!function(n,i,o){t.exports=e=i(r(5),r(28),r(65),r(63),r(61))}(this,function(t){return function(){var e=t,r=e.lib,n=r.BlockCipher,i=e.algo,o=[],s=[],a=[],f=[],u=[],c=[],h=[],l=[],p=[],d=[];!function(){for(var t=[],e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=0,n=0,e=0;e<256;e++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^255&i^99,o[r]=i,s[i]=r;var _=t[r],v=t[_],y=t[v],g=257*t[i]^16843008*i;a[r]=g<<24|g>>>8,f[r]=g<<16|g>>>16,u[r]=g<<8|g>>>24,c[r]=g;var g=16843009*y^65537*v^257*_^16843008*r;h[i]=g<<24|g>>>8,l[i]=g<<16|g>>>16,p[i]=g<<8|g>>>24,d[i]=g,r?(r=_^t[t[t[y^_]]],n^=t[t[n]]):r=n=1}}();var _=[0,1,2,4,8,16,32,64,128,27,54],v=i.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,n=this._nRounds=r+6,i=4*(n+1),s=this._keySchedule=[],a=0;a<i;a++)if(a<r)s[a]=e[a];else{var f=s[a-1];a%r?r>6&&a%r==4&&(f=o[f>>>24]<<24|o[f>>>16&255]<<16|o[f>>>8&255]<<8|o[255&f]):(f=f<<8|f>>>24,f=o[f>>>24]<<24|o[f>>>16&255]<<16|o[f>>>8&255]<<8|o[255&f],f^=_[a/r|0]<<24),s[a]=s[a-r]^f}for(var u=this._invKeySchedule=[],c=0;c<i;c++){var a=i-c;if(c%4)var f=s[a];else var f=s[a-4];c<4||a<=4?u[c]=f:u[c]=h[o[f>>>24]]^l[o[f>>>16&255]]^p[o[f>>>8&255]]^d[o[255&f]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,f,u,c,o)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,h,l,p,d,s);var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,i,o,s,a){for(var f=this._nRounds,u=t[e]^r[0],c=t[e+1]^r[1],h=t[e+2]^r[2],l=t[e+3]^r[3],p=4,d=1;d<f;d++){var _=n[u>>>24]^i[c>>>16&255]^o[h>>>8&255]^s[255&l]^r[p++],v=n[c>>>24]^i[h>>>16&255]^o[l>>>8&255]^s[255&u]^r[p++],y=n[h>>>24]^i[l>>>16&255]^o[u>>>8&255]^s[255&c]^r[p++],g=n[l>>>24]^i[u>>>16&255]^o[c>>>8&255]^s[255&h]^r[p++];u=_,c=v,h=y,l=g}var _=(a[u>>>24]<<24|a[c>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^r[p++],v=(a[c>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&u])^r[p++],y=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[u>>>8&255]<<8|a[255&c])^r[p++],g=(a[l>>>24]<<24|a[u>>>16&255]<<16|a[c>>>8&255]<<8|a[255&h])^r[p++];t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});e.AES=n._createHelper(v)}(),t.AES})},function(t,e,r){!function(n,i){t.exports=e=i(r(5))}(this,function(t){t.lib.Cipher||function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,s=n.BufferedBlockAlgorithm,a=r.enc,f=(a.Utf8,a.Base64),u=r.algo,c=u.EvpKDF,h=n.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?S:m}return function(e){return{encrypt:function(r,n,i){return t(n).encrypt(e,r,n,i)},decrypt:function(r,n,i){return t(n).decrypt(e,r,n,i)}}}}()}),l=(n.StreamCipher=h.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),r.mode={}),p=n.BlockCipherMode=i.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),d=l.CBC=function(){function t(t,r,n){var i=this._iv;if(i){var o=i;this._iv=e}else var o=this._prevBlock;for(var s=0;s<n;s++)t[r+s]^=o[s]}var r=p.extend();return r.Encryptor=r.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i),n.encryptBlock(e,r),this._prevBlock=e.slice(r,r+i)}}),r.Decryptor=r.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,o=e.slice(r,r+i);n.decryptBlock(e,r),t.call(this,e,r,i),this._prevBlock=o}}),r}(),_=r.pad={},v=_.Pkcs7={pad:function(t,e){for(var r=4*e,n=r-t.sigBytes%r,i=n<<24|n<<16|n<<8|n,s=[],a=0;a<n;a+=4)s.push(i);var f=o.create(s,n);t.concat(f)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},y=(n.BlockCipher=h.extend({cfg:h.cfg.extend({mode:d,padding:v}),reset:function(){h.reset.call(this);var t=this.cfg,e=t.iv,r=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{var n=r.createDecryptor;this._minBufferSize=1}this._mode=n.call(r,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else{var e=this._process(!0);t.unpad(e)}return e},blockSize:4}),n.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=r.format={},b=g.OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;if(r)var n=o.create([1398893684,1701076831]).concat(r).concat(e);else var n=e;return n.toString(f)},parse:function(t){var e=f.parse(t),r=e.words;if(1398893684==r[0]&&1701076831==r[1]){var n=o.create(r.slice(2,4));r.splice(0,4),e.sigBytes-=16}return y.create({ciphertext:e,salt:n})}},m=n.SerializableCipher=i.extend({cfg:i.extend({format:b}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=t.createEncryptor(r,n),o=i.finalize(e),s=i.cfg;return y.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var i=t.createDecryptor(r,n).finalize(e.ciphertext);return i},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),w=r.kdf={},E=w.OpenSSL={execute:function(t,e,r,n){n||(n=o.random(8));var i=c.create({keySize:e+r}).compute(t,n),s=o.create(i.words.slice(e),4*r);return i.sigBytes=4*e,y.create({key:i,iv:s,salt:n})}},S=n.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:E}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=n.kdf.execute(r,t.keySize,t.ivSize);n.iv=i.iv;var o=m.encrypt.call(this,t,e,i.key,n);return o.mixIn(i),o},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var i=n.kdf.execute(r,t.keySize,t.ivSize,e.salt);n.iv=i.iv;var o=m.decrypt.call(this,t,e,i.key,n);return o}})}()})},function(t,e,r){!function(n,i){t.exports=e=i(r(5))}(this,function(t){return t.enc.Hex})},function(t,e,r){!function(n,i,o){t.exports=e=i(r(5),r(66),r(64))}(this,function(t){return function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,s=o.MD5,a=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r=this.cfg,n=r.hasher.create(),o=i.create(),s=o.words,a=r.keySize,f=r.iterations;s.length<a;){u&&n.update(u);var u=n.update(t).finalize(e);n.reset();for(var c=1;c<f;c++)u=n.finalize(u),n.reset();o.concat(u)}return o.sigBytes=4*a,o}});e.EvpKDF=function(t,e,r){return a.create(r).compute(t,e)}}(),t.EvpKDF})},function(t,e,r){!function(n,i){t.exports=e=i(r(5))}(this,function(t){!function(){var e=t,r=e.lib,n=r.Base,i=e.enc,o=i.Utf8,s=e.algo;s.HMAC=n.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=o.parse(e));var r=t.blockSize,n=4*r;e.sigBytes>n&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),s=this._iKey=e.clone(),a=i.words,f=s.words,u=0;u<r;u++)a[u]^=1549556828,f[u]^=909522486;i.sigBytes=s.sigBytes=n,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);e.reset();var n=e.finalize(this._oKey.clone().concat(r));return n}})}()})},function(t,e,r){!function(n,i){t.exports=e=i(r(5))}(this,function(t){return function(e){function r(t,e,r,n,i,o,s){var a=t+(e&r|~e&n)+i+s;return(a<<o|a>>>32-o)+e}function n(t,e,r,n,i,o,s){var a=t+(e&n|r&~n)+i+s;return(a<<o|a>>>32-o)+e}function i(t,e,r,n,i,o,s){var a=t+(e^r^n)+i+s;return(a<<o|a>>>32-o)+e}function o(t,e,r,n,i,o,s){var a=t+(r^(e|~n))+i+s;return(a<<o|a>>>32-o)+e}var s=t,a=s.lib,f=a.WordArray,u=a.Hasher,c=s.algo,h=[];!function(){for(var t=0;t<64;t++)h[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=c.MD5=u.extend({_doReset:function(){this._hash=new f.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var s=0;s<16;s++){var a=e+s,f=t[a];t[a]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var u=this._hash.words,c=t[e+0],l=t[e+1],p=t[e+2],d=t[e+3],_=t[e+4],v=t[e+5],y=t[e+6],g=t[e+7],b=t[e+8],m=t[e+9],w=t[e+10],E=t[e+11],S=t[e+12],B=t[e+13],k=t[e+14],I=t[e+15],x=u[0],T=u[1],A=u[2],O=u[3];x=r(x,T,A,O,c,7,h[0]),O=r(O,x,T,A,l,12,h[1]),A=r(A,O,x,T,p,17,h[2]),T=r(T,A,O,x,d,22,h[3]),x=r(x,T,A,O,_,7,h[4]),O=r(O,x,T,A,v,12,h[5]),A=r(A,O,x,T,y,17,h[6]),T=r(T,A,O,x,g,22,h[7]),x=r(x,T,A,O,b,7,h[8]),O=r(O,x,T,A,m,12,h[9]),A=r(A,O,x,T,w,17,h[10]),T=r(T,A,O,x,E,22,h[11]),x=r(x,T,A,O,S,7,h[12]),O=r(O,x,T,A,B,12,h[13]),A=r(A,O,x,T,k,17,h[14]),T=r(T,A,O,x,I,22,h[15]),x=n(x,T,A,O,l,5,h[16]),O=n(O,x,T,A,y,9,h[17]),A=n(A,O,x,T,E,14,h[18]),T=n(T,A,O,x,c,20,h[19]),x=n(x,T,A,O,v,5,h[20]),O=n(O,x,T,A,w,9,h[21]),A=n(A,O,x,T,I,14,h[22]),T=n(T,A,O,x,_,20,h[23]),x=n(x,T,A,O,m,5,h[24]),O=n(O,x,T,A,k,9,h[25]),A=n(A,O,x,T,d,14,h[26]),T=n(T,A,O,x,b,20,h[27]),x=n(x,T,A,O,B,5,h[28]),O=n(O,x,T,A,p,9,h[29]),A=n(A,O,x,T,g,14,h[30]),T=n(T,A,O,x,S,20,h[31]),x=i(x,T,A,O,v,4,h[32]),O=i(O,x,T,A,b,11,h[33]),A=i(A,O,x,T,E,16,h[34]),T=i(T,A,O,x,k,23,h[35]),x=i(x,T,A,O,l,4,h[36]),O=i(O,x,T,A,_,11,h[37]),A=i(A,O,x,T,g,16,h[38]),T=i(T,A,O,x,w,23,h[39]),x=i(x,T,A,O,B,4,h[40]),O=i(O,x,T,A,c,11,h[41]),A=i(A,O,x,T,d,16,h[42]),T=i(T,A,O,x,y,23,h[43]),x=i(x,T,A,O,m,4,h[44]),O=i(O,x,T,A,S,11,h[45]),A=i(A,O,x,T,I,16,h[46]),T=i(T,A,O,x,p,23,h[47]),x=o(x,T,A,O,c,6,h[48]),O=o(O,x,T,A,g,10,h[49]),A=o(A,O,x,T,k,15,h[50]),T=o(T,A,O,x,v,21,h[51]),x=o(x,T,A,O,S,6,h[52]),O=o(O,x,T,A,d,10,h[53]),A=o(A,O,x,T,w,15,h[54]),T=o(T,A,O,x,l,21,h[55]),x=o(x,T,A,O,b,6,h[56]),O=o(O,x,T,A,I,10,h[57]),A=o(A,O,x,T,y,15,h[58]),T=o(T,A,O,x,B,21,h[59]),x=o(x,T,A,O,_,6,h[60]),O=o(O,x,T,A,E,10,h[61]),A=o(A,O,x,T,p,15,h[62]),T=o(T,A,O,x,m,21,h[63]),u[0]=u[0]+x|0,u[1]=u[1]+T|0,u[2]=u[2]+A|0,u[3]=u[3]+O|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),s=n;r[(i+64>>>9<<4)+15]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[(i+64>>>9<<4)+14]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,f=a.words,u=0;u<4;u++){var c=f[u];f[u]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return a},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t}});s.MD5=u._createHelper(l),s.HmacMD5=u._createHmacHelper(l)}(Math),t.MD5})},function(t,e,r){!function(n,i){t.exports=e=i(r(5))}(this,function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=r.Hasher,o=e.algo,s=[],a=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],f=r[4],u=0;u<80;u++){if(u<16)s[u]=0|t[e+u];else{var c=s[u-3]^s[u-8]^s[u-14]^s[u-16];s[u]=c<<1|c>>>31}var h=(n<<5|n>>>27)+f+s[u];h+=u<20?(i&o|~i&a)+1518500249:u<40?(i^o^a)+1859775393:u<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,f=a,a=o,o=i<<30|i>>>2,i=n,n=h}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+f|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[(n+64>>>9<<4)+14]=Math.floor(r/4294967296),e[(n+64>>>9<<4)+15]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=i._createHelper(a),e.HmacSHA1=i._createHmacHelper(a)}(),t.SHA1})},function(t,e,r){"use strict";var n,i=r(71),o=r(78),s=r(74),a=r(81);n=t.exports=function(t,e){var r,n,s,f,u;return arguments.length<2||"string"!=typeof t?(f=e,e=t,t=null):f=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,"c"),n=a.call(t,"e"),s=a.call(t,"w")),u={value:e,configurable:r,enumerable:n,writable:s},f?i(o(f),u):u},n.gs=function(t,e,r){var n,f,u,c;return"string"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(n=!0,f=!1):(n=a.call(t,"c"),f=a.call(t,"e")),c={get:e,set:r,configurable:n,enumerable:f},u?i(o(u),c):c}},function(t,e){function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function n(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var i="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=i?r:n,e.supported=r,e.unsupported=n},function(t,e){function r(t){var e=[];for(var r in t)e.push(r);return e}e=t.exports="function"==typeof Object.keys?Object.keys:r,e.shim=r},function(t,e,r){function n(t){var e=o[t];if(!e)return null;var r=new i(e.p,16),n=new i(e.a,16),a=new i(e.b,16),f=new i(e.n,16),u=new i(e.h,16),c=new i(e.Gx,16),h=new i(e.Gy,16);return new s(r,n,a,c,h,f,u)}var i=r(4),o=r(107),s=r(29);t.exports=n},function(t,e,r){"use strict";t.exports=r(72)()?Object.assign:r(73)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(75),i=r(80),o=Math.max;t.exports=function(t,e){var r,s,a,f=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},s=1;s<f;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(76)()?Object.keys:r(77)},function(t,e){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e){"use strict";var r=Object.keys;t.exports=function(t){return r(null==t?t:Object(t))}},function(t,e){"use strict";var r=Array.prototype.forEach,n=Object.create,i=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=n(null);return r.call(arguments,function(t){null!=t&&i(Object(t),e)}),e}},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,e,r){"use strict";t.exports=r(82)()?String.prototype.contains:r(83)},function(t,e){"use strict";var r="razdwatrzy";t.exports=function(){return"function"==typeof r.contains&&(r.contains("dwa")===!0&&r.contains("foo")===!1)}},function(t,e){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";var n,i,o,s,a,f,u,c=r(67),h=r(79),l=Function.prototype.apply,p=Function.prototype.call,d=Object.create,_=Object.defineProperty,v=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return h(e),y.call(this,"__ee__")?r=this.__ee__:(r=g.value=d(null),_(this,"__ee__",g),g.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return h(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),l.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(h(e),!y.call(this,"__ee__"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],"object"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(y.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;e<r;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)l.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;e<r;++e)o[e-1]=arguments[e];l.call(i,this,o)}},a={on:n,once:i,off:o,emit:s},f={on:c(n),once:c(i),off:c(o),emit:c(s)},u=v({},f),t.exports=e=function(t){return null==t?d(u):v(Object(t),f)},e.methods=a},function(t,e,r){"use strict";var n=r(87),i=r(89);t.exports={ChainStore:n,TransactionBuilder:i,FetchChainObjects:n.FetchChainObjects,ChainTypes:r(14),ObjectId:r(34),NumberUtils:r(88),TransactionHelper:r(90),ChainValidation:r(32),EmitterInstance:r(33),Login:r(86),FetchChain:n.FetchChain}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(20),s=r(35),a=r(91),f=a.get,u=a.set,c={},h={},l=function(){function t(){n(this,t);var e={loggedIn:!1,roles:["active","owner","memo"]};this.get=f(e),this.set=u(e),this.subs={}}return i(t,[{key:"addSubscription",value:function(t){this.subs[t]=t}},{key:"setRoles",value:function(t){this.set("roles",t)}},{key:"generateKeys",value:function(t,e,r,n){(new Date).getTime();if(!t||!e)throw new Error("Account name or password required");if(e.length<12)throw new Error("Password must have at least 12 characters");var i={},a={};return(r||this.get("roles")).forEach(function(r){var f=t+r+e,u=c[f]?c[f]:o.fromSeed(s.normalize_brainKey(f));c[f]=u,i[r]=u,a[r]=h[f]?h[f]:u.toPublicKey().toString(n),h[f]=a[r]}),{privKeys:i,pubKeys:a}}},{key:"checkKeys",value:function(t){var e=this,r=t.accountName,n=t.password,i=t.auths;if(!r||!n||!i)throw new Error("checkKeys: Missing inputs");var o=!1,s=function(t){var s=e.generateKeys(r,n,[t]),a=s.privKeys,f=s.pubKeys;i[t].forEach(function(r){r[0]===f[t]&&(o=!0,e.set(t,{priv:a[t],pub:f[t]}))})};for(var a in i)s(a);return o&&this.set("name",r),this.set("loggedIn",o),o}},{key:"signTransaction",value:function(t){var e=this,r=!1;if(this.get("roles").forEach(function(n){var i=e.get(n);i&&(r=!0,console.log("adding signer:",i.pub),t.add_signer(i.priv,i.pub))}),!r)throw new Error("You do not have any private keys to sign this transaction")}}]),t}(),p=new l;t.exports=p},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,r){var n=t.bind(F);return new Promise(function(t,i){function o(){var r=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],i=e.map(function(t){return n(t)});return i.findIndex(function(t){return void 0===t})===-1&&(s&&clearTimeout(s),r||F.unsubscribe(o),t(i),!0)}var s=null,a=o(!0);a||F.subscribe(o),r&&!a&&(s=setTimeout(function(){F.unsubscribe(o),i("timeout")},r))})}function o(t,e){var r=arguments.length<=2||void 0===arguments[2]?1900:arguments[2],n=F[t];if(!n)throw new Error("ChainStore does not have method "+t);var i=Array.isArray(e);return i||(e=[e]),F.FetchChainObjects(n,u.List(e),r).then(function(t){return i?t:t.get(0)})}function s(t){return t?(/Z$/.test(t)||(t+="Z"),new Date(t)):new Date("1970-01-01T00:00:00.000Z")}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},f=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(104),c=r(7),h=c.Apis,l=r(14),p=l.object_type,d=l.impl_object_type,_=r(32),v=r(4),y=r(33),g=y.emitter(),b=parseInt(p.operation_history,10),m=parseInt(p.limit_order,10),w=parseInt(p.call_order,10),E=parseInt(p.proposal,10),S=(parseInt(p.balance,10),parseInt(p.vesting_balance,10),parseInt(p.witness,10)),B=parseInt(p.worker,10),k=parseInt(p.committee_member,10),I=parseInt(p.account,10),x=parseInt(p.asset,10),T="1."+m+".",A="1."+w+".",O="1."+E+".",j="2."+parseInt(d.account_balance,10)+".",L="2."+parseInt(d.account_statistics,10)+".",R="2."+parseInt(d.asset_dynamic_data,10)+".",D="2."+parseInt(d.asset_bitasset_data,10)+".",z="1."+S+".",M="1."+B+".",q="1."+k+".",U="1."+x+".",C="1."+I+".",N=JSON.parse({NODE_ENV:"production"}.npm_config__graphene_chain_chain_debug||!1),P=function(){function t(){n(this,t),this.subscribers=new Set,this.subscribed=!1,this.clearCache(),this.progress=0,this.chain_time_offset=[],this.dispatchFrequency=40}return f(t,[{key:"clearCache",value:function(){this.objects_by_id=u.Map(),this.accounts_by_name=u.Map(),this.assets_by_symbol=u.Map(),this.account_ids_by_key=u.Map(),this.balance_objects_by_address=u.Map(),this.get_account_refs_of_keys_calls=u.Set(),this.account_history_requests=new Map,this.witness_by_account_id=new Map,this.committee_by_account_id=new Map,this.objects_by_vote_id=new Map,this.fetching_get_full_accounts=new Map}},{key:"resetCache",value:function(){this.subscribed=!1,this.clearCache(),this.head_block_time_string=null,this.init().then(function(t){console.log("resetCache init success")}).catch(function(t){console.log("resetCache init error:",t)})}},{key:"setDispatchFrequency",value:function(t){this.dispatchFrequency=t}},{key:"init",value:function(){var t=this,e=0,r=function r(n,i){var o=h.instance().db_api();return o?o.exec("get_objects",[["2.1.0"]]).then(function(o){for(var a=0;a<o.length;a++){var f=o[a];if(f){t._updateObject(f,!0);var u=new Date(f.time+"+00:00").getTime();t.head_block_time_string=f.time,t.chain_time_offset.push((new Date).getTime()-s(f.time).getTime());var c=(new Date).getTime(),l=(c-u)/1e3,p=Date.parse("Sep 1, 2015"),d=u-p;if(t.progress=d/(c-p),l<60)h.instance().db_api().exec("set_subscribe_callback",[t.onUpdate.bind(t),!0]).then(function(e){console.log("synced and subscribed, chainstore ready"),t.subscribed=!0,n()}).catch(function(t){i(t),console.log("Error: ",t)});else{if(console.log("not yet synced, retrying in 1s"),e++,e>10)throw new Error("ChainStore sync error, please check your system clock");setTimeout(r.bind(t,n,i),1e3)}}else setTimeout(r.bind(t,n,i),1e3)}}).catch(function(e){console.log("!!! Chain API error",e),t.objects_by_id=t.objects_by_id.delete("2.1.0"),i(e)}):i(new Error("Api not found, please initialize the api instance before calling the ChainStore"))};return new Promise(function(t,e){return r(t,e)})}},{key:"onUpdate",value:function(t){for(var e=0;e<t.length;++e)for(var r=0;r<t[e].length;++r){var n=t[e][r];if(_.is_object_id(n)){if(0==n.search(T)){var i=this.objects_by_id.get(n);if(!i)return;g.emit("cancel-order",i.get("id"));var o=this.objects_by_id.get(i.get("seller"));if(o&&o.has("orders")){var s=o.get("orders");o.get("orders").has(n)&&(o=o.set("orders",s.delete(n)),this.objects_by_id=this.objects_by_id.set(o.get("id"),o))}}if(0==n.search(A)){var a=this.objects_by_id.get(n);if(!a)return;g.emit("close-call",a.get("id"));var f=this.objects_by_id.get(a.get("borrower"));if(f&&f.has("call_orders")){var u=f.get("call_orders");f.get("call_orders").has(n)&&(f=f.set("call_orders",u.delete(n)),this.objects_by_id=this.objects_by_id.set(f.get("id"),f))}}this.objects_by_id=this.objects_by_id.set(n,null)}else this._updateObject(n,!1)}this.notifySubscribers()}},{key:"notifySubscribers",value:function(){var t=this;this.dispatched||(this.dispatched=!0,setTimeout(function(){t.dispatched=!1,t.subscribers.forEach(function(t){t()})},this.dispatchFrequency))}},{key:"subscribe",value:function(t){this.subscribers.has(t)&&console.error("Subscribe callback already exists",t),this.subscribers.add(t)}},{key:"unsubscribe",value:function(t){this.subscribers.has(t)||console.error("Unsubscribe callback does not exists",t),this.subscribers.delete(t)}},{key:"clearObjectCache",value:function(t){this.objects_by_id=this.objects_by_id.delete(t)}},{key:"getObject",value:function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if(!_.is_object_id(t))throw Error("argument is not an object id: "+JSON.stringify(t));var r=this.objects_by_id.get(t);if(void 0===r||e)return this.fetchObject(t,e);if(r!==!0)return r}},{key:"getAsset",value:function(t){var e=this;if(!t)return null;if(_.is_object_id(t)){var r=this.getObject(t);if(r&&r.get("bitasset")&&!r.getIn(["bitasset","current_feed"]))return;return r}var n=this.assets_by_symbol.get(t);if(_.is_object_id(n)){var i=this.getObject(n);if(i&&i.get("bitasset")&&!i.getIn(["bitasset","current_feed"]))return;return i}return null===n?null:void(n!==!0&&h.instance().db_api().exec("lookup_asset_symbols",[[t]]).then(function(r){r.length&&r[0]?e._updateObject(r[0],!0):(e.assets_by_symbol=e.assets_by_symbol.set(t,null),e.notifySubscribers())}).catch(function(r){console.log("Error: ",r),e.assets_by_symbol=e.assets_by_symbol.delete(t)}))}},{key:"getAccountRefsOfKey",value:function(t){var e=this;return this.get_account_refs_of_keys_calls.has(t)?this.account_ids_by_key.get(t):(this.get_account_refs_of_keys_calls=this.get_account_refs_of_keys_calls.add(t),void h.instance().db_api().exec("get_key_references",[[t]]).then(function(r){var n=u.Set();r=r[0],n=n.withMutations(function(t){for(var e=0;e<r.length;++e)t.add(r[e])}),e.account_ids_by_key=e.account_ids_by_key.set(t,n),e.notifySubscribers()},function(r){e.account_ids_by_key=e.account_ids_by_key.delete(t),e.get_account_refs_of_keys_calls=e.get_account_refs_of_keys_calls.delete(t)}))}},{key:"getBalanceObjects",value:function(t){var e=this,r=this.balance_objects_by_address.get(t);return void 0===r&&(this.balance_objects_by_address=this.balance_objects_by_address.set(t,u.Set()),h.instance().db_api().exec("get_balance_objects",[[t]]).then(function(r){for(var n=new Set,i=0;i<r.length;++i)e._updateObject(r[i]),n.add(r[i].id);e.balance_objects_by_address=e.balance_objects_by_address.set(t,u.Set(n)),e.notifySubscribers()},function(r){e.balance_objects_by_address=e.balance_objects_by_address.delete(t)})),this.balance_objects_by_address.get(t)}},{key:"fetchObject",value:function(t){var e=this,r=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if("string"!=typeof t){for(var n=[],i=0;i<t.length;++i)n.push(this.fetchObject(t[i]));return n}if(N&&console.log("!!! fetchObject: ",t,this.subscribed,!this.subscribed&&!r),this.subscribed||r){if(N&&console.log("maybe fetch object: ",t),!_.is_object_id(t))throw Error("argument is not an object id: "+t);if("1.2."==t.substring(0,4))return this.fetchFullAccount(t);var o=this.objects_by_id.get(t);if(void 0===o)N&&console.log("fetching object: ",t),this.objects_by_id=this.objects_by_id.set(t,!0),h.instance().db_api().exec("get_objects",[[t]]).then(function(r){for(var n=0;n<r.length;n++){var i=r[n];i?e._updateObject(i,!0):(e.objects_by_id=e.objects_by_id.set(t,null),e.notifySubscribers())}}).catch(function(r){console.log("!!! Chain API error",r),e.objects_by_id=e.objects_by_id.delete(t)});else if(o===!0)return;return o}}},{key:"getAccount",value:function(t){if(!t)return null;if("object"===("undefined"==typeof t?"undefined":a(t)))return t.id?this.getAccount(t.id):t.get?this.getAccount(t.get("id")):void 0;
if(_.is_object_id(t)){var e=this.getObject(t);return null===e?null:void 0===e||void 0===e.get("name")?this.fetchFullAccount(t):e}if(_.is_account_name(t,!0)){var r=this.accounts_by_name.get(t);return null===r?null:void 0===r?this.fetchFullAccount(t):this.getObject(r)}}},{key:"getWitnessById",value:function(t){var e=this.witness_by_account_id.get(t);return void 0===e?void this.fetchWitnessByAccount(t):e?this.getObject(e):null}},{key:"getCommitteeMemberById",value:function(t){var e=this.committee_by_account_id.get(t);return void 0===e?void this.fetchCommitteeMemberByAccount(t):e?this.getObject(e):null}},{key:"getWitness",value:function(t){var e=this.getAccount(t);if(!e)return null;var r=e.get("id"),n=this.witness_by_account_id.get(r);return void 0===n&&this.fetchWitnessByAccount(r),this.getObject(n)}},{key:"getCommitteeMember",value:function(t){var e=this,r=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(_.is_account_name(t,!0)||"1.2."==t.substring(0,4)){var n=this.getAccount(t);if(n){var i=function(){var t=n.get("id"),i=e.committee_by_account_id.get(t);return _.is_object_id(i)?{v:e.getObject(i,r)}:void(void 0==i&&e.fetchCommitteeMemberByAccount(t).then(function(n){e.committee_by_account_id.set(t,n?n.get("id"):null),r&&n&&r()}))}();if("object"===("undefined"==typeof i?"undefined":a(i)))return i.v}else this.lookupAccountByName(t).then(function(t){var n=t.get("id"),i=e.committee_by_account_id.get(n);return _.is_object_id(i)?e.getObject(i,r):void(void 0==i&&e.fetchCommitteeMemberByAccount(n).then(function(t){e.committee_by_account_id.set(n,t?t.get("id"):null),r&&t&&r()}))},function(r){e.committee_by_account_id.set(t,null)})}return null}},{key:"fetchWitnessByAccount",value:function(t){var e=this;return new Promise(function(r,n){h.instance().db_api().exec("get_witness_by_account",[t]).then(function(n){if(n){e.witness_by_account_id=e.witness_by_account_id.set(n.witness_account,n.id);var i=e._updateObject(n,!0);r(i)}else e.witness_by_account_id=e.witness_by_account_id.set(t,null),e.notifySubscribers(),r(null)},n)})}},{key:"fetchCommitteeMemberByAccount",value:function(t){var e=this;return new Promise(function(r,n){h.instance().db_api().exec("get_committee_member_by_account",[t]).then(function(n){if(n){e.committee_by_account_id=e.committee_by_account_id.set(n.committee_member_account,n.id);var i=e._updateObject(n,!0);r(i)}else e.committee_by_account_id=e.committee_by_account_id.set(t,null),e.notifySubscribers(),r(null)},n)})}},{key:"fetchFullAccount",value:function(t){var e=this;N&&console.log("Fetch full account: ",t);var r=!1;if(_.is_object_id(t)){var n=this.objects_by_id.get(t);if(r=void 0===n,!r&&r.get("name"))return n}else{if(!_.is_account_name(t,!0))throw Error("argument is not an account name: "+t);var i=this.accounts_by_name.get(t);if(_.is_object_id(i))return this.getAccount(i)}(!this.fetching_get_full_accounts.has(t)||Date.now()-this.fetching_get_full_accounts.get(t)>5e3)&&(this.fetching_get_full_accounts.set(t,Date.now()),h.instance().db_api().exec("get_full_accounts",[[t],!0]).then(function(r){if(0===r.length)return void(_.is_object_id(t)&&(e.objects_by_id=e.objects_by_id.set(t,null),e.notifySubscribers()));var n=r[0][1];N&&console.log("full_account: ",n);var i=n.account,o=n.vesting_balances,s=n.statistics,a=n.call_orders,f=n.limit_orders,c=n.referrer_name,h=n.registrar_name,l=n.lifetime_referrer_name,p=n.votes,d=n.proposals;e.accounts_by_name=e.accounts_by_name.set(i.name,i.id),i.referrer_name=c,i.lifetime_referrer_name=l,i.registrar_name=h,i.balances={},i.orders=new u.Set,i.vesting_balances=new u.Set,i.balances=new u.Map,i.call_orders=new u.Set,i.proposals=new u.Set,i.vesting_balances=i.vesting_balances.withMutations(function(t){o.forEach(function(r){e._updateObject(r,!1),t.add(r.id)})}),p.forEach(function(t){return e._updateObject(t,!1)}),i.balances=i.balances.withMutations(function(t){n.balances.forEach(function(r){e._updateObject(r,!1),t.set(r.asset_type,r.id)})}),i.orders=i.orders.withMutations(function(t){f.forEach(function(r){e._updateObject(r,!1),t.add(r.id)})}),i.call_orders=i.call_orders.withMutations(function(t){a.forEach(function(r){e._updateObject(r,!1),t.add(r.id)})}),i.proposals=i.proposals.withMutations(function(t){d.forEach(function(r){e._updateObject(r,!1),t.add(r.id)})}),e._updateObject(s,!1);var v=e._updateObject(i,!1);e.fetchRecentHistory(v),e.notifySubscribers()},function(r){console.log("Error: ",r),_.is_object_id(t)?e.objects_by_id=e.objects_by_id.delete(t):e.accounts_by_name=e.accounts_by_name.delete(t)}))}},{key:"getAccountMemberStatus",value:function(t){if(void 0!==t){if(null===t)return"unknown";if(t.get("lifetime_referrer")==t.get("id"))return"lifetime";var e=new Date(t.get("membership_expiration_date")).getTime(),r=(new Date).getTime();return e<r?"basic":"annual"}}},{key:"getAccountBalance",value:function(t,e){var r=t.get("balances");if(!r)return 0;var n=r.get(e);if(n){var i=this.objects_by_id.get(n);if(i)return i.get("balance")}return 0}},{key:"fetchRecentHistory",value:function(t){var e=this,r=arguments.length<=1||void 0===arguments[1]?100:arguments[1],n=t;if(!_.is_object_id(n)&&t.toJS&&(n=t.get("id")),_.is_object_id(n)&&(t=this.objects_by_id.get(n))){var i=this.account_history_requests.get(n);if(i)return i.requests++,i.promise;i={requests:0};var o="1."+b+".0",s=t.get("history");s&&s.size&&(o=s.first().get("id"));var a="1."+b+".0";return i.promise=new Promise(function(t,i){h.instance().history_api().exec("get_account_history",[n,o,r,a]).then(function(o){var s=e.objects_by_id.get(n),a=s.get("history");a||(a=u.List());var f=u.fromJS(o);f=f.withMutations(function(t){for(var e=0;e<a.size;++e)t.push(a.get(e))});var c=s.set("history",f);e.objects_by_id=e.objects_by_id.set(n,c);var h=e.account_history_requests.get(n);e.account_history_requests.delete(n),h.requests>0?e.fetchRecentHistory(c,r).then(t,i):t(c)})}),this.account_history_requests.set(n,i),i.promise}}},{key:"_updateObject",value:function(t,e){var r=arguments.length<=2||void 0===arguments[2]||arguments[2];if(!("id"in t))return console.log("object with no id:",t),void("balance"in t&&"owner"in t&&"settlement_date"in t&&g.emit("settle-order-update",t));"2.1.0"==t.id&&(t.participation=100*(v(t.recent_slots_filled).bitCount()/128),this.head_block_time_string=t.time,this.chain_time_offset.push(Date.now()-s(t.time).getTime()),this.chain_time_offset.length>10&&this.chain_time_offset.shift());var n=this.objects_by_id.get(t.id);n||(n=u.Map());var i=n;if(void 0===n||n===!0?this.objects_by_id=this.objects_by_id.set(t.id,n=u.fromJS(t)):this.objects_by_id=this.objects_by_id.set(t.id,n=n.mergeDeep(u.fromJS(t))),t.id.substring(0,j.length)==j){var o=this.objects_by_id.get(t.owner);if(void 0===o||null===o)return;var a=o.get("balances");a||(o=o.set("balances",u.Map())),o=o.setIn(["balances",t.asset_type],t.id),this.objects_by_id=this.objects_by_id.set(t.owner,o)}else if(t.id.substring(0,L.length)==L){var f=i?i.get("most_recent_op"):"2.9.0";f!=t.most_recent_op&&this.fetchRecentHistory(t.owner)}else if(t.id.substring(0,z.length)==z)this.witness_by_account_id.set(t.witness_account,t.id),this.objects_by_vote_id.set(t.vote_id,t.id);else if(t.id.substring(0,q.length)==q)this.committee_by_account_id.set(t.committee_member_account,t.id),this.objects_by_vote_id.set(t.vote_id,t.id);else if(t.id.substring(0,C.length)==C)n=n.set("active",u.fromJS(t.active)),n=n.set("owner",u.fromJS(t.owner)),n=n.set("options",u.fromJS(t.options)),n=n.set("whitelisting_accounts",u.fromJS(t.whitelisting_accounts)),n=n.set("blacklisting_accounts",u.fromJS(t.blacklisting_accounts)),n=n.set("whitelisted_accounts",u.fromJS(t.whitelisted_accounts)),n=n.set("blacklisted_accounts",u.fromJS(t.blacklisted_accounts)),this.objects_by_id=this.objects_by_id.set(t.id,n),this.accounts_by_name=this.accounts_by_name.set(t.name,t.id);else if(t.id.substring(0,U.length)==U){this.assets_by_symbol=this.assets_by_symbol.set(t.symbol,t.id);var c=n.get("dynamic");if(!c){var h=this.getObject(t.dynamic_asset_data_id,!0);h||(h=u.Map()),h.get("asset_id")||(h=h.set("asset_id",t.id)),this.objects_by_id=this.objects_by_id.set(t.dynamic_asset_data_id,h),n=n.set("dynamic",h),this.objects_by_id=this.objects_by_id.set(t.id,n)}var l=n.get("bitasset");if(!l&&t.bitasset_data_id){var p=this.getObject(t.bitasset_data_id,!0);p||(p=u.Map()),p.get("asset_id")||(p=p.set("asset_id",t.id)),this.objects_by_id=this.objects_by_id.set(t.bitasset_data_id,p),n=n.set("bitasset",p),this.objects_by_id=this.objects_by_id.set(t.id,n)}}else if(t.id.substring(0,R.length)==R){var d=n.get("asset_id");if(d){var _=this.getObject(d);_&&_.set&&(_=_.set("dynamic",n),this.objects_by_id=this.objects_by_id.set(d,_))}}else if(t.id.substring(0,M.length)==M)this.objects_by_vote_id.set(t.vote_for,t.id),this.objects_by_vote_id.set(t.vote_against,t.id);else if(t.id.substring(0,D.length)==D){var y=n.get("asset_id");if(y){var b=this.getObject(y);b&&(b=b.set("bitasset",n),g.emit("bitasset-update",b),this.objects_by_id=this.objects_by_id.set(y,b))}}else if(t.id.substring(0,A.length)==A){r&&g.emit("call-order-update",t);var m=this.objects_by_id.get(t.borrower);if(m&&m.has("call_orders")){var w=m.get("call_orders");w.has(t.id)||(m=m.set("call_orders",w.add(t.id)),this.objects_by_id=this.objects_by_id.set(m.get("id"),m))}}else if(t.id.substring(0,T.length)==T){var E=this.objects_by_id.get(t.seller);if(E&&E.has("orders")){var S=E.get("orders");S.has(t.id)||(E=E.set("orders",S.add(t.id)),this.objects_by_id=this.objects_by_id.set(E.get("id"),E))}}else t.id.substring(0,O.length)==O&&(this.addProposalData(t.required_active_approvals,t.id),this.addProposalData(t.required_owner_approvals,t.id));return e&&this.notifySubscribers(),n}},{key:"getObjectsByVoteIds",value:function(t){for(var e=this,r=[],n=[],i=0;i<t.length;++i){var o=this.objects_by_vote_id.get(t[i]);o?r.push(this.getObject(o)):(r.push(null),n.push(t[i]))}return n.length&&h.instance().db_api().exec("lookup_vote_ids",[n]).then(function(t){console.log("missing ===========> ",n),console.log("vote objects ===========> ",t);for(var r=0;r<t.length;++r)t[r]&&e._updateObject(t[r])},function(t){return console.log("Error looking up vote ids: ",t)}),r}},{key:"getObjectByVoteID",value:function(t){var e=this.objects_by_vote_id.get(t);if(e)return this.getObject(e)}},{key:"getHeadBlockDate",value:function(){return s(this.head_block_time_string)}},{key:"getEstimatedChainTimeOffset",value:function(){if(0===this.chain_time_offset.length)return 0;var t=u.List(this.chain_time_offset).sort().get(Math.floor((this.chain_time_offset.length-1)/2));return t}},{key:"addProposalData",value:function(t,e){var r=this;t.forEach(function(t){var n=r.objects_by_id.get(t);if(n){var i=n.get("proposals");i.includes(e)||(i=i.add(e),n=n.set("proposals",i),r._updateObject(n.toJS(),!1))}})}}]),t}(),F=new P;F.FetchChainObjects=i,F.FetchChain=o,t.exports=F},function(t,e,r){"use strict";var n=function(){function t(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}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o=r(3);t.exports={toImpliedDecimal:function(t,e){"number"==typeof t?(o(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString()),o("string"==typeof t,"number should be an actual number or string: "+("undefined"==typeof t?"undefined":i(t))),t=t.trim(),o(/^[0-9]*\.?[0-9]*$/.test(t),"Invalid decimal number "+t);var r=t.split("."),s=n(r,2),a=s[0],f=void 0===a?"":a,u=s[1],c=void 0===u?"":u,h=e-c.length;o(h>=0,"Too many decimal digits in "+t+" to create an implied decimal of "+e);for(var l=0;l<h;l++)c+="0";for(;"0"===f.charAt(0);)f=f.substring(1);return f+c}}},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=this;return new Promise(function(r,n){if(e.signed||e.sign(),!e.tr_buffer)throw new Error("not finalized");if(!e.signatures.length)throw new Error("not signed");if(!e.operations.length)throw new Error("no operations");var i=v.signed_transaction.toObject(e);g.instance().network_api().exec("broadcast_transaction_with_callback",[function(t){return r(t)},i]).then(function(){t&&t()}).catch(function(t){console.log(t);var r=t.message;r||(r=""),n(new Error(r+"\ngraphene-crypto digest "+d.sha256(e.tr_buffer).toString("hex")+" transaction "+e.tr_buffer.toString("hex")+" "+JSON.stringify(i)))})})}function o(){return s(a)}function s(t){return t?(/Z$/.test(t)||(t+="Z"),new Date(t)):new Date("1970-01-01T00:00:00.000Z")}var a,f=function(){function t(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}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(3),h=r(17),l=h.Signature,p=h.PublicKey,d=h.hash,_=r(21),v=_.ops,y=r(7),g=y.Apis,b=y.ChainConfig,m=r(14),w=function(){function t(){n(this,t),this.ref_block_num=0,this.ref_block_prefix=0,this.expiration=0,this.operations=[],this.signatures=[],this.signer_private_keys=[],this._broadcast=i.bind(this)}return u(t,[{key:"add_type_operation",value:function(t,e){this.add_operation(this.get_type_operation(t,e))}},{key:"process_transaction",value:function(t){var e=this,r=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],i=t.wallet.wallet_object;return g.instance().chain_id!==i.get("chain_id")?Promise.reject("Mismatched chain_id; expecting "+i.get("chain_id")+", but got "+g.instance().chain_id):this.set_required_fees().then(function(){var i={};if(r){var o=t.getPubkeys_having_PrivateKey(r);if(!o.length)throw new Error("Missing signing key");var s=!0,a=!1,f=void 0;try{for(var u,c=o[Symbol.iterator]();!(s=(u=c.next()).done);s=!0){var h=u.value,l=t.getPrivateKey(h);e.add_signer(l,h),i[h]=!0}}catch(t){a=!0,f=t}finally{try{!s&&c.return&&c.return()}finally{if(a)throw f}}}return e.get_potential_signatures().then(function(r){var n=r.pubkeys,o=r.addys,s=t.getPubkeys_having_PrivateKey(n,o);return e.get_required_signatures(s).then(function(r){var n=!0,o=!1,s=void 0;try{for(var a,f=r[Symbol.iterator]();!(n=(a=f.next()).done);n=!0){var u=a.value;if(!i[u]){var c=t.getPrivateKey(u);if(!c)throw new Error("Missing signing key for "+u);e.add_signer(c,u)}}}catch(t){o=!0,s=t}finally{try{!n&&f.return&&f.return()}finally{if(o)throw s}}})}).then(function(){return n?e.broadcast():e.serialize()})})}},{key:"finalize",value:function(){var t=this;return new Promise(function(r,n){if(t.tr_buffer)throw new Error("already finalized");r(g.instance().db_api().exec("get_objects",[["2.1.0"]]).then(function(r){a=r[0].time,0===t.expiration&&(t.expiration=E()+b.expire_in_secs),t.ref_block_num=65535&r[0].head_block_number,t.ref_block_prefix=new e(r[0].head_block_id,"hex").readUInt32LE(4);for(var n,i=t.operations,o=0;o<i.length;o++)n=i[o],n[1].finalize&&n[1].finalize();t.tr_buffer=v.transaction.toBuffer(t)}))})}},{key:"id",value:function(){if(!this.tr_buffer)throw new Error("not finalized");return d.sha256(this.tr_buffer).toString("hex").substring(0,40)}},{key:"add_operation",value:function(t){if(this.tr_buffer)throw new Error("already finalized");if(c(t,"operation"),!Array.isArray(t))throw new Error("Expecting array [operation_id, operation]");this.operations.push(t)}},{key:"get_type_operation",value:function(t,e){if(this.tr_buffer)throw new Error("already finalized");c(t,"name"),c(e,"operation");var r=v[t];c(r,"Unknown operation "+t);var n=m.operations[r.operation_name];if(void 0===n)throw new Error("unknown operation: "+r.operation_name);e.fee||(e.fee={amount:0,asset_id:0}),"proposal_create"===t&&(e.expiration_time||(e.expiration_time=E()+b.expire_in_secs_proposal));var i=r.fromObject(e);return[n,i]}},{key:"set_expire_seconds",value:function(t){if(this.tr_buffer)throw new Error("already finalized");return this.expiration=E()+t}},{key:"propose",value:function(t){if(this.tr_buffer)throw new Error("already finalized");if(!this.operations.length)throw new Error("add operation first");c(t,"proposal_create_options"),c(t.fee_paying_account,"proposal_create_options.fee_paying_account");var e=this.operations.map(function(t){return{op:t}});return this.operations=[],this.signatures=[],this.signer_private_keys=[],t.proposed_ops=e,this.add_type_operation("proposal_create",t),this}},{key:"has_proposed_operation",value:function(){for(var t=!1,e=0;e<this.operations.length;e++)if("proposed_ops"in this.operations[e][1]){t=!0;break}return t}},{key:"set_required_fees",value:function(t){var e,r=this;if(this.tr_buffer)throw new Error("already finalized");if(!this.operations.length)throw new Error("add operations first");for(var n,i=[],o=0;o<this.operations.length;o++)n=this.operations[o],i.push(v.operation.toObject(n));if(!t){var s=i[0][1].fee;t=s&&null!==s.asset_id?s.asset_id:"1.3.0"}var a=[g.instance().db_api().exec("get_required_fees",[i,t])];return"1.3.0"!==t&&(a.push(g.instance().db_api().exec("get_required_fees",[i,"1.3.0"])),a.push(g.instance().db_api().exec("get_objects",[[t]]))),Promise.all(a).then(function(n){var i=f(n,3),o=i[0],s=i[1],a=i[2];a=a?a[0]:null;var u="1.3.0"!==t&&a?g.instance().db_api().exec("get_objects",[[a.dynamic_asset_data_id]]):new Promise(function(t,e){t()});u.then(function(n){if("1.3.0"!==t){e=n?n[0].fee_pool:0;for(var i,a=0,f=0;f<s.length;f++)i=s[f],a+=i.amount;a>parseInt(e,10)&&(o=s,t="1.3.0")}var u=[],c=function t(e){if(Array.isArray(e))for(var r,n=0;n<e.length;n++)r=e[n],t(r);else u.push(e)};c(o);for(var h=0,l=function t(e){if((!e.fee||0===e.fee.amount||e.fee.amount.toString&&"0"===e.fee.amount.toString())&&(e.fee=u[h]),h++,e.proposed_ops){for(var r=[],n=0;n<e.proposed_ops.length;n++)r.push(t(e.proposed_ops[n].op[1]));return r}},p=0;p<r.operations.length;p++)l(r.operations[p][1])})})}},{key:"get_potential_signatures",value:function(){var t=v.signed_transaction.toObject(this);return Promise.all([g.instance().db_api().exec("get_potential_signatures",[t]),g.instance().db_api().exec("get_potential_address_signatures",[t])]).then(function(t){return{pubkeys:t[0],addys:t[1]}})}},{key:"get_required_signatures",value:function(t){if(!t.length)return Promise.resolve([]);var e=v.signed_transaction.toObject(this);return g.instance().db_api().exec("get_required_signatures",[e,t]).then(function(t){return t})}},{key:"add_signer",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?t.toPublicKey():arguments[1];if(c(t.d,"required PrivateKey object"),this.signed)throw new Error("already signed");e.Q||(e=p.fromPublicKeyString(e));var r=t.toHex(),n=!0,i=!1,o=void 0;try{for(var s,a=this.signer_private_keys[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var f=s.value;if(f[0].toHex()===r)return}}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}this.signer_private_keys.push([t,e])}},{key:"sign",value:function(){var t=arguments.length<=0||void 0===arguments[0]?g.instance().chain_id:arguments[0];if(!this.tr_buffer)throw new Error("not finalized");if(this.signed)throw new Error("already signed");if(!this.signer_private_keys.length)throw new Error("Transaction was not signed. Do you have a private key? [no_signers]");for(var r=this.signer_private_keys.length,n=0;0<r?n<r:n>r;0<r?n++:n++){var i=f(this.signer_private_keys[n],2),o=i[0],s=i[1],a=l.signBuffer(e.concat([new e(t,"hex"),this.tr_buffer]),o,s);this.signatures.push(a.toBuffer())}this.signer_private_keys=[],this.signed=!0}},{key:"serialize",value:function(){return v.signed_transaction.toObject(this)}},{key:"toObject",value:function(){return v.signed_transaction.toObject(this)}},{key:"broadcast",value:function(t){var e=this;return this.tr_buffer?this._broadcast(t):this.finalize().then(function(){return e._broadcast(t)})}}]),t}(),E=function(){var t=Math.ceil(o().getTime()/1e3),e=Math.ceil(Date.now()/1e3);return e-t>30?t:Math.max(e,t)};t.exports=w}).call(e,r(1).Buffer)},function(t,e,r){"use strict";var n;t.exports=n={};var i=r(46),o=r(12),s=o.Long,a=r(17),f=a.Signature,u=r(21),c=u.ops,h=r(7),l=h.Apis;n.unique_nonce_entropy=null,n.unique_nonce_uint64=function(){var t=n.unique_nonce_entropy=function(){return null===n.unique_nonce_entropy?parseInt(i.randomUint8Array(1)[0]):++n.unique_nonce_entropy%256}(),e=s.fromNumber(Date.now());return e=e.shiftLeft(8).or(s.fromNumber(t)),e.toString()},n.to_json=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];return function(t,e){var r=c.signed_transaction.toObject(t);if(e){var n=l.instance().network_api();return console.log("... tr_object",JSON.stringify(r)),n.exec("broadcast_transaction",[r])}return r}(t,e)},n.signed_tr_json=function(t,e){var r=c.transaction.toBuffer(t);return t=c.transaction.toObject(t),t.signatures=function(){for(var t=[],n=0;0<e.length?n<e.length:n>e.length;0<e.length?n++:n++){var i=e[n];t.push(f.signBuffer(r,i).toHex())}return t}(),t},n.expire_in_min=function(t){return Math.round(Date.now()/1e3)+60*t},n.seconds_from_now=function(t){return Math.round(Date.now()/1e3)+t},n.template=function(t){var e=arguments.length<=1||void 0===arguments[1]?{use_default:!0,annotate:!0}:arguments[1],r=type[t];if(!r)throw new Error("unknown serializer_operation_type "+t);return r.toObject(void 0,e)},n.new_operation=function(t){var e=type[t];if(!e)throw new Error("unknown serializer_operation_type "+t);var r=e.toObject(void 0,{use_default:!0,annotate:!0});return e.fromObject(r)},n.instance=function(t){return t.substring("0.0.".length)}},function(t,e){"use strict";function r(t){return function(e){return t[e]||""}}function n(t){return function(e,r){return t[e]=r,this}}t.exports={get:r,set:n}},function(t,e){"use strict";t.exports=function(t){if("string"!=typeof t)throw new Error("string required for brainKey");return t=t.trim(),t.split(/[\t\n\v\f\r ]+/).join(" ")}},function(t,e,r){(function(e){"use strict";function n(t,r,n,i,o){h("Buffer",r),h(l,n),o&&(r=c.sha256(e.concat([r,new e(o)]))),u.equal(r.length,32,"Hash must be 256 bit");var s=n.toBuffer(32),a=new e(32),f=new e(32);f.fill(1),a.fill(0),a=c.HmacSHA256(e.concat([f,new e([0]),s,r]),a),f=c.HmacSHA256(f,a),a=c.HmacSHA256(e.concat([f,new e([1]),s,r]),a),f=c.HmacSHA256(f,a),f=c.HmacSHA256(f,a);for(var p=l.fromBuffer(f);p.signum()<=0||p.compareTo(t.n)>=0||!i(p);)a=c.HmacSHA256(e.concat([f,new e([0])]),a),f=c.HmacSHA256(f,a),f=c.HmacSHA256(f,a),p=l.fromBuffer(f);return p}function i(t,e,r,i){var o,s,a=l.fromBuffer(e),f=t.n,u=t.G,c=(n(t,e,r,function(e){var n=u.multiply(e);return!t.isInfinity(n)&&(o=n.affineX.mod(f),0!==o.signum()&&(s=e.modInverse(f).multiply(a.add(r.multiply(o))).mod(f),0!==s.signum()))},i),f.shiftRight(1));return s.compareTo(c)>0&&(s=f.subtract(s)),new p(o,s)}function o(t,e,r,n){var i=t.n,o=t.G,s=r.r,a=r.s;if(s.signum()<=0||s.compareTo(i)>=0)return!1;if(a.signum()<=0||a.compareTo(i)>=0)return!1;var f=a.modInverse(i),u=e.multiply(f).mod(i),c=s.multiply(f).mod(i),h=o.multiplyTwo(u,n,c);if(t.isInfinity(h))return!1;var l=h.affineX,p=l.mod(i);return p.equals(s)}function s(t,e,r,n){var i=l.fromBuffer(e);return o(t,i,r,n)}function a(t,e,r,n){u.strictEqual(3&n,n,"Recovery param is more than two bits");var i=t.n,o=t.G,s=r.r,a=r.s;u(s.signum()>0&&s.compareTo(i)<0,"Invalid r value"),u(a.signum()>0&&a.compareTo(i)<0,"Invalid s value");var f=1&n,c=n>>1,h=c?s.add(i):s,l=t.pointFromX(f,h),p=l.multiply(i);u(t.isInfinity(p),"nR is not a valid curve point");var d=e.negate().mod(i),_=s.modInverse(i),v=l.multiplyTwo(a,o,d).multiply(_);return t.validate(v),v}function f(t,e,r,n){for(var i=0;i<4;i++){var o=a(t,e,r,i);if(o.equals(n))return i}throw new Error("Unable to find valid recovery factor")}var u=r(3),c=r(6),h=r(38),l=r(4),p=r(94);t.exports={calcPubKeyRecoveryParam:f,deterministicGenerateK:n,recoverPubKey:a,sign:i,verify:s,verifyRaw:o}}).call(e,r(1).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){o(s,t),o(s,e),this.r=t,this.s=e}var i=r(3),o=r(38),s=r(4);n.parseCompact=function(t){i.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;i.equal(e,7&e,"Invalid signature parameter");var r=!!(4&e);e&=3;var o=s.fromBuffer(t.slice(1,33)),a=s.fromBuffer(t.slice(33));return{compressed:r,i:e,signature:new n(o,a)}},n.fromDER=function(t){i.equal(t.readUInt8(0),48,"Not a DER sequence"),i.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),i.equal(t.readUInt8(2),2,"Expected a DER integer");var e=t.readUInt8(3);i(e>0,"R length is zero");var r=4+e;i.equal(t.readUInt8(r),2,"Expected a DER integer (2)");var o=t.readUInt8(r+1);i(o>0,"S length is zero");var a=t.slice(4,r),f=t.slice(r+2);r+=2+o,e>1&&0===a.readUInt8(0)&&i(128&a.readUInt8(1),"R value excessively padded"),o>1&&0===f.readUInt8(0)&&i(128&f.readUInt8(1),"S value excessively padded"),i.equal(r,t.length,"Invalid DER encoding");var u=s.fromDERInteger(a),c=s.fromDERInteger(f);return i(u.signum()>=0,"R value is negative"),i(c.signum()>=0,"S value is negative"),new n(u,c)},n.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),r=e&-129;return i(r>0&&r<4,"Invalid hashType"),{signature:n.fromDER(t.slice(0,-1)),hashType:e}},n.prototype.toCompact=function(t,r){r&&(t+=4),t+=27;var n=new e(65);return n.writeUInt8(t,0),this.r.toBuffer(32).copy(n,1),this.s.toBuffer(32).copy(n,33),n},n.prototype.toDER=function(){var t=this.r.toDERInteger(),r=this.s.toDERInteger(),n=[];return n.push(2,t.length),n=n.concat(t),n.push(2,r.length),n=n.concat(r),n.unshift(48,n.length),new e(n)},n.prototype.toScriptSignature=function(t){var r=new e(1);return r.writeUInt8(t,0),e.concat([this.toDER(),r])},t.exports=n}).call(e,r(1).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(93),s=r(6),a=r(16),f=a.getCurveByName,u=f("secp256k1"),c=r(3),h=r(4),l=r(15),p=function(){function t(e,r,i){n(this,t),this.r=e,this.s=r,this.i=i,c.equal(null!=this.r,!0,"Missing parameter"),c.equal(null!=this.s,!0,"Missing parameter"),c.equal(null!=this.i,!0,"Missing parameter")}return i(t,[{key:"toBuffer",value:function(){var t;return t=new e(65),t.writeUInt8(this.i,0),this.r.toBuffer(32).copy(t,1),this.s.toBuffer(32).copy(t,33),t}},{key:"recoverPublicKeyFromBuffer",value:function(t){return this.recoverPublicKey(s.sha256(t))}},{key:"recoverPublicKey",value:function(t){var e=void 0,r=void 0,n=void 0;return r=h.fromBuffer(t),n=this.i,n-=27,n&=3,e=o.recoverPubKey(u,r,this,n),l.fromPoint(e)}},{key:"verifyBuffer",value:function(t,e){var r=s.sha256(t);return this.verifyHash(r,e)}},{key:"verifyHash",value:function(t,e){return c.equal(t.length,32,"A SHA 256 should be 32 bytes long, instead got "+t.length),o.verify(u,t,{r:this.r,s:this.s},e.Q)}},{key:"toByteBuffer",value:function(){var t;return t=new ByteBuffer(ByteBuffer.DEFAULT_CAPACITY,ByteBuffer.LITTLE_ENDIAN),this.appendByteBuffer(t),t.copy(0,t.offset)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"verifyHex",value:function(t,r){var n;return n=new e(t,"hex"),this.verifyBuffer(n,r)}}],[{key:"fromBuffer",value:function(e){var r,n,i;return c.equal(e.length,65,"Invalid signature length"),r=e.readUInt8(0),c.equal(r-27,r-27&7,"Invalid signature parameter"),n=h.fromBuffer(e.slice(1,33)),i=h.fromBuffer(e.slice(33)),new t(n,i,r)}},{key:"signBuffer",value:function(e,r){var n=s.sha256(e);return t.signBufferSha256(n,r)}},{key:"signBufferSha256",value:function(r,n){if(32!==r.length||!e.isBuffer(r))throw new Error("buf_sha256: 32 byte buffer requred");var i,s,a,f,c,l,p;for(f=null,p=0,s=h.fromBuffer(r);;){if(a=o.sign(u,r,n.d,p++),i=a.toDER(),c=i[3],l=i[5+c],32===c&&32===l){f=o.calcPubKeyRecoveryParam(u,s,a,n.toPublicKey().Q),f+=4,f+=27;break}p%10===0&&console.log("WARN: "+p+" attempts to find canonical signature")}return new t(a.r,a.s,f)}},{key:"sign",value:function(r,n){return t.signBuffer(new e(r),n)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"signHex",value:function(r,n){var i;return i=new e(r,"hex"),t.signBuffer(i,n)}}]),t}();t.exports=p}).call(e,r(1).Buffer)},function(t,e,r){"use strict";t.exports=Object.assign(r(85),r(17),r(21))},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(){function t(e,n){r(this,t),this.message=e,("undefined"!=typeof n&&null!==n?n.message:void 0)&&(this.message="cause\t"+n.message+"\t"+this.message);var i="";("undefined"!=typeof n&&null!==n?n.stack:void 0)&&(i="caused by\n\t"+n.stack+"\t"+i),this.stack=this.message+"\n"+i}return n(t,null,[{key:"throw",value:function(t,e){var r=t;throw("undefined"!=typeof e&&null!==e?e.message:void 0)&&(r+="\t cause: "+e.message+" "),("undefined"!=typeof e&&null!==e?e.stack:void 0)&&(r+="\n stack: "+e.stack+" "),new Error(r)}}]),t}();t.exports=i},function(t,e,r){"use strict";var n=r(41),i=r(40),o=n.uint8,s=n.uint16,a=n.uint32,f=n.int64,u=n.uint64,c=n.string,h=n.bytes,l=n.bool,p=n.array,d=(n.fixed_array,n.protocol_id_type),_=n.object_id_type,v=n.vote_id,y=n.future_extensions,g=n.static_variant,b=n.map,m=n.set,w=n.public_key,E=n.address,S=n.time_point_sec,B=n.optional;y=n.void;var k=g();t.exports.operation=k;var I=function(e,r){var n=new i(e,r);return t.exports[e]=n},x=new I("transfer_operation_fee_parameters",{fee:u,price_per_kbyte:a}),T=new I("limit_order_create_operation_fee_parameters",{fee:u}),A=new I("limit_order_cancel_operation_fee_parameters",{fee:u}),O=new I("call_order_update_operation_fee_parameters",{fee:u}),j=new I("fill_order_operation_fee_parameters"),L=new I("account_create_operation_fee_parameters",{basic_fee:u,premium_fee:u,price_per_kbyte:a}),R=new I("account_update_operation_fee_parameters",{fee:f,price_per_kbyte:a}),D=new I("account_whitelist_operation_fee_parameters",{fee:f}),z=new I("account_upgrade_operation_fee_parameters",{membership_annual_fee:u,membership_lifetime_fee:u}),M=new I("account_transfer_operation_fee_parameters",{fee:u}),q=new I("asset_create_operation_fee_parameters",{symbol3:u,symbol4:u,long_symbol:u,price_per_kbyte:a}),U=new I("asset_update_operation_fee_parameters",{fee:u,price_per_kbyte:a}),C=new I("asset_update_bitasset_operation_fee_parameters",{fee:u}),N=new I("asset_update_feed_producers_operation_fee_parameters",{fee:u}),P=new I("asset_issue_operation_fee_parameters",{fee:u,price_per_kbyte:a}),F=new I("asset_reserve_operation_fee_parameters",{fee:u}),H=new I("asset_fund_fee_pool_operation_fee_parameters",{fee:u}),V=new I("asset_settle_operation_fee_parameters",{fee:u}),K=new I("asset_global_settle_operation_fee_parameters",{fee:u}),W=new I("asset_publish_feed_operation_fee_parameters",{fee:u}),Y=new I("witness_create_operation_fee_parameters",{fee:u}),Z=new I("witness_update_operation_fee_parameters",{fee:f}),J=new I("proposal_create_operation_fee_parameters",{
fee:u,price_per_kbyte:a}),G=new I("proposal_update_operation_fee_parameters",{fee:u,price_per_kbyte:a}),X=new I("proposal_delete_operation_fee_parameters",{fee:u}),$=new I("withdraw_permission_create_operation_fee_parameters",{fee:u}),Q=new I("withdraw_permission_update_operation_fee_parameters",{fee:u}),tt=new I("withdraw_permission_claim_operation_fee_parameters",{fee:u,price_per_kbyte:a}),et=new I("withdraw_permission_delete_operation_fee_parameters",{fee:u}),rt=new I("committee_member_create_operation_fee_parameters",{fee:u}),nt=new I("committee_member_update_operation_fee_parameters",{fee:u}),it=new I("committee_member_update_global_parameters_operation_fee_parameters",{fee:u}),ot=new I("vesting_balance_create_operation_fee_parameters",{fee:u}),st=new I("vesting_balance_withdraw_operation_fee_parameters",{fee:u}),at=new I("worker_create_operation_fee_parameters",{fee:u}),ft=new I("custom_operation_fee_parameters",{fee:u,price_per_kbyte:a}),ut=new I("assert_operation_fee_parameters",{fee:u}),ct=new I("balance_claim_operation_fee_parameters"),ht=new I("override_transfer_operation_fee_parameters",{fee:u,price_per_kbyte:a}),lt=new I("transfer_to_blind_operation_fee_parameters",{fee:u,price_per_output:a}),pt=new I("blind_transfer_operation_fee_parameters",{fee:u,price_per_output:a}),dt=new I("transfer_from_blind_operation_fee_parameters",{fee:u}),_t=new I("asset_settle_cancel_operation_fee_parameters"),vt=new I("asset_claim_fees_operation_fee_parameters",{fee:u}),yt=g([x,T,A,O,j,L,R,D,z,M,q,U,C,N,P,F,H,V,K,W,Y,Z,J,G,X,$,Q,tt,et,rt,nt,it,ot,st,at,ft,ut,ct,ht,lt,pt,dt,_t,vt]),gt=new I("fee_schedule",{parameters:m(yt),scale:a}),bt=new I("void_result"),mt=new I("asset",{amount:f,asset_id:d("asset")}),wt=g([bt,_,mt]),Et=new I("processed_transaction",{ref_block_num:s,ref_block_prefix:a,expiration:S,operations:p(k),extensions:m(y),signatures:p(h(65)),operation_results:p(wt)}),St=(new I("signed_block",{previous:h(20),timestamp:S,witness:d("witness"),transaction_merkle_root:h(20),extensions:m(y),witness_signature:h(65),transactions:p(Et)}),new I("block_header",{previous:h(20),timestamp:S,witness:d("witness"),transaction_merkle_root:h(20),extensions:m(y)}),new I("signed_block_header",{previous:h(20),timestamp:S,witness:d("witness"),transaction_merkle_root:h(20),extensions:m(y),witness_signature:h(65)}),new I("memo_data",{from:w,to:w,nonce:u,message:h()})),Bt=new I("transfer",{fee:mt,from:d("account"),to:d("account"),amount:mt,memo:B(St),extensions:m(y)}),kt=new I("limit_order_create",{fee:mt,seller:d("account"),amount_to_sell:mt,min_to_receive:mt,expiration:S,fill_or_kill:l,extensions:m(y)}),It=new I("limit_order_cancel",{fee:mt,fee_paying_account:d("account"),order:d("limit_order"),extensions:m(y)}),xt=new I("call_order_update",{fee:mt,funding_account:d("account"),delta_collateral:mt,delta_debt:mt,extensions:m(y)}),Tt=new I("fill_order",{fee:mt,order_id:_,account_id:d("account"),pays:mt,receives:mt}),At=new I("authority",{weight_threshold:a,account_auths:b(d("account"),s),key_auths:b(w,s),address_auths:b(E,s)}),Ot=new I("account_options",{memo_key:w,voting_account:d("account"),num_witness:s,num_committee:s,votes:m(v),extensions:m(y)}),jt=new I("account_create",{fee:mt,registrar:d("account"),referrer:d("account"),referrer_percent:s,name:c,owner:At,active:At,options:Ot,extensions:m(y)}),Lt=new I("account_update",{fee:mt,account:d("account"),owner:B(At),active:B(At),new_options:B(Ot),extensions:m(y)}),Rt=new I("account_whitelist",{fee:mt,authorizing_account:d("account"),account_to_list:d("account"),new_listing:o,extensions:m(y)}),Dt=new I("account_upgrade",{fee:mt,account_to_upgrade:d("account"),upgrade_to_lifetime_member:l,extensions:m(y)}),zt=new I("account_transfer",{fee:mt,account_id:d("account"),new_owner:d("account"),extensions:m(y)}),Mt=new I("price",{base:mt,quote:mt}),qt=new I("asset_options",{max_supply:f,market_fee_percent:s,max_market_fee:f,issuer_permissions:s,flags:s,core_exchange_rate:Mt,whitelist_authorities:m(d("account")),blacklist_authorities:m(d("account")),whitelist_markets:m(d("asset")),blacklist_markets:m(d("asset")),description:c,extensions:m(y)}),Ut=new I("bitasset_options",{feed_lifetime_sec:a,minimum_feeds:o,force_settlement_delay_sec:a,force_settlement_offset_percent:s,maximum_force_settlement_volume:s,short_backing_asset:d("asset"),extensions:m(y)}),Ct=new I("asset_create",{fee:mt,issuer:d("account"),symbol:c,precision:o,common_options:qt,bitasset_opts:B(Ut),is_prediction_market:l,extensions:m(y)}),Nt=new I("asset_update",{fee:mt,issuer:d("account"),asset_to_update:d("asset"),new_issuer:B(d("account")),new_options:qt,extensions:m(y)}),Pt=new I("asset_update_bitasset",{fee:mt,issuer:d("account"),asset_to_update:d("asset"),new_options:Ut,extensions:m(y)}),Ft=new I("asset_update_feed_producers",{fee:mt,issuer:d("account"),asset_to_update:d("asset"),new_feed_producers:m(d("account")),extensions:m(y)}),Ht=new I("asset_issue",{fee:mt,issuer:d("account"),asset_to_issue:mt,issue_to_account:d("account"),memo:B(St),extensions:m(y)}),Vt=new I("asset_reserve",{fee:mt,payer:d("account"),amount_to_reserve:mt,extensions:m(y)}),Kt=new I("asset_fund_fee_pool",{fee:mt,from_account:d("account"),asset_id:d("asset"),amount:f,extensions:m(y)}),Wt=new I("asset_settle",{fee:mt,account:d("account"),amount:mt,extensions:m(y)}),Yt=new I("asset_global_settle",{fee:mt,issuer:d("account"),asset_to_settle:d("asset"),settle_price:Mt,extensions:m(y)}),Zt=new I("price_feed",{settlement_price:Mt,maintenance_collateral_ratio:s,maximum_short_squeeze_ratio:s,core_exchange_rate:Mt}),Jt=new I("asset_publish_feed",{fee:mt,publisher:d("account"),asset_id:d("asset"),feed:Zt,extensions:m(y)}),Gt=new I("witness_create",{fee:mt,witness_account:d("account"),url:c,block_signing_key:w}),Xt=new I("witness_update",{fee:mt,witness:d("witness"),witness_account:d("account"),new_url:B(c),new_signing_key:B(w)}),$t=new I("op_wrapper",{op:k}),Qt=new I("proposal_create",{fee:mt,fee_paying_account:d("account"),expiration_time:S,proposed_ops:p($t),review_period_seconds:B(a),extensions:m(y)}),te=new I("proposal_update",{fee:mt,fee_paying_account:d("account"),proposal:d("proposal"),active_approvals_to_add:m(d("account")),active_approvals_to_remove:m(d("account")),owner_approvals_to_add:m(d("account")),owner_approvals_to_remove:m(d("account")),key_approvals_to_add:m(w),key_approvals_to_remove:m(w),extensions:m(y)}),ee=new I("proposal_delete",{fee:mt,fee_paying_account:d("account"),using_owner_authority:l,proposal:d("proposal"),extensions:m(y)}),re=new I("withdraw_permission_create",{fee:mt,withdraw_from_account:d("account"),authorized_account:d("account"),withdrawal_limit:mt,withdrawal_period_sec:a,periods_until_expiration:a,period_start_time:S}),ne=new I("withdraw_permission_update",{fee:mt,withdraw_from_account:d("account"),authorized_account:d("account"),permission_to_update:d("withdraw_permission"),withdrawal_limit:mt,withdrawal_period_sec:a,period_start_time:S,periods_until_expiration:a}),ie=new I("withdraw_permission_claim",{fee:mt,withdraw_permission:d("withdraw_permission"),withdraw_from_account:d("account"),withdraw_to_account:d("account"),amount_to_withdraw:mt,memo:B(St)}),oe=new I("withdraw_permission_delete",{fee:mt,withdraw_from_account:d("account"),authorized_account:d("account"),withdrawal_permission:d("withdraw_permission")}),se=new I("committee_member_create",{fee:mt,committee_member_account:d("account"),url:c}),ae=new I("committee_member_update",{fee:mt,committee_member:d("committee_member"),committee_member_account:d("account"),new_url:B(c)}),fe=new I("chain_parameters",{current_fees:gt,block_interval:o,maintenance_interval:a,maintenance_skip_slots:o,committee_proposal_review_period:a,maximum_transaction_size:a,maximum_block_size:a,maximum_time_until_expiration:a,maximum_proposal_lifetime:a,maximum_asset_whitelist_authorities:o,maximum_asset_feed_publishers:o,maximum_witness_count:s,maximum_committee_count:s,maximum_authority_membership:s,reserve_percent_of_fee:s,network_percent_of_fee:s,lifetime_referrer_percent_of_fee:s,cashback_vesting_period_seconds:a,cashback_vesting_threshold:f,count_non_member_votes:l,allow_non_member_whitelists:l,witness_pay_per_block:f,worker_budget_per_day:f,max_predicate_opcode:s,fee_liquidation_threshold:f,accounts_per_fee_scale:s,account_fee_scale_bitshifts:o,max_authority_depth:o,extensions:m(y)}),ue=new I("committee_member_update_global_parameters",{fee:mt,new_parameters:fe}),ce=new I("linear_vesting_policy_initializer",{begin_timestamp:S,vesting_cliff_seconds:a,vesting_duration_seconds:a}),he=new I("cdd_vesting_policy_initializer",{start_claim:S,vesting_seconds:a}),le=g([ce,he]),pe=new I("vesting_balance_create",{fee:mt,creator:d("account"),owner:d("account"),amount:mt,policy:le}),de=new I("vesting_balance_withdraw",{fee:mt,vesting_balance:d("vesting_balance"),owner:d("account"),amount:mt}),_e=new I("refund_worker_initializer"),ve=new I("vesting_balance_worker_initializer",{pay_vesting_period_days:s}),ye=new I("burn_worker_initializer"),ge=g([_e,ve,ye]),be=new I("worker_create",{fee:mt,owner:d("account"),work_begin_date:S,work_end_date:S,daily_pay:f,name:c,url:c,initializer:ge}),me=new I("custom",{fee:mt,payer:d("account"),required_auths:m(d("account")),id:s,data:h()}),we=new I("account_name_eq_lit_predicate",{account_id:d("account"),name:c}),Ee=new I("asset_symbol_eq_lit_predicate",{asset_id:d("asset"),symbol:c}),Se=new I("block_id_predicate",{id:h(20)}),Be=g([we,Ee,Se]),ke=new I("assert",{fee:mt,fee_paying_account:d("account"),predicates:p(Be),required_auths:m(d("account")),extensions:m(y)}),Ie=new I("balance_claim",{fee:mt,deposit_to_account:d("account"),balance_to_claim:d("balance"),balance_owner_key:w,total_claimed:mt}),xe=new I("override_transfer",{fee:mt,issuer:d("account"),from:d("account"),to:d("account"),amount:mt,memo:B(St),extensions:m(y)}),Te=new I("stealth_confirmation",{one_time_key:w,to:B(w),encrypted_memo:h()}),Ae=new I("blind_output",{commitment:h(33),range_proof:h(),owner:At,stealth_memo:B(Te)}),Oe=new I("transfer_to_blind",{fee:mt,amount:mt,from:d("account"),blinding_factor:h(32),outputs:p(Ae)}),je=new I("blind_input",{commitment:h(33),owner:At}),Le=new I("blind_transfer",{fee:mt,inputs:p(je),outputs:p(Ae)}),Re=new I("transfer_from_blind",{fee:mt,amount:mt,to:d("account"),blinding_factor:h(32),inputs:p(je)}),De=new I("asset_settle_cancel",{fee:mt,settlement:d("force_settlement"),account:d("account"),amount:mt,extensions:m(y)}),ze=new I("asset_claim_fees",{fee:mt,issuer:d("account"),amount_to_claim:mt,extensions:m(y)});k.st_operations=[Bt,kt,It,xt,Tt,jt,Lt,Rt,Dt,zt,Ct,Nt,Pt,Ft,Ht,Vt,Kt,Wt,Yt,Jt,Gt,Xt,Qt,te,ee,re,ne,ie,oe,se,ae,ue,pe,de,be,me,ke,Ie,xe,Oe,Le,Re,De,ze];new I("transaction",{ref_block_num:s,ref_block_prefix:a,expiration:S,operations:p(k),extensions:m(y)}),new I("signed_transaction",{ref_block_num:s,ref_block_prefix:a,expiration:S,operations:p(k),extensions:m(y),signatures:p(h(65))}),new I("stealth_memo_data",{from:B(w),amount:mt,blinding_factor:h(32),commitment:h(33),check:a})},function(t,e){"use strict";t.exports=function(t){var e=t.toObject(void 0,{use_default:!0,annotate:!0});console.error(JSON.stringify(e,null,4)),e=t.toObject(void 0,{use_default:!0,annotate:!1}),console.error(JSON.stringify(e))}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i,o=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(101),a=r(102),f=r(42);t.exports={setRpcConnectionStatusCallback:function(t){this.statusCb=t,i&&i.setRpcConnectionStatusCallback(t)},reset:function(){var t=arguments.length<=0||void 0===arguments[0]?"ws://localhost:8090":arguments[0],e=arguments[1];return i&&(i.close(),i=null),i=new u,i.setRpcConnectionStatusCallback(this.statusCb),i&&e&&i.connect(t),i},instance:function(){var t=arguments.length<=0||void 0===arguments[0]?"ws://localhost:8090":arguments[0],e=arguments[1];return i||(i=new u,i.setRpcConnectionStatusCallback(this.statusCb)),i&&e&&i.connect(t),i},chainId:function(){return Apis.instance().chain_id},close:function(){i&&(i.close(),i=null)}};var u=function(){function t(){n(this,t)}return o(t,[{key:"connect",value:function(t){var e=this,r="",n="";if("undefined"!=typeof window&&window.location&&"https:"===window.location.protocol&&t.indexOf("wss://")<0)throw new Error("Secure domains require wss connection");this.ws_rpc=new s(t,this.statusCb),this.init_promise=this.ws_rpc.login(r,n).then(function(){e._db=new a(e.ws_rpc,"database"),e._net=new a(e.ws_rpc,"network_broadcast"),e._hist=new a(e.ws_rpc,"history"),e._crypt=new a(e.ws_rpc,"crypto");var t=e._db.init().then(function(){return e._db.exec("get_chain_id",[]).then(function(t){return e.chain_id=t,f.setChainId(t)})});return e.ws_rpc.on_reconnect=function(){e.ws_rpc.login("","").then(function(){e._db.init().then(function(){e.statusCb&&e.statusCb("reconnect")}),e._net.init(),e._hist.init(),e._crypt.init()})},Promise.all([t,e._net.init(),e._hist.init(),e._crypt.init().catch(function(t){return console.error("ApiInstance\tCrypto API Error",t)})])})}},{key:"close",value:function(){this.ws_rpc&&this.ws_rpc.close(),this.ws_rpc=null}},{key:"db_api",value:function(){return this._db}},{key:"network_api",value:function(){return this._net}},{key:"history_api",value:function(){return this._hist}},{key:"crypto_api",value:function(){return this._crypt}},{key:"setRpcConnectionStatusCallback",value:function(t){this.statusCb=t}}]),t}()},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=void 0;"undefined"!=typeof WebSocket||{NODE_ENV:"production"}.browser?"undefined"!=typeof WebSocket&&(o=r(51)):o=r(122);var s=!1,a=function(){function t(e,r){var i=this;n(this,t),this.statusCb=r;try{this.ws=new o(e)}catch(t){console.error("invalid websocket URL:",t),this.ws=new o("wss://127.0.0.1:8080")}this.ws.timeoutInterval=5e3,this.current_reject=null,this.on_reconnect=null,this.connect_promise=new Promise(function(t,e){i.current_reject=e,i.ws.onopen=function(){i.statusCb&&i.statusCb("open"),i.on_reconnect&&i.on_reconnect(),t()},i.ws.onerror=function(t){i.statusCb&&i.statusCb("error"),i.current_reject&&i.current_reject(t)},i.ws.onmessage=function(t){return i.listener(JSON.parse(t.data))},i.ws.onclose=function(){i.statusCb&&i.statusCb("closed")}}),this.cbId=0,this.cbs={},this.subs={},this.unsub={}}return i(t,[{key:"call",value:function(t){var e=this,r=t[1];if(s&&console.log('[ChainWebSocket] >---- call -----> "id":'+(this.cbId+1),JSON.stringify(t)),this.cbId+=1,"set_subscribe_callback"!==r&&"subscribe_to_market"!==r&&"broadcast_transaction_with_callback"!==r&&"set_pending_transaction_callback"!==r||(this.subs[this.cbId]={callback:t[2][0]},t[2][0]=this.cbId),"unsubscribe_from_market"===r||"unsubscribe_from_accounts"===r){if("function"!=typeof t[2][0])throw new Error("First parameter of unsub must be the original callback");var n=t[2].splice(0,1)[0];for(var i in this.subs)if(this.subs[i].callback===n){this.unsub[this.cbId]=i;break}}var o={method:"call",params:t};return o.id=this.cbId,new Promise(function(t,r){e.cbs[e.cbId]={time:new Date,resolve:t,reject:r},e.ws.onerror=function(t){console.log("!!! ChainWebSocket Error ",t),r(t)},e.ws.send(JSON.stringify(o))})}},{key:"listener",value:function(t){s&&console.log("[ChainWebSocket] <---- reply ----<",JSON.stringify(t));var e=!1,r=null;"notice"===t.method&&(e=!0,t.id=t.params[0]),r=e?this.subs[t.id].callback:this.cbs[t.id],r&&!e?(t.error?r.reject(t.error):r.resolve(t.result),delete this.cbs[t.id],this.unsub[t.id]&&(delete this.subs[this.unsub[t.id]],delete this.unsub[t.id])):r&&e?r(t.params[1]):console.log("Warning: unknown websocket response: ",t)}},{key:"login",value:function(t,e){var r=this;return this.connect_promise.then(function(){return r.call([1,"login",[t,e]])})}},{key:"close",value:function(){this.ws.close()}}]),t}();t.exports=a},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=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),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(){function t(e,n){r(this,t),this.ws_rpc=e,this.api_name=n}return n(t,[{key:"init",value:function(){var t=this;return this.ws_rpc.call([1,this.api_name,[]]).then(function(e){return t.api_id=e,t})}},{key:"exec",value:function(t,e){return this.ws_rpc.call([this.api_id,t,e]).catch(function(r){throw console.log("!!! GrapheneApi error: ",t,e,r,JSON.stringify(r)),r})}}]),t}();t.exports=i},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,f=(1<<a)-1,u=f>>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===o)o=1-u;else{if(o===f)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,f,u=8*o-i-1,c=(1<<u)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,_=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=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-s))<1&&(s--,f*=2),e+=s+h>=1?l/f:l*Math.pow(2,1-h),e*f>=2&&(s++,f/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*f-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,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-d]|=128*_}},function(t,e,r){!function(e,r){t.exports=r()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return o(t)?t:A(t)}function r(t){return s(t)?t:O(t)}function n(t){return a(t)?t:j(t)}function i(t){return o(t)&&!f(t)?t:L(t)}function o(t){return!(!t||!t[fr])}function s(t){return!(!t||!t[ur])}function a(t){return!(!t||!t[cr])}function f(t){return s(t)||a(t)}function u(t){return!(!t||!t[hr])}function c(t){return t.value=!1,t}function h(t){t&&(t.value=!0)}function l(){}function p(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function d(t){return void 0===t.size&&(t.size=t.__iterate(v)),t.size}function _(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?d(t)+e:e}function v(){return!0}function y(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function g(t,e){return m(t,e,0)}function b(t,e){return m(t,e,e)}function m(t,e,r){return void 0===t?r:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function w(t){this.next=t}function E(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function S(){return{value:void 0,done:!0}}function B(t){return!!x(t)}function k(t){return t&&"function"==typeof t.next}function I(t){var e=x(t);return e&&e.call(t)}function x(t){var e=t&&(Er&&t[Er]||t[Sr]);if("function"==typeof e)return e}function T(t){return t&&"number"==typeof t.length}function A(t){return null===t||void 0===t?U():o(t)?t.toSeq():P(t)}function O(t){return null===t||void 0===t?U().toKeyedSeq():o(t)?s(t)?t.toSeq():t.fromEntrySeq():C(t)}function j(t){return null===t||void 0===t?U():o(t)?s(t)?t.entrySeq():t.toIndexedSeq():N(t)}function L(t){return(null===t||void 0===t?U():o(t)?s(t)?t.entrySeq():t:N(t)).toSetSeq()}function R(t){this._array=t,this.size=t.length}function D(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function z(t){this._iterable=t,this.size=t.length||t.size}function M(t){this._iterator=t,this._iteratorCache=[]}function q(t){return!(!t||!t[kr])}function U(){return Ir||(Ir=new R([]))}function C(t){var e=Array.isArray(t)?new R(t).fromEntrySeq():k(t)?new M(t).fromEntrySeq():B(t)?new z(t).fromEntrySeq():"object"==typeof t?new D(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function N(t){var e=F(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function P(t){var e=F(t)||"object"==typeof t&&new D(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function F(t){return T(t)?new R(t):k(t)?new M(t):B(t)?new z(t):void 0}function H(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,s=0;s<=o;s++){var a=i[r?o-s:s];if(e(a[1],n?a[0]:s,t)===!1)return s+1}return s}return t.__iterateUncached(e,r)}function V(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,s=0;return new w(function(){var t=i[r?o-s:s];return s++>o?S():E(e,n?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,r)}function K(t,e){return e?W(e,t,"",{"":t}):Y(t)}function W(t,e,r,n){return Array.isArray(e)?t.call(n,r,j(e).map(function(r,n){return W(t,r,n,e)})):Z(e)?t.call(n,r,O(e).map(function(r,n){return W(t,r,n,e)})):e}function Y(t){return Array.isArray(t)?j(t).map(Y).toList():Z(t)?O(t).map(Y).toMap():t}function Z(t){return t&&(t.constructor===Object||void 0===t.constructor)}function J(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function G(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||s(t)!==s(e)||a(t)!==a(e)||u(t)!==u(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!f(t);if(u(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&J(i[1],t)&&(r||J(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var c=t;t=e,e=c}var h=!0,l=e.__iterate(function(e,n){if(r?!t.has(e):i?!J(e,t.get(n,vr)):!J(t.get(n,vr),e))return h=!1,!1});return h&&t.size===l}function X(t,e){if(!(this instanceof X))return new X(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(xr)return xr;xr=this}}function $(t,e){if(!t)throw new Error(e)}function Q(t,e,r){if(!(this instanceof Q))return new Q(t,e,r);if($(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e<t&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(Tr)return Tr;Tr=this}}function tt(){throw TypeError("Abstract")}function et(){}function rt(){}function nt(){}function it(t){return t>>>1&1073741824|3221225471&t}function ot(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return it(r)}if("string"===e)return t.length>Mr?st(t):at(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return ft(t);if("function"==typeof t.toString)return at(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function st(t){var e=Cr[t];return void 0===e&&(e=at(t),Ur===qr&&(Ur=0,Cr={}),Ur++,Cr[t]=e),e}function at(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return it(e)}function ft(t){var e;if(Rr&&(e=Ar.get(t),void 0!==e))return e;if(e=t[zr],void 0!==e)return e;if(!Lr){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[zr],void 0!==e)return e;if(e=ut(t),void 0!==e)return e}if(e=++Dr,1073741824&Dr&&(Dr=0),Rr)Ar.set(t,e);else{if(void 0!==jr&&jr(t)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(Lr)Object.defineProperty(t,zr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[zr]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[zr]=e}}return e}function ut(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ct(t){$(t!==1/0,"Cannot perform this action with an infinite size.")}function ht(t){return null===t||void 0===t?Et():lt(t)&&!u(t)?t:Et().withMutations(function(e){var n=r(t);ct(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function lt(t){return!(!t||!t[Nr])}function pt(t,e){this.ownerID=t,this.entries=e}function dt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function _t(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function vt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function yt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function gt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&mt(t._root)}function bt(t,e){return E(t,e[0],e[1])}function mt(t,e){return{node:t,index:0,__prev:e}}function wt(t,e,r,n){var i=Object.create(Pr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Et(){return Fr||(Fr=wt(0))}function St(t,e,r){var n,i;if(t._root){var o=c(yr),s=c(gr);if(n=Bt(t._root,t.__ownerID,0,void 0,e,r,o,s),!s.value)return t;i=t.size+(o.value?r===vr?-1:1:0)}else{if(r===vr)return t;i=1,n=new pt(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?wt(i,n):Et()}function Bt(t,e,r,n,i,o,s,a){return t?t.update(e,r,n,i,o,s,a):o===vr?t:(h(a),h(s),new yt(e,n,[i,o]))}function kt(t){return t.constructor===yt||t.constructor===vt}function It(t,e,r,n,i){if(t.keyHash===n)return new vt(e,n,[t.entry,i]);var o,s=(0===r?t.keyHash:t.keyHash>>>r)&_r,a=(0===r?n:n>>>r)&_r,f=s===a?[It(t,e,r+pr,n,i)]:(o=new yt(e,n,i),s<a?[t,o]:[o,t]);return new dt(e,1<<s|1<<a,f)}function xt(t,e,r,n){t||(t=new l);for(var i=new yt(t,ot(r),[r,n]),o=0;o<e.length;o++){var s=e[o];i=i.update(t,0,void 0,s[0],s[1])}return i}function Tt(t,e,r,n){for(var i=0,o=0,s=new Array(r),a=0,f=1,u=e.length;a<u;a++,f<<=1){var c=e[a];void 0!==c&&a!==n&&(i|=f,s[o++]=c)}return new dt(t,i,s)}function At(t,e,r,n,i){for(var o=0,s=new Array(dr),a=0;0!==r;a++,r>>>=1)s[a]=1&r?e[o++]:void 0;return s[n]=i,new _t(t,o+1,s)}function Ot(t,e,n){for(var i=[],s=0;s<n.length;s++){var a=n[s],f=r(a);o(a)||(f=f.map(function(t){return K(t)})),i.push(f)}return Rt(t,e,i)}function jt(t,e,r){return t&&t.mergeDeep&&o(e)?t.mergeDeep(e):J(t,e)?t:e}function Lt(t){return function(e,r,n){if(e&&e.mergeDeepWith&&o(r))return e.mergeDeepWith(t,r);var i=t(e,r,n);return J(e,i)?e:i}}function Rt(t,e,r){return r=r.filter(function(t){return 0!==t.size}),0===r.length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,vr,function(t){return t===vr?r:e(t,r,n)})}:function(e,r){t.set(r,e)},i=0;i<r.length;i++)r[i].forEach(n)}):t.constructor(r[0])}function Dt(t,e,r,n){var i=t===vr,o=e.next();if(o.done){var s=i?r:t,a=n(s);return a===s?t:a}$(i||t&&t.set,"invalid keyPath");var f=o.value,u=i?vr:t.get(f,vr),c=Dt(u,e,r,n);return c===u?t:c===vr?t.remove(f):(i?Et():t).set(f,c)}function zt(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function Mt(t,e,r,n){var i=n?t:p(t);return i[e]=r,i}function qt(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),s=0,a=0;a<i;a++)a===e?(o[a]=r,s=-1):o[a]=t[a+s];return o}function Ut(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,s=0;s<n;s++)s===e&&(o=1),i[s]=t[s+o];return i}function Ct(t){var e=Vt();if(null===t||void 0===t)return e;if(Nt(t))return t;var r=n(t),i=r.size;return 0===i?e:(ct(i),i>0&&i<dr?Ht(0,i,pr,null,new Pt(r.toArray())):e.withMutations(function(t){t.setSize(i),r.forEach(function(e,r){return t.set(r,e)})}))}function Nt(t){return!(!t||!t[Wr])}function Pt(t,e){this.array=t,this.ownerID=e}function Ft(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===a?f&&f.array:t&&t.array,i=r>o?0:o-r,u=s-r;return u>dr&&(u=dr),function(){if(i===u)return Jr;var t=e?--u:i++;return n&&n[t]}}function i(t,n,i){var a,f=t&&t.array,u=i>o?0:o-i>>n,c=(s-i>>n)+1;return c>dr&&(c=dr),function(){for(;;){if(a){var t=a();if(t!==Jr)return t;a=null}if(u===c)return Jr;var o=e?--c:u++;a=r(f&&f[o],n-pr,i+(o<<n))}}}var o=t._origin,s=t._capacity,a=Xt(s),f=t._tail;return r(t._root,t._level,0)}function Ht(t,e,r,n,i,o,s){var a=Object.create(Yr);return a.size=e-t,a._origin=t,a._capacity=e,a._level=r,a._root=n,a._tail=i,a.__ownerID=o,a.__hash=s,a.__altered=!1,a}function Vt(){return Zr||(Zr=Ht(0,0,pr))}function Kt(t,e,r){if(e=_(t,e),e!==e)return t;if(e>=t.size||e<0)return t.withMutations(function(t){e<0?Jt(t,e).set(0,r):Jt(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,o=c(gr);return e>=Xt(t._capacity)?n=Wt(n,t.__ownerID,0,e,r,o):i=Wt(i,t.__ownerID,t._level,e,r,o),o.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Ht(t._origin,t._capacity,t._level,i,n):t}function Wt(t,e,r,n,i,o){var s=n>>>r&_r,a=t&&s<t.array.length;if(!a&&void 0===i)return t;var f;if(r>0){var u=t&&t.array[s],c=Wt(u,e,r-pr,n,i,o);return c===u?t:(f=Yt(t,e),f.array[s]=c,f)}return a&&t.array[s]===i?t:(h(o),f=Yt(t,e),void 0===i&&s===f.array.length-1?f.array.pop():f.array[s]=i,f)}function Yt(t,e){return e&&t&&e===t.ownerID?t:new Pt(t?t.array.slice():[],e)}function Zt(t,e){if(e>=Xt(t._capacity))return t._tail;if(e<1<<t._level+pr){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&_r],n-=pr;return r}}function Jt(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new l,i=t._origin,o=t._capacity,s=i+e,a=void 0===r?o:r<0?o+r:i+r;if(s===i&&a===o)return t;if(s>=a)return t.clear();for(var f=t._level,u=t._root,c=0;s+c<0;)u=new Pt(u&&u.array.length?[void 0,u]:[],n),f+=pr,c+=1<<f;c&&(s+=c,i+=c,a+=c,o+=c);for(var h=Xt(o),p=Xt(a);p>=1<<f+pr;)u=new Pt(u&&u.array.length?[u]:[],n),f+=pr;var d=t._tail,_=p<h?Zt(t,a-1):p>h?new Pt([],n):d;if(d&&p>h&&s<o&&d.array.length){u=Yt(u,n);for(var v=u,y=f;y>pr;y-=pr){var g=h>>>y&_r;v=v.array[g]=Yt(v.array[g],n)}v.array[h>>>pr&_r]=d}if(a<o&&(_=_&&_.removeAfter(n,0,a)),s>=p)s-=p,a-=p,f=pr,u=null,_=_&&_.removeBefore(n,0,s);else if(s>i||p<h){for(c=0;u;){var b=s>>>f&_r;if(b!==p>>>f&_r)break;b&&(c+=(1<<f)*b),f-=pr,u=u.array[b]}u&&s>i&&(u=u.removeBefore(n,f,s-c)),u&&p<h&&(u=u.removeAfter(n,f,p-c)),c&&(s-=c,a-=c)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=f,t._root=u,t._tail=_,t.__hash=void 0,t.__altered=!0,t):Ht(s,a,f,u,_)}function Gt(t,e,r){for(var i=[],s=0,a=0;a<r.length;a++){var f=r[a],u=n(f);u.size>s&&(s=u.size),o(f)||(u=u.map(function(t){return K(t)})),i.push(u)}return s>t.size&&(t=t.setSize(s)),Rt(t,e,i)}function Xt(t){return t<dr?0:t-1>>>pr<<pr}function $t(t){return null===t||void 0===t?ee():Qt(t)?t:ee().withMutations(function(e){var n=r(t);ct(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function Qt(t){return lt(t)&&u(t)}function te(t,e,r,n){var i=Object.create($t.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function ee(){return Gr||(Gr=te(Et(),Vt()))}function re(t,e,r){var n,i,o=t._map,s=t._list,a=o.get(e),f=void 0!==a;if(r===vr){if(!f)return t;s.size>=dr&&s.size>=2*o.size?(i=s.filter(function(t,e){return void 0!==t&&a!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=a===s.size-1?s.pop():s.set(a,void 0))}else if(f){if(r===s.get(a)[1])return t;n=o,i=s.set(a,[e,r])}else n=o.set(e,s.size),i=s.set(s.size,[e,r]);return t.__ownerID?(t.size=n.size,
t._map=n,t._list=i,t.__hash=void 0,t):te(n,i)}function ne(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function se(t){this._iter=t,this.size=t.size}function ae(t){var e=Te(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Ae,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===wr){var n=t.__iterator(e,r);return new w(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===mr?br:mr,r)},e}function fe(t,e,r){var n=Te(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,vr);return o===vr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,s){return n(e.call(r,t,i,s),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(wr,i);return new w(function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return E(n,a,e.call(r,s[1],a,t),i)})},n}function ue(t,e){var r=Te(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=ae(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Ae,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function ce(t,e,r,n){var i=Te(t);return n&&(i.has=function(n){var i=t.get(n,vr);return i!==vr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,vr);return o!==vr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var s=this,a=0;return t.__iterate(function(t,o,f){if(e.call(r,t,o,f))return a++,i(t,n?o:a-1,s)},o),a},i.__iteratorUncached=function(i,o){var s=t.__iterator(wr,o),a=0;return new w(function(){for(;;){var o=s.next();if(o.done)return o;var f=o.value,u=f[0],c=f[1];if(e.call(r,c,u,t))return E(i,n?u:a++,c,o)}})},i}function he(t,e,r){var n=ht().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function le(t,e,r){var n=s(t),i=(u(t)?$t():ht()).asMutable();t.__iterate(function(o,s){i.update(e.call(r,o,s,t),function(t){return t=t||[],t.push(n?[s,o]:o),t})});var o=xe(t);return i.map(function(e){return Be(t,o(e))})}function pe(t,e,r,n){var i=t.size;if(void 0!==e&&(e|=0),void 0!==r&&(r===1/0?r=i:r|=0),y(e,r,i))return t;var o=g(e,i),s=b(r,i);if(o!==o||s!==s)return pe(t.toSeq().cacheResult(),e,r,n);var a,f=s-o;f===f&&(a=f<0?0:f);var u=Te(t);return u.size=0===a?a:t.size&&a||void 0,!n&&q(t)&&a>=0&&(u.get=function(e,r){return e=_(this,e),e>=0&&e<a?t.get(e+o,r):r}),u.__iterateUncached=function(e,r){var i=this;if(0===a)return 0;if(r)return this.cacheResult().__iterate(e,r);var s=0,f=!0,u=0;return t.__iterate(function(t,r){if(!f||!(f=s++<o))return u++,e(t,n?r:u-1,i)!==!1&&u!==a}),u},u.__iteratorUncached=function(e,r){if(0!==a&&r)return this.cacheResult().__iterator(e,r);var i=0!==a&&t.__iterator(e,r),s=0,f=0;return new w(function(){for(;s++<o;)i.next();if(++f>a)return S();var t=i.next();return n||e===mr?t:e===br?E(e,f-1,void 0,t):E(e,f-1,t.value[1],t)})},u}function de(t,e,r){var n=Te(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var s=0;return t.__iterate(function(t,i,a){return e.call(r,t,i,a)&&++s&&n(t,i,o)}),s},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var s=t.__iterator(wr,i),a=!0;return new w(function(){if(!a)return S();var t=s.next();if(t.done)return t;var i=t.value,f=i[0],u=i[1];return e.call(r,u,f,o)?n===wr?t:E(n,f,u,t):(a=!1,S())})},n}function _e(t,e,r,n){var i=Te(t);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,f=0;return t.__iterate(function(t,o,u){if(!a||!(a=e.call(r,t,o,u)))return f++,i(t,n?o:f-1,s)}),f},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(wr,o),f=!0,u=0;return new w(function(){var t,o,c;do{if(t=a.next(),t.done)return n||i===mr?t:i===br?E(i,u++,void 0,t):E(i,u++,t.value[1],t);var h=t.value;o=h[0],c=h[1],f&&(f=e.call(r,c,o,s))}while(f);return i===wr?t:E(i,o,c,t)})},i}function ve(t,e){var n=s(t),i=[t].concat(e).map(function(t){return o(t)?n&&(t=r(t)):t=n?C(t):N(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var f=i[0];if(f===t||n&&s(f)||a(t)&&a(f))return f}var u=new R(i);return n?u=u.toKeyedSeq():a(t)||(u=u.toSetSeq()),u=u.flatten(!0),u.size=i.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),u}function ye(t,e,r){var n=Te(t);return n.__iterateUncached=function(n,i){function s(t,u){var c=this;t.__iterate(function(t,i){return(!e||u<e)&&o(t)?s(t,u+1):n(t,r?i:a++,c)===!1&&(f=!0),!f},i)}var a=0,f=!1;return s(t,0),a},n.__iteratorUncached=function(n,i){var s=t.__iterator(n,i),a=[],f=0;return new w(function(){for(;s;){var t=s.next();if(t.done===!1){var u=t.value;if(n===wr&&(u=u[1]),e&&!(a.length<e)||!o(u))return r?t:E(n,f++,u,t);a.push(s),s=u.__iterator(n,i)}else s=a.pop()}return S()})},n}function ge(t,e,r){var n=xe(t);return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}function be(t,e){var r=Te(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate(function(t,n){return(!o||r(e,o++,i)!==!1)&&r(t,o++,i)!==!1},n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(mr,n),s=0;return new w(function(){return(!i||s%2)&&(i=o.next(),i.done)?i:s%2?E(r,s++,e):E(r,s++,i.value,i)})},r}function me(t,e,r){e||(e=Oe);var n=s(t),i=0,o=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return o.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?O(o):a(t)?j(o):L(o)}function we(t,e,r){if(e||(e=Oe),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return Ee(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return Ee(e,t,r)?r:t})}function Ee(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function Se(t,r,n){var i=Te(t);return i.size=new R(n).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(mr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(t,i){var o=n.map(function(t){return t=e(t),I(i?t.reverse():t)}),s=0,a=!1;return new w(function(){var e;return a||(e=o.map(function(t){return t.next()}),a=e.some(function(t){return t.done})),a?S():E(t,s++,r.apply(null,e.map(function(t){return t.value})))})},i}function Be(t,e){return q(t)?e:t.constructor(e)}function ke(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ie(t){return ct(t.size),d(t)}function xe(t){return s(t)?r:a(t)?n:i}function Te(t){return Object.create((s(t)?O:a(t)?j:L).prototype)}function Ae(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):A.prototype.cacheResult.call(this)}function Oe(t,e){return t>e?1:t<e?-1:0}function je(t){var r=I(t);if(!r){if(!T(t))throw new TypeError("Expected iterable or array-like: "+t);r=I(e(t))}return r}function Le(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t);ze(i,s),i.size=s.length,i._name=e,i._keys=s,i._defaultValues=t}this._map=ht(o)},i=n.prototype=Object.create(Xr);return i.constructor=n,n}function Re(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function De(t){return t._name||t.constructor.name||"Record"}function ze(t,e){try{e.forEach(Me.bind(void 0,t))}catch(t){}}function Me(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){$(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function qe(t){return null===t||void 0===t?Pe():Ue(t)&&!u(t)?t:Pe().withMutations(function(e){var r=i(t);ct(r.size),r.forEach(function(t){return e.add(t)})})}function Ue(t){return!(!t||!t[$r])}function Ce(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Ne(t,e){var r=Object.create(Qr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Pe(){return tn||(tn=Ne(Et()))}function Fe(t){return null===t||void 0===t?Ke():He(t)?t:Ke().withMutations(function(e){var r=i(t);ct(r.size),r.forEach(function(t){return e.add(t)})})}function He(t){return Ue(t)&&u(t)}function Ve(t,e){var r=Object.create(en);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ke(){return rn||(rn=Ve(ee()))}function We(t){return null===t||void 0===t?Je():Ye(t)?t:Je().unshiftAll(t)}function Ye(t){return!(!t||!t[nn])}function Ze(t,e,r,n){var i=Object.create(on);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Je(){return sn||(sn=Ze(0))}function Ge(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Xe(t,e){return e}function $e(t,e){return[e,t]}function Qe(t){return function(){return!t.apply(this,arguments)}}function tr(t){return function(){return-t.apply(this,arguments)}}function er(t){return"string"==typeof t?JSON.stringify(t):String(t)}function rr(){return p(arguments)}function nr(t,e){return t<e?1:t>e?-1:0}function ir(t){if(t.size===1/0)return 0;var e=u(t),r=s(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+sr(ot(t),ot(e))|0}:function(t,e){n=n+sr(ot(t),ot(e))|0}:e?function(t){n=31*n+ot(t)|0}:function(t){n=n+ot(t)|0});return or(i,n)}function or(t,e){return e=Or(e,3432918353),e=Or(e<<15|e>>>-15,461845907),e=Or(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Or(e^e>>>16,2246822507),e=Or(e^e>>>13,3266489909),e=it(e^e>>>16)}function sr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var ar=Array.prototype.slice;t(r,e),t(n,e),t(i,e),e.isIterable=o,e.isKeyed=s,e.isIndexed=a,e.isAssociative=f,e.isOrdered=u,e.Keyed=r,e.Indexed=n,e.Set=i;var fr="@@__IMMUTABLE_ITERABLE__@@",ur="@@__IMMUTABLE_KEYED__@@",cr="@@__IMMUTABLE_INDEXED__@@",hr="@@__IMMUTABLE_ORDERED__@@",lr="delete",pr=5,dr=1<<pr,_r=dr-1,vr={},yr={value:!1},gr={value:!1},br=0,mr=1,wr=2,Er="function"==typeof Symbol&&Symbol.iterator,Sr="@@iterator",Br=Er||Sr;w.prototype.toString=function(){return"[Iterator]"},w.KEYS=br,w.VALUES=mr,w.ENTRIES=wr,w.prototype.inspect=w.prototype.toSource=function(){return this.toString()},w.prototype[Br]=function(){return this},t(A,e),A.of=function(){return A(arguments)},A.prototype.toSeq=function(){return this},A.prototype.toString=function(){return this.__toString("Seq {","}")},A.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},A.prototype.__iterate=function(t,e){return H(this,t,e,!0)},A.prototype.__iterator=function(t,e){return V(this,t,e,!0)},t(O,A),O.prototype.toKeyedSeq=function(){return this},t(j,A),j.of=function(){return j(arguments)},j.prototype.toIndexedSeq=function(){return this},j.prototype.toString=function(){return this.__toString("Seq [","]")},j.prototype.__iterate=function(t,e){return H(this,t,e,!1)},j.prototype.__iterator=function(t,e){return V(this,t,e,!1)},t(L,A),L.of=function(){return L(arguments)},L.prototype.toSetSeq=function(){return this},A.isSeq=q,A.Keyed=O,A.Set=L,A.Indexed=j;var kr="@@__IMMUTABLE_SEQ__@@";A.prototype[kr]=!0,t(R,j),R.prototype.get=function(t,e){return this.has(t)?this._array[_(this,t)]:e},R.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;i<=n;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},R.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new w(function(){return i>n?S():E(t,i,r[e?n-i++:i++])})},t(D,O),D.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},D.prototype.has=function(t){return this._object.hasOwnProperty(t)},D.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;o<=i;o++){var s=n[e?i-o:o];if(t(r[s],s,this)===!1)return o+1}return o},D.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new w(function(){var s=n[e?i-o:o];return o++>i?S():E(t,s,r[s])})},D.prototype[hr]=!0,t(z,j),z.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=I(r),i=0;if(k(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},z.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=I(r);if(!k(n))return new w(S);var i=0;return new w(function(){var e=n.next();return e.done?e:E(t,i++,e.value)})},t(M,j),M.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i<n.length;)if(t(n[i],i++,this)===!1)return i;for(var o;!(o=r.next()).done;){var s=o.value;if(n[i]=s,t(s,i++,this)===!1)break}return i},M.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new w(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return E(t,i,n[i++])})};var Ir;t(X,j),X.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},X.prototype.get=function(t,e){return this.has(t)?this._value:e},X.prototype.includes=function(t){return J(this._value,t)},X.prototype.slice=function(t,e){var r=this.size;return y(t,e,r)?this:new X(this._value,b(e,r)-g(t,r))},X.prototype.reverse=function(){return this},X.prototype.indexOf=function(t){return J(this._value,t)?0:-1},X.prototype.lastIndexOf=function(t){return J(this._value,t)?this.size:-1},X.prototype.__iterate=function(t,e){for(var r=0;r<this.size;r++)if(t(this._value,r,this)===!1)return r+1;return r},X.prototype.__iterator=function(t,e){var r=this,n=0;return new w(function(){return n<r.size?E(t,n++,r._value):S()})},X.prototype.equals=function(t){return t instanceof X?J(this._value,t._value):G(t)};var xr;t(Q,j),Q.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},Q.prototype.get=function(t,e){return this.has(t)?this._start+_(this,t)*this._step:e},Q.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},Q.prototype.slice=function(t,e){return y(t,e,this.size)?this:(t=g(t,this.size),e=b(e,this.size),e<=t?new Q(0,0):new Q(this.get(t,this._end),this.get(e,this._end),this._step))},Q.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},Q.prototype.lastIndexOf=function(t){return this.indexOf(t)},Q.prototype.__iterate=function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;o<=r;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Q.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new w(function(){var s=i;return i+=e?-n:n,o>r?S():E(t,o++,s)})},Q.prototype.equals=function(t){return t instanceof Q?this._start===t._start&&this._end===t._end&&this._step===t._step:G(this,t)};var Tr;t(tt,e),t(et,tt),t(rt,tt),t(nt,tt),tt.Keyed=et,tt.Indexed=rt,tt.Set=nt;var Ar,Or="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(t,e){t|=0,e|=0;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},jr=Object.isExtensible,Lr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Rr="function"==typeof WeakMap;Rr&&(Ar=new WeakMap);var Dr=0,zr="__immutablehash__";"function"==typeof Symbol&&(zr=Symbol(zr));var Mr=16,qr=255,Ur=0,Cr={};t(ht,et),ht.of=function(){var t=ar.call(arguments,0);return Et().withMutations(function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}})},ht.prototype.toString=function(){return this.__toString("Map {","}")},ht.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},ht.prototype.set=function(t,e){return St(this,t,e)},ht.prototype.setIn=function(t,e){return this.updateIn(t,vr,function(){return e})},ht.prototype.remove=function(t){return St(this,t,vr)},ht.prototype.deleteIn=function(t){return this.updateIn(t,function(){return vr})},ht.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},ht.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=Dt(this,je(t),e,r);return n===vr?void 0:n},ht.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Et()},ht.prototype.merge=function(){return Ot(this,void 0,arguments)},ht.prototype.mergeWith=function(t){var e=ar.call(arguments,1);return Ot(this,t,e)},ht.prototype.mergeIn=function(t){var e=ar.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},ht.prototype.mergeDeep=function(){return Ot(this,jt,arguments)},ht.prototype.mergeDeepWith=function(t){var e=ar.call(arguments,1);return Ot(this,Lt(t),e)},ht.prototype.mergeDeepIn=function(t){var e=ar.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},ht.prototype.sort=function(t){return $t(me(this,t))},ht.prototype.sortBy=function(t,e){return $t(me(this,e,t))},ht.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},ht.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new l)},ht.prototype.asImmutable=function(){return this.__ensureOwner()},ht.prototype.wasAltered=function(){return this.__altered},ht.prototype.__iterator=function(t,e){return new gt(this,t,e)},ht.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},ht.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?wt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ht.isMap=lt;var Nr="@@__IMMUTABLE_MAP__@@",Pr=ht.prototype;Pr[Nr]=!0,Pr[lr]=Pr.remove,Pr.removeIn=Pr.deleteIn,pt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(J(r,i[o][0]))return i[o][1];return n},pt.prototype.update=function(t,e,r,n,i,o,s){for(var a=i===vr,f=this.entries,u=0,c=f.length;u<c&&!J(n,f[u][0]);u++);var l=u<c;if(l?f[u][1]===i:a)return this;if(h(s),(a||!l)&&h(o),!a||1!==f.length){if(!l&&!a&&f.length>=Hr)return xt(t,f,n,i);var d=t&&t===this.ownerID,_=d?f:p(f);return l?a?u===c-1?_.pop():_[u]=_.pop():_[u]=[n,i]:_.push([n,i]),d?(this.entries=_,this):new pt(t,_)}},dt.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=1<<((0===t?e:e>>>t)&_r),o=this.bitmap;return 0===(o&i)?n:this.nodes[zt(o&i-1)].get(t+pr,e,r,n)},dt.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=ot(n));var a=(0===e?r:r>>>e)&_r,f=1<<a,u=this.bitmap,c=0!==(u&f);if(!c&&i===vr)return this;var h=zt(u&f-1),l=this.nodes,p=c?l[h]:void 0,d=Bt(p,t,e+pr,r,n,i,o,s);if(d===p)return this;if(!c&&d&&l.length>=Vr)return At(t,l,u,a,d);if(c&&!d&&2===l.length&&kt(l[1^h]))return l[1^h];if(c&&d&&1===l.length&&kt(d))return d;var _=t&&t===this.ownerID,v=c?d?u:u^f:u|f,y=c?d?Mt(l,h,d,_):Ut(l,h,_):qt(l,h,d,_);return _?(this.bitmap=v,this.nodes=y,this):new dt(t,v,y)},_t.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=(0===t?e:e>>>t)&_r,o=this.nodes[i];return o?o.get(t+pr,e,r,n):n},_t.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=ot(n));var a=(0===e?r:r>>>e)&_r,f=i===vr,u=this.nodes,c=u[a];if(f&&!c)return this;var h=Bt(c,t,e+pr,r,n,i,o,s);if(h===c)return this;var l=this.count;if(c){if(!h&&(l--,l<Kr))return Tt(t,u,l,a)}else l++;var p=t&&t===this.ownerID,d=Mt(u,a,h,p);return p?(this.count=l,this.nodes=d,this):new _t(t,l,d)},vt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(J(r,i[o][0]))return i[o][1];return n},vt.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=ot(n));var a=i===vr;if(r!==this.keyHash)return a?this:(h(s),h(o),It(this,t,e,r,[n,i]));for(var f=this.entries,u=0,c=f.length;u<c&&!J(n,f[u][0]);u++);var l=u<c;if(l?f[u][1]===i:a)return this;if(h(s),(a||!l)&&h(o),a&&2===c)return new yt(t,this.keyHash,f[1^u]);var d=t&&t===this.ownerID,_=d?f:p(f);return l?a?u===c-1?_.pop():_[u]=_.pop():_[u]=[n,i]:_.push([n,i]),d?(this.entries=_,this):new vt(t,this.keyHash,_)},yt.prototype.get=function(t,e,r,n){return J(r,this.entry[0])?this.entry[1]:n},yt.prototype.update=function(t,e,r,n,i,o,s){var a=i===vr,f=J(n,this.entry[0]);return(f?i===this.entry[1]:a)?this:(h(s),a?void h(o):f?t&&t===this.ownerID?(this.entry[1]=i,this):new yt(t,this.keyHash,[n,i]):(h(o),It(this,t,e,ot(n),[n,i])))},pt.prototype.iterate=vt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(t(r[e?i-n:n])===!1)return!1},dt.prototype.iterate=_t.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},yt.prototype.iterate=function(t,e){return t(this.entry)},t(gt,w),gt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return bt(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,i<=r)return bt(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,i<=r){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return bt(t,o.entry);e=this._stack=mt(o,e)}continue}e=this._stack=this._stack.__prev}return S()};var Fr,Hr=dr/4,Vr=dr/2,Kr=dr/4;t(Ct,rt),Ct.of=function(){return this(arguments)},Ct.prototype.toString=function(){return this.__toString("List [","]")},Ct.prototype.get=function(t,e){if(t=_(this,t),t>=0&&t<this.size){t+=this._origin;var r=Zt(this,t);return r&&r.array[t&_r]}return e},Ct.prototype.set=function(t,e){return Kt(this,t,e)},Ct.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},Ct.prototype.insert=function(t,e){return this.splice(t,0,e)},Ct.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=pr,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Vt()},Ct.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){Jt(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])})},Ct.prototype.pop=function(){return Jt(this,0,-1)},Ct.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){Jt(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])})},Ct.prototype.shift=function(){return Jt(this,1)},Ct.prototype.merge=function(){return Gt(this,void 0,arguments)},Ct.prototype.mergeWith=function(t){var e=ar.call(arguments,1);return Gt(this,t,e)},Ct.prototype.mergeDeep=function(){return Gt(this,jt,arguments)},Ct.prototype.mergeDeepWith=function(t){var e=ar.call(arguments,1);return Gt(this,Lt(t),e)},Ct.prototype.setSize=function(t){return Jt(this,0,t)},Ct.prototype.slice=function(t,e){var r=this.size;return y(t,e,r)?this:Jt(this,g(t,r),b(e,r))},Ct.prototype.__iterator=function(t,e){var r=0,n=Ft(this,e);return new w(function(){var e=n();return e===Jr?S():E(t,r++,e)})},Ct.prototype.__iterate=function(t,e){for(var r,n=0,i=Ft(this,e);(r=i())!==Jr&&t(r,n++,this)!==!1;);return n},Ct.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ht(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},Ct.isList=Nt;var Wr="@@__IMMUTABLE_LIST__@@",Yr=Ct.prototype;Yr[Wr]=!0,Yr[lr]=Yr.remove,Yr.setIn=Pr.setIn,Yr.deleteIn=Yr.removeIn=Pr.removeIn,Yr.update=Pr.update,Yr.updateIn=Pr.updateIn,Yr.mergeIn=Pr.mergeIn,Yr.mergeDeepIn=Pr.mergeDeepIn,Yr.withMutations=Pr.withMutations,Yr.asMutable=Pr.asMutable,Yr.asImmutable=Pr.asImmutable,Yr.wasAltered=Pr.wasAltered,Pt.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&_r;if(n>=this.array.length)return new Pt([],t);var i,o=0===n;if(e>0){var s=this.array[n];if(i=s&&s.removeBefore(t,e-pr,r),i===s&&o)return this}if(o&&!i)return this;var a=Yt(this,t);if(!o)for(var f=0;f<n;f++)a.array[f]=void 0;return i&&(a.array[n]=i),a},Pt.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n=r-1>>>e&_r;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-pr,r),i===o&&n===this.array.length-1)return this}var s=Yt(this,t);return s.array.splice(n+1),i&&(s.array[n]=i),s};var Zr,Jr={};t($t,ht),$t.of=function(){return this(arguments)},$t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},$t.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},$t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},$t.prototype.set=function(t,e){return re(this,t,e)},$t.prototype.remove=function(t){return re(this,t,vr)},$t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},$t.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},$t.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},$t.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?te(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},$t.isOrderedMap=Qt,$t.prototype[hr]=!0,$t.prototype[lr]=$t.prototype.remove;var Gr;t(ne,O),ne.prototype.get=function(t,e){return this._iter.get(t,e)},ne.prototype.has=function(t){return this._iter.has(t)},ne.prototype.valueSeq=function(){return this._iter.valueSeq()},ne.prototype.reverse=function(){var t=this,e=ue(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},ne.prototype.map=function(t,e){var r=this,n=fe(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},ne.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?Ie(this):0,function(i){return t(i,e?--r:r++,n)}),e)},ne.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(mr,e),n=e?Ie(this):0;return new w(function(){var i=r.next();return i.done?i:E(t,e?--n:n++,i.value,i)})},ne.prototype[hr]=!0,t(ie,j),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ie.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e),n=0;return new w(function(){var e=r.next();return e.done?e:E(t,n++,e.value,e)})},t(oe,L),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},oe.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e);return new w(function(){var e=r.next();return e.done?e:E(t,e.value,e.value,e)})},t(se,O),se.prototype.entrySeq=function(){return this._iter.toSeq()},se.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){ke(e);var n=o(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},se.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e);return new w(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){ke(n);var i=o(n);return E(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ie.prototype.cacheResult=ne.prototype.cacheResult=oe.prototype.cacheResult=se.prototype.cacheResult=Ae,t(Le,et),Le.prototype.toString=function(){return this.__toString(De(this)+" {","}")},Le.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Le.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},Le.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Re(this,Et()))},Le.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+De(this));if(this._map&&!this._map.has(t)){var r=this._defaultValues[t];if(e===r)return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Re(this,n)},Le.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Re(this,e)},Le.prototype.wasAltered=function(){return this._map.wasAltered()},Le.prototype.__iterator=function(t,e){var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterator(t,e)},Le.prototype.__iterate=function(t,e){var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterate(t,e)},Le.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Re(this,e,t):(this.__ownerID=t,this._map=e,this)};var Xr=Le.prototype;Xr[lr]=Xr.remove,Xr.deleteIn=Xr.removeIn=Pr.removeIn,Xr.merge=Pr.merge,Xr.mergeWith=Pr.mergeWith,Xr.mergeIn=Pr.mergeIn,Xr.mergeDeep=Pr.mergeDeep,Xr.mergeDeepWith=Pr.mergeDeepWith,Xr.mergeDeepIn=Pr.mergeDeepIn,Xr.setIn=Pr.setIn,Xr.update=Pr.update,Xr.updateIn=Pr.updateIn,Xr.withMutations=Pr.withMutations,Xr.asMutable=Pr.asMutable,Xr.asImmutable=Pr.asImmutable,t(qe,nt),qe.of=function(){return this(arguments)},qe.fromKeys=function(t){return this(r(t).keySeq())},qe.prototype.toString=function(){return this.__toString("Set {","}")},qe.prototype.has=function(t){return this._map.has(t)},qe.prototype.add=function(t){return Ce(this,this._map.set(t,!0))},qe.prototype.remove=function(t){return Ce(this,this._map.remove(t))},qe.prototype.clear=function(){return Ce(this,this._map.clear())},qe.prototype.union=function(){var t=ar.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r<t.length;r++)i(t[r]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},qe.prototype.intersect=function(){var t=ar.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.every(function(t){return t.includes(e)})||r.remove(e)})})},qe.prototype.subtract=function(){var t=ar.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.remove(e)})})},qe.prototype.merge=function(){return this.union.apply(this,arguments)},qe.prototype.mergeWith=function(t){var e=ar.call(arguments,1);return this.union.apply(this,e)},qe.prototype.sort=function(t){return Fe(me(this,t))},qe.prototype.sortBy=function(t,e){return Fe(me(this,e,t))},qe.prototype.wasAltered=function(){return this._map.wasAltered()},qe.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},qe.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},qe.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},
qe.isSet=Ue;var $r="@@__IMMUTABLE_SET__@@",Qr=qe.prototype;Qr[$r]=!0,Qr[lr]=Qr.remove,Qr.mergeDeep=Qr.merge,Qr.mergeDeepWith=Qr.mergeWith,Qr.withMutations=Pr.withMutations,Qr.asMutable=Pr.asMutable,Qr.asImmutable=Pr.asImmutable,Qr.__empty=Pe,Qr.__make=Ne;var tn;t(Fe,qe),Fe.of=function(){return this(arguments)},Fe.fromKeys=function(t){return this(r(t).keySeq())},Fe.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Fe.isOrderedSet=He;var en=Fe.prototype;en[hr]=!0,en.__empty=Ke,en.__make=Ve;var rn;t(We,rt),We.of=function(){return this(arguments)},We.prototype.toString=function(){return this.__toString("Stack [","]")},We.prototype.get=function(t,e){var r=this._head;for(t=_(this,t);r&&t--;)r=r.next;return r?r.value:e},We.prototype.peek=function(){return this._head&&this._head.value},We.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ze(t,e)},We.prototype.pushAll=function(t){if(t=n(t),0===t.size)return this;ct(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Ze(e,r)},We.prototype.pop=function(){return this.slice(1)},We.prototype.unshift=function(){return this.push.apply(this,arguments)},We.prototype.unshiftAll=function(t){return this.pushAll(t)},We.prototype.shift=function(){return this.pop.apply(this,arguments)},We.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Je()},We.prototype.slice=function(t,e){if(y(t,e,this.size))return this;var r=g(t,this.size),n=b(e,this.size);if(n!==this.size)return rt.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Ze(i,o)},We.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ze(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},We.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},We.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new w(function(){if(n){var e=n.value;return n=n.next,E(t,r++,e)}return S()})},We.isStack=Ye;var nn="@@__IMMUTABLE_STACK__@@",on=We.prototype;on[nn]=!0,on.withMutations=Pr.withMutations,on.asMutable=Pr.asMutable,on.asImmutable=Pr.asImmutable,on.wasAltered=Pr.wasAltered;var sn;e.Iterator=w,Ge(e,{toArray:function(){ct(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new ne(this,!0)},toMap:function(){return ht(this.toKeyedSeq())},toObject:function(){ct(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return $t(this.toKeyedSeq())},toOrderedSet:function(){return Fe(s(this)?this.valueSeq():this)},toSet:function(){return qe(s(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this)},toSeq:function(){return a(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return We(s(this)?this.valueSeq():this)},toList:function(){return Ct(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=ar.call(arguments,0);return Be(this,ve(this,t))},includes:function(t){return this.some(function(e){return J(e,t)})},entries:function(){return this.__iterator(wr)},every:function(t,e){ct(this.size);var r=!0;return this.__iterate(function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1}),r},filter:function(t,e){return Be(this,ce(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return ct(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){ct(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?n.toString():""}),e},keys:function(){return this.__iterator(br)},map:function(t,e){return Be(this,fe(this,t,e))},reduce:function(t,e,r){ct(this.size);var n,i;return arguments.length<2?i=!0:n=e,this.__iterate(function(e,o,s){i?(i=!1,n=e):n=t.call(r,n,e,o,s)}),n},reduceRight:function(t,e,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return Be(this,ue(this,!0))},slice:function(t,e){return Be(this,pe(this,t,e,!0))},some:function(t,e){return!this.every(Qe(t),e)},sort:function(t){return Be(this,me(this,t))},values:function(){return this.__iterator(mr)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return d(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return he(this,t,e)},equals:function(t){return G(this,t)},entrySeq:function(){var t=this;if(t._cache)return new R(t._cache);var e=t.toSeq().map($e).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Qe(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate(function(r,i,o){if(t.call(e,r,i,o))return n=[i,r],!1}),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(v)},flatMap:function(t,e){return Be(this,ge(this,t,e))},flatten:function(t){return Be(this,ye(this,t,!0))},fromEntrySeq:function(){return new se(this)},get:function(t,e){return this.find(function(e,r){return J(r,t)},void 0,e)},getIn:function(t,e){for(var r,n=this,i=je(t);!(r=i.next()).done;){var o=r.value;if(n=n&&n.get?n.get(o,vr):vr,n===vr)return e}return n},groupBy:function(t,e){return le(this,t,e)},has:function(t){return this.get(t,vr)!==vr},hasIn:function(t){return this.getIn(t,vr)!==vr},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return J(e,t)})},keySeq:function(){return this.toSeq().map(Xe).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return we(this,t)},maxBy:function(t,e){return we(this,e,t)},min:function(t){return we(this,t?tr(t):nr)},minBy:function(t,e){return we(this,e?tr(e):nr,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Be(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Be(this,_e(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Qe(t),e)},sortBy:function(t,e){return Be(this,me(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Be(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Be(this,de(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Qe(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var an=e.prototype;an[fr]=!0,an[Br]=an.values,an.__toJS=an.toArray,an.__toStringMapper=er,an.inspect=an.toSource=function(){return this.toString()},an.chain=an.flatMap,an.contains=an.includes,Ge(r,{flip:function(){return Be(this,ae(this))},mapEntries:function(t,e){var r=this,n=0;return Be(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Be(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var fn=r.prototype;fn[ur]=!0,fn[Br]=an.entries,fn.__toJS=an.toObject,fn.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+er(t)},Ge(n,{toKeyedSeq:function(){return new ne(this,!1)},filter:function(t,e){return Be(this,ce(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Be(this,ue(this,!1))},slice:function(t,e){return Be(this,pe(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=g(t,t<0?this.count():this.size);var n=this.slice(0,t);return Be(this,1===r?n:n.concat(p(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(){return this.get(0)},flatten:function(t){return Be(this,ye(this,t,!1))},get:function(t,e){return t=_(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=_(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t<this.size:this.indexOf(t)!==-1)},interpose:function(t){return Be(this,be(this,t))},interleave:function(){var t=[this].concat(p(arguments)),e=Se(this.toSeq(),j.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Be(this,r)},keySeq:function(){return Q(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Be(this,_e(this,t,e,!1))},zip:function(){var t=[this].concat(p(arguments));return Be(this,Se(this,rr,t))},zipWith:function(t){var e=p(arguments);return e[0]=this,Be(this,Se(this,t,e))}}),n.prototype[cr]=!0,n.prototype[hr]=!0,Ge(i,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=an.includes,i.prototype.contains=i.prototype.includes,Ge(O,r.prototype),Ge(j,n.prototype),Ge(L,i.prototype),Ge(et,r.prototype),Ge(rt,n.prototype),Ge(nt,i.prototype);var un={Iterable:e,Seq:A,Collection:tt,Map:ht,OrderedMap:$t,List:Ct,Stack:We,Set:qe,OrderedSet:Fe,Record:Le,Range:Q,Repeat:X,is:J,fromJS:K};return un})},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){t.exports={_args:[["bigi@^1.4.1","/home/travis/build/decentral-exchange/build/bitshares-2-ui/web/node_modules/graphenejs-lib"]],_from:"bigi@>=1.4.1 <2.0.0",_id:"[email protected]",_inCache:!0,_installable:!0,_location:"/bigi",_nodeVersion:"6.1.0",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/bigi-1.4.2.tgz_1469584192413_0.6801238611806184"},_npmUser:{email:"[email protected]",name:"jprichardson"},_npmVersion:"3.8.6",_phantomChildren:{},_requested:{name:"bigi",raw:"bigi@^1.4.1",rawSpec:"^1.4.1",scope:null,spec:">=1.4.1 <2.0.0",type:"range"},_requiredBy:["/ecurve","/graphenejs-lib"],_resolved:"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz",_shasum:"9c665a95f88b8b08fc05cfd731f561859d725825",_shrinkwrap:null,_spec:"bigi@^1.4.1",_where:"/home/travis/build/decentral-exchange/build/bitshares-2-ui/web/node_modules/graphenejs-lib",bugs:{url:"https://github.com/cryptocoinjs/bigi/issues"},dependencies:{},description:"Big integers.",devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},directories:{},dist:{shasum:"9c665a95f88b8b08fc05cfd731f561859d725825",tarball:"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz"},gitHead:"c25308081c896ff84702303722bf5ecd8b3f78e3",homepage:"https://github.com/cryptocoinjs/bigi#readme",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],main:"./lib/index.js",maintainers:[{email:"[email protected]",name:"midnightlightning"},{email:"[email protected]",name:"sidazhang"},{email:"[email protected]",name:"nadav"},{email:"[email protected]",name:"jprichardson"}],name:"bigi",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/cryptocoinjs/bigi.git"},scripts:{"browser-test":"mochify --wd -R spec",coverage:"istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info",jshint:"jshint --config jshint.json lib/*.js ; true",test:"_mocha -- test/*.js",unit:"mocha"},testling:{browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"],files:"test/*.js",harness:"mocha"},version:"1.4.2"}},function(t,e){t.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}},function(t,e,r){t.exports=r(8)},function(t,e,r){t.exports=r(44)},function(t,e,r){(function(n){e=t.exports=r(45),e.Stream=r(11),e.Readable=e,e.Writable=r(24),e.Duplex=r(8),e.Transform=r(23),e.PassThrough=r(44),n.browser||"disable"!=={NODE_ENV:"production"}.READABLE_STREAM||(t.exports=r(11))}).call(e,r(9))},function(t,e,r){t.exports=r(23)},function(t,e,r){t.exports=r(24)},function(t,e,r){(function(e){function r(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e}function n(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e}function i(t,e,r){for(var n=0;n<16;n++){var i=r+n,h=e[i];e[i]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}var g,b,m,w,E,S,B,k,I,x;S=g=t[0],B=b=t[1],k=m=t[2],I=w=t[3],x=E=t[4];var T;for(n=0;n<80;n+=1)T=g+e[r+l[n]]|0,T+=n<16?o(b,m,w)+v[0]:n<32?s(b,m,w)+v[1]:n<48?a(b,m,w)+v[2]:n<64?f(b,m,w)+v[3]:u(b,m,w)+v[4],T|=0,T=c(T,d[n]),T=T+E|0,g=E,E=w,w=c(m,10),m=b,b=T,T=S+e[r+p[n]]|0,T+=n<16?u(B,k,I)+y[0]:n<32?f(B,k,I)+y[1]:n<48?a(B,k,I)+y[2]:n<64?s(B,k,I)+y[3]:o(B,k,I)+y[4],T|=0,T=c(T,_[n]),T=T+x|0,S=x,x=I,I=c(k,10),k=B,B=T;T=t[1]+m+I|0,t[1]=t[2]+w+x|0,t[2]=t[3]+E+S|0,t[3]=t[4]+g+B|0,t[4]=t[0]+b+k|0,t[0]=T}function o(t,e,r){return t^e^r}function s(t,e,r){return t&e|~t&r}function a(t,e,r){return(t|~e)^r}function f(t,e,r){return t&r|e&~r}function u(t,e,r){return t^(e|~r)}function c(t,e){return t<<e|t>>>32-e}function h(t){var o=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var s=r(t),a=8*t.length,f=8*t.length;s[a>>>5]|=128<<24-a%32,s[(a+64>>>9<<4)+14]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8);for(var u=0;u<s.length;u+=16)i(o,s,u);for(u=0;u<5;u++){var c=o[u];o[u]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var h=n(o);return new e(h)}/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var l=[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],p=[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],d=[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],_=[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],v=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];t.exports=h}).call(e,r(1).Buffer)},function(t,e,r){var 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};e.sha=r(115),e.sha1=r(116),e.sha224=r(117),e.sha256=r(47),e.sha384=r(118),e.sha512=r(48)},function(t,e,r){(function(e){function n(){this.init(),this._w=c,f.call(this,64,56)}function i(t){return t<<5|t>>>27}function o(t){return t<<30|t>>>2}function s(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}var a=r(2),f=r(10),u=[1518500249,1859775393,-1894007588,-899497514],c=new Array(80);a(n,f),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,a=0|this._c,f=0|this._d,c=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=e[h-3]^e[h-8]^e[h-14]^e[h-16];for(var l=0;l<80;++l){var p=~~(l/20),d=i(r)+s(p,n,a,f)+c+e[l]+u[p]|0;c=f,f=a,a=o(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=f+this._d|0,this._e=c+this._e|0},n.prototype._hash=function(){var t=new e(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=n}).call(e,r(1).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=h,u.call(this,64,56)}function i(t){return t<<1|t>>>31}function o(t){return t<<5|t>>>27}function s(t){return t<<30|t>>>2}function a(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}var f=r(2),u=r(10),c=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);f(n,u),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,f=0|this._c,u=0|this._d,h=0|this._e,l=0;l<16;++l)e[l]=t.readInt32BE(4*l);for(;l<80;++l)e[l]=i(e[l-3]^e[l-8]^e[l-14]^e[l-16]);for(var p=0;p<80;++p){var d=~~(p/20),_=o(r)+a(d,n,f,u)+h+e[p]+c[d]|0;h=u,u=f,f=s(n),n=r,r=_}this._a=r+this._a|0,this._b=n+this._b|0,this._c=f+this._c|0,this._d=u+this._d|0,this._e=h+this._e|0},n.prototype._hash=function(){var t=new e(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=n}).call(e,r(1).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=a,s.call(this,64,56)}var i=r(2),o=r(47),s=r(10),a=new Array(64);i(n,o),n.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},n.prototype._hash=function(){var t=new e(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=n}).call(e,r(1).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=a,s.call(this,128,112)}var i=r(2),o=r(48),s=r(10),a=new Array(160);i(n,o),n.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},n.prototype._hash=function(){function t(t,e,n){r.writeInt32BE(t,n),r.writeInt32BE(e,n+4)}var r=new e(48);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),r},t.exports=n}).call(e,r(1).Buffer)},2,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){function i(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),_(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),f(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function f(t,r,n){if(t.customInspect&&r&&I(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=f(t,i,n)),i}var o=u(t,r);if(o)return o;var s=Object.keys(r),_=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(r);if(0===s.length){if(I(r)){var v=r.name?": "+r.name:"";return t.stylize("[Function"+v+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(B(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return c(r)}var y="",g=!1,m=["{","}"];if(d(r)&&(g=!0,m=["[","]"]),I(r)){var w=r.name?": "+r.name:"";y=" [Function"+w+"]"}if(E(r)&&(y=" "+RegExp.prototype.toString.call(r)),B(r)&&(y=" "+Date.prototype.toUTCString.call(r)),k(r)&&(y=" "+c(r)),0===s.length&&(!g||0==r.length))return m[0]+y+m[1];if(n<0)return E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var S;return S=g?h(t,r,n,_,s):s.map(function(e){return l(t,r,n,_,e,g)}),t.seen.pop(),p(S,y,m)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return g(e)?t.stylize(""+e,"number"):_(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)j(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),j(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=v(r)?f(t,u.value,null):f(t,u.value,r-1),a.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")),w(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.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,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function _(t){return"boolean"==typeof t}function v(t){return null===t}function y(t){return null==t}function g(t){return"number"==typeof t}function b(t){return"string"==typeof t}function m(t){return"symbol"==typeof t}function w(t){return void 0===t}function E(t){return S(t)&&"[object RegExp]"===T(t)}function S(t){return"object"==typeof t&&null!==t}function B(t){return S(t)&&"[object Date]"===T(t)}function k(t){return S(t)&&("[object Error]"===T(t)||t instanceof Error)}function I(t){return"function"==typeof t}function x(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function T(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}function O(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),z[t.getMonth()],e].join(" ")}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var L=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(L,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}}),a=n[r];r<o;a=n[++r])s+=v(a)||!S(a)?" "+a:" "+i(a);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var R,D={};e.debuglog=function(t){if(w(R)&&(R={NODE_ENV:"production"}.NODE_DEBUG||""),t=t.toUpperCase(),!D[t])if(new RegExp("\\b"+t+"\\b","i").test(R)){var r=n.pid;D[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else D[t]=function(){};return D[t]},e.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=_,e.isNull=v,e.isNullOrUndefined=y,e.isNumber=g,e.isString=b,e.isSymbol=m,e.isUndefined=w,e.isRegExp=E,e.isObject=S,e.isDate=B,e.isError=k,e.isFunction=I,e.isPrimitive=x,e.isBuffer=r(120);var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",O(),e.format.apply(e,arguments))},e.inherits=r(119),e._extend=function(t,e){if(!e||!S(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(9))},function(t,e){},122,122]));
//# sourceMappingURL=main.js.map