-
Notifications
You must be signed in to change notification settings - Fork 2
/
cbc954f904664c9d2ba5.worker.js
27 lines (27 loc) · 362 KB
/
cbc954f904664c9d2ba5.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
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=122)}([function(t,e,r){"use strict";var n=r(8),i=r(12),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s={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(!n.Long.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]:"";return this.is_empty(t)?t:(this.no_overflow53(t,e),"number"==typeof t?t:parseInt(t))},to_long:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.is_empty(t)?t:n.Long.isLong(t)?t:(this.no_overflow64(t,e,r),"number"==typeof t&&(t=""+t),n.Long.fromString(t,r))},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(n.Long.isLong(t))return t.toString();throw"unsupported type "+e+": ("+(void 0===t?"undefined":o(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]?arguments[0]:1,e=arguments[1],r=arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(this.is_empty(r))return r;var o=i.a.object_type[e];if(!o)throw new Error("Unknown object type "+e+" "+n+" "+r);if(!new RegExp(t+"."+o+".[0-9]+$").test(r))throw new Error("Expecting "+e+" in format "+t+"."+o+".[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(i.a.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(!n.Long.isLong(t))throw"unsupported type "+e+": ("+(void 0===t?"undefined":o(t))+") "+t;this.no_overflow53(t.toInt(),e)}else{parseInt(t);if(t>9007199254740991||t<-9007199254740991)throw new Error("overflow "+e+" "+t)}else if(t>9007199254740991||t<-9007199254740991)throw new Error("overflow "+e+" "+t)},no_overflow64:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!n.Long.isLong(t))if(void 0===t.t||void 0===t.s)if("string"!=typeof t){if("number"!=typeof t)throw"unsupported type "+e+": ("+(void 0===t?"undefined":o(t))+") "+t;if(t>9007199254740991||t<-9007199254740991)throw new Error("overflow "+e+" "+t)}else{for(t=t.replace(/^0+/,"");/0$/.test(t);)t=t.substring(0,t.length-1);if(/\.$/.test(t)&&(t=t.substring(0,t.length-1)),""===t&&(t="0"),n.Long.fromString(t,r).toString()!==t.trim())throw new Error("overflow "+e+" "+t)}else this.no_overflow64(t.toString(),e,r)}};e.a=s},function(t,e,r){"use strict";r.r(e),r.d(e,"sha1",function(){return a}),r.d(e,"sha256",function(){return u}),r.d(e,"sha512",function(){return f}),r.d(e,"HmacSHA256",function(){return c}),r.d(e,"ripemd160",function(){return h});var n=r(37),i=r.n(n),o=r(68),s=r.n(o);function a(t,e){return i()("sha1").update(t).digest(e)}function u(t,e){return i()("sha256").update(t).digest(e)}function f(t,e){return i()("sha512").update(t).digest(e)}function c(t,e){return s()("sha256",e).update(t).digest()}function h(t){return i()("rmd160").update(t).digest()}},function(t,e,r){"use strict";(function(e){
/*!
* 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)}var o=r(76),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,u="foo"===function(){}.name;function f(t){return Object.prototype.toString.call(t)}function c(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=t.exports=v,l=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(l);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function _(t){if(u||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function g(t,e,r,n,i){throw new h.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function v(t,e){t||g(t,!0,e,"==",h.ok)}function y(t,e,r,s){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(c(t)&&c(e)&&f(t)===f(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var u=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),function(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=b(t),s=b(e);if(i&&!s||!i&&s)return!1;if(i)return t=a.call(t),e=a.call(e),y(t,e,r);var u,f,c=E(t),h=E(e);if(c.length!==h.length)return!1;for(c.sort(),h.sort(),f=c.length-1;f>=0;f--)if(c[f]!==h[f])return!1;for(f=c.length-1;f>=0;f--)if(u=c[f],!y(t[u],e[u],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function m(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&g(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!t&&o.isError(i),u=!t&&i&&!r;if((a&&s&&m(i,r)||u)&&g(i,r,"Got unwanted exception"+n),t&&i&&r&&!m(i,r)||!t&&i)throw i}h.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=function(t){return d(_(t.actual),128)+" "+t.operator+" "+d(_(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},o.inherits(h.AssertionError,Error),h.fail=g,h.ok=v,h.equal=function(t,e,r){t!=e&&g(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&g(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){y(t,e,!1)||g(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){y(t,e,!0)||g(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){y(t,e,!1)&&g(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&&g(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&g(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&g(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){w(!0,t,e,r)},h.doesNotThrow=function(t,e,r){w(!1,t,e,r)},h.ifError=function(t){if(t)throw t};var E=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,r(16))},function(t,e,r){"use strict";var n=r(30),i=r(43);!function(){function t(e){var r=e.url,n=e.urls,i=e.autoFallback,o=e.closeCb,s=e.optionalApis,a=e.urlChangeCallback;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.url=r,this.urls=n.filter(function(t){return t!==r}),this.autoFallback=i,this.closeCb=o,this.optionalApis=s||{},this.isConnected=!1,this.urlChangeCallback=a}t.prototype.setCloseCb=function(t){this.closeCb=t},t.close=function(){return n.a.close()},t.prototype.logFailure=function(t,e,r){var n=r&&r.message?r.message:"";console.error(t,"Failed to connect to "+e+(n?" Error: "+JSON.stringify(n):""))},t.prototype._onClose=function(){this.isConnected=!1,this.closeCb&&(this.closeCb(),this.setCloseCb(null)),this.autoFallback&&this.connectWithFallback()},t.prototype.connect=function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return new Promise(function(i,o){n.a.instance(r,e,void 0,t.optionalApis,t._onClose.bind(t)).init_promise.then(function(e){t.url=r,t.isConnected=!0,i(e)}).catch(function(t){n.a.close().then(function(){o(t)})})})},t.prototype.connectWithFallback=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(o&&r>this.urls.length)return o(new Error("Tried "+r+" connections, none of which worked: "+JSON.stringify(this.urls.concat(this.url))));var s=function(e,i,o){return n.urlChangeCallback&&n.urlChangeCallback(n.urls[r]),n.connectWithFallback(t,n.urls[r],r+1,i,o)};return i&&o?this.connect(t,e).then(i).catch(function(t){s(0,i,o)}):new Promise(function(e,r){n.connect(t,void 0).then(e).catch(function(t){s(0,e,r)})})},t.prototype.checkConnections=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=this,n=arguments[2],o=arguments[3],s={},a=function(n,o){var a=[];r.urls.concat(r.url).forEach(function(n){var o=new i.a(n,function(){},void 0,!1);s[n]=(new Date).getTime(),a.push(function(){return o.login(t,e).then(function(t){var e,r=((e={})[n]=(new Date).getTime()-s[n],e);return o.close().then(function(){return r})}).catch(function(t){return r.logFailure("checkConnections",n,t),n===r.url?r.url=r.urls[0]:r.urls=r.urls.filter(function(t){return t!==n}),o.close().then(function(){return null})})})}),Promise.all(a.map(function(t){return t()})).then(function(t){var e=t.filter(function(t){return!!t}).sort(function(t,e){return Object.values(t)[0]-Object.values(e)[0]}).reduce(function(t,e){var r=Object.keys(e)[0];return t[r]=e[r],t},{});return console.log("Checked "+t.length+" connections, "+(t.length-Object.keys(e).length)+" failed"),n(e)}).catch(function(){return r.checkConnections(t,e,n,o)})};if(!n||!o)return new Promise(a);a(n,o)}}();var o=r(41);r.d(e,"a",function(){return n.a}),r.d(e,"b",function(){return o.a}),r.d(e,!1,function(){})},function(t,e,r){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function r(t){return s(t)?t:W(t)}function n(t){return a(t)?t:Y(t)}function i(t){return u(t)?t:Z(t)}function o(t){return s(t)&&!f(t)?t:J(t)}function s(t){return!(!t||!t[h])}function a(t){return!(!t||!t[l])}function u(t){return!(!t||!t[p])}function f(t){return a(t)||u(t)}function c(t){return!(!t||!t[d])}e(n,r),e(i,r),e(o,r),r.isIterable=s,r.isKeyed=a,r.isIndexed=u,r.isAssociative=f,r.isOrdered=c,r.Keyed=n,r.Indexed=i,r.Set=o;var h="@@__IMMUTABLE_ITERABLE__@@",l="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",_=5,g=1<<_,v=g-1,y={},b={value:!1},m={value:!1};function w(t){return t.value=!1,t}function E(t){t&&(t.value=!0)}function S(){}function B(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 T(t){return void 0===t.size&&(t.size=t.__iterate(x)),t.size}function k(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?T(t)+e:e}function x(){return!0}function I(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function O(t,e){return A(t,e,0)}function j(t,e){return A(t,e,e)}function A(t,e,r){return void 0===t?r:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var L=0,M=1,D=2,R="function"==typeof Symbol&&Symbol.iterator,z="@@iterator",q=R||z;function U(t){this.next=t}function C(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 P(){return{value:void 0,done:!0}}function N(t){return!!V(t)}function F(t){return t&&"function"==typeof t.next}function H(t){var e=V(t);return e&&e.call(t)}function V(t){var e=t&&(R&&t[R]||t[z]);if("function"==typeof e)return e}function K(t){return t&&"number"==typeof t.length}function W(t){return null===t||void 0===t?ot():s(t)?t.toSeq():function(t){var e=ut(t)||"object"==typeof t&&new et(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function Y(t){return null===t||void 0===t?ot().toKeyedSeq():s(t)?a(t)?t.toSeq():t.fromEntrySeq():st(t)}function Z(t){return null===t||void 0===t?ot():s(t)?a(t)?t.entrySeq():t.toIndexedSeq():at(t)}function J(t){return(null===t||void 0===t?ot():s(t)?a(t)?t.entrySeq():t:at(t)).toSetSeq()}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=L,U.VALUES=M,U.ENTRIES=D,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[q]=function(){return this},e(W,r),W.of=function(){return W(arguments)},W.prototype.toSeq=function(){return this},W.prototype.toString=function(){return this.__toString("Seq {","}")},W.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},W.prototype.__iterate=function(t,e){return ft(this,t,e,!0)},W.prototype.__iterator=function(t,e){return ct(this,t,e,!0)},e(Y,W),Y.prototype.toKeyedSeq=function(){return this},e(Z,W),Z.of=function(){return Z(arguments)},Z.prototype.toIndexedSeq=function(){return this},Z.prototype.toString=function(){return this.__toString("Seq [","]")},Z.prototype.__iterate=function(t,e){return ft(this,t,e,!1)},Z.prototype.__iterator=function(t,e){return ct(this,t,e,!1)},e(J,W),J.of=function(){return J(arguments)},J.prototype.toSetSeq=function(){return this},W.isSeq=it,W.Keyed=Y,W.Set=J,W.Indexed=Z;var G,X,$,Q="@@__IMMUTABLE_SEQ__@@";function tt(t){this._array=t,this.size=t.length}function et(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function rt(t){this._iterable=t,this.size=t.length||t.size}function nt(t){this._iterator=t,this._iteratorCache=[]}function it(t){return!(!t||!t[Q])}function ot(){return G||(G=new tt([]))}function st(t){var e=Array.isArray(t)?new tt(t).fromEntrySeq():F(t)?new nt(t).fromEntrySeq():N(t)?new rt(t).fromEntrySeq():"object"==typeof t?new et(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function at(t){var e=ut(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function ut(t){return K(t)?new tt(t):F(t)?new nt(t):N(t)?new rt(t):void 0}function ft(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(!1===e(a[1],n?a[0]:s,t))return s+1}return s}return t.__iterateUncached(e,r)}function ct(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,s=0;return new U(function(){var t=i[r?o-s:s];return s++>o?{value:void 0,done:!0}:C(e,n?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,r)}function ht(t,e){return e?function t(e,r,n,i){return Array.isArray(r)?e.call(i,n,Z(r).map(function(n,i){return t(e,n,i,r)})):pt(r)?e.call(i,n,Y(r).map(function(n,i){return t(e,n,i,r)})):r}(e,t,"",{"":t}):lt(t)}function lt(t){return Array.isArray(t)?Z(t).map(lt).toList():pt(t)?Y(t).map(lt).toMap():t}function pt(t){return t&&(t.constructor===Object||void 0===t.constructor)}function dt(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 _t(t,e){if(t===e)return!0;if(!s(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||a(t)!==a(e)||u(t)!==u(e)||c(t)!==c(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!f(t);if(c(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&dt(i[1],t)&&(r||dt(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 o=t;t=e,e=o}var h=!0,l=e.__iterate(function(e,n){if(r?!t.has(e):i?!dt(e,t.get(n,y)):!dt(t.get(n,y),e))return h=!1,!1});return h&&t.size===l}function gt(t,e){if(!(this instanceof gt))return new gt(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(X)return X;X=this}}function vt(t,e){if(!t)throw new Error(e)}function yt(t,e,r){if(!(this instanceof yt))return new yt(t,e,r);if(vt(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($)return $;$=this}}function bt(){throw TypeError("Abstract")}function mt(){}function wt(){}function Et(){}W.prototype[Q]=!0,e(tt,Z),tt.prototype.get=function(t,e){return this.has(t)?this._array[k(this,t)]:e},tt.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;i<=n;i++)if(!1===t(r[e?n-i:i],i,this))return i+1;return i},tt.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new U(function(){return i>n?{value:void 0,done:!0}:C(t,i,r[e?n-i++:i++])})},e(et,Y),et.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},et.prototype.has=function(t){return this._object.hasOwnProperty(t)},et.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(!1===t(r[s],s,this))return o+1}return o},et.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new U(function(){var s=n[e?i-o:o];return o++>i?{value:void 0,done:!0}:C(t,s,r[s])})},et.prototype[d]=!0,e(rt,Z),rt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=H(r),i=0;if(F(n))for(var o;!(o=n.next()).done&&!1!==t(o.value,i++,this););return i},rt.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=H(r);if(!F(n))return new U(P);var i=0;return new U(function(){var e=n.next();return e.done?e:C(t,i++,e.value)})},e(nt,Z),nt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r,n=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===t(i[o],o++,this))return o;for(;!(r=n.next()).done;){var s=r.value;if(i[o]=s,!1===t(s,o++,this))break}return o},nt.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new U(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return C(t,i,n[i++])})},e(gt,Z),gt.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},gt.prototype.get=function(t,e){return this.has(t)?this._value:e},gt.prototype.includes=function(t){return dt(this._value,t)},gt.prototype.slice=function(t,e){var r=this.size;return I(t,e,r)?this:new gt(this._value,j(e,r)-O(t,r))},gt.prototype.reverse=function(){return this},gt.prototype.indexOf=function(t){return dt(this._value,t)?0:-1},gt.prototype.lastIndexOf=function(t){return dt(this._value,t)?this.size:-1},gt.prototype.__iterate=function(t,e){for(var r=0;r<this.size;r++)if(!1===t(this._value,r,this))return r+1;return r},gt.prototype.__iterator=function(t,e){var r=this,n=0;return new U(function(){return n<r.size?C(t,n++,r._value):{value:void 0,done:!0}})},gt.prototype.equals=function(t){return t instanceof gt?dt(this._value,t._value):_t(t)},e(yt,Z),yt.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},yt.prototype.get=function(t,e){return this.has(t)?this._start+k(this,t)*this._step:e},yt.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},yt.prototype.slice=function(t,e){return I(t,e,this.size)?this:(t=O(t,this.size),(e=j(e,this.size))<=t?new yt(0,0):new yt(this.get(t,this._end),this.get(e,this._end),this._step))},yt.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},yt.prototype.lastIndexOf=function(t){return this.indexOf(t)},yt.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(!1===t(i,o,this))return o+1;i+=e?-n:n}return o},yt.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 U(function(){var s=i;return i+=e?-n:n,o>r?{value:void 0,done:!0}:C(t,o++,s)})},yt.prototype.equals=function(t){return t instanceof yt?this._start===t._start&&this._end===t._end&&this._step===t._step:_t(this,t)},e(bt,r),e(mt,bt),e(wt,bt),e(Et,bt),bt.Keyed=mt,bt.Indexed=wt,bt.Set=Et;var St="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function Bt(t){return t>>>1&1073741824|3221225471&t}function Tt(t){if(!1===t||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null===t||void 0===t))return 0;if(!0===t)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;)r^=t/=4294967295;return Bt(r)}if("string"===e)return t.length>Mt?function(t){var e=zt[t];return void 0===e&&(e=kt(t),Rt===Dt&&(Rt=0,zt={}),Rt++,zt[t]=e),e}(t):kt(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(jt&&void 0!==(e=xt.get(t)))return e;if(void 0!==(e=t[Lt]))return e;if(!Ot){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Lt]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=++At,1073741824&At&&(At=0),jt)xt.set(t,e);else{if(void 0!==It&&!1===It(t))throw new Error("Non-extensible objects are not allowed as keys.");if(Ot)Object.defineProperty(t,Lt,{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[Lt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Lt]=e}}return e}(t);if("function"==typeof t.toString)return kt(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function kt(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return Bt(e)}var xt,It=Object.isExtensible,Ot=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),jt="function"==typeof WeakMap;jt&&(xt=new WeakMap);var At=0,Lt="__immutablehash__";"function"==typeof Symbol&&(Lt=Symbol(Lt));var Mt=16,Dt=255,Rt=0,zt={};function qt(t){vt(t!==1/0,"Cannot perform this action with an infinite size.")}function Ut(t){return null===t||void 0===t?$t():Ct(t)&&!c(t)?t:$t().withMutations(function(e){var r=n(t);qt(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function Ct(t){return!(!t||!t[Nt])}e(Ut,mt),Ut.of=function(){var e=t.call(arguments,0);return $t().withMutations(function(t){for(var r=0;r<e.length;r+=2){if(r+1>=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}})},Ut.prototype.toString=function(){return this.__toString("Map {","}")},Ut.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Ut.prototype.set=function(t,e){return Qt(this,t,e)},Ut.prototype.setIn=function(t,e){return this.updateIn(t,y,function(){return e})},Ut.prototype.remove=function(t){return Qt(this,t,y)},Ut.prototype.deleteIn=function(t){return this.updateIn(t,function(){return y})},Ut.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Ut.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=function t(e,r,n,i){var o=e===y,s=r.next();if(s.done){var a=o?n:e,u=i(a);return u===a?e:u}vt(o||e&&e.set,"invalid keyPath");var f=s.value,c=o?y:e.get(f,y),h=t(c,r,n,i);return h===c?e:h===y?e.remove(f):(o?$t():e).set(f,h)}(this,rr(t),e,r);return n===y?void 0:n},Ut.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):$t()},Ut.prototype.merge=function(){return ne(this,void 0,arguments)},Ut.prototype.mergeWith=function(e){var r=t.call(arguments,1);return ne(this,e,r)},Ut.prototype.mergeIn=function(e){var r=t.call(arguments,1);return this.updateIn(e,$t(),function(t){return"function"==typeof t.merge?t.merge.apply(t,r):r[r.length-1]})},Ut.prototype.mergeDeep=function(){return ne(this,ie,arguments)},Ut.prototype.mergeDeepWith=function(e){var r=t.call(arguments,1);return ne(this,oe(e),r)},Ut.prototype.mergeDeepIn=function(e){var r=t.call(arguments,1);return this.updateIn(e,$t(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,r):r[r.length-1]})},Ut.prototype.sort=function(t){return Oe(Ke(this,t))},Ut.prototype.sortBy=function(t,e){return Oe(Ke(this,e,t))},Ut.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Ut.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},Ut.prototype.asImmutable=function(){return this.__ensureOwner()},Ut.prototype.wasAltered=function(){return this.__altered},Ut.prototype.__iterator=function(t,e){return new Zt(this,t,e)},Ut.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},Ut.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Xt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ut.isMap=Ct;var Pt,Nt="@@__IMMUTABLE_MAP__@@",Ft=Ut.prototype;function Ht(t,e){this.ownerID=t,this.entries=e}function Vt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Kt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Wt(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 Zt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Gt(t._root)}function Jt(t,e){return C(t,e[0],e[1])}function Gt(t,e){return{node:t,index:0,__prev:e}}function Xt(t,e,r,n){var i=Object.create(Ft);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function $t(){return Pt||(Pt=Xt(0))}function Qt(t,e,r){var n,i;if(t._root){var o=w(b),s=w(m);if(n=te(t._root,t.__ownerID,0,void 0,e,r,o,s),!s.value)return t;i=t.size+(o.value?r===y?-1:1:0)}else{if(r===y)return t;i=1,n=new Ht(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?Xt(i,n):$t()}function te(t,e,r,n,i,o,s,a){return t?t.update(e,r,n,i,o,s,a):o===y?t:(E(a),E(s),new Yt(e,n,[i,o]))}function ee(t){return t.constructor===Yt||t.constructor===Wt}function re(t,e,r,n,i){if(t.keyHash===n)return new Wt(e,n,[t.entry,i]);var o,s=(0===r?t.keyHash:t.keyHash>>>r)&v,a=(0===r?n:n>>>r)&v,u=s===a?[re(t,e,r+_,n,i)]:(o=new Yt(e,n,i),s<a?[t,o]:[o,t]);return new Vt(e,1<<s|1<<a,u)}function ne(t,e,r){for(var i=[],o=0;o<r.length;o++){var a=r[o],u=n(a);s(a)||(u=u.map(function(t){return ht(t)})),i.push(u)}return se(t,e,i)}function ie(t,e,r){return t&&t.mergeDeep&&s(e)?t.mergeDeep(e):dt(t,e)?t:e}function oe(t){return function(e,r,n){if(e&&e.mergeDeepWith&&s(r))return e.mergeDeepWith(t,r);var i=t(e,r,n);return dt(e,i)?e:i}}function se(t,e,r){return 0===(r=r.filter(function(t){return 0!==t.size})).length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,y,function(t){return t===y?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 ae(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function ue(t,e,r,n){var i=n?t:B(t);return i[e]=r,i}Ft[Nt]=!0,Ft.delete=Ft.remove,Ft.removeIn=Ft.deleteIn,Ht.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(dt(r,i[o][0]))return i[o][1];return n},Ht.prototype.update=function(t,e,r,n,i,o,s){for(var a=i===y,u=this.entries,f=0,c=u.length;f<c&&!dt(n,u[f][0]);f++);var h=f<c;if(h?u[f][1]===i:a)return this;if(E(s),(a||!h)&&E(o),!a||1!==u.length){if(!h&&!a&&u.length>=fe)return function(t,e,r,n){t||(t=new S);for(var i=new Yt(t,Tt(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}(t,u,n,i);var l=t&&t===this.ownerID,p=l?u:B(u);return h?a?f===c-1?p.pop():p[f]=p.pop():p[f]=[n,i]:p.push([n,i]),l?(this.entries=p,this):new Ht(t,p)}},Vt.prototype.get=function(t,e,r,n){void 0===e&&(e=Tt(r));var i=1<<((0===t?e:e>>>t)&v),o=this.bitmap;return 0==(o&i)?n:this.nodes[ae(o&i-1)].get(t+_,e,r,n)},Vt.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=Tt(n));var a=(0===e?r:r>>>e)&v,u=1<<a,f=this.bitmap,c=0!=(f&u);if(!c&&i===y)return this;var h=ae(f&u-1),l=this.nodes,p=c?l[h]:void 0,d=te(p,t,e+_,r,n,i,o,s);if(d===p)return this;if(!c&&d&&l.length>=ce)return function(t,e,r,n,i){for(var o=0,s=new Array(g),a=0;0!==r;a++,r>>>=1)s[a]=1&r?e[o++]:void 0;return s[n]=i,new Kt(t,o+1,s)}(t,l,f,a,d);if(c&&!d&&2===l.length&&ee(l[1^h]))return l[1^h];if(c&&d&&1===l.length&&ee(d))return d;var b=t&&t===this.ownerID,m=c?d?f:f^u:f|u,w=c?d?ue(l,h,d,b):function(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}(l,h,b):function(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}(l,h,d,b);return b?(this.bitmap=m,this.nodes=w,this):new Vt(t,m,w)},Kt.prototype.get=function(t,e,r,n){void 0===e&&(e=Tt(r));var i=(0===t?e:e>>>t)&v,o=this.nodes[i];return o?o.get(t+_,e,r,n):n},Kt.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=Tt(n));var a=(0===e?r:r>>>e)&v,u=i===y,f=this.nodes,c=f[a];if(u&&!c)return this;var h=te(c,t,e+_,r,n,i,o,s);if(h===c)return this;var l=this.count;if(c){if(!h&&--l<he)return function(t,e,r,n){for(var i=0,o=0,s=new Array(r),a=0,u=1,f=e.length;a<f;a++,u<<=1){var c=e[a];void 0!==c&&a!==n&&(i|=u,s[o++]=c)}return new Vt(t,i,s)}(t,f,l,a)}else l++;var p=t&&t===this.ownerID,d=ue(f,a,h,p);return p?(this.count=l,this.nodes=d,this):new Kt(t,l,d)},Wt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(dt(r,i[o][0]))return i[o][1];return n},Wt.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=Tt(n));var a=i===y;if(r!==this.keyHash)return a?this:(E(s),E(o),re(this,t,e,r,[n,i]));for(var u=this.entries,f=0,c=u.length;f<c&&!dt(n,u[f][0]);f++);var h=f<c;if(h?u[f][1]===i:a)return this;if(E(s),(a||!h)&&E(o),a&&2===c)return new Yt(t,this.keyHash,u[1^f]);var l=t&&t===this.ownerID,p=l?u:B(u);return h?a?f===c-1?p.pop():p[f]=p.pop():p[f]=[n,i]:p.push([n,i]),l?(this.entries=p,this):new Wt(t,this.keyHash,p)},Yt.prototype.get=function(t,e,r,n){return dt(r,this.entry[0])?this.entry[1]:n},Yt.prototype.update=function(t,e,r,n,i,o,s){var a=i===y,u=dt(n,this.entry[0]);return(u?i===this.entry[1]:a)?this:(E(s),a?void E(o):u?t&&t===this.ownerID?(this.entry[1]=i,this):new Yt(t,this.keyHash,[n,i]):(E(o),re(this,t,e,Tt(n),[n,i])))},Ht.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===t(r[e?i-n:n]))return!1},Vt.prototype.iterate=Kt.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&&!1===o.iterate(t,e))return!1}},Yt.prototype.iterate=function(t,e){return t(this.entry)},e(Zt,U),Zt.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 Jt(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,i<=r)return Jt(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 Jt(t,o.entry);e=this._stack=Gt(o,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var fe=g/4,ce=g/2,he=g/4;function le(t){var e=Ee();if(null===t||void 0===t)return e;if(pe(t))return t;var r=i(t),n=r.size;return 0===n?e:(qt(n),n>0&&n<g?we(0,n,_,null,new ge(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))}function pe(t){return!(!t||!t[de])}e(le,wt),le.of=function(){return this(arguments)},le.prototype.toString=function(){return this.__toString("List [","]")},le.prototype.get=function(t,e){if((t=k(this,t))>=0&&t<this.size){var r=Te(this,t+=this._origin);return r&&r.array[t&v]}return e},le.prototype.set=function(t,e){return function(t,e,r){if((e=k(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations(function(t){e<0?ke(t,e).set(0,r):ke(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,o=w(m);return e>=Ie(t._capacity)?n=Se(n,t.__ownerID,0,e,r,o):i=Se(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):we(t._origin,t._capacity,t._level,i,n):t}(this,t,e)},le.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},le.prototype.insert=function(t,e){return this.splice(t,0,e)},le.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=_,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Ee()},le.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){ke(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])})},le.prototype.pop=function(){return ke(this,0,-1)},le.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){ke(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])})},le.prototype.shift=function(){return ke(this,1)},le.prototype.merge=function(){return xe(this,void 0,arguments)},le.prototype.mergeWith=function(e){var r=t.call(arguments,1);return xe(this,e,r)},le.prototype.mergeDeep=function(){return xe(this,ie,arguments)},le.prototype.mergeDeepWith=function(e){var r=t.call(arguments,1);return xe(this,oe(e),r)},le.prototype.setSize=function(t){return ke(this,0,t)},le.prototype.slice=function(t,e){var r=this.size;return I(t,e,r)?this:ke(this,O(t,r),j(e,r))},le.prototype.__iterator=function(t,e){var r=0,n=me(this,e);return new U(function(){var e=n();return e===be?{value:void 0,done:!0}:C(t,r++,e)})},le.prototype.__iterate=function(t,e){for(var r,n=0,i=me(this,e);(r=i())!==be&&!1!==t(r,n++,this););return n},le.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?we(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},le.isList=pe;var de="@@__IMMUTABLE_LIST__@@",_e=le.prototype;function ge(t,e){this.array=t,this.ownerID=e}_e[de]=!0,_e.delete=_e.remove,_e.setIn=Ft.setIn,_e.deleteIn=_e.removeIn=Ft.removeIn,_e.update=Ft.update,_e.updateIn=Ft.updateIn,_e.mergeIn=Ft.mergeIn,_e.mergeDeepIn=Ft.mergeDeepIn,_e.withMutations=Ft.withMutations,_e.asMutable=Ft.asMutable,_e.asImmutable=Ft.asImmutable,_e.wasAltered=Ft.wasAltered,ge.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&v;if(n>=this.array.length)return new ge([],t);var i,o=0===n;if(e>0){var s=this.array[n];if((i=s&&s.removeBefore(t,e-_,r))===s&&o)return this}if(o&&!i)return this;var a=Be(this,t);if(!o)for(var u=0;u<n;u++)a.array[u]=void 0;return i&&(a.array[n]=i),a},ge.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n,i=r-1>>>e&v;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-_,r))===o&&i===this.array.length-1)return this}var s=Be(this,t);return s.array.splice(i+1),n&&(s.array[i]=n),s};var ve,ye,be={};function me(t,e){var r=t._origin,n=t._capacity,i=Ie(n),o=t._tail;return s(t._root,t._level,0);function s(t,a,u){return 0===a?function(t,s){var a=s===i?o&&o.array:t&&t.array,u=s>r?0:r-s,f=n-s;return f>g&&(f=g),function(){if(u===f)return be;var t=e?--f:u++;return a&&a[t]}}(t,u):function(t,i,o){var a,u=t&&t.array,f=o>r?0:r-o>>i,c=1+(n-o>>i);return c>g&&(c=g),function(){for(;;){if(a){var t=a();if(t!==be)return t;a=null}if(f===c)return be;var r=e?--c:f++;a=s(u&&u[r],i-_,o+(r<<i))}}}(t,a,u)}}function we(t,e,r,n,i,o,s){var a=Object.create(_e);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 Ee(){return ve||(ve=we(0,0,_))}function Se(t,e,r,n,i,o){var s,a=n>>>r&v,u=t&&a<t.array.length;if(!u&&void 0===i)return t;if(r>0){var f=t&&t.array[a],c=Se(f,e,r-_,n,i,o);return c===f?t:((s=Be(t,e)).array[a]=c,s)}return u&&t.array[a]===i?t:(E(o),s=Be(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function Be(t,e){return e&&t&&e===t.ownerID?t:new ge(t?t.array.slice():[],e)}function Te(t,e){if(e>=Ie(t._capacity))return t._tail;if(e<1<<t._level+_){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&v],n-=_;return r}}function ke(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new S,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 u=t._level,f=t._root,c=0;s+c<0;)f=new ge(f&&f.array.length?[void 0,f]:[],n),c+=1<<(u+=_);c&&(s+=c,i+=c,a+=c,o+=c);for(var h=Ie(o),l=Ie(a);l>=1<<u+_;)f=new ge(f&&f.array.length?[f]:[],n),u+=_;var p=t._tail,d=l<h?Te(t,a-1):l>h?new ge([],n):p;if(p&&l>h&&s<o&&p.array.length){for(var g=f=Be(f,n),y=u;y>_;y-=_){var b=h>>>y&v;g=g.array[b]=Be(g.array[b],n)}g.array[h>>>_&v]=p}if(a<o&&(d=d&&d.removeAfter(n,0,a)),s>=l)s-=l,a-=l,u=_,f=null,d=d&&d.removeBefore(n,0,s);else if(s>i||l<h){for(c=0;f;){var m=s>>>u&v;if(m!==l>>>u&v)break;m&&(c+=(1<<u)*m),u-=_,f=f.array[m]}f&&s>i&&(f=f.removeBefore(n,u,s-c)),f&&l<h&&(f=f.removeAfter(n,u,l-c)),c&&(s-=c,a-=c)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=u,t._root=f,t._tail=d,t.__hash=void 0,t.__altered=!0,t):we(s,a,u,f,d)}function xe(t,e,r){for(var n=[],o=0,a=0;a<r.length;a++){var u=r[a],f=i(u);f.size>o&&(o=f.size),s(u)||(f=f.map(function(t){return ht(t)})),n.push(f)}return o>t.size&&(t=t.setSize(o)),se(t,e,n)}function Ie(t){return t<g?0:t-1>>>_<<_}function Oe(t){return null===t||void 0===t?Le():je(t)?t:Le().withMutations(function(e){var r=n(t);qt(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function je(t){return Ct(t)&&c(t)}function Ae(t,e,r,n){var i=Object.create(Oe.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function Le(){return ye||(ye=Ae($t(),Ee()))}function Me(t,e,r){var n,i,o=t._map,s=t._list,a=o.get(e),u=void 0!==a;if(r===y){if(!u)return t;s.size>=g&&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(u){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):Ae(n,i)}function De(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function Re(t){this._iter=t,this.size=t.size}function ze(t){this._iter=t,this.size=t.size}function qe(t){this._iter=t,this.size=t.size}function Ue(t){var e=Qe(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=tr,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return!1!==e(r,t,n)},r)},e.__iteratorUncached=function(e,r){if(e===D){var n=t.__iterator(e,r);return new U(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===M?L:M,r)},e}function Ce(t,e,r){var n=Qe(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,y);return o===y?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,s){return!1!==n(e.call(r,t,i,s),i,o)},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(D,i);return new U(function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return C(n,a,e.call(r,s[1],a,t),i)})},n}function Pe(t,e){var r=Qe(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=Ue(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=tr,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 Ne(t,e,r,n){var i=Qe(t);return n&&(i.has=function(n){var i=t.get(n,y);return i!==y&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,y);return o!==y&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var s=this,a=0;return t.__iterate(function(t,o,u){if(e.call(r,t,o,u))return a++,i(t,n?o:a-1,s)},o),a},i.__iteratorUncached=function(i,o){var s=t.__iterator(D,o),a=0;return new U(function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value,f=u[0],c=u[1];if(e.call(r,c,f,t))return C(i,n?f:a++,c,o)}})},i}function Fe(t,e,r,n){var i=t.size;if(void 0!==e&&(e|=0),void 0!==r&&(r===1/0?r=i:r|=0),I(e,r,i))return t;var o=O(e,i),s=j(r,i);if(o!=o||s!=s)return Fe(t.toSeq().cacheResult(),e,r,n);var a,u=s-o;u==u&&(a=u<0?0:u);var f=Qe(t);return f.size=0===a?a:t.size&&a||void 0,!n&&it(t)&&a>=0&&(f.get=function(e,r){return(e=k(this,e))>=0&&e<a?t.get(e+o,r):r}),f.__iterateUncached=function(e,r){var i=this;if(0===a)return 0;if(r)return this.cacheResult().__iterate(e,r);var s=0,u=!0,f=0;return t.__iterate(function(t,r){if(!u||!(u=s++<o))return f++,!1!==e(t,n?r:f-1,i)&&f!==a}),f},f.__iteratorUncached=function(e,r){if(0!==a&&r)return this.cacheResult().__iterator(e,r);var i=0!==a&&t.__iterator(e,r),s=0,u=0;return new U(function(){for(;s++<o;)i.next();if(++u>a)return{value:void 0,done:!0};var t=i.next();return n||e===M?t:C(e,u-1,e===L?void 0:t.value[1],t)})},f}function He(t,e,r,n){var i=Qe(t);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,u=0;return t.__iterate(function(t,o,f){if(!a||!(a=e.call(r,t,o,f)))return u++,i(t,n?o:u-1,s)}),u},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(D,o),u=!0,f=0;return new U(function(){var t,o,c;do{if((t=a.next()).done)return n||i===M?t:C(i,f++,i===L?void 0:t.value[1],t);var h=t.value;o=h[0],c=h[1],u&&(u=e.call(r,c,o,s))}while(u);return i===D?t:C(i,o,c,t)})},i}function Ve(t,e,r){var n=Qe(t);return n.__iterateUncached=function(n,i){var o=0,a=!1;return function t(u,f){var c=this;u.__iterate(function(i,u){return(!e||f<e)&&s(i)?t(i,f+1):!1===n(i,r?u:o++,c)&&(a=!0),!a},i)}(t,0),o},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),a=[],u=0;return new U(function(){for(;o;){var t=o.next();if(!1===t.done){var f=t.value;if(n===D&&(f=f[1]),e&&!(a.length<e)||!s(f))return r?t:C(n,u++,f,t);a.push(o),o=f.__iterator(n,i)}else o=a.pop()}return{value:void 0,done:!0}})},n}function Ke(t,e,r){e||(e=er);var n=a(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?Y(o):u(t)?Z(o):J(o)}function We(t,e,r){if(e||(e=er),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return Ye(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return Ye(e,t,r)?r:t})}function Ye(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!=r)||n>0}function Ze(t,e,n){var i=Qe(t);return i.size=new tt(n).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(M,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=n.map(function(t){return t=r(t),H(i?t.reverse():t)}),s=0,a=!1;return new U(function(){var r;return a||(r=o.map(function(t){return t.next()}),a=r.some(function(t){return t.done})),a?{value:void 0,done:!0}:C(t,s++,e.apply(null,r.map(function(t){return t.value})))})},i}function Je(t,e){return it(t)?e:t.constructor(e)}function Ge(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Xe(t){return qt(t.size),T(t)}function $e(t){return a(t)?n:u(t)?i:o}function Qe(t){return Object.create((a(t)?Y:u(t)?Z:J).prototype)}function tr(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function er(t,e){return t>e?1:t<e?-1:0}function rr(t){var e=H(t);if(!e){if(!K(t))throw new TypeError("Expected iterable or array-like: "+t);e=H(r(t))}return e}function nr(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);!function(t,e){try{e.forEach(function(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){vt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}.bind(void 0,t))}catch(t){}}(i,s),i.size=s.length,i._name=e,i._keys=s,i._defaultValues=t}this._map=Ut(o)},i=n.prototype=Object.create(ir);return i.constructor=n,n}e(Oe,Ut),Oe.of=function(){return this(arguments)},Oe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Oe.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Oe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Le()},Oe.prototype.set=function(t,e){return Me(this,t,e)},Oe.prototype.remove=function(t){return Me(this,t,y)},Oe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Oe.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Oe.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Oe.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Ae(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},Oe.isOrderedMap=je,Oe.prototype[d]=!0,Oe.prototype.delete=Oe.prototype.remove,e(De,Y),De.prototype.get=function(t,e){return this._iter.get(t,e)},De.prototype.has=function(t){return this._iter.has(t)},De.prototype.valueSeq=function(){return this._iter.valueSeq()},De.prototype.reverse=function(){var t=this,e=Pe(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},De.prototype.map=function(t,e){var r=this,n=Ce(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},De.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?Xe(this):0,function(i){return t(i,e?--r:r++,n)}),e)},De.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(M,e),n=e?Xe(this):0;return new U(function(){var i=r.next();return i.done?i:C(t,e?--n:n++,i.value,i)})},De.prototype[d]=!0,e(Re,Z),Re.prototype.includes=function(t){return this._iter.includes(t)},Re.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},Re.prototype.__iterator=function(t,e){var r=this._iter.__iterator(M,e),n=0;return new U(function(){var e=r.next();return e.done?e:C(t,n++,e.value,e)})},e(ze,J),ze.prototype.has=function(t){return this._iter.includes(t)},ze.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ze.prototype.__iterator=function(t,e){var r=this._iter.__iterator(M,e);return new U(function(){var e=r.next();return e.done?e:C(t,e.value,e.value,e)})},e(qe,Y),qe.prototype.entrySeq=function(){return this._iter.toSeq()},qe.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){Ge(e);var n=s(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},qe.prototype.__iterator=function(t,e){var r=this._iter.__iterator(M,e);return new U(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Ge(n);var i=s(n);return C(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},Re.prototype.cacheResult=De.prototype.cacheResult=ze.prototype.cacheResult=qe.prototype.cacheResult=tr,e(nr,mt),nr.prototype.toString=function(){return this.__toString(sr(this)+" {","}")},nr.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},nr.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},nr.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=or(this,$t()))},nr.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+sr(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:or(this,n)},nr.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:or(this,e)},nr.prototype.wasAltered=function(){return this._map.wasAltered()},nr.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},nr.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},nr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?or(this,e,t):(this.__ownerID=t,this._map=e,this)};var ir=nr.prototype;function or(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function sr(t){return t._name||t.constructor.name||"Record"}function ar(t){return null===t||void 0===t?dr():ur(t)&&!c(t)?t:dr().withMutations(function(e){var r=o(t);qt(r.size),r.forEach(function(t){return e.add(t)})})}function ur(t){return!(!t||!t[cr])}ir.delete=ir.remove,ir.deleteIn=ir.removeIn=Ft.removeIn,ir.merge=Ft.merge,ir.mergeWith=Ft.mergeWith,ir.mergeIn=Ft.mergeIn,ir.mergeDeep=Ft.mergeDeep,ir.mergeDeepWith=Ft.mergeDeepWith,ir.mergeDeepIn=Ft.mergeDeepIn,ir.setIn=Ft.setIn,ir.update=Ft.update,ir.updateIn=Ft.updateIn,ir.withMutations=Ft.withMutations,ir.asMutable=Ft.asMutable,ir.asImmutable=Ft.asImmutable,e(ar,Et),ar.of=function(){return this(arguments)},ar.fromKeys=function(t){return this(n(t).keySeq())},ar.prototype.toString=function(){return this.__toString("Set {","}")},ar.prototype.has=function(t){return this._map.has(t)},ar.prototype.add=function(t){return lr(this,this._map.set(t,!0))},ar.prototype.remove=function(t){return lr(this,this._map.remove(t))},ar.prototype.clear=function(){return lr(this,this._map.clear())},ar.prototype.union=function(){var e=t.call(arguments,0);return 0===(e=e.filter(function(t){return 0!==t.size})).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var r=0;r<e.length;r++)o(e[r]).forEach(function(e){return t.add(e)})}):this.constructor(e[0])},ar.prototype.intersect=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map(function(t){return o(t)});var r=this;return this.withMutations(function(t){r.forEach(function(r){e.every(function(t){return t.includes(r)})||t.remove(r)})})},ar.prototype.subtract=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map(function(t){return o(t)});var r=this;return this.withMutations(function(t){r.forEach(function(r){e.some(function(t){return t.includes(r)})&&t.remove(r)})})},ar.prototype.merge=function(){return this.union.apply(this,arguments)},ar.prototype.mergeWith=function(e){var r=t.call(arguments,1);return this.union.apply(this,r)},ar.prototype.sort=function(t){return _r(Ke(this,t))},ar.prototype.sortBy=function(t,e){return _r(Ke(this,e,t))},ar.prototype.wasAltered=function(){return this._map.wasAltered()},ar.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},ar.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},ar.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)},ar.isSet=ur;var fr,cr="@@__IMMUTABLE_SET__@@",hr=ar.prototype;function lr(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 pr(t,e){var r=Object.create(hr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function dr(){return fr||(fr=pr($t()))}function _r(t){return null===t||void 0===t?mr():gr(t)?t:mr().withMutations(function(e){var r=o(t);qt(r.size),r.forEach(function(t){return e.add(t)})})}function gr(t){return ur(t)&&c(t)}hr[cr]=!0,hr.delete=hr.remove,hr.mergeDeep=hr.merge,hr.mergeDeepWith=hr.mergeWith,hr.withMutations=Ft.withMutations,hr.asMutable=Ft.asMutable,hr.asImmutable=Ft.asImmutable,hr.__empty=dr,hr.__make=pr,e(_r,ar),_r.of=function(){return this(arguments)},_r.fromKeys=function(t){return this(n(t).keySeq())},_r.prototype.toString=function(){return this.__toString("OrderedSet {","}")},_r.isOrderedSet=gr;var vr,yr=_r.prototype;function br(t,e){var r=Object.create(yr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function mr(){return vr||(vr=br(Le()))}function wr(t){return null===t||void 0===t?xr():Er(t)?t:xr().unshiftAll(t)}function Er(t){return!(!t||!t[Br])}yr[d]=!0,yr.__empty=mr,yr.__make=br,e(wr,wt),wr.of=function(){return this(arguments)},wr.prototype.toString=function(){return this.__toString("Stack [","]")},wr.prototype.get=function(t,e){var r=this._head;for(t=k(this,t);r&&t--;)r=r.next;return r?r.value:e},wr.prototype.peek=function(){return this._head&&this._head.value},wr.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):kr(t,e)},wr.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;qt(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):kr(e,r)},wr.prototype.pop=function(){return this.slice(1)},wr.prototype.unshift=function(){return this.push.apply(this,arguments)},wr.prototype.unshiftAll=function(t){return this.pushAll(t)},wr.prototype.shift=function(){return this.pop.apply(this,arguments)},wr.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):xr()},wr.prototype.slice=function(t,e){if(I(t,e,this.size))return this;var r=O(t,this.size),n=j(e,this.size);if(n!==this.size)return wt.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):kr(i,o)},wr.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?kr(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},wr.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&!1!==t(n.value,r++,this);)n=n.next;return r},wr.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new U(function(){if(n){var e=n.value;return n=n.next,C(t,r++,e)}return{value:void 0,done:!0}})},wr.isStack=Er;var Sr,Br="@@__IMMUTABLE_STACK__@@",Tr=wr.prototype;function kr(t,e,r,n){var i=Object.create(Tr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function xr(){return Sr||(Sr=kr(0))}function Ir(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}Tr[Br]=!0,Tr.withMutations=Ft.withMutations,Tr.asMutable=Ft.asMutable,Tr.asImmutable=Ft.asImmutable,Tr.wasAltered=Ft.wasAltered,r.Iterator=U,Ir(r,{toArray:function(){qt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new Re(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 De(this,!0)},toMap:function(){return Ut(this.toKeyedSeq())},toObject:function(){qt(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return Oe(this.toKeyedSeq())},toOrderedSet:function(){return _r(a(this)?this.valueSeq():this)},toSet:function(){return ar(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ze(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return wr(a(this)?this.valueSeq():this)},toList:function(){return le(a(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 e=t.call(arguments,0);return Je(this,function(t,e){var r=a(t),i=[t].concat(e).map(function(t){return s(t)?r&&(t=n(t)):t=r?st(t):at(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var o=i[0];if(o===t||r&&a(o)||u(t)&&u(o))return o}var f=new tt(i);return r?f=f.toKeyedSeq():u(t)||(f=f.toSetSeq()),(f=f.flatten(!0)).size=i.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),f}(this,e))},includes:function(t){return this.some(function(e){return dt(e,t)})},entries:function(){return this.__iterator(D)},every:function(t,e){qt(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 Je(this,Ne(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 qt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){qt(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(L)},map:function(t,e){return Je(this,Ce(this,t,e))},reduce:function(t,e,r){var n,i;return qt(this.size),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 Je(this,Pe(this,!0))},slice:function(t,e){return Je(this,Fe(this,t,e,!0))},some:function(t,e){return!this.every(Mr(t),e)},sort:function(t){return Je(this,Ke(this,t))},values:function(){return this.__iterator(M)},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 T(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,r){var n=Ut().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}(this,t,e)},equals:function(t){return _t(this,t)},entrySeq:function(){var t=this;if(t._cache)return new tt(t._cache);var e=t.toSeq().map(Lr).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Mr(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(x)},flatMap:function(t,e){return Je(this,function(t,e,r){var n=$e(t);return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}(this,t,e))},flatten:function(t){return Je(this,Ve(this,t,!0))},fromEntrySeq:function(){return new qe(this)},get:function(t,e){return this.find(function(e,r){return dt(r,t)},void 0,e)},getIn:function(t,e){for(var r,n=this,i=rr(t);!(r=i.next()).done;){var o=r.value;if((n=n&&n.get?n.get(o,y):y)===y)return e}return n},groupBy:function(t,e){return function(t,e,r){var n=a(t),i=(c(t)?Oe():Ut()).asMutable();t.__iterate(function(o,s){i.update(e.call(r,o,s,t),function(t){return(t=t||[]).push(n?[s,o]:o),t})});var o=$e(t);return i.map(function(e){return Je(t,o(e))})}(this,t,e)},has:function(t){return this.get(t,y)!==y},hasIn:function(t){return this.getIn(t,y)!==y},isSubset:function(t){return t="function"==typeof t.includes?t:r(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:r(t)).isSubset(this)},keyOf:function(t){return this.findKey(function(e){return dt(e,t)})},keySeq:function(){return this.toSeq().map(Ar).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?Dr(t):qr)},minBy:function(t,e){return We(this,e?Dr(e):qr,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Je(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Je(this,He(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Mr(t),e)},sortBy:function(t,e){return Je(this,Ke(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Je(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Je(this,function(t,e,r){var n=Qe(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(D,i),a=!0;return new U(function(){if(!a)return{value:void 0,done:!0};var t=s.next();if(t.done)return t;var i=t.value,u=i[0],f=i[1];return e.call(r,f,u,o)?n===D?t:C(n,u,f,t):(a=!1,{value:void 0,done:!0})})},n}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Mr(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=c(t),r=a(t),n=e?1:0;return function(t,e){return e=St(e,3432918353),e=St(e<<15|e>>>-15,461845907),e=St(e<<13|e>>>-13,5),e=St((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=Bt((e=St(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+Ur(Tt(t),Tt(e))|0}:function(t,e){n=n+Ur(Tt(t),Tt(e))|0}:e?function(t){n=31*n+Tt(t)|0}:function(t){n=n+Tt(t)|0}),n)}(this))}});var Or=r.prototype;Or[h]=!0,Or[q]=Or.values,Or.__toJS=Or.toArray,Or.__toStringMapper=Rr,Or.inspect=Or.toSource=function(){return this.toString()},Or.chain=Or.flatMap,Or.contains=Or.includes,Ir(n,{flip:function(){return Je(this,Ue(this))},mapEntries:function(t,e){var r=this,n=0;return Je(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Je(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var jr=n.prototype;function Ar(t,e){return e}function Lr(t,e){return[e,t]}function Mr(t){return function(){return!t.apply(this,arguments)}}function Dr(t){return function(){return-t.apply(this,arguments)}}function Rr(t){return"string"==typeof t?JSON.stringify(t):String(t)}function zr(){return B(arguments)}function qr(t,e){return t<e?1:t>e?-1:0}function Ur(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}return jr[l]=!0,jr[q]=Or.entries,jr.__toJS=Or.toObject,jr.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Rr(t)},Ir(i,{toKeyedSeq:function(){return new De(this,!1)},filter:function(t,e){return Je(this,Ne(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 Je(this,Pe(this,!1))},slice:function(t,e){return Je(this,Fe(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=O(t,t<0?this.count():this.size);var n=this.slice(0,t);return Je(this,1===r?n:n.concat(B(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 Je(this,Ve(this,t,!1))},get:function(t,e){return(t=k(this,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=k(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Je(this,function(t,e){var r=Qe(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||!1!==r(e,o++,i))&&!1!==r(t,o++,i)},n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(M,n),s=0;return new U(function(){return(!i||s%2)&&(i=o.next()).done?i:s%2?C(r,s++,e):C(r,s++,i.value,i)})},r}(this,t))},interleave:function(){var t=[this].concat(B(arguments)),e=Ze(this.toSeq(),Z.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Je(this,r)},keySeq:function(){return yt(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Je(this,He(this,t,e,!1))},zip:function(){return Je(this,Ze(this,zr,[this].concat(B(arguments))))},zipWith:function(t){var e=B(arguments);return e[0]=this,Je(this,Ze(this,t,e))}}),i.prototype[p]=!0,i.prototype[d]=!0,Ir(o,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Or.includes,o.prototype.contains=o.prototype.includes,Ir(Y,n.prototype),Ir(Z,i.prototype),Ir(J,o.prototype),Ir(mt,n.prototype),Ir(wt,i.prototype),Ir(Et,o.prototype),{Iterable:r,Seq:W,Collection:bt,Map:Ut,OrderedMap:Oe,List:le,Stack:wr,Set:ar,OrderedSet:_r,Record:nr,Range:yt,Repeat:gt,is:dt,fromJS:ht}}()},function(t,e,r){var n=r(53);r(75),t.exports=n},function(t,e,r){var n=r(23),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";(function(t){var n=r(0),i=r(18),o=r(12),s=r(26),a=r(15),u=r(3),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=r(6).Buffer,h={},l=t.env.npm_config__graphene_serializer_hex_dump;h.uint8={fromByteBuffer:function(t){return t.readUint8()},appendByteBuffer:function(t,e){n.a.require_range(0,255,e,"uint8 "+e),t.writeUint8(e)},fromObject:function(t){return n.a.require_range(0,255,t,"uint8 "+t),t},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(n.a.require_range(0,255,t,"uint8 "+t),parseInt(t))}},h.uint16={fromByteBuffer:function(t){return t.readUint16()},appendByteBuffer:function(t,e){n.a.require_range(0,65535,e,"uint16 "+e),t.writeUint16(e)},fromObject:function(t){return n.a.require_range(0,65535,t,"uint16 "+t),t},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(n.a.require_range(0,65535,t,"uint16 "+t),parseInt(t))}},h.uint32={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){n.a.require_range(0,4294967295,e,"uint32 "+e),t.writeUint32(e)},fromObject:function(t){return n.a.require_range(0,4294967295,t,"uint32 "+t),t},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(n.a.require_range(0,4294967295,t,"uint32 "+t),parseInt(t))}};var p=-1*Math.pow(2,31),d=Math.pow(2,31)-1;h.varint32={fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(t,e){n.a.require_range(p,d,e,"uint32 "+e),t.writeVarint32(e)},fromObject:function(t){return n.a.require_range(p,d,t,"uint32 "+t),t},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(n.a.require_range(p,d,t,"uint32 "+t),parseInt(t))}},h.int64={fromByteBuffer:function(t){return t.readInt64()},appendByteBuffer:function(t,e){n.a.required(e),t.writeInt64(n.a.to_long(e))},fromObject:function(t){return n.a.required(t),n.a.to_long(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0":(n.a.required(t),n.a.to_long(t).toString())}},h.uint64={fromByteBuffer:function(t){return t.readUint64()},appendByteBuffer:function(t,e){t.writeUint64(n.a.to_long(n.a.unsigned(e),void 0,!0))},fromObject:function(t){return n.a.to_long(n.a.unsigned(t),void 0,!0)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0":n.a.to_long(t,void 0,!0).toString()}},h.string={fromByteBuffer:function(t){var e,r=t.readVarint32();return e=t.copy(t.offset,t.offset+r),t.skip(r),c.from(e.toBinary(),"binary")},appendByteBuffer:function(t,e){n.a.required(e),t.writeVarint32(e.length),t.append(e.toString("binary"),"binary")},fromObject:function(t){return n.a.required(t),c.from(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"":t.toString()}},h.bytes=function(t){return{fromByteBuffer:function(e){if(void 0===t){var r,n=e.readVarint32();return r=e.copy(e.offset,e.offset+n),e.skip(n),c.from(r.toBinary(),"binary")}return r=e.copy(e.offset,e.offset+t),e.skip(t),c.from(r.toBinary(),"binary")},appendByteBuffer:function(e,r){n.a.required(r),"string"==typeof r&&(r=c.from(r,"hex")),void 0===t&&e.writeVarint32(r.length),e.append(r.toString("binary"),"binary")},fromObject:function(t){return n.a.required(t),c.isBuffer(t)?t:c.from(t,"hex")},toObject:function(e){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e){return function(t){return new Array(t).join("00")}(t)}return n.a.required(e),e.toString("hex")}}},h.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){return(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==t)&&!!JSON.parse(t)}},h.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){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==t)throw new Error("(void) undefined type")}},h.array=function(t){return{fromByteBuffer:function(e){var r=e.readVarint32();l&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0<r?i<r:i>r;i++)n.push(t.fromByteBuffer(e));return v(n,t)},appendByteBuffer:function(e,r){n.a.required(r),r=v(r,t),e.writeVarint32(r.length);for(var i,o=0;o<r.length;o++)i=r[o],t.appendByteBuffer(e,i)},fromObject:function(e){n.a.required(e),e=v(e,t);for(var r,i=[],o=0;o<e.length;o++)r=e[o],i.push(t.fromObject(r));return i},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)];n.a.required(e),e=v(e,t);for(var i,o=[],s=0;s<e.length;s++)i=e[s],o.push(t.toObject(i,r));return o}}},h.time_point_sec={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){"number"!=typeof e&&(e=h.time_point_sec.fromObject(e)),t.writeUint32(e)},fromObject:function(t){if(n.a.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/T[0-2][0-9]:[0-5][0-9]:[0-5][0-9]$/.test(t)&&(t+="Z"),Math.floor(new Date(t).getTime()/1e3)},toObject:function(t){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t)return new Date(0).toISOString().split(".")[0];if(n.a.required(t),"string"==typeof t)return t;if(t.getTime)return t.toISOString().split(".")[0];var e=parseInt(t);return n.a.require_range(0,4294967295,e,"uint32 "+t),new Date(1e3*e).toISOString().split(".")[0]}},h.set=function(t){return{validate:function(e){for(var r,n={},i=0;i<e.length;i++){var o;if(o=void 0===(r=e[i])?"undefined":f(r),["string","number"].indexOf(o)>=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return v(e,t)},fromByteBuffer:function(e){var r=e.readVarint32();return l&&console.log("varint32 size = "+r.toString(16)),this.validate(function(){for(var n=[],i=0;0<r?i<r:i>r;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}()))}}},h.fixed_array=function(t,e){return{fromByteBuffer:function(r){var n,i,o;for(o=[],n=0,i=t;n<i;n+=1)o.push(e.fromByteBuffer(r));return v(o,e)},appendByteBuffer:function(r,i){var o,s,a;for(0!==t&&(n.a.required(i),i=v(i,e)),o=s=0,a=t;s<a;o=s+=1)e.appendByteBuffer(r,i[o])},fromObject:function(r){var i,o,s,a;for(0!==t&&n.a.required(r),a=[],i=o=0,s=t;o<s;i=o+=1)a.push(e.fromObject(r[i]));return a},toObject:function(r,i){var o,s,a,u,f,c,h;if(null==i&&(i={}),i.use_default&&void 0===r){for(c=[],o=s=0,u=t;s<u;o=s+=1)c.push(e.toObject(void 0,i));return c}for(0!==t&&n.a.required(r),h=[],o=a=0,f=t;a<f;o=a+=1)h.push(e.toObject(r[o],i));return h}}};h.protocol_id_type=function(t){return n.a.required(t,"name"),function(t,e){return n.a.required(t,"reserved_spaces"),n.a.required(e,"object_type"),{fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(r,i){n.a.required(i),void 0!==i.resolve&&(i=i.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(i)&&(i=n.a.get_instance(t,e,i)),r.writeVarint32(n.a.to_number(i))},fromObject:function(r){return n.a.required(r),void 0!==r.resolve&&(r=r.resolve),n.a.is_digits(r)?n.a.to_number(r):n.a.get_instance(t,e,r)},toObject:function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=o.a.object_type[e];return i.use_default&&void 0===r?t+"."+s+".0":(n.a.required(r),void 0!==r.resolve&&(r=r.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(r)&&(r=n.a.get_instance(t,e,r)),t+"."+s+"."+r)}}}(o.a.reserved_spaces.protocol_ids,t)},h.object_id_type={fromByteBuffer:function(t){return s.a.fromByteBuffer(t)},appendByteBuffer:function(t,e){n.a.required(e),void 0!==e.resolve&&(e=e.resolve),(e=s.a.fromString(e)).appendByteBuffer(t)},fromObject:function(t){return n.a.required(t),void 0!==t.resolve&&(t=t.resolve),s.a.fromString(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0.0.0":(n.a.required(t),void 0!==t.resolve&&(t=t.resolve),(t=s.a.fromString(t)).toString())}},h.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){n.a.required(e),"string"===e&&(e=h.vote_id.fromObject(e));var r=e.id<<8|e.type;t.writeUint32(r)},fromObject:function(t){if(n.a.required(t,"(type vote_id)"),"object"===(void 0===t?"undefined":f(t)))return n.a.required(t.type,"type"),n.a.required(t.id,"id"),t;n.a.require_test(/^[0-9]+:[0-9]+$/,t,"vote_id format "+t);var e=t.split(":"),r=e[0],i=e[1];return n.a.require_range(0,255,r,"vote type "+t),n.a.require_range(0,16777215,i,"vote id "+t),{type:r,id:i}},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0:0":(n.a.required(t),"string"==typeof t&&(t=h.vote_id.fromObject(t)),t.type+":"+t.id)},compare:function(t,e){return"object"!==(void 0===t?"undefined":f(t))&&(t=h.vote_id.fromObject(t)),"object"!==(void 0===e?"undefined":f(e))&&(e=h.vote_id.fromObject(e)),parseInt(t.id)-parseInt(e.id)}},h.optional=function(t){return n.a.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=r.use_default||void 0!==e?t.toObject(e,r):void 0;return r.annotate&&("object"===(void 0===n?"undefined":f(n))?n.__optional="parent is optional":n={__optional:n}),n}}},h.indexed_optional=function(t,e){return n.a.required(t,"st_operation"),{fromByteBuffer:function(r){if(r.readVarint32()===e)return t.fromByteBuffer(r)},appendByteBuffer:function(r,n){null!==n&&void 0!==n&&(r.writeVarint32(e),t.appendByteBuffer(r,n))},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=r.use_default||void 0!==e?t.toObject(e,r):void 0;return r.annotate&&("object"===(void 0===n?"undefined":f(n))?n.__optional="parent is optional":n={__optional:n}),n}}},h.extension=function(t){return n.a.required(t,"st_operation"),{fromByteBuffer:function(e){if(1===e.readVarint32())return t.fromByteBuffer(e)},appendByteBuffer:function(e,r){null===r||void 0===r||"object"==(void 0===r?"undefined":f(r))&&0==Object.keys(r).length?e.writeVarint32(0):(e.writeVarint32(1),t.appendByteBuffer(e,r))},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=r.use_default||void 0!==e?t.toObject(e,r):void 0;return r.annotate&&("object"===(void 0===n?"undefined":f(n))?n.__optional="parent is optional":n={__optional:n}),n}}},h.static_variant=function(t){return{nosort:!0,st_operations:t,fromByteBuffer:function(t){var e=t.readVarint32(),r=this.st_operations[e];return l&&console.error("static_variant id 0x"+e.toString(16)+" ("+e+")"),n.a.required(r,"operation "+e),[e,r.fromByteBuffer(t)]},appendByteBuffer:function(t,e){n.a.required(e);var r=e[0],i=this.st_operations[r];n.a.required(i,"operation "+r),t.writeVarint32(r),i.appendByteBuffer(t,e[1])},fromObject:function(t){n.a.required(t);var e=t[0],r=this.st_operations[e];return n.a.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)];n.a.required(t);var r=t[0],i=this.st_operations[r];return n.a.required(i,"operation "+r),[r,i.toObject(t[1],e)]}}},h.map=function(t,e){return{validate:function(e){if(!Array.isArray(e))throw new Error("expecting array");for(var r,n={},i=0;i<e.length;i++){var o;if(2!==(r=e[i]).length)throw new Error("expecting two elements");if(o=f(r[0]),["number","string"].indexOf(o)>=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return v(e,t)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0<i?o<i:o>i;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){n.a.required(r);for(var i,o=[],s=0;s<r.length;s++)i=r[s],o.push([t.fromObject(i[0]),e.fromObject(i[1])]);return this.validate(o)},toObject:function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i.use_default&&void 0===r)return[[t.toObject(void 0,i),e.toObject(void 0,i)]];n.a.required(r),r=this.validate(r);for(var o,s=[],a=0;a<r.length;a++)o=r[a],s.push([t.toObject(o[0],i),e.toObject(o[1],i)]);return s}}},h.public_key={toPublic:function(t){return void 0!==t.resolve&&(t=t.resolve),null==t?t:t.Q?t:a.b.fromStringOrThrow(t)},fromByteBuffer:function(t){return i.a.public_key(t)},appendByteBuffer:function(t,e){n.a.required(e),i.a.public_key(t,h.public_key.toPublic(e))},fromObject:function(t){return n.a.required(t),t.Q?t:h.public_key.toPublic(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?u.b.address_prefix+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(n.a.required(t),t.toString())},compare:function(t,e){return h.public_key.fromObject(t).toBlockchainAddress().compare(h.public_key.fromObject(e).toBlockchainAddress())}},h.address={_to_address:function(t){return n.a.required(t),t.addy?t:a.a.fromString(t)},fromByteBuffer:function(t){return new a.a(i.a.ripemd160(t))},appendByteBuffer:function(t,e){i.a.ripemd160(t,h.address._to_address(e).toBuffer())},fromObject:function(t){return h.address._to_address(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?u.b.address_prefix+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":h.address._to_address(t).toString()},compare:function(t,e){return _(t.toString(),e.toString())}};var _=function(t,e){return t>e?1:t<e?-1:0},g=function(t){return Array.isArray(t)?t[0]:t},v=function(t,e){return e.nosort?t:e.compare?t.sort(function(t,r){return e.compare(g(t),g(r))}):t.sort(function(t,e){return"number"==typeof g(t)&&"number"==typeof g(e)?g(t)-g(e):c.isBuffer(g(t))&&c.isBuffer(g(e))?_(g(t).toString("hex"),g(e).toString("hex")):_(g(t).toString(),g(e).toString())})};e.a=h}).call(this,r(13))},function(t,e,r){var n,i,o;
/**
* @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
*/i=[r(70)],void 0===(o="function"==typeof(n=function(t){"use strict";var e=function(t,r,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===r&&(r=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if((t|=0)<0)throw RangeError("Illegal capacity");r=!!r,i=!!i}this.buffer=0===t?n:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=r,this.noAssert=i};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var r=e.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var n=new ArrayBuffer(0),i=String.fromCharCode;function o(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function s(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+i.apply(String,t);t.length+arguments.length>1024&&(e.push(i.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function a(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>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-f;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)}function u(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,c=(1<<f)-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*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*_}e.accessor=function(){return Uint8Array},e.allocate=function(t,r,n){return new e(t,r,n)},e.concat=function(t,r,n,i){"boolean"!=typeof r&&"string"==typeof r||(i=n,n=r,r=void 0);for(var o,s=0,a=0,u=t.length;a<u;++a)e.isByteBuffer(t[a])||(t[a]=e.wrap(t[a],r)),(o=t[a].limit-t[a].offset)>0&&(s+=o);if(0===s)return new e(0,n,i);var f,c=new e(s,n,i);for(a=0;a<u;)(o=(f=t[a++]).limit-f.offset)<=0||(c.view.set(f.view.subarray(f.offset,f.limit),c.offset),c.offset+=o);return c.limit=c.offset,c.offset=0,c},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,n,i,o){if("string"!=typeof n&&(o=i,i=n,n=void 0),"string"==typeof t)switch(void 0===n&&(n="utf8"),n){case"base64":return e.fromBase64(t,i);case"hex":return e.fromHex(t,i);case"binary":return e.fromBinary(t,i);case"utf8":return e.fromUTF8(t,i);case"debug":return e.fromDebug(t,i);default:throw Error("Unsupported encoding: "+n)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var s;if(e.isByteBuffer(t))return(s=r.clone.call(t)).markedOffset=-1,s;if(t instanceof Uint8Array)s=new e(0,i,o),t.length>0&&(s.buffer=t.buffer,s.offset=t.byteOffset,s.limit=t.byteOffset+t.byteLength,s.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)s=new e(0,i,o),t.byteLength>0&&(s.buffer=t,s.offset=0,s.limit=t.byteLength,s.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(s=new e(t.length,i,o)).limit=t.length;for(var a=0;a<t.length;++a)s.view[a]=t[a]}return s},r.writeBitSet=function(t,e){var r=void 0===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)<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 u=0;for(n=0;a<o;)n|=(1&!!t[a++])<<u++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},r.readBitSet=function(t){var e=void 0===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 u=0;for(r=this.readByte(t++);s<i;)a[s++]=!!(r>>u++&1)}return e&&(this.offset=t),a},r.readBytes=function(t,e){var r=void 0===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)<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},r.writeBytes=r.append,r.writeInt8=function(t,e){var r=void 0===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)<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},r.writeByte=r.writeInt8,r.readInt8=function(t){var e=void 0===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)<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},r.readByte=r.readInt8,r.writeUint8=function(t,e){var r=void 0===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)<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},r.writeUInt8=r.writeUint8,r.readUint8=function(t){var e=void 0===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)<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},r.readUInt8=r.readUint8,r.writeInt16=function(t,e){var r=void 0===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)<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},r.writeShort=r.writeInt16,r.readInt16=function(t){var e=void 0===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)<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},r.readShort=r.readInt16,r.writeUint16=function(t,e){var r=void 0===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)<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},r.writeUInt16=r.writeUint16,r.readUint16=function(t){var e=void 0===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)<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},r.readUInt16=r.readUint16,r.writeInt32=function(t,e){var r=void 0===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)<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},r.writeInt=r.writeInt32,r.readInt32=function(t){var e=void 0===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)<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},r.readInt=r.readInt32,r.writeUint32=function(t,e){var r=void 0===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)<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},r.writeUInt32=r.writeUint32,r.readUint32=function(t){var e=void 0===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)<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},r.readUInt32=r.readUint32,t&&(r.writeInt64=function(e,r){var n=void 0===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)<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},r.writeLong=r.writeInt64,r.readInt64=function(e){var r=void 0===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)<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},r.readLong=r.readInt64,r.writeUint64=function(e,r){var n=void 0===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)<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},r.writeUInt64=r.writeUint64,r.readUint64=function(e){var r=void 0===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)<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},r.readUInt64=r.readUint64),r.writeFloat32=function(t,e){var r=void 0===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)<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,u(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},r.writeFloat=r.writeFloat32,r.readFloat32=function(t){var e=void 0===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)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=a(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},r.readFloat=r.readFloat32,r.writeFloat64=function(t,e){var r=void 0===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)<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,u(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},r.writeDouble=r.writeFloat64,r.readFloat64=function(t){var e=void 0===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)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=a(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},r.readDouble=r.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},r.writeVarint32=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=e.calculateVarint32(t);r+=o;var s=this.buffer.byteLength;for(r>s&&this.resize((s*=2)>r?s:r),r-=o,t>>>=0;t>=128;)i=127&t|128,this.view[r++]=i,t>>>=7;return this.view[r++]=t,n?(this.offset=r,this):o},r.writeVarint32ZigZag=function(t,r){return this.writeVarint32(e.zigZagEncode32(t),r)},r.readVarint32=function(t){var e=void 0===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)<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}},r.readVarint32ZigZag=function(t){var r=this.readVarint32(t);return"object"==typeof r?r.value=e.zigZagDecode32(r.value):r=e.zigZagDecode32(r),r},t&&(e.MAX_VARINT64_BYTES=10,e.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},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},r.writeVarint64=function(r,n){var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof r)r=t.fromNumber(r);else if("string"==typeof r)r=t.fromString(r);else if(!(r&&r instanceof t))throw TypeError("Illegal value: "+r+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof r?r=t.fromNumber(r,!1):"string"==typeof r?r=t.fromString(r,!1):!1!==r.unsigned&&(r=r.toSigned());var o=e.calculateVarint64(r),s=r.toInt()>>>0,a=r.shiftRightUnsigned(28).toInt()>>>0,u=r.shiftRightUnsigned(56).toInt()>>>0;n+=o;var f=this.buffer.byteLength;switch(n>f&&this.resize((f*=2)>n?f:n),n-=o,o){case 10:this.view[n+9]=u>>>7&1;case 9:this.view[n+8]=9!==o?128|u:127&u;case 8:this.view[n+7]=8!==o?a>>>21|128:a>>>21&127;case 7:this.view[n+6]=7!==o?a>>>14|128:a>>>14&127;case 6:this.view[n+5]=6!==o?a>>>7|128:a>>>7&127;case 5:this.view[n+4]=5!==o?128|a:127&a;case 4:this.view[n+3]=4!==o?s>>>21|128:s>>>21&127;case 3:this.view[n+2]=3!==o?s>>>14|128:s>>>14&127;case 2:this.view[n+1]=2!==o?s>>>7|128:s>>>7&127;case 1:this.view[n]=1!==o?128|s:127&s}return i?(this.offset+=o,this):o},r.writeVarint64ZigZag=function(t,r){return this.writeVarint64(e.zigZagEncode64(t),r)},r.readVarint64=function(e){var r=void 0===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)<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&&void 0===a)&&(a=this.view[e++],i|=(127&a)<<14,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],i|=(127&a)<<21,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],o=127&a,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],o|=(127&a)<<7,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],o|=(127&a)<<14,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],o|=(127&a)<<21,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],s=127&a,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],s|=(127&a)<<7,128&a||this.noAssert&&void 0===a))))))))))throw Error("Buffer overrun");var u=t.fromBits(i|o<<28,o>>>4|s<<24,!1);return r?(this.offset=e,u):{value:u,length:e-n}},r.readVarint64ZigZag=function(r){var n=this.readVarint64(r);return n&&n.value instanceof t?n.value=e.zigZagDecode64(n.value):n=e.zigZagDecode64(n),n}),r.writeCString=function(t,e){var r=void 0===e;r&&(e=this.offset);var n,i=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n<i;++n)if(0===t.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}i=c.calculateUTF16asUTF8(o(t))[1],e+=i+1;var s=this.buffer.byteLength;return e>s&&this.resize((s*=2)>e?s:e),e-=i+1,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,r?(this.offset=e,this):i},r.readCString=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,i=-1;return c.decodeUTF8toUTF16(function(){if(0===i)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(i=this.view[t++])?null:i}.bind(this),r=s(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},r.writeIString=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e;n=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],e+=4+n;var s=this.buffer.byteLength;if(e>s&&this.resize((s*=2)>e?s:e),e-=4+n,this.littleEndian?(this.view[e+3]=n>>>24&255,this.view[e+2]=n>>>16&255,this.view[e+1]=n>>>8&255,this.view[e]=255&n):(this.view[e]=n>>>24&255,this.view[e+1]=n>>>16&255,this.view[e+2]=n>>>8&255,this.view[e+3]=255&n),e+=4,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),e!==i+4+n)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+n));return r?(this.offset=e,this):e-i},r.readIString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=t,i=this.readUint32(t),o=this.readUTF8String(i,e.METRICS_BYTES,t+=4);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",r.writeUTF8String=function(t,e){var r,n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var i=e;r=c.calculateUTF16asUTF8(o(t))[1],e+=r;var s=this.buffer.byteLength;return e>s&&this.resize((s*=2)>e?s:e),e-=r,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),n?(this.offset=e,this):e-i},r.writeString=r.writeUTF8String,e.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(o(t))[0]},e.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(o(t))[1]},e.calculateString=e.calculateUTF8Bytes,r.readUTF8String=function(t,r,n){"number"==typeof r&&(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===r&&(r=e.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)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var o,a=0,u=n;if(r===e.METRICS_CHARS){if(o=s(),c.decodeUTF8(function(){return a<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++a,c.UTF8toUTF16(t,o)}),a!==t)throw RangeError("Illegal range: Truncated data, "+a+" == "+t);return i?(this.offset=n,o()):{string:o(),length:n-u}}if(r===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var f=n+t;if(c.decodeUTF8toUTF16(function(){return n<f?this.view[n++]:null}.bind(this),o=s(),this.noAssert),n!==f)throw RangeError("Illegal range: Truncated data, "+n+" == "+f);return i?(this.offset=n,o()):{string:o(),length:n-u}}throw TypeError("Unsupported metrics: "+r)},r.readString=r.readUTF8String,r.writeVString=function(t,r){var n=void 0===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)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,s,a=r;i=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],s=e.calculateVarint32(i),r+=s+i;var u=this.buffer.byteLength;if(r>u&&this.resize((u*=2)>r?u:r),r-=s+i,r+=this.writeVarint32(i,r),c.encodeUTF16toUTF8(o(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},r.readVString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,i=this.readVarint32(t),o=this.readUTF8String(i.value,e.METRICS_BYTES,t+=i.length);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},r.append=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;n+=o;var s=this.buffer.byteLength;return n>s&&this.resize((s*=2)>n?s:n),n-=o,this.view.set(t.view.subarray(t.offset,t.limit),n),t.offset+=o,i&&(this.offset+=o),this},r.appendTo=function(t,e){return t.append(this,e),this},r.assert=function(t){return this.noAssert=!t,this},r.capacity=function(){return this.buffer.byteLength},r.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},r.clone=function(t){var r=new e(0,this.littleEndian,this.noAssert);return t?(r.buffer=new ArrayBuffer(this.buffer.byteLength),r.view=new Uint8Array(r.buffer)):(r.buffer=this.buffer,r.view=this.view),r.offset=this.offset,r.markedOffset=this.markedOffset,r.limit=this.limit,r},r.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===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=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(r),o=new Uint8Array(i);return o.set(this.view.subarray(t,e)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},r.copy=function(t,r){if(void 0===t&&(t=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(t===r)return new e(0,this.littleEndian,this.noAssert);var n=r-t,i=new e(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=t),this.copyTo(i,0,t,r),i},r.copyTo=function(t,r,n,i){var o,s;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(r=(s=void 0===r)?t.offset:0|r,n=(o=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,r<0||r>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+r+" <= "+t.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var a=i-n;return 0===a?t:(t.ensureCapacity(r+a),t.view.set(this.view.subarray(n,i),r),o&&(this.offset+=a),s&&(t.offset+=a),this)},r.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},r.fill=function(t,e,r){var n=void 0===e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===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},r.flip=function(){return this.limit=this.offset,this.offset=0,this},r.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},r.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},r.LE=function(t){return this.littleEndian=void 0===t||!!t,this},r.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},r.prepend=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;var s=o-n;if(s>0){var a=new ArrayBuffer(this.buffer.byteLength+s),u=new Uint8Array(a);u.set(this.view.subarray(n,this.buffer.byteLength),o),this.buffer=a,this.view=u,this.offset+=s,this.markedOffset>=0&&(this.markedOffset+=s),this.limit+=s,n+=s}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),n-o),t.offset=t.limit,i&&(this.offset-=o),this},r.prependTo=function(t,e){return t.prepend(this,e),this},r.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},r.remaining=function(){return this.limit-this.offset},r.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},r.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<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},r.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===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)},r.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},r.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===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},r.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 n;var i=new ArrayBuffer(r-e);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(e,r),0),i},r.toArrayBuffer=r.toBuffer,r.toString=function(t,e,r){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(r=e=t="utf8"),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 f=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())?(r(e[63&((i|=n>>4&15)|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){var n,i,o;function s(t){throw Error("Illegal character code: "+t)}for(;null!==(n=t());)if(void 0===(i=r[n])&&s(n),null!==(n=t())&&(void 0===(o=r[n])&&s(n),e(i<<2>>>0|(48&o)>>4),null!==(n=t()))){if(void 0===(i=r[n])){if(61===n)break;s(n)}if(e((15&o)<<4>>>0|(60&i)>>2),null!==(n=t())){if(void 0===(o=r[n])){if(61===n)break;s(n)}e((3&i)<<6>>>0|o)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();r.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return f.encode(function(){return t<e?this.view[t++]:null}.bind(this),r=s()),r()},e.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new e(t.length/4*3,r),i=0;return f.decode(o(t),function(t){n.view[i++]=t}),n.limit=i,n},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},r.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<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)},e.fromBinary=function(t,r){if("string"!=typeof t)throw TypeError("str");for(var n,i=0,o=t.length,s=new e(o,r);i<o;){if((n=t.charCodeAt(i))>255)throw RangeError("illegal char code: "+n);s.view[i++]=n}return s.limit=o,s},r.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",s="";r<n;){if(-1!==r&&(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=""}r===this.offset&&r===this.limit?i+=r===this.markedOffset?"!":"|":r===this.offset?i+=r===this.markedOffset?"[":"<":r===this.limit?i+=r===this.markedOffset?"]":">":i+=r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return t?s:i},e.fromDebug=function(t,r,n){for(var i,o,s=t.length,a=new e((s+1)/3|0,r,n),u=0,f=0,c=!1,h=!1,l=!1,p=!1,d=!1;u<s;){switch(i=t.charAt(u++)){case"!":if(!n){if(h||l||p){d=!0;break}h=l=p=!0}a.offset=a.markedOffset=a.limit=f,c=!1;break;case"|":if(!n){if(h||p){d=!0;break}h=p=!0}a.offset=a.limit=f,c=!1;break;case"[":if(!n){if(h||l){d=!0;break}h=l=!0}a.offset=a.markedOffset=f,c=!1;break;case"<":if(!n){if(h){d=!0;break}h=!0}a.offset=f,c=!1;break;case"]":if(!n){if(p||l){d=!0;break}p=l=!0}a.limit=a.markedOffset=f,c=!1;break;case">":if(!n){if(p){d=!0;break}p=!0}a.limit=f,c=!1;break;case"'":if(!n){if(l){d=!0;break}l=!0}a.markedOffset=f,c=!1;break;case" ":c=!1;break;default:if(!n&&c){d=!0;break}if(o=parseInt(i+t.charAt(u++),16),!n&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[f++]=o,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!n){if(!h||!p)throw TypeError("Illegal str: Missing offset or limit");if(f<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+f+" < "+s)}return a},r.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===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++])<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},e.fromHex=function(t,r,n){if(!n){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 i,o=t.length,s=new e(o/2|0,r),a=0,u=0;a<o;a+=2){if(i=parseInt(t.substring(a,a+2),16),!n&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");s.view[u++]=i}return s.limit=u,s};var c=function(){var t={MAX_CODEPOINT:1114111,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},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)}},UTF16toUTF8:function(t,e){for(var r,n=null;null!==(r=null!==n?n:t());)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)},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):(e(55296+((r-=65536)>>10)),e(r%1024+56320)),r=null},encodeUTF16toUTF8:function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},decodeUTF8toUTF16:function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},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]}};return t}();return r.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===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;try{c.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),r=s())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return r()},e.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new e(c.calculateUTF16asUTF8(o(t),!0)[1],r,n),s=0;return c.encodeUTF16toUTF8(o(t),function(t){i.view[s++]=t}),i.limit=s,i},e})?n.apply(e,i):n)||(t.exports=o)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";var n=/\b\d+\.\d+\.(\d+)\b/,i={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(e=0,n=(o=t.split(".")).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){return"string"==typeof t&&(null!==n.exec(t)&&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 "),r=0,i=(s=t.split(".")).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-Z0-9]$/.test(t)?/^[A-Z0-9\.]$/.test(t)?e+"contain only letters numbers and perhaps a dot.":null:e+"end with a letter or number":e+"start with a letter"}};e.a=i},function(t,e,r){"use strict";var n=r(5),i=r.n(n),o=r(20),s=r(14),a=r(1),u=r(3),f=r(2),c=r.n(f),h=r(31),l=r.n(h);var p=Object(o.getCurveByName)("secp256k1"),d=r(6).Buffer,_=p.G,g=p.n,v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.Q=e}return t.fromBinary=function(e){return t.fromBuffer(d.from(e,"binary"))},t.fromBuffer=function(e){return"000000000000000000000000000000000000000000000000000000000000000000"===e.toString("hex")?new t(null):new t(o.Point.decodeFrom(p,e))},t.prototype.toBuffer=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Q?this.Q.compressed:null;return null===this.Q?d.from("000000000000000000000000000000000000000000000000000000000000000000","hex"):this.Q.getEncoded(t)},t.fromPoint=function(e){return new t(e)},t.prototype.toUncompressed=function(){var e=this.Q.getEncoded(!1),r=o.Point.decodeFrom(p,e);return t.fromPoint(r)},t.prototype.toBlockchainAddress=function(){var t=this.toBuffer(),e=Object(a.sha512)(t);return Object(a.ripemd160)(e)},t.prototype.toString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.b.address_prefix;return this.toPublicKeyString(t)},t.prototype.toPublicKeyString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.b.address_prefix,e=this.toBuffer(),r=Object(a.ripemd160)(e),n=d.concat([e,r.slice(0,4)]);return t+Object(s.encode)(n)},t.fromPublicKeyString=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.b.address_prefix;try{return t.fromStringOrThrow(e,r)}catch(t){return null}},t.fromStringOrThrow=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.b.address_prefix;null===e.Q&&(e=r+"1111111111111111111111111111111114T1Anm");var n=e.slice(0,r.length);c.a.equal(r,n,"Expecting key to begin with "+r+", instead got "+n),e=e.slice(r.length);var i=(e=d.from(Object(s.decode)(e),"binary")).slice(-4);e=e.slice(0,-4);var o=Object(a.ripemd160)(e);if(o=o.slice(0,4),!l()(i,o))throw new Error("Checksum did not match");return t.fromBuffer(e)},t.prototype.toAddressString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.b.address_prefix,e=this.toBuffer(),r=Object(a.sha512)(e),n=Object(a.ripemd160)(r),i=Object(a.ripemd160)(n);return n=d.concat([n,i.slice(0,4)]),t+Object(s.encode)(n)},t.prototype.toPtsAddy=function(){var t=this.toBuffer(),e=Object(a.sha256)(t),r=Object(a.ripemd160)(e);r=d.concat([d.from([56]),r]);var n=Object(a.sha256)(r);return n=Object(a.sha256)(n),r=d.concat([r,n.slice(0,4)]),Object(s.encode)(r)},t.prototype.child=function(e){c()(d.isBuffer(e),"Buffer required: offset"),c.a.equal(e.length,32,"offset length"),e=d.concat([this.toBuffer(),e]),e=Object(a.sha256)(e);var r=i.a.fromBuffer(e);if(r.compareTo(g)>=0)throw new Error("Child offset went out of bounds, try again");var n=_.multiply(r),o=this.Q.add(n);if(p.isInfinity(o))throw new Error("Child offset derived to an invalid key, try again");return t.fromPoint(o)},t.prototype.toByteBuffer=function(){var t=new ByteBuffer(ByteBuffer.DEFAULT_CAPACITY,ByteBuffer.LITTLE_ENDIAN);return this.appendByteBuffer(t),t.copy(0,t.offset)},t.fromHex=function(e){return t.fromBuffer(d.from(e,"hex"))},t.prototype.toHex=function(){return this.toBuffer().toString("hex")},t.fromPublicKeyStringHex=function(e){return t.fromPublicKeyString(d.from(e,"hex"))},t}();e.a=v},function(t,e,r){"use strict";var n={reserved_spaces:{relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},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},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},vote_type:{committee:0,witness:1,worker:2},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,fba_distribute:44,bid_collateral:45,execute_bid:46,asset_claim_pool:47,asset_update_issuer:48}};e.a=n},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,f=[],c=!1,h=-1;function l(){c&&u&&(c=!1,u.length?f=u.concat(f):h=-1,f.length&&p())}function p(){if(!c){var t=a(l);c=!0;for(var e=f.length;e;){for(u=f,f=[];++h<e;)u&&u[h].run();h=-1,e=f.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function _(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];f.push(new d(t,e)),1!==f.length||c||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){var n=r(80);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,r){"use strict";var n=r(19);r.d(e,"a",function(){return n.a});r(25),r(17);var i=r(11);r.d(e,"b",function(){return i.a});var o=r(40);r.d(e,"c",function(){return o.a});r(39);var s=r(1);r.d(e,"d",function(){return s});r(29)},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";var n=r(20),i=r(5),o=r.n(i),s=r(14),a=r(1),u=r(11),f=r(31),c=r.n(f),h=r(2),l=r.n(h);var p=Object(n.getCurveByName)("secp256k1"),d=p.n,_=r(6).Buffer,g=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.d=e}return t.fromBuffer=function(e){if(!_.isBuffer(e))throw new Error("Expecting paramter to be a Buffer type");if(32!==e.length&&console.log("WARN: Expecting 32 bytes, instead got "+e.length+", stack trace:",(new Error).stack),0===e.length)throw new Error("Empty buffer");return new t(o.a.fromBuffer(e))},t.fromSeed=function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(Object(a.sha256)(e))},t.fromWif=function(e){var r=_.from(Object(s.decode)(e)),n=r.readUInt8(0);l.a.equal(128,n,"Expected version 128, instead got "+n);var i=r.slice(0,-4),o=r.slice(-4),u=Object(a.sha256)(i);if(u=(u=Object(a.sha256)(u)).slice(0,4),!c()(o,u))throw new Error("Checksum did not match");return i=i.slice(1),t.fromBuffer(i)},t.prototype.toWif=function(){var t=this.toBuffer();t=_.concat([_.from([128]),t]);var e=Object(a.sha256)(t);e=(e=Object(a.sha256)(e)).slice(0,4);var r=_.concat([t,e]);return Object(s.encode)(r)},t.prototype.toPublicKeyPoint=function(){return p.G.multiply(this.d)},t.prototype.toPublicKey=function(){return this.public_key?this.public_key:this.public_key=u.a.fromPoint(this.toPublicKeyPoint())},t.prototype.toBuffer=function(){return this.d.toBuffer(32)},t.prototype.get_shared_secret=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(t=v(t)).toUncompressed().toBuffer(),i=n.Point.fromAffine(p,o.a.fromBuffer(r.slice(1,33)),o.a.fromBuffer(r.slice(33,65))),s=this.toBuffer(),u=i.multiply(o.a.fromBuffer(s)).affineX.toBuffer({size:32});if(!e&&u.length<32){var f=_.alloc(32-u.length).fill(0);u=_.concat([f,u])}return Object(a.sha512)(u)},t.prototype.child=function(e){e=_.concat([this.toPublicKey().toBuffer(),e]),e=Object(a.sha256)(e);var r=o.a.fromBuffer(e);if(r.compareTo(d)>=0)throw new Error("Child offset went out of bounds, try again");var n=this.d.add(r);if(0===n.signum())throw new Error("Child offset derived to an invalid key, try again");return new t(n)},t.prototype.toByteBuffer=function(){var t=new ByteBuffer(ByteBuffer.DEFAULT_CAPACITY,ByteBuffer.LITTLE_ENDIAN);return this.appendByteBuffer(t),t.copy(0,t.offset)},t.fromHex=function(e){return t.fromBuffer(new _(e,"hex"))},t.prototype.toHex=function(){return this.toBuffer().toString("hex")},t}();e.a=g;var v=function(t){return null==t?t:t.Q?t:u.a.fromStringOrThrow(t)}},function(t,e,r){"use strict";var n=r(11);var i=r(6).Buffer,o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.fixed_data=function(t,e,r){if(t){if(!r){var n=t.copy(t.offset,t.offset+e);return t.skip(e),i.from(n.toBinary(),"binary")}var o=r.slice(0,e).toString("binary");for(t.append(o,"binary");e-- >o.length;)t.writeUint8(0)}},t.public_key=function(e,r){if(e){if(!r)return i=t.fixed_data(e,33),n.a.fromBuffer(i);var i=r.toBuffer();e.append(i.toString("binary"),"binary")}},t.ripemd160=function(e,r){if(e)return r?void t.fixed_data(e,20,r):t.fixed_data(e,20)},t.time_point_sec=function(t,e){return e?(e=Math.ceil(e/1e3),void t.writeInt32(e)):(e=t.readInt32(),new Date(1e3*e))},t}();e.a=o},function(t,e,r){"use strict";var n=r(2),i=r.n(n),o=r(3),s=r(1),a=r(14),u=r(31),f=r.n(u);var c=r(6).Buffer,h=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.addy=e}return t.fromBuffer=function(e){var r=Object(s.sha512)(e);return new t(Object(s.ripemd160)(r))},t.fromString=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.b.address_prefix,n=e.slice(0,r.length);i.a.equal(r,n,"Expecting key to begin with "+r+", instead got "+n);var u=e.slice(r.length),h=(u=new c(Object(a.decode)(u),"binary")).slice(-4);u=u.slice(0,-4);var l=Object(s.ripemd160)(u);if(l=l.slice(0,4),!f()(h,l))throw new Error("Checksum did not match");return new t(u)},t.fromPublic=function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56,i=Object(s.sha256)(e.toBuffer(r)),o=Object(s.ripemd160)(i),a=c.alloc(1);a.writeUInt8(255&n,0);var u=c.concat([a,o]),f=Object(s.sha256)(u);f=Object(s.sha256)(f);var h=c.concat([u,f.slice(0,4)]);return new t(Object(s.ripemd160)(h))},t.prototype.toBuffer=function(){return this.addy},t.prototype.toString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.b.address_prefix,e=Object(s.ripemd160)(this.addy),r=c.concat([this.addy,e.slice(0,4)]);return t+Object(a.encode)(r)},t}();e.a=h},function(t,e,r){var n=r(54),i=r(55),o=r(78);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){t.exports=function(t){return t.enc.Hex}(r(22))},function(t,e,r){t.exports=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={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,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:4*t.length},toString:function(t){return(t||u).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(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n;return i/=4294967296,(i+=.5)*(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={},u=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)}},f=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(f.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return f.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,u=i/a,f=(u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0))*o,c=t.min(4*f,i);if(f){for(var h=0;h<f;h+=o)this._doProcessBlock(n,h);var l=n.splice(0,f);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(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/
var n=r(71),i=r(72),o=r(73);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return f(this,t,e,r)}function f(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=l(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=a(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?a(t,0):l(t,e);if("Buffer"===e.type&&o(e.data))return l(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(c(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function l(t,e){var r=e.length<0?0:0|p(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return P(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(t).length;default:if(n)return P(t).length;e=(""+e).toLowerCase(),n=!0}}function _(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;o<a;o++)if(f(t,o)===f(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,l=0;l<u;l++)if(f(t,o+l)!==f(e,l)){h=!1;break}if(h)return o}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function b(t,e,r,n){return F(P(e,t.length-r),t,r,n)}function m(t,e,r,n){return F(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return m(t,e,r,n)}function E(t,e,r,n){return F(N(e),t,r,n)}function S(t,e,r,n){return F(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,f=t[i],c=null,h=f>239?4:f>223?3:f>191?2:1;if(i+h<=r)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=k));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return f(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return c(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)_(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)_(this,e,e+3),_(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)_(this,e,e+7),_(this,e+1,e+6),_(this,e+2,e+5),_(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?T(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,a=Math.min(o,s),f=this.slice(n,i),c=t.slice(e,r),h=0;h<a;++h)if(f[h]!==c[h]){o=f[h],s=c[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return m(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function x(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 I(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 O(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+=C(t[o]);return i}function j(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 A(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 L(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function M(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 D(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 R(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 z(t,e,r,n,o){return o||R(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function q(t,e,r,n,o){return o||R(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||A(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||A(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||A(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||A(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return z(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return z(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return q(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return q(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:P(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function C(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function N(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(16))},function(t,e,r){"use strict";var n=r(38),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var o=r(35);o.inherits=r(9);var s=r(59),a=r(47);o.inherits(h,s);for(var u=i(a.prototype),f=0;f<u.length;f++){var c=u[f];h.prototype[c]||(h.prototype[c]=a.prototype[c])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",l)}function l(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){"use strict";var n=r(52),i=r.n(n),o=r(21),s=r.n(o),a=r(51),u=r.n(a),f=r(2),c=r.n(f),h=r(1);var l=r(6).Buffer,p=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.iv=e,this.key=r}return t.prototype.clear=function(){return this.iv=this.key=void 0},t.fromSeed=function(e){if(void 0===e)throw new Error("seed is required");var r=Object(h.sha512)(e);return r=r.toString("hex"),t.fromSha512(r)},t.fromSha512=function(e){return c.a.equal(e.length,128,"A Sha512 in HEX should be 128 characters long, instead got "+e.length),new t(s.a.parse(e.substring(64,96)),s.a.parse(e.substring(0,64)))},t.fromBuffer=function(e){return c()(l.isBuffer(e),"Expecting Buffer"),c.a.equal(e.length,64,"A Sha512 Buffer should be 64 characters long, instead got "+e.length),t.fromSha512(e.toString("hex"))},t.decrypt_with_checksum=function(e,r,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null==n&&(n=""),l.isBuffer(i)||(i=new l(i,"hex"));var s=e.get_shared_secret(r,o),a=t.fromSeed(l.concat([l.from(""+n),l.from(s.toString("hex"))])).decrypt(i);if(!(a.length>=4))throw new Error("Invalid key, could not decrypt message(1)");var u=a.slice(0,4),f=a.slice(4),c=Object(h.sha256)(f);if(c=(c=c.slice(0,4)).toString("hex"),u.toString("hex")!==c)throw new Error("Invalid key, could not decrypt message(2)");return f},t.encrypt_with_checksum=function(e,r,n,i){null==n&&(n=""),l.isBuffer(i)||(i=new l(i,"binary"));var o=e.get_shared_secret(r),s=t.fromSeed(l.concat([l.from(""+n),l.from(o.toString("hex"))])),a=Object(h.sha256)(i).slice(0,4),u=l.concat([a,i]);return s.encrypt(u)},t.prototype._decrypt_word_array=function(t){return i.a.decrypt({ciphertext:t,salt:null},this.key,{iv:this.iv})},t.prototype._encrypt_word_array=function(t){var e=i.a.encrypt(t,this.key,{iv:this.iv});return u.a.parse(e.toString())},t.prototype.decrypt=function(t){if("string"==typeof t&&(t=new l(t,"binary")),!l.isBuffer(t))throw new Error("buffer required");c()(t,"Missing cipher text");var e=this.decryptHex(t.toString("hex"));return new l(e,"hex")},t.prototype.encrypt=function(t){if("string"==typeof t&&(t=new l(t,"binary")),!l.isBuffer(t))throw new Error("buffer required");var e=this.encryptHex(t.toString("hex"));return new l(e,"hex")},t.prototype.encryptToHex=function(t){if("string"==typeof t&&(t=new l(t,"binary")),!l.isBuffer(t))throw new Error("buffer required");return this.encryptHex(t.toString("hex"))},t.prototype.decryptHex=function(t){c()(t,"Missing cipher text");var e=s.a.parse(t),r=this._decrypt_word_array(e);return s.a.stringify(r)},t.prototype.decryptHexToBuffer=function(t){c()(t,"Missing cipher text");var e=s.a.parse(t),r=this._decrypt_word_array(e),n=s.a.stringify(r);return new l(n,"hex")},t.prototype.decryptHexToText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"binary";return this.decryptHexToBuffer(t).toString(e)},t.prototype.encryptHex=function(t){var e=s.a.parse(t),r=this._encrypt_word_array(e);return s.a.stringify(r)},t}();e.a=p},function(t,e,r){"use strict";var n=r(8),i=r(0);var o=n.Long.fromNumber(Math.pow(2,48)-1),s=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.space=e,this.type=r,this.instance=n;var o=this.instance.toString(),s=this.space+"."+this.type+"."+o;if(!i.a.is_digits(o))throw new("Invalid object id "+s)}return t.fromString=function(e){if(void 0!==e.space&&void 0!==e.type&&void 0!==e.instance)return e;var r=i.a.require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,i.a.required(e,"ObjectId"),"ObjectId");return new t(parseInt(r[1]),parseInt(r[2]),n.Long.fromString(r[3]))},t.fromLong=function(e){return new t(e.shiftRight(56).toInt(),255&e.shiftRight(48).toInt(),e.and(o))},t.fromByteBuffer=function(e){return t.fromLong(e.readUint64())},t.prototype.toLong=function(){return n.Long.fromNumber(this.space).shiftLeft(56).or(n.Long.fromNumber(this.type).shiftLeft(48).or(this.instance))},t.prototype.appendByteBuffer=function(t){return t.writeUint64(this.toLong())},t.prototype.toString=function(){return this.space+"."+this.type+"."+this.instance.toString()},t}();e.a=s},function(t,e,r){var n=r(6).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%i,f=Math.min(o-a,i-u),c=0;c<f;c++)r[u+c]=t[a+c];a+=f,(s+=f)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,r){"use strict";(function(t){var n=r(8),i=r.n(n),o=r(33);var s=r(6).Buffer,a=t.env.npm_config__graphene_serializer_hex_dump,u=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.operation_name=e,this.types=r,this.types&&(this.keys=Object.keys(this.types)),t.printDebug=!0}return t.prototype.fromByteBuffer=function(e){var r={},n=null;try{for(var i=this.keys,s=0;s<i.length;s++){n=i[s];var u=this.types[n];try{if(a)if(u.operation_name)console.error(u.operation_name);else{var f=e.offset;u.fromByteBuffer(e);var c=e.offset;e.offset=f;var h=e.copy(f,c);console.error(this.operation_name+"."+n+"\t",h.toHex())}r[n]=u.fromByteBuffer(e)}catch(r){throw t.printDebug&&(console.error("Error reading "+this.operation_name+"."+n+" in data:"),e.printDebug()),r}}}catch(t){o.a.throw(this.operation_name+"."+n,t)}return r},t.prototype.appendByteBuffer=function(t,e){var r=null;try{for(var n=this.keys,i=0;i<n.length;i++){r=n[i],this.types[r].appendByteBuffer(t,e[r])}}catch(t){try{o.a.throw(this.operation_name+"."+r+" = "+JSON.stringify(e[r]),t)}catch(n){o.a.throw(this.operation_name+"."+r+" = "+e[r],t)}}},t.prototype.fromObject=function(t){var e={},r=null;try{for(var n=this.keys,i=0;i<n.length;i++){r=n[i];var s=this.types[r],a=t[r],u=s.fromObject(a);e[r]=u}}catch(t){o.a.throw(this.operation_name+"."+r,t)}return e},t.prototype.toObject=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{use_default:!1,annotate:!1},r={},n=null;try{if(!this.types)return r;for(var s=this.keys,u=0;u<s.length;u++){n=s[u];var f=this.types[n],c=f.toObject(void 0!==t&&null!==t?t[n]:void 0,e);if(r[n]=c,a){var h=new i.a(i.a.DEFAULT_CAPACITY,i.a.LITTLE_ENDIAN);f.appendByteBuffer(h,void 0!==t&&null!==t?t[n]:void 0),h=h.copy(0,h.offset),console.error(this.operation_name+"."+n,h.toHex())}}}catch(t){o.a.throw(this.operation_name+"."+n,t)}return r},t.prototype.compare=function(t,e){var r=this.keys[0],n=this.types[r],i=t[r],o=e[r];if(n.compare)return n.compare(i,o);if("number"==typeof i&&"number"==typeof o)return i-o;var a=void 0;s.isBuffer(i)&&s.isBuffer(o)&&(a="hex");var u=i.toString(a),f=o.toString(a);return u>f?1:u<f?-1:0},t.prototype.fromHex=function(t){var e=i.a.fromHex(t,i.a.LITTLE_ENDIAN);return this.fromByteBuffer(e)},t.prototype.fromBuffer=function(t){var e=i.a.fromBinary(t.toString("binary"),i.a.LITTLE_ENDIAN);return this.fromByteBuffer(e)},t.prototype.toHex=function(t){return this.toByteBuffer(t).toHex()},t.prototype.toByteBuffer=function(t){var e=new i.a(i.a.DEFAULT_CAPACITY,i.a.LITTLE_ENDIAN);return this.appendByteBuffer(e,t),e.copy(0,e.offset)},t.prototype.toBuffer=function(t){return s.from(this.toByteBuffer(t).toBinary(),"binary")},t}();e.a=u}).call(this,r(13))},function(t,e,r){"use strict";var n=r(17),i=r(11),o=r(19),s=r(25),a=r(1),u=r(36),f=r.n(u),c=r(3),h=r(6).Buffer,l={aes_checksum:function(t){if("string"!=typeof t)throw new"password string required";for(var e=f.a.randomBuffer(4).toString("hex"),r=0,n=e+t,i=Date.now();Date.now()-i<250;)n=Object(a.sha256)(n),r+=1;var o=Object(a.sha256)(n),u=[r,e.toString("hex"),o.slice(0,4).toString("hex")].join(",");return{aes_private:s.a.fromSeed(n),checksum:u}},aes_private:function(t,e){for(var r=e.split(","),n=r[0],i=r[1],o=r[2],u=i+t,f=0;0<n?f<n:f>n;f++)u=Object(a.sha256)(u);if(Object(a.sha256)(u).slice(0,4).toString("hex")!==o)throw new Error("wrong password");return s.a.fromSeed(u)},random32ByteBuffer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.browserEntropy();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 e=Date.now();Date.now()-e<250;)t=Object(a.sha256)(t);var r=[];return r.push(t),r.push(f.a.randomBuffer(32)),Object(a.sha256)(h.concat(r))},suggest_brain_key:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:",",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.browserEntropy(),r=this.random32ByteBuffer(e),n=t.split(",");if(49744!==n.length)throw new Error("expecting 49744 but got "+n.length+" dictionary words");for(var i=[],o=0;o<32;o+=2){var s=((r[o]<<8)+r[o+1])/Math.pow(2,16),a=Math.round(n.length*s);i.push(n[a])}return this.normalize_brainKey(i.join(" "))},get_random_key:function(t){return n.a.fromBuffer(this.random32ByteBuffer(t))},get_brainPrivateKey:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e<0)throw new Error("invalid sequence");return t=l.normalize_brainKey(t),n.a.fromBuffer(Object(a.sha256)(Object(a.sha512)(t+" "+e)))},normalize_brainKey:function(t){if("string"!=typeof t)throw new Error("string required for brainKey");return(t=t.trim()).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 e,r=0;r<navigator.mimeTypes.length;r++)t+=(e=navigator.mimeTypes[r]).description+" "+e.type+" "+e.suffixes+" ";console.log("INFO\tbrowserEntropy gathered")}catch(e){t=Object(a.sha256)((new Date).toString())}return t+=h.from(t).toString("binary")+" "+(new Date).toString()},addresses:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.b.address_prefix,r=i.a.fromPublicKeyString(t,e);return[o.a.fromPublic(r,!1,0).toString(e),o.a.fromPublic(r,!0,0).toString(e),o.a.fromPublic(r,!1,56).toString(e),o.a.fromPublic(r,!0,56).toString(e),r.toAddressString(e)]}};e.a=l},function(t,e,r){"use strict";(function(t){var n=r(43),i=r(34),o=r(41);if(t)t.inst="";else;var s=!1;e.a={setRpcConnectionStatusCallback:function(t){this.statusCb=t,inst&&inst.setRpcConnectionStatusCallback(t)},setAutoReconnect:function(t){s=t},reset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ws://localhost:8090",e=arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4e3,n=this,i=arguments[3],o=arguments[4];return this.close().then(function(){return inst=new a,inst.setRpcConnectionStatusCallback(n.statusCb),inst&&e&&inst.connect(t,r,i,o),inst})},instance:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ws://localhost:8090",e=arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4e3,n=arguments[3],i=arguments[4];return inst||(inst=new a,inst.setRpcConnectionStatusCallback(this.statusCb)),inst&&e&&inst.connect(t,r,n),i&&(inst.closeCb=i),inst},chainId:function(){return Apis.instance().chain_id},close:function(){return inst?new Promise(function(t){inst.close().then(function(){inst=null,t()})}):Promise.resolve()}};var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.connect=function(t,e){var r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{enableCrypto:!1,enableOrders:!1};this.url=t;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&&(this.ws_rpc.statusCb=null,this.ws_rpc.keepAliveCb=null,this.ws_rpc.on_close=null,this.ws_rpc.on_reconnect=null),this.ws_rpc=new n.a(t,this.statusCb,e,s,function(t){r._db&&!t&&r._db.exec("get_objects",[["2.1.0"]]).catch(function(t){})}),this.init_promise=this.ws_rpc.login("","").then(function(){r._db=new i.a(r.ws_rpc,"database"),r._net=new i.a(r.ws_rpc,"network_broadcast"),r._hist=new i.a(r.ws_rpc,"history"),a.enableOrders&&(r._orders=new i.a(r.ws_rpc,"orders")),a.enableCrypto&&(r._crypt=new i.a(r.ws_rpc,"crypto"));var t=r._db.init().then(function(){return r._db.exec("get_chain_id",[]).then(function(t){return r.chain_id=t,o.a.setChainId(t)})});r.ws_rpc.on_reconnect=function(){r.ws_rpc&&r.ws_rpc.login("","").then(function(){r._db.init().then(function(){r.statusCb&&r.statusCb("reconnect")}),r._net.init(),r._hist.init(),a.enableOrders&&r._orders.init(),a.enableCrypto&&r._crypt.init()})},r.ws_rpc.on_close=function(){r.close().then(function(){r.closeCb&&r.closeCb()})};var e=[t,r._net.init(),r._hist.init()];return a.enableOrders&&e.push(r._orders.init()),a.enableCrypto&&e.push(r._crypt.init()),Promise.all(e)}).catch(function(e){return console.error(t,"Failed to initialize with error",e&&e.message),r.close().then(function(){throw e})})},t.prototype.close=function(){var t=this;return this.ws_rpc&&1===this.ws_rpc.ws.readyState?this.ws_rpc.close().then(function(){t.ws_rpc=null}):(this.ws_rpc=null,Promise.resolve())},t.prototype.db_api=function(){return this._db},t.prototype.network_api=function(){return this._net},t.prototype.history_api=function(){return this._hist},t.prototype.crypto_api=function(){return this._crypt},t.prototype.orders_api=function(){return this._orders},t.prototype.setRpcConnectionStatusCallback=function(t){this.statusCb=t},t}()}).call(this,r(16))},function(t,e,r){var n=Array.prototype.slice,i=r(100),o=r(101),s=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:function(t,e,r){var f,c;if(a(t)||a(e))return!1;if(t.prototype!==e.prototype)return!1;if(o(t))return!!o(e)&&(t=n.call(t),e=n.call(e),s(t,e,r));if(u(t)){if(!u(e))return!1;if(t.length!==e.length)return!1;for(f=0;f<t.length;f++)if(t[f]!==e[f])return!1;return!0}try{var h=i(t),l=i(e)}catch(t){return!1}if(h.length!=l.length)return!1;for(h.sort(),l.sort(),f=h.length-1;f>=0;f--)if(h[f]!=l[f])return!1;for(f=h.length-1;f>=0;f--)if(c=h[f],!s(t[c],e[c],r))return!1;return typeof t==typeof e}(t,e,r))};function a(t){return null===t||void 0===t}function u(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(t,e,r){"use strict";(function(t){function n(e,r){switch(e){case"Array":if(Array.isArray(r))return;break;case"Boolean":if("boolean"==typeof r)return;break;case"Buffer":if(t.isBuffer(r))return;break;case"Number":if("number"==typeof r)return;break;case"String":if("string"==typeof r)return;break;default:if(i(r.constructor)===i(e))return}throw new TypeError("Expected "+(i(e)||e)+", got "+r)}function i(t){var e=t.toString().match(/function (.*?)\(/);return e?e[1]:null}r.d(e,"a",function(){return n})}).call(this,r(23).Buffer)},function(t,e,r){"use strict";var n=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.message=e,(void 0!==r&&null!==r?r.message:void 0)&&(this.message="cause\t"+r.message+"\t"+this.message);var n="";(void 0!==r&&null!==r?r.stack:void 0)&&(n="caused by\n\t"+r.stack+"\t"+n),this.stack=this.message+"\n"+n}return t.throw=function(t,e){var r=t;throw(void 0!==e&&null!==e?e.message:void 0)&&(r+="\t cause: "+e.message+" "),(void 0!==e&&null!==e?e.stack:void 0)&&(r+="\n stack: "+e.stack+" "),new Error(r)},t}();e.a=n},function(t,e,r){"use strict";var n=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ws_rpc=e,this.api_name=r}return t.prototype.init=function(){var t=this;return this.ws_rpc.call([1,this.api_name,[]]).then(function(e){return t.api_id=e,t})},t.prototype.exec=function(t,e){return this.ws_rpc.call([this.api_id,t,e]).catch(function(t){throw t})},t}();e.a=n},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,r(23).Buffer)},function(t,e,r){(function(n,i){var o;!function(s){"use strict";function a(t,e){if(e=e||{type:"Array"},void 0!==n&&"number"==typeof n.pid)return function(t,e){var n=r(106).randomBytes(t);switch(e.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(t),o=0;o<t;++o)i[o]=n.readUInt8(o);return i;default:throw new Error(e.type+" is unsupported.")}}(t,e);if(!(window.crypto||window.msCrypto))throw new Error("Your browser does not support window.crypto.");return function(t,e){var r=new Uint8Array(t);switch((window.crypto||window.msCrypto).getRandomValues(r),e.type){case"Array":return[].slice.call(r);case"Buffer":try{new i(1)}catch(t){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new i(r);case"Uint8Array":return r;default:throw new Error(e.type+" is unsupported.")}}(t,e)}void 0===(o=function(){return a}.apply(e,[]))||(t.exports=o),a.randomArray=function(t){return a(t,{type:"Array"})},a.randomUint8Array=function(t){return a(t,{type:"Uint8Array"})},a.randomBuffer=function(t){return a(t,{type:"Buffer"})}}()}).call(this,r(13),r(23).Buffer)},function(t,e,r){"use strict";var n=r(9),i=r(56),o=r(63),s=r(64),a=r(49);function u(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(s(t))}},function(t,e,r){"use strict";(function(e){!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this,r(13))},function(t,e,r){"use strict"},function(t,e,r){"use strict";var n=r(2),i=r.n(n),o=r(1),s=r(32),a=r(5),u=r.n(a),f=r(6).Buffer;function c(t,e){Object(s.a)(u.a,t),Object(s.a)(u.a,e),this.r=t,this.s=e}c.parseCompact=function(t){i.a.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;return i.a.equal(e,7&e,"Invalid signature parameter"),{compressed:!!(4&e),i:e&=3,signature:new c(u.a.fromBuffer(t.slice(1,33)),u.a.fromBuffer(t.slice(33)))}},c.fromDER=function(t){i.a.equal(t.readUInt8(0),48,"Not a DER sequence"),i.a.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),i.a.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.a.equal(t.readUInt8(r),2,"Expected a DER integer (2)");var n=t.readUInt8(r+1);i()(n>0,"S length is zero");var o=t.slice(4,r),s=t.slice(r+2);r+=2+n,e>1&&0===o.readUInt8(0)&&i()(128&o.readUInt8(1),"R value excessively padded"),n>1&&0===s.readUInt8(0)&&i()(128&s.readUInt8(1),"S value excessively padded"),i.a.equal(r,t.length,"Invalid DER encoding");var a=u.a.fromDERInteger(o),f=u.a.fromDERInteger(s);return i()(a.signum()>=0,"R value is negative"),i()(f.signum()>=0,"S value is negative"),new c(a,f)},c.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),r=-129&e;return i()(r>0&&r<4,"Invalid hashType"),{signature:c.fromDER(t.slice(0,-1)),hashType:e}},c.prototype.toCompact=function(t,e){e&&(t+=4),t+=27;var r=f.alloc(65);return r.writeUInt8(t,0),this.r.toBuffer(32).copy(r,1),this.s.toBuffer(32).copy(r,33),r},c.prototype.toDER=function(){var t=this.r.toDERInteger(),e=this.s.toDERInteger(),r=[];return r.push(2,t.length),(r=r.concat(t)).push(2,e.length),(r=r.concat(e)).unshift(48,r.length),f.from(r)},c.prototype.toScriptSignature=function(t){var e=f.alloc(1);return e.writeUInt8(t,0),f.concat([this.toDER(),e])};var h=c,l=r(6).Buffer;function p(t,e,r,n){var a=u.a.fromBuffer(e),f=t.n,c=t.G,p=void 0,d=void 0;!function(t,e,r,n,a){Object(s.a)("Buffer",e),Object(s.a)(u.a,r),a&&(e=Object(o.sha256)(l.concat([e,l.alloc(a)]))),i.a.equal(e.length,32,"Hash must be 256 bit");var f=r.toBuffer(32),c=l.alloc(32),h=l.alloc(32);h.fill(1),c.fill(0),c=Object(o.HmacSHA256)(l.concat([h,new l([0]),f,e]),c),h=Object(o.HmacSHA256)(h,c),c=Object(o.HmacSHA256)(l.concat([h,new l([1]),f,e]),c),h=Object(o.HmacSHA256)(h,c),h=Object(o.HmacSHA256)(h,c);for(var p=u.a.fromBuffer(h);p.signum()<=0||p.compareTo(t.n)>=0||!n(p);)c=Object(o.HmacSHA256)(l.concat([h,new l([0])]),c),h=Object(o.HmacSHA256)(h,c),h=Object(o.HmacSHA256)(h,c),p=u.a.fromBuffer(h)}(t,e,r,function(e){var n=c.multiply(e);return!t.isInfinity(n)&&(0!==(p=n.affineX.mod(f)).signum()&&0!==(d=e.modInverse(f).multiply(a.add(r.multiply(p))).mod(f)).signum())},n);var _=f.shiftRight(1);return d.compareTo(_)>0&&(d=f.subtract(d)),new h(p,d)}function d(t,e,r,n){i.a.strictEqual(3&n,n,"Recovery param is more than two bits");var o=t.n,s=t.G,a=r.r,u=r.s;i()(a.signum()>0&&a.compareTo(o)<0,"Invalid r value"),i()(u.signum()>0&&u.compareTo(o)<0,"Invalid s value");var f=1&n,c=n>>1?a.add(o):a,h=t.pointFromX(f,c),l=h.multiply(o);i()(t.isInfinity(l),"nR is not a valid curve point");var p=e.negate().mod(o),d=a.modInverse(o),_=h.multiplyTwo(u,s,p).multiply(d);return t.validate(_),_}function _(t,e,r,n){for(var i=0;i<4;i++){if(d(t,e,r,i).equals(n))return i}throw new Error("Unable to find valid recovery factor")}var g=r(20),v=r(11);var y=Object(g.getCurveByName)("secp256k1"),b=r(6).Buffer,m=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=e,this.s=r,this.i=n,i.a.equal(null!=this.r,!0,"Missing parameter"),i.a.equal(null!=this.s,!0,"Missing parameter"),i.a.equal(null!=this.i,!0,"Missing parameter")}return t.fromBuffer=function(e){var r;return i.a.equal(e.length,65,"Invalid signature length"),r=e.readUInt8(0),i.a.equal(r-27,r-27&7,"Invalid signature parameter"),new t(u.a.fromBuffer(e.slice(1,33)),u.a.fromBuffer(e.slice(33)),r)},t.prototype.toBuffer=function(){var t;return(t=b.alloc(65)).writeUInt8(this.i,0),this.r.toBuffer(32).copy(t,1),this.s.toBuffer(32).copy(t,33),t},t.prototype.recoverPublicKeyFromBuffer=function(t){return this.recoverPublicKey(Object(o.sha256)(t))},t.prototype.recoverPublicKey=function(t){var e,r,n=void 0;return r=u.a.fromBuffer(t),n=this.i,n-=27,e=d(y,r,this,n&=3),v.a.fromPoint(e)},t.signBuffer=function(e,r){var n=Object(o.sha256)(e);return t.signBufferSha256(n,r)},t.signBufferSha256=function(e,r){if(32!==e.length||!b.isBuffer(e))throw new Error("buf_sha256: 32 byte buffer requred");var n,i,o,s,a,f,c;for(s=null,c=0,i=u.a.fromBuffer(e);;){if(f=(n=(o=p(y,e,r.d,c++)).toDER())[5+(a=n[3])],32===a&&32===f){s=_(y,i,o,r.toPublicKey().Q),s+=4,s+=27;break}c%10==0&&console.log("WARN: "+c+" attempts to find canonical signature")}return new t(o.r,o.s,s)},t.sign=function(e,r){return t.signBuffer(b.from(e),r)},t.prototype.verifyBuffer=function(t,e){var r=Object(o.sha256)(t);return this.verifyHash(r,e)},t.prototype.verifyHash=function(t,e){return i.a.equal(t.length,32,"A SHA 256 should be 32 bytes long, instead got "+t.length),function(t,e,r,n){return function(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 u=a.modInverse(i),f=e.multiply(u).mod(i),c=s.multiply(u).mod(i),h=o.multiplyTwo(f,n,c);return!t.isInfinity(h)&&h.affineX.mod(i).equals(s)}(t,u.a.fromBuffer(e),r,n)}(y,t,{r:this.r,s:this.s},e.Q)},t.prototype.toByteBuffer=function(){var t;return t=new ByteBuffer(ByteBuffer.DEFAULT_CAPACITY,ByteBuffer.LITTLE_ENDIAN),this.appendByteBuffer(t),t.copy(0,t.offset)},t.fromHex=function(e){return t.fromBuffer(b.from(e,"hex"))},t.prototype.toHex=function(){return this.toBuffer().toString("hex")},t.signHex=function(e,r){var n;return n=b.from(e,"hex"),t.signBuffer(n,r)},t.prototype.verifyHex=function(t,e){var r;return r=b.from(t,"hex"),this.verifyBuffer(r,e)},t}();e.a=m},function(t,e,r){"use strict";(function(t){var r=void 0,n={address_prefix:t.env.npm_config__graphene_ecc_default_address_prefix||"GPH"};r={core_asset:"CORE",address_prefix:"GPH",expire_in_secs:15,expire_in_secs_proposal:86400,review_in_secs_committee: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,i,o=void 0,s=void 0,a=void 0;for(o=0,e=(i=Object.keys(r.networks)).length;o<e;o++)if(a=i[o],(s=r.networks[a]).chain_id===t)return r.network_name=a,s.address_prefix&&(r.address_prefix=s.address_prefix,n.address_prefix=s.address_prefix),{network_name:a,network:s};r.network_name||console.log("Unknown chain id (this may be a testnet)",t)},reset:function(){r.core_asset="CORE",r.address_prefix="GPH",n.address_prefix="GPH",r.expire_in_secs=15,r.expire_in_secs_proposal=86400,console.log("Chain config reset")},setPrefix:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GPH";r.address_prefix=t,n.address_prefix=t}},e.a=r}).call(this,r(13))},function(t,e,r){"use strict";r.d(e,"a",function(){return s});var n,i=r(69),o=r.n(i);function s(){return n||(n=o()({})),n}},function(t,e,r){"use strict";(function(t){var n=void 0;n="undefined"!=typeof WebSocket||t.env.browser?WebSocket:r(99);var i=5,o=2*i,s=function(){function t(e,r){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,a=this,u=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.url=e,this.statusCb=r,this.connectionTimeout=setTimeout(function(){if(a.current_reject){var t=a.current_reject;a.current_reject=null,a.close(),t(new Error("Connection attempt timed out after "+s/1e3+"s"))}},s),this.current_reject=null,this.on_reconnect=null,this.closed=!1,this.send_life=i,this.recv_life=o,this.keepAliveCb=f,this.connect_promise=new Promise(function(t,r){a.current_reject=r;var s=function(t){return t||"undefined"==typeof WebSocket||"undefined"==typeof document?n:WebSocket}(u);try{a.ws=new s(e)}catch(t){a.ws={readyState:3,close:function(){}},r(new Error("Invalid url",e," closed"))}a.ws.onopen=function(){clearTimeout(a.connectionTimeout),a.statusCb&&a.statusCb("open"),a.on_reconnect&&a.on_reconnect(),a.keepalive_timer=setInterval(function(){if(a.recv_life--,0==a.recv_life)return console.error(a.url+" connection is dead, terminating ws"),void a.close();a.send_life--,0==a.send_life&&(a.keepAliveCb&&a.keepAliveCb(a.closed),a.send_life=i)},5e3),a.current_reject=null,t()},a.ws.onerror=function(t){a.keepalive_timer&&(clearInterval(a.keepalive_timer),a.keepalive_timer=void 0),clearTimeout(a.connectionTimeout),a.statusCb&&a.statusCb("error"),a.current_reject&&a.current_reject(t)},a.ws.onmessage=function(t){a.recv_life=o,a.listener(JSON.parse(t.data))},a.ws.onclose=function(){a.closed=!0,a.keepalive_timer&&(clearInterval(a.keepalive_timer),a.keepalive_timer=void 0);for(var t=new Error("connection closed"),e=a.responseCbId+1;e<=a.cbId;e+=1)a.cbs[e].reject(t);a.statusCb&&a.statusCb("closed"),a._closeCb&&a._closeCb(),a.on_close&&a.on_close()}}),this.cbId=0,this.responseCbId=0,this.cbs={},this.subs={},this.unsub={}}return t.prototype.call=function(t){var e=this;if(1!==this.ws.readyState)return Promise.reject(new Error("websocket state error:"+this.ws.readyState));var r=t[1];if(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 o in this.subs)if(this.subs[o].callback===n){this.unsub[this.cbId]=o;break}}var s={method:"call",params:t};return s.id=this.cbId,this.send_life=i,new Promise(function(t,r){e.cbs[e.cbId]={time:new Date,resolve:t,reject:r},e.ws.send(JSON.stringify(s))})},t.prototype.listener=function(t){var e=!1,r=null;"notice"===t.method&&(e=!0,t.id=t.params[0]),e?r=this.subs[t.id].callback:(r=this.cbs[t.id],this.responseCbId=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)},t.prototype.login=function(t,e){var r=this;return this.connect_promise.then(function(){return r.call([1,"login",[t,e]])})},t.prototype.close=function(){var t=this;return new Promise(function(e){if(clearInterval(t.keepalive_timer),t.keepalive_timer=void 0,t._closeCb=function(){e(),t._closeCb=null},!t.ws)return console.log("Websocket already cleared",t),e();t.ws.terminate?t.ws.terminate():t.ws.close(),3===t.ws.readyState&&e()})},t}();e.a=s}).call(this,r(13))},function(t,e,r){"use strict";(function(t){var n=r(4),i=r.n(n),o=r(3),s=r(12),a=r(10),u=r(5),f=r.n(u),c=r(42),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var l=s.a.object_type,p=s.a.impl_object_type,d=Object(c.a)(),_=parseInt(l.operation_history,10),g="1."+parseInt(l.witness,10)+".",v="1."+parseInt(l.committee_member,10)+".",y="1."+parseInt(l.account,10)+".",b=JSON.parse(t.env.npm_config__graphene_chain_chain_debug||!1),m=Object.keys(l),w=Object.keys(p);function E(t){var e=t.split("."),r=e[0],n=e[1];switch(n=parseInt(n,10),r){case"0":return"unknown";case"1":return m[n];case"2":return w[n];case"5":return"market"}}var S=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.subscribers=new Set,this.subscribed=!1,this.clearCache(),this.chain_time_offset=[],this.dispatchFrequency=40}return t.prototype.clearCache=function(){this.subbed_accounts=new Set,this.subbed_witnesses=new Set,this.subbed_committee=new Set,this.objects_by_id=new Map,this.accounts_by_name=new Map,this.assets_by_symbol=new Map,this.account_ids_by_key=i.a.Map(),this.account_ids_by_account=i.a.Map(),this.balance_objects_by_address=new Map,this.get_account_refs_of_keys_calls=new Set,this.get_account_refs_of_accounts_calls=new Set,this.account_history_requests=new Map,this.witness_by_account_id=new Map,this.workers=new Set,this.committee_by_account_id=new Map,this.objects_by_vote_id=new Map,this.fetching_get_full_accounts=new Map,this.get_full_accounts_subscriptions=new Map,clearTimeout(this.timeout),this.dispatched=!1},t.prototype.resetCache=function(t){return this.subscribed=!1,this.subError=null,this.clearCache(),this.head_block_time_string=null,this.init(t).catch(function(t){throw t})},t.prototype.setDispatchFrequency=function(t){this.dispatchFrequency=t},t.prototype.init=function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=0;return new Promise(function(n,i){return function n(i,s){if(t.subscribed)return i();var a=o.a.instance().db_api();return a?a.exec("get_objects",[["2.1.0"]]).then(function(a){for(var u=0;u<a.length;u++){var f=a[u];if(f){var c=new Date(f.time+"+00:00").getTime();if(t.head_block_time_string=f.time,t.chain_time_offset.push((new Date).getTime()-B(f.time).getTime()),((new Date).getTime()-c)/1e3<60)o.a.instance().db_api().exec("set_subscribe_callback",[t.onUpdate.bind(t),e]).then(function(){console.log("synced and subscribed, chainstore ready"),t.subscribed=!0,t.subError=null,t.notifySubscribers(),i()}).catch(function(e){t.subscribed=!1,t.subError=e,t.notifySubscribers(),s(e),console.log("Error: ",e)});else{if(console.log("not yet synced, retrying in 1s"),t.subscribed=!1,r++,t.notifySubscribers(),r>5)return t.subError=new Error("ChainStore sync error, please check your system clock"),s(t.subError);setTimeout(n.bind(t,i,s),1e3)}}else setTimeout(n.bind(t,i,s),1e3)}}).catch(function(e){console.log("!!! Chain API error",e),t.objects_by_id.delete("2.1.0"),s(e)}):s(new Error("Api not found, please initialize the api instance before calling the ChainStore"))}(n,i)})},t.prototype._subTo=function(t,e){var r="subbed_"+t;this[r].has(e)||this[r].add(e)},t.prototype.unSubFrom=function(t,e){this["subbed_"+t].delete(e),this.objects_by_id.delete(e)},t.prototype._isSubbedTo=function(t,e){return this["subbed_"+t].has(e)},t.prototype.onUpdate=function(t){for(var e=this,r=[],n=[],o=0;o<t.length;++o)for(var s=function(s){var u=t[o][s];if(a.a.is_object_id(u)){var f=e.objects_by_id.get(u);switch(E(u)){case"limit_order":if(r.push(u),f){var c=e.objects_by_id.get(f.get("seller"));if(c&&c.has("orders")){var h=c.get("orders");c.get("orders").has(u)&&(c=c.set("orders",h.delete(u)),e.objects_by_id.set(c.get("id"),c))}}break;case"call_order":if(n.push(u),f){var l=e.objects_by_id.get(f.get("borrower"));if(l&&l.has("call_orders")){var p=l.get("call_orders");l.get("call_orders").has(u)&&(l=l.set("call_orders",p.delete(u)),e.objects_by_id.set(l.get("id"),l))}}break;case"proposal":e.subbed_accounts.forEach(function(t){var r=e.objects_by_id.get(t);if(r){var n=r.get("proposals",i.a.Set());n.includes(u)&&(n=n.delete(u),r=r.set("proposals",n),e.objects_by_id.set(r.get("id"),r))}})}f&&e.objects_by_id.set(u,null)}else e._updateObject(u)},u=0;u<t[o].length;++u)s(u);r.length&&d.emit("cancel-order",r),n.length&&d.emit("close-call",n),this.notifySubscribers()},t.prototype.notifySubscribers=function(){var t=this;this.dispatched||(this.dispatched=!0,this.timeout=setTimeout(function(){t.dispatched=!1,t.subscribers.forEach(function(t){t()})},this.dispatchFrequency))},t.prototype.subscribe=function(t){if(this.subscribers.has(t))return console.error("Subscribe callback already exists",t);this.subscribers.add(t)},t.prototype.unsubscribe=function(t){if(!this.subscribers.has(t))return console.error("Unsubscribe callback does not exists",t);this.subscribers.delete(t)},t.prototype.clearObjectCache=function(t){this.objects_by_id.delete(t)},t.prototype.getObject=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!a.a.is_object_id(t))throw Error("argument is not an object id: "+JSON.stringify(t));var i=this.objects_by_id.get(t),o=t.substring(0,y.length)==y&&!this.get_full_accounts_subscriptions.get(t,!1)&&r;return null!==i||e?void 0===i||e||o?this.fetchObject(t,e,r,n):!0!==i?i:void 0:i},t.prototype.getAsset=function(t){var e=this;if(!t)return null;if(a.a.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(a.a.is_object_id(n)){var i=this.getObject(n);if(i&&i.get("bitasset")&&!i.getIn(["bitasset","current_feed"]))return;return i}if(null===n)return null;!0!==n&&o.a.instance().db_api().exec("lookup_asset_symbols",[[t]]).then(function(r){r.length&&r[0]?e._updateObject(r[0],!0):(e.assets_by_symbol.set(t,null),e.notifySubscribers())}).catch(function(r){console.log("Error: ",r),e.assets_by_symbol.delete(t)})},t.prototype.getAccountRefsOfKey=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.add(t),void o.a.instance().db_api().exec("get_key_references",[[t]]).then(function(r){var n=i.a.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()}).catch(function(r){console.error("get_key_references",r),e.account_ids_by_key=e.account_ids_by_key.delete(t),e.get_account_refs_of_keys_calls.delete(t)}))},t.prototype.getAccountRefsOfAccount=function(t){var e=this;return this.get_account_refs_of_accounts_calls.has(t)?this.account_ids_by_account.get(t):(this.get_account_refs_of_accounts_calls.add(t),void o.a.instance().db_api().exec("get_account_references",[t]).then(function(r){var n=i.a.Set();n=n.withMutations(function(t){for(var e=0;e<r.length;++e)t.add(r[e])}),e.account_ids_by_account=e.account_ids_by_account.set(t,n),e.notifySubscribers()}).catch(function(r){console.error("get_account_references",r),e.account_ids_by_account=e.account_ids_by_account.delete(t),e.get_account_refs_of_accounts_calls.delete(t)}))},t.prototype.getBalanceObjects=function(t){var e=this;return void 0===this.balance_objects_by_address.get(t)&&(this.balance_objects_by_address.set(t,i.a.Set()),o.a.instance().db_api().exec("get_balance_objects",[[t]]).then(function(r){for(var n=new Set,o=0;o<r.length;++o)e._updateObject(r[o]),n.add(r[o].id);e.balance_objects_by_address.set(t,i.a.Set(n)),e.notifySubscribers()},function(){e.balance_objects_by_address.delete(t)})),this.balance_objects_by_address.get(t)},t.prototype.fetchObject=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("string"!=typeof t){for(var s=[],u=0;u<t.length;++u)s.push(this.fetchObject(t[u],e,n));return s}if(b&&console.log("!!! fetchObject: ",t,this.subscribed,!this.subscribed&&!e),this.subscribed||e){if(b&&console.log("maybe fetch object: ",t),!a.a.is_object_id(t))throw Error("argument is not an object id: "+t);if(0===t.search("1.2.")&&!i)return this.fetchFullAccount(t,n);0===t.search(g)&&this._subTo("witnesses",t),0===t.search(v)&&this._subTo("committee",t);var f=this.objects_by_id.get(t);if(void 0===f){if(b&&console.log("fetching object: ",t),this.objects_by_id.set(t,!0),!o.a.instance().db_api())return null;o.a.instance().db_api().exec("get_objects",[[t]]).then(function(e){for(var n=0;n<e.length;n++){var i=e[n];i?r._updateObject(i,!0):(r.objects_by_id.set(t,null),r.notifySubscribers())}}).catch(function(e){console.log("!!! Chain API error",e),r.objects_by_id.delete(t)})}else if(!0===f)return;return f}},t.prototype.getAccount=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)return null;if("object"===(void 0===t?"undefined":h(t)))return t.id?this.getAccount(t.id,e):t.get?this.getAccount(t.get("id"),e):void 0;if(a.a.is_object_id(t)){var r=this.getObject(t,!1,e);return null===r?null:!this.get_full_accounts_subscriptions.get(t,!1)&&e||void 0===r||void 0===r.get("name")?this.fetchFullAccount(t,e):r}if(a.a.is_account_name(t,!0)){var n=this.accounts_by_name.get(t);return null===n?null:void 0===n?this.fetchFullAccount(t,e):this.getObject(n,!1,e)}return null},t.prototype.getAccountName=function(t){var e=this.objects_by_id.get(t);if(!0!==e){if(e)return e.get("name");this.getObject(t,!1,!1,!0)}},t.prototype.getWitnessById=function(t){var e=this.witness_by_account_id.get(t);if(void 0!==e)return e&&this._subTo("witnesses",e),e?this.getObject(e):null;this.fetchWitnessByAccount(t)},t.prototype.getCommitteeMemberById=function(t){var e=this.committee_by_account_id.get(t);if(void 0!==e)return e&&this._subTo("committee",e),e?this.getObject(e):null;this.fetchCommitteeMemberByAccount(t)},t.prototype.fetchAllWorkers=function(){var t=this;return new Promise(function(e,r){o.a.instance().db_api().exec("get_all_workers",[]).then(function(r){r&&r.length?(r.forEach(function(e){t._updateObject(e,!1)}),e(r),t.notifySubscribers()):e([])},r)})},t.prototype.fetchWitnessByAccount=function(t){var e=this;return new Promise(function(r,n){o.a.instance().db_api().exec("get_witness_by_account",[t]).then(function(n){if(n){e._subTo("witnesses",n.id),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)})},t.prototype.fetchCommitteeMemberByAccount=function(t){var e=this;return new Promise(function(r,n){o.a.instance().db_api().exec("get_committee_member_by_account",[t]).then(function(n){if(n){e._subTo("committee",n.id),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)})},t.prototype.fetchFullAccount=function(t){var e=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];b&&console.log("Fetch full account: ",t);var n=this.get_full_accounts_subscriptions.has(t)&&!1===this.get_full_accounts_subscriptions.get(t)&&r,s=a.a.is_object_id(t),u=!s&&a.a.is_account_name(t,!0);if(s&&!n){var f=this.objects_by_id.get(t);if(!(void 0===f)&&f&&f.get("name")&&f.has("balances"))return f}else if(!n){if(!u)throw Error("argument is not an account name: "+t);var c=this.accounts_by_name.get(t);if(a.a.is_object_id(c))return this.getAccount(c,r)}(n||!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()),o.a.instance().db_api().exec("get_full_accounts",[[t],r]).then(function(n){if(0!==n.length){var a=n[0][1];e.get_full_accounts_subscriptions.set(a.account.name,r),e.get_full_accounts_subscriptions.set(a.account.id,r),b&&console.log("full_account: ",a),e._subTo("accounts",a.account.id);var f=a.account,c=a.assets,h=a.vesting_balances,l=a.statistics,p=a.call_orders,d=a.limit_orders,_=a.referrer_name,g=a.registrar_name,v=a.lifetime_referrer_name,y=a.votes,m=a.proposals;e.accounts_by_name.set(f.name,f.id),f.assets=new i.a.List(c||[]),f.referrer_name=_,f.lifetime_referrer_name=v,f.registrar_name=g,f.balances={},f.orders=new i.a.Set,f.vesting_balances=new i.a.Set,f.balances=new i.a.Map,f.call_orders=new i.a.Set,f.proposals=new i.a.Set,f.vesting_balances=f.vesting_balances.withMutations(function(t){h.forEach(function(r){e._updateObject(r),t.add(r.id)})});var w=[];y.forEach(function(t){return e._updateObject(t)}),f.balances=f.balances.withMutations(function(t){a.balances.forEach(function(n){e._updateObject(n),t.set(n.asset_type,n.id),r&&w.push(n.id)})}),f.orders=f.orders.withMutations(function(t){d.forEach(function(n){e._updateObject(n),t.add(n.id),r&&w.push(n.id)})}),f.call_orders=f.call_orders.withMutations(function(t){p.forEach(function(n){e._updateObject(n),t.add(n.id),r&&w.push(n.id)})}),f.proposals=f.proposals.withMutations(function(t){m.forEach(function(n){e._updateObject(n),t.add(n.id),r&&w.push(n.id)})}),w.length&&o.a.instance().db_api().exec("get_objects",[w]),e._updateObject(l);var E=e._updateObject(f);e.fetchRecentHistory(E),e.notifySubscribers()}else s?(e.objects_by_id.set(t,null),e.notifySubscribers()):u&&(e.accounts_by_name.set(t,null),e.notifySubscribers())}).catch(function(r){console.log("Error: ",r),a.a.is_object_id(t)?e.objects_by_id.delete(t):e.accounts_by_name.delete(t)}))},t.prototype.getAccountMemberStatus=function(t){if(void 0!==t)return null===t?"unknown":t.get("lifetime_referrer")==t.get("id")?"lifetime":new Date(t.get("membership_expiration_date")).getTime()<(new Date).getTime()?"basic":"annual"},t.prototype.getAccountBalance=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},t.prototype.fetchRecentHistory=function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=t;if(!a.a.is_object_id(n)&&t.toJS&&(n=t.get("id")),a.a.is_object_id(n)&&(t=this.objects_by_id.get(n))&&!0!==t){var s=this.account_history_requests.get(n);if(s)return s.requests++,s.promise;s={requests:0};var u="1."+_+".0",f=t.get("history");f&&f.size&&(u=f.first().get("id"));var c="1."+_+".0";return s.promise=new Promise(function(t,s){o.a.instance().history_api().exec("get_account_history",[n,u,r,c]).then(function(o){var a=e.objects_by_id.get(n);if(a){var u=a.get("history");u||(u=i.a.List());var f=i.a.fromJS(o);f=f.withMutations(function(t){for(var e=0;e<u.size;++e)t.push(u.get(e))});var c=a.set("history",f);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,s):t(c)}})}),this.account_history_requests.set(n,s),s.promise}},t.prototype._updateObject=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],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&&d.emit("settle-order-update",t));var n=E(t.id);switch(n){case"transaction":case"operation_history":case"block_summary":return;case"account_transaction_history":case"limit_order":case"call_order":case"account_balance":case"account_stats":if(!this._isSubbedTo("accounts",t.account||t.seller||t.borrower||t.owner))return;break;case"witness":if(!this._isSubbedTo("witnesses",t.id))return;break;case"committee_member":if(!this._isSubbedTo("committee",t.id))return;break;case"unknown":case"market":return}"2.1.0"==t.id&&(t.participation=f()(t.recent_slots_filled).bitCount()/128*100,this.head_block_time_string=t.time,this.chain_time_offset.push(Date.now()-B(t.time).getTime()),this.chain_time_offset.length>10&&this.chain_time_offset.shift());var s=this.objects_by_id.get(t.id);s||(s=i.a.Map());var a=s;if(void 0===s||!0===s)this.objects_by_id.set(t.id,s=i.a.fromJS(t));else switch(n){case"account":case"asset":case"asset_bitasset_data":this.objects_by_id.set(t.id,s=s.mergeDeep(i.a.fromJS(t)));break;default:this.objects_by_id.set(t.id,s=i.a.fromJS(t))}switch(n){case"account_balance":var u=this.objects_by_id.get(t.owner);if(void 0===u||null===u||!0===u)return;u.get("balances")||(u=u.set("balances",i.a.Map())),u=u.setIn(["balances",t.asset_type],t.id),this.objects_by_id.set(t.owner,u);break;case"account_statistics":try{a.get("most_recent_op","2.9.0")!=t.most_recent_op&&this.fetchRecentHistory(t.owner)}catch(e){console.log("object:",t,"prior",a,"err:",e)}break;case"witness":if(!this._isSubbedTo("witnesses",t.id))return;this.witness_by_account_id.set(t.witness_account,t.id),this.objects_by_vote_id.set(t.vote_id,t.id);break;case"committee_member":if(!this._isSubbedTo("committee",t.id))return;this.committee_by_account_id.set(t.committee_member_account,t.id),this.objects_by_vote_id.set(t.vote_id,t.id);break;case"worker":this.objects_by_vote_id.set(t.vote_for,t.id),this.objects_by_vote_id.set(t.vote_against,t.id),this.workers.has(t.id)||this.workers.add(t.id);break;case"account":s=(s=(s=(s=(s=(s=(s=s.set("active",i.a.fromJS(t.active))).set("owner",i.a.fromJS(t.owner))).set("options",i.a.fromJS(t.options))).set("whitelisting_accounts",i.a.fromJS(t.whitelisting_accounts))).set("blacklisting_accounts",i.a.fromJS(t.blacklisting_accounts))).set("whitelisted_accounts",i.a.fromJS(t.whitelisted_accounts))).set("blacklisted_accounts",i.a.fromJS(t.blacklisted_accounts)),this.objects_by_id.set(t.id,s),this.accounts_by_name.set(t.name,t.id);break;case"asset":if(this.assets_by_symbol.set(t.symbol,t.id),!s.get("bitasset")&&"bitasset_data_id"in t){var c=this.getObject(t.bitasset_data_id,!0);c||(c=i.a.Map()),c.get("asset_id")||(c=c.set("asset_id",t.id)),this.objects_by_id.set(t.bitasset_data_id,c),s=s.set("bitasset",c),this.objects_by_id.set(t.id,s)}break;case"asset_bitasset_data":var h=s.get("asset_id");if(h){var l=this.getObject(h);l&&(l=l.set("bitasset",s),d.emit("bitasset-update",l),this.objects_by_id.set(h,l))}break;case"call_order":r&&d.emit("call-order-update",t);var p=this.objects_by_id.get(t.borrower);if(p&&!0!==p){p.has("call_orders")||(p=p.set("call_orders",new i.a.Set));var _=p.get("call_orders");_.has(t.id)||(p=p.set("call_orders",_.add(t.id)),this.objects_by_id.set(p.get("id"),p),o.a.instance().db_api().exec("get_objects",[[t.id]]))}break;case"limit_order":var g=this.objects_by_id.get(t.seller);if(g&&!0!==g){g.has("orders")||(g=g.set("orders",new i.a.Set));var v=g.get("orders");v.has(t.id)||(g=g.set("orders",v.add(t.id)),this.objects_by_id.set(g.get("id"),g),o.a.instance().db_api().exec("get_objects",[[t.id]]))}break;case"proposal":e=(e=e||this.addProposalData(t.required_active_approvals,t.id))||this.addProposalData(t.required_owner_approvals,t.id)}return e&&this.notifySubscribers(),s},t.prototype.getObjectsByVoteIds=function(t){for(var e=this,r=[],n=[],i=0;i<t.length;++i){var s=this.objects_by_vote_id.get(t[i]);s?r.push(this.getObject(s)):(r.push(null),n.push(t[i]))}return n.length&&o.a.instance().db_api().exec("lookup_vote_ids",[n]).then(function(t){for(var r=0;r<t.length;++r)if(t[r]){var n=t[r].id.substring(0,g.length)==g;e._subTo(n?"witnesses":"committee",t[r].id),e._updateObject(t[r])}}).catch(function(t){console.log("Error looking up vote ids: ",t)}),r},t.prototype.getObjectByVoteID=function(t){var e=this.objects_by_vote_id.get(t);if(e)return this.getObject(e)},t.prototype.getHeadBlockDate=function(){return B(this.head_block_time_string)},t.prototype.getEstimatedChainTimeOffset=function(){return 0===this.chain_time_offset.length?0:i.a.List(this.chain_time_offset).sort().get(Math.floor((this.chain_time_offset.length-1)/2))},t.prototype.addProposalData=function(t,e){var r=this,n=!1;return t.forEach(function(t){var o=r.objects_by_id.get(t);if(o&&!0!==o){n=!0;var s=o.get("proposals",i.a.Set());s.includes(e)||(s=s.add(e),o=o.set("proposals",s),r.objects_by_id.set(o.get("id"),o))}}),n},t}());function B(t){return t?(/Z$/.test(t)||(t+="Z"),new Date(t)):new Date("1970-01-01T00:00:00.000Z")}S.FetchChainObjects=function(t,e,r,n){var i=t.bind(S);return new Promise(function(o,s){var a=null;function u(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=e.map(function(e){return"getAccount"===t.name?i(e,n[e]):"getObject"===t.name?i(e,!1,n[e]):i(e)});return-1===s.findIndex(function(t){return void 0===t})&&(a&&clearTimeout(a),r||S.unsubscribe(u),o(s),!0)}var f=u(!0);f||S.subscribe(u),r&&!f&&(a=setTimeout(function(){S.unsubscribe(u),s(t.name+" request timed out after "+r+"ms with object ids: "+JSON.stringify(e))},r))})},S.FetchChain=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=S[t];if(!o)throw new Error("ChainStore does not have method "+t);var s=Array.isArray(e);return s||(e=[e]),S.FetchChainObjects(o,i.a.List(e),r,n).then(function(t){return s?t:t.get(0)})},e.a=S}).call(this,r(13))},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!function(t){return"number"==typeof t}(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,s,a,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(o(r=this._events[t]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(i(r))for(a=Array.prototype.slice.call(arguments,1),s=(f=r.slice()).length,u=0;u<s;u++)f[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var s;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?i(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,i(this._events[t])&&!this._events[t].warned&&(s=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!n(e))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,o,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(r=this._events[t]).length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(e=t.exports=r(59)).Stream=e,e.Readable=e,e.Writable=r(47),e.Duplex=r(24),e.Transform=r(62),e.PassThrough=r(88)},function(t,e,r){"use strict";(function(e,n,i){var o=r(38);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;y.WritableState=v;var f=r(35);f.inherits=r(9);var c={deprecate:r(87)},h=r(60),l=r(6).Buffer,p=i.Uint8Array||function(){};var d,_=r(61);function g(){}function v(t,e){a=a||r(24),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,f=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(B,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),B(t,e))}(t,r,n,e,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?u(m,t,r,s,i):m(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(t){if(a=a||r(24),!(d.call(y,this)||this instanceof a))return new y(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function b(t,e,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 m(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),B(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,h=r.callback;if(b(t,e,!1,e.objectMode?1:f.length,f,c,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),B(t,e)})}function B(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}f.inherits(y,h),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===y&&(t&&t._writableState instanceof v)}})):d=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&function(t){return l.isBuffer(t)||t instanceof p}(t);return s&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=g),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,a,n,i,o);return u}(this,n,s,t,e,r)),i},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,B(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=_.destroy,y.prototype._undestroy=_.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(13),r(85).setImmediate,r(16))},function(t,e,r){"use strict";var n=r(6).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=h,e=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function f(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){var n=r(6).Buffer,i=r(58).Transform,o=r(48).StringDecoder;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(9)(s,i),s.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},function(t,e,r){"use strict";var n=r(114)();t.exports=function(t){return t!==n&&null!==t}},function(t,e,r){t.exports=function(t){return function(){var e=t,r=e.lib.WordArray;e.enc.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)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<r;a++)i.push(n.charAt(s>>>6*(3-a)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var e=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);-1!==a&&(e=a)}return function(t,e,n){for(var i=[],o=0,s=0;s<e;s++)if(s%4){var a=n[t.charCodeAt(s-1)]<<s%4*2,u=n[t.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return r.create(i,o)}(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64}(r(22))},function(t,e,r){t.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,n=e.algo,i=[],o=[],s=[],a=[],u=[],f=[],c=[],h=[],l=[],p=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,n=0;for(e=0;e<256;e++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,o[d]=r;var _=t[r],g=t[_],v=t[g],y=257*t[d]^16843008*d;s[r]=y<<24|y>>>8,a[r]=y<<16|y>>>16,u[r]=y<<8|y>>>24,f[r]=y,y=16843009*v^65537*g^257*_^16843008*r,c[d]=y<<24|y>>>8,h[d]=y<<16|y>>>16,l[d]=y<<8|y>>>24,p[d]=y,r?(r=_^t[t[t[v^_]]],n^=t[t[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],_=n.AES=r.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=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],s=0;s<n;s++)if(s<r)o[s]=e[s];else{var a=o[s-1];s%r?r>6&&s%r==4&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=d[s/r|0]<<24),o[s]=o[s-r]^a}for(var u=this._invKeySchedule=[],f=0;f<n;f++)s=n-f,a=f%4?o[s]:o[s-4],u[f]=f<4||s<=4?a:c[i[a>>>24]]^h[i[a>>>16&255]]^l[i[a>>>8&255]]^p[i[255&a]]}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,a,u,f,i)},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,c,h,l,p,o),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 u=this._nRounds,f=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<u;d++){var _=n[f>>>24]^i[c>>>16&255]^o[h>>>8&255]^s[255&l]^r[p++],g=n[c>>>24]^i[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[p++],v=n[h>>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&c]^r[p++],y=n[l>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&h]^r[p++];f=_,c=g,h=v,l=y}_=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^r[p++],g=(a[c>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^r[p++],v=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^r[p++],y=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&h])^r[p++],t[e]=_,t[e+1]=g,t[e+2]=v,t[e+3]=y},keySize:8});e.AES=r._createHelper(_)}(),t.AES}(r(22),r(51),r(102),r(67),r(105))},function(t,e,r){function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}var i=n.prototype;i.__bigi=r(74).version,n.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===i.__bigi)},n.prototype.am=function(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},n.prototype.DB=26,n.prototype.DM=67108863;var o=n.prototype.DV=1<<26;n.prototype.FV=Math.pow(2,52),n.prototype.F1=26,n.prototype.F2=0;var s,a,u="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array;for(s="0".charCodeAt(0),a=0;a<=9;++a)f[s++]=a;for(s="a".charCodeAt(0),a=10;a<36;++a)f[s++]=a;for(s="A".charCodeAt(0),a=10;a<36;++a)f[s++]=a;function c(t){return u.charAt(t)}function h(t,e){var r=f[t.charCodeAt(e)];return null==r?-1:r}function l(t){var e=new n;return e.fromInt(t),e}function p(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 d(t){this.m=t}function _(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 g(t,e){return t&e}function v(t,e){return t|e}function y(t,e){return t^e}function b(t,e){return t&~e}function m(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 w(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function E(){}function S(t){return t}function B(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}d.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},d.prototype.revert=function(t){return t},d.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},d.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},_.prototype.convert=function(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},_.prototype.revert=function(t){var e=new n;return t.copyTo(e),this.reduce(e),e},_.prototype.reduce=function(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(t[r=e+this.m.t]+=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)},_.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},_.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},i.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},i.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+o:this.t=0},i.fromString=function(t,e){var r;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 this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,s=0;--i>=0;){var a=8==r?255&t[i]:h(t,i);a<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&n.ZERO.subTo(this,this)},i.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},i.dlShiftTo=function(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},i.drShiftTo=function(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},i.lShiftTo=function(t,e){var r,n=t%this.DB,i=this.DB-n,o=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<<n;for(r=s-1;r>=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},i.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<<n)-1;e[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)e[s-r-1]|=(this[s]&o)<<i,e[s-r]=this[s]>>n;n>0&&(e[this.t-r-1]|=(this.s&o)<<i),e.t=this.t-r,e.clamp()}},i.subTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},i.multiplyTo=function(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)},i.squareTo=function(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()},i.divRemTo=function(t,e,r){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=new n);var s=new n,a=this.s,u=t.s,f=this.DB-p(i[i.t-1]);f>0?(i.lShiftTo(f,s),o.lShiftTo(f,r)):(i.copyTo(s),o.copyTo(r));var c=s.t,h=s[c-1];if(0!=h){var l=h*(1<<this.F1)+(c>1?s[c-2]>>this.F2:0),d=this.FV/l,_=(1<<this.F1)/l,g=1<<this.F2,v=r.t,y=v-c,b=null==e?new n:e;for(s.dlShiftTo(y,b),r.compareTo(b)>=0&&(r[r.t++]=1,r.subTo(b,r)),n.ONE.dlShiftTo(c,b),b.subTo(s,s);s.t<c;)s[s.t++]=0;for(;--y>=0;){var m=r[--v]==h?this.DM:Math.floor(r[v]*d+(r[v-1]+g)*_);if((r[v]+=s.am(0,m,r,y,0,c))<m)for(s.dlShiftTo(y,b),r.subTo(b,r);r[v]<--m;)r.subTo(b,r)}null!=e&&(r.drShiftTo(c,e),a!=u&&n.ZERO.subTo(e,e)),r.t=c,r.clamp(),f>0&&r.rShiftTo(f,r),a<0&&n.ZERO.subTo(r,r)}}},i.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},i.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},i.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),s=p(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)},i.toString=function(t){var e;if(this.s<0)return"-"+this.negate().toString(t);if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(i=!0,o=c(r));s>=0;)a<e?(r=(this[s]&(1<<a)-1)<<e-a,r|=this[--s]>>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=c(r));return i?o:"0"},i.negate=function(){var t=new n;return n.ZERO.subTo(this,t),t},i.abs=function(){return this.s<0?this.negate():this},i.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},i.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},i.byteLength=function(){return this.bitLength()>>3},i.mod=function(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},i.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new d(e):new _(e),this.exp(t,r)},E.prototype.convert=S,E.prototype.revert=S,E.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},E.prototype.sqrTo=function(t,e){t.squareTo(e)},B.prototype.convert=function(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},B.prototype.revert=function(t){return t},B.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},B.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},B.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var T=[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],k=(1<<26)/T[T.length-1];i.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},i.toRadix=function(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=l(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},i.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),o=!1,s=0,a=0,u=0;u<t.length;++u){var f=h(t,u);f<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(a=e*a+f,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&n.ZERO.subTo(this,this)},i.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},i.bitwiseTo=function(t,e,r){var n,i,o=Math.min(t.t,this.t);for(n=0;n<o;++n)r[n]=e(this[n],t[n]);if(t.t<this.t){for(i=t.s&this.DM,n=o;n<this.t;++n)r[n]=e(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},i.changeBit=function(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},i.addTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},i.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},i.dAddOffset=function(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]}},i.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},i.multiplyUpperTo=function(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)},i.modInt=function(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},i.millerRabin=function(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.length&&(t=T.length);for(var o=new n(null),s=[],a=0;a<t;++a){for(;f=T[Math.floor(Math.random()*T.length)],-1!=s.indexOf(f););s.push(f),o.fromInt(f);var u=o.modPow(i,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var f=1;f++<r&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},i.clone=function(){var t=new n;return this.copyTo(t),t},i.intValue=function(){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]},i.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},i.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},i.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},i.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n<this.DB&&(r=this[t]>>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<<this.DB-n);t>=0;)n<8?(r=(this[t]&(1<<n)-1)<<8-n,r|=this[--t]>>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0===i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},i.equals=function(t){return 0==this.compareTo(t)},i.min=function(t){return this.compareTo(t)<0?this:t},i.max=function(t){return this.compareTo(t)>0?this:t},i.and=function(t){var e=new n;return this.bitwiseTo(t,g,e),e},i.or=function(t){var e=new n;return this.bitwiseTo(t,v,e),e},i.xor=function(t){var e=new n;return this.bitwiseTo(t,y,e),e},i.andNot=function(t){var e=new n;return this.bitwiseTo(t,b,e),e},i.not=function(){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},i.shiftLeft=function(t){var e=new n;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},i.shiftRight=function(t){var e=new n;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},i.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+m(this[t]);return this.s<0?this.t*this.DB:-1},i.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=w(this[r]^e);return t},i.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},i.setBit=function(t){return this.changeBit(t,v)},i.clearBit=function(t){return this.changeBit(t,b)},i.flipBit=function(t){return this.changeBit(t,y)},i.add=function(t){var e=new n;return this.addTo(t,e),e},i.subtract=function(t){var e=new n;return this.subTo(t,e),e},i.multiply=function(t){var e=new n;return this.multiplyTo(t,e),e},i.divide=function(t){var e=new n;return this.divRemTo(t,e,null),e},i.remainder=function(t){var e=new n;return this.divRemTo(t,null,e),e},i.divideAndRemainder=function(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)},i.modPow=function(t,e){var r,i,o=t.bitLength(),s=l(1);if(o<=0)return s;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new d(e):e.isEven()?new B(e):new _(e);var a=new Array,u=3,f=r-1,c=(1<<r)-1;if(a[1]=i.convert(this),r>1){var h=new n;for(i.sqrTo(a[1],h);u<=c;)a[u]=new n,i.mulTo(h,a[u-2],a[u]),u+=2}var g,v,y=t.t-1,b=!0,m=new n;for(o=p(t[y])-1;y>=0;){for(o>=f?g=t[y]>>o-f&c:(g=(t[y]&(1<<o+1)-1)<<f-o,y>0&&(g|=t[y-1]>>this.DB+o-f)),u=r;0==(1&g);)g>>=1,--u;if((o-=u)<0&&(o+=this.DB,--y),b)a[g].copyTo(s),b=!1;else{for(;u>1;)i.sqrTo(s,m),i.sqrTo(m,s),u-=2;u>0?i.sqrTo(s,m):(v=s,s=m,m=v),i.mulTo(m,a[g],s)}for(;y>=0&&0==(t[y]&1<<o);)i.sqrTo(s,m),v=s,s=m,m=v,--o<0&&(o=this.DB-1,--y)}return i.revert(s)},i.modInverse=function(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=l(1),s=l(0),a=l(0),u=l(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()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),e&&a.subTo(o,a),u.subTo(s,u))}if(0!=i.compareTo(n.ONE))return n.ZERO;for(;u.compareTo(t)>=0;)u.subTo(t,u);for(;u.signum()<0;)u.addTo(t,u);return u},i.pow=function(t){return this.exp(t,new E)},i.gcd=function(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},i.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=T[T.length-1]){for(e=0;e<T.length;++e)if(r[0]==T[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<T.length;){for(var n=T[e],i=e+1;i<T.length&&n<k;)n*=T[i++];for(n=r.modInt(n);e<i;)if(n%T[e++]==0)return!1}return r.millerRabin(t)},i.square=function(){var t=new n;return this.squareTo(t),t},n.ZERO=l(0),n.ONE=l(1),n.valueOf=l,t.exports=n},function(t,e,r){var n=r(2),i=r(6).Buffer,o=r(5),s=o.valueOf(3);function a(t,e,r,i){n.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(a.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(a.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(a.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),a.fromAffine=function(t,e,r){return new a(t,e,r,o.ONE)},a.prototype.equals=function(t){return t===this||(this.curve.isInfinity(this)?this.curve.isInfinity(t):this.curve.isInfinity(t)?this.curve.isInfinity(this):0===t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p).signum()&&0===t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p).signum())},a.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new a(this.curve,this.x,t,this.z)},a.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,n=t.x,i=t.y.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),o=n.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===o.signum())return 0===i.signum()?this.twice():this.curve.infinity;var u=o.square(),f=u.multiply(o),c=e.multiply(u),h=i.square().multiply(this.z),l=h.subtract(c.shiftLeft(1)).multiply(t.z).subtract(f).multiply(o).mod(this.curve.p),p=c.multiply(s).multiply(i).subtract(r.multiply(f)).subtract(h.multiply(i)).multiply(t.z).add(i.multiply(f)).mod(this.curve.p),d=f.multiply(this.z).multiply(t.z).mod(this.curve.p);return new a(this.curve,l,p,d)},a.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),n=r.multiply(e).mod(this.curve.p),i=this.curve.a,o=t.square().multiply(s);0!==i.signum()&&(o=o.add(this.z.square().multiply(i)));var u=(o=o.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),f=o.multiply(s).multiply(t).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(o.pow(3)).mod(this.curve.p),c=r.pow(3).shiftLeft(3).mod(this.curve.p);return new a(this.curve,u,f,c)},a.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),u=e.testBit(o);i=i.twice(),a!==u&&(i=i.add(a?this:n))}return i},a.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},a.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return i.alloc(1,0);var e,r=this.affineX,n=this.affineY,o=this.curve.pLength;return t?(e=i.allocUnsafe(1+o)).writeUInt8(n.isEven()?2:3,0):((e=i.allocUnsafe(1+o+o)).writeUInt8(4,0),n.toBuffer(o).copy(e,1+o)),r.toBuffer(o).copy(e,1),e},a.decodeFrom=function(t,e){var r,i=e.readUInt8(0),s=4!==i,u=Math.floor((t.p.bitLength()+7)/8),f=o.fromBuffer(e.slice(1,1+u));if(s){n.equal(e.length,u+1,"Invalid sequence length"),n(2===i||3===i,"Invalid sequence tag");var c=3===i;r=t.pointFromX(c,f)}else{n.equal(e.length,1+u+u,"Invalid sequence length");var h=o.fromBuffer(e.slice(1+u));r=a.fromAffine(t,f,h)}return r.compressed=s,r},a.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=a},function(t,e,r){var n=r(2),i=r(5),o=r(54);function s(t,e,r,n,s,a,u){this.p=t,this.a=e,this.b=r,this.G=o.fromAffine(this,n,s),this.n=a,this.h=u,this.infinity=new o(this,null,null,i.ZERO),this.pOverFour=t.add(i.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}s.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!t&&(n=this.p.subtract(n)),o.fromAffine(this,e,n)},s.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},s.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)},s.prototype.validate=function(t){n(!this.isInfinity(t),"Point is at infinity"),n(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return n(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=s},function(t,e,r){"use strict";(function(e){var n=r(9),i=r(57),o=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function a(t,e){return t<<e|t>>>32-e}function u(t,e,r,n,i,o,s){return a(t+(e&r|~e&n)+i+o|0,s)+e|0}function f(t,e,r,n,i,o,s){return a(t+(e&n|r&~n)+i+o|0,s)+e|0}function c(t,e,r,n,i,o,s){return a(t+(e^r^n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return a(t+(r^(e|~n))+i+o|0,s)+e|0}n(s,i),s.prototype._update=function(){for(var t=o,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,s=this._d;n=h(n=h(n=h(n=h(n=c(n=c(n=c(n=c(n=f(n=f(n=f(n=f(n=u(n=u(n=u(n=u(n,i=u(i,s=u(s,r=u(r,n,i,s,t[0],3614090360,7),n,i,t[1],3905402710,12),r,n,t[2],606105819,17),s,r,t[3],3250441966,22),i=u(i,s=u(s,r=u(r,n,i,s,t[4],4118548399,7),n,i,t[5],1200080426,12),r,n,t[6],2821735955,17),s,r,t[7],4249261313,22),i=u(i,s=u(s,r=u(r,n,i,s,t[8],1770035416,7),n,i,t[9],2336552879,12),r,n,t[10],4294925233,17),s,r,t[11],2304563134,22),i=u(i,s=u(s,r=u(r,n,i,s,t[12],1804603682,7),n,i,t[13],4254626195,12),r,n,t[14],2792965006,17),s,r,t[15],1236535329,22),i=f(i,s=f(s,r=f(r,n,i,s,t[1],4129170786,5),n,i,t[6],3225465664,9),r,n,t[11],643717713,14),s,r,t[0],3921069994,20),i=f(i,s=f(s,r=f(r,n,i,s,t[5],3593408605,5),n,i,t[10],38016083,9),r,n,t[15],3634488961,14),s,r,t[4],3889429448,20),i=f(i,s=f(s,r=f(r,n,i,s,t[9],568446438,5),n,i,t[14],3275163606,9),r,n,t[3],4107603335,14),s,r,t[8],1163531501,20),i=f(i,s=f(s,r=f(r,n,i,s,t[13],2850285829,5),n,i,t[2],4243563512,9),r,n,t[7],1735328473,14),s,r,t[12],2368359562,20),i=c(i,s=c(s,r=c(r,n,i,s,t[5],4294588738,4),n,i,t[8],2272392833,11),r,n,t[11],1839030562,16),s,r,t[14],4259657740,23),i=c(i,s=c(s,r=c(r,n,i,s,t[1],2763975236,4),n,i,t[4],1272893353,11),r,n,t[7],4139469664,16),s,r,t[10],3200236656,23),i=c(i,s=c(s,r=c(r,n,i,s,t[13],681279174,4),n,i,t[0],3936430074,11),r,n,t[3],3572445317,16),s,r,t[6],76029189,23),i=c(i,s=c(s,r=c(r,n,i,s,t[9],3654602809,4),n,i,t[12],3873151461,11),r,n,t[15],530742520,16),s,r,t[2],3299628645,23),i=h(i,s=h(s,r=h(r,n,i,s,t[0],4096336452,6),n,i,t[7],1126891415,10),r,n,t[14],2878612391,15),s,r,t[5],4237533241,21),i=h(i,s=h(s,r=h(r,n,i,s,t[12],1700485571,6),n,i,t[3],2399980690,10),r,n,t[10],4293915773,15),s,r,t[1],2240044497,21),i=h(i,s=h(s,r=h(r,n,i,s,t[8],1873313359,6),n,i,t[15],4264355552,10),r,n,t[6],2734768916,15),s,r,t[13],1309151649,21),i=h(i,s=h(s,r=h(r,n,i,s,t[4],4149444226,6),n,i,t[11],3174756917,10),r,n,t[2],718787259,15),s,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+s|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s}).call(this,r(23).Buffer)},function(t,e,r){"use strict";var n=r(6).Buffer,i=r(58).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(9)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){t.exports=i;var n=r(45).EventEmitter;function i(){n.call(this)}r(9)(i,n),i.Readable=r(46),i.Writable=r(89),i.Duplex=r(90),i.Transform=r(91),i.PassThrough=r(92),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",f),t.on("error",f),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},function(t,e,r){"use strict";(function(e,n){var i=r(38);t.exports=b;var o,s=r(81);b.ReadableState=y;r(45).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(60),f=r(6).Buffer,c=e.Uint8Array||function(){};var h=r(35);h.inherits=r(9);var l=r(82),p=void 0;p=l&&l.debuglog?l.debuglog("stream"):function(){};var d,_=r(83),g=r(61);h.inherits(b,u);var v=["error","close","destroy","pause","resume"];function y(t,e){o=o||r(24),t=t||{};var n=e instanceof o;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new _,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=r(48).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||r(24),!(this instanceof b))return new b(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function m(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,B(t)}(t,s)):(i||(o=function(t,e){var r;(function(t){return f.isBuffer(t)||t instanceof c})(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===f.prototype||(e=function(t){return f.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):k(t,s)):w(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function w(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&B(t)),k(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=f.from(t,e),e=""),r=!0),m(this,t,e,!1,r)},b.prototype.unshift=function(t){return m(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return d||(d=r(48).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var E=8388608;function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function B(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(T,t):T(t))}function T(t){p("emit readable"),t.emit("readable"),j(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(x,t,e))}function x(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function I(t){p("readable nexttick read 0"),t.read(0)}function O(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),j(t),e.flowing&&!e.reading&&t.read(0)}function j(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function A(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=f.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function L(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(M,e,t))}function M(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function D(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}b.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):B(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&L(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(r,e))),null===(n=t>0?A(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&L(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:b;function f(e,n){p("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),t.removeListener("close",v),t.removeListener("finish",y),t.removeListener("drain",h),t.removeListener("error",g),t.removeListener("unpipe",f),r.removeListener("end",c),r.removeListener("end",b),r.removeListener("data",_),l=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function c(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",f);var h=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,j(t))}}(r);t.on("drain",h);var l=!1;var d=!1;function _(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==D(o.pipes,t))&&!l&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function g(e){p("onerror",e),b(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",y),b()}function y(){p("onfinish"),t.removeListener("close",v),b()}function b(){p("unpipe"),r.unpipe(t)}return r.on("data",_),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",v),t.once("finish",y),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var s=D(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},b.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&B(this):i.nextTick(I,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(O,t,e))}(this,t)),this},b.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(p("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<v.length;o++)t.on(v[o],this.emit.bind(this,v[o]));return this._read=function(e){p("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=A}).call(this,r(16),r(13))},function(t,e,r){t.exports=r(45).EventEmitter},function(t,e,r){"use strict";var n=r(38);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";t.exports=o;var n=r(24),i=r(35);function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){a(t,e,r)}):a(this,null,null)}function a(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(9),i.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},function(t,e,r){"use strict";var n=r(23).Buffer,i=r(9),o=r(57),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(t,e){return t<<e|t>>>32-e}function _(t,e,r,n,i,o,s,a){return d(t+(e^r^n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return d(t+(e&r|~e&n)+o+s|0,a)+i|0}function v(t,e,r,n,i,o,s,a){return d(t+((e|~r)^n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return d(t+(e&n|r&~n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return d(t+(e^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,m=0|this._a,w=0|this._b,E=0|this._c,S=0|this._d,B=0|this._e,T=0;T<80;T+=1){var k,x;T<16?(k=_(r,n,i,o,p,t[a[T]],h[0],f[T]),x=b(m,w,E,S,B,t[u[T]],l[0],c[T])):T<32?(k=g(r,n,i,o,p,t[a[T]],h[1],f[T]),x=y(m,w,E,S,B,t[u[T]],l[1],c[T])):T<48?(k=v(r,n,i,o,p,t[a[T]],h[2],f[T]),x=v(m,w,E,S,B,t[u[T]],l[2],c[T])):T<64?(k=y(r,n,i,o,p,t[a[T]],h[3],f[T]),x=g(m,w,E,S,B,t[u[T]],l[3],c[T])):(k=b(r,n,i,o,p,t[a[T]],h[4],f[T]),x=_(m,w,E,S,B,t[u[T]],l[4],c[T])),r=p,p=o,o=d(i,10),i=n,n=k,m=B,B=S,S=d(E,10),E=w,w=x}var I=this._b+i+S|0;this._b=this._c+o+B|0,this._c=this._d+p+m|0,this._d=this._e+r+w|0,this._e=this._a+n+E|0,this._a=I},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=p},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(93),e.sha1=r(94),e.sha224=r(95),e.sha256=r(65),e.sha384=r(96),e.sha512=r(66)},function(t,e,r){var n=r(9),i=r(27),o=r(6).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function p(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function d(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=0|this._f,_=0|this._g,g=0|this._h,v=0;v<16;++v)e[v]=t.readInt32BE(4*v);for(;v<64;++v)e[v]=d(e[v-2])+e[v-7]+p(e[v-15])+e[v-16]|0;for(var y=0;y<64;++y){var b=g+l(a)+f(a,u,_)+s[y]+e[y]|0,m=h(r)+c(r,n,i)|0;g=_,_=u,u=a,a=o+b|0,o=i,i=n,n=r,r=b+m|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=u+this._f|0,this._g=_+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var n=r(9),i=r(27),o=r(6).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function f(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function _(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function v(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,y=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,T=0|this._fl,k=0|this._gl,x=0|this._hl,I=0;I<32;I+=2)e[I]=t.readInt32BE(4*I),e[I+1]=t.readInt32BE(4*I+4);for(;I<160;I+=2){var O=e[I-30],j=e[I-30+1],A=p(O,j),L=d(j,O),M=_(O=e[I-4],j=e[I-4+1]),D=g(j,O),R=e[I-14],z=e[I-14+1],q=e[I-32],U=e[I-32+1],C=L+z|0,P=A+R+v(C,L)|0;P=(P=P+M+v(C=C+D|0,D)|0)+q+v(C=C+U|0,U)|0,e[I]=P,e[I+1]=C}for(var N=0;N<160;N+=2){P=e[N],C=e[N+1];var F=c(r,n,i),H=c(m,w,E),V=h(r,m),K=h(m,r),W=l(a,B),Y=l(B,a),Z=s[N],J=s[N+1],G=f(a,u,y),X=f(B,T,k),$=x+Y|0,Q=b+W+v($,x)|0;Q=(Q=(Q=Q+G+v($=$+X|0,X)|0)+Z+v($=$+J|0,J)|0)+P+v($=$+C|0,C)|0;var tt=K+H|0,et=V+F+v(tt,K)|0;b=y,x=k,y=u,k=T,u=a,T=B,a=o+Q+v(B=S+$|0,S)|0,o=i,S=E,i=n,E=w,n=r,w=m,r=Q+et+v(m=$+tt|0,$)|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+T|0,this._gl=this._gl+k|0,this._hl=this._hl+x|0,this._ah=this._ah+r+v(this._al,m)|0,this._bh=this._bh+n+v(this._bl,w)|0,this._ch=this._ch+i+v(this._cl,E)|0,this._dh=this._dh+o+v(this._dl,S)|0,this._eh=this._eh+a+v(this._el,B)|0,this._fh=this._fh+u+v(this._fl,T)|0,this._gh=this._gh+y+v(this._gl,k)|0,this._hh=this._hh+b+v(this._hl,x)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){t.exports=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,u=r.iterations;s.length<a;){f&&n.update(f);var f=n.update(t).finalize(e);n.reset();for(var c=1;c<u;c++)f=n.finalize(f),n.reset();o.concat(f)}return o.sigBytes=4*a,o}});e.EvpKDF=function(t,e,r){return a.create(r).compute(t,e)}}(),t.EvpKDF}(r(22),r(103),r(104))},function(t,e,r){"use strict";var n=r(9),i=r(97),o=r(49),s=r(6).Buffer,a=r(98),u=r(63),f=r(64),c=s.alloc(128);function h(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:f(t)).update(e).digest():e.length<r&&(e=s.concat([e,c],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new u:f(t),this._hash.update(n)}n(h,o),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:f(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new h("rmd160",e):"md5"===t?new i(a,e):new h(t,e)}},function(t,e,r){"use strict";var n,i,o,s,a,u,f,c=r(107),h=r(121),l=Function.prototype.apply,p=Function.prototype.call,d=Object.create,_=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};a={on:n=function(t,e){var r;return h(e),v.call(this,"__ee__")?r=this.__ee__:(r=y.value=d(null),_(this,"__ee__",y),y.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},once: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},off:o=function(t,e){var r,n,i,o;if(h(e),!v.call(this,"__ee__"))return this;if(!(r=this.__ee__)[t])return this;if("object"==typeof(n=r[t]))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},emit:s=function(t){var e,r,n,i,o;if(v.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)}}},u={on:c(n),once:c(i),off:c(o),emit:c(s)},f=g({},u),t.exports=e=function(t){return null==t?d(f):g(Object(t),u)},e.methods=a},function(t,e,r){var n,i,o;
/**
* @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
*/i=[],void 0===(o="function"==typeof(n=function(){"use strict";function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var r={},n={};function i(t,e){var i,o,a;return e?(a=0<=(t>>>=0)&&t<256)&&(o=n[t])?o:(i=s(t,(0|t)<0?-1:0,!0),a&&(n[t]=i),i):(a=-128<=(t|=0)&&t<128)&&(o=r[t])?o:(i=s(t,t<0?-1:0,!1),a&&(r[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?_:d;if(e){if(t<0)return _;if(t>=h)return m}else{if(t<=-l)return w;if(t+1>=l)return b}return t<0?o(-t,e).neg():s(t%c|0,t/c|0,e)}function s(e,r,n){return new t(e,r,n)}t.fromInt=i,t.fromNumber=o,t.fromBits=s;var a=Math.pow;function u(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return d;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return u(t.substring(1),e,r).neg();for(var i=o(a(r,8)),s=d,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=o(a(r,c));s=s.mul(l).add(o(h))}else s=(s=s.mul(i)).add(o(h))}return s.unsigned=e,s}function f(e){return e instanceof t?e:"number"==typeof e?o(e):"string"==typeof e?u(e):s(e.low,e.high,e.unsigned)}t.fromString=u,t.fromValue=f;var c=4294967296,h=c*c,l=h/2,p=i(1<<24),d=i(0);t.ZERO=d;var _=i(0,!0);t.UZERO=_;var g=i(1);t.ONE=g;var v=i(1,!0);t.UONE=v;var y=i(-1);t.NEG_ONE=y;var b=s(-1,2147483647,!1);t.MAX_VALUE=b;var m=s(-1,-1,!0);t.MAX_UNSIGNED_VALUE=m;var w=s(0,-2147483648,!1);t.MIN_VALUE=w;var E=t.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var e=o(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(a(t,6),this.unsigned),s=this,u="";;){var f=s.div(i),c=(s.sub(f.mul(i)).toInt()>>>0).toString(t);if((s=f).isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?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},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1==(1&this.low)},E.isEven=function(){return 0==(1&this.low)},E.equals=function(t){return e(t)||(t=f(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(t){if(e(t)||(t=f(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},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(g)},E.neg=E.negate,E.add=function(t){e(t)||(t=f(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,h=0,l=0,p=0,d=0;return p+=(d+=o+(65535&t.low))>>>16,l+=(p+=i+c)>>>16,h+=(l+=n+u)>>>16,h+=r+a,s((p&=65535)<<16|(d&=65535),(h&=65535)<<16|(l&=65535),this.unsigned)},E.subtract=function(t){return e(t)||(t=f(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return d;if(e(t)||(t=f(t)),t.isZero())return d;if(this.eq(w))return t.isOdd()?w:d;if(t.eq(w))return this.isOdd()?w:d;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(p)&&t.lt(p))return o(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,a=65535&this.low,u=t.high>>>16,c=65535&t.high,h=t.low>>>16,l=65535&t.low,_=0,g=0,v=0,y=0;return v+=(y+=a*l)>>>16,g+=(v+=i*l)>>>16,v&=65535,g+=(v+=a*h)>>>16,_+=(g+=n*l)>>>16,g&=65535,_+=(g+=i*h)>>>16,g&=65535,_+=(g+=a*c)>>>16,_+=r*l+n*h+i*c+a*u,s((v&=65535)<<16|(y&=65535),(_&=65535)<<16|(g&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(e(t)||(t=f(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?_:d;var r,n,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return _;if(t.gt(this.shru(1)))return v;i=_}else{if(this.eq(w))return t.eq(g)||t.eq(y)?w:t.eq(w)?g:(r=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?g:y:(n=this.sub(t.mul(r)),i=r.add(n.div(t)));if(t.eq(w))return this.unsigned?_:d;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();i=d}for(n=this;n.gte(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),u=s<=48?1:a(2,s-48),c=o(r),h=c.mul(t);h.isNegative()||h.gt(n);)h=(c=o(r-=u,this.unsigned)).mul(t);c.isZero()&&(c=g),i=i.add(c),n=n.sub(h)}return i},E.div=E.divide,E.modulo=function(t){return e(t)||(t=f(t)),this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.not=function(){return s(~this.low,~this.high,this.unsigned)},E.and=function(t){return e(t)||(t=f(t)),s(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return e(t)||(t=f(t)),s(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return e(t)||(t=f(t)),s(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):s(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):s(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;return t<32?s(this.low>>>t|r<<32-t,r>>>t,this.unsigned):s(32===t?r:r>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?s(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:s(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.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]},E.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})?n.apply(e,i):n)||(t.exports=o)},function(t,e,r){"use strict";e.byteLength=function(t){return 3*t.length/4-f(t)},e.toByteArray=function(t){var e,r,n,s,a,u,c=t.length;a=f(t),u=new o(3*c/4-a),n=a>0?c-4:c;var h=0;for(e=0,r=0;e<n;e+=4,r+=3)s=i[t.charCodeAt(e)]<<18|i[t.charCodeAt(e+1)]<<12|i[t.charCodeAt(e+2)]<<6|i[t.charCodeAt(e+3)],u[h++]=s>>16&255,u[h++]=s>>8&255,u[h++]=255&s;2===a?(s=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,u[h++]=255&s):1===a&&(s=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,u[h++]=s>>8&255,u[h++]=255&s);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o="",s=[],a=0,u=r-i;a<u;a+=16383)s.push(h(t,a,a+16383>u?u:a+16383));1===i?(e=t[r-1],o+=n[e>>2],o+=n[e<<4&63],o+="=="):2===i&&(e=(t[r-2]<<8)+t[r-1],o+=n[e>>10],o+=n[e>>4&63],o+=n[e<<2&63],o+="=");return s.push(o),s.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function f(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 c(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function h(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(c(n));return i.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>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-f;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,c=(1<<f)-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*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*_}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t){t.exports={_args:[["[email protected]","/Users/ruslansalikhov/MyProjects/blockchained2/rudex-ui"]],_from:"[email protected]",_id:"[email protected]",_inBundle:!1,_integrity:"sha1-nGZalfiLiwj8Bc/XMfVhhZ1yWCU=",_location:"/bigi",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"[email protected]",name:"bigi",escapedName:"bigi",rawSpec:"1.4.2",saveSpec:null,fetchSpec:"1.4.2"},_requiredBy:["/bitsharesjs","/ecurve","/steem-js-api"],_resolved:"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz",_spec:"1.4.2",_where:"/Users/ruslansalikhov/MyProjects/blockchained2/rudex-ui",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"},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",name:"bigi",repository:{url:"git+https://github.com/cryptocoinjs/bigi.git",type:"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:{files:"test/*.js",harness:"mocha",browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},version:"1.4.2"}},function(t,e,r){(function(t){var e=r(2),n=r(53);n.fromByteArrayUnsigned=function(t){return 128&t[0]?new n([0].concat(t)):new n(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(this,r(23).Buffer)},function(t,e,r){(function(t,n){var i=/%[sdj%]/g;e.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),u=n[r];r<o;u=n[++r])_(u)||!m(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(r,i){if(y(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(!0===n.noDeprecation)return r;var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),o=!0}return r.apply(this,arguments)}};var o,s={};function a(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),c(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function f(t,e){return t}function c(t,r,n){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return v(i)||(i=c(t,i,n)),i}var o=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(_(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(S(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return h(r)}var f,m="",B=!1,T=["{","}"];(p(r)&&(B=!0,T=["[","]"]),S(r))&&(m=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(m=" "+RegExp.prototype.toString.call(r)),w(r)&&(m=" "+Date.prototype.toUTCString.call(r)),E(r)&&(m=" "+h(r)),0!==s.length||B&&0!=r.length?n<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),f=B?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)x(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}(t,r,n,a,s):s.map(function(e){return l(t,r,n,a,e,B)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(f,m,T)):T[0]+m+T[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),x(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=_(r)?c(t,u.value,null):c(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function _(t){return null===t}function g(t){return"number"==typeof t}function v(t){return"string"==typeof t}function y(t){return void 0===t}function b(t){return m(t)&&"[object RegExp]"===B(t)}function m(t){return"object"==typeof t&&null!==t}function w(t){return m(t)&&"[object Date]"===B(t)}function E(t){return m(t)&&("[object Error]"===B(t)||t instanceof Error)}function S(t){return"function"==typeof t}function B(t){return Object.prototype.toString.call(t)}function T(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(y(o)&&(o=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=_,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=y,e.isRegExp=b,e.isObject=m,e.isDate=w,e.isError=E,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(77);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[T(t.getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":");return[t.getDate(),k[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=r(9),e._extend=function(t,e){if(!e||!m(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,r(16),r(13))},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){var n=r(5),i=r(79),o=r(55);t.exports=function(t){var e=i[t];if(!e)return null;var r=new n(e.p,16),s=new n(e.a,16),a=new n(e.b,16),u=new n(e.n,16),f=new n(e.h,16),c=new n(e.Gx,16),h=new n(e.Gy,16);return new o(r,s,a,c,h,u,f)}},function(t){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){var n=r(6).Buffer;t.exports=function(t){for(var e={},r=t.length,i=t.charAt(0),o=0;o<t.length;o++){var s=t.charAt(o);if(void 0!==e[s])throw new TypeError(s+" is ambiguous");e[s]=o}function a(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return n.allocUnsafe(0);for(var o=[0],s=0;s<t.length;s++){var a=e[t[s]];if(void 0===a)return;for(var u=0,f=a;u<o.length;++u)f+=o[u]*r,o[u]=255&f,f>>=8;for(;f>0;)o.push(255&f),f>>=8}for(var c=0;t[c]===i&&c<t.length-1;++c)o.push(0);return n.from(o.reverse())}return{encode:function(e){if(0===e.length)return"";for(var n=[0],o=0;o<e.length;++o){for(var s=0,a=e[o];s<n.length;++s)a+=n[s]<<8,n[s]=a%r,a=a/r|0;for(;a>0;)n.push(a%r),a=a/r|0}for(var u="",f=0;0===e[f]&&f<e.length-1;++f)u+=i;for(var c=n.length-1;c>=0;--c)u+=t[n[c]];return u},decodeUnsafe:a,decode:function(t){var e=a(t);if(e)return e;throw new Error("Non-base"+r+" character")}}}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){},function(t,e,r){"use strict";var n=r(6).Buffer,i=r(84);function o(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e=n.allocUnsafe(t>>>0),r=this.head,i=0;r;)o(r.data,e,i),i+=r.data.length,r=r.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(86),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(16))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i=1,o={},s=!1,a=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){c(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&c(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),n=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){c(t.data)},n=function(e){t.port2.postMessage(e)}}():a&&"onreadystatechange"in a.createElement("script")?function(){var t=a.documentElement;n=function(e){var r=a.createElement("script");r.onreadystatechange=function(){c(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():n=function(t){setTimeout(c,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var s={callback:t,args:e};return o[i]=s,n(i),i++},u.clearImmediate=f}function f(t){delete o[t]}function c(t){if(s)setTimeout(c,0,t);else{var e=o[t];if(e){s=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}(e)}finally{f(t),s=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(16),r(13))},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(16))},function(t,e,r){"use strict";t.exports=o;var n=r(62),i=r(35);function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(9),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(47)},function(t,e,r){t.exports=r(24)},function(t,e,r){t.exports=r(46).Transform},function(t,e,r){t.exports=r(46).PassThrough},function(t,e,r){var n=r(9),i=r(27),o=r(6).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=e[u-3]^e[u-8]^e[u-14]^e[u-16];for(var l=0;l<80;++l){var p=~~(l/20),d=f(r)+h(p,n,i,o)+a+e[l]+s[p]|0;a=o,o=i,i=c(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(9),i=r(27),o=r(6).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<1|t>>>31}function c(t){return t<<5|t>>>27}function h(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=f(e[u-3]^e[u-8]^e[u-14]^e[u-16]);for(var p=0;p<80;++p){var d=~~(p/20),_=c(r)+l(d,n,i,o)+a+e[p]+s[d]|0;a=o,o=i,i=h(n),n=r,r=_}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(9),i=r(65),o=r(27),s=r(6).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var n=r(9),i=r(66),o=r(27),s=r(6).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,r){"use strict";var n=r(9),i=r(6).Buffer,o=r(49),s=i.alloc(128),a=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u<a;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},function(t,e,r){var n=r(56);t.exports=function(t){return(new n).update(t).digest()}},function(t,e){},function(t,e){function r(t){var e=[];for(var r in t)e.push(r);return e}(t.exports="function"==typeof Object.keys?Object.keys:r).shim=r},function(t,e){var r="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function n(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function i(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=r?n:i).supported=n,e.unsupported=i},function(t,e,r){t.exports=function(t){return function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,s=r.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,i=t[n];t[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=t[e+0],u=t[e+1],p=t[e+2],d=t[e+3],_=t[e+4],g=t[e+5],v=t[e+6],y=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],T=t[e+14],k=t[e+15],x=o[0],I=o[1],O=o[2],j=o[3];I=l(I=l(I=l(I=l(I=h(I=h(I=h(I=h(I=c(I=c(I=c(I=c(I=f(I=f(I=f(I=f(I,O=f(O,j=f(j,x=f(x,I,O,j,s,7,a[0]),I,O,u,12,a[1]),x,I,p,17,a[2]),j,x,d,22,a[3]),O=f(O,j=f(j,x=f(x,I,O,j,_,7,a[4]),I,O,g,12,a[5]),x,I,v,17,a[6]),j,x,y,22,a[7]),O=f(O,j=f(j,x=f(x,I,O,j,b,7,a[8]),I,O,m,12,a[9]),x,I,w,17,a[10]),j,x,E,22,a[11]),O=f(O,j=f(j,x=f(x,I,O,j,S,7,a[12]),I,O,B,12,a[13]),x,I,T,17,a[14]),j,x,k,22,a[15]),O=c(O,j=c(j,x=c(x,I,O,j,u,5,a[16]),I,O,v,9,a[17]),x,I,E,14,a[18]),j,x,s,20,a[19]),O=c(O,j=c(j,x=c(x,I,O,j,g,5,a[20]),I,O,w,9,a[21]),x,I,k,14,a[22]),j,x,_,20,a[23]),O=c(O,j=c(j,x=c(x,I,O,j,m,5,a[24]),I,O,T,9,a[25]),x,I,d,14,a[26]),j,x,b,20,a[27]),O=c(O,j=c(j,x=c(x,I,O,j,B,5,a[28]),I,O,p,9,a[29]),x,I,y,14,a[30]),j,x,S,20,a[31]),O=h(O,j=h(j,x=h(x,I,O,j,g,4,a[32]),I,O,b,11,a[33]),x,I,E,16,a[34]),j,x,T,23,a[35]),O=h(O,j=h(j,x=h(x,I,O,j,u,4,a[36]),I,O,_,11,a[37]),x,I,y,16,a[38]),j,x,w,23,a[39]),O=h(O,j=h(j,x=h(x,I,O,j,B,4,a[40]),I,O,s,11,a[41]),x,I,d,16,a[42]),j,x,v,23,a[43]),O=h(O,j=h(j,x=h(x,I,O,j,m,4,a[44]),I,O,S,11,a[45]),x,I,k,16,a[46]),j,x,p,23,a[47]),O=l(O,j=l(j,x=l(x,I,O,j,s,6,a[48]),I,O,y,10,a[49]),x,I,T,15,a[50]),j,x,g,21,a[51]),O=l(O,j=l(j,x=l(x,I,O,j,S,6,a[52]),I,O,d,10,a[53]),x,I,w,15,a[54]),j,x,u,21,a[55]),O=l(O,j=l(j,x=l(x,I,O,j,b,6,a[56]),I,O,k,10,a[57]),x,I,v,15,a[58]),j,x,B,21,a[59]),O=l(O,j=l(j,x=l(x,I,O,j,_,6,a[60]),I,O,E,10,a[61]),x,I,p,15,a[62]),j,x,m,21,a[63]),o[0]=o[0]+x|0,o[1]=o[1]+I|0,o[2]=o[2]+O|0,o[3]=o[3]+j|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[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,u=a.words,f=0;f<4;f++){var c=u[f];u[f]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return a},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function f(t,e,r,n,i,o,s){var a=t+(e&r|~e&n)+i+s;return(a<<o|a>>>32-o)+e}function c(t,e,r,n,i,o,s){var a=t+(e&n|r&~n)+i+s;return(a<<o|a>>>32-o)+e}function h(t,e,r,n,i,o,s){var a=t+(e^r^n)+i+s;return(a<<o|a>>>32-o)+e}function l(t,e,r,n,i,o,s){var a=t+(r^(e|~n))+i+s;return(a<<o|a>>>32-o)+e}r.MD5=o._createHelper(u),r.HmacMD5=o._createHmacHelper(u)}(Math),t.MD5}(r(22))},function(t,e,r){t.exports=function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=r.Hasher,o=[],s=e.algo.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],s=r[2],a=r[3],u=r[4],f=0;f<80;f++){if(f<16)o[f]=0|t[e+f];else{var c=o[f-3]^o[f-8]^o[f-14]^o[f-16];o[f]=c<<1|c>>>31}var h=(n<<5|n>>>27)+u+o[f];h+=f<20?1518500249+(i&s|~i&a):f<40?1859775393+(i^s^a):f<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=n,n=h}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+u|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[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(n+64>>>9<<4)]=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(s),e.HmacSHA1=i._createHmacHelper(s)}(),t.SHA1}(r(22))},function(t,e,r){t.exports=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,u=s.words,f=0;f<r;f++)a[f]^=1549556828,u[f]^=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}})}()}(r(22))},function(t,e,r){t.exports=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,u=(a.Utf8,a.Base64),f=r.algo,c=f.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(){var t=p.extend();function r(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]}return t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize;r.call(this,t,e,i),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),t.Decryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize,o=t.slice(e,e+i);n.decryptBlock(t,e),r.call(this,t,e,i),this._prevBlock=o}}),t}(),_=r.pad={},g=_.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 u=o.create(s,n);t.concat(u)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},v=(n.BlockCipher=h.extend({cfg:h.cfg.extend({mode:d,padding:g}),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&&this._mode.__creator==n?this._mode.init(this,e&&e.words):(this._mode=n.call(r,this,e&&e.words),this._mode.__creator=n)},_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)}})),y=r.format={},b=y.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(u)},parse:function(t){var e=u.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 v.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 v.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,v.create({key:i,iv:s,salt:n})}},S=n.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:E}),encrypt:function(t,e,r,n){var i=(n=this.cfg.extend(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}})}()}(r(22),r(67))},function(t,e){},function(t,e,r){"use strict";var n=r(108),i=r(116),o=r(117),s=r(118);(t.exports=function(t,e){var r,o,a,u,f;return arguments.length<2||"string"!=typeof t?(u=e,e=t,t=null):u=arguments[2],null==t?(r=a=!0,o=!1):(r=s.call(t,"c"),o=s.call(t,"e"),a=s.call(t,"w")),f={value:e,configurable:r,enumerable:o,writable:a},u?n(i(u),f):f}).gs=function(t,e,r){var a,u,f,c;return"string"!=typeof t?(f=r,r=e,e=t,t=null):f=arguments[3],null==e?e=void 0:o(e)?null==r?r=void 0:o(r)||(f=r,r=void 0):(f=e,e=r=void 0),null==t?(a=!0,u=!1):(a=s.call(t,"c"),u=s.call(t,"e")),c={get:e,set:r,configurable:a,enumerable:u},f?n(i(f),c):c}},function(t,e,r){"use strict";t.exports=r(109)()?Object.assign:r(110)},function(t,e,r){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(111),i=r(115),o=Math.max;t.exports=function(t,e){var r,s,a,u=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<u;++s)e=arguments[s],n(e).forEach(a);if(void 0!==r)throw r;return t}},function(t,e,r){"use strict";t.exports=r(112)()?Object.keys:r(113)},function(t,e,r){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e,r){"use strict";var n=r(50),i=Object.keys;t.exports=function(t){return i(n(t)?Object(t):t)}},function(t,e,r){"use strict";t.exports=function(){}},function(t,e,r){"use strict";var n=r(50);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},function(t,e,r){"use strict";var n=r(50),i=Array.prototype.forEach,o=Object.create;t.exports=function(t){var e=o(null);return i.call(arguments,function(t){n(t)&&function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)}),e}},function(t,e,r){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(119)()?String.prototype.contains:r(120)},function(t,e,r){"use strict";var n="razdwatrzy";t.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},function(t,e,r){"use strict";var n=String.prototype.indexOf;t.exports=function(t){return n.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,r){"use strict";r.r(e);var n={};r.r(n),r.d(n,"operation",function(){return I}),r.d(n,"transfer_operation_fee_parameters",function(){return j}),r.d(n,"limit_order_create_operation_fee_parameters",function(){return A}),r.d(n,"limit_order_cancel_operation_fee_parameters",function(){return L}),r.d(n,"call_order_update_operation_fee_parameters",function(){return M}),r.d(n,"fill_order_operation_fee_parameters",function(){return D}),r.d(n,"account_create_operation_fee_parameters",function(){return R}),r.d(n,"account_update_operation_fee_parameters",function(){return z}),r.d(n,"account_whitelist_operation_fee_parameters",function(){return q}),r.d(n,"account_upgrade_operation_fee_parameters",function(){return U}),r.d(n,"account_transfer_operation_fee_parameters",function(){return C}),r.d(n,"asset_create_operation_fee_parameters",function(){return P}),r.d(n,"asset_update_operation_fee_parameters",function(){return N}),r.d(n,"asset_update_bitasset_operation_fee_parameters",function(){return F}),r.d(n,"asset_update_feed_producers_operation_fee_parameters",function(){return H}),r.d(n,"asset_issue_operation_fee_parameters",function(){return V}),r.d(n,"asset_reserve_operation_fee_parameters",function(){return K}),r.d(n,"asset_fund_fee_pool_operation_fee_parameters",function(){return W}),r.d(n,"asset_settle_operation_fee_parameters",function(){return Y}),r.d(n,"asset_global_settle_operation_fee_parameters",function(){return Z}),r.d(n,"asset_publish_feed_operation_fee_parameters",function(){return J}),r.d(n,"witness_create_operation_fee_parameters",function(){return G}),r.d(n,"witness_update_operation_fee_parameters",function(){return X}),r.d(n,"proposal_create_operation_fee_parameters",function(){return $}),r.d(n,"proposal_update_operation_fee_parameters",function(){return Q}),r.d(n,"proposal_delete_operation_fee_parameters",function(){return tt}),r.d(n,"withdraw_permission_create_operation_fee_parameters",function(){return et}),r.d(n,"withdraw_permission_update_operation_fee_parameters",function(){return rt}),r.d(n,"withdraw_permission_claim_operation_fee_parameters",function(){return nt}),r.d(n,"withdraw_permission_delete_operation_fee_parameters",function(){return it}),r.d(n,"committee_member_create_operation_fee_parameters",function(){return ot}),r.d(n,"committee_member_update_operation_fee_parameters",function(){return st}),r.d(n,"committee_member_update_global_parameters_operation_fee_parameters",function(){return at}),r.d(n,"vesting_balance_create_operation_fee_parameters",function(){return ut}),r.d(n,"vesting_balance_withdraw_operation_fee_parameters",function(){return ft}),r.d(n,"worker_create_operation_fee_parameters",function(){return ct}),r.d(n,"custom_operation_fee_parameters",function(){return ht}),r.d(n,"assert_operation_fee_parameters",function(){return lt}),r.d(n,"balance_claim_operation_fee_parameters",function(){return pt}),r.d(n,"override_transfer_operation_fee_parameters",function(){return dt}),r.d(n,"transfer_to_blind_operation_fee_parameters",function(){return _t}),r.d(n,"blind_transfer_operation_fee_parameters",function(){return gt}),r.d(n,"transfer_from_blind_operation_fee_parameters",function(){return vt}),r.d(n,"asset_settle_cancel_operation_fee_parameters",function(){return yt}),r.d(n,"asset_claim_fees_operation_fee_parameters",function(){return bt}),r.d(n,"fba_distribute_operation_fee_parameters",function(){return mt}),r.d(n,"bid_collateral_operation_fee_parameters",function(){return wt}),r.d(n,"execute_bid_operation_fee_parameters",function(){return Et}),r.d(n,"asset_claim_pool_operation_fee_parameters",function(){return St}),r.d(n,"asset_update_issuer_operation_fee_parameters",function(){return Bt}),r.d(n,"fee_schedule",function(){return Tt}),r.d(n,"void_result",function(){return kt}),r.d(n,"asset",function(){return xt}),r.d(n,"processed_transaction",function(){return Ot}),r.d(n,"signed_block",function(){return jt}),r.d(n,"block_header",function(){return At}),r.d(n,"signed_block_header",function(){return Lt}),r.d(n,"memo_data",function(){return Mt}),r.d(n,"transfer",function(){return Dt}),r.d(n,"limit_order_create",function(){return Rt}),r.d(n,"limit_order_cancel",function(){return zt}),r.d(n,"call_order_update_options",function(){return qt}),r.d(n,"call_order_update",function(){return Ut}),r.d(n,"fill_order",function(){return Ct}),r.d(n,"authority",function(){return Pt}),r.d(n,"account_options",function(){return Nt}),r.d(n,"account_create",function(){return Ft}),r.d(n,"account_update",function(){return Ht}),r.d(n,"account_whitelist",function(){return Vt}),r.d(n,"account_upgrade",function(){return Kt}),r.d(n,"account_transfer",function(){return Wt}),r.d(n,"price",function(){return Yt}),r.d(n,"asset_options",function(){return Zt}),r.d(n,"bitasset_options",function(){return Jt}),r.d(n,"asset_create",function(){return Gt}),r.d(n,"asset_update",function(){return Xt}),r.d(n,"asset_update_bitasset",function(){return $t}),r.d(n,"asset_update_feed_producers",function(){return Qt}),r.d(n,"asset_issue",function(){return te}),r.d(n,"asset_reserve",function(){return ee}),r.d(n,"asset_fund_fee_pool",function(){return re}),r.d(n,"asset_settle",function(){return ne}),r.d(n,"asset_global_settle",function(){return ie}),r.d(n,"price_feed",function(){return oe}),r.d(n,"asset_publish_feed",function(){return se}),r.d(n,"witness_create",function(){return ae}),r.d(n,"witness_update",function(){return ue}),r.d(n,"op_wrapper",function(){return fe}),r.d(n,"proposal_create",function(){return ce}),r.d(n,"proposal_update",function(){return he}),r.d(n,"proposal_delete",function(){return le}),r.d(n,"withdraw_permission_create",function(){return pe}),r.d(n,"withdraw_permission_update",function(){return de}),r.d(n,"withdraw_permission_claim",function(){return _e}),r.d(n,"withdraw_permission_delete",function(){return ge}),r.d(n,"committee_member_create",function(){return ve}),r.d(n,"committee_member_update",function(){return ye}),r.d(n,"chain_parameters",function(){return be}),r.d(n,"committee_member_update_global_parameters",function(){return me}),r.d(n,"linear_vesting_policy_initializer",function(){return we}),r.d(n,"cdd_vesting_policy_initializer",function(){return Ee}),r.d(n,"vesting_balance_create",function(){return Be}),r.d(n,"vesting_balance_withdraw",function(){return Te}),r.d(n,"refund_worker_initializer",function(){return ke}),r.d(n,"vesting_balance_worker_initializer",function(){return xe}),r.d(n,"burn_worker_initializer",function(){return Ie}),r.d(n,"worker_create",function(){return je}),r.d(n,"custom",function(){return Ae}),r.d(n,"account_name_eq_lit_predicate",function(){return Le}),r.d(n,"asset_symbol_eq_lit_predicate",function(){return Me}),r.d(n,"block_id_predicate",function(){return De}),r.d(n,"assert",function(){return ze}),r.d(n,"balance_claim",function(){return qe}),r.d(n,"override_transfer",function(){return Ue}),r.d(n,"stealth_confirmation",function(){return Ce}),r.d(n,"blind_output",function(){return Pe}),r.d(n,"transfer_to_blind",function(){return Ne}),r.d(n,"blind_input",function(){return Fe}),r.d(n,"blind_transfer",function(){return He}),r.d(n,"transfer_from_blind",function(){return Ve}),r.d(n,"asset_settle_cancel",function(){return Ke}),r.d(n,"asset_claim_fees",function(){return We}),r.d(n,"fba_distribute",function(){return Ye}),r.d(n,"bid_collateral",function(){return Ze}),r.d(n,"execute_bid",function(){return Je}),r.d(n,"asset_claim_pool",function(){return Ge}),r.d(n,"asset_update_issuer",function(){return Xe}),r.d(n,"transaction",function(){return $e}),r.d(n,"signed_transaction",function(){return Qe}),r.d(n,"stealth_memo_data",function(){return tr});var i=r(28),o=(r(18),r(7)),s=o.a.uint8,a=o.a.uint16,u=o.a.uint32,f=o.a.int64,c=o.a.uint64,h=o.a.string,l=o.a.bytes,p=o.a.bool,d=o.a.array,_=o.a.protocol_id_type,g=o.a.object_id_type,v=o.a.vote_id,y=o.a.future_extensions,b=o.a.static_variant,m=o.a.map,w=o.a.set,E=o.a.public_key,S=o.a.address,B=o.a.time_point_sec,T=o.a.optional,k=o.a.indexed_optional,x=o.a.extension;y=o.a.void;var I=b(),O=function(t,e){return new i.a(t,e)},j=new O("transfer_operation_fee_parameters",{fee:c,price_per_kbyte:u}),A=new O("limit_order_create_operation_fee_parameters",{fee:c}),L=new O("limit_order_cancel_operation_fee_parameters",{fee:c}),M=new O("call_order_update_operation_fee_parameters",{fee:c}),D=new O("fill_order_operation_fee_parameters"),R=new O("account_create_operation_fee_parameters",{basic_fee:c,premium_fee:c,price_per_kbyte:u}),z=new O("account_update_operation_fee_parameters",{fee:f,price_per_kbyte:u}),q=new O("account_whitelist_operation_fee_parameters",{fee:f}),U=new O("account_upgrade_operation_fee_parameters",{membership_annual_fee:c,membership_lifetime_fee:c}),C=new O("account_transfer_operation_fee_parameters",{fee:c}),P=new O("asset_create_operation_fee_parameters",{symbol3:c,symbol4:c,long_symbol:c,price_per_kbyte:u}),N=new O("asset_update_operation_fee_parameters",{fee:c,price_per_kbyte:u}),F=new O("asset_update_bitasset_operation_fee_parameters",{fee:c}),H=new O("asset_update_feed_producers_operation_fee_parameters",{fee:c}),V=new O("asset_issue_operation_fee_parameters",{fee:c,price_per_kbyte:u}),K=new O("asset_reserve_operation_fee_parameters",{fee:c}),W=new O("asset_fund_fee_pool_operation_fee_parameters",{fee:c}),Y=new O("asset_settle_operation_fee_parameters",{fee:c}),Z=new O("asset_global_settle_operation_fee_parameters",{fee:c}),J=new O("asset_publish_feed_operation_fee_parameters",{fee:c}),G=new O("witness_create_operation_fee_parameters",{fee:c}),X=new O("witness_update_operation_fee_parameters",{fee:f}),$=new O("proposal_create_operation_fee_parameters",{fee:c,price_per_kbyte:u}),Q=new O("proposal_update_operation_fee_parameters",{fee:c,price_per_kbyte:u}),tt=new O("proposal_delete_operation_fee_parameters",{fee:c}),et=new O("withdraw_permission_create_operation_fee_parameters",{fee:c}),rt=new O("withdraw_permission_update_operation_fee_parameters",{fee:c}),nt=new O("withdraw_permission_claim_operation_fee_parameters",{fee:c,price_per_kbyte:u}),it=new O("withdraw_permission_delete_operation_fee_parameters",{fee:c}),ot=new O("committee_member_create_operation_fee_parameters",{fee:c}),st=new O("committee_member_update_operation_fee_parameters",{fee:c}),at=new O("committee_member_update_global_parameters_operation_fee_parameters",{fee:c}),ut=new O("vesting_balance_create_operation_fee_parameters",{fee:c}),ft=new O("vesting_balance_withdraw_operation_fee_parameters",{fee:c}),ct=new O("worker_create_operation_fee_parameters",{fee:c}),ht=new O("custom_operation_fee_parameters",{fee:c,price_per_kbyte:u}),lt=new O("assert_operation_fee_parameters",{fee:c}),pt=new O("balance_claim_operation_fee_parameters"),dt=new O("override_transfer_operation_fee_parameters",{fee:c,price_per_kbyte:u}),_t=new O("transfer_to_blind_operation_fee_parameters",{fee:c,price_per_output:u}),gt=new O("blind_transfer_operation_fee_parameters",{fee:c,price_per_output:u}),vt=new O("transfer_from_blind_operation_fee_parameters",{fee:c}),yt=new O("asset_settle_cancel_operation_fee_parameters"),bt=new O("asset_claim_fees_operation_fee_parameters",{fee:c}),mt=new O("fba_distribute_operation_fee_parameters"),wt=new O("bid_collateral_operation_fee_parameters",{fee:c}),Et=new O("execute_bid_operation_fee_parameters"),St=new O("asset_claim_pool_operation_fee_parameters",{fee:c}),Bt=new O("asset_update_issuer_operation_fee_parameters",{fee:c}),Tt=new O("fee_schedule",{parameters:w(b([j,A,L,M,D,R,z,q,U,C,P,N,F,H,V,K,W,Y,Z,J,G,X,$,Q,tt,et,rt,nt,it,ot,st,at,ut,ft,ct,ht,lt,pt,dt,_t,gt,vt,yt,bt,mt,wt,Et,St,Bt])),scale:u}),kt=new O("void_result"),xt=new O("asset",{amount:f,asset_id:_("asset")}),It=b([kt,g,xt]),Ot=new O("processed_transaction",{ref_block_num:a,ref_block_prefix:u,expiration:B,operations:d(I),extensions:w(y),signatures:d(l(65)),operation_results:d(It)}),jt=new O("signed_block",{previous:l(20),timestamp:B,witness:_("witness"),transaction_merkle_root:l(20),extensions:w(y),witness_signature:l(65),transactions:d(Ot)}),At=new O("block_header",{previous:l(20),timestamp:B,witness:_("witness"),transaction_merkle_root:l(20),extensions:w(y)}),Lt=new O("signed_block_header",{previous:l(20),timestamp:B,witness:_("witness"),transaction_merkle_root:l(20),extensions:w(y),witness_signature:l(65)}),Mt=new O("memo_data",{from:E,to:E,nonce:c,message:l()}),Dt=new O("transfer",{fee:xt,from:_("account"),to:_("account"),amount:xt,memo:T(Mt),extensions:w(y)}),Rt=new O("limit_order_create",{fee:xt,seller:_("account"),amount_to_sell:xt,min_to_receive:xt,expiration:B,fill_or_kill:p,extensions:w(y)}),zt=new O("limit_order_cancel",{fee:xt,fee_paying_account:_("account"),order:_("limit_order"),extensions:w(y)}),qt=new O("call_order_update_options",{target_collateral_ratio:k(a,0)}),Ut=new O("call_order_update",{fee:xt,funding_account:_("account"),delta_collateral:xt,delta_debt:xt,extensions:x(qt)}),Ct=new O("fill_order",{fee:xt,order_id:g,account_id:_("account"),pays:xt,receives:xt}),Pt=new O("authority",{weight_threshold:u,account_auths:m(_("account"),a),key_auths:m(E,a),address_auths:m(S,a)}),Nt=new O("account_options",{memo_key:E,voting_account:_("account"),num_witness:a,num_committee:a,votes:w(v),extensions:w(y)}),Ft=new O("account_create",{fee:xt,registrar:_("account"),referrer:_("account"),referrer_percent:a,name:h,owner:Pt,active:Pt,options:Nt,extensions:w(y)}),Ht=new O("account_update",{fee:xt,account:_("account"),owner:T(Pt),active:T(Pt),new_options:T(Nt),extensions:w(y)}),Vt=new O("account_whitelist",{fee:xt,authorizing_account:_("account"),account_to_list:_("account"),new_listing:s,extensions:w(y)}),Kt=new O("account_upgrade",{fee:xt,account_to_upgrade:_("account"),upgrade_to_lifetime_member:p,extensions:w(y)}),Wt=new O("account_transfer",{fee:xt,account_id:_("account"),new_owner:_("account"),extensions:w(y)}),Yt=new O("price",{base:xt,quote:xt}),Zt=new O("asset_options",{max_supply:f,market_fee_percent:a,max_market_fee:f,issuer_permissions:a,flags:a,core_exchange_rate:Yt,whitelist_authorities:w(_("account")),blacklist_authorities:w(_("account")),whitelist_markets:w(_("asset")),blacklist_markets:w(_("asset")),description:h,extensions:w(y)}),Jt=new O("bitasset_options",{feed_lifetime_sec:u,minimum_feeds:s,force_settlement_delay_sec:u,force_settlement_offset_percent:a,maximum_force_settlement_volume:a,short_backing_asset:_("asset"),extensions:w(y)}),Gt=new O("asset_create",{fee:xt,issuer:_("account"),symbol:h,precision:s,common_options:Zt,bitasset_opts:T(Jt),is_prediction_market:p,extensions:w(y)}),Xt=new O("asset_update",{fee:xt,issuer:_("account"),asset_to_update:_("asset"),new_issuer:T(_("account")),new_options:Zt,extensions:w(y)}),$t=new O("asset_update_bitasset",{fee:xt,issuer:_("account"),asset_to_update:_("asset"),new_options:Jt,extensions:w(y)}),Qt=new O("asset_update_feed_producers",{fee:xt,issuer:_("account"),asset_to_update:_("asset"),new_feed_producers:w(_("account")),extensions:w(y)}),te=new O("asset_issue",{fee:xt,issuer:_("account"),asset_to_issue:xt,issue_to_account:_("account"),memo:T(Mt),extensions:w(y)}),ee=new O("asset_reserve",{fee:xt,payer:_("account"),amount_to_reserve:xt,extensions:w(y)}),re=new O("asset_fund_fee_pool",{fee:xt,from_account:_("account"),asset_id:_("asset"),amount:f,extensions:w(y)}),ne=new O("asset_settle",{fee:xt,account:_("account"),amount:xt,extensions:w(y)}),ie=new O("asset_global_settle",{fee:xt,issuer:_("account"),asset_to_settle:_("asset"),settle_price:Yt,extensions:w(y)}),oe=new O("price_feed",{settlement_price:Yt,maintenance_collateral_ratio:a,maximum_short_squeeze_ratio:a,core_exchange_rate:Yt}),se=new O("asset_publish_feed",{fee:xt,publisher:_("account"),asset_id:_("asset"),feed:oe,extensions:w(y)}),ae=new O("witness_create",{fee:xt,witness_account:_("account"),url:h,block_signing_key:E}),ue=new O("witness_update",{fee:xt,witness:_("witness"),witness_account:_("account"),new_url:T(h),new_signing_key:T(E)}),fe=new O("op_wrapper",{op:I}),ce=new O("proposal_create",{fee:xt,fee_paying_account:_("account"),expiration_time:B,proposed_ops:d(fe),review_period_seconds:T(u),extensions:w(y)}),he=new O("proposal_update",{fee:xt,fee_paying_account:_("account"),proposal:_("proposal"),active_approvals_to_add:w(_("account")),active_approvals_to_remove:w(_("account")),owner_approvals_to_add:w(_("account")),owner_approvals_to_remove:w(_("account")),key_approvals_to_add:w(E),key_approvals_to_remove:w(E),extensions:w(y)}),le=new O("proposal_delete",{fee:xt,fee_paying_account:_("account"),using_owner_authority:p,proposal:_("proposal"),extensions:w(y)}),pe=new O("withdraw_permission_create",{fee:xt,withdraw_from_account:_("account"),authorized_account:_("account"),withdrawal_limit:xt,withdrawal_period_sec:u,periods_until_expiration:u,period_start_time:B}),de=new O("withdraw_permission_update",{fee:xt,withdraw_from_account:_("account"),authorized_account:_("account"),permission_to_update:_("withdraw_permission"),withdrawal_limit:xt,withdrawal_period_sec:u,period_start_time:B,periods_until_expiration:u}),_e=new O("withdraw_permission_claim",{fee:xt,withdraw_permission:_("withdraw_permission"),withdraw_from_account:_("account"),withdraw_to_account:_("account"),amount_to_withdraw:xt,memo:T(Mt)}),ge=new O("withdraw_permission_delete",{fee:xt,withdraw_from_account:_("account"),authorized_account:_("account"),withdrawal_permission:_("withdraw_permission")}),ve=new O("committee_member_create",{fee:xt,committee_member_account:_("account"),url:h}),ye=new O("committee_member_update",{fee:xt,committee_member:_("committee_member"),committee_member_account:_("account"),new_url:T(h)}),be=new O("chain_parameters",{current_fees:Tt,block_interval:s,maintenance_interval:u,maintenance_skip_slots:s,committee_proposal_review_period:u,maximum_transaction_size:u,maximum_block_size:u,maximum_time_until_expiration:u,maximum_proposal_lifetime:u,maximum_asset_whitelist_authorities:s,maximum_asset_feed_publishers:s,maximum_witness_count:a,maximum_committee_count:a,maximum_authority_membership:a,reserve_percent_of_fee:a,network_percent_of_fee:a,lifetime_referrer_percent_of_fee:a,cashback_vesting_period_seconds:u,cashback_vesting_threshold:f,count_non_member_votes:p,allow_non_member_whitelists:p,witness_pay_per_block:f,worker_budget_per_day:f,max_predicate_opcode:a,fee_liquidation_threshold:f,accounts_per_fee_scale:a,account_fee_scale_bitshifts:s,max_authority_depth:s,extensions:w(y)}),me=new O("committee_member_update_global_parameters",{fee:xt,new_parameters:be}),we=new O("linear_vesting_policy_initializer",{begin_timestamp:B,vesting_cliff_seconds:u,vesting_duration_seconds:u}),Ee=new O("cdd_vesting_policy_initializer",{start_claim:B,vesting_seconds:u}),Se=b([we,Ee]),Be=new O("vesting_balance_create",{fee:xt,creator:_("account"),owner:_("account"),amount:xt,policy:Se}),Te=new O("vesting_balance_withdraw",{fee:xt,vesting_balance:_("vesting_balance"),owner:_("account"),amount:xt}),ke=new O("refund_worker_initializer"),xe=new O("vesting_balance_worker_initializer",{pay_vesting_period_days:a}),Ie=new O("burn_worker_initializer"),Oe=b([ke,xe,Ie]),je=new O("worker_create",{fee:xt,owner:_("account"),work_begin_date:B,work_end_date:B,daily_pay:f,name:h,url:h,initializer:Oe}),Ae=new O("custom",{fee:xt,payer:_("account"),required_auths:w(_("account")),id:a,data:l()}),Le=new O("account_name_eq_lit_predicate",{account_id:_("account"),name:h}),Me=new O("asset_symbol_eq_lit_predicate",{asset_id:_("asset"),symbol:h}),De=new O("block_id_predicate",{id:l(20)}),Re=b([Le,Me,De]),ze=new O("assert",{fee:xt,fee_paying_account:_("account"),predicates:d(Re),required_auths:w(_("account")),extensions:w(y)}),qe=new O("balance_claim",{fee:xt,deposit_to_account:_("account"),balance_to_claim:_("balance"),balance_owner_key:E,total_claimed:xt}),Ue=new O("override_transfer",{fee:xt,issuer:_("account"),from:_("account"),to:_("account"),amount:xt,memo:T(Mt),extensions:w(y)}),Ce=new O("stealth_confirmation",{one_time_key:E,to:T(E),encrypted_memo:l()}),Pe=new O("blind_output",{commitment:l(33),range_proof:l(),owner:Pt,stealth_memo:T(Ce)}),Ne=new O("transfer_to_blind",{fee:xt,amount:xt,from:_("account"),blinding_factor:l(32),outputs:d(Pe)}),Fe=new O("blind_input",{commitment:l(33),owner:Pt}),He=new O("blind_transfer",{fee:xt,inputs:d(Fe),outputs:d(Pe)}),Ve=new O("transfer_from_blind",{fee:xt,amount:xt,to:_("account"),blinding_factor:l(32),inputs:d(Fe)}),Ke=new O("asset_settle_cancel",{fee:xt,settlement:_("force_settlement"),account:_("account"),amount:xt,extensions:w(y)}),We=new O("asset_claim_fees",{fee:xt,issuer:_("account"),amount_to_claim:xt,extensions:w(y)}),Ye=new O("fba_distribute",{fee:xt,account_id:_("account"),fba_id:_("fba_accumulator"),amount:f}),Ze=new O("bid_collateral",{fee:xt,bidder:_("account"),additional_collateral:xt,debt_covered:xt,extensions:w(y)}),Je=new O("execute_bid",{fee:xt,bidder:_("account"),debt:xt,collateral:xt}),Ge=new O("asset_claim_pool",{fee:xt,issuer:_("account"),asset_id:_("asset"),amount_to_claim:xt,extensions:w(y)}),Xe=new O("asset_update_issuer",{fee:xt,issuer:_("account"),asset_to_update:_("asset"),new_issuer:_("account"),extensions:w(y)});I.st_operations=[Dt,Rt,zt,Ut,Ct,Ft,Ht,Vt,Kt,Wt,Gt,Xt,$t,Qt,te,ee,re,ne,ie,se,ae,ue,ce,he,le,pe,de,_e,ge,ve,ye,me,Be,Te,je,Ae,ze,qe,Ue,Ne,He,Ve,Ke,We,Ye,Ze,Je,Ge,Xe];var $e=new O("transaction",{ref_block_num:a,ref_block_prefix:u,expiration:B,operations:d(I),extensions:w(y)}),Qe=new O("signed_transaction",{ref_block_num:a,ref_block_prefix:u,expiration:B,operations:d(I),extensions:w(y),signatures:d(l(65))}),tr=new O("stealth_memo_data",{from:T(E),amount:xt,blinding_factor:l(32),commitment:l(33),check:u});r(0),r(19),r(25);var er=r(17),rr=(r(11),r(40),r(39),r(1),r(29)),nr=r(44),ir=r(2),or=r.n(ir),sr=r(15),ar=r(3),ur=r(12);var fr,cr,hr=r(6).Buffer,lr=(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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=function(t){var e=this;return new Promise(function(r,i){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 o=n.signed_transaction.toObject(e);ar.a.instance().network_api().exec("broadcast_transaction_with_callback",[function(t){return r(t)},o]).then(function(){t&&t()}).catch(function(t){console.log(t);var r=t.message;r||(r=""),i(new Error(r+"\nbitshares-crypto digest "+sr.d.sha256(e.tr_buffer).toString("hex")+" transaction "+e.tr_buffer.toString("hex")+" "+JSON.stringify(o)))})})}.bind(this)}t.prototype.add_type_operation=function(t,e){this.add_operation(this.get_type_operation(t,e))},t.prototype.process_transaction=function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.wallet.wallet_object;return ar.a.instance().chain_id!==i.get("chain_id")?Promise.reject("Mismatched chain_id; expecting "+i.get("chain_id")+", but got "+ar.a.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=o,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var f;if(a){if(u>=s.length)break;f=s[u++]}else{if((u=s.next()).done)break;f=u.value}var c=f,h=t.getPrivateKey(c);e.add_signer(h,c),i[c]=!0}}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=r,o=Array.isArray(n),s=0;for(n=o?n:n[Symbol.iterator]();;){var a;if(o){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var u=a;if(!i[u]){var f=t.getPrivateKey(u);if(!f)throw new Error("Missing signing key for "+u);e.add_signer(f,u)}}})}).then(function(){return n?e.broadcast():e.serialize()})})},t.prototype.finalize=function(){var t=this;return new Promise(function(e,r){if(t.tr_buffer)throw new Error("already finalized");e(ar.a.instance().db_api().exec("get_objects",[["2.1.0"]]).then(function(e){fr=e[0].time,0===t.expiration&&(t.expiration=lr()+ar.b.expire_in_secs),t.ref_block_num=65535&e[0].head_block_number,t.ref_block_prefix=new hr(e[0].head_block_id,"hex").readUInt32LE(4);for(var r,i=t.operations,o=0;o<i.length;o++)(r=i[o])[1].finalize&&r[1].finalize();t.tr_buffer=n.transaction.toBuffer(t)}))})},t.prototype.id=function(){if(!this.tr_buffer)throw new Error("not finalized");return sr.d.sha256(this.tr_buffer).toString("hex").substring(0,40)},t.prototype.add_operation=function(t){if(this.tr_buffer)throw new Error("already finalized");if(or()(t,"operation"),!Array.isArray(t))throw new Error("Expecting array [operation_id, operation]");this.operations.push(t)},t.prototype.get_type_operation=function(t,e){if(this.tr_buffer)throw new Error("already finalized");or()(t,"name"),or()(e,"operation");var r=n[t];or()(r,"Unknown operation "+t);var i=ur.a.operations[r.operation_name];if(void 0===i)throw new Error("unknown operation: "+r.operation_name);if(e.fee||(e.fee={amount:0,asset_id:0}),"proposal_create"===t){var o=!1,s=0;e.proposed_ops.forEach(function(t){var e=void 0;switch(t.op[0]){case 0:e="from";break;case 6:case 17:e="account";break;case 10:case 11:case 12:case 13:case 14:case 18:case 43:e="issuer";break;case 15:e="payer";break;case 16:e="from_account";break;case 22:case 23:case 24:e="fee_paying_account";break;case 31:o=!0,s=1123200}e in t.op[1]&&0===t.op[1][e]&&(o=!0)}),e.expiration_time||(e.expiration_time=lr()+ar.b.expire_in_secs_proposal),o&&(e.review_period_seconds=s+Math.max(cr,86400),e.expiration_time+=3600+s)}return[i,r.fromObject(e)]},t.prototype.update_head_block=function(){return Promise.all([ar.a.instance().db_api().exec("get_objects",[["2.0.0"]]),ar.a.instance().db_api().exec("get_objects",[["2.1.0"]])]).then(function(t){var e=t[0],r=t[1];fr=r[0].time,cr=e[0].parameters.committee_proposal_review_period})},t.prototype.set_expire_seconds=function(t){if(this.tr_buffer)throw new Error("already finalized");return this.expiration=lr()+t},t.prototype.propose=function(t){if(this.tr_buffer)throw new Error("already finalized");if(!this.operations.length)throw new Error("add operation first");or()(t,"proposal_create_options"),or()(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},t.prototype.has_proposed_operation=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},t.prototype.set_required_fees=function(t,e){var r=this;if(this.tr_buffer)throw new Error("already finalized");if(!this.operations.length)throw new Error("add operations first");function i(t){return 22===t[0]}var o=[],s=[],a=[],u=[],f={};function c(t){var e=null;switch(t[0]){case 0:var r=new Array(t[1].memo.message.length+1).join("a");e=t[0]+"_"+t[1].amount.asset_id+"_"+r}return e}for(var h,l=0;l<this.operations.length;l++){h=this.operations[l];var p=n.operation.toObject(h),d=!1;if(e){var _=c(p);_&&(f[_]?(f[_].duplicates.push(l),d=!0):f[_]={original:l,duplicates:[]})}i(h)&&h[1].proposed_ops.forEach(function(t){s.push(t),-1===u.indexOf(t.op[1].fee.asset_id)&&u.push("1.3."+t.op[1].fee.asset_id)}),d||(o.push(p),-1===a.indexOf(o[l][1].fee.asset_id)&&a.push(o[l][1].fee.asset_id))}if(!t){var g=o[0][1].fee;t=g&&null!==g.asset_id?g.asset_id:"1.3.0"}var v=[];if(v.push(Promise.all(a.map(function(t){return ar.a.instance().db_api().exec("get_required_fees",[o,t])})).catch(function(t){console.error("get_required_fees API error: ",t.message)})),u.length&&u.forEach(function(t){-1===a.indexOf(t)&&a.push(t)}),a.length>1||"1.3.0"!==a[0]){var y=a.map(function(t){return t.replace(/^1\./,"2.")});v.push(ar.a.instance().db_api().exec("get_required_fees",[o,"1.3.0"])),v.push(ar.a.instance().db_api().exec("get_objects",[y]))}return Promise.all(v).then(function(t){var s=t[0],a=t[1],u=t[2];void 0===s&&(s=a),a||(a=s[0]);var h={},l={};s.forEach(function(t){var e=t.map(function(t){return Array.isArray(t)?(l[t[1][0].asset_id]=t[1],t[0]):t}),r=e[0].asset_id;h[r]=e},{});var p=u?u.reduce(function(t,e){return t[e.id.replace(/^2\./,"1.")]=e,t},{}):{},d={},_={};function g(t,e,r,n){return t[e]||(t[e]={total:0,ops:[]}),t[e].propIdx?t[e].propIdx.push(r):t[e].ops.push(r),"1.3.0"!==e&&(t[e].total+=n.length?n[r].amount:n.amount),t}for(var v=function(t){var e=o[t],r=e[1].fee.asset_id;i(e)?(d=g(d,r,t,a[t][0]),e[1].proposed_ops.forEach(function(e,r){var n=e.op[1].fee.asset_id;_[t]||(_[t]={}),_[t][n]||(_[t][n]={total:0,ops:[t],propIdx:[]}),_[t]=g(_[t],n,r,a[t][1])})):d=g(d,r,t,a[t])},y=0;y<o.length;y++)v(y);function b(t){if(!Object.keys(t).length)return[];var e=[],r=function(r){var n=p[r]?parseInt(p[r].fee_pool,10):0;t[r].total>n?t[r].ops.forEach(function(n){2===a[n].length&&"propIdx"in t[r]?t[r].propIdx.forEach(function(t){e[t]=a[n][1][t]}):2===a[n].length?e[n]=a[n][0]:e[n]=a[n]}):t[r].ops.forEach(function(n){2===a[n].length&&"propIdx"in t[r]?t[r].propIdx.forEach(function(t){e[t]=l[r][t]}):e[n]=h[r][n]})};for(var n in t)r(n);return e}var m=b(d),w={};for(var E in _)w[E]=b(_[E]);for(var S=function(t,i){if(!t.fee||0===t.fee.amount||t.fee.amount.toString&&"0"===t.fee.amount.toString())if(e){var o=function(t,e){var r=c(t),n=f[r];if(n){if(n.original===e)return e;if(-1!==n.duplicates.indexOf(e))return n.original}}(n.operation.toObject(r.operations[i]),i);t.fee=o>=0?m[o]:m[i]}else t.fee=m[i];if(t.proposed_ops){for(var s=0;s<t.proposed_ops.length;s++)t.proposed_ops[s].op[1].fee.asset_id=w[i][s].asset_id;return[]}},B=0;B<r.operations.length;B++)S(r.operations[B][1],B)})},t.prototype.get_potential_signatures=function(){var t=n.signed_transaction.toObject(this);return Promise.all([ar.a.instance().db_api().exec("get_potential_signatures",[t]),ar.a.instance().db_api().exec("get_potential_address_signatures",[t])]).then(function(t){return{pubkeys:t[0],addys:t[1]}})},t.prototype.get_required_signatures=function(t){if(!t.length)return Promise.resolve([]);var e=n.signed_transaction.toObject(this);return ar.a.instance().db_api().exec("get_required_signatures",[e,t]).then(function(t){return t})},t.prototype.add_signer=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.toPublicKey();if(or()(t.d,"required PrivateKey object"),this.signed)throw new Error("already signed");e.Q||(e=sr.b.fromPublicKeyString(e));var r=t.toHex(),n=this.signer_private_keys,i=Array.isArray(n),o=0;for(n=i?n:n[Symbol.iterator]();;){var s;if(i){if(o>=n.length)break;s=n[o++]}else{if((o=n.next()).done)break;s=o.value}if(s[0].toHex()===r)return}this.signer_private_keys.push([t,e])},t.prototype.sign=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ar.a.instance().chain_id;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 e=this.signer_private_keys.length,r=0;0<e?r<e:r>e;r++){var n=this.signer_private_keys[r],i=n[0],o=n[1],s=sr.c.signBuffer(hr.concat([new hr(t,"hex"),this.tr_buffer]),i,o);this.signatures.push(s.toBuffer())}this.signer_private_keys=[],this.signed=!0},t.prototype.serialize=function(){return n.signed_transaction.toObject(this)},t.prototype.toObject=function(){return n.signed_transaction.toObject(this)},t.prototype.broadcast=function(t){var e=this;return this.tr_buffer?this._broadcast(t):this.finalize().then(function(){return e._broadcast(t)})}}(),function(){var t=Math.ceil(function(t){return t?(/Z$/.test(t)||(t+="Z"),new Date(t)):new Date("1970-01-01T00:00:00.000Z")}(fr).getTime()/1e3),e=Math.ceil(Date.now()/1e3);return e-t>30?t:Math.max(e,t)});r(26),"function"==typeof Symbol&&Symbol.iterator,r(36),r(8),r(10),r(42);var pr={},dr={};new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e={loggedIn:!1,roles:["active","owner","memo"]};this.get=function(t){return function(e){return t[e]||""}}(e),this.set=function(t){return function(e,r){return t[e]=r,this}}(e),this.subs={}}return t.prototype.addSubscription=function(t){this.subs[t]=t},t.prototype.setRoles=function(t){this.set("roles",t)},t.prototype.generateKeys=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={},o={};return(r||this.get("roles")).forEach(function(r){var s=t+r+e,a=pr[s]?pr[s]:er.a.fromSeed(rr.a.normalize_brainKey(s));pr[s]=a,i[r]=a,o[r]=dr[s]?dr[s]:a.toPublicKey().toString(n),dr[s]=o[r]}),{privKeys:i,pubKeys:o}},t.prototype.checkKeys=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,u=s.pubKeys;i[t].forEach(function(r){r[0]===u[t]&&(o=!0,e.set(t,{priv:a[t],pub:u[t]}))})};for(var a in i)s(a);return o&&this.set("name",r),this.set("loggedIn",o),o},t.prototype.signTransaction=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}()),nr.a.FetchChainObjects,nr.a.FetchChain;onmessage=function(t){try{console.log("AddressIndexWorker start");var e=t.data,r=e.pubkeys,n=e.address_prefix,i=[],o=!0,s=!1,a=void 0;try{for(var u,f=r[Symbol.iterator]();!(o=(u=f.next()).done);o=!0){var c=u.value;i.push(rr.a.addresses(c,n))}}catch(t){s=!0,a=t}finally{try{!o&&f.return&&f.return()}finally{if(s)throw a}}postMessage(i),console.log("AddressIndexWorker done")}catch(t){console.error("AddressIndexWorker",t)}}}]);
//# sourceMappingURL=main.js.map