js-waku/eth-pm-wallet/static/js/2.ad16d0c5.chunk.js

3 lines
2.8 MiB

/*! For license information please see 2.ad16d0c5.chunk.js.LICENSE.txt */
(this["webpackJsonpeth-pm-wallet-encryption"]=this["webpackJsonpeth-pm-wallet-encryption"]||[]).push([[2],[function(e,t,r){e.exports=r(535)},function(e,t,r){"use strict";e.exports=r(528)},function(e,t,r){"use strict";r.d(t,"k",(function(){return a})),r.d(t,"j",(function(){return s})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return c})),r.d(t,"o",(function(){return f})),r.d(t,"p",(function(){return l})),r.d(t,"l",(function(){return h})),r.d(t,"i",(function(){return p})),r.d(t,"d",(function(){return v})),r.d(t,"e",(function(){return y})),r.d(t,"c",(function(){return b})),r.d(t,"g",(function(){return g})),r.d(t,"f",(function(){return m})),r.d(t,"h",(function(){return w})),r.d(t,"n",(function(){return k})),r.d(t,"m",(function(){return S}));var n=new(r(3).b)("bytes/5.3.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return h(e)&&!(e.length%2)||s(e)}function s(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(null==e.length)return!1;for(var t=0;t<e.length;t++){var r=e[t];if("number"!==typeof r||r<0||r>=256||r%1)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),o(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){var a=e.substring(2);a.length%2&&("left"===t.hexPad?a="0x0"+a.substring(2):"right"===t.hexPad?a+="0":n.throwArgumentError("hex data is odd-length","value",e));for(var u=[],c=0;c<a.length;c+=2)u.push(parseInt(a.substring(c,c+2),16));return o(new Uint8Array(u))}return s(e)?o(new Uint8Array(e)):n.throwArgumentError("invalid arrayify value","value",e)}function c(e){var t=e.map((function(e){return u(e)})),r=t.reduce((function(e,t){return e+t.length}),0),n=new Uint8Array(r);return t.reduce((function(e,t){return n.set(t,e),e+t.length}),0),o(n)}function f(e){var t=u(e);if(0===t.length)return t;for(var r=0;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function l(e,t){(e=u(e)).length>t&&n.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function h(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}var d="0123456789abcdef";function p(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r=d[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(s(e)){for(var o="0x",a=0;a<e.length;a++){var u=e[a];o+=d[(240&u)>>4]+d[15&u]}return o}return n.throwArgumentError("invalid hexlify value","value",e)}function v(e){if("string"!==typeof e)e=p(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function y(e,t,r){return"string"!==typeof e?e=p(e):(!h(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function b(e){var t="0x";return e.forEach((function(e){t+=p(e).substring(2)})),t}function g(e){var t=m(p(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function m(e){"string"!==typeof e&&(e=p(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}function w(e,t){for("string"!==typeof e?e=p(e):h(e)||n.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function k(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(a(e)){var r=u(e);65!==r.length&&n.throwArgumentError("invalid signature string; must be 65 bytes","signature",e),t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64)),t.v=r[64],t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=p(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var i=l(u(t._vs),32);t._vs=p(i);var o=i[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),i[0]&=127;var s=p(i);null==t.s?t.s=s:t.s!==s&&n.throwArgumentError("signature v mismatch _vs","signature",e)}null==t.recoveryParam?null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2:null==t.v?t.v=27+t.recoveryParam:t.recoveryParam!==1-t.v%2&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e),null!=t.r&&h(t.r)?t.r=w(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=w(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);var c=u(t.s);c[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(c[0]|=128);var f=p(c);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=w(t._vs,32)),null==t._vs?t._vs=f:t._vs!==f&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t}function S(e){return p(c([(e=k(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(5),i=r(7),o=!1,a=!1,s={debug:1,default:2,info:2,warning:3,error:4,off:5},u=s.default,c=null;var f,l,h=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(f||(f={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(l||(l={}));var d=function(){function e(t){Object(n.a)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return Object(i.a)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==s[r]&&this.throwArgumentError("invalid log level name","logLevel",e),u>s[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this._log(e.levels.DEBUG,r)}},{key:"info",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this._log(e.levels.INFO,r)}},{key:"warn",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this._log(e.levels.WARNING,r)}},{key:"makeError",value:function(t,r,n){if(a)return this.makeError("censored error",r,{});r||(r=e.errors.UNKNOWN_ERROR),n||(n={});var i=[];Object.keys(n).forEach((function(e){try{i.push(e+"="+JSON.stringify(n[e]))}catch(s){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var o=t;i.length&&(t+=" ("+i.join(", ")+")");var s=new Error(t);return s.reason=o,s.code=r,Object.keys(n).forEach((function(e){s[e]=n[e]})),s}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),h&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:h})}},{key:"checkSafeUint53",value:function(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",t<r&&this.throwError("missing argument"+n,e.errors.MISSING_ARGUMENT,{count:t,expectedCount:r}),t>r&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return c||(c=new e("logger/5.3.0")),c}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}a=!!t,o=!!r}},{key:"setLogLevel",value:function(t){var r=s[t.toLowerCase()];null!=r?u=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();d.errors=l,d.levels=f},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",(function(){return n}))},function(e,t){function r(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}r.d(t,"a",(function(){return i}))},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(144);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(n.a)(e,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(37),i=r(227);function o(e){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=r(17);function s(e,t){return!t||"object"!==o(t)&&"function"!==typeof t?Object(a.a)(e):t}function u(e){var t=Object(i.a)();return function(){var r,i=Object(n.a)(e);if(t){var o=Object(n.a)(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return s(this,r)}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(100);function i(e,t){if(null==e)return{};var r,i,o=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},function(e,t,r){"use strict";(function(e){var n=r(550),i=r(551),o=r(335);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(e,t,r);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,r,n):"string"===typeof t?function(e,t,r){"string"===typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=s(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|d(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(n=t.length)!==n?s(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|d(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return K(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.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:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"===typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){l=!1;break}if(l)return o}return-1}function m(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function w(e,t,r,n){return V(K(t,e.length-r),e,r,n)}function k(e,t,r,n){return V(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return k(e,t,r,n)}function E(e,t,r,n){return V(z(t),e,r,n)}function _(e,t,r,n){return V(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128===(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,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(e,t,r){return function(e,t,r,n){return f(t),t<=0?s(e,t):void 0!==r?"string"===typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).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(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):v.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"===typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function M(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function O(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=F(e[o]);return i}function I(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function P(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function B(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function D(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<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),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,n){if("string"===typeof e){if("string"===typeof t?(n=t,t=0,r=this.length):"string"===typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=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 e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:K(new u(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=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((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function V(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(36))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(576).Buffer}catch(A){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=l[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?v+r:f[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-i;s++)c[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[o-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,v=d>>>13,y=0|a[2],b=8191&y,g=y>>>13,m=0|a[3],w=8191&m,k=m>>>13,S=0|a[4],E=8191&S,_=S>>>13,A=0|a[5],x=8191&A,T=A>>>13,M=0|a[6],C=8191&M,O=M>>>13,I=0|a[7],P=8191&I,R=I>>>13,B=0|a[8],D=8191&B,N=B>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],K=8191&F,z=F>>>13,V=0|s[1],H=8191&V,J=V>>>13,q=0|s[2],G=8191&q,X=q>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,K)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(v,K)|0,o=Math.imul(v,z);var be=(c+(n=n+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,K),i=(i=Math.imul(b,z))+Math.imul(g,K)|0,o=Math.imul(g,z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,J)|0;var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(k,K)|0,o=Math.imul(k,z),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,X)|0;var me=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(E,K),i=(i=Math.imul(E,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var ke=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(C,K),i=(i=Math.imul(C,z))+Math.imul(O,K)|0,o=Math.imul(O,z),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var Se=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,K),i=(i=Math.imul(P,z))+Math.imul(R,K)|0,o=Math.imul(R,z),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var Ee=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(N,K)|0,o=Math.imul(N,z),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var _e=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ae=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,J))+Math.imul(U,H)|0,o=Math.imul(U,J),n=n+Math.imul(D,G)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0;var xe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,X))+Math.imul(U,G)|0,o=Math.imul(U,X),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Te=(c+(n=n+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ve)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,Y))+Math.imul(U,Z)|0,o=Math.imul(U,Y),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,he)|0;var Me=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,he)|0;var Ce=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Oe=(c+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ve)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Ie=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,he)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,le),i=(i=Math.imul(j,he))+Math.imul(U,le)|0,o=Math.imul(U,he);var Re=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ve)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ve))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ve))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=be,u[2]=ge,u[3]=me,u[4]=we,u[5]=ke,u[6]=Se,u[7]=Ee,u[8]=_e,u[9]=Ae,u[10]=xe,u[11]=Te,u[12]=Me,u[13]=Ce,u[14]=Oe,u[15]=Ie,u[16]=Pe,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function v(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,l=(0|e.words[f])*(0|t.words[c]),h=67108863&l;s=67108863&(h=h+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},y.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=u,h=c,d=0;d<a;d++){var p=r[f+d],v=n[f+d],y=r[f+d+a],b=n[f+d+a],g=l*y-h*b;b=l*b+h*y,y=g,r[f+d]=p+y,n[f+d]=v+b,r[f+d+a]=p-y,n[f+d+a]=v-b,d!==s&&(g=u*l-c*h,h=u*h+c*l,l=g)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0===(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,l,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*l[d];u[d]=s[d]*l[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),v(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"===typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(m,g),m.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},m.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,g),i(k,g),i(S,g),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new m;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return b[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,y=0;0!==v.cmp(s);y++)v=v.redSqr();n(y<p);var b=this.pow(l,new o(1).iushln(p-y-1));h=h.redMul(b),l=b.redSqr(),d=d.redMul(l),p=y}return h},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new _(e)},i(_,E),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(156)(e))},function(e,t,r){"use strict";function n(e,t){for(var r in t)Object.defineProperty(e,r,{value:t[r],enumerable:!0,configurable:!0});return e}e.exports=function(e,t,r){if(!e||"string"===typeof e)throw new TypeError("Please pass an Error to err-code");r||(r={}),"object"===typeof t&&(r=t,t=""),t&&(r.code=t);try{return n(e,r)}catch(o){r.message=e.message,r.stack=e.stack;var i=function(){};return i.prototype=Object.create(Object.getPrototypeOf(e)),n(new i,r)}}},function(e,t,r){"use strict";function n(e){var t,r,i="";if("string"===typeof e||"number"===typeof e)i+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=" "),i+=r);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}t.a=function(){for(var e,t,r=0,i="";r<arguments.length;)(e=arguments[r++])&&(t=n(e))&&(i&&(i+=" "),i+=t);return i}},function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,"a",(function(){return n}))},function(e,t){e.exports={options:{usePureJavaScript:!1}}},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=r.n(o),s=(r(24),r(508)),u=r.n(s),c=r(1081),f=r(1115),l=r(520),h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){var o=t.defaultTheme,s=t.withTheme,h=void 0!==s&&s,d=t.name,p=Object(i.a)(t,["defaultTheme","withTheme","name"]);var v=d,y=Object(c.a)(e,Object(n.a)({defaultTheme:o,Component:r,name:d||r.displayName,classNamePrefix:v},p)),b=a.a.forwardRef((function(e,t){e.classes;var s,u=e.innerRef,c=Object(i.a)(e,["classes","innerRef"]),p=y(Object(n.a)({},r.defaultProps,e)),v=c;return("string"===typeof d||h)&&(s=Object(l.a)()||o,d&&(v=Object(f.a)({theme:s,name:d,props:c})),h&&!v.theme&&(v.theme=s)),a.a.createElement(r,Object(n.a)({ref:u||t,classes:p},v))}));return u()(b,r),b}},d=r(145);t.a=function(e,t){return h(e,Object(n.a)({defaultTheme:d.a},t))}},function(e,t,r){"use strict";e.exports=r(1062)},function(e,t,r){var n=r(188);e.exports=function(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}},function(e,t,r){(function(n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(r){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(r){}!e&&"undefined"!==typeof n&&"env"in n&&(e=Object({NODE_ENV:"production",PUBLIC_URL:"/js-waku/eth-pm-wallet",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).DEBUG);return e},t.useColors=function(){if("undefined"!==typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=function(){var e=!1;return function(){e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=r(658)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,r(39))},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){e.exports=r(1063)()},function(e,t,r){"use strict";function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}r.d(t,"a",(function(){return i}))},function(e,t,r){var n=r(241);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},function(e,t,r){var n=r(84),i=r(341),o=r(342);e.exports=function(e){var t=i();return function(){var r,i=n(e);if(t){var a=n(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return o(this,r)}}},function(e,t,r){var n=r(13),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){var n=r(86);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},function(e,t){e.exports=function(e){var t;if("undefined"!==typeof Symbol){if(Symbol.asyncIterator&&null!=(t=e[Symbol.asyncIterator]))return t.call(e);if(Symbol.iterator&&null!=(t=e[Symbol.iterator]))return t.call(e)}throw new TypeError("Object is not async iterable")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(519);function i(e){if("string"!==typeof e)throw new Error(Object(n.a)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},function(e,t,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(c(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var r,n,a,s,u,c,f,l,h,d=1,p=e.length,v="";for(n=0;n<p;n++)if("string"===typeof e[n])v+=e[n];else if("object"===typeof e[n]){if((s=e[n]).keys)for(r=t[d],a=0;a<s.keys.length;a++){if(void 0==r)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));r=r[s.keys[a]]}else r=s.param_no?t[s.param_no]:t[d++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),i.numeric_arg.test(s.type)&&"number"!==typeof r&&isNaN(r))throw new TypeError(o("[sprintf] expecting number but found %T",r));switch(i.number.test(s.type)&&(l=r>=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=r:(!i.number.test(s.type)||l&&!s.sign?h="":(h=l?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",f=s.width-(h+r).length,u=s.width&&f>0?c.repeat(f):"",v+=s.align?h+r+u:"0"===c?h+u+r:u+h+r)}return v}var u=Object.create(null);function c(e){if(u[e])return u[e];for(var t,r=e,n=[],o=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],c=[];if(null===(c=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=i.key_access.exec(s)))a.push(c[1]);else{if(null===(c=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return u[e]=n}t.sprintf=o,t.vsprintf=a,"undefined"!==typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(t,r,t,e))||(e.exports=n))}()},,function(e,t,r){(function(t,n,i,o){var a=r(18),s=r(746),u=e.exports=a.util=a.util||{};function c(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function f(e){if(this.data="",this.read=0,"string"===typeof e)this.data=e;else if(u.isArrayBuffer(e)||u.isArrayBufferView(e))if("undefined"!==typeof o&&e instanceof o)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(n){for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof f||"object"===typeof e&&"string"===typeof e.data&&"number"===typeof e.read)&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}!function(){if("undefined"!==typeof t&&t.nextTick&&!t.browser)return u.nextTick=t.nextTick,void(u.setImmediate="function"===typeof n?n:u.nextTick);if("function"===typeof n)return u.setImmediate=function(){return n.apply(void 0,arguments)},void(u.nextTick=function(e){return n(e)});if(u.setImmediate=function(e){setTimeout(e,0)},"undefined"!==typeof window&&"function"===typeof window.postMessage){var e="forge.setImmediate",r=[];u.setImmediate=function(t){r.push(t),1===r.length&&window.postMessage(e,"*")},window.addEventListener("message",(function(t){if(t.source===window&&t.data===e){t.stopPropagation();var n=r.slice();r.length=0,n.forEach((function(e){e()}))}}),!0)}if("undefined"!==typeof MutationObserver){var i=Date.now(),o=!0,a=document.createElement("div");r=[];new MutationObserver((function(){var e=r.slice();r.length=0,e.forEach((function(e){e()}))})).observe(a,{attributes:!0});var s=u.setImmediate;u.setImmediate=function(e){Date.now()-i>15?(i=Date.now(),s(e)):(r.push(e),1===r.length&&a.setAttribute("a",o=!o))}}u.nextTick=u.setImmediate}(),u.isNodejs="undefined"!==typeof t&&t.versions&&t.versions.node,u.globalScope=u.isNodejs?i:"undefined"===typeof self?window:self,u.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u.isArrayBuffer=function(e){return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer},u.isArrayBufferView=function(e){return e&&u.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},u.ByteBuffer=f,u.ByteStringBuffer=f;u.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},u.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},u.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},u.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},u.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},u.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},u.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(u.encodeUtf8(e))},u.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},u.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},u.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},u.ByteStringBuffer.prototype.putInt=function(e,t){c(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},u.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},u.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},u.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},u.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},u.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},u.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},u.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},u.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},u.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},u.ByteStringBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.charCodeAt(this.read++),e-=8}while(e>0);return t},u.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},u.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.ByteStringBuffer.prototype.bytes=function(e){return"undefined"===typeof e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},u.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},u.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},u.ByteStringBuffer.prototype.copy=function(){var e=u.createBuffer(this.data);return e.read=this.read,e},u.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},u.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},u.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},u.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e},u.ByteStringBuffer.prototype.toString=function(){return u.decodeUtf8(this.bytes())},u.DataBuffer=function(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=u.isArrayBuffer(e),n=u.isArrayBufferView(e);if(r||n)return this.data=r?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),void(this.write="writeOffset"in t?t.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==e&&void 0!==e&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)},u.DataBuffer.prototype.length=function(){return this.write-this.read},u.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},u.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},u.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},u.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this},u.DataBuffer.prototype.putBytes=function(e,t){if(u.isArrayBufferView(e)){var r=(n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).byteLength-n.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(n),this.write+=r,this}if(u.isArrayBuffer(e)){var n=new Uint8Array(e);return this.accommodate(n.byteLength),new Uint8Array(this.data.buffer).set(n,this.write),this.write+=n.byteLength,this}if(e instanceof u.DataBuffer||"object"===typeof e&&"number"===typeof e.read&&"number"===typeof e.write&&u.isArrayBufferView(e.data)){n=new Uint8Array(e.data.byteLength,e.read,e.length());return this.accommodate(n.byteLength),new Uint8Array(e.data.byteLength,this.write).set(n),this.write+=n.byteLength,this}if(e instanceof u.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary","string"===typeof e){var i;if("hex"===t)return this.accommodate(Math.ceil(e.length/2)),i=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.hex.decode(e,i,this.write),this;if("base64"===t)return this.accommodate(3*Math.ceil(e.length/4)),i=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.base64.decode(e,i,this.write),this;if("utf8"===t&&(e=u.encodeUtf8(e),t="binary"),"binary"===t||"raw"===t)return this.accommodate(e.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=u.binary.raw.decode(i),this;if("utf16"===t)return this.accommodate(2*e.length),i=new Uint16Array(this.data.buffer,this.write),this.write+=u.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},u.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},u.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},u.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},u.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},u.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},u.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},u.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},u.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},u.DataBuffer.prototype.putInt=function(e,t){c(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},u.DataBuffer.prototype.putSignedInt=function(e,t){return c(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},u.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},u.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},u.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},u.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},u.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},u.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},u.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},u.DataBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.getInt8(this.read++),e-=8}while(e>0);return t},u.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},u.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.DataBuffer.prototype.bytes=function(e){return"undefined"===typeof e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},u.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},u.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},u.DataBuffer.prototype.copy=function(){return new u.DataBuffer(this)},u.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},u.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},u.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},u.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e},u.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if("binary"===(e=e||"utf8")||"raw"===e)return u.binary.raw.encode(t);if("hex"===e)return u.binary.hex.encode(t);if("base64"===e)return u.binary.base64.encode(t);if("utf8"===e)return u.text.utf8.decode(t);if("utf16"===e)return u.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},u.createBuffer=function(e,t){return t=t||"raw",void 0!==e&&"utf8"===t&&(e=u.encodeUtf8(e)),new u.ByteBuffer(e)},u.fillString=function(e,t){for(var r="";t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},u.xorBytes=function(e,t,r){for(var n="",i="",o="",a=0,s=0;r>0;--r,++a)i=e.charCodeAt(a)^t.charCodeAt(a),s>=10&&(n+=o,o="",s=0),o+=String.fromCharCode(i),++s;return n+=o},u.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},u.bytesToHex=function(e){return u.createBuffer(e).toHex()},u.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,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,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],d="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";u.encode64=function(e,t){for(var r,n,i,o="",a="",s=0;s<e.length;)r=e.charCodeAt(s++),n=e.charCodeAt(s++),i=e.charCodeAt(s++),o+=l.charAt(r>>2),o+=l.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=l.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":l.charAt(63&i)),t&&o.length>t&&(a+=o.substr(0,t)+"\r\n",o=o.substr(t));return a+=o},u.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,o="",a=0;a<e.length;)t=h[e.charCodeAt(a++)-43],r=h[e.charCodeAt(a++)-43],n=h[e.charCodeAt(a++)-43],i=h[e.charCodeAt(a++)-43],o+=String.fromCharCode(t<<2|r>>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},u.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},u.decodeUtf8=function(e){return decodeURIComponent(escape(e))},u.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},u.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},u.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o<e.length;++o)n[i++]=e.charCodeAt(o);return t?i-r:n},u.binary.hex.encode=u.bytesToHex,u.binary.hex.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/2)));var i=0,o=r=r||0;for(1&e.length&&(i=1,n[o++]=parseInt(e[0],16));i<e.length;i+=2)n[o++]=parseInt(e.substr(i,2),16);return t?o-r:n},u.binary.base64.encode=function(e,t){for(var r,n,i,o="",a="",s=0;s<e.byteLength;)r=e[s++],n=e[s++],i=e[s++],o+=l.charAt(r>>2),o+=l.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=l.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":l.charAt(63&i)),t&&o.length>t&&(a+=o.substr(0,t)+"\r\n",o=o.substr(t));return a+=o},u.binary.base64.decode=function(e,t,r){var n,i,o,a,s=t;s||(s=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,c=r=r||0;u<e.length;)n=h[e.charCodeAt(u++)-43],i=h[e.charCodeAt(u++)-43],o=h[e.charCodeAt(u++)-43],a=h[e.charCodeAt(u++)-43],s[c++]=n<<2|i>>4,64!==o&&(s[c++]=(15&i)<<4|o>>2,64!==a&&(s[c++]=(3&o)<<6|a));return t?c-r:s.subarray(0,c)},u.binary.base58.encode=function(e,t){return u.binary.baseN.encode(e,d,t)},u.binary.base58.decode=function(e,t){return u.binary.baseN.decode(e,d,t)},u.text={utf8:{},utf16:{}},u.text.utf8.encode=function(e,t,r){e=u.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o<e.length;++o)n[i++]=e.charCodeAt(o);return t?i-r:n},u.text.utf8.decode=function(e){return u.decodeUtf8(String.fromCharCode.apply(null,e))},u.text.utf16.encode=function(e,t,r){var n=t;n||(n=new Uint8Array(2*e.length));for(var i=new Uint16Array(n.buffer),o=r=r||0,a=r,s=0;s<e.length;++s)i[a++]=e.charCodeAt(s),o+=2;return t?o-r:n},u.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},u.deflate=function(e,t,r){if(t=u.decode64(e.deflate(u.encode64(t)).rval),r){var n=2;32&t.charCodeAt(1)&&(n=6),t=t.substring(n,t.length-4)}return t},u.inflate=function(e,t,r){var n=e.inflate(u.encode64(t)).rval;return null===n?null:u.decode64(n)};var p=function(e,t,r){if(!e)throw new Error("WebStorage not available.");var n;if(null===r?n=e.removeItem(t):(r=u.encode64(JSON.stringify(r)),n=e.setItem(t,r)),"undefined"!==typeof n&&!0!==n.rval){var i=new Error(n.error.message);throw i.id=n.error.id,i.name=n.error.name,i}},v=function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(null===r.rval){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(u.decode64(r))),r},y=function(e,t,r,n){var i=v(e,t);null===i&&(i={}),i[r]=n,p(e,t,i)},b=function(e,t,r){var n=v(e,t);return null!==n&&(n=r in n?n[r]:null),n},g=function(e,t,r){var n=v(e,t);if(null!==n&&r in n){delete n[r];var i=!0;for(var o in n){i=!1;break}i&&(n=null),p(e,t,n)}},m=function(e,t){p(e,t,null)},w=function(e,t,r){var n,i=null;"undefined"===typeof r&&(r=["web","flash"]);var o=!1,a=null;for(var s in r){n=r[s];try{if("flash"===n||"both"===n){if(null===t[0])throw new Error("Flash local storage not available.");i=e.apply(this,t),o="flash"===n}"web"!==n&&"both"!==n||(t[0]=localStorage,i=e.apply(this,t),o=!0)}catch(u){a=u}if(o)break}if(!o)throw a;return i};u.setItem=function(e,t,r,n,i){w(y,arguments,i)},u.getItem=function(e,t,r,n){return w(b,arguments,n)},u.removeItem=function(e,t,r,n){w(g,arguments,n)},u.clearItems=function(e,t,r){w(m,arguments,r)},u.parseUrl=function(e){var t=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;t.lastIndex=0;var r=t.exec(e),n=null===r?null:{full:e,scheme:r[1],host:r[2],port:r[3],path:r[4]};return n&&(n.fullHost=n.host,n.port?(80!==n.port&&"http"===n.scheme||443!==n.port&&"https"===n.scheme)&&(n.fullHost+=":"+n.port):"http"===n.scheme?n.port=80:"https"===n.scheme&&(n.port=443),n.full=n.scheme+"://"+n.fullHost),n};var k=null;u.getQueryVariables=function(e){var t,r=function(e){for(var t={},r=e.split("&"),n=0;n<r.length;n++){var i,o,a=r[n].indexOf("=");a>0?(i=r[n].substring(0,a),o=r[n].substring(a+1)):(i=r[n],o=null),i in t||(t[i]=[]),i in Object.prototype||null===o||t[i].push(unescape(o))}return t};return"undefined"===typeof e?(null===k&&(k="undefined"!==typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=k):t=r(e),t},u.parseFragment=function(e){var t=e,r="",n=e.indexOf("?");n>0&&(t=e.substring(0,n),r=e.substring(n+1));var i=t.split("/");return i.length>0&&""===i[0]&&i.shift(),{pathString:t,queryString:r,path:i,query:""===r?{}:u.getQueryVariables(r)}},u.makeRequest=function(e){var t=u.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return"undefined"===typeof e?t.path:t.path[e]},getQuery:function(e,r){var n;return"undefined"===typeof e?n=t.query:(n=t.query[e])&&"undefined"!==typeof r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e);return n?n[n.length-1]:t}};return r},u.makeLink=function(e,t,r){e=jQuery.isArray(e)?e.join("/"):e;var n=jQuery.param(t||{});return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},u.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},u.format=function(e){for(var t,r,n=/%./g,i=0,o=[],a=0;t=n.exec(e);){(r=e.substring(a,n.lastIndex-2)).length>0&&o.push(r),a=n.lastIndex;var s=t[0][1];switch(s){case"s":case"o":i<arguments.length?o.push(arguments[1+i++]):o.push("<?>");break;case"%":o.push("%");break;default:o.push("<%"+s+"?>")}}return o.push(e.substring(a)),o.join("")},u.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,a=void 0===r?",":r,s=void 0===n?".":n,u=i<0?"-":"",c=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",f=c.length>3?c.length%3:0;return u+(f?c.substr(0,f)+s:"")+c.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+s)+(o?a+Math.abs(i-c).toFixed(o).slice(2):"")},u.formatSize=function(e){return e=e>=1073741824?u.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?u.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?u.formatNumber(e/1024,0)+" KiB":u.formatNumber(e,0)+" bytes"},u.bytesFromIP=function(e){return-1!==e.indexOf(".")?u.bytesFromIPv4(e):-1!==e.indexOf(":")?u.bytesFromIPv6(e):null},u.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=u.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10);if(isNaN(n))return null;t.putByte(n)}return t.getBytes()},u.bytesFromIPv6=function(e){for(var t=0,r=2*(8-(e=e.split(":").filter((function(e){return 0===e.length&&++t,!0}))).length+t),n=u.createBuffer(),i=0;i<8;++i)if(e[i]&&0!==e[i].length){var o=u.hexToBytes(e[i]);o.length<2&&n.putByte(0),n.putBytes(o)}else n.fillWithByte(0,r),r=0;return n.getBytes()},u.bytesToIP=function(e){return 4===e.length?u.bytesToIPv4(e):16===e.length?u.bytesToIPv6(e):null},u.bytesToIPv4=function(e){if(4!==e.length)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")},u.bytesToIPv6=function(e){if(16!==e.length)return null;for(var t=[],r=[],n=0,i=0;i<e.length;i+=2){for(var o=u.bytesToHex(e[i]+e[i+1]);"0"===o[0]&&"0"!==o;)o=o.substr(1);if("0"===o){var a=r[r.length-1],s=t.length;a&&s===a.end+1?(a.end=s,a.end-a.start>r[n].end-r[n].start&&(n=r.length-1)):r.push({start:s,end:s})}t.push(o)}if(r.length>0){var c=r[n];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),0===c.start&&t.unshift(""),7===c.end&&t.push(""))}return t.join(":")},u.estimateCores=function(e,t){if("function"===typeof e&&(t=e,e={}),e=e||{},"cores"in u&&!e.update)return t(null,u.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return u.cores=navigator.hardwareConcurrency,t(null,u.cores);if("undefined"===typeof Worker)return u.cores=1,t(null,u.cores);if("undefined"===typeof Blob)return u.cores=2,t(null,u.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),r=t+4;Date.now()<r;);self.postMessage({st:t,et:r})}))}.toString(),")()"],{type:"application/javascript"}));!function e(n,i,o){if(0===i){var a=Math.floor(n.reduce((function(e,t){return e+t}),0)/n.length);return u.cores=Math.max(1,a),URL.revokeObjectURL(r),t(null,u.cores)}!function(e,t){for(var n=[],i=[],o=0;o<e;++o){var a=new Worker(r);a.addEventListener("message",(function(r){if(i.push(r.data),i.length===e){for(var o=0;o<e;++o)n[o].terminate();t(null,i)}})),n.push(a)}for(o=0;o<e;++o)n[o].postMessage(o)}(o,(function(t,r){n.push(function(e,t){for(var r=[],n=0;n<e;++n)for(var i=t[n],o=r[n]=[],a=0;a<e;++a)if(n!==a){var s=t[a];(i.st>s.st&&i.st<s.et||s.st>i.st&&s.st<i.et)&&o.push(a)}return r.reduce((function(e,t){return Math.max(e,t.length)}),0)}(o,r)),e(n,i-1,o)}))}([],5,16)}}).call(this,r(39),r(246).setImmediate,r(36),r(13).Buffer)},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),i=r(80);function o(e,t){return n.useMemo((function(){return null==e&&null==t?null:function(r){Object(i.a)(e,r),Object(i.a)(t,r)}}),[e,t])}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=r(529)},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"===typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!f){var e=s(h);f=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||f||s(d)},p.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=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){var n=r(338),i=r(552),o=r(188),a=r(339);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()}},function(e,t,r){"use strict";e.exports=r(748)},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(661),u=r(195),c=r(91),f=r(90).CID,l=r(58).base58btc,h=r(15),d=Symbol.for("nodejs.util.inspect.custom"),p=r(194).toString,v=r(668).equals,y=new Map,b=Symbol.for("@multiformats/js-multiaddr/multiaddr"),g=function(){function e(t){if(o(this,e),null==t&&(t=""),Object.defineProperty(this,b,{value:!0}),t instanceof Uint8Array)this.bytes=s.fromBytes(t);else if("string"===typeof t){if(t.length>0&&"/"!==t.charAt(0))throw new Error('multiaddr "'.concat(t,'" must start with a "/"'));this.bytes=s.fromString(t)}else{if(!e.isMultiaddr(t))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.bytes=s.fromBytes(t.bytes)}}return a(e,[{key:"toString",value:function(){return s.bytesToString(this.bytes)}},{key:"toJSON",value:function(){return this.toString()}},{key:"toOptions",value:function(){var e={},t=this.toString().split("/");return e.family="ip4"===t[1]?4:6,e.host=t[2],e.transport=t[3],e.port=parseInt(t[4]),e}},{key:"protos",value:function(){return this.protoCodes().map((function(e){return Object.assign({},u(e))}))}},{key:"protoCodes",value:function(){for(var e=[],t=this.bytes,r=0;r<t.length;){var n=c.decode(t,r),i=c.decode.bytes,o=u(n);r+=s.sizeForAddr(o,t.slice(r+i))+i,e.push(n)}return e}},{key:"protoNames",value:function(){return this.protos().map((function(e){return e.name}))}},{key:"tuples",value:function(){return s.bytesToTuples(this.bytes)}},{key:"stringTuples",value:function(){var e=s.bytesToTuples(this.bytes);return s.tuplesToStringTuples(e)}},{key:"encapsulate",value:function(t){return t=new e(t),new e(this.toString()+t.toString())}},{key:"decapsulate",value:function(t){var r=t.toString(),n=this.toString(),i=n.lastIndexOf(r);if(i<0)throw new Error("Address "+this+" does not contain subaddress: "+t);return new e(n.slice(0,i))}},{key:"decapsulateCode",value:function(t){for(var r=this.tuples(),n=r.length-1;n>=0;n--)if(r[n][0]===t)return new e(s.tuplesToBytes(r.slice(0,n)));return this}},{key:"getPeerId",value:function(){try{var e=this.stringTuples().filter((function(e){return e[0]===u.names.ipfs.code})).pop();if(e&&e[1]){var t=e[1];return"Q"===t[0]||"1"===t[0]?p(l.decode("z".concat(t)),"base58btc"):p(f.parse(t).multihash.bytes,"base58btc")}return null}catch(r){return null}}},{key:"getPath",value:function(){var e=null;try{(e=this.stringTuples().filter((function(e){return!!u(e[0]).path}))[0][1])||(e=null)}catch(t){e=null}return e}},{key:"equals",value:function(e){return v(this.bytes,e.bytes)}},{key:"resolve",value:function(){var t=i(n.mark((function t(){var r,i,o;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.protos().find((function(e){return e.resolvable}))){t.next=3;break}return t.abrupt("return",[this]);case 3:if(i=y.get(r.name)){t.next=6;break}throw h(new Error("no available resolver for ".concat(r.name)),"ERR_NO_AVAILABLE_RESOLVER");case 6:return t.next=8,i(this);case 8:return o=t.sent,t.abrupt("return",o.map((function(t){return new e(t)})));case 10:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"nodeAddress",value:function(){var e=this.protoCodes(),t=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==e[0]&&41!==e[0]&&54!==e[0]&&55!==e[0])throw new Error("no protocol with name: \"'".concat(t[0],'\'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".'));if("tcp"!==r[2]&&"udp"!==r[2])throw new Error("no protocol with name: \"'".concat(t[1],'\'". Must have a valid transport protocol: "{tcp, udp}".'));return{family:41===e[0]||55===e[0]?6:4,address:r[1],port:parseInt(r[3])}}},{key:"isThinWaistAddress",value:function(e){var t=(e||this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||273===t[1].code))}},{key:d,value:function(){return"<Multiaddr "+p(this.bytes,"base16")+" - "+s.bytesToString(this.bytes)+">"}},{key:"inspect",value:function(){return"<Multiaddr "+p(this.bytes,"base16")+" - "+s.bytesToString(this.bytes)+">"}}],[{key:"fromNodeAddress",value:function(t,r){if(!t)throw new Error("requires node address object");if(!r)throw new Error("requires transport protocol");var n;switch(t.family){case 4:n="ip4";break;case 6:n="ip6";break;default:throw Error("Invalid addr family. Got '".concat(t.family,"' instead of 4 or 6"))}return new e("/"+[n,t.address,r,t.port].join("/"))}},{key:"isName",value:function(t){return!!e.isMultiaddr(t)&&t.protos().some((function(e){return e.resolvable}))}},{key:"isMultiaddr",value:function(t){return t instanceof e||Boolean(t&&t[b])}}]),e}();g.protocols=u,g.resolvers=y,e.exports={Multiaddr:g,multiaddr:function(e){return new g(e)},protocols:u,resolvers:y}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(29),u=r(90).CID,c=r(67),f=r(162),l=r(58),h=r(63),d=r(58).base58btc,p=r(67).base32,v=r(161).base16,y=r(88),b=r(268),g=r(170),m=r(797).PeerIdProto,w=r(798).equals,k=r(799).fromString,S=r(800).toString,E=r(89).identity,_=s(s(s(s({},c),f),l),h),A=Object.keys(_).reduce((function(e,t){return e.or(_[t])}),p.decoder),x=g(function(){function e(t,r,n){if(o(this,e),!(t instanceof Uint8Array))throw new Error("invalid id provided");if(r&&n&&!w(r.public.bytes,n.bytes))throw new Error("inconsistent arguments");this._id=t,this._idB58String=d.encode(this.id).substring(1),this._privKey=r,this._pubKey=n}return a(e,[{key:"id",get:function(){return this._id},set:function(e){throw new Error("Id is immutable")}},{key:"privKey",get:function(){return this._privKey},set:function(e){this._privKey=e}},{key:"pubKey",get:function(){if(this._pubKey)return this._pubKey;if(this._privKey)return this._privKey.public;try{var e=y.decode(this.id);e.code===E.code&&(this._pubKey=b.unmarshalPublicKey(e.digest))}catch(t){}return this._pubKey},set:function(e){this._pubKey=e}},{key:"marshalPubKey",value:function(){if(this.pubKey)return b.marshalPublicKey(this.pubKey)}},{key:"marshalPrivKey",value:function(){if(this.privKey)return b.marshalPrivateKey(this.privKey)}},{key:"marshal",value:function(e){return m.encode({id:this.toBytes(),pubKey:this.marshalPubKey(),privKey:e?null:this.marshalPrivKey()}).finish()}},{key:"toPrint",value:function(){var e=this.toB58String();e.startsWith("Qm")&&(e=e.slice(2));var t=6;return e.length<t&&(t=e.length),"<peer.ID "+e.substr(0,t)+">"}},{key:"toJSON",value:function(){return{id:this.toB58String(),privKey:O(this.marshalPrivKey()),pubKey:O(this.marshalPubKey())}}},{key:"toHexString",value:function(){return v.encode(this.id).substring(1)}},{key:"toBytes",value:function(){return this.id}},{key:"toB58String",value:function(){return this._idB58String}},{key:"toString",value:function(){if(!this._idCIDString){var e=u.createV1(114,y.decode(this.id));Object.defineProperty(this,"_idCIDString",{value:e.toString(),enumerable:!1})}return this._idCIDString}},{key:"equals",value:function(e){if(e instanceof Uint8Array)return w(this.id,e);if(e.id)return w(this.id,e.id);throw new Error("not valid Id")}},{key:"isEqual",value:function(e){return this.equals(e)}},{key:"isValid",value:function(){return Boolean(this.privKey&&this.privKey.public&&this.privKey.public.bytes&&this.pubKey.bytes instanceof Uint8Array&&w(this.privKey.public.bytes,this.pubKey.bytes))}},{key:"hasInlinePublicKey",value:function(){try{if(y.decode(this.id).code===E.code)return!0}catch(e){}return!1}}]),e}(),{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"});t=e.exports=x;var T=function(e){return e.bytes.length<=42?y.create(E.code,e.bytes).bytes:e.hash()},M=function(){var e=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T(r);case 2:return i=e.sent,e.abrupt("return",new x(i,t,r));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.create=function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=t||{}).bits=t.bits||2048,t.keyType=t.keyType||"RSA",e.next=5,b.generateKeyPair(t.keyType,t.bits);case 5:return r=e.sent,e.abrupt("return",M(r,r.public));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromHexString=function(e){return new x(v.decode("f"+e))},t.createFromBytes=function(e){try{var r=u.decode(e);if(!C(r))throw new Error("Supplied PeerID CID is invalid");return t.createFromCID(r)}catch(n){if(y.decode(e).code!==E.code)throw new Error("Supplied PeerID CID is invalid");return new x(e)}},t.createFromB58String=function(e){return t.createFromBytes(d.decode("z"+e))};var C=function(e){return 114===e.code||112===e.code};function O(e){if(e)return S(e,"base64pad")}t.createFromCID=function(e){if(!(e=u.asCID(e))||!C(e))throw new Error("Supplied PeerID CID is invalid");return new x(e.multihash.bytes)},t.createFromPubKey=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof(r=t)&&(r=k(t,"base64pad")),r instanceof Uint8Array){e.next=4;break}throw new Error("Supplied key is neither a base64 string nor a Uint8Array");case 4:return e.next=6,b.unmarshalPublicKey(r);case 6:return i=e.sent,e.abrupt("return",M(void 0,i));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromPrivKey=function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t&&(t=k(t,"base64pad")),t instanceof Uint8Array){e.next=3;break}throw new Error("Supplied key is neither a base64 string nor a Uint8Array");case 3:return e.next=5,b.unmarshalPrivateKey(t);case 5:return r=e.sent,e.abrupt("return",M(r,r.public));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromJSON=function(){var e=i(n.mark((function e(t){var r,i,o,a,s,u,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=d.decode("z"+t.id),i=t.privKey&&k(t.privKey,"base64pad"),o=t.pubKey&&k(t.pubKey,"base64pad"),e.t0=o,!e.t0){e.next=8;break}return e.next=7,b.unmarshalPublicKey(o);case 7:e.t0=e.sent;case 8:if(a=e.t0,i){e.next=11;break}return e.abrupt("return",new x(r,void 0,a));case 11:return e.next=13,b.unmarshalPrivateKey(i);case 13:return s=e.sent,e.next=16,T(s.public);case 16:if(u=e.sent,!a){e.next=21;break}return e.next=20,T(a);case 20:c=e.sent;case 21:if(!a||w(u,c)){e.next=23;break}throw new Error("Public and private key do not match");case 23:if(!r||w(u,r)){e.next=25;break}throw new Error("Id and private key do not match");case 25:return e.abrupt("return",new x(r,s,a));case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromProtobuf=function(){var e=i(n.mark((function e(t){var r,i,o,a,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t&&(t=k(t,"base16")),r=m.decode(t),i=r.id,o=r.privKey,a=r.pubKey,!o){e.next=8;break}return e.next=5,b.unmarshalPrivateKey(o);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=!1;case 9:if(o=e.t0,!a){e.next=16;break}return e.next=13,b.unmarshalPublicKey(a);case 13:e.t1=e.sent,e.next=17;break;case 16:e.t1=!1;case 17:if(a=e.t1,!o){e.next=22;break}return e.next=21,T(o.public);case 21:u=e.sent;case 22:if(!a){e.next=26;break}return e.next=25,T(a);case 25:s=e.sent;case 26:if(!o){e.next=31;break}if(!a){e.next=30;break}if(w(u,s)){e.next=30;break}throw new Error("Public and private key do not match");case 30:return e.abrupt("return",new x(u,o,o.public));case 31:if(!a){e.next=33;break}return e.abrupt("return",new x(s,void 0,a));case 33:if(!i){e.next=35;break}return e.abrupt("return",new x(i));case 35:throw new Error("Protobuf did not contain any usable key material");case 36:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.parse=function(e){return"1"!==e.charAt(0)&&"Q"!==e.charAt(0)||(e="z".concat(e)),t.createFromBytes(A.decode(e))},t.isPeerId=function(e){return Boolean("object"===typeof e&&e._id&&e._idB58String)}},function(e,t,r){var n=r(823);e.exports=function(e){return function(){return new n(e.apply(this,arguments))}}},function(e,t,r){var n=r(437);e.exports=function(e){return new n(e)}},,function(e,t,r){(function(){var t;function r(e,t,r){null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function n(){return new r(null)}var i="undefined"!==typeof navigator;i&&"Microsoft Internet Explorer"==navigator.appName?(r.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,f=s*u+c*a;i=((u=a*u+((32767&f)<<15)+r[n]+(1073741823&i))>>>30)+(f>>>15)+s*c+(i>>>30),r[n++]=1073741823&u}return i},t=30):i&&"Netscape"!=navigator.appName?(r.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},t=26):(r.prototype.am=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,f=s*u+c*a;i=((u=a*u+((16383&f)<<14)+r[n]+i)>>28)+(f>>14)+s*c,r[n++]=268435455&u}return i},t=28),r.prototype.DB=t,r.prototype.DM=(1<<t)-1,r.prototype.DV=1<<t;r.prototype.FV=Math.pow(2,52),r.prototype.F1=52-t,r.prototype.F2=2*t-52;var o,a,s=new Array;for(o="0".charCodeAt(0),a=0;a<=9;++a)s[o++]=a;for(o="a".charCodeAt(0),a=10;a<36;++a)s[o++]=a;for(o="A".charCodeAt(0),a=10;a<36;++a)s[o++]=a;function u(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function c(e,t){var r=s[e.charCodeAt(t)];return null==r?-1:r}function f(e){var t=n();return t.fromInt(e),t}function l(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function h(e){this.m=e}function d(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function p(e,t){return e&t}function v(e,t){return e|t}function y(e,t){return e^t}function b(e,t){return e&~t}function g(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function m(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function w(){}function k(e){return e}function S(e){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}h.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},h.prototype.revert=function(e){return e},h.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},h.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},h.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},d.prototype.convert=function(e){var t=n();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(r.ZERO)>0&&this.m.subTo(t,t),t},d.prototype.revert=function(e){var t=n();return e.copyTo(t),this.reduce(t),t},d.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},d.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},d.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},r.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},r.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},r.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var i=e.length,o=!1,a=0;--i>=0;){var s=8==n?255&e[i]:c(e,i);s<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=n)>=this.DB&&(a-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&r.ZERO.subTo(this,this)},r.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},r.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},r.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},r.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,o=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t[r+a+1]=this[r]>>i|s,s=(this[r]&o)<<n;for(r=a-1;r>=0;--r)t[r]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},r.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t[0]=this[r]>>n;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&o)<<i,t[a-r]=this[a]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},r.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},r.prototype.multiplyTo=function(e,t){var n=this.abs(),i=e.abs(),o=n.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o<i.t;++o)t[o+n.t]=n.am(0,i[o],t,o,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&r.ZERO.subTo(t,t)},r.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},r.prototype.divRemTo=function(e,t,i){var o=e.abs();if(!(o.t<=0)){var a=this.abs();if(a.t<o.t)return null!=t&&t.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=n());var s=n(),u=this.s,c=e.s,f=this.DB-l(o[o.t-1]);f>0?(o.lShiftTo(f,s),a.lShiftTo(f,i)):(o.copyTo(s),a.copyTo(i));var h=s.t,d=s[h-1];if(0!=d){var p=d*(1<<this.F1)+(h>1?s[h-2]>>this.F2:0),v=this.FV/p,y=(1<<this.F1)/p,b=1<<this.F2,g=i.t,m=g-h,w=null==t?n():t;for(s.dlShiftTo(m,w),i.compareTo(w)>=0&&(i[i.t++]=1,i.subTo(w,i)),r.ONE.dlShiftTo(h,w),w.subTo(s,s);s.t<h;)s[s.t++]=0;for(;--m>=0;){var k=i[--g]==d?this.DM:Math.floor(i[g]*v+(i[g-1]+b)*y);if((i[g]+=s.am(0,k,i,m,0,h))<k)for(s.dlShiftTo(m,w),i.subTo(w,i);i[g]<--k;)i.subTo(w,i)}null!=t&&(i.drShiftTo(h,t),u!=c&&r.ZERO.subTo(t,t)),i.t=h,i.clamp(),f>0&&i.rShiftTo(f,i),u<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(e,t){if(e>4294967295||e<1)return r.ONE;var i=n(),o=n(),a=t.convert(this),s=l(e)-1;for(a.copyTo(i);--s>=0;)if(t.sqrTo(i,o),(e&1<<s)>0)t.mulTo(o,a,i);else{var u=i;i=o,o=u}return t.revert(i)},r.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(r=this[a]>>s)>0&&(i=!0,o=u(r));a>=0;)s<t?(r=(this[a]&(1<<s)-1)<<t-s,r|=this[--a]>>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=u(r));return i?o:"0"},r.prototype.negate=function(){var e=n();return r.ZERO.subTo(this,e),e},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+l(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(e){var t=n();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t},r.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new h(t):new d(t),this.exp(e,r)},r.ZERO=f(0),r.ONE=f(1),w.prototype.convert=k,w.prototype.revert=k,w.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},w.prototype.sqrTo=function(e,t){e.squareTo(t)},S.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=n();return e.copyTo(t),this.reduce(t),t},S.prototype.revert=function(e){return e},S.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},S.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},S.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var E,_,A,x=[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],T=(1<<26)/x[x.length-1];function M(){var e;e=(new Date).getTime(),_[A++]^=255&e,_[A++]^=e>>8&255,_[A++]^=e>>16&255,_[A++]^=e>>24&255,A>=D&&(A-=D)}if(r.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},r.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=f(r),o=n(),a=n(),s="";for(this.divRemTo(i,o,a);o.signum()>0;)s=(r+a.intValue()).toString(e).substr(1)+s,o.divRemTo(i,o,a);return a.intValue().toString(e)+s},r.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),i=Math.pow(t,n),o=!1,a=0,s=0,u=0;u<e.length;++u){var f=c(e,u);f<0?"-"==e.charAt(u)&&0==this.signum()&&(o=!0):(s=t*s+f,++a>=n&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(r.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(r.ONE.shiftLeft(e-1),this);else{var i=new Array,o=7&e;i.length=1+(e>>3),t.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},r.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n<o;++n)r[n]=t(this[n],e[n]);if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r[n]=t(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r[n]=t(i,e[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},r.prototype.changeBit=function(e,t){var n=r.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n},r.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},r.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},r.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);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,e[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()},r.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r[this.t+n-t]=this.am(t-n,e[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},r.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},r.prototype.millerRabin=function(e){var t=this.subtract(r.ONE),i=t.getLowestSetBit();if(i<=0)return!1;var o=t.shiftRight(i);(e=e+1>>1)>x.length&&(e=x.length);for(var a=n(),s=0;s<e;++s){a.fromInt(x[Math.floor(Math.random()*x.length)]);var u=a.modPow(o,this);if(0!=u.compareTo(r.ONE)&&0!=u.compareTo(t)){for(var c=1;c++<i&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(r.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},r.prototype.clone=function(){var e=n();return this.copyTo(e),e},r.prototype.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]},r.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this[e]&(1<<n)-1)<<8-n,r|=this[--e]>>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},r.prototype.equals=function(e){return 0==this.compareTo(e)},r.prototype.min=function(e){return this.compareTo(e)<0?this:e},r.prototype.max=function(e){return this.compareTo(e)>0?this:e},r.prototype.and=function(e){var t=n();return this.bitwiseTo(e,p,t),t},r.prototype.or=function(e){var t=n();return this.bitwiseTo(e,v,t),t},r.prototype.xor=function(e){var t=n();return this.bitwiseTo(e,y,t),t},r.prototype.andNot=function(e){var t=n();return this.bitwiseTo(e,b,t),t},r.prototype.not=function(){for(var e=n(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},r.prototype.shiftLeft=function(e){var t=n();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},r.prototype.shiftRight=function(e){var t=n();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},r.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+g(this[e]);return this.s<0?this.t*this.DB:-1},r.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=m(this[r]^t);return e},r.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},r.prototype.setBit=function(e){return this.changeBit(e,v)},r.prototype.clearBit=function(e){return this.changeBit(e,b)},r.prototype.flipBit=function(e){return this.changeBit(e,y)},r.prototype.add=function(e){var t=n();return this.addTo(e,t),t},r.prototype.subtract=function(e){var t=n();return this.subTo(e,t),t},r.prototype.multiply=function(e){var t=n();return this.multiplyTo(e,t),t},r.prototype.divide=function(e){var t=n();return this.divRemTo(e,t,null),t},r.prototype.remainder=function(e){var t=n();return this.divRemTo(e,null,t),t},r.prototype.divideAndRemainder=function(e){var t=n(),r=n();return this.divRemTo(e,t,r),new Array(t,r)},r.prototype.modPow=function(e,t){var r,i,o=e.bitLength(),a=f(1);if(o<=0)return a;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new h(t):t.isEven()?new S(t):new d(t);var s=new Array,u=3,c=r-1,p=(1<<r)-1;if(s[1]=i.convert(this),r>1){var v=n();for(i.sqrTo(s[1],v);u<=p;)s[u]=n(),i.mulTo(v,s[u-2],s[u]),u+=2}var y,b,g=e.t-1,m=!0,w=n();for(o=l(e[g])-1;g>=0;){for(o>=c?y=e[g]>>o-c&p:(y=(e[g]&(1<<o+1)-1)<<c-o,g>0&&(y|=e[g-1]>>this.DB+o-c)),u=r;0==(1&y);)y>>=1,--u;if((o-=u)<0&&(o+=this.DB,--g),m)s[y].copyTo(a),m=!1;else{for(;u>1;)i.sqrTo(a,w),i.sqrTo(w,a),u-=2;u>0?i.sqrTo(a,w):(b=a,a=w,w=b),i.mulTo(w,s[y],a)}for(;g>=0&&0==(e[g]&1<<o);)i.sqrTo(a,w),b=a,a=w,w=b,--o<0&&(o=this.DB-1,--g)}return i.revert(a)},r.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return r.ZERO;for(var n=e.clone(),i=this.clone(),o=f(1),a=f(0),s=f(0),u=f(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),t?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),t?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);n.compareTo(i)>=0?(n.subTo(i,n),t&&o.subTo(s,o),a.subTo(u,a)):(i.subTo(n,i),t&&s.subTo(o,s),u.subTo(a,u))}return 0!=i.compareTo(r.ONE)?r.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},r.prototype.pow=function(e){return this.exp(e,new w)},r.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},r.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=x[x.length-1]){for(t=0;t<x.length;++t)if(r[0]==x[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<x.length;){for(var n=x[t],i=t+1;i<x.length&&n<T;)n*=x[i++];for(n=r.modInt(n);t<i;)if(n%x[t++]==0)return!1}return r.millerRabin(e)},r.prototype.square=function(){var e=n();return this.squareTo(e),e},r.prototype.Barrett=S,null==_){var C;if(_=new Array,A=0,"undefined"!==typeof window&&window.crypto)if(window.crypto.getRandomValues){var O=new Uint8Array(32);for(window.crypto.getRandomValues(O),C=0;C<32;++C)_[A++]=O[C]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var I=window.crypto.random(32);for(C=0;C<I.length;++C)_[A++]=255&I.charCodeAt(C)}for(;A<D;)C=Math.floor(65536*Math.random()),_[A++]=C>>>8,_[A++]=255&C;A=0,M()}function P(){if(null==E){for(M(),(E=new B).init(_),A=0;A<_.length;++A)_[A]=0;A=0}return E.next()}function R(){}function B(){this.i=0,this.j=0,this.S=new Array}R.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;++t)e[t]=P()},B.prototype.init=function(e){var t,r,n;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,n=this.S[t],this.S[t]=this.S[r],this.S[r]=n;this.i=0,this.j=0},B.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var D=256;e.exports={default:r,BigInteger:r,SecureRandom:R}}).call(this)},function(e,t,r){var n=r(659),i=r(375),o=r(188),a=r(660);e.exports=function(e){return n(e)||i(e)||o(e)||a()}},function(e,t,r){"use strict";var n=r(0),i=r(6);Object.defineProperty(t,"__esModule",{value:!0});var o=r(192),a=function(e){return function(){var t=i(n.mark((function t(r){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Uint8Array,t.next=3,crypto.subtle.digest(e,r);case 3:return t.t1=t.sent,t.abrupt("return",new t.t0(t.t1));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},s=o.from({name:"sha2-256",code:18,encode:a("SHA-256")}),u=o.from({name:"sha2-512",code:19,encode:a("SHA-512")});t.sha256=s,t.sha512=u},function(e,t,r){"use strict";t.messages={NOT_STARTED_YET:"The libp2p node is not started yet",DHT_DISABLED:"DHT is not available",CONN_ENCRYPTION_REQUIRED:"At least one connection encryption module is required"},t.codes={DHT_DISABLED:"ERR_DHT_DISABLED",PUBSUB_NOT_STARTED:"ERR_PUBSUB_NOT_STARTED",DHT_NOT_STARTED:"ERR_DHT_NOT_STARTED",CONN_ENCRYPTION_REQUIRED:"ERR_CONN_ENCRYPTION_REQUIRED",ERR_INVALID_PROTOCOLS_FOR_STREAM:"ERR_INVALID_PROTOCOLS_FOR_STREAM",ERR_CONNECTION_ENDED:"ERR_CONNECTION_ENDED",ERR_CONNECTION_FAILED:"ERR_CONNECTION_FAILED",ERR_NODE_NOT_STARTED:"ERR_NODE_NOT_STARTED",ERR_ALREADY_ABORTED:"ERR_ALREADY_ABORTED",ERR_TOO_MANY_ADDRESSES:"ERR_TOO_MANY_ADDRESSES",ERR_NO_VALID_ADDRESSES:"ERR_NO_VALID_ADDRESSES",ERR_RELAYED_DIAL:"ERR_RELAYED_DIAL",ERR_DIALED_SELF:"ERR_DIALED_SELF",ERR_DISCOVERED_SELF:"ERR_DISCOVERED_SELF",ERR_DUPLICATE_TRANSPORT:"ERR_DUPLICATE_TRANSPORT",ERR_ENCRYPTION_FAILED:"ERR_ENCRYPTION_FAILED",ERR_HOP_REQUEST_FAILED:"ERR_HOP_REQUEST_FAILED",ERR_INVALID_KEY:"ERR_INVALID_KEY",ERR_INVALID_MESSAGE:"ERR_INVALID_MESSAGE",ERR_INVALID_PARAMETERS:"ERR_INVALID_PARAMETERS",ERR_INVALID_PEER:"ERR_INVALID_PEER",ERR_MUXER_UNAVAILABLE:"ERR_MUXER_UNAVAILABLE",ERR_TIMEOUT:"ERR_TIMEOUT",ERR_TRANSPORT_UNAVAILABLE:"ERR_TRANSPORT_UNAVAILABLE",ERR_TRANSPORT_DIAL_FAILED:"ERR_TRANSPORT_DIAL_FAILED",ERR_UNSUPPORTED_PROTOCOL:"ERR_UNSUPPORTED_PROTOCOL",ERR_INVALID_MULTIADDR:"ERR_INVALID_MULTIADDR",ERR_SIGNATURE_NOT_VALID:"ERR_SIGNATURE_NOT_VALID"}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(142);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(u){i=!0,o=u}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||Object(n.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,r){var n=t;n.utils=r(75),n.common=r(157),n.sha=r(581),n.ripemd=r(585),n.hmac=r(586),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,"a",(function(){return n}))},,,function(e,t,r){"use strict";var n,i,o=e.exports=r(82),a=r(324);o.codegen=r(547),o.fetch=r(548),o.path=r(549),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},o.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],i=e[r++];void 0!==i&&(t[n]=i)}return t};var s=/\\/g,u=/"/g;o.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},o.safeProp=function(e){return!/^[$\w_]+$/.test(e)||o.isReserved(e)?'["'+e.replace(s,"\\\\").replace(u,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var c=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(c,(function(e,t){return t.toUpperCase()}))},o.compareFieldsById=function(e,t){return e.id-t.id},o.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(o.decorateRoot.remove(e.$type),e.$type.name=t,o.decorateRoot.add(e.$type)),e.$type;n||(n=r(326));var i=new n(t||e.name);return o.decorateRoot.add(i),i.ctor=e,Object.defineProperty(e,"$type",{value:i,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:i,enumerable:!1}),i};var f=0;o.decorateEnum=function(e){if(e.$type)return e.$type;i||(i=r(83));var t=new i("Enum"+f++,e);return o.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},o.setProperty=function(e,t,r){if("object"!==typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var i=r.shift();if(r.length>0)t[i]=e(t[i]||{},r,n);else{var o=t[i];o&&(n=[].concat(o).concat(n)),t[i]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(o,"decorateRoot",{get:function(){return a.decorated||(a.decorated=new(r(334)))}})},function(e,t,r){"use strict";var n,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"===typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"===typeof e.on&&b(e,"error",t,r)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,a,s;if(c(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"===typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=f(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):y(i,i.length)}function v(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"===typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"===typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!==typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!==typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"===typeof u)o(u,this,t);else{var c=u.length,f=y(u,c);for(r=0;r<c;++r)o(f[r],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,o,a;if(c(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!==typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87),i=n.baseX({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),o=n.baseX({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});t.base58btc=i,t.base58flickr=o},function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return f})),r.d(t,"d",(function(){return l}));var n=r(519);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),r)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map((function(e){return e+e}))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error(Object(n.a)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:r,values:i=i.map((function(e){return parseFloat(e)}))}}function a(e){var t=e.type,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function s(e,t){var r=u(e),n=u(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function u(e){var t="hsl"===(e=o(e)).type?o(function(e){var t=(e=o(e)).values,r=t[0],n=t[1]/100,i=t[2]/100,s=n*Math.min(i,1-i),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)},c="rgb",f=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(c+="a",f.push(t[3])),a({type:c,values:f})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,a(e)}function f(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]*=1-t;return a(e)}function l(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return a(e)}},function(e,t){var r=function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(;r.length;)e=r.shift()(e);return e},n=function(e){return e&&("function"===typeof e[Symbol.asyncIterator]||"function"===typeof e[Symbol.iterator]||"function"===typeof e.next)},i=function(e){return e&&"function"===typeof e.sink&&n(e.source)},o=function(e){return function(t){return e.sink(t),e.source}},a=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];if(i(t[0])){var s=t[0];t[0]=function(){return s.source}}else if(n(t[0])){var u=t[0];t[0]=function(){return u}}if(t.length>1&&i(t[t.length-1])&&(t[t.length-1]=t[t.length-1].sink),t.length>2)for(var c=1;c<t.length-1;c++)i(t[c])&&(t[c]=o(t[c]));return r.apply(void 0,t)};e.exports=a,e.exports.pipe=a,e.exports.rawPipe=r,e.exports.isIterable=n,e.exports.isDuplex=i},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,r){var n=r(18);r(34),r(168);var i=e.exports=n.asn1=n.asn1||{};function o(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(e,t,r,o,a){if(n.util.isArray(o)){for(var s=[],u=0;u<o.length;++u)void 0!==o[u]&&s.push(o[u]);o=s}var c={tagClass:e,type:t,constructed:r,composed:r||n.util.isArray(o),value:o};return a&&"bitStringContents"in a&&(c.bitStringContents=a.bitStringContents,c.original=i.copy(c)),c},i.copy=function(e,t){var r;if(n.util.isArray(e)){r=[];for(var o=0;o<e.length;++o)r.push(i.copy(e[o],t));return r}return"string"===typeof e?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:i.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)},i.equals=function(e,t,r){if(n.util.isArray(e)){if(!n.util.isArray(t))return!1;if(e.length!==t.length)return!1;for(var o=0;o<e.length;++o)if(!i.equals(e[o],t[o]))return!1;return!0}if(typeof e!==typeof t)return!1;if("string"===typeof e)return e===t;var a=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&i.equals(e.value,t.value);return r&&r.includeBitStringContents&&(a=a&&e.bitStringContents===t.bitStringContents),a},i.getBerValueLength=function(e){var t=e.getByte();if(128!==t)return 128&t?e.getInt((127&t)<<3):t};function a(e,t,r,n){var s;o(e,t,2);var u=e.getByte();t--;var c=192&u,f=31&u;s=e.length();var l,h,d=function(e,t){var r=e.getByte();if(t--,128!==r){var n;if(128&r){var i=127&r;o(e,t,i),n=e.getInt(i<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(e,t);if(t-=s-e.length(),void 0!==d&&d>t){if(n.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=e.length(),p.remaining=t,p.requested=d,p}d=t}var v=32===(32&u);if(v)if(l=[],void 0===d)for(;;){if(o(e,t,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),t-=2;break}s=e.length(),l.push(a(e,t,r+1,n)),t-=s-e.length()}else for(;d>0;)s=e.length(),l.push(a(e,d,r+1,n)),t-=s-e.length(),d-=s-e.length();if(void 0===l&&c===i.Class.UNIVERSAL&&f===i.Type.BITSTRING&&(h=e.bytes(d)),void 0===l&&n.decodeBitStrings&&c===i.Class.UNIVERSAL&&f===i.Type.BITSTRING&&d>1){var y=e.read,b=t,g=0;if(f===i.Type.BITSTRING&&(o(e,t,1),g=e.getByte(),t--),0===g)try{s=e.length();var m=a(e,t,r+1,{verbose:n.verbose,strict:!0,decodeBitStrings:!0}),w=s-e.length();t-=w,f==i.Type.BITSTRING&&w++;var k=m.tagClass;w!==d||k!==i.Class.UNIVERSAL&&k!==i.Class.CONTEXT_SPECIFIC||(l=[m])}catch(E){}void 0===l&&(e.read=y,t=b)}if(void 0===l){if(void 0===d){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=t}if(f===i.Type.BMPSTRING)for(l="";d>0;d-=2)o(e,t,2),l+=String.fromCharCode(e.getInt16()),t-=2;else l=e.getBytes(d)}var S=void 0===h?null:{bitStringContents:h};return i.create(c,f,v,l,S)}i.fromDer=function(e,t){return void 0===t&&(t={strict:!0,decodeBitStrings:!0}),"boolean"===typeof t&&(t={strict:t,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"===typeof e&&(e=n.util.createBuffer(e)),a(e,e.length(),0,t)},i.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,o=n.util.createBuffer(),a=!1;if("bitStringContents"in e&&(a=!0,e.original&&(a=i.equals(e,e.original))),a)o.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:o.putByte(0);for(var s=0;s<e.value.length;++s)void 0!==e.value[s]&&o.putBuffer(i.toDer(e.value[s]))}else if(e.type===i.Type.BMPSTRING)for(s=0;s<e.value.length;++s)o.putInt16(e.value.charCodeAt(s));else e.type===i.Type.INTEGER&&e.value.length>1&&(0===e.value.charCodeAt(0)&&0===(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128===(128&e.value.charCodeAt(1)))?o.putBytes(e.value.substr(1)):o.putBytes(e.value);if(t.putByte(r),o.length()<=127)t.putByte(127&o.length());else{var u=o.length(),c="";do{c+=String.fromCharCode(255&u),u>>>=8}while(u>0);t.putByte(128|c.length);for(s=c.length-1;s>=0;--s)t.putByte(c.charCodeAt(s))}return t.putBuffer(o),t},i.oidToDer=function(e){var t,r,i,o,a=e.split("."),s=n.util.createBuffer();s.putByte(40*parseInt(a[0],10)+parseInt(a[1],10));for(var u=2;u<a.length;++u){t=!0,r=[],i=parseInt(a[u],10);do{o=127&i,i>>>=7,t||(o|=128),r.push(o),t=!1}while(i>0);for(var c=r.length-1;c>=0;--c)s.putByte(r[c])}return s},i.derToOid=function(e){var t;"string"===typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),o=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),s=0;if(e.length>11){var u=e.charAt(10),c=10;"+"!==u&&"-"!==u&&(s=parseInt(e.substr(10,2),10),c+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,a,s,0),c&&("+"===(u=e.charAt(c))||"-"===u)){var f=60*parseInt(e.substr(c+1,2),10)+parseInt(e.substr(c+4,2),10);f*=6e4,"+"===u?t.setTime(+t-f):t.setTime(+t+f)}return t},i.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),a=parseInt(e.substr(10,2),10),s=parseInt(e.substr(12,2),10),u=0,c=0,f=!1;"Z"===e.charAt(e.length-1)&&(f=!0);var l=e.length-5,h=e.charAt(l);"+"!==h&&"-"!==h||(c=60*parseInt(e.substr(l+1,2),10)+parseInt(e.substr(l+4,2),10),c*=6e4,"+"===h&&(c*=-1),f=!0);return"."===e.charAt(14)&&(u=1e3*parseFloat(e.substr(14),10)),f?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,a,s,u),t.setTime(+t+c)):(t.setFullYear(r,n,i),t.setHours(o,a,s,u)),t},i.dateToUtcTime=function(e){if("string"===typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},i.dateToGeneralizedTime=function(e){if("string"===typeof e)return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},i.integerToDer=function(e){var t=n.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},i.derToInteger=function(e){"string"===typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,o){var a=!1;if(e.tagClass!==t.tagClass&&"undefined"!==typeof t.tagClass||e.type!==t.type&&"undefined"!==typeof t.type)o&&(e.tagClass!==t.tagClass&&o.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&o.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||"undefined"===typeof t.constructed){if(a=!0,t.value&&n.util.isArray(t.value))for(var s=0,u=0;a&&u<t.value.length;++u)a=t.value[u].optional||!1,e.value[s]&&((a=i.validate(e.value[s],t.value[u],r,o))?++s:t.value[u].optional&&(a=!0)),!a&&o&&o.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(a&&r)if(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{if(0!==e.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else o&&o.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');return a};var s=/[^\\u0000-\\u00ff]/;i.prettyPrint=function(e,t,r){var o="";r=r||2,(t=t||0)>0&&(o+="\n");for(var a="",u=0;u<t*r;++u)a+=" ";switch(o+=a+"Tag: ",e.tagClass){case i.Class.UNIVERSAL:o+="Universal:";break;case i.Class.APPLICATION:o+="Application:";break;case i.Class.CONTEXT_SPECIFIC:o+="Context-Specific:";break;case i.Class.PRIVATE:o+="Private:"}if(e.tagClass===i.Class.UNIVERSAL)switch(o+=e.type,e.type){case i.Type.NONE:o+=" (None)";break;case i.Type.BOOLEAN:o+=" (Boolean)";break;case i.Type.INTEGER:o+=" (Integer)";break;case i.Type.BITSTRING:o+=" (Bit string)";break;case i.Type.OCTETSTRING:o+=" (Octet string)";break;case i.Type.NULL:o+=" (Null)";break;case i.Type.OID:o+=" (Object Identifier)";break;case i.Type.ODESC:o+=" (Object Descriptor)";break;case i.Type.EXTERNAL:o+=" (External or Instance of)";break;case i.Type.REAL:o+=" (Real)";break;case i.Type.ENUMERATED:o+=" (Enumerated)";break;case i.Type.EMBEDDED:o+=" (Embedded PDV)";break;case i.Type.UTF8:o+=" (UTF8)";break;case i.Type.ROID:o+=" (Relative Object Identifier)";break;case i.Type.SEQUENCE:o+=" (Sequence)";break;case i.Type.SET:o+=" (Set)";break;case i.Type.PRINTABLESTRING:o+=" (Printable String)";break;case i.Type.IA5String:o+=" (IA5String (ASCII))";break;case i.Type.UTCTIME:o+=" (UTC time)";break;case i.Type.GENERALIZEDTIME:o+=" (Generalized time)";break;case i.Type.BMPSTRING:o+=" (BMP String)"}else o+=e.type;if(o+="\n",o+=a+"Constructed: "+e.constructed+"\n",e.composed){var c=0,f="";for(u=0;u<e.value.length;++u)void 0!==e.value[u]&&(c+=1,f+=i.prettyPrint(e.value[u],t+1,r),u+1<e.value.length&&(f+=","));o+=a+"Sub values: "+c+f}else{if(o+=a+"Value: ",e.type===i.Type.OID){var l=i.derToOid(e.value);o+=l,n.pki&&n.pki.oids&&l in n.pki.oids&&(o+=" ("+n.pki.oids[l]+") ")}if(e.type===i.Type.INTEGER)try{o+=i.derToInteger(e.value)}catch(d){o+="0x"+n.util.bytesToHex(e.value)}else if(e.type===i.Type.BITSTRING){if(e.value.length>1?o+="0x"+n.util.bytesToHex(e.value.slice(1)):o+="(none)",e.value.length>0){var h=e.value.charCodeAt(0);1==h?o+=" (1 unused bit shown)":h>1&&(o+=" ("+h+" unused bits shown)")}}else e.type===i.Type.OCTETSTRING?(s.test(e.value)||(o+="("+e.value+") "),o+="0x"+n.util.bytesToHex(e.value)):e.type===i.Type.UTF8?o+=n.util.decodeUtf8(e.value):e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?o+=e.value:s.test(e.value)?o+="0x"+n.util.bytesToHex(e.value):0===e.value.length?o+="[null]":o+=e.value}return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87),i=n.rfc4648({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),o=n.rfc4648({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),a=n.rfc4648({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),s=n.rfc4648({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});t.base64=i,t.base64pad=o,t.base64url=a,t.base64urlpad=s},function(e,t,r){"use strict";var n=r(367),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function f(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!==typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:f,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):o(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)f(arguments[n],r);return t},extend:function(e,t,r){return f(t,(function(t,i){e[i]=r&&"function"===typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,r){"use strict";var n=t,i=r(14),o=r(66),a=r(350);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<n.length;a++){var s,u=o.andln(i-1);o.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0===(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0===(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"===typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87),i=n.rfc4648({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),o=n.rfc4648({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),a=n.rfc4648({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),s=n.rfc4648({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),u=n.rfc4648({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),c=n.rfc4648({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),f=n.rfc4648({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),l=n.rfc4648({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),h=n.rfc4648({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});t.base32=i,t.base32hex=u,t.base32hexpad=f,t.base32hexpadupper=l,t.base32hexupper=c,t.base32pad=a,t.base32padupper=s,t.base32upper=o,t.base32z=h},function(e,t,r){"use strict";var n=t,i=r(92),o=r(108),a=r(411);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<n.length;a++){var s,u=o.andln(i-1);o.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0===(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0===(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"===typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";function n(e){var t=e.props,r=e.states,n=e.muiFormControl;return r.reduce((function(e,r){return e[r]=t[r],n&&"undefined"===typeof t[r]&&(e[r]=n[r]),e}),{})}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),i="undefined"!==typeof window?n.useLayoutEffect:n.useEffect;function o(e){var t=n.useRef(e);return i((function(){t.current=e})),n.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},,function(e,t,r){"use strict";!function(t){function r(e){return parseInt(e)===e}function n(e){if(!r(e.length))return!1;for(var t=0;t<e.length;t++)if(!r(e[t])||e[t]<0||e[t]>255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function a(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var s={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r<e.length;){var n=e.charCodeAt(r++);37===n?(t.push(parseInt(e.substr(r,2),16)),r+=2):t.push(n)}return i(t)},fromBytes:function(e){for(var t=[],r=0;r<e.length;){var n=e[r];n<128?(t.push(String.fromCharCode(n)),r++):n>191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},u=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},fromBytes:function(t){for(var r=[],n=0;n<t.length;n++){var i=t[n];r.push(e[(240&i)>>4]+e[15&i])}return r.join("")}}}(),c={16:10,24:12,32:14},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],d=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],v=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],y=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],b=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],g=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],m=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],k=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],S=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],_=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function A(e){for(var t=[],r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}var x=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(t,!0)}),this._prepare()};x.prototype._prepare=function(){var e=c[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var r,n=4*(e+1),i=this.key.length/4,o=A(this.key);for(t=0;t<i;t++)r=t>>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var a,s=0,u=i;u<n;){if(a=o[i-1],o[0]^=l[a>>16&255]<<24^l[a>>8&255]<<16^l[255&a]<<8^l[a>>24&255]^f[s]<<24,s+=1,8!=i)for(t=1;t<i;t++)o[t]^=o[t-1];else{for(t=1;t<i/2;t++)o[t]^=o[t-1];a=o[i/2-1],o[i/2]^=l[255&a]^l[a>>8&255]<<8^l[a>>16&255]<<16^l[a>>24&255]<<24;for(t=i/2+1;t<i;t++)o[t]^=o[t-1]}for(t=0;t<i&&u<n;)h=u>>2,d=u%4,this._Ke[h][d]=o[t],this._Kd[e-h][d]=o[t++],u++}for(var h=1;h<e;h++)for(var d=0;d<4;d++)a=this._Kd[h][d],this._Kd[h][d]=k[a>>24&255]^S[a>>16&255]^E[a>>8&255]^_[255&a]},x.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=A(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var a=1;a<t;a++){for(i=0;i<4;i++)r[i]=d[n[i]>>24&255]^p[n[(i+1)%4]>>16&255]^v[n[(i+2)%4]>>8&255]^y[255&n[(i+3)%4]]^this._Ke[a][i];n=r.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Ke[t][i],u[4*i]=255&(l[n[i]>>24&255]^s>>24),u[4*i+1]=255&(l[n[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(l[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(l[255&n[(i+3)%4]]^s);return u},x.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=A(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var a=1;a<t;a++){for(i=0;i<4;i++)r[i]=b[n[i]>>24&255]^g[n[(i+3)%4]>>16&255]^m[n[(i+2)%4]>>8&255]^w[255&n[(i+1)%4]]^this._Kd[a][i];n=r.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Kd[t][i],u[4*i]=255&(h[n[i]>>24&255]^s>>24),u[4*i+1]=255&(h[n[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(h[255&n[(i+1)%4]]^s);return u};var T=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(t)};T.prototype.encrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)a(e,r,0,n,n+16),a(r=this._aes.encrypt(r),t,n);return t},T.prototype.decrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)a(e,r,0,n,n+16),a(r=this._aes.decrypt(r),t,n);return t};var M=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=o(16);this._lastCipherblock=i(r,!0),this._aes=new x(t)};M.prototype.encrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){a(e,r,0,n,n+16);for(var s=0;s<16;s++)r[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(r),a(this._lastCipherblock,t,n)}return t},M.prototype.decrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){a(e,r,0,n,n+16),r=this._aes.decrypt(r);for(var s=0;s<16;s++)t[n+s]=r[s]^this._lastCipherblock[s];a(e,this._lastCipherblock,0,n,n+16)}return t};var C=function e(t,r,n){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 size)")}else r=o(16);n||(n=1),this.segmentSize=n,this._shiftRegister=i(r,!0),this._aes=new x(t)};C.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(r,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r},C.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(e,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r};var O=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=o(16);this._lastPrecipher=i(r,!0),this._lastPrecipherIndex=16,this._aes=new x(t)};O.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},O.prototype.decrypt=O.prototype.encrypt;var I=function e(t){if(!(this instanceof e))throw Error("Counter must be instanitated with `new`");0===t||t||(t=1),"number"===typeof t?(this._counter=o(16),this.setValue(t)):this.setBytes(t)};I.prototype.setValue=function(e){if("number"!==typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");for(var t=15;t>=0;--t)this._counter[t]=e%256,e>>=8},I.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},I.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var P=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",r instanceof I||(r=new I(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(t)};P.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[r]^=this._remainingCounter[this._remainingCounterIndex++];return t},P.prototype.decrypt=P.prototype.encrypt;var R={AES:x,Counter:I,ModeOfOperation:{ecb:T,cbc:M,cfb:C,ofb:O,ctr:P},utils:{hex:u,utf8:s},padding:{pkcs7:{pad:function(e){var t=16-(e=i(e,!0)).length%16,r=o(e.length+t);a(e,r);for(var n=e.length;n<r.length;n++)r[n]=t;return r},strip:function(e){if((e=i(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n<t;n++)if(e[r+n]!==t)throw new Error("PKCS#7 invalid padding byte");var s=o(r);return a(e,s,0,0,r),s}}},_arrayTest:{coerceArray:i,createArray:o,copyArray:a}};e.exports=R}()},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(142);function i(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Object(n.a)(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}},function(e,t,r){"use strict";var n=r(66),i=r(23);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=u(i.toString(16))}return r},t.zero2=s,t.zero8=u,t.join32=function(e,t,r,i){var o=r-t;n(o%4===0);for(var a=new Array(o/4),s=0,u=t;s<a.length;s++,u+=4){var c;c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],a[s]=c>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+i+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var f=0,l=t;return f+=(l=l+n>>>0)<t?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+s>>>0)<s?1:0,e+r+i+a+u+(f+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(625),t),i(r(626),t),i(r(627),t),i(r(628),t)},function(e,t,r){"use strict";var n=r(108),i=r(201);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=u(i.toString(16))}return r},t.zero2=s,t.zero8=u,t.join32=function(e,t,r,i){var o=r-t;n(o%4===0);for(var a=new Array(o/4),s=0,u=t;s<a.length;s++,u+=4){var c;c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],a[s]=c>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+i+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var f=0,l=t;return f+=(l=l+n>>>0)<t?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+s>>>0)<s?1:0,e+r+i+a+u+(f+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){var n=r(18);if(r(62),r(114),r(168),r(766),r(768),r(113),r(34),"undefined"===typeof i)var i=n.jsbn.BigInteger;var o=n.util.isNodejs?r(271):null,a=n.asn1,s=n.util;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var u=n.pki,c=[6,4,2,4,2,4,6,2],f={name:"PrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},l={name:"RSAPrivateKey",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},h={name:"RSAPublicKey",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},d=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p=function(e){var t;if(!(e.algorithm in u.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=u.oids[e.algorithm];var n=a.oidToDer(t).getBytes(),i=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),o=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]);o.value.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,n)),o.value.push(a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,""));var s=a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(o),i.value.push(s),a.toDer(i).getBytes()},v=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var o;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(o.compareTo(t.n)>=0||!o.gcd(t.n).equals(i.ONE));for(var a=(e=e.multiply(o.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),s=e.mod(t.q).modPow(t.dQ,t.q);a.compareTo(s)<0;)a=a.add(t.p);var u=a.subtract(s).multiply(t.qInv).mod(t.p).multiply(t.q).add(s);return u=u.multiply(o.modInverse(t.n)).mod(t.n)};function y(e,t,r){var i=n.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8);if(e.length>o-11){var a=new Error("Message is too long for PKCS#1 v1.5 padding.");throw a.length=e.length,a.max=o-11,a}i.putByte(0),i.putByte(r);var s,u=o-3-e.length;if(0===r||1===r){s=0===r?0:255;for(var c=0;c<u;++c)i.putByte(s)}else for(;u>0;){var f=0,l=n.random.getBytes(u);for(c=0;c<u;++c)0===(s=l.charCodeAt(c))?++f:i.putByte(s);u=f}return i.putByte(0),i.putBytes(e),i}function b(e,t,r,i){var o=Math.ceil(t.n.bitLength()/8),a=n.util.createBuffer(e),s=a.getByte(),u=a.getByte();if(0!==s||r&&0!==u&&1!==u||!r&&2!=u||r&&0===u&&"undefined"===typeof i)throw new Error("Encryption block is invalid.");var c=0;if(0===u){c=o-3-i;for(var f=0;f<c;++f)if(0!==a.getByte())throw new Error("Encryption block is invalid.")}else if(1===u)for(c=0;a.length()>1;){if(255!==a.getByte()){--a.read;break}++c}else if(2===u)for(c=0;a.length()>1;){if(0===a.getByte()){--a.read;break}++c}if(0!==a.getByte()||c!==o-3-a.length())throw new Error("Encryption block is invalid.");return a.getBytes()}function g(e,t,r){"function"===typeof t&&(r=t,t={});var o={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};function a(){s(e.pBits,(function(t,n){return t?r(t):(e.p=n,null!==e.q?c(t,e.q):void s(e.qBits,c))}))}function s(e,t){n.prime.generateProbablePrime(e,o,t)}function c(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var o=e.p;e.p=e.q,e.q=o}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void a();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void s(e.qBits,c);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void a();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void s(e.qBits,c);var f=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,f,e.p,e.q,f.mod(e.p1),f.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}"prng"in t&&(o.prng=t.prng),a()}function m(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0===(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128===(128&r.charCodeAt(1)))?r.substr(1):r}function w(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function k(e){return n.util.isNodejs&&"function"===typeof o[e]}function S(e){return"undefined"!==typeof s.globalScope&&"object"===typeof s.globalScope.crypto&&"object"===typeof s.globalScope.crypto.subtle&&"function"===typeof s.globalScope.crypto.subtle[e]}function E(e){return"undefined"!==typeof s.globalScope&&"object"===typeof s.globalScope.msCrypto&&"object"===typeof s.globalScope.msCrypto.subtle&&"function"===typeof s.globalScope.msCrypto.subtle[e]}function _(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}u.rsa.encrypt=function(e,t,r){var o,a=r,s=Math.ceil(t.n.bitLength()/8);!1!==r&&!0!==r?(a=2===r,o=y(e,t,r)):(o=n.util.createBuffer()).putBytes(e);for(var u=new i(o.toHex(),16),c=v(u,t,a).toString(16),f=n.util.createBuffer(),l=s-Math.ceil(c.length/2);l>0;)f.putByte(0),--l;return f.putBytes(n.util.hexToBytes(c)),f.getBytes()},u.rsa.decrypt=function(e,t,r,o){var a=Math.ceil(t.n.bitLength()/8);if(e.length!==a){var s=new Error("Encrypted message length is invalid.");throw s.length=e.length,s.expected=a,s}var u=new i(n.util.createBuffer(e).toHex(),16);if(u.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var c=v(u,t,r).toString(16),f=n.util.createBuffer(),l=a-Math.ceil(c.length/2);l>0;)f.putByte(0),--l;return f.putBytes(n.util.hexToBytes(c)),!1!==o?b(f.getBytes(),t,r):f.getBytes()},u.rsa.createKeyPairGenerationState=function(e,t,r){"string"===typeof e&&(e=parseInt(e,10)),e=e||2048;var o,a=(r=r||{}).prng||n.random,s={nextBytes:function(e){for(var t=a.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}},u=r.algorithm||"PRIMEINC";if("PRIMEINC"!==u)throw new Error("Invalid key generation algorithm: "+u);return(o={algorithm:u,state:0,bits:e,rng:s,eInt:t||65537,e:new i(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},u.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,a=function(e,t){return e|t},s=+new Date,f=0;null===e.keys&&(t<=0||f<t);){if(0===e.state){var l=null===e.p?e.pBits:e.qBits,h=l-1;0===e.pqState?(e.num=new i(l,e.rng),e.num.testBit(h)||e.num.bitwiseTo(i.ONE.shiftLeft(h),a,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),o=0,++e.pqState):1===e.pqState?e.num.bitLength()>l?e.pqState=0:e.num.isProbablePrime(w(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(c[o++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var d=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)}}f+=(n=+new Date)-s,s=n}return null!==e.keys},u.rsa.generateKeyPair=function(e,t,r,i){if(1===arguments.length?"object"===typeof e?(r=e,e=void 0):"function"===typeof e&&(i=e,e=void 0):2===arguments.length?"number"===typeof e?"function"===typeof t?(i=t,t=void 0):"number"!==typeof t&&(r=t,t=void 0):(r=e,i=t,e=void 0,t=void 0):3===arguments.length&&("number"===typeof t?"function"===typeof r&&(i=r,r=void 0):(i=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(i){if(k("generateKeyPair"))return o.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,t,r){if(e)return i(e);i(null,{privateKey:u.privateKeyFromPem(r),publicKey:u.publicKeyFromPem(t)})}));if(S("generateKey")&&S("exportKey"))return s.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:_(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return s.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){i(e)})).then((function(e){if(e){var t=u.privateKeyFromAsn1(a.fromDer(n.util.createBuffer(e)));i(null,{privateKey:t,publicKey:u.setRsaPublicKey(t.n,t.e)})}}));if(E("generateKey")&&E("exportKey")){var c=s.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:_(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return c.oncomplete=function(e){var t=e.target.result,r=s.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=u.privateKeyFromAsn1(a.fromDer(n.util.createBuffer(t)));i(null,{privateKey:r,publicKey:u.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){i(e)}},void(c.onerror=function(e){i(e)})}}else if(k("generateKeyPairSync")){var f=o.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:u.privateKeyFromPem(f.privateKey),publicKey:u.publicKeyFromPem(f.publicKey)}}var l=u.rsa.createKeyPairGenerationState(e,t,r);if(!i)return u.rsa.stepKeyPairGenerationState(l,0),l.keys;g(l,r,i)},u.setRsaPublicKey=u.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"===typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return y(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"===typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var o=t.encode(e,r,!0);return u.rsa.encrypt(o,r,!0)},verify:function(e,t,n){"string"===typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=b(t,r,!0),e===a.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===(t=b(t,r,!0))}});var i=u.rsa.decrypt(t,r,!0,!1);return n.verify(e,i,r.n.bitLength())}};return r},u.setRsaPrivateKey=u.rsa.setPrivateKey=function(e,t,r,i,o,a,s,c){var f={n:e,e:t,d:r,p:i,q:o,dP:a,dQ:s,qInv:c,decrypt:function(e,t,r){"string"===typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=u.rsa.decrypt(e,f,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:b};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,f,!1)},sign:function(e,t){var r=!1;"string"===typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:p},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,f.n.bitLength());return u.rsa.encrypt(n,f,r)}};return f},u.wrapRsaPrivateKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(u.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(e).getBytes())])},u.privateKeyFromAsn1=function(e){var t,r,o,s,c,h,d,p,v={},y=[];if(a.validate(e,f,v,y)&&(e=a.fromDer(n.util.createBuffer(v.privateKey))),v={},y=[],!a.validate(e,l,v,y)){var b=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw b.errors=y,b}return t=n.util.createBuffer(v.privateKeyModulus).toHex(),r=n.util.createBuffer(v.privateKeyPublicExponent).toHex(),o=n.util.createBuffer(v.privateKeyPrivateExponent).toHex(),s=n.util.createBuffer(v.privateKeyPrime1).toHex(),c=n.util.createBuffer(v.privateKeyPrime2).toHex(),h=n.util.createBuffer(v.privateKeyExponent1).toHex(),d=n.util.createBuffer(v.privateKeyExponent2).toHex(),p=n.util.createBuffer(v.privateKeyCoefficient).toHex(),u.setRsaPrivateKey(new i(t,16),new i(r,16),new i(o,16),new i(s,16),new i(c,16),new i(h,16),new i(d,16),new i(p,16))},u.privateKeyToAsn1=u.privateKeyToRSAPrivateKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.e)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.d)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.p)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.q)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.dP)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.dQ)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.qInv))])},u.publicKeyFromAsn1=function(e){var t={},r=[];if(a.validate(e,d,t,r)){var o,s=a.derToOid(t.publicKeyOid);if(s!==u.oids.rsaEncryption)throw(o=new Error("Cannot read public key. Unknown OID.")).oid=s,o;e=t.rsaPublicKey}if(r=[],!a.validate(e,h,t,r))throw(o=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,o;var c=n.util.createBuffer(t.publicKeyModulus).toHex(),f=n.util.createBuffer(t.publicKeyExponent).toHex();return u.setRsaPublicKey(new i(c,16),new i(f,16))},u.publicKeyToAsn1=u.publicKeyToSubjectPublicKeyInfo=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(u.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,[u.publicKeyToRSAPublicKey(e)])])},u.publicKeyToRSAPublicKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,m(e.e))])}},function(e,t,r){"use strict";var n=r(13).Buffer,i=Symbol.for("BufferList");function o(e){if(!(this instanceof o))return new o(e);o._init.call(this,e)}o._init=function(e){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},o.prototype._new=function(e){return new o(e)},o.prototype._offset=function(e){if(0===e)return[0,0];for(var t=0,r=0;r<this._bufs.length;r++){var n=t+this._bufs[r].length;if(e<n||r===this._bufs.length-1)return[r,e-t];t=n}},o.prototype._reverseOffset=function(e){for(var t=e[0],r=e[1],n=0;n<t;n++)r+=this._bufs[n].length;return r},o.prototype.get=function(e){if(!(e>this.length||e<0)){var t=this._offset(e);return this._bufs[t[0]][t[1]]}},o.prototype.slice=function(e,t){return"number"===typeof e&&e<0&&(e+=this.length),"number"===typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},o.prototype.copy=function(e,t,r,i){if(("number"!==typeof r||r<0)&&(r=0),("number"!==typeof i||i>this.length)&&(i=this.length),r>=this.length)return e||n.alloc(0);if(i<=0)return e||n.alloc(0);var o=!!e,a=this._offset(r),s=i-r,u=s,c=o&&t||0,f=a[1];if(0===r&&i===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(var l=0;l<this._bufs.length;l++)this._bufs[l].copy(e,c),c+=this._bufs[l].length;return e}if(u<=this._bufs[a[0]].length-f)return o?this._bufs[a[0]].copy(e,t,f,f+u):this._bufs[a[0]].slice(f,f+u);o||(e=n.allocUnsafe(s));for(var h=a[0];h<this._bufs.length;h++){var d=this._bufs[h].length-f;if(!(u>d)){this._bufs[h].copy(e,c,f,f+u),c+=d;break}this._bufs[h].copy(e,c,f),c+=d,u-=d,f&&(f=0)}return e.length>c?e.slice(0,c):e},o.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!==typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();var r=this._offset(e),n=this._offset(t),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},o.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},o.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){for(var e=this._new(),t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},o.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(n.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(var t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(var r=0;r<e._bufs.length;r++)this.append(e._bufs[r]);else"number"===typeof e&&(e=e.toString()),this._appendBuffer(n.from(e));return this},o.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},o.prototype.indexOf=function(e,t,r){if(void 0===r&&"string"===typeof t&&(r=t,t=void 0),"function"===typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"===typeof e?e=n.from([e]):"string"===typeof e?e=n.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=n.from(e.buffer,e.byteOffset,e.byteLength):n.isBuffer(e)||(e=n.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;for(var i=this._offset(t),o=i[0],a=i[1];o<this._bufs.length;o++){for(var s=this._bufs[o];a<s.length;){if(s.length-a>=e.length){var u=s.indexOf(e,a);if(-1!==u)return this._reverseOffset([o,u]);a=s.length-e.length+1}else{var c=this._reverseOffset([o,a]);if(this._match(c,e))return c;a++}}a=0}return-1},o.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(var r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(var t in e)!function(t){o.prototype[t]=null===e[t]?function(e,r){return this.slice(e,e+r)[t](0,r)}:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.slice(r,r+e[t])[t](0)}}(t)}(),o.prototype._isBufferList=function(e){return e instanceof o||o.isBufferList(e)},o.isBufferList=function(e){return null!=e&&e[i]},e.exports=o},function(e,t,r){"use strict";function n(e,t){"function"===typeof e?e(t):e&&(e.current=t)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),i=r(126);function o(){return n.useContext(i.a)}},function(e,t,r){"use strict";(function(e){var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}function o(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=r(321),n.base64=r(538),n.EventEmitter=r(539),n.float=r(540),n.inquire=r(322),n.utf8=r(541),n.pool=r(542),n.LongBits=r(543),n.isNode=Boolean("undefined"!==typeof e&&e&&e.process&&e.process.versions&&e.process.versions.node),n.global=n.isNode&&e||"undefined"!==typeof window&&window||"undefined"!==typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"===typeof e||e instanceof String},n.isObject=function(e){return e&&"object"===typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!==typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"===typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}}).call(this,r(36))},function(e,t,r){"use strict";e.exports=a;var n=r(128);((a.prototype=Object.create(n.prototype)).constructor=a).className="Enum";var i=r(152),o=r(56);function a(e,t,r,i,o){if(n.call(this,e,r),t&&"object"!==typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=o||{},this.reserved=void 0,t)for(var a=Object.keys(t),s=0;s<a.length;++s)"number"===typeof t[a[s]]&&(this.valuesById[this.values[a[s]]=t[a[s]]]=a[s])}a.fromJSON=function(e,t){var r=new a(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},a.prototype.add=function(e,t,r){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=r||null,this},a.prototype.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},a.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},a.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)}},function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(366);t.toString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.encoder.encode(e).substring(1)}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){"use strict";var n=r(86),i=r(29),o=r(8),a=r(9);Object.defineProperty(t,"__esModule",{value:!0});var s=r(630),u=r(99),c=function(){function e(t,r,n){o(this,e),this.name=t,this.prefix=r,this.baseEncode=n}return a(e,[{key:"encode",value:function(e){if(e instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(e));throw Error("Unknown type, must be binary type")}}]),e}(),f=function(){function e(t,r,n){o(this,e),this.name=t,this.prefix=r,this.baseDecode=n}return a(e,[{key:"decode",value:function(e){if("string"!==typeof e)throw Error("Can only multibase decode strings");switch(e[0]){case this.prefix:return this.baseDecode(e.slice(1));default:throw Error("Unable to decode multibase string ".concat(JSON.stringify(e),", ").concat(this.name," decoder only supports inputs prefixed with ").concat(this.prefix))}}},{key:"or",value:function(e){var t=i(n({},this.prefix,this),e.decoders||n({},e.prefix,e));return new l(t)}}]),e}(),l=function(){function e(t){o(this,e),this.decoders=t}return a(e,[{key:"or",value:function(t){var r=t.decoders||n({},t.prefix,t);return new e(i(i({},this.decoders),r))}},{key:"decode",value:function(e){var t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(e),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}}]),e}(),h=function(){function e(t,r,n,i){o(this,e),this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new c(t,r,n),this.decoder=new f(t,r,i)}return a(e,[{key:"encode",value:function(e){return this.encoder.encode(e)}},{key:"decode",value:function(e){return this.decoder.decode(e)}}]),e}(),d=function(e){var t=e.name,r=e.prefix,n=e.encode,i=e.decode;return new h(t,r,n,i)};t.Codec=h,t.baseX=function(e){var t=e.prefix,r=e.name,n=e.alphabet,i=s(n,r),o=i.encode,a=i.decode;return d({prefix:t,name:r,encode:o,decode:function(e){return u.coerce(a(e))}})},t.from=d,t.rfc4648=function(e){var t=e.name,r=e.prefix,n=e.bitsPerChar,i=e.alphabet;return d({prefix:r,name:t,encode:function(e){return function(e,t,r){for(var n="="===t[t.length-1],i=(1<<r)-1,o="",a=0,s=0,u=0;u<e.length;++u)for(s=s<<8|e[u],a+=8;a>r;)o+=t[i&s>>(a-=r)];if(a&&(o+=t[i&s<<r-a]),n)for(;o.length*r&7;)o+="=";return o}(e,i,n)},decode:function(e){return function(e,t,r,n){for(var i={},o=0;o<t.length;++o)i[t[o]]=o;for(var a=e.length;"="===e[a-1];)--a;for(var s=new Uint8Array(a*r/8|0),u=0,c=0,f=0,l=0;l<a;++l){var h=i[e[l]];if(void 0===h)throw new SyntaxError("Non-".concat(n," character"));c=c<<r|h,(u+=r)>=8&&(u-=8,s[f++]=255&c>>u)}if(u>=r||255&c<<8-u)throw new SyntaxError("Unexpected end of data");return s}(e,i,n,t)}})}},function(e,t,r){"use strict";var n=r(8),i=r(40);Object.defineProperty(t,"__esModule",{value:!0});var o=r(99),a=r(193),s=function e(t,r,i,o){n(this,e),this.code=t,this.size=r,this.digest=i,this.bytes=o};t.Digest=s,t.create=function(e,t){var r=t.byteLength,n=a.encodingLength(e),i=n+a.encodingLength(r),o=new Uint8Array(i+r);return a.encodeTo(e,o,0),a.encodeTo(r,o,n),o.set(t,i),new s(e,r,t,o)},t.decode=function(e){var t=o.coerce(e),r=a.decode(t),n=i(r,2),u=n[0],c=n[1],f=a.decode(t.subarray(c)),l=i(f,2),h=l[0],d=l[1],p=t.subarray(c+d);if(p.byteLength!==h)throw new Error("Incorrect length");return new s(u,h,p,t)},t.equals=function(e,t){return e===t||e.code===t.code&&e.size===t.size&&o.equals(e.bytes,t.bytes)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(192),i=r(99),o=n.from({name:"identity",code:0,encode:function(e){return i.coerce(e)}});t.identity=o},function(e,t,r){"use strict";var n=r(40),i=r(8),o=r(9);Object.defineProperty(t,"__esModule",{value:!0});var a=r(193),s=r(88),u=r(58),c=r(67),f=r(99),l=function(){function e(t,r,n,o){i(this,e),this.code=r,this.version=t,this.multihash=n,this.bytes=o,this.byteOffset=o.byteOffset,this.byteLength=o.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:w,byteLength:w,code:m,version:m,multihash:m,bytes:m,_baseCache:w,asCID:w})}return o(e,[{key:"toV0",value:function(){switch(this.version){case 0:return this;default:var t=this.code,r=this.multihash;if(t!==v)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==y)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return e.createV0(r)}}},{key:"toV1",value:function(){switch(this.version){case 0:var t=this.multihash,r=t.code,n=t.digest,i=s.create(r,n);return e.createV1(this.code,i);case 1:return this;default:throw Error("Can not convert CID version ".concat(this.version," to version 0. This is a bug please report"))}}},{key:"equals",value:function(e){return e&&this.code===e.code&&this.version===e.version&&s.equals(this.multihash,e.multihash)}},{key:"toString",value:function(e){var t=this.bytes,r=this.version,n=this._baseCache;switch(r){case 0:return d(t,n,e||u.base58btc.encoder);default:return p(t,n,e||c.base32.encoder)}}},{key:"toJSON",value:function(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}},{key:Symbol.toStringTag,get:function(){return"CID"}},{key:Symbol.for("nodejs.util.inspect.custom"),value:function(){return"CID("+this.toString()+")"}},{key:"toBaseEncodedString",get:function(){throw new Error("Deprecated, use .toString()")}},{key:"codec",get:function(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}},{key:"buffer",get:function(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}},{key:"multibaseName",get:function(){throw new Error('"multibaseName" property is deprecated')}},{key:"prefix",get:function(){throw new Error('"prefix" property is deprecated')}}],[{key:"isCID",value:function(e){return k(/^0\.0/,S),!(!e||!e[g]&&e.asCID!==e)}},{key:"asCID",value:function(t){if(t instanceof e)return t;if(null!=t&&t.asCID===t){var r=t.version,n=t.code,i=t.multihash;return new e(r,n,i,t.bytes||b(r,n,i.bytes))}if(null!=t&&!0===t[g]){var o=t.version,a=t.multihash,u=t.code,c=s.decode(a);return e.create(o,u,c)}return null}},{key:"create",value:function(t,r,n){if("number"!==typeof r)throw new Error("String codecs are no longer supported");switch(t){case 0:if(r!==v)throw new Error("Version 0 CID must use dag-pb (code: ".concat(v,") block encoding"));return new e(t,r,n,n.bytes);case 1:return new e(t,r,n,b(t,r,n.bytes));default:throw new Error("Invalid version")}}},{key:"createV0",value:function(t){return e.create(0,v,t)}},{key:"createV1",value:function(t,r){return e.create(1,t,r)}},{key:"decode",value:function(t){var r=e.decodeFirst(t),i=n(r,2),o=i[0];if(i[1].length)throw new Error("Incorrect length");return o}},{key:"decodeFirst",value:function(t){var r=e.inspectBytes(t),n=r.size-r.multihashSize,i=f.coerce(t.subarray(n,n+r.multihashSize));if(i.byteLength!==r.multihashSize)throw new Error("Incorrect length");var o=i.subarray(r.multihashSize-r.digestSize),a=new s.Digest(r.multihashCode,r.digestSize,o,i);return[0===r.version?e.createV0(a):e.createV1(r.codec,a),t.subarray(r.size)]}},{key:"inspectBytes",value:function(e){var t=0,r=function(){var r=a.decode(e.subarray(t)),i=n(r,2),o=i[0],s=i[1];return t+=s,o},i=r(),o=v;if(18===i?(i=0,t=0):1===i&&(o=r()),0!==i&&1!==i)throw new RangeError("Invalid CID version ".concat(i));var s=t,u=r(),c=r(),f=t+c;return{version:i,codec:o,multihashCode:u,digestSize:c,multihashSize:f-s,size:f}}},{key:"parse",value:function(t,r){var i=h(t,r),o=n(i,2),a=o[0],s=o[1],u=e.decode(s);return u._baseCache.set(a,t),u}}]),e}(),h=function(e,t){switch(e[0]){case"Q":var r=t||u.base58btc;return[u.base58btc.prefix,r.decode("".concat(u.base58btc.prefix).concat(e))];case u.base58btc.prefix:var n=t||u.base58btc;return[u.base58btc.prefix,n.decode(e)];case c.base32.prefix:var i=t||c.base32;return[c.base32.prefix,i.decode(e)];default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},d=function(e,t,r){var n=r.prefix;if(n!==u.base58btc.prefix)throw Error("Cannot string encode V0 in ".concat(r.name," encoding"));var i=t.get(n);if(null==i){var o=r.encode(e).slice(1);return t.set(n,o),o}return i},p=function(e,t,r){var n=r.prefix,i=t.get(n);if(null==i){var o=r.encode(e);return t.set(n,o),o}return i},v=112,y=18,b=function(e,t,r){var n=a.encodingLength(e),i=n+a.encodingLength(t),o=new Uint8Array(i+r.byteLength);return a.encodeTo(e,o,0),a.encodeTo(t,o,n),o.set(r,i),o},g=Symbol.for("@ipld/js-cid/CID"),m={writable:!1,configurable:!1,enumerable:!0},w={writable:!1,enumerable:!1,configurable:!1},k=function(e,t){if(!e.test("0.0.0-dev"))throw new Error(t);console.warn(t)},S="CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n // Make sure to use cid instead of value\n doSomethingWithCID(cid)\n}\n";t.CID=l},function(e,t,r){e.exports={encode:r(664),decode:r(665),encodingLength:r(666)}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(714).Buffer}catch(A){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=l[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?v+r:f[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-i;s++)c[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[o-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,v=d>>>13,y=0|a[2],b=8191&y,g=y>>>13,m=0|a[3],w=8191&m,k=m>>>13,S=0|a[4],E=8191&S,_=S>>>13,A=0|a[5],x=8191&A,T=A>>>13,M=0|a[6],C=8191&M,O=M>>>13,I=0|a[7],P=8191&I,R=I>>>13,B=0|a[8],D=8191&B,N=B>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],K=8191&F,z=F>>>13,V=0|s[1],H=8191&V,J=V>>>13,q=0|s[2],G=8191&q,X=q>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,K)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(v,K)|0,o=Math.imul(v,z);var be=(c+(n=n+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,K),i=(i=Math.imul(b,z))+Math.imul(g,K)|0,o=Math.imul(g,z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,J)|0;var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(k,K)|0,o=Math.imul(k,z),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,X)|0;var me=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(E,K),i=(i=Math.imul(E,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var ke=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(C,K),i=(i=Math.imul(C,z))+Math.imul(O,K)|0,o=Math.imul(O,z),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var Se=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,K),i=(i=Math.imul(P,z))+Math.imul(R,K)|0,o=Math.imul(R,z),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var Ee=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(N,K)|0,o=Math.imul(N,z),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var _e=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ae=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,J))+Math.imul(U,H)|0,o=Math.imul(U,J),n=n+Math.imul(D,G)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0;var xe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,X))+Math.imul(U,G)|0,o=Math.imul(U,X),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Te=(c+(n=n+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ve)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,Y))+Math.imul(U,Z)|0,o=Math.imul(U,Y),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,he)|0;var Me=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,he)|0;var Ce=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Oe=(c+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ve)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Ie=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,he)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,le),i=(i=Math.imul(j,he))+Math.imul(U,le)|0,o=Math.imul(U,he);var Re=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ve)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ve))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ve))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=be,u[2]=ge,u[3]=me,u[4]=we,u[5]=ke,u[6]=Se,u[7]=Ee,u[8]=_e,u[9]=Ae,u[10]=xe,u[11]=Te,u[12]=Me,u[13]=Ce,u[14]=Oe,u[15]=Ie,u[16]=Pe,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function v(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,l=(0|e.words[f])*(0|t.words[c]),h=67108863&l;s=67108863&(h=h+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):v(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},y.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=u,h=c,d=0;d<a;d++){var p=r[f+d],v=n[f+d],y=r[f+d+a],b=n[f+d+a],g=l*y-h*b;b=l*b+h*y,y=g,r[f+d]=p+y,n[f+d]=v+b,r[f+d+a]=p-y,n[f+d+a]=v-b,d!==s&&(g=u*l-c*h,h=u*h+c*l,l=g)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0===(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,l,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*l[d];u[d]=s[d]*l[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),v(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"===typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(m,g),m.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},m.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,g),i(k,g),i(S,g),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new m;else if("p224"===e)t=new w;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return b[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,y=0;0!==v.cmp(s);y++)v=v.redSqr();n(y<p);var b=this.pow(l,new o(1).iushln(p-y-1));h=h.redMul(b),l=b.redSqr(),d=d.redMul(l),p=y}return h},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new _(e)},i(_,E),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(156)(e))},function(e,t,r){var n=r(84),i=r(241),o=r(736),a=r(419);function s(t){var r="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return a(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},s(t)}e.exports=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},function(e,t,r){"use strict";t.encode=r(825),t.decode=r(826),t.varintEncode=r(440),t.varintDecode=r(441),t.int32BEEncode=r(827),t.int32BEDecode=r(828)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(366);t.fromString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.decoder.decode("".concat(r.prefix).concat(e))}},function(e,t,r){var n=r(28).Buffer,i=r(242).Transform,o=r(155).StringDecoder;function a(e){i.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(23)(a,i),a.prototype.update=function(e,t,r){"string"===typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){n=i}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},function(e,t,r){"use strict";var n=r(29);Object.defineProperty(t,"__esModule",{value:!0});var i=r(629),o=r(631),a=r(632),s=r(633),u=r(161),c=r(67),f=r(162),l=r(58),h=r(63),d=r(49),p=r(89),v=r(635),y=r(636);r(637);var b=r(90),g=r(192),m=r(88),w=r(193),k=r(99),S=n(n(n(n(n(n(n(n(n({},i),o),a),s),u),c),f),l),h),E=n(n({},d),p),_={raw:v,json:y};t.CID=b.CID,t.hasher=g,t.digest=m,t.varint=w,t.bytes=k,t.bases=S,t.codecs=_,t.hashes=E},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=new Uint8Array(0);t.coerce=function(e){if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},t.empty=n,t.equals=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},t.fromHex=function(e){var t=e.match(/../g);return t?new Uint8Array(t.map((function(e){return parseInt(e,16)}))):n},t.fromString=function(e){return(new TextEncoder).encode(e)},t.isBinary=function(e){return e instanceof ArrayBuffer||ArrayBuffer.isView(e)},t.toHex=function(e){return e.reduce((function(e,t){return e+t.toString(16).padStart(2,"0")}),"")},t.toString=function(e){return(new TextDecoder).decode(e)}},function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(1);function i(e,t){return n.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(183);var i=r(506),o=r(228);function a(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(i.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,r){"use strict";var n=r(1),i=n.createContext({});t.a=i},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(182);var i=r(142);function o(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,r){"use strict";var n=r(189),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=Object.create(r(154));o.inherits=r(23);var a=r(343),s=r(245);o.inherits(l,a);for(var u=i(s.prototype),c=0;c<u.length;c++){var f=u[c];l.prototype[f]||(l.prototype[f]=s.prototype[f])}function l(e){if(!(this instanceof l))return new l(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),l.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},function(e,t,r){"use strict";(function(t,n){var i=65536,o=4294967295;var a=r(28).Buffer,s=t.crypto||t.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>o)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(e);if(e>0)if(e>i)for(var u=0;u<e;u+=i)s.getRandomValues(r.slice(u,u+i));else s.getRandomValues(r);if("function"===typeof t)return n.nextTick((function(){t(null,r)}));return r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(36),r(39))},function(e,t,r){"use strict";var n=r(23),i=r(249),o=r(251),a=r(252),s=r(97);function u(e){s.call(this,"digest"),this._hash=e}n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(a(e))}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(425);t.toString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.encoder.encode(e).substring(1)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(425);t.fromString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.decoder.decode("".concat(r.prefix).concat(e))}},function(e,t,r){"use strict";(function(e){var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}function o(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=r(749),n.base64=r(750),n.EventEmitter=r(751),n.float=r(752),n.inquire=r(753),n.utf8=r(754),n.pool=r(755),n.LongBits=r(756),n.isNode=Boolean("undefined"!==typeof e&&e&&e.process&&e.process.versions&&e.process.versions.node),n.global=n.isNode&&e||"undefined"!==typeof window&&window||"undefined"!==typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"===typeof e||e instanceof String},n.isObject=function(e){return e&&"object"===typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!==typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"===typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}}).call(this,r(36))},function(e,t,r){var n=r(18);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},function(e,t,r){var n=r(18);r(167),r(763),r(764),r(34),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),o=n.util.createBuffer();function a(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var s=a(),u=null,c=n.util.globalScope,f=c.crypto||c.msCrypto;if(f&&f.getRandomValues&&(u=function(e){return f.getRandomValues(e)}),n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"===typeof window||window.document,s.collectInt(+new Date,32),"undefined"!==typeof navigator){var l="";for(var h in navigator)try{"string"==typeof navigator[h]&&(l+=navigator[h])}catch(d){}s.collect(l),l=null}t&&(t().mousemove((function(e){s.collectInt(e.clientX,16),s.collectInt(e.clientY,16)})),t().keypress((function(e){s.collectInt(e.charCode,8)})))}if(n.random)for(var h in s)n.random[h]=s[h];else n.random=s;n.random.createInstance=a,e.exports=n.random}("undefined"!==typeof jQuery?jQuery:null)},function(e,t,r){var n,i=r(18);e.exports=i.jsbn=i.jsbn||{};function o(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function a(){return new o(null)}function s(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this.data[e],c=this.data[e++]>>14,f=s*u+c*a;i=((u=a*u+((16383&f)<<14)+r.data[n]+i)>>28)+(f>>14)+s*c,r.data[n++]=268435455&u}return i}i.jsbn.BigInteger=o,"undefined"===typeof navigator?(o.prototype.am=s,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this.data[e],c=this.data[e++]>>15,f=s*u+c*a;i=((u=a*u+((32767&f)<<15)+r.data[n]+(1073741823&i))>>>30)+(f>>>15)+s*c+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this.data[e++]+r.data[n]+i;i=Math.floor(a/67108864),r.data[n++]=67108863&a}return i},n=26):(o.prototype.am=s,n=28),o.prototype.DB=n,o.prototype.DM=(1<<n)-1,o.prototype.DV=1<<n;o.prototype.FV=Math.pow(2,52),o.prototype.F1=52-n,o.prototype.F2=2*n-52;var u,c,f=new Array;for(u="0".charCodeAt(0),c=0;c<=9;++c)f[u++]=c;for(u="a".charCodeAt(0),c=10;c<36;++c)f[u++]=c;for(u="A".charCodeAt(0),c=10;c<36;++c)f[u++]=c;function l(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function h(e,t){var r=f[e.charCodeAt(t)];return null==r?-1:r}function d(e){var t=a();return t.fromInt(e),t}function p(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function v(e){this.m=e}function y(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function b(e,t){return e&t}function g(e,t){return e|t}function m(e,t){return e^t}function w(e,t){return e&~t}function k(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function S(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function E(){}function _(e){return e}function A(e){this.r2=a(),this.q3=a(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}v.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},v.prototype.revert=function(e){return e},v.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},v.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},v.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},y.prototype.convert=function(e){var t=a();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t},y.prototype.revert=function(e){var t=a();return e.copyTo(t),this.reduce(t),t},y.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e.data[t],n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},y.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},y.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},o.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},o.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,a=0;--n>=0;){var s=8==r?255&e[n]:h(e,n);s<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==a?this.data[this.t++]=s:a+r>this.DB?(this.data[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this.data[this.t++]=s>>this.DB-a):this.data[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,a>0&&(this.data[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&o.ZERO.subTo(this,this)},o.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t},o.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},o.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s},o.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,o=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t.data[r+a+1]=this.data[r]>>i|s,s=(this.data[r]&o)<<n;for(r=a-1;r>=0;--r)t.data[r]=0;t.data[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},o.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var a=r+1;a<this.t;++a)t.data[a-r-1]|=(this.data[a]&o)<<i,t.data[a-r]=this.data[a]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},o.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},o.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i<n.t;++i)t.data[i+r.t]=r.am(0,n.data[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&o.ZERO.subTo(t,t)},o.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},o.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=a());var s=a(),u=this.s,c=e.s,f=this.DB-p(n.data[n.t-1]);f>0?(n.lShiftTo(f,s),i.lShiftTo(f,r)):(n.copyTo(s),i.copyTo(r));var l=s.t,h=s.data[l-1];if(0!=h){var d=h*(1<<this.F1)+(l>1?s.data[l-2]>>this.F2:0),v=this.FV/d,y=(1<<this.F1)/d,b=1<<this.F2,g=r.t,m=g-l,w=null==t?a():t;for(s.dlShiftTo(m,w),r.compareTo(w)>=0&&(r.data[r.t++]=1,r.subTo(w,r)),o.ONE.dlShiftTo(l,w),w.subTo(s,s);s.t<l;)s.data[s.t++]=0;for(;--m>=0;){var k=r.data[--g]==h?this.DM:Math.floor(r.data[g]*v+(r.data[g-1]+b)*y);if((r.data[g]+=s.am(0,k,r,m,0,l))<k)for(s.dlShiftTo(m,w),r.subTo(w,r);r.data[g]<--k;)r.subTo(w,r)}null!=t&&(r.drShiftTo(l,t),u!=c&&o.ZERO.subTo(t,t)),r.t=l,r.clamp(),f>0&&r.rShiftTo(f,r),u<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(e,t){if(e>4294967295||e<1)return o.ONE;var r=a(),n=a(),i=t.convert(this),s=p(e)-1;for(i.copyTo(r);--s>=0;)if(t.sqrTo(r,n),(e&1<<s)>0)t.mulTo(n,i,r);else{var u=r;r=n,n=u}return t.revert(r)},o.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(r=this.data[a]>>s)>0&&(i=!0,o=l(r));a>=0;)s<t?(r=(this.data[a]&(1<<s)-1)<<t-s,r|=this.data[--a]>>(s+=this.DB-t)):(r=this.data[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=l(r));return i?o:"0"},o.prototype.negate=function(){var e=a();return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(e){var t=a();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t},o.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new v(t):new y(t),this.exp(e,r)},o.ZERO=d(0),o.ONE=d(1),E.prototype.convert=_,E.prototype.revert=_,E.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},E.prototype.sqrTo=function(e,t){e.squareTo(t)},A.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=a();return e.copyTo(t),this.reduce(t),t},A.prototype.revert=function(e){return e},A.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},A.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},A.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var x=[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],T=(1<<26)/x[x.length-1];o.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},o.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=d(r),i=a(),o=a(),s="";for(this.divRemTo(n,i,o);i.signum()>0;)s=(r+o.intValue()).toString(e).substr(1)+s,i.divRemTo(n,i,o);return o.intValue().toString(e)+s},o.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,a=0,s=0,u=0;u<e.length;++u){var c=h(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(i=!0):(s=t*s+c,++a>=r&&(this.dMultiply(n),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}},o.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n<o;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r.data[n]=t(this.data[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r.data[n]=t(i,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},o.prototype.changeBit=function(e,t){var r=o.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},o.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},o.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},o.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i<n;++i)r.data[i+this.t]=this.am(0,e.data[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e.data[i],r,i,0,t-i);r.clamp()},o.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},o.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},o.prototype.millerRabin=function(e){var t=this.subtract(o.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),a={nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(256*Math.random())}},s=0;s<e;++s){do{n=new o(this.bitLength(),a)}while(n.compareTo(o.ONE)<=0||n.compareTo(t)>=0);var u=n.modPow(i,this);if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(t)){for(var c=1;c++<r&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(o.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},o.prototype.clone=function(){var e=a();return this.copyTo(e),e},o.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},o.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},o.prototype.equals=function(e){return 0==this.compareTo(e)},o.prototype.min=function(e){return this.compareTo(e)<0?this:e},o.prototype.max=function(e){return this.compareTo(e)>0?this:e},o.prototype.and=function(e){var t=a();return this.bitwiseTo(e,b,t),t},o.prototype.or=function(e){var t=a();return this.bitwiseTo(e,g,t),t},o.prototype.xor=function(e){var t=a();return this.bitwiseTo(e,m,t),t},o.prototype.andNot=function(e){var t=a();return this.bitwiseTo(e,w,t),t},o.prototype.not=function(){for(var e=a(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e},o.prototype.shiftLeft=function(e){var t=a();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},o.prototype.shiftRight=function(e){var t=a();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},o.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this.data[e])return e*this.DB+k(this.data[e]);return this.s<0?this.t*this.DB:-1},o.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=S(this.data[r]^t);return e},o.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this.data[t]&1<<e%this.DB)},o.prototype.setBit=function(e){return this.changeBit(e,g)},o.prototype.clearBit=function(e){return this.changeBit(e,w)},o.prototype.flipBit=function(e){return this.changeBit(e,m)},o.prototype.add=function(e){var t=a();return this.addTo(e,t),t},o.prototype.subtract=function(e){var t=a();return this.subTo(e,t),t},o.prototype.multiply=function(e){var t=a();return this.multiplyTo(e,t),t},o.prototype.divide=function(e){var t=a();return this.divRemTo(e,t,null),t},o.prototype.remainder=function(e){var t=a();return this.divRemTo(e,null,t),t},o.prototype.divideAndRemainder=function(e){var t=a(),r=a();return this.divRemTo(e,t,r),new Array(t,r)},o.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),o=d(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new v(t):t.isEven()?new A(t):new y(t);var s=new Array,u=3,c=r-1,f=(1<<r)-1;if(s[1]=n.convert(this),r>1){var l=a();for(n.sqrTo(s[1],l);u<=f;)s[u]=a(),n.mulTo(l,s[u-2],s[u]),u+=2}var h,b,g=e.t-1,m=!0,w=a();for(i=p(e.data[g])-1;g>=0;){for(i>=c?h=e.data[g]>>i-c&f:(h=(e.data[g]&(1<<i+1)-1)<<c-i,g>0&&(h|=e.data[g-1]>>this.DB+i-c)),u=r;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--g),m)s[h].copyTo(o),m=!1;else{for(;u>1;)n.sqrTo(o,w),n.sqrTo(w,o),u-=2;u>0?n.sqrTo(o,w):(b=o,o=w,w=b),n.mulTo(w,s[h],o)}for(;g>=0&&0==(e.data[g]&1<<i);)n.sqrTo(o,w),b=o,o=w,w=b,--i<0&&(i=this.DB-1,--g)}return n.revert(o)},o.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return o.ZERO;for(var r=e.clone(),n=this.clone(),i=d(1),a=d(0),s=d(0),u=d(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(i.isEven()&&a.isEven()||(i.addTo(this,i),a.subTo(e,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;n.isEven();)n.rShiftTo(1,n),t?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(s,i),a.subTo(u,a)):(n.subTo(r,n),t&&s.subTo(i,s),u.subTo(a,u))}return 0!=n.compareTo(o.ONE)?o.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},o.prototype.pow=function(e){return this.exp(e,new E)},o.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=x[x.length-1]){for(t=0;t<x.length;++t)if(r.data[0]==x[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<x.length;){for(var n=x[t],i=t+1;i<x.length&&n<T;)n*=x[i++];for(n=r.modInt(n);t<i;)if(n%x[t++]==0)return!1}return r.millerRabin(e)}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return a(t,e),t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidPublicKey=t.getHkdf=t.verifySignedPayload=t.getHandshakePayload=t.decodePayload=t.getPeerIdFromPayload=t.signPayload=t.createHandshakePayload=t.getPayload=t.generateKeypair=void 0;var c=r(832),f=r(444),l=s(r(279)),h=r(13),d=u(r(835)),p=r(853),v=r(139),y=p.pb.NoiseHandshakePayload;function b(){return(b=i(n.mark((function e(t,r,i){var o,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(t,S(r));case 2:return o=e.sent,a=null!==i&&void 0!==i?i:h.Buffer.alloc(0),e.abrupt("return",g(t.marshalPubKey(),o,a));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e,t,r){var n=y.create({identityKey:h.Buffer.from(e),identitySig:t,data:null!==r&&void 0!==r?r:null});return h.Buffer.from(y.encode(n).finish())}function m(e,t){return w.apply(this,arguments)}function w(){return(w=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=h.Buffer,e.next=3,t.privKey.sign(r);case 3:return e.t1=e.sent,e.abrupt("return",e.t0.from.call(e.t0,e.t1));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(){return(k=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.default.createFromPubKey(h.Buffer.from(t.identityKey));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){return h.Buffer.concat([h.Buffer.from("noise-libp2p-static-key:"),e])}function E(e,t){return _.apply(this,arguments)}function _(){return(_=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.default.createFromPubKey(r);case 2:return i=e.sent,e.abrupt("return",v.equals(i.id,t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return(A=i(n.mark((function e(t,r,i){var o,a,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=h.Buffer.from(r.identityKey),e.next=3,E(i.id,o);case 3:if(e.sent){e.next=5;break}throw new Error("Peer ID doesn't match libp2p public key.");case 5:return a=S(t),e.next=8,d.default.createFromPubKey(o);case 8:if(s=e.sent,r.identitySig&&s.pubKey.verify(a,h.Buffer.from(r.identitySig))){e.next=11;break}throw new Error("Static key doesn't match to peer that signed payload!");case 11:return e.abrupt("return",s);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.generateKeypair=function(){var e=l.generateKeyPair();return{publicKey:h.Buffer.from(e.publicKey.buffer,e.publicKey.byteOffset,e.publicKey.length),privateKey:h.Buffer.from(e.secretKey.buffer,e.secretKey.byteOffset,e.secretKey.length)}},t.getPayload=function(e,t,r){return b.apply(this,arguments)},t.createHandshakePayload=g,t.signPayload=m,t.getPeerIdFromPayload=function(e){return k.apply(this,arguments)},t.decodePayload=function(e){return y.toObject(y.decode(h.Buffer.from(e)))},t.getHandshakePayload=S,t.verifySignedPayload=function(e,t,r){return A.apply(this,arguments)},t.getHkdf=function(e,t){var r=new c.HKDF(f.SHA256,t,e).expand(96),n=h.Buffer.from(r.buffer,r.byteOffset,r.length);return[n.slice(0,32),n.slice(32,64),n.slice(64,96)]},t.isValidPublicKey=function(e){return!!h.Buffer.isBuffer(e)&&32===e.length}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(445);t.fromString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.decoder.decode("".concat(r.prefix).concat(e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(445);t.toString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.encoder.encode(e).substring(1)}},function(e,t,r){var n=r(0),i=r(21),o=r(45),a=r(44),s=r(442),u=r(894),c=function(e,t,r){return f(e,Array.isArray(t)?t:[{signal:t,options:r}])},f=function(e,t){function r(){return(r=a(n.mark((function r(){var a,s,c,f,l,h,d,p,v,y,b,g,m,w,k,S,E,_,A;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:s=function(){a&&a()},c=i(t);try{for(c.s();!(f=c.n()).done;)f.value.signal.addEventListener("abort",s)}catch(n){c.e(n)}finally{c.f()}case 3:0,l=void 0,r.prev=5,h=i(t),r.prev=7,h.s();case 9:if((d=h.n()).done){r.next=16;break}if(p=d.value,v=p.signal,y=p.options,!v.aborted){r.next=14;break}throw b=y.abortMessage,g=y.abortCode,new u(b,g);case 14:r.next=9;break;case 16:r.next=21;break;case 18:r.prev=18,r.t0=r.catch(7),h.e(r.t0);case 21:return r.prev=21,h.f(),r.finish(21);case 24:return m=new Promise((function(e,r){a=function(){var e=t.find((function(e){return e.signal.aborted})).options,n=e.abortMessage,i=e.abortCode;r(new u(n,i))}})),r.next=27,o(Promise.race([m,e.next()]));case 27:l=r.sent,a=null,r.next=46;break;case 31:r.prev=31,r.t1=r.catch(5),w=i(t);try{for(w.s();!(k=w.n()).done;)k.value.signal.removeEventListener("abort",s)}catch(n){w.e(n)}finally{w.f()}if(S=t.find((function(e){return e.signal.aborted})),!(E="aborted"===r.t1.type&&S)||!S.options.onAbort){r.next=40;break}return r.next=40,o(S.options.onAbort(e));case 40:if("function"!==typeof e.return){r.next=43;break}return r.next=43,o(e.return());case 43:if(!E||!S.options.returnOnAbort){r.next=45;break}return r.abrupt("return");case 45:throw r.t1;case 46:if(!l.done){r.next=48;break}return r.abrupt("break",52);case 48:return r.next=50,l.value;case 50:r.next=3;break;case 52:_=i(t);try{for(_.s();!(A=_.n()).done;)A.value.signal.removeEventListener("abort",s)}catch(n){_.e(n)}finally{_.f()}case 54:case"end":return r.stop()}}),r,null,[[5,31],[7,18,21,24]])})))).apply(this,arguments)}return e=s(e),t=t.map((function(e){return{signal:e.signal,options:e.options||{}}})),function(){return r.apply(this,arguments)}()},l=function(e,t,r){return h(e,Array.isArray(t)?t:[{signal:t,options:r}])},h=function(e,t){return function(r){return e(f(r,t))}},d=function(e,t){return{sink:h(e.sink,t),source:f(e.source,t)}};e.exports=c,e.exports.AbortError=u,e.exports.source=c,e.exports.sink=l,e.exports.transform=l,e.exports.duplex=function(e,t,r){return d(e,Array.isArray(t)?t:[{signal:t,options:r}])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(481);t.fromString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.decoder.decode("".concat(r.prefix).concat(e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(481);t.toString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.encoder.encode(e).substring(1)}},function(e,t,r){"use strict";function n(e){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t){return null==t?e:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n),t.apply(this,n)}}),(function(){}))}r.d(t,"a",(function(){return n}))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(507);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(n.a)(e,t)}},function(e,t,r){"use strict";function n(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(n(e.value)&&""!==e.value||t&&n(e.defaultValue)&&""!==e.defaultValue)}function o(e){return e.startAdornment}r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return o}))},function(e,t,r){"use strict";r.d(t,"b",(function(){return o}));var n=r(1),i=n.createContext();function o(){return n.useContext(i)}t.a=i},,function(e,t,r){"use strict";e.exports=o,o.className="ReflectionObject";var n,i=r(56);function o(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(o.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.prototype.toJSON=function(){throw Error()},o.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},o.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},o.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},o.prototype.getOption=function(e){if(this.options)return this.options[e]},o.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},o.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var o=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(o){var a=o[e];i.setProperty(a,r,t)}else(o={})[e]=i.setProperty({},r,t),n.push(o)}else{var s={};s[e]=t,n.push(s)}return this},o.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},o.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},o._configure=function(e){n=e}},function(e,t,r){"use strict";e.exports=c;var n=r(128);((c.prototype=Object.create(n.prototype)).constructor=c).className="Field";var i,o=r(83),a=r(153),s=r(56),u=/^required|optional|repeated$/;function c(e,t,r,i,o,c,f){if(s.isObject(i)?(f=o,c=i,i=o=void 0):s.isObject(o)&&(f=c,c=o,o=void 0),n.call(this,e,c),!s.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!s.isString(r))throw TypeError("type must be a string");if(void 0!==i&&!u.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==o&&!s.isString(o))throw TypeError("extend must be a string");"proto3_optional"===i&&(i="optional"),this.rule=i&&"optional"!==i?i:void 0,this.type=r,this.id=t,this.extend=o||void 0,this.required="required"===i,this.optional=!this.required,this.repeated="repeated"===i,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!s.Long&&void 0!==a.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=f}c.fromJSON=function(e,t){return new c(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),c.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},c.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return s.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},c.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=a.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof i?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof o&&"string"===typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof o)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=s.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"===typeof this.typeDefault){var e;s.base64.test(this.typeDefault)?s.base64.decode(this.typeDefault,e=s.newBuffer(s.base64.length(this.typeDefault)),0):s.utf8.write(this.typeDefault,e=s.newBuffer(s.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=s.emptyObject:this.repeated?this.defaultValue=s.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof i&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},c.d=function(e,t,r,n){return"function"===typeof t?t=s.decorateType(t).name:t&&"object"===typeof t&&(t=s.decorateEnum(t).name),function(i,o){s.decorateType(i.constructor).add(new c(o,e,t,r,{default:n}))}},c._configure=function(e){i=e}},function(e,t,r){"use strict";var n=t;n.version=r(575).version,n.utils=r(65),n.rand=r(247),n.curve=r(351),n.curves=r(248),n.ec=r(588),n.eddsa=r(592)},function(e,t,r){"use strict";var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"===typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,a,s;if("string"===typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var u=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r(357),o=r(361);r(23)(c,i);for(var a=n(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||t.nextTick(l,this)}function l(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,r(39))},function(e,t,r){var n=r(28).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"===typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var u=a%i,c=Math.min(o-s,i-u),f=0;f<c;f++)r[u+f]=e[s+f];s+=c,(a+=c)%i===0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=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 e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";(function(t){var n=r(365),i=r(612);function o(e){var t=e;if("string"!==typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function a(e){return"0x"+e.toString(16)}e.exports={arrayContainsArray:function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(r)?"some":"every"]((function(t){return e.indexOf(t)>=0}))},intToBuffer:function(e){var r=a(e);return new t(o(r.slice(2)),"hex")},getBinarySize:function(e){if("string"!==typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return t.byteLength(e,"utf8")},isHexPrefixed:n,stripHexPrefix:i,padToEven:o,intToHex:a,fromAscii:function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r).toString(16);t+=n.length<2?"0"+n:n}return"0x"+t},fromUtf8:function(e){return"0x"+o(new t(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){var i=parseInt(e.substr(r,2),16);t+=String.fromCharCode(i)}return t},toUtf8:function(e){return new t(o(i(e).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(e,t,r){if(!Array.isArray(e))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof e+"'");if("string"!==typeof t)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof t+"'.");for(var n=[],i=0;i<e.length;i++){var o=e[i][t];if(r&&!o)o="";else if("string"!==typeof o)throw new Error("invalid abi");n.push(o)}return n},isHexString:function(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERR_TOPIC_VALIDATOR_IGNORE=t.ERR_TOPIC_VALIDATOR_REJECT=t.TimeCacheDuration=t.GossipsubSeenTTL=t.GossipsubIWantFollowupTime=t.GossipsubMaxIHaveMessages=t.GossipsubMaxIHaveLength=t.GossipsubGraftFloodThreshold=t.GossipsubOpportunisticGraftPeers=t.GossipsubOpportunisticGraftTicks=t.GossipsubDirectConnectInitialDelay=t.GossipsubDirectConnectTicks=t.GossipsubConnectionTimeout=t.GossipsubMaxPendingConnections=t.GossipsubConnectors=t.GossipsubPruneBackoffTicks=t.GossipsubPruneBackoff=t.GossipsubPrunePeers=t.GossipsubFanoutTTL=t.GossipsubHeartbeatInterval=t.GossipsubHeartbeatInitialDelay=t.GossipsubGossipRetransmission=t.GossipsubGossipFactor=t.GossipsubDlazy=t.GossipsubHistoryGossip=t.GossipsubHistoryLength=t.GossipsubDout=t.GossipsubDscore=t.GossipsubDhi=t.GossipsubDlo=t.GossipsubD=t.GossipsubIDv11=t.GossipsubIDv10=t.FloodsubID=t.minute=t.second=void 0,t.second=1e3,t.minute=60*t.second,t.FloodsubID="/floodsub/1.0.0",t.GossipsubIDv10="/meshsub/1.0.0",t.GossipsubIDv11="/meshsub/1.1.0",t.GossipsubD=6,t.GossipsubDlo=4,t.GossipsubDhi=12,t.GossipsubDscore=4,t.GossipsubDout=2,t.GossipsubHistoryLength=5,t.GossipsubHistoryGossip=3,t.GossipsubDlazy=6,t.GossipsubGossipFactor=.25,t.GossipsubGossipRetransmission=3,t.GossipsubHeartbeatInitialDelay=100,t.GossipsubHeartbeatInterval=t.second,t.GossipsubFanoutTTL=t.minute,t.GossipsubPrunePeers=16,t.GossipsubPruneBackoff=t.minute,t.GossipsubPruneBackoffTicks=15,t.GossipsubConnectors=8,t.GossipsubMaxPendingConnections=128,t.GossipsubConnectionTimeout=30*t.second,t.GossipsubDirectConnectTicks=300,t.GossipsubDirectConnectInitialDelay=t.second,t.GossipsubOpportunisticGraftTicks=60,t.GossipsubOpportunisticGraftPeers=2,t.GossipsubGraftFloodThreshold=10*t.second,t.GossipsubMaxIHaveLength=5e3,t.GossipsubMaxIHaveMessages=10,t.GossipsubIWantFollowupTime=3*t.second,t.GossipsubSeenTTL=30*t.second,t.TimeCacheDuration=12e4,t.ERR_TOPIC_VALIDATOR_REJECT="ERR_TOPIC_VALIDATOR_REJECT",t.ERR_TOPIC_VALIDATOR_IGNORE="ERR_TOPIC_VALIDATOR_IGNORE"},function(e,t,r){var n=r(735);function i(t,r,o){return"undefined"!==typeof Reflect&&Reflect.get?e.exports=i=Reflect.get:e.exports=i=function(e,t,r){var i=n(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(r):o.value}},i(t,r,o||t)}e.exports=i},function(e,t,r){var n=r(18);r(112),r(34);var i=e.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var o=n.sha384=n.sha512.sha384=n.sha512.sha384||{};o.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=o,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(e){if(s||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),128),u=[[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]],(c={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],c["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],c["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],c["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],s=!0),"undefined"===typeof e&&(e="SHA-512"),!(e in c))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=c[e],r=null,i=n.util.createBuffer(),o=new Array(80),l=0;l<80;++l)o[l]=new Array(2);var h=64;switch(e){case"SHA-384":h=48;break;case"SHA-512/256":h=32;break;case"SHA-512/224":h=28}var d={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:h,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){d.messageLength=0,d.fullMessageLength=d.messageLength128=[];for(var e=d.messageLengthSize/4,o=0;o<e;++o)d.fullMessageLength.push(0);i=n.util.createBuffer(),r=new Array(t.length);for(o=0;o<t.length;++o)r[o]=t[o].slice(0);return d}};return d.start(),d.update=function(e,t){"utf8"===t&&(e=n.util.encodeUtf8(e));var a=e.length;d.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var s=d.fullMessageLength.length-1;s>=0;--s)d.fullMessageLength[s]+=a[1],a[1]=a[0]+(d.fullMessageLength[s]/4294967296>>>0),d.fullMessageLength[s]=d.fullMessageLength[s]>>>0,a[0]=a[1]/4294967296>>>0;return i.putBytes(e),f(r,o,i),(i.read>2048||0===i.length())&&i.compact(),d},d.digest=function(){var t=n.util.createBuffer();t.putBytes(i.bytes());var s,u=d.fullMessageLength[d.fullMessageLength.length-1]+d.messageLengthSize&d.blockLength-1;t.putBytes(a.substr(0,d.blockLength-u));for(var c=8*d.fullMessageLength[0],l=0;l<d.fullMessageLength.length-1;++l)c+=(s=8*d.fullMessageLength[l+1])/4294967296>>>0,t.putInt32(c>>>0),c=s>>>0;t.putInt32(c);var h=new Array(r.length);for(l=0;l<r.length;++l)h[l]=r[l].slice(0);f(h,o,t);var p,v=n.util.createBuffer();p="SHA-512"===e?h.length:"SHA-384"===e?h.length-2:h.length-4;for(l=0;l<p;++l)v.putInt32(h[l][0]),l===p-1&&"SHA-512/224"===e||v.putInt32(h[l][1]);return v},d};var a=null,s=!1,u=null,c=null;function f(e,t,r){for(var n,i,o,a,s,c,f,l,h,d,p,v,y,b,g,m,w,k,S,E,_,A,x,T,M,C,O,I,P,R,B,D,N,L=r.length();L>=128;){for(O=0;O<16;++O)t[O][0]=r.getInt32()>>>0,t[O][1]=r.getInt32()>>>0;for(;O<80;++O)n=(((I=(R=t[O-2])[0])>>>19|(P=R[1])<<13)^(P>>>29|I<<3)^I>>>6)>>>0,i=((I<<13|P>>>19)^(P<<3|I>>>29)^(I<<26|P>>>6))>>>0,o=(((I=(D=t[O-15])[0])>>>1|(P=D[1])<<31)^(I>>>8|P<<24)^I>>>7)>>>0,a=((I<<31|P>>>1)^(I<<24|P>>>8)^(I<<25|P>>>7))>>>0,B=t[O-7],N=t[O-16],P=i+B[1]+a+N[1],t[O][0]=n+B[0]+o+N[0]+(P/4294967296>>>0)>>>0,t[O][1]=P>>>0;for(p=e[0][0],v=e[0][1],y=e[1][0],b=e[1][1],g=e[2][0],m=e[2][1],w=e[3][0],k=e[3][1],S=e[4][0],E=e[4][1],_=e[5][0],A=e[5][1],x=e[6][0],T=e[6][1],M=e[7][0],C=e[7][1],O=0;O<80;++O)f=((S>>>14|E<<18)^(S>>>18|E<<14)^(E>>>9|S<<23))>>>0,l=(x^S&(_^x))>>>0,s=((p>>>28|v<<4)^(v>>>2|p<<30)^(v>>>7|p<<25))>>>0,c=((p<<4|v>>>28)^(v<<30|p>>>2)^(v<<25|p>>>7))>>>0,h=(p&y|g&(p^y))>>>0,d=(v&b|m&(v^b))>>>0,P=C+(((S<<18|E>>>14)^(S<<14|E>>>18)^(E<<23|S>>>9))>>>0)+((T^E&(A^T))>>>0)+u[O][1]+t[O][1],n=M+f+l+u[O][0]+t[O][0]+(P/4294967296>>>0)>>>0,i=P>>>0,o=s+h+((P=c+d)/4294967296>>>0)>>>0,a=P>>>0,M=x,C=T,x=_,T=A,_=S,A=E,S=w+n+((P=k+i)/4294967296>>>0)>>>0,E=P>>>0,w=g,k=m,g=y,m=b,y=p,b=v,p=n+o+((P=i+a)/4294967296>>>0)>>>0,v=P>>>0;P=e[0][1]+v,e[0][0]=e[0][0]+p+(P/4294967296>>>0)>>>0,e[0][1]=P>>>0,P=e[1][1]+b,e[1][0]=e[1][0]+y+(P/4294967296>>>0)>>>0,e[1][1]=P>>>0,P=e[2][1]+m,e[2][0]=e[2][0]+g+(P/4294967296>>>0)>>>0,e[2][1]=P>>>0,P=e[3][1]+k,e[3][0]=e[3][0]+w+(P/4294967296>>>0)>>>0,e[3][1]=P>>>0,P=e[4][1]+E,e[4][0]=e[4][0]+S+(P/4294967296>>>0)>>>0,e[4][1]=P>>>0,P=e[5][1]+A,e[5][0]=e[5][0]+_+(P/4294967296>>>0)>>>0,e[5][1]=P>>>0,P=e[6][1]+T,e[6][0]=e[6][0]+x+(P/4294967296>>>0)>>>0,e[6][1]=P>>>0,P=e[7][1]+C,e[7][0]=e[7][0]+M+(P/4294967296>>>0)>>>0,e[7][1]=P>>>0,L-=128}}},function(e,t){e.exports=function(e,t){var r={},n=!1;function i(r,i){return n=!0,i=new Promise((function(t){t(e[r](i))})),{done:!1,value:t(i)}}return"function"===typeof Symbol&&Symbol.iterator&&(r[Symbol.iterator]=function(){return this}),r.next=function(e){return n?(n=!1,e):i("next",e)},"function"===typeof e.throw&&(r.throw=function(e){if(n)throw n=!1,e;return i("throw",e)}),"function"===typeof e.return&&(r.return=function(e){return n?(n=!1,e):i("return",e)}),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.equals=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,r){"use strict";function n(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=this,s=function(){e.apply(a,i)};clearTimeout(t),t=setTimeout(s,r)}return n.clear=function(){clearTimeout(t)},n}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(53);function i(e){return Object(n.a)(e).defaultView||window}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(182);function i(e,t){if(e){if("string"===typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},,function(e,t,r){"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n=r(518),i=Object(n.a)();t.a=i},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(520),i=(r(1),r(145));function o(){return Object(n.a)()||i.a}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(509);var i=r(228),o=r(510);function a(e,t){return Object(n.a)(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(e,t)||Object(i.a)(e,t)||Object(o.a)()}},function(e,t,r){"use strict";var n=r(1),i=r.n(n);t.a=i.a.createContext(null)},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}r.d(t,"a",(function(){return i}))},,,function(e,t,r){"use strict";e.exports=l;var n=r(128);((l.prototype=Object.create(n.prototype)).constructor=l).className="Namespace";var i,o,a,s=r(129),u=r(187),c=r(56);function f(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function l(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function h(e){return e._nestedArray=null,e}l.fromJSON=function(e,t){return new l(e,t.options).addJSON(t.nested)},l.arrayToJSON=f,l.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!==typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},l.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),l.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",f(this.nestedArray,e)])},l.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?i.fromJSON:void 0!==t.values?a.fromJSON:void 0!==t.methods?o.fromJSON:void 0!==t.id?s.fromJSON:l.fromJSON)(r[n],t));return this},l.prototype.get=function(e){return this.nested&&this.nested[e]||null},l.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof a)return this.nested[e].values;throw Error("no such enum: "+e)},l.prototype.add=function(e){if(!(e instanceof s&&void 0!==e.extend||e instanceof i||e instanceof a||e instanceof o||e instanceof l||e instanceof u))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof l&&e instanceof l)||t instanceof i||t instanceof o)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),h(this)},l.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),h(this)},l.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof l))throw Error("path conflicts with non-namespace objects")}else r.add(r=new l(n))}return t&&r.addJSON(t),r},l.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof l?e[t++].resolveAll():e[t++].resolve();return this.resolve()},l.prototype.lookup=function(e,t,r){if("boolean"===typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof l&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var i=0;i<this.nestedArray.length;++i)if(this._nestedArray[i]instanceof l&&(n=this._nestedArray[i].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},l.prototype.lookupType=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such type: "+e);return t},l.prototype.lookupEnum=function(e){var t=this.lookup(e,[a]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},l.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[i,a]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},l.prototype.lookupService=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},l._configure=function(e,t,r){i=e,o=t,a=r}},function(e,t,r){"use strict";var n=t,i=r(56),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function a(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}n.basic=a([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=a([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",i.emptyArray,null]),n.long=a([0,0,0,1,1],7),n.mapKey=a([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=a([1,5,0,0,0,5,5,0,0,0,1,1,0])},function(e,t,r){(function(e){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"===typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"===typeof e},t.isString=function(e){return"string"===typeof e},t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"===typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"===typeof e},t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=e.isBuffer}).call(this,r(13).Buffer)},function(e,t,r){"use strict";var n=r(563).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.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(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\ufffd":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";var n=r(75),i=r(66);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},function(e,t,r){"use strict";(function(t){var n=r(186);function i(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function o(e){return t.Buffer&&"function"===typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var a=r(598),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function f(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&("function"===typeof t.ArrayBuffer&&("function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var h=e.exports=g,d=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(a.isFunction(e)){if(c)return e.name;var t=e.toString().match(d);return t&&t[1]}}function v(e,t){return"string"===typeof e?e.length<t?e:e.slice(0,t):e}function y(e){if(c||!a.isFunction(e))return a.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function b(e,t,r,n,i){throw new h.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function g(e,t){e||b(e,!0,t,"==",h.ok)}function m(e,t,r,n){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(a.isDate(e)&&a.isDate(t))return e.getTime()===t.getTime();if(a.isRegExp(e)&&a.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"===typeof e||null!==t&&"object"===typeof t){if(l(e)&&l(t)&&f(e)===f(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var s=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1;if(a.isPrimitive(e)||a.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=w(e),o=w(t);if(i&&!o||!i&&o)return!1;if(i)return m(e=u.call(e),t=u.call(t),r);var s,c,f=E(e),l=E(t);if(f.length!==l.length)return!1;for(f.sort(),l.sort(),c=f.length-1;c>=0;c--)if(f[c]!==l[c])return!1;for(c=f.length-1;c>=0;c--)if(!m(e[s=f[c]],t[s],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function w(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(r){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function S(e,t,r,n){var i;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(r){t=r}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&b(i,r,"Missing expected exception"+n);var o="string"===typeof n,s=!e&&i&&!r;if((!e&&a.isError(i)&&o&&k(i,r)||s)&&b(i,r,"Got unwanted exception"+n),e&&i&&r&&!k(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return v(y(e.actual),128)+" "+e.operator+" "+v(y(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=p(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},a.inherits(h.AssertionError,Error),h.fail=b,h.ok=g,h.equal=function(e,t,r){e!=t&&b(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&b(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){m(e,t,!1)||b(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){m(e,t,!0)||b(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){m(e,t,!1)&&b(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){m(t,r,!0)&&b(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&b(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&b(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){S(!0,e,t,r)},h.doesNotThrow=function(e,t,r){S(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=n((function e(t,r){t||b(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var E=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,r(36))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.stripZeros=t.unpad=t.setLengthRight=t.setLength=t.setLengthLeft=t.zeros=void 0;var n=r(134),i=r(14);t.zeros=function(t){return e.allocUnsafe(t).fill(0)},t.setLengthLeft=function(e,r,n){void 0===n&&(n=!1);var i=t.zeros(r);return e=t.toBuffer(e),n?e.length<r?(e.copy(i),i):e.slice(0,r):e.length<r?(e.copy(i,r-e.length),i):e.slice(-r)},t.setLength=t.setLengthLeft,t.setLengthRight=function(e,r){return t.setLength(e,r,!0)},t.unpad=function(e){for(var t=(e=n.stripHexPrefix(e))[0];e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"===typeof t){if(!n.isHexString(t))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+t);t=e.from(n.padToEven(n.stripHexPrefix(t)),"hex")}else if("number"===typeof t)t=n.intToBuffer(t);else if(null===t||void 0===t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}return t},t.bufferToInt=function(e){return new i(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new i(e).fromTwos(256)},t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!==typeof e||n.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(r){if(e.isBuffer(r))return"0x"+r.toString("hex");if(r instanceof Array){for(var n=[],i=0;i<r.length;i++)n.push(t.baToJSON(r[i]));return n}}}).call(this,r(13).Buffer)},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87),i=n.rfc4648({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),o=n.rfc4648({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});t.base16=i,t.base16upper=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87),i=n.baseX({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),o=n.baseX({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});t.base36=i,t.base36upper=o},function(e,t,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;o<n;++o)i[o]=e[o]^r[o];return i}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";var n=r(23),i=r(263).Reporter,o=r(261).Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return s.isEncoderBuffer(e)||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"===typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"===typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),t.DecoderBuffer=a,a.isDecoderBuffer=function(e){return e instanceof a||"object"===typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"===typeof e.offset&&"number"===typeof e.length&&"function"===typeof e.save&&"function"===typeof e.restore&&"function"===typeof e.isEmpty&&"function"===typeof e.readUInt8&&"function"===typeof e.skip&&"function"===typeof e.raw},a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=s,s.isEncoderBuffer=function(e){return e instanceof s||"object"===typeof e&&"EncoderBuffer"===e.constructor.name&&"number"===typeof e.length&&"function"===typeof e.join},s.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"===typeof this.value?e[t]=this.value:"string"===typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,r){e.exports=r(711)(r(712))},function(e,t,r){"use strict";var n=r(77),i=r(108);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},function(e,t,r){var n=r(18);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.aes.Algorithm(e,t)}))}r(423),r(424),r(34),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){f||l();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return d(r._w,e,t,!1)},decrypt:function(e,t){return d(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!==typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var i=0;i<t.length;++i)r.putByte(t[i])}}else r=n.util.createBuffer(r);if(!n.util.isArray(r)){t=r,r=[];var o=t.length();if(16===o||24===o||32===o){o>>>=2;for(i=0;i<o;++i)r.push(t.getInt32())}}if(!n.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var a=this.mode.name,s=-1!==["CFB","OFB","CTR","GCM"].indexOf(a);this._w=h(r,e.decrypt&&!s),this._init=!0}},n.aes._expandKey=function(e,t){return f||l(),h(e,t)},n.aes._updateBlock=d,i("AES-ECB",n.cipher.modes.ecb),i("AES-CBC",n.cipher.modes.cbc),i("AES-CFB",n.cipher.modes.cfb),i("AES-OFB",n.cipher.modes.ofb),i("AES-CTR",n.cipher.modes.ctr),i("AES-GCM",n.cipher.modes.gcm);var o,a,s,u,c,f=!1;function l(){f=!0,s=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;o=new Array(256),a=new Array(256),u=new Array(4),c=new Array(4);for(t=0;t<4;++t)u[t]=new Array(256),c[t]=new Array(256);var r,n,i,l,h,d,p,v=0,y=0;for(t=0;t<256;++t){l=(l=y^y<<1^y<<2^y<<3^y<<4)>>8^255&l^99,o[v]=l,a[l]=v,d=(h=e[l])<<24^l<<16^l<<8^l^h,p=((r=e[v])^(n=e[r])^(i=e[n]))<<24^(v^i)<<16^(v^n^i)<<8^v^r^i;for(var b=0;b<4;++b)u[b][v]=d,c[b][l]=p,d=d<<24|d>>>8,p=p<<24|p>>>8;0===v?v=y=1:(v=r^e[e[e[r^i]]],y^=e[e[y]])}}function h(e,t){for(var r,n=e.slice(0),i=1,a=n.length,u=4*(a+6+1),f=a;f<u;++f)r=n[f-1],f%a===0?(r=o[r>>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^s[i]<<24,i++):a>6&&f%a===4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[f]=n[f-a]^r;if(t){for(var l,h=c[0],d=c[1],p=c[2],v=c[3],y=n.slice(0),b=(f=0,(u=n.length)-4);f<u;f+=4,b-=4)if(0===f||f===u-4)y[f]=n[b],y[f+1]=n[b+3],y[f+2]=n[b+2],y[f+3]=n[b+1];else for(var g=0;g<4;++g)l=n[b+g],y[f+(3&-g)]=h[o[l>>>24]]^d[o[l>>>16&255]]^p[o[l>>>8&255]]^v[o[255&l]];n=y}return n}function d(e,t,r,n){var i,s,f,l,h,d,p,v,y,b,g,m,w=e.length/4-1;n?(i=c[0],s=c[1],f=c[2],l=c[3],h=a):(i=u[0],s=u[1],f=u[2],l=u[3],h=o),d=t[0]^e[0],p=t[n?3:1]^e[1],v=t[2]^e[2],y=t[n?1:3]^e[3];for(var k=3,S=1;S<w;++S)b=i[d>>>24]^s[p>>>16&255]^f[v>>>8&255]^l[255&y]^e[++k],g=i[p>>>24]^s[v>>>16&255]^f[y>>>8&255]^l[255&d]^e[++k],m=i[v>>>24]^s[y>>>16&255]^f[d>>>8&255]^l[255&p]^e[++k],y=i[y>>>24]^s[d>>>16&255]^f[p>>>8&255]^l[255&v]^e[++k],d=b,p=g,v=m;r[0]=h[d>>>24]<<24^h[p>>>16&255]<<16^h[v>>>8&255]<<8^h[255&y]^e[++k],r[n?3:1]=h[p>>>24]<<24^h[v>>>16&255]<<16^h[y>>>8&255]<<8^h[255&d]^e[++k],r[2]=h[v>>>24]<<24^h[y>>>16&255]<<16^h[d>>>8&255]<<8^h[255&p]^e[++k],r[n?1:3]=h[y>>>24]<<24^h[d>>>16&255]<<16^h[p>>>8&255]<<8^h[255&v]^e[++k]}function p(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n=r(18);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function o(e,t){i[e]=t,i[t]=e}function a(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.3.101.112","EdDSA25519"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.5","serialName"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.9","streetAddress"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.5.4.13","description"),o("2.5.4.15","businessCategory"),o("2.5.4.17","postalCode"),o("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),o("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),o("2.16.840.1.113730.1.1","nsCertType"),o("2.16.840.1.113730.1.13","nsComment"),a("2.5.29.1","authorityKeyIdentifier"),a("2.5.29.2","keyAttributes"),a("2.5.29.3","certificatePolicies"),a("2.5.29.4","keyUsageRestriction"),a("2.5.29.5","policyMapping"),a("2.5.29.6","subtreesConstraint"),a("2.5.29.7","subjectAltName"),a("2.5.29.8","issuerAltName"),a("2.5.29.9","subjectDirectoryAttributes"),a("2.5.29.10","basicConstraints"),a("2.5.29.11","nameConstraints"),a("2.5.29.12","policyConstraints"),a("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),a("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),a("2.5.29.20","cRLNumber"),a("2.5.29.21","cRLReason"),a("2.5.29.22","expirationDate"),a("2.5.29.23","instructionCode"),a("2.5.29.24","invalidityDate"),a("2.5.29.25","cRLDistributionPoints"),a("2.5.29.26","issuingDistributionPoint"),a("2.5.29.27","deltaCRLIndicator"),a("2.5.29.28","issuingDistributionPoint"),a("2.5.29.29","certificateIssuer"),a("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),a("2.5.29.33","policyMappings"),a("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),a("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),a("2.5.29.46","freshestCRL"),a("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},function(e,t,r){var n=r(18);if(r(167),r(62),r(270),r(112),r(168),r(428),r(272),r(113),r(765),r(78),r(34),"undefined"===typeof i)var i=n.jsbn.BigInteger;var o=n.asn1,a=n.pki=n.pki||{};e.exports=a.pbe=n.pbe=n.pbe||{};var s=a.oids,u={name:"EncryptedPrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},c={name:"PBES2Algorithms",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},f={name:"pkcs-12PbeParams",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"iterations"}]};function l(e,t){return e.start().update(t).digest().getBytes()}function h(e){var t;if(e){if(!(t=a.oids[o.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return d(t)}function d(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}a.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,u,c,f=n.random.getBytesSync(r.saltSize),l=r.count,h=o.integerToDer(l);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var p,v,y;switch(r.algorithm){case"aes128":i=16,p=16,v=s["aes128-CBC"],y=n.aes.createEncryptionCipher;break;case"aes192":i=24,p=16,v=s["aes192-CBC"],y=n.aes.createEncryptionCipher;break;case"aes256":i=32,p=16,v=s["aes256-CBC"],y=n.aes.createEncryptionCipher;break;case"des":i=8,p=8,v=s.desCBC,y=n.des.createEncryptionCipher;break;default:throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S}var b="hmacWith"+r.prfAlgorithm.toUpperCase(),g=d(b),m=n.pkcs5.pbkdf2(t,f,l,i,g),w=n.random.getBytesSync(p);(E=y(m)).start(w),E.update(o.toDer(e)),E.finish(),c=E.output.getBytes();var k=function(e,t,r,i){var s=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,t.getBytes())]);"hmacWithSHA1"!==i&&s.value.push(o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.oids[i]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]));return s}(f,h,i,b);u=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.pkcs5PBES2).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.pkcs5PBKDF2).getBytes()),k]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(v).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,w)])])])}else{var S;if("3des"!==r.algorithm)throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S;i=24;var E,_=new n.util.ByteBuffer(f);m=a.pbe.generatePkcs12Key(t,_,1,l,i),w=a.pbe.generatePkcs12Key(t,_,2,l,i);(E=n.des.createEncryptionCipher(m)).start(w),E.update(o.toDer(e)),E.finish(),c=E.output.getBytes(),u=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,f),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,h.getBytes())])])}return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[u,o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,c)])},a.decryptPrivateKeyInfo=function(e,t){var r=null,i={},s=[];if(!o.validate(e,u,i,s)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=s,c}var f=o.derToOid(i.encryptionOid),l=a.pbe.getCipher(f,i.encryptionParams,t),h=n.util.createBuffer(i.encryptedData);return l.update(h),l.finish()&&(r=o.fromDer(l.output)),r},a.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:o.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},a.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return o.fromDer(t.body)},a.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=a.wrapRsaPrivateKey(a.privateKeyToAsn1(e));return i=a.encryptPrivateKeyInfo(i,t,r),a.encryptedPrivateKeyToPem(i)}var s,u,c,f;switch(r.algorithm){case"aes128":s="AES-128-CBC",c=16,u=n.random.getBytesSync(16),f=n.aes.createEncryptionCipher;break;case"aes192":s="AES-192-CBC",c=24,u=n.random.getBytesSync(16),f=n.aes.createEncryptionCipher;break;case"aes256":s="AES-256-CBC",c=32,u=n.random.getBytesSync(16),f=n.aes.createEncryptionCipher;break;case"3des":s="DES-EDE3-CBC",c=24,u=n.random.getBytesSync(8),f=n.des.createEncryptionCipher;break;case"des":s="DES-CBC",c=8,u=n.random.getBytesSync(8),f=n.des.createEncryptionCipher;break;default:var l=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw l.algorithm=r.algorithm,l}var h=f(n.pbe.opensslDeriveBytes(t,u.substr(0,8),c));h.start(u),h.update(o.toDer(a.privateKeyToAsn1(e))),h.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:n.util.bytesToHex(u).toUpperCase()},body:h.output.getBytes()};return n.pem.encode(d)},a.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(c=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=c,c;if(i.procType&&"ENCRYPTED"===i.procType.type){var s,u;switch(i.dekInfo.algorithm){case"DES-CBC":s=8,u=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,u=n.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,u=n.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,u=n.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,u=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,u=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":s=8,u=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":s=16,u=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var c;throw(c=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,c}var f=n.util.hexToBytes(i.dekInfo.parameters),l=u(n.pbe.opensslDeriveBytes(t,f.substr(0,8),s));if(l.start(f),l.update(n.util.createBuffer(i.body)),!l.finish())return r;r=l.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?a.decryptPrivateKeyInfo(o.fromDer(r),t):o.fromDer(r))&&(r=a.privateKeyFromAsn1(r)),r},a.pbe.generatePkcs12Key=function(e,t,r,i,o,a){var s,u;if("undefined"===typeof a||null===a){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');a=n.md.sha1.create()}var c=a.digestLength,f=a.blockLength,l=new n.util.ByteBuffer,h=new n.util.ByteBuffer;if(null!==e&&void 0!==e){for(u=0;u<e.length;u++)h.putInt16(e.charCodeAt(u));h.putInt16(0)}var d=h.length(),p=t.length(),v=new n.util.ByteBuffer;v.fillWithByte(r,f);var y=f*Math.ceil(p/f),b=new n.util.ByteBuffer;for(u=0;u<y;u++)b.putByte(t.at(u%p));var g=f*Math.ceil(d/f),m=new n.util.ByteBuffer;for(u=0;u<g;u++)m.putByte(h.at(u%d));var w=b;w.putBuffer(m);for(var k=Math.ceil(o/c),S=1;S<=k;S++){var E=new n.util.ByteBuffer;E.putBytes(v.bytes()),E.putBytes(w.bytes());for(var _=0;_<i;_++)a.start(),a.update(E.getBytes()),E=a.digest();var A=new n.util.ByteBuffer;for(u=0;u<f;u++)A.putByte(E.at(u%c));var x=Math.ceil(p/f)+Math.ceil(d/f),T=new n.util.ByteBuffer;for(s=0;s<x;s++){var M=new n.util.ByteBuffer(w.getBytes(f)),C=511;for(u=A.length()-1;u>=0;u--)C>>=8,C+=A.at(u)+M.at(u),M.setAt(u,255&C);T.putBuffer(M)}w=T,l.putBuffer(E)}return l.truncate(l.length()-o),l},a.pbe.getCipher=function(e,t,r){switch(e){case a.oids.pkcs5PBES2:return a.pbe.getCipherForPBES2(e,t,r);case a.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case a.oids["pbewithSHAAnd40BitRC2-CBC"]:return a.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},a.pbe.getCipherForPBES2=function(e,t,r){var i,s={},u=[];if(!o.validate(t,c,s,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i;if((e=o.derToOid(s.kdfOid))!==a.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=o.derToOid(s.encOid))!==a.oids["aes128-CBC"]&&e!==a.oids["aes192-CBC"]&&e!==a.oids["aes256-CBC"]&&e!==a.oids["des-EDE3-CBC"]&&e!==a.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var f,l,d=s.kdfSalt,p=n.util.createBuffer(s.kdfIterationCount);switch(p=p.getInt(p.length()<<3),a.oids[e]){case"aes128-CBC":f=16,l=n.aes.createDecryptionCipher;break;case"aes192-CBC":f=24,l=n.aes.createDecryptionCipher;break;case"aes256-CBC":f=32,l=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":f=24,l=n.des.createDecryptionCipher;break;case"desCBC":f=8,l=n.des.createDecryptionCipher}var v=h(s.prfOid),y=n.pkcs5.pbkdf2(r,d,p,f,v),b=s.encIv,g=l(y);return g.start(b),g},a.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},s=[];if(!o.validate(t,f,i,s))throw(v=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=s,v;var u,c,l,d=n.util.createBuffer(i.salt),p=n.util.createBuffer(i.iterations);switch(p=p.getInt(p.length()<<3),e){case a.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,c=8,l=n.des.startDecrypting;break;case a.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,c=8,l=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var v;throw(v=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,v}var y=h(i.prfOid),b=a.pbe.generatePkcs12Key(r,d,1,p,u,y);return y.start(),l(b,a.pbe.generatePkcs12Key(r,d,2,p,c,y))},a.pbe.opensslDeriveBytes=function(e,t,r,i){if("undefined"===typeof i||null===i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var o=[l(i,e+t)],a=16,s=1;a<r;++s,a+=16)o.push(l(i,o[s-1]+e+t));return o.join("").substr(0,r)}},function(e,t,r){"use strict";var n=r(419),i=r(86),o=r(8),a=r(9),s=r(61),u=r(26),c=r(27);e.exports=function(e,t){var r=t.className,n=t.symbolName,f=Symbol.for(n),l=i({},r,function(e){u(n,e);var t=c(n);function n(){var e;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),Object.defineProperty(s(e),f,{value:!0}),e}return a(n,[{key:Symbol.toStringTag,get:function(){return r}}]),n}(e))[r];return l["is".concat(r)]=function(e){return!(!e||!e[f])},l},e.exports.proto=function(e,t){var r=t.className,o=t.symbolName,a=t.withoutNew,s=Symbol.for(o),u=i({},r,(function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(a&&!(this instanceof u))return n(u,r);var o=e.call.apply(e,[this].concat(r))||this;return o&&!o[s]&&Object.defineProperty(o,s,{value:!0}),o}))[r];return u.prototype=Object.create(e.prototype),u.prototype.constructor=u,Object.defineProperty(u.prototype,Symbol.toStringTag,{get:function(){return r}}),u["is".concat(r)]=function(e){return!(!e||!e[s])},u}},,function(e,t,r){"use strict";var n=r(6),i=r(0),o=r(44),a=r(45),s=r(30),u=r(138),c=r(438),f=r(173),l=r(280);e.exports=function(e){var t,r=f(),h=c(e.source),d=l(),p=e.sink(o(i.mark((function e(){var t;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(u(s(r),a),"t0",1);case 1:return e.next=3,a(d.promise);case 3:return t=e.sent,e.delegateYield(u(s(t),a),"t1",5);case 5:case"end":return e.stop()}}),e)})))());return p.catch((function(e){t=e})),{reader:h,writer:r,stream:{sink:function(e){return t?Promise.reject(t):(d.resolve(e),p)},source:h},rest:function(){return r.end()},write:r.push,read:function(){var e=n(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.next();case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}}},function(e,t,r){var n=r(86),i=r(439);e.exports=function(e){var t,r,o;"function"===typeof(e=e||{})?(o=e,e={}):o=e.onEnd;var a,s,u,c=new i,f=function(e){return s?s(e):(c.push(e),a)},l=function(e){return u?a:f({done:!1,value:e})},h=function(e){return u?a:(u=!0,e?function(e){return c=new i,s?s({error:e}):(c.push({error:e}),a)}(e):f({done:!0}))};if(n(t={},Symbol.asyncIterator,(function(){return this})),n(t,"next",(function(){if(!c.isEmpty()){if(e.writev){for(var t,r=[];!c.isEmpty();){if((t=c.shift()).error)throw t.error;r.push(t.value)}return{done:t.done,value:r}}var n=c.shift();if(n.error)throw n.error;return n}return u?{done:!0}:new Promise((function(t,r){s=function(n){return s=null,n.error?r(n.error):e.writev&&!n.done?t({done:n.done,value:[n.value]}):t(n),a}}))})),n(t,"return",(function(){return c=new i,h(),{done:!0}})),n(t,"throw",(function(e){return h(e),{done:!0}})),n(t,"push",l),n(t,"end",h),a=t,!o)return a;var d=a;return n(r={},Symbol.asyncIterator,(function(){return this})),n(r,"next",(function(){return d.next()})),n(r,"throw",(function(e){return d.throw(e),o&&(o(e),o=null),{done:!0}})),n(r,"return",(function(){return d.return(),o&&(o(),o=null),{done:!0}})),n(r,"push",l),n(r,"end",(function(e){return d.end(e),o&&(o(e),o=null),a})),a=r}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logCipherState=t.logRemoteEphemeralKey=t.logRemoteStaticKey=t.logLocalEphemeralKeys=t.logLocalStaticKeys=t.logger=void 0;var i,o=n(r(22)),a=r(288);t.logger=o.default("libp2p:noise"),i=a.DUMP_SESSION_KEYS?t.logger:function(){},t.logLocalStaticKeys=function(e){i("LOCAL_STATIC_PUBLIC_KEY ".concat(e.publicKey.toString("hex"))),i("LOCAL_STATIC_PRIVATE_KEY ".concat(e.privateKey.toString("hex")))},t.logLocalEphemeralKeys=function(e){e?(i("LOCAL_PUBLIC_EPHEMERAL_KEY ".concat(e.publicKey.toString("hex"))),i("LOCAL_PRIVATE_EPHEMERAL_KEY ".concat(e.privateKey.toString("hex")))):i("Missing local ephemeral keys.")},t.logRemoteStaticKey=function(e){i("REMOTE_STATIC_PUBLIC_KEY ".concat(e.toString("hex")))},t.logRemoteEphemeralKey=function(e){i("REMOTE_EPHEMERAL_PUBLIC_KEY ".concat(e.toString("hex")))},t.logCipherState=function(e){e.cs1&&e.cs2?(i("CIPHER_STATE_1 ".concat(e.cs1.n," ").concat(e.cs1.k.toString("hex"))),i("CIPHER_STATE_2 ".concat(e.cs2.n," ").concat(e.cs2.k.toString("hex")))):i("Missing cipher state.")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(462);t.fromString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.decoder.decode("".concat(r.prefix).concat(e))}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-circuit"]||(n.roots["libp2p-circuit"]={});s.CircuitRelay=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.type=1,e.prototype.srcPeer=null,e.prototype.dstPeer=null,e.prototype.code=100,e.encode=function(e,t){return t||(t=o.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.srcPeer&&Object.hasOwnProperty.call(e,"srcPeer")&&s.CircuitRelay.Peer.encode(e.srcPeer,t.uint32(18).fork()).ldelim(),null!=e.dstPeer&&Object.hasOwnProperty.call(e,"dstPeer")&&s.CircuitRelay.Peer.encode(e.dstPeer,t.uint32(26).fork()).ldelim(),null!=e.code&&Object.hasOwnProperty.call(e,"code")&&t.uint32(32).int32(e.code),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.CircuitRelay;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.type=e.int32();break;case 2:n.srcPeer=s.CircuitRelay.Peer.decode(e,e.uint32());break;case 3:n.dstPeer=s.CircuitRelay.Peer.decode(e,e.uint32());break;case 4:n.code=e.int32();break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.CircuitRelay)return e;var t=new s.CircuitRelay;switch(e.type){case"HOP":case 1:t.type=1;break;case"STOP":case 2:t.type=2;break;case"STATUS":case 3:t.type=3;break;case"CAN_HOP":case 4:t.type=4}if(null!=e.srcPeer){if("object"!==typeof e.srcPeer)throw TypeError(".CircuitRelay.srcPeer: object expected");t.srcPeer=s.CircuitRelay.Peer.fromObject(e.srcPeer)}if(null!=e.dstPeer){if("object"!==typeof e.dstPeer)throw TypeError(".CircuitRelay.dstPeer: object expected");t.dstPeer=s.CircuitRelay.Peer.fromObject(e.dstPeer)}switch(e.code){case"SUCCESS":case 100:t.code=100;break;case"HOP_SRC_ADDR_TOO_LONG":case 220:t.code=220;break;case"HOP_DST_ADDR_TOO_LONG":case 221:t.code=221;break;case"HOP_SRC_MULTIADDR_INVALID":case 250:t.code=250;break;case"HOP_DST_MULTIADDR_INVALID":case 251:t.code=251;break;case"HOP_NO_CONN_TO_DST":case 260:t.code=260;break;case"HOP_CANT_DIAL_DST":case 261:t.code=261;break;case"HOP_CANT_OPEN_DST_STREAM":case 262:t.code=262;break;case"HOP_CANT_SPEAK_RELAY":case 270:t.code=270;break;case"HOP_CANT_RELAY_TO_SELF":case 280:t.code=280;break;case"STOP_SRC_ADDR_TOO_LONG":case 320:t.code=320;break;case"STOP_DST_ADDR_TOO_LONG":case 321:t.code=321;break;case"STOP_SRC_MULTIADDR_INVALID":case 350:t.code=350;break;case"STOP_DST_MULTIADDR_INVALID":case 351:t.code=351;break;case"STOP_RELAY_REFUSED":case 390:t.code=390;break;case"MALFORMED_MESSAGE":case 400:t.code=400}return t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.type=t.enums===String?"HOP":1,r.srcPeer=null,r.dstPeer=null,r.code=t.enums===String?"SUCCESS":100),null!=e.type&&e.hasOwnProperty("type")&&(r.type=t.enums===String?s.CircuitRelay.Type[e.type]:e.type),null!=e.srcPeer&&e.hasOwnProperty("srcPeer")&&(r.srcPeer=s.CircuitRelay.Peer.toObject(e.srcPeer,t)),null!=e.dstPeer&&e.hasOwnProperty("dstPeer")&&(r.dstPeer=s.CircuitRelay.Peer.toObject(e.dstPeer,t)),null!=e.code&&e.hasOwnProperty("code")&&(r.code=t.enums===String?s.CircuitRelay.Status[e.code]:e.code),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e.Status=function(){var e={},t=Object.create(e);return t[e[100]="SUCCESS"]=100,t[e[220]="HOP_SRC_ADDR_TOO_LONG"]=220,t[e[221]="HOP_DST_ADDR_TOO_LONG"]=221,t[e[250]="HOP_SRC_MULTIADDR_INVALID"]=250,t[e[251]="HOP_DST_MULTIADDR_INVALID"]=251,t[e[260]="HOP_NO_CONN_TO_DST"]=260,t[e[261]="HOP_CANT_DIAL_DST"]=261,t[e[262]="HOP_CANT_OPEN_DST_STREAM"]=262,t[e[270]="HOP_CANT_SPEAK_RELAY"]=270,t[e[280]="HOP_CANT_RELAY_TO_SELF"]=280,t[e[320]="STOP_SRC_ADDR_TOO_LONG"]=320,t[e[321]="STOP_DST_ADDR_TOO_LONG"]=321,t[e[350]="STOP_SRC_MULTIADDR_INVALID"]=350,t[e[351]="STOP_DST_MULTIADDR_INVALID"]=351,t[e[390]="STOP_RELAY_REFUSED"]=390,t[e[400]="MALFORMED_MESSAGE"]=400,t}(),e.Type=function(){var e={},t=Object.create(e);return t[e[1]="HOP"]=1,t[e[2]="STOP"]=2,t[e[3]="STATUS"]=3,t[e[4]="CAN_HOP"]=4,t}(),e.Peer=function(){function e(e){if(this.addrs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.id=a.newBuffer([]),e.prototype.addrs=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),t.uint32(10).bytes(e.id),null!=e.addrs&&e.addrs.length)for(var r=0;r<e.addrs.length;++r)t.uint32(18).bytes(e.addrs[r]);return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.CircuitRelay.Peer;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.id=e.bytes();break;case 2:n.addrs&&n.addrs.length||(n.addrs=[]),n.addrs.push(e.bytes());break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("id"))throw a.ProtocolError("missing required 'id'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.CircuitRelay.Peer)return e;var t=new s.CircuitRelay.Peer;if(null!=e.id&&("string"===typeof e.id?a.base64.decode(e.id,t.id=a.newBuffer(a.base64.length(e.id)),0):e.id.length&&(t.id=e.id)),e.addrs){if(!Array.isArray(e.addrs))throw TypeError(".CircuitRelay.Peer.addrs: array expected");t.addrs=[];for(var r=0;r<e.addrs.length;++r)"string"===typeof e.addrs[r]?a.base64.decode(e.addrs[r],t.addrs[r]=a.newBuffer(a.base64.length(e.addrs[r])),0):e.addrs[r].length&&(t.addrs[r]=e.addrs[r])}return t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.addrs=[]),t.defaults&&(t.bytes===String?r.id="":(r.id=[],t.bytes!==Array&&(r.id=a.newBuffer(r.id)))),null!=e.id&&e.hasOwnProperty("id")&&(r.id=t.bytes===String?a.base64.encode(e.id,0,e.id.length):t.bytes===Array?Array.prototype.slice.call(e.id):e.id),e.addrs&&e.addrs.length){r.addrs=[];for(var n=0;n<e.addrs.length;++n)r.addrs[n]=t.bytes===String?a.base64.encode(e.addrs[n],0,e.addrs[n].length):t.bytes===Array?Array.prototype.slice.call(e.addrs[n]):e.addrs[n]}return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e}(),e.exports=s},function(e,t,r){"use strict";var n="undefined"!==typeof self?self:"undefined"!==typeof window?window:void 0,i=n.AbortController,o=n.AbortSignal;e.exports=i,e.exports.AbortSignal=o,e.exports.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.equals=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}},,function(e,t,r){"use strict";var n=r(21);Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e,t){t||(t=e.reduce((function(e,t){return e+t.length}),0));var r,i=new Uint8Array(t),o=0,a=n(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.equals=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,"a",(function(){return n}))},,function(e,t,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var r,s,u=a(e),c=1;c<arguments.length;c++){for(var f in r=Object(arguments[c]))i.call(r,f)&&(u[f]=r[f]);if(n){s=n(r);for(var l=0;l<s.length;l++)o.call(r,s[l])&&(u[s[l]]=r[s[l]])}}return u}},function(e,t,r){"use strict";e.exports=a;var n=r(128);((a.prototype=Object.create(n.prototype)).constructor=a).className="OneOf";var i=r(129),o=r(56);function a(e,t,r,i){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=i}function s(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}a.fromJSON=function(e,t){return new a(e,t.oneof,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},a.prototype.add=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,s(this),this},a.prototype.remove=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},a.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}s(this)},a.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},a.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){o.decorateType(t.constructor).add(new a(r,e)),Object.defineProperty(t,r,{get:o.oneOfGetter(e),set:o.oneOfSetter(e)})}}},function(e,t,r){var n=r(337);e.exports=function(e,t){if(e){if("string"===typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t,r){"use strict";(function(t){"undefined"===typeof t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!==typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,n)}));case 4:return t.nextTick((function(){e.call(null,r,n,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick((function(){e.apply(null,o)}))}}}:e.exports=t}).call(this,r(39))},function(e,t,r){"use strict";var n=r(14),i=r(65),o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2===0?2:1);i/=3;var a,u,c=[];for(a=0;a<n.length;a+=r.step){u=0;for(var f=a+r.step-1;f>=a;f--)u=(u<<1)+n[f];c.push(u)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a<c.length;a++)(u=c[a])===d?h=h.mixedAdd(r.points[a]):u===-d&&(h=h.mixedAdd(r.points[a].neg()));l=l.add(h)}return l.toP()},u.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(t,r,this._bitLength),u=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var l=a[c];s(0!==l),u="affine"===e.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var s,u,c,f=this._wnafT1,l=this._wnafT2,h=this._wnafT3,d=0;for(s=0;s<n;s++){var p=(c=t[s])._getNAFPoints(e);f[s]=p.wnd,l[s]=p.points}for(s=n-1;s>=1;s-=2){var v=s-1,y=s;if(1===f[v]&&1===f[y]){var b=[t[v],null,null,t[y]];0===t[v].y.cmp(t[y].y)?(b[1]=t[v].add(t[y]),b[2]=t[v].toJ().mixedAdd(t[y].neg())):0===t[v].y.cmp(t[y].y.redNeg())?(b[1]=t[v].toJ().mixedAdd(t[y]),b[2]=t[v].add(t[y].neg())):(b[1]=t[v].toJ().mixedAdd(t[y]),b[2]=t[v].toJ().mixedAdd(t[y].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],m=a(r[v],r[y]);for(d=Math.max(m[0].length,d),h[v]=new Array(d),h[y]=new Array(d),u=0;u<d;u++){var w=0|m[0][u],k=0|m[1][u];h[v][u]=g[3*(w+1)+(k+1)],h[y][u]=0,l[v]=b}}else h[v]=o(r[v],f[v],this._bitLength),h[y]=o(r[y],f[y],this._bitLength),d=Math.max(h[v].length,d),d=Math.max(h[y].length,d)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(s=d;s>=0;s--){for(var _=0;s>=0;){var A=!0;for(u=0;u<n;u++)E[u]=0|h[u][s],0!==E[u]&&(A=!1);if(!A)break;_++,s--}if(s>=0&&_++,S=S.dblp(_),s<0)break;for(u=0;u<n;u++){var x=E[u];0!==x&&(x>0?c=l[u][x-1>>1]:x<0&&(c=l[u][-x-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(s=0;s<n;s++)l[s]=null;return i?S:S.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1===2*r)return 6===e[0]?s(e[e.length-1]%2===0):7===e[0]&&s(e[e.length-1]%2===1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var n=r(14);function i(e,t){if("00"===e.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function o(t,r){if(t<56)return e.from([t+r]);var n=u(t),i=u(r+55+n.length/2);return e.from(i+n,"hex")}function a(t){var r,n,o,s,u,c=[],f=t[0];if(f<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(f<=183){if(r=f-127,o=128===f?e.from([]):t.slice(1,r),2===r&&o[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:o,remainder:t.slice(r)}}if(f<=191){if(n=f-182,t.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if((r=i(t.slice(1,n).toString("hex"),16))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if((o=t.slice(n,r+n)).length<r)throw new Error("invalid RLP: not enough bytes for string");return{data:o,remainder:t.slice(r+n)}}if(f<=247){for(r=f-191,s=t.slice(1,r);s.length;)u=a(s),c.push(u.data),s=u.remainder;return{data:c,remainder:t.slice(r)}}var l=(n=f-246)+(r=i(t.slice(1,n).toString("hex"),16));if(l>t.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=t.slice(n,l)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)u=a(s),c.push(u.data),s=u.remainder;return{data:c,remainder:t.slice(l)}}function s(e){return"0x"===e.slice(0,2)}function u(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function c(t){if(!e.isBuffer(t)){if("string"===typeof t)return s(t)?e.from((r="string"!==typeof(i=t)?i:s(i)?i.slice(2):i).length%2?"0"+r:r,"hex"):e.from(t);if("number"===typeof t||"bigint"===typeof t)return t?function(t){var r=u(t);return e.from(r,"hex")}(t):e.from([]);if(null===t||void 0===t)return e.from([]);if(t instanceof Uint8Array)return e.from(t);if(n.isBN(t))return e.from(t.toArray());throw new Error("invalid type")}var r,i;return t}t.encode=function t(r){if(Array.isArray(r)){for(var n=[],i=0;i<r.length;i++)n.push(t(r[i]));var a=e.concat(n);return e.concat([o(a.length,192),a])}var s=c(r);return 1===s.length&&s[0]<128?s:e.concat([o(s.length,128),s])},t.decode=function(t,r){if(void 0===r&&(r=!1),!t||0===t.length)return e.from([]);var n=a(c(t));if(r)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var r=c(t),n=r[0];if(n<=127)return r.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var o=n-246;return o+i(r.slice(1,o).toString("hex"),16)}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9);Object.defineProperty(t,"__esModule",{value:!0});var s=r(88),u=function(){function e(t,r,n){o(this,e),this.name=t,this.code=r,this.encode=n}return a(e,[{key:"digest",value:function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t instanceof Uint8Array)){e.next=7;break}return e.next=3,this.encode(t);case 3:return r=e.sent,e.abrupt("return",s.create(this.code,r));case 7:throw Error("Unknown type, must be binary type");case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.Hasher=u,t.from=function(e){var t=e.name,r=e.code,n=e.encode;return new u(t,r,n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(634);t.decode=function(e){return[n.decode(e),n.decode.bytes]},t.encodeTo=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return n.encode(e,t,r),t},t.encodingLength=function(e){return n.encodingLength(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(379);t.toString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.encoder.encode(e).substring(1)}},function(e,t,r){"use strict";function n(e){if("number"===typeof e){if(n.codes[e])return n.codes[e];throw new Error("no protocol with code: "+e)}if("string"===typeof e){if(n.names[e])return n.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}var i=-1;function o(e,t,r,n,i){return{code:e,size:t,name:r,resolvable:Boolean(n),path:Boolean(i)}}n.lengthPrefixedVarSize=i,n.V=i,n.table=[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,i,"ip6zone"],[53,i,"dns","resolvable"],[54,i,"dns4","resolvable"],[55,i,"dns6","resolvable"],[56,i,"dnsaddr","resolvable"],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,i,"unix",!1,"path"],[421,i,"ipfs"],[421,i,"p2p"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,i,"garlic64"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"],[777,i,"memory"]],n.names={},n.codes={},n.table.map((function(e){var t=o.apply(null,e);return n.codes[t.code]=t,n.names[t.name]=t,null})),n.object=o,e.exports=n},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(106),t.createHash=t.Hash=r(107),t.createHmac=t.Hmac=r(383);var n=r(671),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(386);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(673);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var u=r(688);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=r(691);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r(706);var f=r(707);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var l=r(710);t.randomFill=l.randomFill,t.randomFillSync=l.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,r){var n=r(28).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function o(e){for(;0<e.length;e++)e[0]=0}function a(e,t,r,n,i){for(var o,a,s,u,c=r[0],f=r[1],l=r[2],h=r[3],d=e[0]^t[0],p=e[1]^t[1],v=e[2]^t[2],y=e[3]^t[3],b=4,g=1;g<i;g++)o=c[d>>>24]^f[p>>>16&255]^l[v>>>8&255]^h[255&y]^t[b++],a=c[p>>>24]^f[v>>>16&255]^l[y>>>8&255]^h[255&d]^t[b++],s=c[v>>>24]^f[y>>>16&255]^l[d>>>8&255]^h[255&p]^t[b++],u=c[y>>>24]^f[d>>>16&255]^l[p>>>8&255]^h[255&v]^t[b++],d=o,p=a,v=s,y=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[v>>>8&255]<<8|n[255&y])^t[b++],a=(n[p>>>24]<<24|n[v>>>16&255]<<16|n[y>>>8&255]<<8|n[255&d])^t[b++],s=(n[v>>>24]<<24|n[y>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[b++],u=(n[y>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&v])^t[b++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var f=e[a],l=e[f],h=e[l],d=257*e[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*l^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^e[e[e[h^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<n;o++){var a=i[o-1];o%t===0?(a=a<<8|a>>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t===4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],f=0;f<n;f++){var l=n-f,h=i[l-(f%4?0:4)];c[f]=f<4||l<=4?h:u.INV_SUB_MIX[0][u.SBOX[h>>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},function(e,t,r){var n=r(28).Buffer,i=r(249);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(e),t&&f.update(t),c=f.digest();var l=0;if(a>0){var h=s.length-a;l=Math.min(a,c.length),c.copy(s,h,0,l),a-=l}if(l<c.length&&o>0){var d=u.length-o,p=Math.min(o,c.length-l);c.copy(u,d,l,l+p),o-=p}}return c.fill(0),{key:s,iv:u}}},function(e,t,r){var n=r(696),i=r(703),o=r(704),a=r(258),s=r(386),u=r(28).Buffer;function c(e){var t;"object"!==typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"===typeof e&&(e=u.from(e));var r,c,f=o(e,t),l=f.tag,h=f.data;switch(l){case"CERTIFICATE":c=n.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(h,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,h=s.pbkdf2Sync(t,r,n,l,"sha1"),d=a.createDecipheriv(o,h,c),p=[];return p.push(d.update(f)),p.push(d.final()),u.concat(p)}(h=n.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(r=(c=n.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=n.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+l)}}e.exports=c,c.signature=n.signature},function(e,t,r){"use strict";var n=r(92),i=r(68),o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2===0?2:1);i/=3;var a,u,c=[];for(a=0;a<n.length;a+=r.step){u=0;for(var f=a+r.step-1;f>=a;f--)u=(u<<1)+n[f];c.push(u)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a<c.length;a++)(u=c[a])===d?h=h.mixedAdd(r.points[a]):u===-d&&(h=h.mixedAdd(r.points[a].neg()));l=l.add(h)}return l.toP()},u.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(t,r,this._bitLength),u=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var l=a[c];s(0!==l),u="affine"===e.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var s,u,c,f=this._wnafT1,l=this._wnafT2,h=this._wnafT3,d=0;for(s=0;s<n;s++){var p=(c=t[s])._getNAFPoints(e);f[s]=p.wnd,l[s]=p.points}for(s=n-1;s>=1;s-=2){var v=s-1,y=s;if(1===f[v]&&1===f[y]){var b=[t[v],null,null,t[y]];0===t[v].y.cmp(t[y].y)?(b[1]=t[v].add(t[y]),b[2]=t[v].toJ().mixedAdd(t[y].neg())):0===t[v].y.cmp(t[y].y.redNeg())?(b[1]=t[v].toJ().mixedAdd(t[y]),b[2]=t[v].add(t[y].neg())):(b[1]=t[v].toJ().mixedAdd(t[y]),b[2]=t[v].toJ().mixedAdd(t[y].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],m=a(r[v],r[y]);for(d=Math.max(m[0].length,d),h[v]=new Array(d),h[y]=new Array(d),u=0;u<d;u++){var w=0|m[0][u],k=0|m[1][u];h[v][u]=g[3*(w+1)+(k+1)],h[y][u]=0,l[v]=b}}else h[v]=o(r[v],f[v],this._bitLength),h[y]=o(r[y],f[y],this._bitLength),d=Math.max(h[v].length,d),d=Math.max(h[y].length,d)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(s=d;s>=0;s--){for(var _=0;s>=0;){var A=!0;for(u=0;u<n;u++)E[u]=0|h[u][s],0!==E[u]&&(A=!1);if(!A)break;_++,s--}if(s>=0&&_++,S=S.dblp(_),s<0)break;for(u=0;u<n;u++){var x=E[u];0!==x&&(x>0?c=l[u][x-1>>1]:x<0&&(c=l[u][-x-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(s=0;s<n;s++)l[s]=null;return i?S:S.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1===2*r)return 6===e[0]?s(e[e.length-1]%2===0):7===e[0]&&s(e[e.length-1]%2===1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){"use strict";t.get=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:self,t=e.crypto||e.msCrypto;if(!t||!t.subtle)throw Object.assign(new Error("Missing Web Crypto API. The most likely cause of this error is that this page is being accessed from an insecure context (i.e. not HTTPS). For more information and possible resolutions see https://github.com/libp2p/js-libp2p-crypto/blob/master/README.md#web-crypto-api"),{code:"ERR_MISSING_WEB_CRYPTO"});return t}},function(e,t,r){"use strict";var n=r(21);Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e,t){t||(t=e.reduce((function(e,t){return e+t.length}),0));var r,i=new Uint8Array(t),o=0,a=n(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.equals=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,r){"use strict";var n=65536;e.exports=function(e){var t=new Uint8Array(e),r=0;if(e>0)if(e>n)for(;r<e;)r+n>e?(crypto.getRandomValues(t.subarray(r,r+(e-r))),r+=e-r):(crypto.getRandomValues(t.subarray(r,r+n)),r+=n);else crypto.getRandomValues(t);return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(820);function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function o(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function a(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function s(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function u(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function c(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function f(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function l(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),f(e/4294967296>>>0,t,r),f(e>>>0,t,r+4),t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),l(e>>>0,t,r),l(e/4294967296>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=o,t.writeInt16LE=o,t.readInt32BE=a,t.readUint32BE=s,t.readInt32LE=u,t.readUint32LE=c,t.writeUint32BE=f,t.writeInt32BE=f,t.writeUint32LE=l,t.writeInt32LE=l,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=a(e,t),n=a(e,t+4);return 4294967296*r+n-4294967296*(n>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*s(e,t)+s(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=u(e,t);return 4294967296*u(e,t+4)+r-4294967296*(r>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 4294967296*c(e,t+4)+r},t.writeUint64BE=h,t.writeInt64BE=h,t.writeUint64LE=d,t.writeInt64LE=d,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=e/8+r-1;o>=r;o--)n+=t[o]*i,i*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o<r+e/8;o++)n+=t[o]*i,i*=256;return n},t.writeUintBE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var o=1,a=e/8+i-1;a>=i;a--)r[a]=t/o&255,o*=256;return r},t.writeUintLE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,a=i;a<i+e/8;a++)r[a]=t/o&255,o*=256;return r},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e),t},t.writeFloat32LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e,!0),t},t.writeFloat64BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e),t},t.writeFloat64LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e,!0),t}},function(e,t,r){"use strict";var n=r(21);Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e,t){t||(t=e.reduce((function(e,t){return e+t.length}),0));var r,i=new Uint8Array(t),o=0,a=n(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}},function(e,t,r){"use strict";t.get=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis,t=e.crypto;if(!t||!t.subtle)throw Object.assign(new Error("Missing Web Crypto API. The most likely cause of this error is that this page is being accessed from an insecure context (i.e. not HTTPS). For more information and possible resolutions see https://github.com/libp2p/js-libp2p-crypto/blob/master/README.md#web-crypto-api"),{code:"ERR_MISSING_WEB_CRYPTO"});return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode2=t.decode1=t.decode0=t.encode2=t.encode1=t.encode0=t.uint16BEDecode=t.uint16BEEncode=void 0;var n=r(13);t.uint16BEEncode=function(e,t,r){return(t=t||n.Buffer.allocUnsafe(2)).writeUInt16BE(e,r),t},t.uint16BEEncode.bytes=2;t.uint16BEDecode=function(e){if(e.length<2)throw RangeError("Could not decode int16BE");return e.readUInt16BE(0)},t.uint16BEDecode.bytes=2,t.encode0=function(e){return n.Buffer.concat([e.ne,e.ciphertext])},t.encode1=function(e){return n.Buffer.concat([e.ne,e.ns,e.ciphertext])},t.encode2=function(e){return n.Buffer.concat([e.ns,e.ciphertext])},t.decode0=function(e){if(e.length<32)throw new Error("Cannot decode stage 0 MessageBuffer: length less than 32 bytes.");return{ne:e.slice(0,32),ciphertext:e.slice(32,e.length),ns:n.Buffer.alloc(0)}},t.decode1=function(e){if(e.length<80)throw new Error("Cannot decode stage 1 MessageBuffer: length less than 80 bytes.");return{ne:e.slice(0,32),ns:e.slice(32,80),ciphertext:e.slice(80,e.length)}},t.decode2=function(e){if(e.length<48)throw new Error("Cannot decode stage 2 MessageBuffer: length less than 48 bytes.");return{ne:n.Buffer.alloc(0),ns:e.slice(0,48),ciphertext:e.slice(48,e.length)}}},function(e,t,r){"use strict";var n=r(21),i=r(868),o=Object.prototype.hasOwnProperty,a=Object.propertyIsEnumerable,s=function(e,t,r){return Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})},u=this,c={concatArrays:!1,ignoreUndefined:!1},f=function(e){var t=[];for(var r in e)o.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){var i,s=Object.getOwnPropertySymbols(e),u=n(s);try{for(u.s();!(i=u.n()).done;){var c=i.value;a.call(e,c)&&t.push(c)}}catch(f){u.e(f)}finally{u.f()}}return t};function l(e){return Array.isArray(e)?function(e){var t=e.slice(0,0);return f(e).forEach((function(r){s(t,r,l(e[r]))})),t}(e):i(e)?function(e){var t=null===Object.getPrototypeOf(e)?Object.create(null):{};return f(e).forEach((function(r){s(t,r,l(e[r]))})),t}(e):e}var h=function(e,t,r,n){return r.forEach((function(r){"undefined"===typeof t[r]&&n.ignoreUndefined||(r in e&&e[r]!==Object.getPrototypeOf(e)?s(e,r,d(e[r],t[r],n)):s(e,r,l(t[r])))})),e};function d(e,t,r){return r.concatArrays&&Array.isArray(e)&&Array.isArray(t)?function(e,t,r){var n=e.slice(0,0),i=0;return[e,t].forEach((function(t){for(var a=[],u=0;u<t.length;u++)o.call(t,u)&&(a.push(String(u)),s(n,i++,t===e?t[u]:l(t[u])));n=h(n,t,f(t).filter((function(e){return!a.includes(e)})),r)})),n}(e,t,r):i(t)&&i(e)?h(e,t,f(t),r):l(t)}e.exports=function(){for(var e=d(l(c),this!==u&&this||{},c),t={_:{}},r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];for(var a=0,s=n;a<s.length;a++){var f=s[a];if(void 0!==f){if(!i(f))throw new TypeError("`"+f+"` is not an Option Object");t=d(t,{_:f},e)}}return t._}},function(e,t,r){"use strict";var n=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(15),u=r(882).concat,c=r(175).fromString,f=r(268),l=r(43),h=r(91),d=r(292).equals,p=r(50).codes,v=r(883).Envelope,y=function(){function e(t){var r=t.peerId,n=t.payloadType,i=t.payload,a=t.signature;o(this,e),this.peerId=r,this.payloadType=n,this.payload=i,this.signature=a,this._marshal=void 0}return a(e,[{key:"marshal",value:function(){if(this._marshal)return this._marshal;var e=f.marshalPublicKey(this.peerId.pubKey);return this._marshal=v.encode({publicKey:e,payloadType:this.payloadType,payload:this.payload,signature:this.signature}).finish(),this._marshal}},{key:"equals",value:function(e){return d(this.peerId.pubKey.bytes,e.peerId.pubKey.bytes)&&d(this.payloadType,e.payloadType)&&d(this.payload,e.payload)&&d(this.signature,e.signature)}},{key:"validate",value:function(e){var t=b(e,this.payloadType,this.payload);return this.peerId.pubKey.verify(t,this.signature)}}]),e}(),b=function(e,t,r){var n=c(e),i=h.encode(n.byteLength),o=h.encode(t.length),a=h.encode(r.length);return u([new Uint8Array(i),n,new Uint8Array(o),t,new Uint8Array(a),r])};y.createFromProtobuf=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=v.decode(t),e.next=3,l.createFromPubKey(r.publicKey);case 3:return i=e.sent,e.abrupt("return",new y({peerId:i,payloadType:r.payloadType,payload:r.payload,signature:r.signature}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y.seal=function(){var e=i(n.mark((function e(t,r){var i,o,a,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.domain,o=t.codec,a=t.marshal(),s=b(i,o,a),e.next=6,r.privKey.sign(s);case 6:return u=e.sent,e.abrupt("return",new y({peerId:r,payloadType:o,payload:a,signature:u}));case 8:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),y.openAndCertify=function(){var e=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.createFromProtobuf(t);case 2:return i=e.sent,e.next=5,i.validate(r);case 5:if(e.sent){e.next=8;break}throw s(new Error("envelope signature is not valid for the given domain"),p.ERR_SIGNATURE_NOT_VALID);case 8:return e.abrupt("return",i);case 9:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),e.exports=y},function(e,t,r){"use strict";e.exports={relay:"/libp2p/circuit/relay/0.1.0"}},function(e,t,r){"use strict";var n=r(48),i=r(86),o=r(8),a=r(9),s=r(15),u=r(43),c=r(50).codes.ERR_INVALID_PARAMETERS,f=function(e){return e},l=function(){function e(t){var r=t.peerStore,n=t.eventName,i=t.eventProperty,a=t.eventTransformer,s=void 0===a?f:a;o(this,e),this._ps=r,this.eventName=n,this.eventProperty=i,this.eventTransformer=s,this.data=new Map}return a(e,[{key:"set",value:function(e,t){throw s(new Error("set must be implemented by the subclass"),"ERR_NOT_IMPLEMENTED")}},{key:"_setData",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.emit,i=void 0===n||n,o=e.toB58String();this.data.set(o,t),i&&this._emit(e,t)}},{key:"_emit",value:function(e,t){this._ps.emit(this.eventName,i({peerId:e},this.eventProperty,this.eventTransformer(t)))}},{key:"get",value:function(e){if(!u.isPeerId(e))throw s(new Error("peerId must be an instance of peer-id"),c);var t=this.data.get(e.toB58String());return t?n(t):void 0}},{key:"delete",value:function(e){if(!u.isPeerId(e))throw s(new Error("peerId must be an instance of peer-id"),c);return!!this.data.delete(e.toB58String())&&(this._emit(e,[]),!0)}}]),e}();e.exports=l},function(e,t,r){"use strict";var n=r(21);Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e,t){t||(t=e.reduce((function(e,t){return e+t.length}),0));var r,i=new Uint8Array(t),o=0,a=n(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}},function(e,t,r){"use strict";t.get=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis,t=e.crypto;if(!t||!t.subtle)throw Object.assign(new Error("Missing Web Crypto API. The most likely cause of this error is that this page is being accessed from an insecure context (i.e. not HTTPS). For more information and possible resolutions see https://github.com/libp2p/js-libp2p-crypto/blob/master/README.md#web-crypto-api"),{code:"ERR_MISSING_WEB_CRYPTO"});return t}},,,function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(29),u=r(90).CID,c=r(67),f=r(162),l=r(58),h=r(63),d=r(58).base58btc,p=r(67).base32,v=r(161).base16,y=r(88),b=r(1029),g=r(170),m=r(1045).PeerIdProto,w=r(181).equals,k=r(96).fromString,S=r(85).toString,E=r(89).identity,_=s(s(s(s({},c),f),l),h),A=Object.keys(_).reduce((function(e,t){return e.or(_[t])}),p.decoder),x=g(function(){function e(t,r,n){if(o(this,e),!(t instanceof Uint8Array))throw new Error("invalid id provided");if(r&&n&&!w(r.public.bytes,n.bytes))throw new Error("inconsistent arguments");this._id=t,this._idB58String=d.encode(this.id).substring(1),this._privKey=r,this._pubKey=n}return a(e,[{key:"id",get:function(){return this._id},set:function(e){throw new Error("Id is immutable")}},{key:"privKey",get:function(){return this._privKey},set:function(e){this._privKey=e}},{key:"pubKey",get:function(){if(this._pubKey)return this._pubKey;if(this._privKey)return this._privKey.public;try{var e=y.decode(this.id);e.code===E.code&&(this._pubKey=b.unmarshalPublicKey(e.digest))}catch(t){}return this._pubKey},set:function(e){this._pubKey=e}},{key:"marshalPubKey",value:function(){if(this.pubKey)return b.marshalPublicKey(this.pubKey)}},{key:"marshalPrivKey",value:function(){if(this.privKey)return b.marshalPrivateKey(this.privKey)}},{key:"marshal",value:function(e){return m.encode({id:this.toBytes(),pubKey:this.marshalPubKey(),privKey:e?null:this.marshalPrivKey()}).finish()}},{key:"toPrint",value:function(){var e=this.toB58String();e.startsWith("Qm")&&(e=e.slice(2));var t=6;return e.length<t&&(t=e.length),"<peer.ID "+e.substr(0,t)+">"}},{key:"toJSON",value:function(){return{id:this.toB58String(),privKey:O(this.marshalPrivKey()),pubKey:O(this.marshalPubKey())}}},{key:"toHexString",value:function(){return v.encode(this.id).substring(1)}},{key:"toBytes",value:function(){return this.id}},{key:"toB58String",value:function(){return this._idB58String}},{key:"toString",value:function(){if(!this._idCIDString){var e=u.createV1(114,y.decode(this.id));Object.defineProperty(this,"_idCIDString",{value:e.toString(),enumerable:!1})}return this._idCIDString}},{key:"equals",value:function(e){if(e instanceof Uint8Array)return w(this.id,e);if(e.id)return w(this.id,e.id);throw new Error("not valid Id")}},{key:"isEqual",value:function(e){return this.equals(e)}},{key:"isValid",value:function(){return Boolean(this.privKey&&this.privKey.public&&this.privKey.public.bytes&&this.pubKey.bytes instanceof Uint8Array&&w(this.privKey.public.bytes,this.pubKey.bytes))}},{key:"hasInlinePublicKey",value:function(){try{if(y.decode(this.id).code===E.code)return!0}catch(e){}return!1}}]),e}(),{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"});t=e.exports=x;var T=function(e){return e.bytes.length<=42?y.create(E.code,e.bytes).bytes:e.hash()},M=function(){var e=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T(r);case 2:return i=e.sent,e.abrupt("return",new x(i,t,r));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.create=function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=t||{}).bits=t.bits||2048,t.keyType=t.keyType||"RSA",e.next=5,b.generateKeyPair(t.keyType,t.bits);case 5:return r=e.sent,e.abrupt("return",M(r,r.public));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromHexString=function(e){return new x(v.decode("f"+e))},t.createFromBytes=function(e){try{var r=u.decode(e);if(!C(r))throw new Error("Supplied PeerID CID is invalid");return t.createFromCID(r)}catch(n){if(y.decode(e).code!==E.code)throw new Error("Supplied PeerID CID is invalid");return new x(e)}},t.createFromB58String=function(e){return t.createFromBytes(d.decode("z"+e))};var C=function(e){return 114===e.code||112===e.code};function O(e){if(e)return S(e,"base64pad")}t.createFromCID=function(e){if(!(e=u.asCID(e))||!C(e))throw new Error("Supplied PeerID CID is invalid");return new x(e.multihash.bytes)},t.createFromPubKey=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof(r=t)&&(r=k(t,"base64pad")),r instanceof Uint8Array){e.next=4;break}throw new Error("Supplied key is neither a base64 string nor a Uint8Array");case 4:return e.next=6,b.unmarshalPublicKey(r);case 6:return i=e.sent,e.abrupt("return",M(void 0,i));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromPrivKey=function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t&&(t=k(t,"base64pad")),t instanceof Uint8Array){e.next=3;break}throw new Error("Supplied key is neither a base64 string nor a Uint8Array");case 3:return e.next=5,b.unmarshalPrivateKey(t);case 5:return r=e.sent,e.abrupt("return",M(r,r.public));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromJSON=function(){var e=i(n.mark((function e(t){var r,i,o,a,s,u,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=d.decode("z"+t.id),i=t.privKey&&k(t.privKey,"base64pad"),o=t.pubKey&&k(t.pubKey,"base64pad"),e.t0=o,!e.t0){e.next=8;break}return e.next=7,b.unmarshalPublicKey(o);case 7:e.t0=e.sent;case 8:if(a=e.t0,i){e.next=11;break}return e.abrupt("return",new x(r,void 0,a));case 11:return e.next=13,b.unmarshalPrivateKey(i);case 13:return s=e.sent,e.next=16,T(s.public);case 16:if(u=e.sent,!a){e.next=21;break}return e.next=20,T(a);case 20:c=e.sent;case 21:if(!a||w(u,c)){e.next=23;break}throw new Error("Public and private key do not match");case 23:if(!r||w(u,r)){e.next=25;break}throw new Error("Id and private key do not match");case 25:return e.abrupt("return",new x(r,s,a));case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromProtobuf=function(){var e=i(n.mark((function e(t){var r,i,o,a,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t&&(t=k(t,"base16")),r=m.decode(t),i=r.id,o=r.privKey,a=r.pubKey,!o){e.next=8;break}return e.next=5,b.unmarshalPrivateKey(o);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=!1;case 9:if(o=e.t0,!a){e.next=16;break}return e.next=13,b.unmarshalPublicKey(a);case 13:e.t1=e.sent,e.next=17;break;case 16:e.t1=!1;case 17:if(a=e.t1,!o){e.next=22;break}return e.next=21,T(o.public);case 21:u=e.sent;case 22:if(!a){e.next=26;break}return e.next=25,T(a);case 25:s=e.sent;case 26:if(!o){e.next=31;break}if(!a){e.next=30;break}if(w(u,s)){e.next=30;break}throw new Error("Public and private key do not match");case 30:return e.abrupt("return",new x(u,o,o.public));case 31:if(!a){e.next=33;break}return e.abrupt("return",new x(s,void 0,a));case 33:if(!i){e.next=35;break}return e.abrupt("return",new x(i));case 35:throw new Error("Protobuf did not contain any usable key material");case 36:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.parse=function(e){return"1"!==e.charAt(0)&&"Q"!==e.charAt(0)||(e="z".concat(e)),t.createFromBytes(A.decode(e))},t.isPeerId=function(e){return Boolean("object"===typeof e&&e._id&&e._idB58String)}},function(e,t,r){"use strict";t.get=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis,t=e.crypto;if(!t||!t.subtle)throw Object.assign(new Error("Missing Web Crypto API. The most likely cause of this error is that this page is being accessed from an insecure context (i.e. not HTTPS). For more information and possible resolutions see https://github.com/libp2p/js-libp2p-crypto/blob/master/README.md#web-crypto-api"),{code:"ERR_MISSING_WEB_CRYPTO"});return t}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(1),i=r(38),o=!0,a=!1,s=null,u={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function f(){o=!1}function l(){"hidden"===this.visibilityState&&a&&(o=!0)}function h(e){var t=e.target;try{return t.matches(":focus-visible")}catch(r){}return o||function(e){var t=e.type,r=e.tagName;return!("INPUT"!==r||!u[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}function d(){a=!0,window.clearTimeout(s),s=window.setTimeout((function(){a=!1}),100)}function p(){return{isFocusVisible:h,onBlurVisible:d,ref:n.useCallback((function(e){var t,r=i.findDOMNode(e);null!=r&&((t=r.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",f,!0),t.addEventListener("pointerdown",f,!0),t.addEventListener("touchstart",f,!0),t.addEventListener("visibilitychange",l,!0))}),[])}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(1);function i(e){var t=e.controlled,r=e.default,i=(e.name,e.state,n.useRef(void 0!==t).current),o=n.useState(r),a=o[0],s=o[1];return[i?t:a,n.useCallback((function(e){i||s(e)}),[])]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var n=r(4),i=r(1),o=r.n(i),a=r(12),s=(r(24),r(16)),u=r(19),c=r(31),f=i.forwardRef((function(e,t){var r=e.children,o=e.classes,u=e.className,f=e.color,l=void 0===f?"inherit":f,h=e.component,d=void 0===h?"svg":h,p=e.fontSize,v=void 0===p?"default":p,y=e.htmlColor,b=e.titleAccess,g=e.viewBox,m=void 0===g?"0 0 24 24":g,w=Object(a.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(d,Object(n.a)({className:Object(s.a)(o.root,u,"inherit"!==l&&o["color".concat(Object(c.a)(l))],"default"!==v&&o["fontSize".concat(Object(c.a)(v))]),focusable:"false",viewBox:m,color:y,"aria-hidden":!b||void 0,role:b?"img":void 0,ref:t},w),r,b?i.createElement("title",null,b):null)}));f.muiName="SvgIcon";var l=Object(u.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(f);function h(e,t){var r=function(t,r){return o.a.createElement(l,Object(n.a)({ref:r},t),e)};return r.muiName=l.muiName,o.a.memo(o.a.forwardRef(r))}},,function(e,t,r){"use strict";(function(e){var n=r(21),i=r(40),o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature_v4=t.recoverTypedSignature=t.signTypedData_v4=t.signTypedData=t.recoverTypedMessage=t.signTypedMessage=t.getEncryptionPublicKey=t.decryptSafely=t.decrypt=t.encryptSafely=t.encrypt=t.recoverTypedSignatureLegacy=t.signTypedDataLegacy=t.typedSignatureHash=t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=t.normalize=t.concatSig=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=void 0;var u=s(r(553)),c=s(r(613)),f=s(r(622)),l=s(r(624)),h={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]};t.TYPED_MESSAGE_SCHEMA=h;var d={encodeData:function(t,r,o){var a=this,s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],f=["bytes32"],l=[this.hashType(t,o)];if(s){var h,d=function t(r,n,f){if(void 0!==o[n])return["bytes32",null==f?"0x0000000000000000000000000000000000000000000000000000000000000000":u.keccak(a.encodeData(n,f,o,s))];if(void 0===f)throw new Error("missing value for field ".concat(r," of type ").concat(n));if("bytes"===n)return["bytes32",u.keccak(f)];if("string"===n)return"string"===typeof f&&(f=e.from(f,"utf8")),["bytes32",u.keccak(f)];if(n.lastIndexOf("]")===n.length-1){var l=n.slice(0,n.lastIndexOf("[")),h=f.map((function(e){return t(r,l,e)}));return["bytes32",u.keccak(c.rawEncode(h.map((function(e){return i(e,1)[0]})),h.map((function(e){return i(e,2)[1]}))))]}return[n,f]},p=n(o[t]);try{for(p.s();!(h=p.n()).done;){var v=h.value,y=d(v.name,v.type,r[v.name]),b=i(y,2),g=b[0],m=b[1];f.push(g),l.push(m)}}catch(_){p.e(_)}finally{p.f()}}else{var w,k=n(o[t]);try{for(k.s();!(w=k.n()).done;){var S=w.value,E=r[S.name];if(void 0!==E)if("bytes"===S.type)f.push("bytes32"),E=u.keccak(E),l.push(E);else if("string"===S.type)f.push("bytes32"),"string"===typeof E&&(E=e.from(E,"utf8")),E=u.keccak(E),l.push(E);else if(void 0!==o[S.type])f.push("bytes32"),E=u.keccak(this.encodeData(S.type,E,o,s)),l.push(E);else{if(S.type.lastIndexOf("]")===S.type.length-1)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");f.push(S.type),l.push(E)}}}catch(_){k.e(_)}finally{k.f()}}return c.rawEncode(f,l)},encodeType:function(e,t){var r="",i=this.findTypeDependencies(e,t).filter((function(t){return t!==e}));i=[e].concat(i.sort());var o,a=n(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(!t[s])throw new Error("No type definition specified: ".concat(s));r+="".concat(s,"(").concat(t[s].map((function(e){var t=e.name,r=e.type;return"".concat(r," ").concat(t)})).join(","),")")}}catch(u){a.e(u)}finally{a.f()}return r},findTypeDependencies:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=e.match(/^[0-9A-Z_a-z]*/),a=i(o,1);if(e=a[0],r.includes(e)||void 0===t[e])return r;r.push(e);var s,u=n(t[e]);try{for(u.s();!(s=u.n()).done;){var c,f=s.value,l=n(this.findTypeDependencies(f.type,t,r));try{for(l.s();!(c=l.n()).done;){var h=c.value;!r.includes(h)&&r.push(h)}}catch(d){l.e(d)}finally{l.f()}}}catch(d){u.e(d)}finally{u.f()}return r},hashStruct:function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return u.keccak(this.encodeData(e,t,r,n))},hashType:function(e,t){return u.keccak(this.encodeType(e,t))},sanitizeData:function(e){var t={};for(var r in h.properties)e[r]&&(t[r]=e[r]);return"types"in t&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},sign:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.sanitizeData(t),i=[e.from("1901","hex")];return i.push(this.hashStruct("EIP712Domain",n.domain,n.types,r)),"EIP712Domain"!==n.primaryType&&i.push(this.hashStruct(n.primaryType,n.message,n.types,r)),u.keccak(e.concat(i))}};function p(e,t,r){var n=u.fromSigned(t),i=u.fromSigned(r),o=u.bufferToInt(e),a=x(u.toUnsigned(n).toString("hex"),64),s=x(u.toUnsigned(i).toString("hex"),64),c=u.stripHexPrefix(u.intToHex(o));return u.addHexPrefix(a.concat(s,c)).toString("hex")}function v(e,t){var r=E(t.data),n=u.ecsign(r,e);return u.bufferToHex(p(n.v,n.r,n.s))}function y(e){var t=_(E(e.data),e.sig),r=u.publicToAddress(t);return u.bufferToHex(r)}function b(e,t,r){switch(r){case"x25519-xsalsa20-poly1305":if("string"!==typeof t.data)throw new Error('Cannot detect secret message, message params should be of the form {data: "secret message"} ');var n,i=f.box.keyPair();try{n=l.decodeBase64(e)}catch(u){throw new Error("Bad public key")}var o=l.decodeUTF8(t.data),a=f.randomBytes(f.box.nonceLength),s=f.box(o,a,n,i.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:l.encodeBase64(a),ephemPublicKey:l.encodeBase64(i.publicKey),ciphertext:l.encodeBase64(s)};default:throw new Error("Encryption type/version not supported")}}function g(e,t){switch(e.version){case"x25519-xsalsa20-poly1305":var r,n=T(t),i=f.box.keyPair.fromSecretKey(n).secretKey,o=l.decodeBase64(e.nonce),a=l.decodeBase64(e.ciphertext),s=l.decodeBase64(e.ephemPublicKey),u=f.box.open(a,o,s,i);try{r=l.encodeUTF8(u)}catch(c){throw new Error("Decryption failed.")}if(r)return r;throw new Error("Decryption failed.");default:throw new Error("Encryption type/version not supported.")}}function m(e,t){var r=d.sign(t.data,!1),n=u.ecsign(r,e);return u.bufferToHex(p(n.v,n.r,n.s))}function w(e,t){var r=d.sign(t.data),n=u.ecsign(r,e);return u.bufferToHex(p(n.v,n.r,n.s))}function k(e){var t=_(d.sign(e.data,!1),e.sig),r=u.publicToAddress(t);return u.bufferToHex(r)}function S(e){var t=_(d.sign(e.data),e.sig),r=u.publicToAddress(t);return u.bufferToHex(r)}function E(e){var t=new Error("Expect argument to be non-empty array");if("object"!==typeof e||!("length"in e)||!e.length)throw t;var r=e.map((function(e){return"bytes"===e.type?u.toBuffer(e.value):e.value})),n=e.map((function(e){return e.type})),i=e.map((function(e){if(!e.name)throw t;return"".concat(e.type," ").concat(e.name)}));return c.soliditySHA3(["bytes32","bytes32"],[c.soliditySHA3(new Array(e.length).fill("string"),i),c.soliditySHA3(n,r)])}function _(e,t){var r=u.toBuffer(t),n=u.fromRpcSig(r);return u.ecrecover(e,n.v,n.r,n.s)}function A(e){var t=u.toBuffer(e.data);return _(u.hashPersonalMessage(t),e.sig)}function x(e,t){for(var r="".concat(e);r.length<t;)r="0".concat(r);return r}function T(t){var r=e.from(t,"hex").toString("base64");return l.decodeBase64(r)}t.TypedDataUtils=d,t.concatSig=p,t.normalize=function(e){if(e){if("number"===typeof e){var t=u.toBuffer(e);e=u.bufferToHex(t)}if("string"!==typeof e){var r="eth-sig-util.normalize() requires hex string or integer input.";throw r+=" received ".concat(typeof e,": ").concat(e),new Error(r)}return u.addHexPrefix(e.toLowerCase())}},t.personalSign=function(e,t){var r=u.toBuffer(t.data),n=u.hashPersonalMessage(r),i=u.ecsign(n,e);return u.bufferToHex(p(i.v,i.r,i.s))},t.recoverPersonalSignature=function(e){var t=A(e),r=u.publicToAddress(t);return u.bufferToHex(r)},t.extractPublicKey=function(e){var t=A(e);return"0x".concat(t.toString("hex"))},t.typedSignatureHash=function(e){var t=E(e);return u.bufferToHex(t)},t.signTypedDataLegacy=v,t.recoverTypedSignatureLegacy=y,t.encrypt=b,t.encryptSafely=function(t,r,n){var i=Math.pow(2,11),o=r.data;if(!o)throw new Error("Cannot encrypt empty msg.data");if("object"===typeof o&&"toJSON"in o)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");var a={data:o,padding:""},s=e.byteLength(JSON.stringify(a),"utf-8")%i,u=0;return s>0&&(u=i-s-16),a.padding="0".repeat(u),b(t,{data:JSON.stringify(a)},n)},t.decrypt=g,t.decryptSafely=function(e,t){return JSON.parse(g(e,t)).data},t.getEncryptionPublicKey=function(e){var t=T(e),r=f.box.keyPair.fromSecretKey(t).publicKey;return l.encodeBase64(r)},t.signTypedMessage=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"V4";switch(r){case"V1":return v(e,t);case"V3":return m(e,t);case"V4":default:return w(e,t)}},t.recoverTypedMessage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"V4";switch(t){case"V1":return y(e);case"V3":return k(e);case"V4":default:return S(e)}},t.signTypedData=m,t.signTypedData_v4=w,t.recoverTypedSignature=k,t.recoverTypedSignature_v4=S}).call(this,r(13).Buffer)},function(e,t,r){"use strict";function n(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(183);function i(e,t){if(e){if("string"===typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},function(e,t,r){"use strict";var n=r(1),i=r.n(n).a.createContext(null);t.a=i},function(e,t,r){"use strict";var n="function"===typeof Symbol&&Symbol.for;t.a=n?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,r){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,r){"use strict";e.exports=r(536)},function(e,t,r){"use strict";t.a={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},function(e,t,r){"use strict";(function(t){!function(r){var n=2147483647;function i(e){var t=new Uint32Array([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]),r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225,f=new Uint32Array(64);function l(e){for(var l=0,h=e.length;h>=64;){var d=r,p=n,v=i,y=o,b=a,g=s,m=u,w=c,k=void 0,S=void 0,E=void 0,_=void 0,A=void 0;for(S=0;S<16;S++)E=l+4*S,f[S]=(255&e[E])<<24|(255&e[E+1])<<16|(255&e[E+2])<<8|255&e[E+3];for(S=16;S<64;S++)_=((k=f[S-2])>>>17|k<<15)^(k>>>19|k<<13)^k>>>10,A=((k=f[S-15])>>>7|k<<25)^(k>>>18|k<<14)^k>>>3,f[S]=(_+f[S-7]|0)+(A+f[S-16]|0)|0;for(S=0;S<64;S++)_=(((b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&g^~b&m)|0)+(w+(t[S]+f[S]|0)|0)|0,A=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&p^d&v^p&v)|0,w=m,m=g,g=b,b=y+_|0,y=v,v=p,p=d,d=_+A|0;r=r+d|0,n=n+p|0,i=i+v|0,o=o+y|0,a=a+b|0,s=s+g|0,u=u+m|0,c=c+w|0,l+=64,h-=64}}l(e);var h,d=e.length%64,p=e.length/536870912|0,v=e.length<<3,y=d<56?56:120,b=e.slice(e.length-d,e.length);for(b.push(128),h=d+1;h<y;h++)b.push(0);return b.push(p>>>24&255),b.push(p>>>16&255),b.push(p>>>8&255),b.push(p>>>0&255),b.push(v>>>24&255),b.push(v>>>16&255),b.push(v>>>8&255),b.push(v>>>0&255),l(b),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function o(e,t,r){e=e.length<=64?e:i(e);var n,o=64+t.length+4,a=new Array(o),s=new Array(64),u=[];for(n=0;n<64;n++)a[n]=54;for(n=0;n<e.length;n++)a[n]^=e[n];for(n=0;n<t.length;n++)a[64+n]=t[n];for(n=o-4;n<o;n++)a[n]=0;for(n=0;n<64;n++)s[n]=92;for(n=0;n<e.length;n++)s[n]^=e[n];function c(){for(var e=o-1;e>=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;r>=32;)c(),u=u.concat(i(s.concat(i(a)))),r-=32;return r>0&&(c(),u=u.concat(i(s.concat(i(a))).slice(0,r))),u}function a(e,t,r,n,i){var o;for(f(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)c(e,16*o,i,16),u(i,n),f(i,0,e,t+16*o,16);for(o=0;o<r;o++)f(e,t+2*o*16,e,16*o,16);for(o=0;o<r;o++)f(e,t+16*(2*o+1),e,16*(o+r),16)}function s(e,t){return e<<t|e>>>32-t}function u(e,t){f(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(var n=0;n<16;++n)e[n]+=t[n]}function c(e,t,r,n){for(var i=0;i<n;i++)r[i]^=e[t+i]}function f(e,t,r,n,i){for(;i--;)r[n++]=e[t++]}function l(e){if(!e||"number"!==typeof e.length)return!1;for(var t=0;t<e.length;t++){var r=e[t];if("number"!==typeof r||r%1||r<0||r>=256)return!1}return!0}function h(e,t){if("number"!==typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,r,i,s,u,d,p){if(i=h(i,"N"),s=h(s,"r"),u=h(u,"p"),d=h(d,"dkLen"),0===i||0!==(i&i-1))throw new Error("N must be power of 2");if(i>n/128/s)throw new Error("N too large");if(s>n/128/u)throw new Error("r too large");if(!l(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!l(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var v=o(e,r,128*u*s),y=new Uint32Array(32*u*s),b=0;b<y.length;b++){var g=4*b;y[b]=(255&v[g+3])<<24|(255&v[g+2])<<16|(255&v[g+1])<<8|(255&v[g+0])<<0}var m,w,k=new Uint32Array(64*s),S=new Uint32Array(32*s*i),E=32*s,_=new Uint32Array(16),A=new Uint32Array(16),x=u*i*2,T=0,M=null,C=!1,O=0,I=0,P=p?parseInt(1e3/s):4294967295,R="undefined"!==typeof t?t:setTimeout,B=function t(){if(C)return p(new Error("cancelled"),T/x);var r;switch(O){case 0:f(y,w=32*I*s,k,0,E),O=1,m=0;case 1:(r=i-m)>P&&(r=P);for(var n=0;n<r;n++)f(k,0,S,(m+n)*E,E),a(k,E,s,_,A);if(m+=r,T+=r,p){var l=parseInt(1e3*T/x);if(l!==M){if(C=p(null,T/x))break;M=l}}if(m<i)break;m=0,O=2;case 2:(r=i-m)>P&&(r=P);for(var h=0;h<r;h++){var b=k[16*(2*s-1)]&i-1;c(S,b*E,k,E),a(k,E,s,_,A)}if(m+=r,T+=r,p){var g=parseInt(1e3*T/x);if(g!==M){if(C=p(null,T/x))break;M=g}}if(m<i)break;if(f(k,0,y,w,E),++I<u){O=0;break}v=[];for(var B=0;B<y.length;B++)v.push(y[B]>>0&255),v.push(y[B]>>8&255),v.push(y[B]>>16&255),v.push(y[B]>>24&255);var D=o(e,v,d);return p&&p(null,1,D),D}p&&R(t)};if(!p)for(;;){var D=B();if(void 0!=D)return D}B()}var p={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,u){var c=0;a&&a(0),d(e,t,r,n,i,o,(function(e,t,r){if(e)u(e);else if(r)a&&1!==c&&a(1),s(new Uint8Array(r));else if(a&&t!==c)return c=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(d(e,t,r,n,i,o))}};e.exports=p}()}).call(this,r(246).setImmediate)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(19),u=r(31),c={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},f=o.forwardRef((function(e,t){var r=e.align,s=void 0===r?"inherit":r,f=e.classes,l=e.className,h=e.color,d=void 0===h?"initial":h,p=e.component,v=e.display,y=void 0===v?"initial":v,b=e.gutterBottom,g=void 0!==b&&b,m=e.noWrap,w=void 0!==m&&m,k=e.paragraph,S=void 0!==k&&k,E=e.variant,_=void 0===E?"body1":E,A=e.variantMapping,x=void 0===A?c:A,T=Object(i.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),M=p||(S?"p":x[_]||c[_])||"span";return o.createElement(M,Object(n.a)({className:Object(a.a)(f.root,l,"inherit"!==_&&f[_],"initial"!==d&&f["color".concat(Object(u.a)(d))],w&&f.noWrap,g&&f.gutterBottom,S&&f.paragraph,"inherit"!==s&&f["align".concat(Object(u.a)(s))],"initial"!==y&&f["display".concat(Object(u.a)(y))]),ref:t},T))}));t.a=Object(s.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(f)},,function(e,t,r){"use strict";e.exports=l;var n,i=r(82),o=i.LongBits,a=i.base64,s=i.utf8;function u(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function c(){}function f(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}var h=function(){return i.Buffer?function(){return(l.create=function(){return new n})()}:function(){return new l}};function d(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function v(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}l.create=h(),l.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(l.alloc=i.pool(l.alloc,i.Array.prototype.subarray)),l.prototype._push=function(e,t,r){return this.tail=this.tail.next=new u(e,t,r),this.len+=t,this},p.prototype=Object.create(u.prototype),p.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(v,10,o.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=o.from(e);return this._push(v,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(v,t.length(),t)},l.prototype.bool=function(e){return this._push(d,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=o.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var b=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(d,1,0);if(i.isString(e)){var r=l.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(b,t,e)},l.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(d,1,0)},l.prototype.fork=function(){return this.states=new f(this),this.head=this.tail=new u(c,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(c,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},l._configure=function(e){n=e,l.create=h(),n._configure()}},function(e,t,r){"use strict";e.exports=u;var n,i=r(82),o=i.LongBits,a=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")},f=function(){return i.Buffer?function(e){return(u.create=function(e){return i.Buffer.isBuffer(e)?new n(e):c(e)})(e)}:c};function l(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw s(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}u.create=f(),u.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,u.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},u.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},u.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},u._configure=function(e){n=e,u.create=f(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(u.prototype,{int64:function(){return l.call(this)[t](!1)},uint64:function(){return l.call(this)[t](!0)},sint64:function(){return l.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},function(e,t,r){"use strict";e.exports=i;var n=r(82);function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}i.create=function(e){return this.$type.create(e)},i.encode=function(e,t){return this.$type.encode(e,t)},i.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},i.decode=function(e){return this.$type.decode(e)},i.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},i.verify=function(e){return this.$type.verify(e)},i.fromObject=function(e){return this.$type.fromObject(e)},i.toObject=function(e,t){return this.$type.toObject(e,t)},i.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},function(e,t,r){(function(n,i){var o;!function(){"use strict";var a="input is invalid type",s="object"===typeof window,u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"===typeof n&&n.versions&&n.versions.node?u=i:c&&(u=self);var f=!u.JS_SHA3_NO_COMMON_JS&&"object"===typeof e&&e.exports,l=r(336),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[4,1024,262144,67108864],v=[0,8,16,24],y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],b=[224,256,384,512],g=[128,256],m=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new N(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new N(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return M["cshake"+e].update(t,n,i,o)[r]()}},_=function(e,t,r){return function(t,n,i,o){return M["kmac"+e].update(t,n,i,o)[r]()}},A=function(e,t,r,n){for(var i=0;i<m.length;++i){var o=m[i];e[o]=t(r,n,o)}return e},x=function(e,t){var r=k(e,t,"hex");return r.create=function(){return new N(e,t,e)},r.update=function(e){return r.create().update(e)},A(r,k,e,t)},T=[{name:"keccak",padding:[1,256,65536,16777216],bits:b,createMethod:x},{name:"sha3",padding:[6,1536,393216,100663296],bits:b,createMethod:x},{name:"shake",padding:[31,7936,2031616,520093696],bits:g,createMethod:function(e,t){var r=S(e,t,"hex");return r.create=function(r){return new N(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},A(r,S,e,t)}},{name:"cshake",padding:p,bits:g,createMethod:function(e,t){var r=w[e],n=E(e,0,"hex");return n.create=function(n,i,o){return i||o?new N(e,t,n).bytepad([i,o],r):M["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},A(n,E,e,t)}},{name:"kmac",padding:p,bits:g,createMethod:function(e,t){var r=w[e],n=_(e,0,"hex");return n.create=function(n,i,o){return new L(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},A(n,_,e,t)}}],M={},C=[],O=0;O<T.length;++O)for(var I=T[O],P=I.bits,R=0;R<P.length;++R){var B=I.name+"_"+P[R];if(C.push(B),M[B]=I.createMethod(P[R],I.padding),"sha3"!==I.name){var D=I.name+P[R];C.push(D),M[D]=M[B]}}function N(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){N.call(this,e,t,r)}N.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!h||!ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var n,i,o=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,f=0,l=this.s;f<u;){if(this.reset)for(this.reset=!1,o[0]=this.block,n=1;n<c+1;++n)o[n]=0;if(t)for(n=this.start;f<u&&n<s;++f)o[n>>2]|=e[f]<<v[3&n++];else for(n=this.start;f<u&&n<s;++f)(i=e.charCodeAt(f))<128?o[n>>2]|=i<<v[3&n++]:i<2048?(o[n>>2]|=(192|i>>6)<<v[3&n++],o[n>>2]|=(128|63&i)<<v[3&n++]):i<55296||i>=57344?(o[n>>2]|=(224|i>>12)<<v[3&n++],o[n>>2]|=(128|i>>6&63)<<v[3&n++],o[n>>2]|=(128|63&i)<<v[3&n++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++f)),o[n>>2]|=(240|i>>18)<<v[3&n++],o[n>>2]|=(128|i>>12&63)<<v[3&n++],o[n>>2]|=(128|i>>6&63)<<v[3&n++],o[n>>2]|=(128|63&i)<<v[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=o[c],n=0;n<c;++n)l[n]^=o[n];j(l),this.reset=!0}else this.start=n}return this},N.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(a);if(null===e)throw new Error(a);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!h||!ArrayBuffer.isView(e)))throw new Error(a);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o<e.length;++o){var s=e.charCodeAt(o);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},N.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,o=[];return o.length=i,this.update(o),this},N.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];j(n)}},N.prototype.toString=N.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s="";a<n;){for(o=0;o<t&&a<n;++o,++a)e=r[o],s+=d[e>>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t===0&&(j(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},N.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a<n;){for(o=0;o<t&&a<n;++o,++a)u[a]=r[o];a%t===0&&j(r)}return i&&(u[o]=r[o],e=e.slice(0,s)),e},N.prototype.buffer=N.prototype.arrayBuffer,N.prototype.digest=N.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,u=[];s<i;){for(a=0;a<r&&s<i;++a,++s)e=s<<2,t=n[a],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r===0&&j(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},L.prototype=new N,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var j=function(e){var t,r,n,i,o,a,s,u,c,f,l,h,d,p,v,b,g,m,w,k,S,E,_,A,x,T,M,C,O,I,P,R,B,D,N,L,j,U,F,K,z,V,H,J,q,G,X,W,Z,Y,Q,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|l>>>31),r=s^(l<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|d>>>31),r=c^(d<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],v=e[1],G=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,C=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,b=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,I=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,m=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,J=e[8]<<27|e[9]>>>5,q=e[9]<<27|e[8]>>>5,T=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,K=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=p^~b&m,e[1]=v^~g&w,e[10]=A^~T&C,e[11]=x^~M&O,e[20]=D^~L&U,e[21]=N^~j&F,e[30]=J^~G&W,e[31]=q^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=b^~m&k,e[3]=g^~w&S,e[12]=T^~C&I,e[13]=M^~O&P,e[22]=L^~U&K,e[23]=j^~F&z,e[32]=G^~W&Y,e[33]=X^~Z&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=m^~k&E,e[5]=w^~S&_,e[14]=C^~I&R,e[15]=O^~P&B,e[24]=U^~K&V,e[25]=F^~z&H,e[34]=W^~Y&$,e[35]=Z^~Q&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=k^~E&p,e[7]=S^~_&v,e[16]=I^~R&A,e[17]=P^~B&x,e[26]=K^~V&D,e[27]=z^~H&N,e[36]=Y^~$&J,e[37]=Q^~ee&q,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=E^~p&b,e[9]=_^~v&g,e[18]=R^~A&T,e[19]=B^~x&M,e[28]=V^~D&L,e[29]=H^~N&j,e[38]=$^~J&G,e[39]=ee^~q&X,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=y[n],e[1]^=y[n+1]};if(f)e.exports=M;else{for(O=0;O<C.length;++O)u[C[O]]=M[C[O]];l&&(void 0===(o=function(){return M}.call(t,r,t,e))||(e.exports=o))}}()}).call(this,r(39),r(36))},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},function(e,t,r){e.exports=i;var n=r(57).EventEmitter;function i(){n.call(this)}r(23)(i,n),i.Readable=r(243),i.Writable=r(565),i.Duplex=r(566),i.Transform=r(567),i.PassThrough=r(568),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"===typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},function(e,t,r){(t=e.exports=r(343)).Stream=t,t.Readable=t,t.Writable=r(245),t.Duplex=r(105),t.Transform=r(347),t.PassThrough=r(564)},function(e,t,r){var n=r(13),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";(function(t,n,i){var o=r(189);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:o.nextTick;g.WritableState=b;var c=Object.create(r(154));c.inherits=r(23);var f={deprecate:r(346)},l=r(344),h=r(244).Buffer,d=i.Uint8Array||function(){};var p,v=r(345);function y(){}function b(e,t){s=s||r(105),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,c=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),_(e,t))}(e,r,n,t,i);else{var a=S(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||k(e,r),n?u(w,e,r,a,i):w(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function g(e){if(s=s||r(105),!p.call(g,this)&&!(this instanceof s))return new g(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),l.call(this)}function m(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),_(e,t)}function k(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,m(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(m(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),_(e,t)}))}function _(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"===typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(g,l),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof b)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof d);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"===typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!==typeof r&&(r=y),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"===typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=h.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,s,n,i,o);return u}(this,i,s,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||k(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState;"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,_(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=v.destroy,g.prototype._undestroy=v.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(39),r(246).setImmediate,r(36))},function(e,t,r){(function(e){var n="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(562),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(36))},function(e,t,r){var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"===typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"===typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(577);if("function"!==typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(a){}},function(e,t,r){"use strict";var n,i=t,o=r(52),a=r(351),s=r(65).assert;function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(587)}catch(f){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(e,t,r){"use strict";var n=r(23),i=r(355),o=r(28).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function c(e,t,r,n,i,o,a){return u(e+(t&r|~t&n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return u(e+(t&n|r&~n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return u(e+(t^r^n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return u(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=f(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=f(o,r,n,i,e[6],3225465664,9),i=f(i,o,r,n,e[11],643717713,14),n=f(n,i,o,r,e[0],3921069994,20),r=f(r,n,i,o,e[5],3593408605,5),o=f(o,r,n,i,e[10],38016083,9),i=f(i,o,r,n,e[15],3634488961,14),n=f(n,i,o,r,e[4],3889429448,20),r=f(r,n,i,o,e[9],568446438,5),o=f(o,r,n,i,e[14],3275163606,9),i=f(i,o,r,n,e[3],4107603335,14),n=f(n,i,o,r,e[8],1163531501,20),r=f(r,n,i,o,e[13],2850285829,5),o=f(o,r,n,i,e[2],4243563512,9),i=f(i,o,r,n,e[7],1735328473,14),r=l(r,n=f(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=l(o,r,n,i,e[8],2272392833,11),i=l(i,o,r,n,e[11],1839030562,16),n=l(n,i,o,r,e[14],4259657740,23),r=l(r,n,i,o,e[1],2763975236,4),o=l(o,r,n,i,e[4],1272893353,11),i=l(i,o,r,n,e[7],4139469664,16),n=l(n,i,o,r,e[10],3200236656,23),r=l(r,n,i,o,e[13],681279174,4),o=l(o,r,n,i,e[0],3936430074,11),i=l(i,o,r,n,e[3],3572445317,16),n=l(n,i,o,r,e[6],76029189,23),r=l(r,n,i,o,e[9],3654602809,4),o=l(o,r,n,i,e[12],3873151461,11),i=l(i,o,r,n,e[15],530742520,16),r=h(r,n=l(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=h(o,r,n,i,e[7],1126891415,10),i=h(i,o,r,n,e[14],2878612391,15),n=h(n,i,o,r,e[5],4237533241,21),r=h(r,n,i,o,e[12],1700485571,6),o=h(o,r,n,i,e[3],2399980690,10),i=h(i,o,r,n,e[10],4293915773,15),n=h(n,i,o,r,e[1],2240044497,21),r=h(r,n,i,o,e[8],1873313359,6),o=h(o,r,n,i,e[15],4264355552,10),i=h(i,o,r,n,e[6],2734768916,15),n=h(n,i,o,r,e[13],1309151649,21),r=h(r,n,i,o,e[4],4149444226,6),o=h(o,r,n,i,e[11],3174756917,10),i=h(i,o,r,n,e[2],718787259,15),n=h(n,i,o,r,e[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+o|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 e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},function(e,t,r){"use strict";var n=r(131).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"===typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){s=!1,c=!0,a||o.call(t)},l=t._readableState&&t._readableState.endEmitted,h=function(){a=!1,l=!0,s||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return a&&!l?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},v=function(){t.req.on("finish",f)};return!function(e){return e.setHeader&&"function"===typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",f),t.on("abort",p),t.req?v():t.on("request",v)),t.on("end",h),t.on("finish",f),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",v),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},function(e,t,r){"use strict";var n=r(13).Buffer,i=r(23),o=r(355),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function v(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,k=0|this._b,S=0|this._c,E=0|this._d,_=0|this._e,A=0;A<80;A+=1){var x,T;A<16?(x=v(r,n,i,o,d,e[s[A]],l[0],c[A]),T=m(w,k,S,E,_,e[u[A]],h[0],f[A])):A<32?(x=y(r,n,i,o,d,e[s[A]],l[1],c[A]),T=g(w,k,S,E,_,e[u[A]],h[1],f[A])):A<48?(x=b(r,n,i,o,d,e[s[A]],l[2],c[A]),T=b(w,k,S,E,_,e[u[A]],h[2],f[A])):A<64?(x=g(r,n,i,o,d,e[s[A]],l[3],c[A]),T=y(w,k,S,E,_,e[u[A]],h[3],f[A])):(x=m(r,n,i,o,d,e[s[A]],l[4],c[A]),T=v(w,k,S,E,_,e[u[A]],h[4],f[A])),r=d,d=o,o=p(i,10),i=n,n=x,w=_,_=E,E=p(S,10),S=k,k=T}var M=this._b+i+E|0;this._b=this._c+o+_|0,this._c=this._d+d+w|0,this._d=this._e+r+k|0,this._e=this._a+n+S|0,this._a=M},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(608),t.sha1=r(609),t.sha224=r(610),t.sha256=r(363),t.sha384=r(611),t.sha512=r(364)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.ecdhUnsafe=t.ecdh=t.recover=t.verify=t.sign=t.signatureImportLax=t.signatureImport=t.signatureExport=t.signatureNormalize=t.publicKeyCombine=t.publicKeyTweakMul=t.publicKeyTweakAdd=t.publicKeyVerify=t.publicKeyConvert=t.publicKeyCreate=t.privateKeyTweakMul=t.privateKeyTweakAdd=t.privateKeyModInverse=t.privateKeyNegate=t.privateKeyImport=t.privateKeyExport=t.privateKeyVerify=void 0;var n=r(348),i=r(616),o=r(617);t.privateKeyVerify=function(e){return 32===e.length&&n.privateKeyVerify(Uint8Array.from(e))},t.privateKeyExport=function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var r=i.privateKeyExport(e,t);return o.privateKeyExport(e,r,t)},t.privateKeyImport=function(e){if(null!==(e=o.privateKeyImport(e))&&32===e.length&&t.privateKeyVerify(e))return e;throw new Error("couldn't import from DER format")},t.privateKeyNegate=function(t){return e.from(n.privateKeyNegate(Uint8Array.from(t)))},t.privateKeyModInverse=function(t){if(32!==t.length)throw new Error("private key length is invalid");return e.from(i.privateKeyModInverse(Uint8Array.from(t)))},t.privateKeyTweakAdd=function(t,r){return e.from(n.privateKeyTweakAdd(Uint8Array.from(t),r))},t.privateKeyTweakMul=function(t,r){return e.from(n.privateKeyTweakMul(Uint8Array.from(t),Uint8Array.from(r)))},t.publicKeyCreate=function(t,r){return e.from(n.publicKeyCreate(Uint8Array.from(t),r))},t.publicKeyConvert=function(t,r){return e.from(n.publicKeyConvert(Uint8Array.from(t),r))},t.publicKeyVerify=function(e){return(33===e.length||65===e.length)&&n.publicKeyVerify(Uint8Array.from(e))},t.publicKeyTweakAdd=function(t,r,i){return e.from(n.publicKeyTweakAdd(Uint8Array.from(t),Uint8Array.from(r),i))},t.publicKeyTweakMul=function(t,r,i){return e.from(n.publicKeyTweakMul(Uint8Array.from(t),Uint8Array.from(r),i))},t.publicKeyCombine=function(t,r){var i=[];return t.forEach((function(e){i.push(Uint8Array.from(e))})),e.from(n.publicKeyCombine(i,r))},t.signatureNormalize=function(t){return e.from(n.signatureNormalize(Uint8Array.from(t)))},t.signatureExport=function(t){return e.from(n.signatureExport(Uint8Array.from(t)))},t.signatureImport=function(t){return e.from(n.signatureImport(Uint8Array.from(t)))},t.signatureImportLax=function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=o.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return i.signatureImport(t)},t.sign=function(t,r,i){if(null===i)throw new TypeError("options should be an Object");var o=void 0;if(i){if(o={},null===i.data)throw new TypeError("options.data should be a Buffer");if(i.data){if(32!=i.data.length)throw new RangeError("options.data length is invalid");o.data=new Uint8Array(i.data)}if(null===i.noncefn)throw new TypeError("options.noncefn should be a Function");i.noncefn&&(o.noncefn=function(t,r,n,o,a){var s=null!=n?e.from(n):null,u=null!=o?e.from(o):null,c=e.from("");return i.noncefn&&(c=i.noncefn(e.from(t),e.from(r),s,u,a)),new Uint8Array(c)})}var a=n.ecdsaSign(Uint8Array.from(t),Uint8Array.from(r),o);return{signature:e.from(a.signature),recovery:a.recid}},t.verify=function(e,t,r){return n.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),r)},t.recover=function(t,r,i,o){return e.from(n.ecdsaRecover(Uint8Array.from(r),i,Uint8Array.from(t),o))},t.ecdh=function(t,r){return e.from(n.ecdh(Uint8Array.from(t),Uint8Array.from(r),{}))},t.ecdhUnsafe=function(t,r,n){if(33!==t.length&&65!==t.length)throw new RangeError("public key length is invalid");if(32!==r.length)throw new RangeError("private key length is invalid");return e.from(i.ecdhUnsafe(Uint8Array.from(t),Uint8Array.from(r),n))}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160=t.sha256=t.keccak256=t.keccak=void 0;var n=r(340),i=n.keccak224,o=n.keccak384,a=n.keccak256,s=n.keccak512,u=r(107),c=r(134),f=r(191),l=r(159);t.keccak=function(t,r){switch(void 0===r&&(r=256),t="string"!==typeof t||c.isHexString(t)?l.toBuffer(t):e.from(t,"utf8"),r||(r=256),r){case 224:return i(t);case 256:return a(t);case 384:return o(t);case 512:return s(t);default:throw new Error("Invald algorithm: keccak"+r)}},t.keccak256=function(e){return t.keccak(e)},t.sha256=function(e){return e=l.toBuffer(e),u("sha256").update(e).digest()},t.ripemd160=function(e,t){e=l.toBuffer(e);var r=u("rmd160").update(e).digest();return!0===t?l.setLength(r,32):r},t.rlphash=function(e){return t.keccak(f.encode(e))}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(64),i=r(645),o=r(369),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=r(370)),e}(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||i&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o(s,this,"E_JSON_PARSE");throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(a)})),e.exports=u}).call(this,r(39))},,function(e,t,r){"use strict";var n=r(66);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,r){var n=r(678),i=r(686),o=r(395);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,r){var n={ECB:r(679),CBC:r(680),CFB:r(681),CFB8:r(682),CFB1:r(683),OFB:r(684),CTR:r(393),GCM:r(393)},i=r(395);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},function(e,t,r){(function(t){var n=r(693),i=r(106);function o(e){var t,r=e.modulus.byteLength();do{t=new n(i(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,r){var i=function(e){var t=o(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(r),a=r.modulus.byteLength(),s=new n(e).mul(i.blinder).umod(r.modulus),u=s.toRed(n.mont(r.prime1)),c=s.toRed(n.mont(r.prime2)),f=r.coefficient,l=r.prime1,h=r.prime2,d=u.redPow(r.exponent1).fromRed(),p=c.redPow(r.exponent2).fromRed(),v=d.isub(p).imul(f).umod(l).imul(h);return p.iadd(v).imul(i.unblinder).umod(r.modulus).toArrayLike(t,"be",a)}a.getr=o,e.exports=a}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(t){var n,i=r(13),o=i.Buffer,a={};for(n in i)i.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(a[n]=i[n]);var s=a.Buffer={};for(n in o)o.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(s[n]=o[n]);if(a.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(e,t,r){if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&"undefined"===typeof e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,r)}),s.alloc||(s.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=o(e);return t&&0!==t.length?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!a.kStringMaxLength)try{a.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(u){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a}).call(this,r(39))},function(e,t,r){"use strict";var n=r(263).Reporter,i=r(164).EncoderBuffer,o=r(164).DecoderBuffer,a=r(66),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t,r){var n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=c;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};f.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(a=this._peekTag(e,u,r.any),e.isError(a))return a}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(v){a=!1}e.restore(c)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){var f=this._decodeTag(e,r.explicit);if(e.isError(f))return f;e=f}var l=e.offset;if(null===r.use&&null===r.choice){var h;r.any&&(h=e.save());var d=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(d))return d;r.any?i=e.raw(h):e=d}if(t&&t.track&&null!==r.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=e.save(),s=r.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(c){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},c.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),u))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,s,f,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,r){"use strict";var n=r(23);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(e,t,r){"use strict";function n(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n(t.tag)},function(e,t,r){"use strict";var n,i=t,o=r(266),a=r(413),s=r(68).assert;function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(725)}catch(f){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(e,t,r){var n=t;n.utils=r(77),n.common=r(166),n.sha=r(719),n.ripemd=r(723),n.hmac=r(724),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){"use strict";var n=r(422),i=r(744),o=r(268);t.aes=i,t.hmac=n,t.keys=o,t.randomBytes=r(273),t.pbkdf2=r(783)},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(269);r(62),r(169);var a=r(18),s=r(15),u=r(110).fromString,c=r(769),f={rsa:r(770),ed25519:r(775),secp256k1:r(777)(o,r(273))},l="secp256k1 support requires libp2p-crypto-secp256k1 package",h="ERR_MISSING_PACKAGE";function d(e){var t=f[e.toLowerCase()];if(!t){var r=Object.keys(f).join(" / ");throw s(new Error("invalid or unsupported key type ".concat(e,". Must be ").concat(r)),"ERR_UNSUPPORTED_KEY_TYPE")}return t}var p=function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(t).generateKeyPair(r));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),v=function(){var e=i(n.mark((function e(t,r,i){var o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=d(t),"ed25519"===t.toLowerCase()){e.next=3;break}throw s(new Error("Seed key derivation is unimplemented for RSA or secp256k1"),"ERR_UNSUPPORTED_KEY_DERIVATION_TYPE");case 3:return e.abrupt("return",o.generateKeyPairFromSeed(r,i));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),y=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=o.PrivateKey.decode(t),i=r.Data,e.t0=r.Type,e.next=e.t0===o.KeyType.RSA?5:e.t0===o.KeyType.Ed25519?6:e.t0===o.KeyType.Secp256k1?7:12;break;case 5:return e.abrupt("return",f.rsa.unmarshalRsaPrivateKey(i));case 6:return e.abrupt("return",f.ed25519.unmarshalEd25519PrivateKey(i));case 7:if(!f.secp256k1){e.next=11;break}return e.abrupt("return",f.secp256k1.unmarshalSecp256k1PrivateKey(i));case 11:throw s(new Error(l),h);case 12:d(r.Type);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=i(n.mark((function e(t,r){var i,o,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.import(t,r);case 3:return i=e.sent,e.abrupt("return",y(i));case 7:e.prev=7,e.t0=e.catch(0);case 9:if(null!==(o=a.pki.decryptRsaPrivateKey(t,r))){e.next=12;break}throw s(new Error("Cannot read the key, most likely the password is wrong or not a RSA key"),"ERR_CANNOT_DECRYPT_PEM");case 12:return l=a.asn1.toDer(a.pki.privateKeyToAsn1(o)),l=u(l.getBytes(),"ascii"),e.abrupt("return",f.rsa.unmarshalRsaPrivateKey(l));case 15:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}();e.exports={supportedKeys:f,keysPBM:o,keyStretcher:r(779),generateEphemeralKeyPair:r(780),generateKeyPair:p,generateKeyPairFromSeed:v,unmarshalPublicKey:function(e){var t=o.PublicKey.decode(e),r=t.Data;switch(t.Type){case o.KeyType.RSA:return f.rsa.unmarshalRsaPublicKey(r);case o.KeyType.Ed25519:return f.ed25519.unmarshalEd25519PublicKey(r);case o.KeyType.Secp256k1:if(f.secp256k1)return f.secp256k1.unmarshalSecp256k1PublicKey(r);throw s(new Error(l),h);default:d(t.Type)}},marshalPublicKey:function(e,t){return d(t=(t||"rsa").toLowerCase()),e.bytes},unmarshalPrivateKey:y,marshalPrivateKey:function(e,t){return d(t=(t||"rsa").toLowerCase()),e.bytes},import:b}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-crypto-keys"]||(n.roots["libp2p-crypto-keys"]={});s.KeyType=function(){var e={},t=Object.create(e);return t[e[0]="RSA"]=0,t[e[1]="Ed25519"]=1,t[e[2]="Secp256k1"]=2,t}(),s.PublicKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.Type=0,e.prototype.Data=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(8).int32(e.Type),t.uint32(18).bytes(e.Data),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PublicKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.Type=e.int32();break;case 2:n.Data=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw a.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw a.ProtocolError("missing required 'Data'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PublicKey)return e;var t=new s.PublicKey;switch(e.Type){case"RSA":case 0:t.Type=0;break;case"Ed25519":case 1:t.Type=1;break;case"Secp256k1":case 2:t.Type=2}return null!=e.Data&&("string"===typeof e.Data?a.base64.decode(e.Data,t.Data=a.newBuffer(a.base64.length(e.Data)),0):e.Data.length&&(t.Data=e.Data)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.Type=t.enums===String?"RSA":0,t.bytes===String?r.Data="":(r.Data=[],t.bytes!==Array&&(r.Data=a.newBuffer(r.Data)))),null!=e.Type&&e.hasOwnProperty("Type")&&(r.Type=t.enums===String?s.KeyType[e.Type]:e.Type),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?a.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),s.PrivateKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.Type=0,e.prototype.Data=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(8).int32(e.Type),t.uint32(18).bytes(e.Data),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PrivateKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.Type=e.int32();break;case 2:n.Data=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw a.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw a.ProtocolError("missing required 'Data'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PrivateKey)return e;var t=new s.PrivateKey;switch(e.Type){case"RSA":case 0:t.Type=0;break;case"Ed25519":case 1:t.Type=1;break;case"Secp256k1":case 2:t.Type=2}return null!=e.Data&&("string"===typeof e.Data?a.base64.decode(e.Data,t.Data=a.newBuffer(a.base64.length(e.Data)),0):e.Data.length&&(t.Data=e.Data)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.Type=t.enums===String?"RSA":0,t.bytes===String?r.Data="":(r.Data=[],t.bytes!==Array&&(r.Data=a.newBuffer(r.Data)))),null!=e.Type&&e.hasOwnProperty("Type")&&(r.Type=t.enums===String?s.KeyType[e.Type]:e.Type),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?a.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){var n=r(18);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.des.Algorithm(e,t)}))}r(423),r(424),r(34),e.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createEncryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createDecryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return d(r._keys,e,t,!1)},decrypt:function(e,t){return d(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],o=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],f=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],l=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],v=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length()>8?3:1,b=[],g=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],m=0,w=0;w<y;w++){var k=e.getInt32(),S=e.getInt32();k^=(t=252645135&(k>>>4^S))<<4,k^=t=65535&((S^=t)>>>-16^k),k^=(t=858993459&(k>>>2^(S^=t<<-16)))<<2,k^=t=65535&((S^=t)>>>-16^k),k^=(t=1431655765&(k>>>1^(S^=t<<-16)))<<1,k^=t=16711935&((S^=t)>>>8^k),t=(k^=(t=1431655765&(k>>>1^(S^=t<<8)))<<1)<<8|(S^=t)>>>20&240,k=S<<24|S<<8&16711680|S>>>8&65280|S>>>24&240,S=t;for(var E=0;E<g.length;++E){g[E]?(k=k<<2|k>>>26,S=S<<2|S>>>26):(k=k<<1|k>>>27,S=S<<1|S>>>27),S&=-15;var _=r[(k&=-15)>>>28]|n[k>>>24&15]|i[k>>>20&15]|o[k>>>16&15]|a[k>>>12&15]|s[k>>>8&15]|u[k>>>4&15],A=c[S>>>28]|f[S>>>24&15]|l[S>>>20&15]|h[S>>>16&15]|d[S>>>12&15]|p[S>>>8&15]|v[S>>>4&15];t=65535&(A>>>16^_),b[m++]=_^t,b[m++]=A^t<<16}}return b}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],a=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],s=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],f=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function d(e,t,r,n){var i,d,p=32===e.length?3:9;i=3===p?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var v=t[0],y=t[1];v^=(d=252645135&(v>>>4^y))<<4,v^=(d=65535&(v>>>16^(y^=d)))<<16,v^=d=858993459&((y^=d)>>>2^v),v^=d=16711935&((y^=d<<2)>>>8^v),v=(v^=(d=1431655765&(v>>>1^(y^=d<<8)))<<1)<<1|v>>>31,y=(y^=d)<<1|y>>>31;for(var b=0;b<p;b+=3){for(var g=i[b+1],m=i[b+2],w=i[b];w!=g;w+=m){var k=y^e[w],S=(y>>>4|y<<28)^e[w+1];d=v,v=y,y=d^(a[k>>>24&63]|u[k>>>16&63]|f[k>>>8&63]|h[63&k]|o[S>>>24&63]|s[S>>>16&63]|c[S>>>8&63]|l[63&S])}d=v,v=y,y=d}y=y>>>1|y<<31,y^=d=1431655765&((v=v>>>1|v<<31)>>>1^y),y^=(d=16711935&(y>>>8^(v^=d<<1)))<<8,y^=(d=858993459&(y>>>2^(v^=d)))<<2,y^=d=65535&((v^=d)>>>16^y),y^=d=252645135&((v^=d<<16)>>>4^y),v^=d<<4,r[0]=v,r[1]=y}function p(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},,function(e,t,r){var n=r(18);r(34);var i=e.exports=n.pem=n.pem||{};function o(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},i=0;i<e.values.length;++i)r.push(e.values[i].replace(/^(\S+\r\n)/,n));t+=r.join(",")+"\r\n";var o=0,a=-1;for(i=0;i<t.length;++i,++o)if(o>65&&-1!==a){var s=t[a];","===s?(++a,t=t.substr(0,a)+"\r\n "+t.substr(a)):t=t.substr(0,a)+"\r\n"+s+t.substr(a+1),o=i-a-1,a=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(a=i);return t}function a(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=o(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=o(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=o(r)),e.headers)for(var a=0;a<e.headers.length;++a)i+=o(e.headers[a]);return e.procType&&(i+="\r\n"),i+=n.util.encode64(e.body,t.maxline||64)+"\r\n",i+="-----END "+e.type+"-----\r\n"},i.decode=function(e){for(var t,r=[],i=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,o=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,s=/\r?\n/;t=i.exec(e);){var u={type:t[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:n.util.decode64(t[3])};if(r.push(u),t[2]){for(var c=t[2].split(s),f=0;t&&f<c.length;){for(var l=c[f].replace(/\s+$/,""),h=f+1;h<c.length;++h){var d=c[h];if(!/\s/.test(d[0]))break;l+=d,f=h}if(t=l.match(o)){for(var p={name:t[1],values:[]},v=t[2].split(","),y=0;y<v.length;++y)p.values.push(a(v[y]));if(u.procType)if(u.contentDomain||"Content-Domain"!==p.name)if(u.dekInfo||"DEK-Info"!==p.name)u.headers.push(p);else{if(0===p.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:v[0],parameters:v[1]||null}}else u.contentDomain=v[0]||"";else{if("Proc-Type"!==p.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==p.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:v[0],type:v[1]}}}++f}if("ENCRYPTED"===u.procType&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.");return r}},function(e,t,r){"use strict";var n=r(205),i=r(15);e.exports=function(e){if(isNaN(e)||e<=0)throw i(new Error("random bytes length must be a Number bigger than 0"),"ERR_INVALID_LENGTH");return n(e)}},function(e,t,r){"use strict";r(34),r(114);var n=r(18),i=r(110).fromString,o=r(109).toString,a=r(203).concat;t.bigIntegerToUintBase64url=function(e,t){var r=Uint8Array.from(e.abs().toByteArray());if(r=0===r[0]?r.slice(1):r,null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=a([new Uint8Array(t-r.length),r])}return o(r,"base64url")},t.base64urlToBigInteger=function(e){var r=t.base64urlToBuffer(e);return new n.jsbn.BigInteger(o(r,"base16"),16)},t.base64urlToBuffer=function(e,t){var r=i(e,"base64urlpad");if(null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=a([new Uint8Array(t-r.length),r])}return r}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(63).base64,a=r(429);e.exports={export:function(){var e=i(n.mark((function e(t,r){var i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.create(),e.next=3,i.encrypt(t,r);case 3:return s=e.sent,e.abrupt("return",o.encode(s));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}},function(e,t,r){"use strict";var n=r(785),i=r(277),o=i.encodeText,a=i.decodeText,s=i.concat;function u(e){if(Object.prototype.hasOwnProperty.call(n.names,e))return n.names[e];if(Object.prototype.hasOwnProperty.call(n.codes,e))return n.codes[e];throw new Error("Unsupported encoding: ".concat(e))}(t=e.exports=function(e,t){if(!t)throw new Error("requires an encoded Uint8Array");var r=u(e),n=r.name,i=r.codeBuf;return function(e,t){u(e).decode(a(t))}(n,t),s([i,t],i.length+t.length)}).encode=function(e,t){var r=u(e),n=o(r.encode(t));return s([r.codeBuf,n],r.codeBuf.length+n.length)},t.decode=function(e){e instanceof Uint8Array&&(e=a(e));var t=e[0];return["f","F","v","V","t","T","b","B","c","C","h","k","K"].includes(t)&&(e=e.toLowerCase()),u(e[0]).decode(e.substring(1))},t.isEncoded=function(e){if(e instanceof Uint8Array&&(e=a(e)),"[object String]"!==Object.prototype.toString.call(e))return!1;try{return u(e[0]).name}catch(t){return!1}},t.encoding=u,t.encodingFromData=function(e){return e instanceof Uint8Array&&(e=a(e)),u(e[0])};var c=Object.freeze(n.names),f=Object.freeze(n.codes);t.names=c,t.codes=f},function(e,t,r){"use strict";var n=r(21),i=new TextDecoder,o=new TextEncoder;e.exports={decodeText:function(e){return i.decode(e)},encodeText:function(e){return o.encode(e)},concat:function(e,t){var r,i=new Uint8Array(t),o=0,a=n(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(815),i=r(94);function o(e){var t=new Float64Array(16);if(e)for(var r=0;r<e.length;r++)t[r]=e[r];return t}t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;var a=new Uint8Array(32);a[0]=9;var s=o([56129,1]);function u(e){for(var t=1,r=0;r<16;r++){var n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-65536*t}e[0]+=t-1+37*(t-1)}function c(e,t,r){for(var n=~(r-1),i=0;i<16;i++){var o=n&(e[i]^t[i]);e[i]^=o,t[i]^=o}}function f(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function l(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function h(e,t,r){var n,i,o=0,a=0,s=0,u=0,c=0,f=0,l=0,h=0,d=0,p=0,v=0,y=0,b=0,g=0,m=0,w=0,k=0,S=0,E=0,_=0,A=0,x=0,T=0,M=0,C=0,O=0,I=0,P=0,R=0,B=0,D=0,N=r[0],L=r[1],j=r[2],U=r[3],F=r[4],K=r[5],z=r[6],V=r[7],H=r[8],J=r[9],q=r[10],G=r[11],X=r[12],W=r[13],Z=r[14],Y=r[15];o+=(n=t[0])*N,a+=n*L,s+=n*j,u+=n*U,c+=n*F,f+=n*K,l+=n*z,h+=n*V,d+=n*H,p+=n*J,v+=n*q,y+=n*G,b+=n*X,g+=n*W,m+=n*Z,w+=n*Y,a+=(n=t[1])*N,s+=n*L,u+=n*j,c+=n*U,f+=n*F,l+=n*K,h+=n*z,d+=n*V,p+=n*H,v+=n*J,y+=n*q,b+=n*G,g+=n*X,m+=n*W,w+=n*Z,k+=n*Y,s+=(n=t[2])*N,u+=n*L,c+=n*j,f+=n*U,l+=n*F,h+=n*K,d+=n*z,p+=n*V,v+=n*H,y+=n*J,b+=n*q,g+=n*G,m+=n*X,w+=n*W,k+=n*Z,S+=n*Y,u+=(n=t[3])*N,c+=n*L,f+=n*j,l+=n*U,h+=n*F,d+=n*K,p+=n*z,v+=n*V,y+=n*H,b+=n*J,g+=n*q,m+=n*G,w+=n*X,k+=n*W,S+=n*Z,E+=n*Y,c+=(n=t[4])*N,f+=n*L,l+=n*j,h+=n*U,d+=n*F,p+=n*K,v+=n*z,y+=n*V,b+=n*H,g+=n*J,m+=n*q,w+=n*G,k+=n*X,S+=n*W,E+=n*Z,_+=n*Y,f+=(n=t[5])*N,l+=n*L,h+=n*j,d+=n*U,p+=n*F,v+=n*K,y+=n*z,b+=n*V,g+=n*H,m+=n*J,w+=n*q,k+=n*G,S+=n*X,E+=n*W,_+=n*Z,A+=n*Y,l+=(n=t[6])*N,h+=n*L,d+=n*j,p+=n*U,v+=n*F,y+=n*K,b+=n*z,g+=n*V,m+=n*H,w+=n*J,k+=n*q,S+=n*G,E+=n*X,_+=n*W,A+=n*Z,x+=n*Y,h+=(n=t[7])*N,d+=n*L,p+=n*j,v+=n*U,y+=n*F,b+=n*K,g+=n*z,m+=n*V,w+=n*H,k+=n*J,S+=n*q,E+=n*G,_+=n*X,A+=n*W,x+=n*Z,T+=n*Y,d+=(n=t[8])*N,p+=n*L,v+=n*j,y+=n*U,b+=n*F,g+=n*K,m+=n*z,w+=n*V,k+=n*H,S+=n*J,E+=n*q,_+=n*G,A+=n*X,x+=n*W,T+=n*Z,M+=n*Y,p+=(n=t[9])*N,v+=n*L,y+=n*j,b+=n*U,g+=n*F,m+=n*K,w+=n*z,k+=n*V,S+=n*H,E+=n*J,_+=n*q,A+=n*G,x+=n*X,T+=n*W,M+=n*Z,C+=n*Y,v+=(n=t[10])*N,y+=n*L,b+=n*j,g+=n*U,m+=n*F,w+=n*K,k+=n*z,S+=n*V,E+=n*H,_+=n*J,A+=n*q,x+=n*G,T+=n*X,M+=n*W,C+=n*Z,O+=n*Y,y+=(n=t[11])*N,b+=n*L,g+=n*j,m+=n*U,w+=n*F,k+=n*K,S+=n*z,E+=n*V,_+=n*H,A+=n*J,x+=n*q,T+=n*G,M+=n*X,C+=n*W,O+=n*Z,I+=n*Y,b+=(n=t[12])*N,g+=n*L,m+=n*j,w+=n*U,k+=n*F,S+=n*K,E+=n*z,_+=n*V,A+=n*H,x+=n*J,T+=n*q,M+=n*G,C+=n*X,O+=n*W,I+=n*Z,P+=n*Y,g+=(n=t[13])*N,m+=n*L,w+=n*j,k+=n*U,S+=n*F,E+=n*K,_+=n*z,A+=n*V,x+=n*H,T+=n*J,M+=n*q,C+=n*G,O+=n*X,I+=n*W,P+=n*Z,R+=n*Y,m+=(n=t[14])*N,w+=n*L,k+=n*j,S+=n*U,E+=n*F,_+=n*K,A+=n*z,x+=n*V,T+=n*H,M+=n*J,C+=n*q,O+=n*G,I+=n*X,P+=n*W,R+=n*Z,B+=n*Y,w+=(n=t[15])*N,a+=38*(S+=n*j),s+=38*(E+=n*U),u+=38*(_+=n*F),c+=38*(A+=n*K),f+=38*(x+=n*z),l+=38*(T+=n*V),h+=38*(M+=n*H),d+=38*(C+=n*J),p+=38*(O+=n*q),v+=38*(I+=n*G),y+=38*(P+=n*X),b+=38*(R+=n*W),g+=38*(B+=n*Z),m+=38*(D+=n*Y),o=(n=(o+=38*(k+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=f,e[6]=l,e[7]=h,e[8]=d,e[9]=p,e[10]=v,e[11]=y,e[12]=b,e[13]=g,e[14]=m,e[15]=w}function d(e,t){h(e,t,t)}function p(e,t){for(var r=new Uint8Array(32),n=new Float64Array(80),i=o(),a=o(),p=o(),v=o(),y=o(),b=o(),g=0;g<31;g++)r[g]=e[g];r[31]=127&e[31]|64,r[0]&=248,function(e,t){for(var r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(n,t);for(g=0;g<16;g++)a[g]=n[g];i[0]=v[0]=1;for(g=254;g>=0;--g){var m=r[g>>>3]>>>(7&g)&1;c(i,a,m),c(p,v,m),f(y,i,p),l(i,i,p),f(p,a,v),l(a,a,v),d(v,y),d(b,i),h(i,p,i),h(p,a,y),f(y,i,p),l(i,i,p),d(a,i),l(p,v,b),h(i,p,s),f(i,i,v),h(p,p,i),h(i,v,b),h(v,a,n),d(a,y),c(i,a,m),c(p,v,m)}for(g=0;g<16;g++)n[g+16]=i[g],n[g+32]=p[g],n[g+48]=a[g],n[g+64]=v[g];var w=n.subarray(32),k=n.subarray(16);!function(e,t){for(var r=o(),n=0;n<16;n++)r[n]=t[n];for(n=253;n>=0;n--)d(r,r),2!==n&&4!==n&&h(r,r,t);for(n=0;n<16;n++)e[n]=r[n]}(w,w),h(k,k,w);var S=new Uint8Array(32);return function(e,t){for(var r=o(),n=o(),i=0;i<16;i++)n[i]=t[i];u(n),u(n),u(n);for(var a=0;a<2;a++){for(r[0]=n[0]-65517,i=1;i<15;i++)r[i]=n[i]-65535-(r[i-1]>>16&1),r[i-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);var s=r[15]>>16&1;r[14]&=65535,c(n,r,1-s)}for(i=0;i<16;i++)e[2*i]=255&n[i],e[2*i+1]=n[i]>>8}(S,k),S}function v(e){return p(e,a)}function y(e){if(e.length!==t.SECRET_KEY_LENGTH)throw new Error("x25519: seed must be "+t.SECRET_KEY_LENGTH+" bytes");var r=new Uint8Array(e);return{publicKey:v(r),secretKey:r}}t.scalarMult=p,t.scalarMultBase=v,t.generateKeyPairFromSeed=y,t.generateKeyPair=function(e){var t=n.randomBytes(32,e),r=y(t);return i.wipe(t),r},t.sharedKey=function(e,r,n){if(void 0===n&&(n=!1),e.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(r.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");var i=p(e,r);if(n){for(var o=0,a=0;a<i.length;a++)o|=i[a];if(0===o)throw new Error("X25519: invalid shared key")}return i}},function(e,t,r){"use strict";e.exports=function(){var e={};return e.promise=new Promise((function(t,r){e.resolve=t,e.reject=r})),e}},function(e,t,r){"use strict";var n=r(0),i=r(45),o=r(44),a=r(30),s=r(13).Buffer,u=r(79);e.exports=function(){var e=o(n.mark((function e(t){var r,o,c,f,l,h,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,o=!1,e.prev=2,f=a(t);case 4:return e.next=6,i(f.next());case 6:return l=e.sent,r=l.done,e.next=10,i(l.value);case 10:if(h=e.sent,r){e.next=28;break}if(d=h,!s.isBuffer(d)){e.next=18;break}return e.next=16,d;case 16:e.next=25;break;case 18:if(!u.isBufferList(d)){e.next=23;break}return e.next=21,d.slice();case 21:e.next=25;break;case 23:return e.next=25,s.from(d);case 25:r=!0,e.next=4;break;case 28:e.next=34;break;case 30:e.prev=30,e.t0=e.catch(2),o=!0,c=e.t0;case 34:if(e.prev=34,e.prev=35,r||null==f.return){e.next=39;break}return e.next=39,i(f.return());case 39:if(e.prev=39,!o){e.next=42;break}throw c;case 42:return e.finish(39);case 43:return e.finish(34);case 44:case"end":return e.stop()}}),e,null,[[2,30,34,44],[35,,39,43]])})));return function(t){return e.apply(this,arguments)}}(),e.exports.toBuffer=e.exports,e.exports.toList=function(){var e=o(n.mark((function e(t){var r,o,c,f,l,h,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,o=!1,e.prev=2,f=a(t);case 4:return e.next=6,i(f.next());case 6:return l=e.sent,r=l.done,e.next=10,i(l.value);case 10:if(h=e.sent,r){e.next=28;break}if(d=h,!s.isBuffer(d)){e.next=18;break}return e.next=16,(new u).append(d);case 16:e.next=25;break;case 18:if(!u.isBufferList(d)){e.next=23;break}return e.next=21,d;case 21:e.next=25;break;case 23:return e.next=25,(new u).append(s.from(d));case 25:r=!0,e.next=4;break;case 28:e.next=34;break;case 30:e.prev=30,e.t0=e.catch(2),o=!0,c=e.t0;case 34:if(e.prev=34,e.prev=35,r||null==f.return){e.next=39;break}return e.next=39,i(f.return());case 39:if(e.prev=39,!o){e.next=42;break}throw c;case 42:return e.finish(39);case 43:return e.finish(34);case 44:case"end":return e.stop()}}),e,null,[[2,30,34,44],[35,,39,43]])})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";function n(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n<e.length;n++)r|=e[n]^t[n];return 1&r-1>>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,r){return~(e-1)&t|e-1&r},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=n,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==n(e,t)}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-crypto-keys"]||(n.roots["libp2p-crypto-keys"]={});s.KeyType=function(){var e={},t=Object.create(e);return t[e[0]="RSA"]=0,t[e[1]="Ed25519"]=1,t[e[2]="Secp256k1"]=2,t}(),s.PublicKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.Type=0,e.prototype.Data=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(8).int32(e.Type),t.uint32(18).bytes(e.Data),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PublicKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.Type=e.int32();break;case 2:n.Data=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw a.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw a.ProtocolError("missing required 'Data'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PublicKey)return e;var t=new s.PublicKey;switch(e.Type){case"RSA":case 0:t.Type=0;break;case"Ed25519":case 1:t.Type=1;break;case"Secp256k1":case 2:t.Type=2}return null!=e.Data&&("string"===typeof e.Data?a.base64.decode(e.Data,t.Data=a.newBuffer(a.base64.length(e.Data)),0):e.Data.length&&(t.Data=e.Data)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.Type=t.enums===String?"RSA":0,t.bytes===String?r.Data="":(r.Data=[],t.bytes!==Array&&(r.Data=a.newBuffer(r.Data)))),null!=e.Type&&e.hasOwnProperty("Type")&&(r.Type=t.enums===String?s.KeyType[e.Type]:e.Type),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?a.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),s.PrivateKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.Type=0,e.prototype.Data=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(8).int32(e.Type),t.uint32(18).bytes(e.Data),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PrivateKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.Type=e.int32();break;case 2:n.Data=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw a.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw a.ProtocolError("missing required 'Data'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PrivateKey)return e;var t=new s.PrivateKey;switch(e.Type){case"RSA":case 0:t.Type=0;break;case"Ed25519":case 1:t.Type=1;break;case"Secp256k1":case 2:t.Type=2}return null!=e.Data&&("string"===typeof e.Data?a.base64.decode(e.Data,t.Data=a.newBuffer(a.base64.length(e.Data)),0):e.Data.length&&(t.Data=e.Data)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.Type=t.enums===String?"RSA":0,t.bytes===String?r.Data="":(r.Data=[],t.bytes!==Array&&(r.Data=a.newBuffer(r.Data)))),null!=e.Type&&e.hasOwnProperty("Type")&&(r.Type=t.enums===String?s.KeyType[e.Type]:e.Type),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?a.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";r(34),r(114);var n=r(18),i=r(116).fromString,o=r(117).toString,a=r(207).concat;t.bigIntegerToUintBase64url=function(e,t){var r=Uint8Array.from(e.abs().toByteArray());if(r=0===r[0]?r.slice(1):r,null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=a([new Uint8Array(t-r.length),r])}return o(r,"base64url")},t.base64urlToBigInteger=function(e){var r=t.base64urlToBuffer(e);return new n.jsbn.BigInteger(o(r,"base16"),16)},t.base64urlToBuffer=function(e,t){var r=i(e,"base64urlpad");if(null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=a([new Uint8Array(t-r.length),r])}return r}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(63).base64,a=r(446);e.exports={export:function(){var e=i(n.mark((function e(t,r){var i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.create(),e.next=3,i.encrypt(t,r);case 3:return s=e.sent,e.abrupt("return",o.encode(s));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}},function(e,t,r){"use strict";r.r(t),r.d(t,"CURVE",(function(){return y})),r.d(t,"ExtendedPoint",(function(){return E})),r.d(t,"Point",(function(){return A})),r.d(t,"Signature",(function(){return x})),r.d(t,"SignResult",(function(){return x})),r.d(t,"getPublicKey",(function(){return Q})),r.d(t,"sign",(function(){return ee})),r.d(t,"verify",(function(){return re})),r.d(t,"utils",(function(){return oe}));var n=r(51),i=r(0),o=r.n(i),a=r(25),s=r(5),u=r(7),c=r(504),f=r.n(c),l=BigInt(0),h=BigInt(1),d=BigInt(2),p=BigInt(8),v=BigInt(255),y={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:Math.pow(d,v)-BigInt(19),n:Math.pow(d,BigInt(252))+BigInt("27742317777372353535851937790883648493"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")},b=32,g=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),m=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),w=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),k=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),S=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),E=function(){function e(t,r,n,i){Object(s.a)(this,e),this.x=t,this.y=r,this.z=n,this.t=i}return Object(u.a)(e,[{key:"toRistrettoBytes",value:function(){var e,t=this.x,r=this.y,n=this.z,i=this.t,o=N(N(n+r)*N(n-r)),a=N(t*r),s=F(N(o*Math.pow(a,d))).value,u=N(s*o),c=N(s*a),f=N(u*c*i);if(R(i*f)){var l=N(r*g),h=N(t*g);t=l,r=h,e=N(u*w)}else e=c;R(t*f)&&(r=N(-r));var p=N((n-r)*e);return R(p)&&(p=N(-p)),P(p,b)}},{key:"equals",value:function(e){var t=e;return N(this.t*t.z)===N(t.t*this.z)}},{key:"negate",value:function(){return new e(N(-this.x),this.y,this.z,N(-this.t))}},{key:"double",value:function(){var t=this.x,r=this.y,n=this.z,i=y.a,o=N(Math.pow(t,d)),a=N(Math.pow(r,d)),s=N(d*Math.pow(n,d)),u=N(i*o),c=N(Math.pow(t+r,d)-o-a),f=N(u+a),l=N(f-s),h=N(u-a),p=N(c*l),v=N(f*h),b=N(c*h);return new e(p,v,N(l*f),b)}},{key:"add",value:function(t){var r=this.x,n=this.y,i=this.z,o=this.t,a=t.x,s=t.y,u=t.z,c=t.t,f=N((n-r)*(s+a)),h=N((n+r)*(s-a)),p=N(h-f);if(p===l)return this.double();var v=N(i*d*c),y=N(o*d*u),b=N(y+v),g=N(h+f),m=N(y-v),w=N(b*p),k=N(g*m),S=N(b*m);return new e(w,k,N(p*g),S)}},{key:"subtract",value:function(e){return this.add(e.negate())}},{key:"multiplyUnsafe",value:function(t){var r=Y(t);if(r===h)return this;for(var n=e.ZERO,i=this;r>l;)r&h&&(n=n.add(i)),i=i.double(),r>>=h;return n}},{key:"precomputeWindow",value:function(e){for(var t=256/e+1,r=[],n=this,i=n,o=0;o<t;o++){i=n,r.push(i);for(var a=1;a<Math.pow(2,e-1);a++)i=i.add(n),r.push(i);n=i.double()}return r}},{key:"wNAF",value:function(t,r){!r&&this.equals(e.BASE)&&(r=A.BASE);var n=r&&r._WINDOW_SIZE||1;if(256%n)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");var i=r&&_.get(r);i||(i=this.precomputeWindow(n),r&&1!==n&&(i=e.normalizeZ(i),_.set(r,i)));for(var o=e.ZERO,a=e.ZERO,s=256/n+1,u=Math.pow(2,n-1),c=BigInt(Math.pow(2,n)-1),f=Math.pow(2,n),l=BigInt(n),d=0;d<s;d++){var p=d*u,v=Number(t&c);if(t>>=l,v>u&&(v-=f,t+=h),0===v){var y=i[p];d%2&&(y=y.negate()),a=a.add(y)}else{var b=i[p+Math.abs(v)-1];v<0&&(b=b.negate()),o=o.add(b)}}return[o,a]}},{key:"multiply",value:function(t,r){var n=Y(t);return e.normalizeZ(this.wNAF(n,r))[0]}},{key:"toAffine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L(this.z),t=N(this.x*e),r=N(this.y*e);return new A(t,r)}}],[{key:"fromAffine",value:function(t){if(!(t instanceof A))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return t.equals(A.ZERO)?e.ZERO:new e(t.x,t.y,h,N(t.x*t.y))}},{key:"toAffineBatch",value:function(e){var t=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.P,r=e.length,n=new Array(r),i=h,o=0;o<r;o++)e[o]!==l&&(n[o]=i,i=N(i*e[o],t));i=L(i,t);for(var a=r-1;a>=0;a--)if(e[a]!==l){var s=N(i*e[a],t);e[a]=N(i*n[a],t),i=s}return e}(e.map((function(e){return e.z})));return e.map((function(e,r){return e.toAffine(t[r])}))}},{key:"normalizeZ",value:function(e){return this.toAffineBatch(e).map(this.fromAffine)}},{key:"fromRistrettoHash",value:function(e){var t=D(e.slice(0,b)),r=this.calcElligatorRistrettoMap(t),n=D(e.slice(b,64)),i=this.calcElligatorRistrettoMap(n);return r.add(i)}},{key:"calcElligatorRistrettoMap",value:function(t){var r=y.d,n=N(g*t*t),i=N((n+h)*k),o=BigInt(-1),a=N((o-r*n)*N(n+r)),s=U(i,a),u=s.isValid,c=s.value,f=N(c*t);R(f)||(f=N(-f)),u||(c=f),u||(o=n);var l=N(o*(n-h)*S-a),d=c*c,p=N((c+c)*a),v=N(l*m),b=N(h-d),w=N(h+d);return new e(N(p*w),N(b*v),N(v*w),N(p*b))}},{key:"fromRistrettoBytes",value:function(t){var r=y.a,n=y.d,i="ExtendedPoint.fromRistrettoBytes: Cannot convert bytes to Ristretto Point",o=D(t);if(!function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(P(o,b),t)||R(o))throw new Error(i);var a=N(o*o),s=N(h+r*a),u=N(h-r*a),c=N(s*s),f=N(u*u),d=N(r*n*c-f),p=F(N(d*f)),v=p.isValid,g=p.value,m=N(g*u),w=N(g*m*d),k=N((o+o)*m);R(k)&&(k=N(-k));var S=N(s*w),E=N(k*S);if(!v||R(E)||S===l)throw new Error(i);return new e(k,S,h,E)}}]),e}();E.BASE=new E(y.Gx,y.Gy,h,N(y.Gx*y.Gy)),E.ZERO=new E(l,h,h,l);var _=new WeakMap,A=function(){function e(t,r){Object(s.a)(this,e),this.x=t,this.y=r}return Object(u.a)(e,[{key:"_setWindowSize",value:function(e){this._WINDOW_SIZE=e,_.delete(this)}},{key:"toRawBytes",value:function(){for(var e=I(this.y),t=new Uint8Array(b),r=e.length-2,n=0;n<b&&r>=0;r-=2,n++)t[n]=C(e[r]+e[r+1]);var i=this.x&h?128:0;return t[31]|=i,t}},{key:"toHex",value:function(){return M(this.toRawBytes())}},{key:"toX25519",value:function(){return N((h+this.y)*L(h-this.y))}},{key:"equals",value:function(e){return this.x===e.x&&this.y===e.y}},{key:"negate",value:function(){return new e(N(-this.x),this.y)}},{key:"add",value:function(e){return E.fromAffine(this).add(E.fromAffine(e)).toAffine()}},{key:"subtract",value:function(e){return this.add(e.negate())}},{key:"multiply",value:function(e){return E.fromAffine(this).multiply(e,this).toAffine()}}],[{key:"fromHex",value:function(t){var r=y.d,n=y.P,i=t instanceof Uint8Array?t:O(t);if(32!==i.length)throw new Error("Point.fromHex: expected 32 bytes");var o=i[31],a=-129&o,s=0!==(128&o),u=B(Uint8Array.from(Array.from(i.slice(0,31)).concat(a)));if(u>=n)throw new Error("Point.fromHex expects hex <= Fp");var c=N(u*u),f=U(N(c-h),N(r*c+h)),l=f.isValid,d=f.value;if(!l)throw new Error("Point.fromHex: invalid y coordinate");return s!==((d&h)===h)&&(d=N(-d)),new e(d,u)}},{key:"fromPrivateKey",value:function(){var t=Object(a.a)(o.a.mark((function t(r){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,W(r);case 2:return n=t.sent,t.abrupt("return",e.BASE.multiply(H(n)));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),e}();A.BASE=new A(y.Gx,y.Gy),A.ZERO=new A(l,h);var x=function(){function e(t,r){Object(s.a)(this,e),this.r=t,this.s=r}return Object(u.a)(e,[{key:"toRawBytes",value:function(){var e=O(I(this.s)).reverse(),t=new Uint8Array(b);t.set(e);var r=new Uint8Array(64);return r.set(this.r.toRawBytes()),r.set(t,32),r}},{key:"toHex",value:function(){return M(this.toRawBytes())}}],[{key:"fromHex",value:function(t){t=J(t);var r=A.fromHex(t.slice(0,32)),n=B(t.slice(32));if(!q(n))throw new Error("Signature.fromHex expects s <= CURVE.n");return new e(r,n)}}]),e}();function T(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(1===t.length)return t[0];for(var n=t.reduce((function(e,t){return e+t.length}),0),i=new Uint8Array(n),o=0,a=0;o<t.length;o++){var s=t[o];i.set(s,a),a+=s.length}return i}function M(e){for(var t="",r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}function C(e){var t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function O(e){if("string"!==typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");for(var t=new Uint8Array(e.length/2),r=0;r<t.length;r++){var n=2*r;t[r]=C(e.slice(n,n+2))}return t}function I(e){var t=e.toString(16);return 1&t.length?"0".concat(t):t}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,r=I(e).padStart(2*t,"0");return O(r).reverse()}function R(e){return(N(e)&h)===h}function B(e){for(var t=l,r=0;r<e.length;r++)t+=BigInt(e[r])<<p*BigInt(r);return t}function D(e){return N(B(e)&Math.pow(d,v)-h)}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.P,r=e%t;return r>=l?r:t+r}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.P;if(e===l||t<=l)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));for(var r=N(e,t),n=t,i=l,o=h,a=h,s=l;r!==l;){var u=n/r,c=n%r,f=i-a*u,d=o-s*u;n=r,r=c,i=a,o=s,a=f,s=d}var p=n;if(p!==h)throw new Error("invert: does not exist");return N(i,t)}function j(e,t){for(var r=y.P,n=e;t-- >l;)n*=n,n%=r;return n}function U(e,t){var r=N(t*t*t),i=N(r*r*t),o=N(e*r*function(e){var t=y.P,r=[5,10,20,40,80].map((function(e){return BigInt(e)})),i=Object(n.a)(r,5),o=i[0],a=i[1],s=i[2],u=i[3],c=i[4],f=e*e%t*e%t,l=j(f,d)*f%t,p=j(l,h)*e%t,v=j(p,o)*p%t,b=j(v,a)*v%t,g=j(b,s)*b%t,m=j(g,u)*g%t,w=j(m,c)*m%t,k=j(w,c)*m%t,S=j(k,a)*v%t;return j(S,d)*e%t}(e*i)),a=N(t*o*o),s=o,u=N(o*g),c=a===e,f=a===N(-e),l=a===N(-e*g);return c&&(o=s),(f||l)&&(o=u),R(o)&&(o=N(-o)),{isValid:c||f,value:o}}function F(e){return U(h,e)}function K(){return z.apply(this,arguments)}function z(){return(z=Object(a.a)(o.a.mark((function e(){var t,r,n,i=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=T.apply(void 0,i),e.next=3,oe.sha512(t);case 3:return r=e.sent,n=B(r),e.abrupt("return",N(n,y.n));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(e){return e.slice(b)}function H(e){var t=e.slice(0,b);return t[0]&=248,t[31]&=127,t[31]|=64,N(B(t),y.n)}function J(e){return e instanceof Uint8Array?e:O(e)}function q(e){return 0<e&&e<y.n}var G=Math.pow(d,BigInt(256))-h;function X(e){var t,r="Expected 32 bytes of private key";if("bigint"===typeof e||"number"===typeof e&&Number.isSafeInteger(e)){var n=BigInt(e);if(n<0||n>G)throw new Error(r);t=O(n.toString(16).padStart(64,"0"))}else if("string"===typeof e){if(64!==e.length)throw new Error(r);t=O(e)}else{if(!(e instanceof Uint8Array))throw new TypeError("Expected valid private key");if(32!==e.length)throw new Error(r);t=e}return t}function W(e){return Z.apply(this,arguments)}function Z(){return(Z=Object(a.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe.sha512(X(t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(e){if("number"===typeof e&&e>0&&Number.isSafeInteger(e))return BigInt(e);if("bigint"===typeof e&&q(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function Q(e){return $.apply(this,arguments)}function $(){return($=Object(a.a)(o.a.mark((function e(t){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A.fromPrivateKey(t);case 2:return r=e.sent,e.abrupt("return","string"===typeof t?r.toHex():r.toRawBytes());case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(e,t){return te.apply(this,arguments)}function te(){return(te=Object(a.a)(o.a.mark((function e(t,r){var n,i,a,s,u,c,f,l,h;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W(r);case 2:return n=e.sent,i=H(n),a=A.BASE.multiply(i),s=J(t),e.next=8,K(V(n),s);case 8:return u=e.sent,c=A.BASE.multiply(u),e.next=12,K(c.toRawBytes(),a.toRawBytes(),s);case 12:return f=e.sent,l=N(u+f*i,y.n),h=new x(c,l),e.abrupt("return","string"===typeof t?h.toHex():h.toRawBytes());case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function re(e,t,r){return ne.apply(this,arguments)}function ne(){return(ne=Object(a.a)(o.a.mark((function e(t,r,n){var i,a,s,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=J(r),n instanceof A||(n=A.fromHex(n)),t instanceof x||(t=x.fromHex(t)),e.next=5,K(t.r.toRawBytes(),n.toRawBytes(),r);case 5:return i=e.sent,a=E.fromAffine(n).multiplyUnsafe(i),s=E.BASE.multiply(t.s),u=E.fromAffine(t.r).add(a),e.abrupt("return",u.subtract(s).multiplyUnsafe(p).equals(E.ZERO));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}A.BASE._setWindowSize(8);var ie={node:f.a,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0},oe={TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],randomBytes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(ie.web)return ie.web.getRandomValues(new Uint8Array(e));if(ie.node){var t=ie.node.randomBytes;return new Uint8Array(t(e).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:function(){return oe.randomBytes(32)},sha512:function(){var e=Object(a.a)(o.a.mark((function e(t){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ie.web){e.next=7;break}return e.next=3,ie.web.subtle.digest("SHA-512",t.buffer);case 3:return r=e.sent,e.abrupt("return",new Uint8Array(r));case 7:if(!ie.node){e.next=11;break}return e.abrupt("return",Uint8Array.from(ie.node.createHash("sha512").update(t).digest()));case 11:throw new Error("The environment doesn't have sha512 function");case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),precompute:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.BASE,r=t.equals(A.BASE)?t:new A(t.x,t.y);return r._setWindowSize(e),r.multiply(h),r}}},function(e,t,r){"use strict";r.r(t),r.d(t,"CURVE",(function(){return g})),r.d(t,"Point",(function(){return E})),r.d(t,"Signature",(function(){return A})),r.d(t,"SignResult",(function(){return x})),r.d(t,"getPublicKey",(function(){return $})),r.d(t,"recoverPublicKey",(function(){return ee})),r.d(t,"getSharedSecret",(function(){return re})),r.d(t,"sign",(function(){return ie})),r.d(t,"signSync",(function(){return ae})),r.d(t,"verify",(function(){return se})),r.d(t,"schnorr",(function(){return be})),r.d(t,"utils",(function(){return me}));var n=r(74),i=r(0),o=r.n(i),a=r(51),s=r(25),u=r(5),c=r(7),f=r(505),l=r.n(f),h=BigInt(0),d=BigInt(1),p=BigInt(2),v=BigInt(3),y=BigInt(8),b=Math.pow(p,BigInt(256)),g={a:h,b:BigInt(7),P:b-Math.pow(p,BigInt(32))-BigInt(977),n:b-BigInt("432420386565659656852420866394968145599"),h:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")};function m(e){var t=g.a,r=g.b;return j(Math.pow(e,v)+t*e+r)}var w=g.a===h,k=function(){function e(t,r,n){Object(u.a)(this,e),this.x=t,this.y=r,this.z=n}return Object(c.a)(e,[{key:"equals",value:function(e){var t=this,r=e,n=j(t.z*t.z),i=j(t.z*n),o=j(r.z*r.z),a=j(r.z*o);return j(t.x*o)===j(n*r.x)&&j(t.y*a)===j(i*r.y)}},{key:"negate",value:function(){return new e(this.x,j(-this.y),this.z)}},{key:"double",value:function(){var t=this.x,r=this.y,n=this.z,i=j(Math.pow(t,p)),o=j(Math.pow(r,p)),a=j(Math.pow(o,p)),s=j(p*(j(j(Math.pow(t+o,p)))-i-a)),u=j(v*i),c=j(Math.pow(u,p)),f=j(c-p*s);return new e(f,j(u*(s-f)-y*a),j(p*r*n))}},{key:"add",value:function(t){if(!(t instanceof e))throw new TypeError("JacobianPoint#add: expected JacobianPoint");var r=this.x,n=this.y,i=this.z,o=t.x,a=t.y,s=t.z;if(o===h||a===h)return this;if(r===h||n===h)return t;var u=j(Math.pow(i,p)),c=j(Math.pow(s,p)),f=j(r*c),l=j(o*u),d=j(n*s*c),v=j(j(a*i)*u),y=j(l-f),b=j(v-d);if(y===h)return b===h?this.double():e.ZERO;var g=j(Math.pow(y,p)),m=j(y*g),w=j(f*g),k=j(Math.pow(b,p)-m-p*w);return new e(k,j(b*(w-k)-d*m),j(i*s*y))}},{key:"subtract",value:function(e){return this.add(e.negate())}},{key:"multiplyUnsafe",value:function(t){var r=L(t);if(!w){for(var n=e.ZERO,i=this;r>h;)r&d&&(n=n.add(i)),i=i.double(),r>>=d;return n}for(var o=V(r),a=o.k1neg,s=o.k1,u=o.k2neg,c=o.k2,f=e.ZERO,l=e.ZERO,p=this;s>h||c>h;)s&d&&(f=f.add(p)),c&d&&(l=l.add(p)),p=p.double(),s>>=d,c>>=d;return a&&(f=f.negate()),u&&(l=l.negate()),l=new e(j(l.x*g.beta),l.y,l.z),f.add(l)}},{key:"precomputeWindow",value:function(e){for(var t=w?128/e+1:256/e+1,r=[],n=this,i=n,o=0;o<t;o++){i=n,r.push(i);for(var a=1;a<Math.pow(2,e-1);a++)i=i.add(n),r.push(i);n=i.double()}return r}},{key:"wNAF",value:function(t,r){!r&&this.equals(e.BASE)&&(r=E.BASE);var n=r&&r._WINDOW_SIZE||1;if(256%n)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");var i=r&&S.get(r);i||(i=this.precomputeWindow(n),r&&1!==n&&(i=e.normalizeZ(i),S.set(r,i)));for(var o=e.ZERO,a=e.ZERO,s=w?128/n+1:256/n+1,u=Math.pow(2,n-1),c=BigInt(Math.pow(2,n)-1),f=Math.pow(2,n),l=BigInt(n),h=0;h<s;h++){var p=h*u,v=Number(t&c);if(t>>=l,v>u&&(v-=f,t+=d),0===v){var y=i[p];h%2&&(y=y.negate()),a=a.add(y)}else{var b=i[p+Math.abs(v)-1];v<0&&(b=b.negate()),o=o.add(b)}}return{p:o,f:a}}},{key:"multiply",value:function(t,r){var n,i,o=L(t);if(w){var a=V(o),s=a.k1neg,u=a.k1,c=a.k2neg,f=a.k2,l=this.wNAF(u,r),h=l.p,d=l.f,p=this.wNAF(f,r),v=p.p,y=p.f;s&&(h=h.negate()),c&&(v=v.negate()),v=new e(j(v.x*g.beta),v.y,v.z),n=h.add(v),i=d.add(y)}else{var b=this.wNAF(o,r);n=b.p,i=b.f}return e.normalizeZ([n,i])[0]}},{key:"toAffine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F(this.z),t=Math.pow(e,p),r=j(this.x*t),n=j(this.y*t*e);return new E(r,n)}}],[{key:"fromAffine",value:function(t){if(!(t instanceof E))throw new TypeError("JacobianPoint#fromAffine: expected Point");return new e(t.x,t.y,d)}},{key:"toAffineBatch",value:function(e){var t=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.P,r=e.length,n=new Array(r),i=d,o=0;o<r;o++)e[o]!==h&&(n[o]=i,i=j(i*e[o],t));i=F(i,t);for(var a=r-1;a>=0;a--)if(e[a]!==h){var s=j(i*e[a],t);e[a]=j(i*n[a],t),i=s}return e}(e.map((function(e){return e.z})));return e.map((function(e,r){return e.toAffine(t[r])}))}},{key:"normalizeZ",value:function(t){return e.toAffineBatch(t).map(e.fromAffine)}}]),e}();k.BASE=new k(g.Gx,g.Gy,d),k.ZERO=new k(h,d,h);var S=new WeakMap,E=function(){function e(t,r){Object(u.a)(this,e),this.x=t,this.y=r}return Object(c.a)(e,[{key:"_setWindowSize",value:function(e){this._WINDOW_SIZE=e,S.delete(this)}},{key:"toRawBytes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return R(this.toHex(e))}},{key:"toHex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=C(this.x);return e?"".concat(this.y&d?"03":"02").concat(t):"04".concat(t).concat(C(this.y))}},{key:"toHexX",value:function(){return this.toHex(!0).slice(2)}},{key:"toRawX",value:function(){return this.toRawBytes(!0).slice(1)}},{key:"assertValidity",value:function(){var e="Point is not on elliptic curve",t=g.P,r=this.x,n=this.y;if(r===h||n===h||r>=t||n>=t)throw new Error(e);if((j(n*n)-m(r))%t!==h)throw new Error(e)}},{key:"equals",value:function(e){return this.x===e.x&&this.y===e.y}},{key:"negate",value:function(){return new e(this.x,j(-this.y))}},{key:"double",value:function(){return k.fromAffine(this).double().toAffine()}},{key:"add",value:function(e){return k.fromAffine(this).add(k.fromAffine(e)).toAffine()}},{key:"subtract",value:function(e){return this.add(e.negate())}},{key:"multiply",value:function(e){return k.fromAffine(this).multiply(e,this).toAffine()}}],[{key:"fromCompressedHex",value:function(t){var r=32===t.length,n=D(r?t:t.slice(1)),i=function(e){var t=g.P,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),s=BigInt(88),u=e*e*e%t,c=u*u*e%t,f=U(c,v)*c%t,l=U(f,v)*c%t,h=U(l,p)*u%t,d=U(h,n)*h%t,y=U(d,i)*d%t,b=U(y,a)*y%t,m=U(b,s)*b%t,w=U(m,a)*y%t,k=U(w,v)*c%t,S=U(k,o)*d%t,E=U(S,r)*u%t;return U(E,p)}(m(n)),o=(i&d)===d;r?o&&(i=j(-i)):1===(1&t[0])!==o&&(i=j(-i));var a=new e(n,i);return a.assertValidity(),a}},{key:"fromUncompressedHex",value:function(t){var r=new e(D(t.slice(1,33)),D(t.slice(33)));return r.assertValidity(),r}},{key:"fromHex",value:function(e){var t=B(e),r=t[0];if(32===t.length||33===t.length&&(2===r||3===r))return this.fromCompressedHex(t);if(65===t.length&&4===r)return this.fromUncompressedHex(t);throw new Error("Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ".concat(t.length))}},{key:"fromPrivateKey",value:function(t){return e.BASE.multiply(Z(t))}},{key:"fromSignature",value:function(t,r,n){var i=t instanceof Uint8Array?D(t):P(t),o=Q(r),a=o.r,s=o.s;if(0!==n&&1!==n)throw new Error("Cannot recover signature: invalid yParity bit");var u=2+(1&n),c=e.fromHex("0".concat(u).concat(C(a))),f=k.fromAffine(c).multiplyUnsafe(s),l=k.BASE.multiply(i),h=F(a,g.n),d=f.subtract(l).multiplyUnsafe(h).toAffine();return d.assertValidity(),d}}]),e}();function _(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}E.BASE=new E(g.Gx,g.Gy),E.ZERO=new E(h,h);var A=function(){function e(t,r){Object(u.a)(this,e),this.r=t,this.s=r}return Object(c.a)(e,[{key:"assertValidity",value:function(){var e=this.r,t=this.s;if(!X(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!X(t))throw new Error("Invalid Signature: s must be 0 < s < n")}},{key:"toDERRawBytes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return R(this.toDERHex(e))}},{key:"toDERHex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=_(I(this.s));if(e)return t;var r=_(I(this.r)),n=I(r.length/2),i=I(t.length/2),o=I(r.length/2+t.length/2+4);return"30".concat(o,"02").concat(n).concat(r,"02").concat(i).concat(t)}},{key:"toRawBytes",value:function(){return this.toDERRawBytes()}},{key:"toHex",value:function(){return this.toDERHex()}},{key:"toCompactRawBytes",value:function(){return R(this.toCompactHex())}},{key:"toCompactHex",value:function(){return C(this.r)+C(this.s)}}],[{key:"fromCompact",value:function(t){if("string"!==typeof t&&!(t instanceof Uint8Array))throw new TypeError("Signature.fromCompact: Expected string or Uint8Array");var r=t instanceof Uint8Array?M(t):t;if(128!==r.length)throw new Error("Signature.fromCompact: Expected 64-byte hex");var n=new e(P(r.slice(0,64)),P(r.slice(64,128)));return n.assertValidity(),n}},{key:"fromDER",value:function(t){var r="Signature.fromDER";if("string"!==typeof t&&!(t instanceof Uint8Array))throw new TypeError("".concat(r,": Expected string or Uint8Array"));var n=t instanceof Uint8Array?M(t):t,i=N(n.slice(2,4));if("30"!==n.slice(0,2)||i!==n.length-4||"02"!==n.slice(4,6))throw new Error("".concat(r,": Invalid signature ").concat(n));var o=N(n.slice(6,8)),a=8+o,s=n.slice(8,a);if(s.startsWith("00")&&N(s.slice(2,4))<=127)throw new Error("".concat(r,": Invalid r with trailing length"));var u=P(s);if("02"!==n.slice(a,a+2))throw new Error("".concat(r,": Invalid r-s separator"));var c=N(n.slice(a+2,a+4)),f=i-c-o-10;if(f>0||-4===f)throw new Error("".concat(r,": Invalid total length"));if(c>i-o-4)throw new Error("".concat(r,": Invalid s"));var l=a+4,h=n.slice(l,l+c);if(h.startsWith("00")&&N(h.slice(2,4))<=127)throw new Error("".concat(r,": Invalid s with trailing length"));var d=new e(u,P(h));return d.assertValidity(),d}},{key:"fromHex",value:function(e){return this.fromDER(e)}}]),e}(),x=A;function T(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(1===t.length)return t[0];for(var n=t.reduce((function(e,t){return e+t.length}),0),i=new Uint8Array(n),o=0,a=0;o<t.length;o++){var s=t[o];i.set(s,a),a+=s.length}return i}function M(e){for(var t="",r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}function C(e){return e.toString(16).padStart(64,"0")}function O(e){return R(C(e))}function I(e){var t=e.toString(16);return 1&t.length?"0".concat(t):t}function P(e){if("string"!==typeof e)throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt("0x".concat(e))}function R(e){if("string"!==typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");for(var t=new Uint8Array(e.length/2),r=0;r<t.length;r++){var n=2*r;t[r]=Number.parseInt(e.slice(n,n+2),16)}return t}function B(e){return e instanceof Uint8Array?e:R(e)}function D(e){return P(M(e))}function N(e){return 2*Number.parseInt(e,16)}function L(e){if("number"===typeof e&&e>0&&Number.isSafeInteger(e))return BigInt(e);if("bigint"===typeof e&&X(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.P,r=e%t;return r>=0?r:t+r}function U(e,t){for(var r=g.P,n=e;t-- >h;)n*=n,n%=r;return n}function F(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.P;if(e===h||t<=h)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));for(var r=j(e,t),n=t,i=h,o=d,a=d,s=h;r!==h;){var u=n/r,c=n%r,f=i-a*u,l=o-s*u;n=r,r=c,i=a,o=s,a=f,s=l}var p=n;if(p!==d)throw new Error("invert: does not exist");return j(i,t)}var K=function(e,t){return(e+t/p)/t},z=Math.pow(p,BigInt(128));function V(e){var t=g.n,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-d*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=K(o*e,t),s=K(-n*e,t),u=j(e-a*r-s*i,t),c=j(-a*n-s*o,t),f=u>z,l=c>z;if(f&&(u=t-u),l&&(c=t-c),u>z||c>z)throw new Error("splitScalarEndo: Endomorphism failed");return{k1neg:f,k1:u,k2neg:l,k2:c}}function H(e,t){if(null==e)throw new Error('sign: expected valid msgHash, not "'.concat(e,'"'));var r=O("string"===typeof e?P(e):D(e));return{h1:r,h1n:D(r),x:O(t),v:new Uint8Array(32).fill(1),k:new Uint8Array(32).fill(0),b0:Uint8Array.from([0]),b1:Uint8Array.from([1])}}function J(e,t){return q.apply(this,arguments)}function q(){return(q=Object(s.a)(o.a.mark((function e(t,r){var n,i,a,s,u,c,f,l,h,d,p,v;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Z(r),i=H(t,n),a=i.h1,s=i.h1n,u=i.x,c=i.v,f=i.k,l=i.b0,h=i.b1,d=me.hmacSha256,e.next=5,d(f,c,l,u,a);case 5:return f=e.sent,e.next=8,d(f,c);case 8:return c=e.sent,e.next=11,d(f,c,h,u,a);case 11:return f=e.sent,e.next=14,d(f,c);case 14:c=e.sent,p=0;case 16:if(!(p<1e3)){e.next=32;break}return e.next=19,d(f,c);case 19:if(c=e.sent,!(v=W(c,s,n))){e.next=23;break}return e.abrupt("return",v);case 23:return e.next=25,d(f,c,l);case 25:return f=e.sent,e.next=28,d(f,c);case 28:c=e.sent;case 29:p++,e.next=16;break;case 32:throw new TypeError("secp256k1: Tried 1,000 k values for sign(), all were invalid");case 33:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e,t){var r=Z(t),n=H(e,r),i=n.h1,o=n.h1n,a=n.x,s=n.v,u=n.k,c=n.b0,f=n.b1,l=me.hmacSha256Sync;if(!l)throw new Error("utils.hmacSha256Sync is undefined, you need to set it");if((u=l(u,s,c,a,i))instanceof Promise)throw new Error("To use sync sign(), ensure utils.hmacSha256 is sync");s=l(u,s),u=l(u,s,f,a,i),s=l(u,s);for(var h=0;h<1e3;h++){var d=W(s=l(u,s),o,r);if(d)return d;u=l(u,s,c),s=l(u,s)}throw new TypeError("secp256k1: Tried 1,000 k values for sign(), all were invalid")}function X(e){return 0<e&&e<g.n}function W(e,t,r){var n=D(e);if(X(n)){var i=g.n,o=E.BASE.multiply(n),a=j(o.x,i),s=j(F(n,i)*(t+a*r),i);if(a!==h&&s!==h)return[o,a,s]}}function Z(e){var t;if("bigint"===typeof e)t=e;else if("number"===typeof e&&Number.isSafeInteger(e)&&e>0)t=BigInt(e);else if("string"===typeof e){if(64!==e.length)throw new Error("Expected 32 bytes of private key");t=P(e)}else{if(!(e instanceof Uint8Array))throw new TypeError("Expected valid private key");if(32!==e.length)throw new Error("Expected 32 bytes of private key");t=D(e)}if(!X(t))throw new Error("Expected private key: 0 < key < n");return t}function Y(e){return e instanceof E?(e.assertValidity(),e):E.fromHex(e)}function Q(e){return e instanceof A?(e.assertValidity(),e):A.fromDER(e)}function $(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=E.fromPrivateKey(e);return"string"===typeof e?r.toHex(t):r.toRawBytes(t)}function ee(e,t,r){var n=E.fromSignature(e,t,r);return"string"===typeof e?n.toHex():n.toRawBytes()}function te(e){var t=e instanceof Uint8Array,r="string"===typeof e,n=(t||r)&&e.length;return t?33===n||65===n:r?66===n||130===n:e instanceof E}function re(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(te(e))throw new TypeError("getSharedSecret: first arg must be private key");if(!te(t))throw new TypeError("getSharedSecret: second arg must be public key");var n=Y(t);n.assertValidity();var i=n.multiply(Z(e));return"string"===typeof e?i.toHex(r):i.toRawBytes(r)}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Object(a.a)(e,3),i=n[0],o=n[1],s=n[2],u=t.canonical,c=t.der,f=t.recovered,l=(i.x===o?0:2)|Number(i.y&d),h=s,p=g.n>>d;s>p&&u&&(h=g.n-s,l^=1);var v=new A(o,h);v.assertValidity();var y=!1===c?v.toCompactHex():v.toDERHex(),b=r?y:R(y);return f?[b,l]:b}function ie(e,t){return oe.apply(this,arguments)}function oe(){return(oe=Object(s.a)(o.a.mark((function e(t,r){var n,i=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>2&&void 0!==i[2]?i[2]:{},e.t0=ne,e.next=4,J(t,r);case 4:return e.t1=e.sent,e.t2=n,e.t3="string"===typeof t,e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t3));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ne(G(e,t),r,"string"===typeof e)}function se(e,t,r){var n,i=g.n;try{n=Q(e)}catch(y){return!1}var o=n,a=o.r,s=o.s,u=function(e){"string"!==typeof e&&(e=M(e));var t=P(e||"0"),r=e.length/2*8-256;return r>0&&(t>>=BigInt(r)),t>=g.n&&(t-=g.n),t}(t);if(u===h)return!1;var c=k.fromAffine(Y(r)),f=F(s,i),l=j(u*f,i),d=j(a*f,i),p=k.BASE.multiply(l),v=c.multiplyUnsafe(d);return j(p.add(v).toAffine().x,i)===a}function ue(e){return ce.apply(this,arguments)}function ce(){return(ce=Object(s.a)(o.a.mark((function e(t){var r,n,i,a,s,u,c=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new Uint8Array(t.split("").map((function(e){return e.charCodeAt(0)}))),e.next=3,me.sha256(r);case 3:for(n=e.sent,i=c.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=c[s];return e.next=7,me.sha256(T.apply(void 0,[n,n].concat(a)));case 7:return u=e.sent,e.abrupt("return",D(u));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e,t,r){return le.apply(this,arguments)}function le(){return(le=Object(s.a)(o.a.mark((function e(t,r,n){var i,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=O(t),e.next=3,ue("BIP0340/challenge",i,r.toRawX(),n);case 3:return a=e.sent,e.abrupt("return",j(a,g.n));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e){return j(e.y,p)===h}var de=function(){function e(t,r){if(Object(u.a)(this,e),this.r=t,this.s=r,t<=h||r<=h||t>=g.P||r>=g.n)throw new Error("Invalid signature")}return Object(c.a)(e,[{key:"toHex",value:function(){return C(this.r)+C(this.s)}},{key:"toRawBytes",value:function(){return R(this.toHex())}}],[{key:"fromHex",value:function(t){var r=B(t);if(64!==r.length)throw new TypeError("SchnorrSignature.fromHex: expected 64 bytes, not ".concat(r.length));return new e(D(r.slice(0,32)),D(r.slice(32)))}}]),e}();function pe(){return(pe=Object(s.a)(o.a.mark((function e(t,r){var n,i,a,s,u,c,f,l,d,p,v,y,b,m,w,k=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=k.length>2&&void 0!==k[2]?k[2]:me.randomBytes(),null!=t){e.next=3;break}throw new TypeError('sign: Expected valid message, not "'.concat(t,'"'));case 3:if(r||(r=h),i=g.n,a=B(t),s=Z(r),32===(u=B(n)).length){e.next=10;break}throw new TypeError("sign: Expected 32 bytes of aux randomness");case 10:return c=E.fromPrivateKey(s),f=he(c)?s:i-s,e.next=14,ue("BIP0340/aux",u);case 14:return l=e.sent,d=f^l,e.next=18,ue("BIP0340/nonce",O(d),c.toRawX(),a);case 18:if(p=e.sent,(v=j(p,i))!==h){e.next=22;break}throw new Error("sign: Creation of signature failed. k is zero");case 22:return y=E.fromPrivateKey(v),b=he(y)?v:i-v,e.next=26,fe(y.x,c,a);case 26:return m=e.sent,w=new de(y.x,j(b+m*f,i)),e.next=30,ve(w.toRawBytes(),a,c.toRawX());case 30:if(e.sent){e.next=33;break}throw new Error("sign: Invalid signature produced");case 33:return e.abrupt("return","string"===typeof t?w.toHex():w.toRawBytes());case 34:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ve(e,t,r){return ye.apply(this,arguments)}function ye(){return(ye=Object(s.a)(o.a.mark((function e(t,r,n){var i,a,s,u,c,f,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t instanceof de?t:de.fromHex(t),a="string"===typeof r?R(r):r,s=Y(n),e.next=5,fe(i.r,s,a);case 5:if(u=e.sent,c=E.fromPrivateKey(i.s),f=s.multiply(u),!(l=c.subtract(f)).equals(E.BASE)&&he(l)&&l.x===i.r){e.next=11;break}return e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var be={Signature:de,getPublicKey:function(e){var t=E.fromPrivateKey(e);return"string"===typeof e?t.toHexX():t.toRawX()},sign:function(e,t){return pe.apply(this,arguments)},verify:ve};E.BASE._setWindowSize(8);var ge={node:l.a,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0},me={isValidPrivateKey:function(e){try{return Z(e),!0}catch(t){return!1}},randomBytes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(ge.web)return ge.web.getRandomValues(new Uint8Array(e));if(ge.node){var t=ge.node.randomBytes;return new Uint8Array(t(e).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:function(){for(var e=8;e--;){var t=me.randomBytes(32),r=D(t);if(X(r)&&r!==d)return t}throw new Error("Valid private key was not found in 8 iterations. PRNG is broken")},sha256:function(){var e=Object(s.a)(o.a.mark((function e(t){var r,n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ge.web){e.next=7;break}return e.next=3,ge.web.subtle.digest("SHA-256",t.buffer);case 3:return r=e.sent,e.abrupt("return",new Uint8Array(r));case 7:if(!ge.node){e.next=12;break}return n=ge.node.createHash,e.abrupt("return",Uint8Array.from(n("sha256").update(t).digest()));case 12:throw new Error("The environment doesn't have sha256 function");case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),hmacSha256:function(){var e=Object(s.a)(o.a.mark((function e(t){var r,i,a,s,u,c,f,l,h,d,p,v=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=v.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=v[a];if(!ge.web){e.next=12;break}return e.next=4,ge.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);case 4:return s=e.sent,u=T.apply(void 0,i),e.next=8,ge.web.subtle.sign("HMAC",s,u);case 8:return c=e.sent,e.abrupt("return",new Uint8Array(c));case 12:if(!ge.node){e.next=20;break}f=ge.node.createHmac,l=f("sha256",t),h=Object(n.a)(i);try{for(h.s();!(d=h.n()).done;)p=d.value,l.update(p)}catch(o){h.e(o)}finally{h.f()}return e.abrupt("return",Uint8Array.from(l.digest()));case 20:throw new Error("The environment doesn't have hmac-sha256 function");case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),sha256Sync:void 0,hmacSha256Sync:void 0,precompute:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.BASE,r=t===E.BASE?t:new E(t.x,t.y);return r._setWindowSize(e),r.multiply(v),r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DUMP_SESSION_KEYS=t.NOISE_MSG_MAX_LENGTH_BYTES_WITHOUT_TAG=t.NOISE_MSG_MAX_LENGTH_BYTES=void 0,t.NOISE_MSG_MAX_LENGTH_BYTES=65535,t.NOISE_MSG_MAX_LENGTH_BYTES_WITHOUT_TAG=t.NOISE_MSG_MAX_LENGTH_BYTES-16,t.DUMP_SESSION_KEYS=Object({NODE_ENV:"production",PUBLIC_URL:"/js-waku/eth-pm-wallet",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).DUMP_SESSION_KEYS},function(e,t,r){"use strict";var n=r(0),i=r(45),o=r(44),a=r(30),s=function(){var e=o(n.mark((function e(t,r){var o,s,u,c,f,l,h;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=!0,s=!1,e.prev=2,c=a(t);case 4:return e.next=6,i(c.next());case 6:return f=e.sent,o=f.done,e.next=10,i(f.value);case 10:if(l=e.sent,o){e.next=21;break}return h=l,e.next=15,i(r(h));case 15:if(!e.sent){e.next=18;break}return e.next=18,h;case 18:o=!0,e.next=4;break;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(2),s=!0,u=e.t0;case 27:if(e.prev=27,e.prev=28,o||null==c.return){e.next=32;break}return e.next=32,i(c.return());case 32:if(e.prev=32,!s){e.next=35;break}throw u;case 35:return e.finish(32);case 36:return e.finish(27);case 37:case"end":return e.stop()}}),e,null,[[2,23,27,37],[28,,32,36]])})));return function(t,r){return e.apply(this,arguments)}}();e.exports=s},function(e,t,r){"use strict";e.exports={DIAL_TIMEOUT:3e4,MAX_PARALLEL_DIALS:100,MAX_PER_PEER_DIALS:4,MAX_ADDRS_TO_DIAL:25,METRICS:{computeThrottleMaxQueueSize:1e3,computeThrottleTimeout:2e3,movingAverageIntervals:[6e4,3e5,9e5],maxOldPeersRetention:50}}},function(e,t,r){"use strict";e.exports={ADVERTISE_BOOT_DELAY:9e5,ADVERTISE_TTL:18e5,CIRCUIT_PROTO_CODE:290,HOP_METADATA_KEY:"hop_relay",HOP_METADATA_VALUE:"true",RELAY_RENDEZVOUS_NS:"/libp2p/relay"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.equals=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(42).Multiaddr,a=r(43),s=r(884),u=r(885).PeerRecord,c=r(886),f=c.ENVELOPE_DOMAIN_PEER_RECORD,l=c.ENVELOPE_PAYLOAD_TYPE_PEER_RECORD,h=function(){function e(t){var r=t.peerId,i=t.multiaddrs,o=void 0===i?[]:i,a=t.seqNumber,s=void 0===a?Date.now():a;n(this,e),this.domain=f,this.codec=l,this.peerId=r,this.multiaddrs=o,this.seqNumber=s,this._marshal=void 0}return i(e,[{key:"marshal",value:function(){return this._marshal||(this._marshal=u.encode({peerId:this.peerId.toBytes(),seq:this.seqNumber,addresses:this.multiaddrs.map((function(e){return{multiaddr:e.bytes}}))}).finish()),this._marshal}},{key:"equals",value:function(t){return t instanceof e&&(!!this.peerId.equals(t.peerId)&&(this.seqNumber===t.seqNumber&&!!s(this.multiaddrs,t.multiaddrs)))}}]),e}();h.createFromProtobuf=function(e){var t=u.decode(e),r=a.createFromBytes(t.peerId),n=(t.addresses||[]).map((function(e){return new o(e.multiaddr)})),i=Number(t.seq);return new h({peerId:r,multiaddrs:n,seqNumber:i})},h.DOMAIN=f,e.exports=h},function(e,t,r){"use strict";var n=r(42).Multiaddr,i=C("dns4"),o=C("dns6"),a=C("dnsaddr"),s=M(C("dns"),a,i,o),u=M(C("ip4"),C("ip6")),c=M(T(u,C("tcp")),T(s,C("tcp"))),f=T(u,C("udp")),l=T(f,C("utp")),h=T(f,C("quic")),d=M(T(c,C("ws")),T(s,C("ws"))),p=M(T(c,C("wss")),T(s,C("wss"))),v=M(T(c,C("http")),T(u,C("http")),T(s,C("http"))),y=M(T(c,C("https")),T(u,C("https")),T(s,C("https"))),b=M(T(d,C("p2p-webrtc-star"),C("p2p")),T(p,C("p2p-webrtc-star"),C("p2p")),T(d,C("p2p-webrtc-star")),T(p,C("p2p-webrtc-star"))),g=M(T(d,C("p2p-websocket-star"),C("p2p")),T(p,C("p2p-websocket-star"),C("p2p")),T(d,C("p2p-websocket-star")),T(p,C("p2p-websocket-star"))),m=M(T(v,C("p2p-webrtc-direct"),C("p2p")),T(y,C("p2p-webrtc-direct"),C("p2p")),T(v,C("p2p-webrtc-direct")),T(y,C("p2p-webrtc-direct"))),w=M(d,p,v,y,b,m,c,l,h,s),k=M(T(w,C("p2p-stardust"),C("p2p")),T(w,C("p2p-stardust"))),S=M(T(w,C("p2p")),b,m,C("p2p")),E=M(T(S,C("p2p-circuit"),S),T(S,C("p2p-circuit")),T(C("p2p-circuit"),S),T(w,C("p2p-circuit")),T(C("p2p-circuit"),w),C("p2p-circuit")),_=function e(){return M(T(E,e),E)}(),A=M(T(_,S,_),T(S,_),T(_,S),_,S);function x(e){return function(t){if(!n.isMultiaddr(t))try{t=new n(t)}catch(i){return!1}var r=e(t.protoNames());return null!==r&&(!0===r||!1===r?r:0===r.length)}}function T(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];function n(e){if(e.length<t.length)return null;var r=e;return t.some((function(t){return r="function"===typeof t?t().partialMatch(e):t.partialMatch(e),Array.isArray(r)&&(e=r),null===r})),r}return{toString:function(){return"{ "+t.join(" ")+" }"},input:t,matches:x(n),partialMatch:n}}function M(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];function n(e){var r=null;return t.some((function(t){var n="function"===typeof t?t().partialMatch(e):t.partialMatch(e);return!!n&&(r=n,!0)})),r}var i={toString:function(){return"{ "+t.join(" ")+" }"},input:t,matches:x(n),partialMatch:n};return i}function C(e){var t=e;return{toString:function(){return t},matches:function(e){var r;if("string"===typeof e||e instanceof Uint8Array)try{r=new n(e)}catch(o){return!1}else r=e;var i=r.protoNames();return 1===i.length&&i[0]===t},partialMatch:function(e){return 0===e.length?null:e[0]===t?e.slice(1):null}}}e.exports={DNS:s,DNS4:i,DNS6:o,DNSADDR:a,IP:u,TCP:c,UDP:f,QUIC:h,UTP:l,HTTP:v,HTTPS:y,WebSockets:d,WebSocketsSecure:p,WebSocketStar:g,WebRTCStar:b,WebRTCDirect:m,Reliable:w,Stardust:k,Circuit:_,P2P:A,IPFS:A}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(22),u=Object.assign(s("libp2p:circuit:stream-handler"),{error:s("libp2p:circuit:stream-handler:err")}),c=r(95),f=r(172),l=r(176).CircuitRelay,h=function(){function e(t){var r=t.stream,n=t.maxLength,i=void 0===n?4096:n;o(this,e),this.stream=r,this.shake=f(this.stream),this.decoder=c.decode.fromReader(this.shake.reader,{maxDataLength:i})}return a(e,[{key:"read",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decoder.next();case 2:if(!(t=e.sent).value){e.next=7;break}return r=l.decode(t.value.slice()),u("read message type",r.type),e.abrupt("return",r);case 7:u("read received no value, closing stream"),this.close();case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"write",value:function(e){u("write message type %s",e.type),this.shake.write(c.encode.single(l.encode(e).finish()))}},{key:"rest",value:function(){return this.shake.rest(),this.shake.stream}},{key:"end",value:function(e){this.write(e),this.close()}},{key:"close",value:function(){u("closing the stream"),this.rest().sink([])}}]),e}();e.exports=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(462);t.toString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.encoder.encode(e).substring(1)}},function(e,t,r){"use strict";var n=r(0),i=r(86),o=r(6),a=r(79),s=r(95),u=r(60),c=r(15),f=r(472),l=r(452),h=f("\n");t.encode=function(e){return s.encode.single(new a([e,h]))},t.write=function(e,r){return e.push(t.encode(r))},t.writeAll=function(e,r){e.push(r.reduce((function(e,r){return e.append(t.encode(r))}),new a))},t.read=function(){var e=o(n.mark((function e(t){var r,o,a,f,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=1,i(r={},Symbol.asyncIterator,(function(){return this})),i(r,"next",(function(){return t.next(o)})),a=r,f=function(e){o=e},e.next=5,u(a,s.decode({onLength:f}),l);case 5:if((d=e.sent).get(d.length-1)===h[0]){e.next=8;break}throw c(new Error("missing newline"),"ERR_INVALID_MULTISTREAM_SELECT_MESSAGE");case 8:return e.abrupt("return",d.shallowSlice(0,-1));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-crypto-keys"]||(n.roots["libp2p-crypto-keys"]={});s.KeyType=function(){var e={},t=Object.create(e);return t[e[0]="RSA"]=0,t[e[1]="Ed25519"]=1,t[e[2]="Secp256k1"]=2,t}(),s.PublicKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.Type=0,e.prototype.Data=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(8).int32(e.Type),t.uint32(18).bytes(e.Data),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PublicKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.Type=e.int32();break;case 2:n.Data=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw a.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw a.ProtocolError("missing required 'Data'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PublicKey)return e;var t=new s.PublicKey;switch(e.Type){case"RSA":case 0:t.Type=0;break;case"Ed25519":case 1:t.Type=1;break;case"Secp256k1":case 2:t.Type=2}return null!=e.Data&&("string"===typeof e.Data?a.base64.decode(e.Data,t.Data=a.newBuffer(a.base64.length(e.Data)),0):e.Data.length&&(t.Data=e.Data)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.Type=t.enums===String?"RSA":0,t.bytes===String?r.Data="":(r.Data=[],t.bytes!==Array&&(r.Data=a.newBuffer(r.Data)))),null!=e.Type&&e.hasOwnProperty("Type")&&(r.Type=t.enums===String?s.KeyType[e.Type]:e.Type),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?a.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),s.PrivateKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.Type=0,e.prototype.Data=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(8).int32(e.Type),t.uint32(18).bytes(e.Data),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PrivateKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.Type=e.int32();break;case 2:n.Data=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw a.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw a.ProtocolError("missing required 'Data'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PrivateKey)return e;var t=new s.PrivateKey;switch(e.Type){case"RSA":case 0:t.Type=0;break;case"Ed25519":case 1:t.Type=1;break;case"Secp256k1":case 2:t.Type=2}return null!=e.Data&&("string"===typeof e.Data?a.base64.decode(e.Data,t.Data=a.newBuffer(a.base64.length(e.Data)),0):e.Data.length&&(t.Data=e.Data)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.Type=t.enums===String?"RSA":0,t.bytes===String?r.Data="":(r.Data=[],t.bytes!==Array&&(r.Data=a.newBuffer(r.Data)))),null!=e.Type&&e.hasOwnProperty("Type")&&(r.Type=t.enums===String?s.KeyType[e.Type]:e.Type),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?a.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";r(34),r(114);var n=r(18),i=r(119).fromString,o=r(120).toString,a=r(215).concat;t.bigIntegerToUintBase64url=function(e,t){var r=Uint8Array.from(e.abs().toByteArray());if(r=0===r[0]?r.slice(1):r,null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=a([new Uint8Array(t-r.length),r])}return o(r,"base64url")},t.base64urlToBigInteger=function(e){var r=t.base64urlToBuffer(e);return new n.jsbn.BigInteger(o(r,"base16"),16)},t.base64urlToBuffer=function(e,t){var r=i(e,"base64urlpad");if(null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=a([new Uint8Array(t-r.length),r])}return r}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(63).base64,a=r(482);e.exports={export:function(){var e=i(n.mark((function e(t,r){var i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.create(),e.next=3,i.encrypt(t,r);case 3:return s=e.sent,e.abrupt("return",o.encode(s));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}},,,function(e,t){e.exports=n;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(x){}function n(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function i(e){return!0===(e&&e.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=i;var o={},a={};function s(e,t){var r,n,i;return t?(i=0<=(e>>>=0)&&e<256)&&(n=a[e])?n:(r=c(e,(0|e)<0?-1:0,!0),i&&(a[e]=r),r):(i=-128<=(e|=0)&&e<128)&&(n=o[e])?n:(r=c(e,e<0?-1:0,!1),i&&(o[e]=r),r)}function u(e,t){if(isNaN(e))return t?g:b;if(t){if(e<0)return g;if(e>=p)return E}else{if(e<=-v)return _;if(e+1>=v)return S}return e<0?u(-e,t).neg():c(e%d|0,e/d|0,t)}function c(e,t,r){return new n(e,t,r)}n.fromInt=s,n.fromNumber=u,n.fromBits=c;var f=Math.pow;function l(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return b;if("number"===typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return l(e.substring(1),t,r).neg();for(var i=u(f(r,8)),o=b,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+s),r);if(s<8){var h=u(f(r,s));o=o.mul(h).add(u(c))}else o=(o=o.mul(i)).add(u(c))}return o.unsigned=t,o}function h(e,t){return"number"===typeof e?u(e,t):"string"===typeof e?l(e,t):c(e.low,e.high,"boolean"===typeof t?t:e.unsigned)}n.fromString=l,n.fromValue=h;var d=4294967296,p=d*d,v=p/2,y=s(1<<24),b=s(0);n.ZERO=b;var g=s(0,!0);n.UZERO=g;var m=s(1);n.ONE=m;var w=s(1,!0);n.UONE=w;var k=s(-1);n.NEG_ONE=k;var S=c(-1,2147483647,!1);n.MAX_VALUE=S;var E=c(-1,-1,!0);n.MAX_UNSIGNED_VALUE=E;var _=c(0,-2147483648,!1);n.MIN_VALUE=_;var A=n.prototype;A.toInt=function(){return this.unsigned?this.low>>>0:this.low},A.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},A.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(_)){var t=u(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=u(f(e,6),this.unsigned),o=this,a="";;){var s=o.div(i),c=(o.sub(s.mul(i)).toInt()>>>0).toString(e);if((o=s).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},A.getHighBits=function(){return this.high},A.getHighBitsUnsigned=function(){return this.high>>>0},A.getLowBits=function(){return this.low},A.getLowBitsUnsigned=function(){return this.low>>>0},A.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},A.isZero=function(){return 0===this.high&&0===this.low},A.eqz=A.isZero,A.isNegative=function(){return!this.unsigned&&this.high<0},A.isPositive=function(){return this.unsigned||this.high>=0},A.isOdd=function(){return 1===(1&this.low)},A.isEven=function(){return 0===(1&this.low)},A.equals=function(e){return i(e)||(e=h(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&(this.high===e.high&&this.low===e.low)},A.eq=A.equals,A.notEquals=function(e){return!this.eq(e)},A.neq=A.notEquals,A.ne=A.notEquals,A.lessThan=function(e){return this.comp(e)<0},A.lt=A.lessThan,A.lessThanOrEqual=function(e){return this.comp(e)<=0},A.lte=A.lessThanOrEqual,A.le=A.lessThanOrEqual,A.greaterThan=function(e){return this.comp(e)>0},A.gt=A.greaterThan,A.greaterThanOrEqual=function(e){return this.comp(e)>=0},A.gte=A.greaterThanOrEqual,A.ge=A.greaterThanOrEqual,A.compare=function(e){if(i(e)||(e=h(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},A.comp=A.compare,A.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(m)},A.neg=A.negate,A.add=function(e){i(e)||(e=h(e));var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,a=e.high>>>16,s=65535&e.high,u=e.low>>>16,f=0,l=0,d=0,p=0;return d+=(p+=o+(65535&e.low))>>>16,l+=(d+=n+u)>>>16,f+=(l+=r+s)>>>16,f+=t+a,c((d&=65535)<<16|(p&=65535),(f&=65535)<<16|(l&=65535),this.unsigned)},A.subtract=function(e){return i(e)||(e=h(e)),this.add(e.neg())},A.sub=A.subtract,A.multiply=function(e){if(this.isZero())return b;if(i(e)||(e=h(e)),r)return c(r.mul(this.low,this.high,e.low,e.high),r.get_high(),this.unsigned);if(e.isZero())return b;if(this.eq(_))return e.isOdd()?_:b;if(e.eq(_))return this.isOdd()?_:b;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(y)&&e.lt(y))return u(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,f=65535&e.high,l=e.low>>>16,d=65535&e.low,p=0,v=0,g=0,m=0;return g+=(m+=a*d)>>>16,v+=(g+=o*d)>>>16,g&=65535,v+=(g+=a*l)>>>16,p+=(v+=n*d)>>>16,v&=65535,p+=(v+=o*l)>>>16,v&=65535,p+=(v+=a*f)>>>16,p+=t*d+n*l+o*f+a*s,c((g&=65535)<<16|(m&=65535),(p&=65535)<<16|(v&=65535),this.unsigned)},A.mul=A.multiply,A.divide=function(e){if(i(e)||(e=h(e)),e.isZero())throw Error("division by zero");var t,n,o;if(r)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?r.div_u:r.div_s)(this.low,this.high,e.low,e.high),r.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?g:b;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return g;if(e.gt(this.shru(1)))return w;o=g}else{if(this.eq(_))return e.eq(m)||e.eq(k)?_:e.eq(_)?m:(t=this.shr(1).div(e).shl(1)).eq(b)?e.isNegative()?m:k:(n=this.sub(e.mul(t)),o=t.add(n.div(e)));if(e.eq(_))return this.unsigned?g:b;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=b}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(t)/Math.LN2),s=a<=48?1:f(2,a-48),l=u(t),d=l.mul(e);d.isNegative()||d.gt(n);)d=(l=u(t-=s,this.unsigned)).mul(e);l.isZero()&&(l=m),o=o.add(l),n=n.sub(d)}return o},A.div=A.divide,A.modulo=function(e){return i(e)||(e=h(e)),r?c((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,e.low,e.high),r.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},A.mod=A.modulo,A.rem=A.modulo,A.not=function(){return c(~this.low,~this.high,this.unsigned)},A.and=function(e){return i(e)||(e=h(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},A.or=function(e){return i(e)||(e=h(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},A.xor=function(e){return i(e)||(e=h(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},A.shiftLeft=function(e){return i(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?c(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):c(0,this.low<<e-32,this.unsigned)},A.shl=A.shiftLeft,A.shiftRight=function(e){return i(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?c(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},A.shr=A.shiftRight,A.shiftRightUnsigned=function(e){if(i(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},A.shru=A.shiftRightUnsigned,A.shr_u=A.shiftRightUnsigned,A.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},A.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},A.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},A.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},A.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},,function(e,t,r){"use strict";t.codes={ERR_INVALID_SIGNATURE_POLICY:"ERR_INVALID_SIGNATURE_POLICY",ERR_UNHANDLED_SIGNATURE_POLICY:"ERR_UNHANDLED_SIGNATURE_POLICY",ERR_MISSING_SIGNATURE:"ERR_MISSING_SIGNATURE",ERR_MISSING_SEQNO:"ERR_MISSING_SEQNO",ERR_INVALID_SIGNATURE:"ERR_INVALID_SIGNATURE",ERR_UNEXPECTED_FROM:"ERR_UNEXPECTED_FROM",ERR_UNEXPECTED_SIGNATURE:"ERR_UNEXPECTED_SIGNATURE",ERR_UNEXPECTED_KEY:"ERR_UNEXPECTED_KEY",ERR_UNEXPECTED_SEQNO:"ERR_UNEXPECTED_SEQNO"}},function(e,t,r){"use strict";var n=r(205),i=r(15);e.exports=function(e){if(isNaN(e)||e<=0)throw i(new Error("random bytes length must be a Number bigger than 0"),"ERR_INVALID_LENGTH");return n(e)}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-crypto-keys"]||(n.roots["libp2p-crypto-keys"]={});s.KeyType=function(){var e={},t=Object.create(e);return t[e[0]="RSA"]=0,t[e[1]="Ed25519"]=1,t[e[2]="Secp256k1"]=2,t}(),s.PublicKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.Type=0,e.prototype.Data=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(8).int32(e.Type),t.uint32(18).bytes(e.Data),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PublicKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.Type=e.int32();break;case 2:n.Data=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw a.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw a.ProtocolError("missing required 'Data'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PublicKey)return e;var t=new s.PublicKey;switch(e.Type){case"RSA":case 0:t.Type=0;break;case"Ed25519":case 1:t.Type=1;break;case"Secp256k1":case 2:t.Type=2}return null!=e.Data&&("string"===typeof e.Data?a.base64.decode(e.Data,t.Data=a.newBuffer(a.base64.length(e.Data)),0):e.Data.length&&(t.Data=e.Data)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.Type=t.enums===String?"RSA":0,t.bytes===String?r.Data="":(r.Data=[],t.bytes!==Array&&(r.Data=a.newBuffer(r.Data)))),null!=e.Type&&e.hasOwnProperty("Type")&&(r.Type=t.enums===String?s.KeyType[e.Type]:e.Type),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?a.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),s.PrivateKey=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.Type=0,e.prototype.Data=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(8).int32(e.Type),t.uint32(18).bytes(e.Data),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PrivateKey;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.Type=e.int32();break;case 2:n.Data=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("Type"))throw a.ProtocolError("missing required 'Type'",{instance:n});if(!n.hasOwnProperty("Data"))throw a.ProtocolError("missing required 'Data'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PrivateKey)return e;var t=new s.PrivateKey;switch(e.Type){case"RSA":case 0:t.Type=0;break;case"Ed25519":case 1:t.Type=1;break;case"Secp256k1":case 2:t.Type=2}return null!=e.Data&&("string"===typeof e.Data?a.base64.decode(e.Data,t.Data=a.newBuffer(a.base64.length(e.Data)),0):e.Data.length&&(t.Data=e.Data)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.Type=t.enums===String?"RSA":0,t.bytes===String?r.Data="":(r.Data=[],t.bytes!==Array&&(r.Data=a.newBuffer(r.Data)))),null!=e.Type&&e.hasOwnProperty("Type")&&(r.Type=t.enums===String?s.KeyType[e.Type]:e.Type),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?a.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";r(34),r(114);var n=r(18),i=r(96).fromString,o=r(85).toString,a=r(180).concat;t.bigIntegerToUintBase64url=function(e,t){var r=Uint8Array.from(e.abs().toByteArray());if(r=0===r[0]?r.slice(1):r,null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=a([new Uint8Array(t-r.length),r])}return o(r,"base64url")},t.base64urlToBigInteger=function(e){var r=t.base64urlToBuffer(e);return new n.jsbn.BigInteger(o(r,"base16"),16)},t.base64urlToBuffer=function(e,t){var r=i(e,"base64urlpad");if(null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=a([new Uint8Array(t-r.length),r])}return r}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(63).base64,a=r(494);e.exports={export:function(){var e=i(n.mark((function e(t,r){var i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.create(),e.next=3,i.encrypt(t,r);case 3:return s=e.sent,e.abrupt("return",o.encode(s));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}},,function(e,t,r){"use strict";e.exports=r(1067)},function(e,t,r){"use strict";r.r(t),r.d(t,"batch",(function(){return k})),r.d(t,"buffer",(function(){return A})),r.d(t,"collect",(function(){return T})),r.d(t,"concat",(function(){return I})),r.d(t,"consume",(function(){return R})),r.d(t,"filter",(function(){return N})),r.d(t,"flatMap",(function(){return z})),r.d(t,"flatTransform",(function(){return V})),r.d(t,"flatten",(function(){return L})),r.d(t,"fromStream",(function(){return G})),r.d(t,"getIterator",(function(){return S})),r.d(t,"map",(function(){return K})),r.d(t,"merge",(function(){return X})),r.d(t,"parallelFlatMap",(function(){return $})),r.d(t,"parallelMap",(function(){return Q})),r.d(t,"parallelMerge",(function(){return ee})),r.d(t,"pipeline",(function(){return Z})),r.d(t,"reduce",(function(){return ie})),r.d(t,"take",(function(){return se})),r.d(t,"tap",(function(){return fe})),r.d(t,"time",(function(){return ve})),r.d(t,"transform",(function(){return ye})),r.d(t,"writeToStream",(function(){return me}));var n=r(51);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(25),a=r(74),s=r(0);function u(e,t){var r={},n=!1;function i(r,i){return n=!0,i=new Promise((function(t){t(e[r](i))})),{done:!1,value:t(i)}}return"function"===typeof Symbol&&Symbol.iterator&&(r[Symbol.iterator]=function(){return this}),r.next=function(e){return n?(n=!1,e):i("next",e)},"function"===typeof e.throw&&(r.throw=function(e){if(n)throw n=!1,e;return i("throw",e)}),"function"===typeof e.return&&(r.return=function(e){return n?(n=!1,e):i("return",e)}),r}function c(e){this.wrapped=e}function f(e){return new c(e)}function l(e){var t,r;function n(t,r){try{var o=e[t](r),a=o.value,s=a instanceof c;Promise.resolve(s?a.wrapped:a).then((function(e){s?n("return"===t?"return":"next",e):i(o.done?"return":"normal",e)}),(function(e){n("throw",e)}))}catch(u){i("throw",u)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,i){return new Promise((function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};r?r=r.next=s:(t=r=s,n(e,i))}))},"function"!==typeof e.return&&(this.return=void 0)}function h(e){return function(){return new l(e.apply(this,arguments))}}function d(e){var t;if("undefined"!==typeof Symbol){if(Symbol.asyncIterator&&null!=(t=e[Symbol.asyncIterator]))return t.call(e);if(Symbol.iterator&&null!=(t=e[Symbol.iterator]))return t.call(e)}throw new TypeError("Object is not async iterable")}"function"===typeof Symbol&&Symbol.asyncIterator&&(l.prototype[Symbol.asyncIterator]=function(){return this}),l.prototype.next=function(e){return this._invoke("next",e)},l.prototype.throw=function(e){return this._invoke("throw",e)},l.prototype.return=function(e){return this._invoke("return",e)};var p=s.mark(w),v=s.mark(_),y=s.mark(O),b=s.mark(ae),g=s.mark(pe);function m(){return(m=h(s.mark((function e(t,r){var n,i,o,a,u,c,l,h;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=[],i=!0,o=!1,e.prev=3,u=d(r);case 5:return e.next=7,f(u.next());case 7:return c=e.sent,i=c.done,e.next=11,f(c.value);case 11:if(l=e.sent,i){e.next=22;break}if(h=l,n.push(h),n.length!==t){e.next=19;break}return e.next=18,n;case 18:n=[];case 19:i=!0,e.next=5;break;case 22:e.next=28;break;case 24:e.prev=24,e.t0=e.catch(3),o=!0,a=e.t0;case 28:if(e.prev=28,e.prev=29,i||null==u.return){e.next=33;break}return e.next=33,f(u.return());case 33:if(e.prev=33,!o){e.next=36;break}throw a;case 36:return e.finish(33);case 37:return e.finish(28);case 38:if(!(n.length>0)){e.next=41;break}return e.next=41,n;case 41:case"end":return e.stop()}}),e,null,[[3,24,28,38],[29,,33,37]])})))).apply(this,arguments)}function w(e,t){var r,n,i,o;return s.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:r=[],n=Object(a.a)(t),s.prev=2,n.s();case 4:if((i=n.n()).done){s.next=13;break}if(o=i.value,r.push(o),r.length!==e){s.next=11;break}return s.next=10,r;case 10:r=[];case 11:s.next=4;break;case 13:s.next=18;break;case 15:s.prev=15,s.t0=s.catch(2),n.e(s.t0);case 18:return s.prev=18,n.f(),s.finish(18);case 21:if(!(r.length>0)){s.next=24;break}return s.next=24,r;case 24:case"end":return s.stop()}}),p,null,[[2,15,18,21]])}function k(e,t){return void 0===t?function(t){return k(e,t)}:t[Symbol.asyncIterator]?function(e,t){return m.apply(this,arguments)}(e,t):w(e,t)}function S(e){if("function"===typeof e.next)return e;if("function"===typeof e[Symbol.iterator])return e[Symbol.iterator]();if("function"===typeof e[Symbol.asyncIterator])return e[Symbol.asyncIterator]();throw new TypeError('"values" does not to conform to any of the iterator or iterable protocols')}function E(){var e,t;return{promise:new Promise((function(r,n){t=r,e=n})),reject:e,resolve:t}}function _(e,t){var r,n,i,o,u,c,f,l;return s.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:r=[],s.prev=1,i=Object(a.a)(t),s.prev=3,i.s();case 5:if((o=i.n()).done){s.next=14;break}if(u=o.value,r.push(u),!(r.length<=e)){s.next=10;break}return s.abrupt("continue",12);case 10:return s.next=12,r.shift();case 12:s.next=5;break;case 14:s.next=19;break;case 16:s.prev=16,s.t0=s.catch(3),i.e(s.t0);case 19:return s.prev=19,i.f(),s.finish(19);case 22:s.next=27;break;case 24:s.prev=24,s.t1=s.catch(1),n=s.t1;case 27:c=0,f=r;case 28:if(!(c<f.length)){s.next=35;break}return l=f[c],s.next=32,l;case 32:c++,s.next=28;break;case 35:if(!n){s.next=37;break}throw n;case 37:case"end":return s.stop()}}),v,null,[[1,24],[3,16,19,22]])}function A(e,t){return void 0===t?function(t){return A(e,t)}:0===e?t:t[Symbol.asyncIterator]?function(e,t){var r=S(t),n=[],a=[],u=!1,c=!1;function f(){for(;a.length>0&&n.length>0;){var e=a.shift(),t=n.shift(),r=t.error,i=t.value;r?e.reject(r):e.resolve({done:!1,value:i})}for(;a.length>0&&c;)(0,a.shift().resolve)({done:!0,value:void 0})}function l(){return h.apply(this,arguments)}function h(){return(h=Object(o.a)(s.mark((function t(){var i,o,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!c){t.next=2;break}return t.abrupt("return");case 2:if(!u){t.next=4;break}return t.abrupt("return");case 4:if(!(n.length>=e)){t.next=6;break}return t.abrupt("return");case 6:return u=!0,t.prev=7,t.next=10,r.next();case 10:i=t.sent,o=i.done,a=i.value,o?c=!0:n.push({value:a}),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(7),c=!0,n.push({error:t.t0});case 20:f(),u=!1,l();case 23:case"end":return t.stop()}}),t,null,[[7,16]])})))).apply(this,arguments)}function d(){return(d=Object(o.a)(s.mark((function e(){var t,r,i,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.length>0)){e.next=6;break}if(t=n.shift(),r=t.error,i=t.value,!r){e.next=4;break}throw r;case 4:return l(),e.abrupt("return",{done:!1,value:i});case 6:if(!c){e.next=8;break}return e.abrupt("return",{done:!0,value:void 0});case 8:return o=E(),a.push(o),l(),e.abrupt("return",o.promise);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var p=i({next:function(){return d.apply(this,arguments)}},Symbol.asyncIterator,(function(){return p}));return p}(e,t):_(e,t)}function x(){return(x=Object(o.a)(s.mark((function e(t){var r,n,i,o,a,u,c,f;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],n=!0,i=!1,e.prev=3,a=d(t);case 5:return e.next=7,a.next();case 7:return u=e.sent,n=u.done,e.next=11,u.value;case 11:if(c=e.sent,n){e.next=18;break}f=c,r.push(f);case 15:n=!0,e.next=5;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(3),i=!0,o=e.t0;case 24:if(e.prev=24,e.prev=25,n||null==a.return){e.next=29;break}return e.next=29,a.return();case 29:if(e.prev=29,!i){e.next=32;break}throw o;case 32:return e.finish(29);case 33:return e.finish(24);case 34:return e.abrupt("return",r);case 35:case"end":return e.stop()}}),e,null,[[3,20,24,34],[25,,29,33]])})))).apply(this,arguments)}function T(e){return e[Symbol.asyncIterator]?function(e){return x.apply(this,arguments)}(e):Array.from(e)}function M(e){return C.apply(this,arguments)}function C(){return(C=h(s.mark((function e(t){var r,n,i,o,a,c,l;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,n=!1,e.prev=2,o=d(t);case 4:return e.next=6,f(o.next());case 6:return a=e.sent,r=a.done,e.next=10,f(a.value);case 10:if(c=e.sent,r){e.next=17;break}return l=c,e.delegateYield(u(d(l),f),"t0",14);case 14:r=!0,e.next=4;break;case 17:e.next=23;break;case 19:e.prev=19,e.t1=e.catch(2),n=!0,i=e.t1;case 23:if(e.prev=23,e.prev=24,r||null==o.return){e.next=28;break}return e.next=28,f(o.return());case 28:if(e.prev=28,!n){e.next=31;break}throw i;case 31:return e.finish(28);case 32:return e.finish(23);case 33:case"end":return e.stop()}}),e,null,[[2,19,23,33],[24,,28,32]])})))).apply(this,arguments)}function O(e){var t,r,n;return s.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=Object(a.a)(e),i.prev=1,t.s();case 3:if((r=t.n()).done){i.next=8;break}return n=r.value,i.delegateYield(n,"t0",6);case 6:i.next=3;break;case 8:i.next=13;break;case 10:i.prev=10,i.t1=i.catch(1),t.e(i.t1);case 13:return i.prev=13,t.f(),i.finish(13);case 16:case"end":return i.stop()}}),y,null,[[1,10,13,16]])}function I(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.find((function(e){return void 0!==e[Symbol.asyncIterator]}));return n?M(t):O(t)}function P(){return(P=Object(o.a)(s.mark((function e(t){var r,n,i,o,a,u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,n=!1,e.prev=2,o=d(t);case 4:return e.next=6,o.next();case 6:return a=e.sent,r=a.done,e.next=10,a.value;case 10:if(u=e.sent,r){e.next=16;break}u;case 13:r=!0,e.next=4;break;case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(2),n=!0,i=e.t0;case 22:if(e.prev=22,e.prev=23,r||null==o.return){e.next=27;break}return e.next=27,o.return();case 27:if(e.prev=27,!n){e.next=30;break}throw i;case 30:return e.finish(27);case 31:return e.finish(22);case 32:case"end":return e.stop()}}),e,null,[[2,18,22,32],[23,,27,31]])})))).apply(this,arguments)}function R(e){if(e[Symbol.asyncIterator])return function(e){return P.apply(this,arguments)}(e);var t,r=Object(a.a)(e);try{for(r.s();!(t=r.n()).done;)t.value}catch(n){r.e(n)}finally{r.f()}}function B(e,t){return D.apply(this,arguments)}function D(){return(D=h(s.mark((function e(t,r){var n,i,o,a,u,c,l;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=!0,i=!1,e.prev=2,a=d(r);case 4:return e.next=6,f(a.next());case 6:return u=e.sent,n=u.done,e.next=10,f(u.value);case 10:if(c=e.sent,n){e.next=21;break}return l=c,e.next=15,f(t(l));case 15:if(!e.sent){e.next=18;break}return e.next=18,l;case 18:n=!0,e.next=4;break;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(2),i=!0,o=e.t0;case 27:if(e.prev=27,e.prev=28,n||null==a.return){e.next=32;break}return e.next=32,f(a.return());case 32:if(e.prev=32,!i){e.next=35;break}throw o;case 35:return e.finish(32);case 36:return e.finish(27);case 37:case"end":return e.stop()}}),e,null,[[2,23,27,37],[28,,32,36]])})))).apply(this,arguments)}function N(e,t){return void 0===t?function(t){return B(e,t)}:B(e,t)}function L(e){return j.apply(this,arguments)}function j(){return(j=h(s.mark((function e(t){var r,n,i,o,a,c,l;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,n=!1,e.prev=2,o=d(t);case 4:return e.next=6,f(o.next());case 6:return a=e.sent,r=a.done,e.next=10,f(a.value);case 10:if(c=e.sent,r){e.next=22;break}if(!(l=c)||"string"===typeof l||!l[Symbol.iterator]&&!l[Symbol.asyncIterator]){e.next=17;break}return e.delegateYield(u(d(L(l)),f),"t0",15);case 15:e.next=19;break;case 17:return e.next=19,l;case 19:r=!0,e.next=4;break;case 22:e.next=28;break;case 24:e.prev=24,e.t1=e.catch(2),n=!0,i=e.t1;case 28:if(e.prev=28,e.prev=29,r||null==o.return){e.next=33;break}return e.next=33,f(o.return());case 33:if(e.prev=33,!n){e.next=36;break}throw i;case 36:return e.finish(33);case 37:return e.finish(28);case 38:case"end":return e.stop()}}),e,null,[[2,24,28,38],[29,,33,37]])})))).apply(this,arguments)}function U(e,t){return F.apply(this,arguments)}function F(){return(F=h(s.mark((function e(t,r){var n,i,o,a,u,c,l;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=!0,i=!1,e.prev=2,a=d(r);case 4:return e.next=6,f(a.next());case 6:return u=e.sent,n=u.done,e.next=10,f(u.value);case 10:if(c=e.sent,n){e.next=18;break}return l=c,e.next=15,t(l);case 15:n=!0,e.next=4;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(2),i=!0,o=e.t0;case 24:if(e.prev=24,e.prev=25,n||null==a.return){e.next=29;break}return e.next=29,f(a.return());case 29:if(e.prev=29,!i){e.next=32;break}throw o;case 32:return e.finish(29);case 33:return e.finish(24);case 34:case"end":return e.stop()}}),e,null,[[2,20,24,34],[25,,29,33]])})))).apply(this,arguments)}function K(e,t){return void 0===t?function(t){return U(e,t)}:U(e,t)}function z(e,t){return void 0===t?function(t){return z(e,t)}:N((function(e){return void 0!==e&&null!==e}),L(K(e,t)))}function V(e,t,r){return void 0===t?function(t,r){return r?V(e,t,r):V(e,t)}:void 0===r?function(r){return V(e,t,r)}:N((function(e){return void 0!==e&&null!==e}),L(function(e,t,r){var n=S(r),a=[],u=[],c=!1,f=!1,l=0,h=null;function p(){for(;u.length>0&&a.length>0;)(0,u.shift().resolve)({done:!1,value:a.shift()});for(;u.length>0&&0===l&&c;){var e=u.shift(),t=e.resolve,r=e.reject;h?(r(h),h=null):t({done:!0,value:void 0})}}function v(){return y.apply(this,arguments)}function y(){return(y=Object(o.a)(s.mark((function t(){var r,i,o;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!c){t.next=3;break}return p(),t.abrupt("return");case 3:if(!f){t.next=5;break}return t.abrupt("return");case 5:if(!(l+a.length>=e)){t.next=7;break}return t.abrupt("return");case 7:return f=!0,l++,t.prev=9,t.next=12,n.next();case 12:r=t.sent,i=r.done,o=r.value,i?(c=!0,l--,p()):b(o),t.next=24;break;case 18:t.prev=18,t.t0=t.catch(9),c=!0,l--,h=t.t0,p();case 24:f=!1,v();case 26:case"end":return t.stop()}}),t,null,[[9,18]])})))).apply(this,arguments)}function b(e){return g.apply(this,arguments)}function g(){return(g=Object(o.a)(s.mark((function e(r){var n,i,o,u,f,y,b,g;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(r);case 3:if(!(n=e.sent)||!n[Symbol.asyncIterator]){e.next=40;break}i=!0,o=!1,e.prev=7,f=d(n);case 9:return e.next=11,f.next();case 11:return y=e.sent,i=y.done,e.next=15,y.value;case 15:if(b=e.sent,i){e.next=22;break}g=b,a.push(g);case 19:i=!0,e.next=9;break;case 22:e.next=28;break;case 24:e.prev=24,e.t0=e.catch(7),o=!0,u=e.t0;case 28:if(e.prev=28,e.prev=29,i||null==f.return){e.next=33;break}return e.next=33,f.return();case 33:if(e.prev=33,!o){e.next=36;break}throw u;case 36:return e.finish(33);case 37:return e.finish(28);case 38:e.next=41;break;case 40:a.push(n);case 41:e.next=47;break;case 43:e.prev=43,e.t1=e.catch(0),c=!0,h=e.t1;case 47:l--,p(),v();case 50:case"end":return e.stop()}}),e,null,[[0,43],[7,24,28,38],[29,,33,37]])})))).apply(this,arguments)}function m(){return(m=Object(o.a)(s.mark((function e(){var t,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==a.length){e.next=5;break}return t=E(),u.push(t),v(),e.abrupt("return",t.promise);case 5:return r=a.shift(),v(),e.abrupt("return",{done:!1,value:r});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var w=i({next:function(){return m.apply(this,arguments)}},Symbol.asyncIterator,(function(){return w}));return w}(e,t,r)))}function H(e){return J.apply(this,arguments)}function J(){return(J=Object(o.a)(s.mark((function e(t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){t.once("readable",(function(){e()}))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=h(s.mark((function e(t){var r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(r=t.read())){e.next=6;break}return e.next=5,r;case 5:return e.abrupt("continue",0);case 6:if(!t._readableState.ended){e.next=8;break}return e.abrupt("break",12);case 8:return e.next=10,f(H(t));case 10:e.next=0;break;case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e){return"function"===typeof e[Symbol.asyncIterator]?e:function(e){return q.apply(this,arguments)}(e)}function X(){return W.apply(this,arguments)}function W(){return(W=h(s.mark((function e(){var t,r,n,i,o,u,c,l,h=arguments;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=h.length,r=new Array(t),n=0;n<t;n++)r[n]=h[n];i=new Set(r.map(S));case 2:if(!(i.size>0)){e.next=29;break}o=Object(a.a)(i),e.prev=4,o.s();case 6:if((u=o.n()).done){e.next=19;break}return c=u.value,e.next=10,f(c.next());case 10:if(!(l=e.sent).done){e.next=15;break}i.delete(c),e.next=17;break;case 15:return e.next=17,l.value;case 17:e.next=6;break;case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(4),o.e(e.t0);case 24:return e.prev=24,o.f(),e.finish(24);case 27:e.next=2;break;case 29:case"end":return e.stop()}}),e,null,[[4,21,24,27]])})))).apply(this,arguments)}function Z(e){for(var t=e(),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];for(var o=0,a=n;o<a.length;o++){var s=a[o];t=s(t)}return t}function Y(){return(Y=h(s.mark((function e(t,r,n){var i,o,a,u,c,l,p,v;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=null,o=function(e){return{value:r(e)}},a=function(){var e=h(s.mark((function e(t){var r,n,o,a,u,c,l;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,n=!1,e.prev=2,a=d(t);case 4:return e.next=6,f(a.next());case 6:return u=e.sent,r=u.done,e.next=10,f(u.value);case 10:if(c=e.sent,r){e.next=20;break}if(l=c,!i){e.next=15;break}return e.abrupt("return");case 15:return e.next=17,l;case 17:r=!0,e.next=4;break;case 20:e.next=26;break;case 22:e.prev=22,e.t0=e.catch(2),n=!0,o=e.t0;case 26:if(e.prev=26,e.prev=27,r||null==a.return){e.next=31;break}return e.next=31,f(a.return());case 31:if(e.prev=31,!n){e.next=34;break}throw o;case 34:return e.finish(31);case 35:return e.finish(26);case 36:case"end":return e.stop()}}),e,null,[[2,22,26,36],[27,,31,35]])})));return function(t){return e.apply(this,arguments)}}(),u=Z((function(){return n}),A(1),a,K(o),A(t-1)),c=S(u);case 5:return e.next=8,f(c.next());case 8:if(l=e.sent,p=l.value,!l.done){e.next=13;break}return e.abrupt("break",27);case 13:return e.prev=13,e.next=16,f(p.value);case 16:if(v=e.sent,i){e.next=20;break}return e.next=20,v;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(13),i=e.t0;case 25:e.next=5;break;case 27:if(!i){e.next=29;break}throw i;case 29:case"end":return e.stop()}}),e,null,[[13,22]])})))).apply(this,arguments)}function Q(e,t,r){return void 0===t?function(t,r){return Q(e,t,r)}:void 0===r?function(r){return Q(e,t,r)}:1===e?K(t,r):function(e,t,r){return Y.apply(this,arguments)}(e,t,r)}function $(e,t,r){return void 0===t?function(t,r){return r?$(e,t,r):$(e,t)}:void 0===r?function(r){return $(e,t,r)}:N((function(e){return void 0!==e&&null!==e}),L(Q(e,t,r)))}function ee(){return te.apply(this,arguments)}function te(){return(te=h(s.mark((function e(){var t,r,i,u,c,l,h,d,p,v,y,b,g,m,w,k,E,_,A,x,T,M=arguments;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=M.length,r=new Array(t),i=0;i<t;i++)r[i]=M[i];u=r.map(S),c=new Set,l=new Map,h=null,d=null,p=null,v=function(e){h=e,d&&d(e)},y=function(e){p&&p(e)},b=function(){return new Promise((function(e,t){if(h&&t(h),l.size>0)return e();p=e,d=t}))},g=function(e){var t=Promise.resolve(e.next()).then(function(){var r=Object(o.a)(s.mark((function r(n){var i,o;return s.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=n.done,o=n.value,i||l.set(e,o),c.delete(t);case 3:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}());c.add(t),t.then(y,v)},m=Object(a.a)(u);try{for(m.s();!(w=m.n()).done;)k=w.value,g(k)}catch(C){m.e(C)}finally{m.f()}case 13:if(0!==c.size||0!==l.size){e.next=16;break}return e.abrupt("return");case 16:return e.next=18,f(b());case 18:E=Object(a.a)(l),e.prev=19,E.s();case 21:if((_=E.n()).done){e.next=29;break}return A=Object(n.a)(_.value,2),x=A[0],T=A[1],l.delete(x),e.next=26,T;case 26:g(x);case 27:e.next=21;break;case 29:e.next=34;break;case 31:e.prev=31,e.t0=e.catch(19),E.e(e.t0);case 34:return e.prev=34,E.f(),e.finish(34);case 37:e.next=13;break;case 39:case"end":return e.stop()}}),e,null,[[19,31,34,37]])})))).apply(this,arguments)}function re(e,t,r){return ne.apply(this,arguments)}function ne(){return(ne=Object(o.a)(s.mark((function e(t,r,n){var i,o,a,u,c,f,l,h;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r,o=!0,a=!1,e.prev=3,c=d(n);case 5:return e.next=7,c.next();case 7:return f=e.sent,o=f.done,e.next=11,f.value;case 11:if(l=e.sent,o){e.next=20;break}return h=l,e.next=16,t(i,h);case 16:i=e.sent;case 17:o=!0,e.next=5;break;case 20:e.next=26;break;case 22:e.prev=22,e.t0=e.catch(3),a=!0,u=e.t0;case 26:if(e.prev=26,e.prev=27,o||null==c.return){e.next=31;break}return e.next=31,c.return();case 31:if(e.prev=31,!a){e.next=34;break}throw u;case 34:return e.finish(31);case 35:return e.finish(26);case 36:return e.abrupt("return",i);case 37:case"end":return e.stop()}}),e,null,[[3,22,26,36],[27,,31,35]])})))).apply(this,arguments)}function ie(e,t,r){return void 0===t?function(t,r){return r?re(e,t,r):ie(e,t)}:void 0===r?function(r){return ie(e,t,r)}:re(e,t,r)}function oe(){return(oe=h(s.mark((function e(t,r){var n,i,o,a,u,c,l,h;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0,i=!0,o=!1,e.prev=3,u=d(r);case 5:return e.next=7,f(u.next());case 7:return c=e.sent,i=c.done,e.next=11,f(c.value);case 11:if(l=e.sent,i){e.next=22;break}return h=l,e.next=16,h;case 16:if(!(++n>=t)){e.next=19;break}return e.abrupt("break",22);case 19:i=!0,e.next=5;break;case 22:e.next=28;break;case 24:e.prev=24,e.t0=e.catch(3),o=!0,a=e.t0;case 28:if(e.prev=28,e.prev=29,i||null==u.return){e.next=33;break}return e.next=33,f(u.return());case 33:if(e.prev=33,!o){e.next=36;break}throw a;case 36:return e.finish(33);case 37:return e.finish(28);case 38:case"end":return e.stop()}}),e,null,[[3,24,28,38],[29,,33,37]])})))).apply(this,arguments)}function ae(e,t){var r,n,i,o;return s.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:r=0,n=Object(a.a)(t),s.prev=2,n.s();case 4:if((i=n.n()).done){s.next=13;break}return o=i.value,s.next=8,o;case 8:if(!(++r>=e)){s.next=11;break}return s.abrupt("break",13);case 11:s.next=4;break;case 13:s.next=18;break;case 15:s.prev=15,s.t0=s.catch(2),n.e(s.t0);case 18:return s.prev=18,n.f(),s.finish(18);case 21:case"end":return s.stop()}}),b,null,[[2,15,18,21]])}function se(e,t){return void 0===t?function(t){return se(e,t)}:t[Symbol.asyncIterator]?function(e,t){return oe.apply(this,arguments)}(e,t):ae(e,t)}function ue(e,t){return ce.apply(this,arguments)}function ce(){return(ce=h(s.mark((function e(t,r){var n,i,o,a,u,c,l;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=!0,i=!1,e.prev=2,a=d(r);case 4:return e.next=6,f(a.next());case 6:return u=e.sent,n=u.done,e.next=10,f(u.value);case 10:if(c=e.sent,n){e.next=20;break}return l=c,e.next=15,f(t(l));case 15:return e.next=17,l;case 17:n=!0,e.next=4;break;case 20:e.next=26;break;case 22:e.prev=22,e.t0=e.catch(2),i=!0,o=e.t0;case 26:if(e.prev=26,e.prev=27,n||null==a.return){e.next=31;break}return e.next=31,f(a.return());case 31:if(e.prev=31,!i){e.next=34;break}throw o;case 34:return e.finish(31);case 35:return e.finish(26);case 36:case"end":return e.stop()}}),e,null,[[2,22,26,36],[27,,31,35]])})))).apply(this,arguments)}function fe(e,t){return void 0===t?function(t){return ue(e,t)}:ue(e,t)}function le(e,t){var r=e[0]+t[0],n=e[1]+t[1];if(n>=1e9){var i=n%1e9;r+=(n-i)/1e9,n=i}return[r,n]}function he(e,t){return de.apply(this,arguments)}function de(){return(de=h(s.mark((function e(t,r){var n,i,o,a,u,c,l;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r[Symbol.asyncIterator](),i=[0,0];case 2:return o=process.hrtime(),e.next=6,f(n.next());case 6:if(a=e.sent,u=a.value,c=a.done,l=process.hrtime(o),i=le(i,l),t.progress&&t.progress(l,i),!c){e.next=15;break}return t.total&&t.total(i),e.abrupt("return",u);case 15:return e.next=17,u;case 17:e.next=2;break;case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pe(e,t){var r,n,i,o,a,u,c;return s.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:r=t[Symbol.iterator](),n=[0,0];case 2:if(i=process.hrtime(),o=r.next(),a=o.value,u=o.done,c=process.hrtime(i),n=le(n,c),e.progress&&e.progress(c,n),!u){s.next=11;break}return e.total&&e.total(n),s.abrupt("return",a);case 11:return s.next=13,a;case 13:s.next=2;break;case 15:case"end":return s.stop()}}),g)}function ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return void 0===t?function(t){return ve(e,t)}:void 0!==t[Symbol.asyncIterator]?he(e,t):pe(e,t)}function ye(e,t,r){return void 0===t?function(t,r){return r?ye(e,t,r):ye(e,t)}:void 0===r?function(r){return ye(e,t,r)}:function(e,t,r){var n=S(r),a=[],u=[],c=!1,f=!1,l=0,h=null;function d(){for(;u.length>0&&a.length>0;)(0,u.shift().resolve)({done:!1,value:a.shift()});for(;u.length>0&&0===l&&c;){var e=u.shift(),t=e.resolve,r=e.reject;h?(r(h),h=null):t({done:!0,value:void 0})}}function p(){return v.apply(this,arguments)}function v(){return(v=Object(o.a)(s.mark((function t(){var r,i,o;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!c){t.next=3;break}return d(),t.abrupt("return");case 3:if(!f){t.next=5;break}return t.abrupt("return");case 5:if(!(l+a.length>=e)){t.next=7;break}return t.abrupt("return");case 7:return f=!0,l++,t.prev=9,t.next=12,n.next();case 12:r=t.sent,i=r.done,o=r.value,i?(c=!0,l--,d()):y(o),t.next=24;break;case 18:t.prev=18,t.t0=t.catch(9),c=!0,l--,h=t.t0,d();case 24:f=!1,p();case 26:case"end":return t.stop()}}),t,null,[[9,18]])})))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=Object(o.a)(s.mark((function e(r){var n;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(r);case 3:n=e.sent,a.push(n),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),c=!0,h=e.t0;case 11:l--,d(),p();case 14:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function g(){return(g=Object(o.a)(s.mark((function e(){var t,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==a.length){e.next=5;break}return t=E(),u.push(t),p(),e.abrupt("return",t.promise);case 5:return r=a.shift(),p(),e.abrupt("return",{done:!1,value:r});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var m=i({next:function(){return g.apply(this,arguments)}},Symbol.asyncIterator,(function(){return m}));return m}(e,t,r)}function be(e,t){return ge.apply(this,arguments)}function ge(){return(ge=Object(o.a)(s.mark((function e(t,r){var n,i,o,a,u,c,f,l,h,p,v,y,b,g;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=null,i=null,o=null,a=function(e){n=e,i&&i(e)},u=function(){o&&o()},c=function(){t.removeListener("error",a),t.removeListener("drain",u)},t.once("error",a),f=function(){return new Promise((function(e,r){if(n)return r(n);t.once("drain",u),o=e,i=r}))},l=!0,h=!1,e.prev=10,v=d(r);case 12:return e.next=14,v.next();case 14:return y=e.sent,l=y.done,e.next=18,y.value;case 18:if(b=e.sent,l){e.next=29;break}if(g=b,!1!==t.write(g)){e.next=24;break}return e.next=24,f();case 24:if(!n){e.next=26;break}return e.abrupt("break",29);case 26:l=!0,e.next=12;break;case 29:e.next=35;break;case 31:e.prev=31,e.t0=e.catch(10),h=!0,p=e.t0;case 35:if(e.prev=35,e.prev=36,l||null==v.return){e.next=40;break}return e.next=40,v.return();case 40:if(e.prev=40,!h){e.next=43;break}throw p;case 43:return e.finish(40);case 44:return e.finish(35);case 45:if(c(),!n){e.next=48;break}throw n;case 48:case"end":return e.stop()}}),e,null,[[10,31,35,45],[36,,40,44]])})))).apply(this,arguments)}function me(e,t){return void 0===t?function(t){return be(e,t)}:be(e,t)}},function(e,t,r){"use strict";for(var n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",i={},o=0;o<n.length;o++){var a=n.charAt(o);if(void 0!==i[a])throw new TypeError(a+" is ambiguous");i[a]=o}function s(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function u(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=s(t)^n>>5}for(t=s(t),r=0;r<e.length;++r){var i=e.charCodeAt(r);t=s(t)^31&i}return t}function c(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var o=(e=r).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var a=e.slice(0,o),c=e.slice(o+1);if(c.length<6)return"Data too short";var f=u(a);if("string"===typeof f)return f;for(var l=[],h=0;h<c.length;++h){var d=c.charAt(h),p=i[d];if(void 0===p)return"Unknown character "+d;f=s(f)^p,h+6>=c.length||l.push(p)}return 1!==f?"Invalid checksum for "+e:{prefix:a,words:l}}function f(e,t,r,n){for(var i=0,o=0,a=(1<<r)-1,s=[],u=0;u<e.length;++u)for(i=i<<t|e[u],o+=t;o>=r;)o-=r,s.push(i>>o&a);if(n)o>0&&s.push(i<<r-o&a);else{if(o>=t)return"Excess padding";if(i<<r-o&a)return"Non-zero padding"}return s}e.exports={decodeUnsafe:function(){var e=c.apply(null,arguments);if("object"===typeof e)return e},decode:function(e){var t=c.apply(null,arguments);if("object"===typeof t)return t;throw new Error(t)},encode:function(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");var i=u(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var o=e+"1",a=0;a<t.length;++a){var c=t[a];if(c>>5!==0)throw new Error("Non 5-bit word");i=s(i)^c,o+=n.charAt(c)}for(a=0;a<6;++a)i=s(i);for(i^=1,a=0;a<6;++a){o+=n.charAt(i>>5*(5-a)&31)}return o},toWordsUnsafe:function(e){var t=f(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=f(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=f(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=f(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=r.n(o),s=(r(24),r(38)),u=r(16),c=r(35),f=r(70),l=r(19),h=r(222),d=r(102),p=r(100),v=r(184),y=r(124),b=r(148);function g(e,t){var r=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){r[e.key]=function(e){return t&&Object(o.isValidElement)(e)?t(e):e}(e)})),r}function m(e,t,r){return null!=r[t]?r[t]:e.props[t]}function w(e,t,r){var n=g(e.children),i=function(e,t){function r(r){return r in t?t[r]:e[r]}e=e||{},t=t||{};var n,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in t){if(i[u])for(n=0;n<i[u].length;n++){var c=i[u][n];s[i[u][n]]=r(c)}s[u]=r(u)}for(n=0;n<o.length;n++)s[o[n]]=r(o[n]);return s}(t,n);return Object.keys(i).forEach((function(a){var s=i[a];if(Object(o.isValidElement)(s)){var u=a in t,c=a in n,f=t[a],l=Object(o.isValidElement)(f)&&!f.props.in;!c||u&&!l?c||!u||l?c&&u&&Object(o.isValidElement)(f)&&(i[a]=Object(o.cloneElement)(s,{onExited:r.bind(null,s),in:f.props.in,exit:m(s,"exit",e),enter:m(s,"enter",e)})):i[a]=Object(o.cloneElement)(s,{in:!1}):i[a]=Object(o.cloneElement)(s,{onExited:r.bind(null,s),in:!0,exit:m(s,"exit",e),enter:m(s,"enter",e)})}})),i}var k=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},S=function(e){function t(t,r){var n,i=(n=e.call(this,t,r)||this).handleExited.bind(Object(v.a)(n));return n.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},n}Object(y.a)(t,e);var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var r,n,i=t.children,a=t.handleExited;return{children:t.firstRender?(r=e,n=a,g(r.children,(function(e){return Object(o.cloneElement)(e,{onExited:n.bind(null,e),in:!0,appear:m(e,"appear",r),enter:m(e,"enter",r),exit:m(e,"exit",r)})}))):w(e,i,a),firstRender:!1}},r.handleExited=function(e,t){var r=g(this.props.children);e.key in r||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var r=Object(n.a)({},t.children);return delete r[e.key],{children:r}})))},r.render=function(){var e=this.props,t=e.component,r=e.childFactory,n=Object(p.a)(e,["component","childFactory"]),i=this.state.contextValue,o=k(this.state.children).map(r);return delete n.appear,delete n.enter,delete n.exit,null===t?a.a.createElement(b.a.Provider,{value:i},o):a.a.createElement(b.a.Provider,{value:i},a.a.createElement(t,n,o))},t}(a.a.Component);S.propTypes={},S.defaultProps={component:"div",childFactory:function(e){return e}};var E=S,_="undefined"===typeof window?o.useEffect:o.useLayoutEffect;var A=function(e){var t=e.classes,r=e.pulsate,n=void 0!==r&&r,i=e.rippleX,a=e.rippleY,s=e.rippleSize,c=e.in,l=e.onExited,h=void 0===l?function(){}:l,d=e.timeout,p=o.useState(!1),v=p[0],y=p[1],b=Object(u.a)(t.ripple,t.rippleVisible,n&&t.ripplePulsate),g={width:s,height:s,top:-s/2+a,left:-s/2+i},m=Object(u.a)(t.child,v&&t.childLeaving,n&&t.childPulsate),w=Object(f.a)(h);return _((function(){if(!c){y(!0);var e=setTimeout(w,d);return function(){clearTimeout(e)}}}),[w,c,d]),o.createElement("span",{className:b,style:g},o.createElement("span",{className:m}))},x=o.forwardRef((function(e,t){var r=e.center,a=void 0!==r&&r,s=e.classes,c=e.className,f=Object(i.a)(e,["center","classes","className"]),l=o.useState([]),h=l[0],p=l[1],v=o.useRef(0),y=o.useRef(null);o.useEffect((function(){y.current&&(y.current(),y.current=null)}),[h]);var b=o.useRef(!1),g=o.useRef(null),m=o.useRef(null),w=o.useRef(null);o.useEffect((function(){return function(){clearTimeout(g.current)}}),[]);var k=o.useCallback((function(e){var t=e.pulsate,r=e.rippleX,n=e.rippleY,i=e.rippleSize,a=e.cb;p((function(e){return[].concat(Object(d.a)(e),[o.createElement(A,{key:v.current,classes:s,timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:i})])})),v.current+=1,y.current=a}),[s]),S=o.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.pulsate,i=void 0!==n&&n,o=t.center,s=void 0===o?a||t.pulsate:o,u=t.fakeElement,c=void 0!==u&&u;if("mousedown"===e.type&&b.current)b.current=!1;else{"touchstart"===e.type&&(b.current=!0);var f,l,h,d=c?null:w.current,p=d?d.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)f=Math.round(p.width/2),l=Math.round(p.height/2);else{var v=e.touches?e.touches[0]:e,y=v.clientX,S=v.clientY;f=Math.round(y-p.left),l=Math.round(S-p.top)}if(s)(h=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(h+=1);else{var E=2*Math.max(Math.abs((d?d.clientWidth:0)-f),f)+2,_=2*Math.max(Math.abs((d?d.clientHeight:0)-l),l)+2;h=Math.sqrt(Math.pow(E,2)+Math.pow(_,2))}e.touches?null===m.current&&(m.current=function(){k({pulsate:i,rippleX:f,rippleY:l,rippleSize:h,cb:r})},g.current=setTimeout((function(){m.current&&(m.current(),m.current=null)}),80)):k({pulsate:i,rippleX:f,rippleY:l,rippleSize:h,cb:r})}}),[a,k]),_=o.useCallback((function(){S({},{pulsate:!0})}),[S]),x=o.useCallback((function(e,t){if(clearTimeout(g.current),"touchend"===e.type&&m.current)return e.persist(),m.current(),m.current=null,void(g.current=setTimeout((function(){x(e,t)})));m.current=null,p((function(e){return e.length>0?e.slice(1):e})),y.current=t}),[]);return o.useImperativeHandle(t,(function(){return{pulsate:_,start:S,stop:x}}),[_,S,x]),o.createElement("span",Object(n.a)({className:Object(u.a)(s.root,c),ref:w},f),o.createElement(E,{component:null,exit:!0},h))})),T=Object(l.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(o.memo(x)),M=o.forwardRef((function(e,t){var r=e.action,a=e.buttonRef,l=e.centerRipple,d=void 0!==l&&l,p=e.children,v=e.classes,y=e.className,b=e.component,g=void 0===b?"button":b,m=e.disabled,w=void 0!==m&&m,k=e.disableRipple,S=void 0!==k&&k,E=e.disableTouchRipple,_=void 0!==E&&E,A=e.focusRipple,x=void 0!==A&&A,M=e.focusVisibleClassName,C=e.onBlur,O=e.onClick,I=e.onFocus,P=e.onFocusVisible,R=e.onKeyDown,B=e.onKeyUp,D=e.onMouseDown,N=e.onMouseLeave,L=e.onMouseUp,j=e.onTouchEnd,U=e.onTouchMove,F=e.onTouchStart,K=e.onDragLeave,z=e.tabIndex,V=void 0===z?0:z,H=e.TouchRippleProps,J=e.type,q=void 0===J?"button":J,G=Object(i.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),X=o.useRef(null);var W=o.useRef(null),Z=o.useState(!1),Y=Z[0],Q=Z[1];w&&Y&&Q(!1);var $=Object(h.a)(),ee=$.isFocusVisible,te=$.onBlurVisible,re=$.ref;function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;return Object(f.a)((function(n){return t&&t(n),!r&&W.current&&W.current[e](n),!0}))}o.useImperativeHandle(r,(function(){return{focusVisible:function(){Q(!0),X.current.focus()}}}),[]),o.useEffect((function(){Y&&x&&!S&&W.current.pulsate()}),[S,x,Y]);var ie=ne("start",D),oe=ne("stop",K),ae=ne("stop",L),se=ne("stop",(function(e){Y&&e.preventDefault(),N&&N(e)})),ue=ne("start",F),ce=ne("stop",j),fe=ne("stop",U),le=ne("stop",(function(e){Y&&(te(e),Q(!1)),C&&C(e)}),!1),he=Object(f.a)((function(e){X.current||(X.current=e.currentTarget),ee(e)&&(Q(!0),P&&P(e)),I&&I(e)})),de=function(){var e=s.findDOMNode(X.current);return g&&"button"!==g&&!("A"===e.tagName&&e.href)},pe=o.useRef(!1),ve=Object(f.a)((function(e){x&&!pe.current&&Y&&W.current&&" "===e.key&&(pe.current=!0,e.persist(),W.current.stop(e,(function(){W.current.start(e)}))),e.target===e.currentTarget&&de()&&" "===e.key&&e.preventDefault(),R&&R(e),e.target===e.currentTarget&&de()&&"Enter"===e.key&&!w&&(e.preventDefault(),O&&O(e))})),ye=Object(f.a)((function(e){x&&" "===e.key&&W.current&&Y&&!e.defaultPrevented&&(pe.current=!1,e.persist(),W.current.stop(e,(function(){W.current.pulsate(e)}))),B&&B(e),O&&e.target===e.currentTarget&&de()&&" "===e.key&&!e.defaultPrevented&&O(e)})),be=g;"button"===be&&G.href&&(be="a");var ge={};"button"===be?(ge.type=q,ge.disabled=w):("a"===be&&G.href||(ge.role="button"),ge["aria-disabled"]=w);var me=Object(c.a)(a,t),we=Object(c.a)(re,X),ke=Object(c.a)(me,we),Se=o.useState(!1),Ee=Se[0],_e=Se[1];o.useEffect((function(){_e(!0)}),[]);var Ae=Ee&&!S&&!w;return o.createElement(be,Object(n.a)({className:Object(u.a)(v.root,y,Y&&[v.focusVisible,M],w&&v.disabled),onBlur:le,onClick:O,onFocus:he,onKeyDown:ve,onKeyUp:ye,onMouseDown:ie,onMouseLeave:se,onMouseUp:ae,onDragLeave:oe,onTouchEnd:ce,onTouchMove:fe,onTouchStart:ue,ref:ke,tabIndex:w?-1:V},ge,G),p,Ae?o.createElement(T,Object(n.a)({ref:W,center:d},H)):null)}));t.a=Object(l.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(M)},,,,,,function(e,t,r){(function(e){!function(t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};function n(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&r.path)}},r.exports),r.exports}var i=n((function(e){!function(t){for(var r=[null,0,{}],n=10,i=44032,o=4352,a=4449,s=4519,u=19,c=21,f=28,l=c*f,h=u*l,d=function(e,t){this.codepoint=e,this.feature=t},p={},v=[],y=0;y<=255;++y)v[y]=0;var b=[function(e,t,n){return t<60||13311<t&&t<42607?new d(t,r):e(t,n)},function(e,t,r){var i=p[t];return i||(i=e(t,r)).feature&&++v[t>>8&255]>n&&(p[t]=i),i},function(e,t,r){return r?e(t,r):new d(t,null)},function(e,t,r){var n;if(t<o||o+u<=t&&t<i||i+h<t)return e(t,r);if(o<=t&&t<o+u){var p={},v=(t-o)*c;for(n=0;n<c;++n)p[a+n]=i+f*(n+v);return new d(t,[,,p])}var y=t-i,b=y%f,g=[];if(0!==b)g[0]=[i+y-b,s+b];else for(g[0]=[o+Math.floor(y/l),a+Math.floor(y%l/f)],g[2]={},n=1;n<f;++n)g[2][s+n]=t+n;return new d(t,g)},function(e,t,n){var i=65280&t,o=(d.udata[i]||{})[t];return new d(t,o||r)}];d.fromCharCode=b.reduceRight((function(e,t){return function(r,n){return t(e,r,n)}}),null),d.isHighSurrogate=function(e){return e>=55296&&e<=56319},d.isLowSurrogate=function(e){return e>=56320&&e<=57343},d.prototype.prepFeature=function(){this.feature||(this.feature=d.fromCharCode(this.codepoint,!0).feature)},d.prototype.toString=function(){if(this.codepoint<65536)return String.fromCharCode(this.codepoint);var e=this.codepoint-65536;return String.fromCharCode(Math.floor(e/1024)+55296,e%1024+56320)},d.prototype.getDecomp=function(){return this.prepFeature(),this.feature[0]||null},d.prototype.isCompatibility=function(){return this.prepFeature(),!!this.feature[1]&&256&this.feature[1]},d.prototype.isExclude=function(){return this.prepFeature(),!!this.feature[1]&&512&this.feature[1]},d.prototype.getCanonicalClass=function(){return this.prepFeature(),this.feature[1]?255&this.feature[1]:0},d.prototype.getComposite=function(e){if(this.prepFeature(),!this.feature[2])return null;var t=this.feature[2][e.codepoint];return t?d.fromCharCode(t):null};var g=function(e){this.str=e,this.cursor=0};g.prototype.next=function(){if(this.str&&this.cursor<this.str.length){var e,t=this.str.charCodeAt(this.cursor++);return d.isHighSurrogate(t)&&this.cursor<this.str.length&&d.isLowSurrogate(e=this.str.charCodeAt(this.cursor))&&(t=1024*(t-55296)+(e-56320)+65536,++this.cursor),d.fromCharCode(t)}return this.str=null,null};var m=function(e,t){this.it=e,this.canonical=t,this.resBuf=[]};m.prototype.next=function(){if(0===this.resBuf.length){var e=this.it.next();if(!e)return null;this.resBuf=function e(t,r){var n=r.getDecomp();if(!n||t&&r.isCompatibility())return[r];for(var i=[],o=0;o<n.length;++o){var a=e(t,d.fromCharCode(n[o]));i=i.concat(a)}return i}(this.canonical,e)}return this.resBuf.shift()};var w=function(e){this.it=e,this.resBuf=[]};w.prototype.next=function(){var e;if(0===this.resBuf.length)do{var t=this.it.next();if(!t)break;e=t.getCanonicalClass();var r=this.resBuf.length;if(0!==e)for(;r>0&&!(this.resBuf[r-1].getCanonicalClass()<=e);--r);this.resBuf.splice(r,0,t)}while(0!==e);return this.resBuf.shift()};var k=function(e){this.it=e,this.procBuf=[],this.resBuf=[],this.lastClass=null};k.prototype.next=function(){for(;0===this.resBuf.length;){var e=this.it.next();if(!e){this.resBuf=this.procBuf,this.procBuf=[];break}if(0===this.procBuf.length)this.lastClass=e.getCanonicalClass(),this.procBuf.push(e);else{var t=this.procBuf[0].getComposite(e),r=e.getCanonicalClass();t&&(this.lastClass<r||0===this.lastClass)?this.procBuf[0]=t:(0===r&&(this.resBuf=this.procBuf,this.procBuf=[]),this.lastClass=r,this.procBuf.push(e))}}return this.resBuf.shift()};var S=function(e,t){for(var r,n=function(e,t){switch(e){case"NFD":return new w(new m(new g(t),!0));case"NFKD":return new w(new m(new g(t),!1));case"NFC":return new k(new w(new m(new g(t),!0)));case"NFKC":return new k(new w(new m(new g(t),!1)))}throw e+" is invalid"}(e,t),i="";r=n.next();)i+=r.toString();return i};d.udata={0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{769:506}],198:[,,{769:508,772:482}],199:[[67,807],,{769:7688}],200:[[69,768]],201:[[69,769]],202:[[69,770],,{768:7872,769:7870,771:7876,777:7874}],203:[[69,776]],204:[[73,768]],205:[[73,769]],206:[[73,770]],207:[[73,776],,{769:7726}],209:[[78,771]],210:[[79,768]],211:[[79,769]],212:[[79,770],,{768:7890,769:7888,771:7894,777:7892}],213:[[79,771],,{769:7756,772:556,776:7758}],214:[[79,776],,{772:554}],216:[,,{769:510}],217:[[85,768]],218:[[85,769]],219:[[85,770]],220:[[85,776],,{768:475,769:471,772:469,780:473}],221:[[89,769]],224:[[97,768]],225:[[97,769]],226:[[97,770],,{768:7847,769:7845,771:7851,777:7849}],227:[[97,771]],228:[[97,776],,{772:479}],229:[[97,778],,{769:507}],230:[,,{769:509,772:483}],231:[[99,807],,{769:7689}],232:[[101,768]],233:[[101,769]],234:[[101,770],,{768:7873,769:7871,771:7877,777:7875}],235:[[101,776]],236:[[105,768]],237:[[105,769]],238:[[105,770]],239:[[105,776],,{769:7727}],241:[[110,771]],242:[[111,768]],243:[[111,769]],244:[[111,770],,{768:7891,769:7889,771:7895,777:7893}],245:[[111,771],,{769:7757,772:557,776:7759}],246:[[111,776],,{772:555}],248:[,,{769:511}],249:[[117,768]],250:[[117,769]],251:[[117,770]],252:[[117,776],,{768:476,769:472,772:470,780:474}],253:[[121,769]],255:[[121,776]]},256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]},512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256],66272:[,220]},768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8e3,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256],66422:[,230],66423:[,230],66424:[,230],66425:[,230],66426:[,230]},1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]},1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]},1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]},1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]},2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230],2303:[,230]},2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]},2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9],68325:[,230],68326:[,220]},2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]},3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]},3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]},3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]},3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]},4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69759:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]},4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70003:[,7],70080:[,9]},4608:{70197:[,9],70198:[,7],70377:[,7],70378:[,9]},4864:{4957:[,230],4958:[,230],4959:[,230],70460:[,7],70471:[,,{70462:70475,70487:70476}],70475:[[70471,70462]],70476:[[70471,70487]],70477:[,9],70502:[,230],70503:[,230],70504:[,230],70505:[,230],70506:[,230],70507:[,230],70508:[,230],70512:[,230],70513:[,230],70514:[,230],70515:[,230],70516:[,230]},5120:{70841:[,,{70832:70844,70842:70843,70845:70846}],70843:[[70841,70842]],70844:[[70841,70832]],70846:[[70841,70845]],70850:[,9],70851:[,7]},5376:{71096:[,,{71087:71098}],71097:[,,{71087:71099}],71098:[[71096,71087]],71099:[[71097,71087]],71103:[,9],71104:[,7]},5632:{71231:[,9],71350:[,9],71351:[,7]},5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]},6144:{6313:[,228]},6400:{6457:[,222],6458:[,230],6459:[,220]},6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220],6832:[,230],6833:[,230],6834:[,230],6835:[,230],6836:[,230],6837:[,220],6838:[,220],6839:[,220],6840:[,220],6841:[,220],6842:[,220],6843:[,230],6844:[,230],6845:[,220]},6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]},7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230],7416:[,230],7417:[,230]},7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7655:[,230],7656:[,230],7657:[,230],7658:[,230],7659:[,230],7660:[,230],7661:[,230],7662:[,230],7663:[,230],7664:[,230],7665:[,230],7666:[,230],7667:[,230],7668:[,230],7669:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]},7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[431,771]],7919:[[432,771]],7920:[[431,803]],7921:[[432,803]],7922:[[89,768]],7923:[[121,768]],7924:[[89,803]],7925:[[121,803]],7926:[[89,777]],7927:[[121,777]],7928:[[89,771]],7929:[[121,771]]},7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8e3:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8e3,768]],8003:[[8001,768]],8004:[[8e3,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]],8108:[[8044,837]],8109:[[8045,837]],8110:[[8046,837]],8111:[[8047,837]],8112:[[945,774]],8113:[[945,772]],8114:[[8048,837]],8115:[[945,837]],8116:[[940,837]],8118:[[945,834],,{837:8119}],8119:[[8118,837]],8120:[[913,774]],8121:[[913,772]],8122:[[913,768]],8123:[[902]],8124:[[913,837]],8125:[[32,787],256],8126:[[953]],8127:[[32,787],256,{768:8141,769:8142,834:8143}],8128:[[32,834],256],8129:[[168,834]],8130:[[8052,837]],8131:[[951,837]],8132:[[942,837]],8134:[[951,834],,{837:8135}],8135:[[8134,837]],8136:[[917,768]],8137:[[904]],8138:[[919,768]],8139:[[905]],8140:[[919,837]],8141:[[8127,768]],8142:[[8127,769]],8143:[[8127,834]],8144:[[953,774]],8145:[[953,772]],8146:[[970,768]],8147:[[912]],8150:[[953,834]],8151:[[970,834]],8152:[[921,774]],8153:[[921,772]],8154:[[921,768]],8155:[[906]],8157:[[8190,768]],8158:[[8190,769]],8159:[[8190,834]],8160:[[965,774]],8161:[[965,772]],8162:[[971,768]],8163:[[944]],8164:[[961,787]],8165:[[961,788]],8166:[[965,834]],8167:[[971,834]],8168:[[933,774]],8169:[[933,772]],8170:[[933,768]],8171:[[910]],8172:[[929,788]],8173:[[168,768]],8174:[[901]],8175:[[96]],8178:[[8060,837]],8179:[[969,837]],8180:[[974,837]],8182:[[969,834],,{837:8183}],8183:[[8182,837]],8184:[[927,768]],8185:[[908]],8186:[[937,768]],8187:[[911]],8188:[[937,837]],8189:[[180]],8190:[[32,788],256,{768:8157,769:8158,834:8159}]},8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]},8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]},8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]},8960:{9001:[[12296]],9002:[[12297]]},9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]},10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]},11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]},11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]},11776:{11935:[[27597],256],12019:[[40863],256]},12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[3e4],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[[40701],256],12237:[[40718],256],12238:[[40723],256],12239:[[40736],256],12240:[[40763],256],12241:[[40778],256],12242:[[40786],256],12243:[[40845],256],12244:[[40860],256],12245:[[40864],256]},12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]},12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]},12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],12986:[[52,53],256],12987:[[52,54],256],12988:[[52,55],256],12989:[[52,56],256],12990:[[52,57],256],12991:[[53,48],256],12992:[[49,26376],256],12993:[[50,26376],256],12994:[[51,26376],256],12995:[[52,26376],256],12996:[[53,26376],256],12997:[[54,26376],256],12998:[[55,26376],256],12999:[[56,26376],256],13e3:[[57,26376],256],13001:[[49,48,26376],256],13002:[[49,49,26376],256],13003:[[49,50,26376],256],13004:[[72,103],256],13005:[[101,114,103],256],13006:[[101,86],256],13007:[[76,84,68],256],13008:[[12450],256],13009:[[12452],256],13010:[[12454],256],13011:[[12456],256],13012:[[12458],256],13013:[[12459],256],13014:[[12461],256],13015:[[12463],256],13016:[[12465],256],13017:[[12467],256],13018:[[12469],256],13019:[[12471],256],13020:[[12473],256],13021:[[12475],256],13022:[[12477],256],13023:[[12479],256],13024:[[12481],256],13025:[[12484],256],13026:[[12486],256],13027:[[12488],256],13028:[[12490],256],13029:[[12491],256],13030:[[12492],256],13031:[[12493],256],13032:[[12494],256],13033:[[12495],256],13034:[[12498],256],13035:[[12501],256],13036:[[12504],256],13037:[[12507],256],13038:[[12510],256],13039:[[12511],256],13040:[[12512],256],13041:[[12513],256],13042:[[12514],256],13043:[[12516],256],13044:[[12518],256],13045:[[12520],256],13046:[[12521],256],13047:[[12522],256],13048:[[12523],256],13049:[[12524],256],13050:[[12525],256],13051:[[12527],256],13052:[[12528],256],13053:[[12529],256],13054:[[12530],256]},13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65],256],13187:[[109,65],256],13188:[[107,65],256],13189:[[75,66],256],13190:[[77,66],256],13191:[[71,66],256],13192:[[99,97,108],256],13193:[[107,99,97,108],256],13194:[[112,70],256],13195:[[110,70],256],13196:[[956,70],256],13197:[[956,103],256],13198:[[109,103],256],13199:[[107,103],256],13200:[[72,122],256],13201:[[107,72,122],256],13202:[[77,72,122],256],13203:[[71,72,122],256],13204:[[84,72,122],256],13205:[[956,8467],256],13206:[[109,8467],256],13207:[[100,8467],256],13208:[[107,8467],256],13209:[[102,109],256],13210:[[110,109],256],13211:[[956,109],256],13212:[[109,109],256],13213:[[99,109],256],13214:[[107,109],256],13215:[[109,109,178],256],13216:[[99,109,178],256],13217:[[109,178],256],13218:[[107,109,178],256],13219:[[109,109,179],256],13220:[[99,109,179],256],13221:[[109,179],256],13222:[[107,109,179],256],13223:[[109,8725,115],256],13224:[[109,8725,115,178],256],13225:[[80,97],256],13226:[[107,80,97],256],13227:[[77,80,97],256],13228:[[71,80,97],256],13229:[[114,97,100],256],13230:[[114,97,100,8725,115],256],13231:[[114,97,100,8725,115,178],256],13232:[[112,115],256],13233:[[110,115],256],13234:[[956,115],256],13235:[[109,115],256],13236:[[112,86],256],13237:[[110,86],256],13238:[[956,86],256],13239:[[109,86],256],13240:[[107,86],256],13241:[[77,86],256],13242:[[112,87],256],13243:[[110,87],256],13244:[[956,87],256],13245:[[109,87],256],13246:[[107,87],256],13247:[[77,87],256],13248:[[107,937],256],13249:[[77,937],256],13250:[[97,46,109,46],256],13251:[[66,113],256],13252:[[99,99],256],13253:[[99,100],256],13254:[[67,8725,107,103],256],13255:[[67,111,46],256],13256:[[100,66],256],13257:[[71,121],256],13258:[[104,97],256],13259:[[72,80],256],13260:[[105,110],256],13261:[[75,75],256],13262:[[75,77],256],13263:[[107,116],256],13264:[[108,109],256],13265:[[108,110],256],13266:[[108,111,103],256],13267:[[108,120],256],13268:[[109,98],256],13269:[[109,105,108],256],13270:[[109,111,108],256],13271:[[80,72],256],13272:[[112,46,109,46],256],13273:[[80,80,77],256],13274:[[80,82],256],13275:[[115,114],256],13276:[[83,118],256],13277:[[87,98],256],13278:[[86,8725,109],256],13279:[[65,8725,109],256],13280:[[49,26085],256],13281:[[50,26085],256],13282:[[51,26085],256],13283:[[52,26085],256],13284:[[53,26085],256],13285:[[54,26085],256],13286:[[55,26085],256],13287:[[56,26085],256],13288:[[57,26085],256],13289:[[49,48,26085],256],13290:[[49,49,26085],256],13291:[[49,50,26085],256],13292:[[49,51,26085],256],13293:[[49,52,26085],256],13294:[[49,53,26085],256],13295:[[49,54,26085],256],13296:[[49,55,26085],256],13297:[[49,56,26085],256],13298:[[49,57,26085],256],13299:[[50,48,26085],256],13300:[[50,49,26085],256],13301:[[50,50,26085],256],13302:[[50,51,26085],256],13303:[[50,52,26085],256],13304:[[50,53,26085],256],13305:[[50,54,26085],256],13306:[[50,55,26085],256],13307:[[50,56,26085],256],13308:[[50,57,26085],256],13309:[[51,48,26085],256],13310:[[51,49,26085],256],13311:[[103,97,108],256]},27136:{92912:[,1],92913:[,1],92914:[,1],92915:[,1],92916:[,1]},27392:{92976:[,230],92977:[,230],92978:[,230],92979:[,230],92980:[,230],92981:[,230],92982:[,230]},42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42652:[[1098],256],42653:[[1100],256],42655:[,230],42736:[,230],42737:[,230]},42752:{42864:[[42863],256],43e3:[[294],256],43001:[[339],256]},43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]},43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]},43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]},43776:{43868:[[42791],256],43869:[[43831],256],43870:[[619],256],43871:[[43858],256],44013:[,9]},48128:{113822:[,1]},53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]},53760:{119362:[,230],119363:[,230],119364:[,230]},54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],12e4:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120042:[[97],256],120043:[[98],256],120044:[[99],256],120045:[[100],256],120046:[[101],256],120047:[[102],256],120048:[[103],256],120049:[[104],256],120050:[[105],256],120051:[[106],256],120052:[[107],256],120053:[[108],256],120054:[[109],256],120055:[[110],256],120056:[[111],256],120057:[[112],256],120058:[[113],256],120059:[[114],256],120060:[[115],256],120061:[[116],256],120062:[[117],256],120063:[[118],256]},54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],256],120298:[[87],256],120299:[[88],256],120300:[[89],256],120301:[[90],256],120302:[[97],256],120303:[[98],256],120304:[[99],256],120305:[[100],256],120306:[[101],256],120307:[[102],256],120308:[[103],256],120309:[[104],256],120310:[[105],256],120311:[[106],256],120312:[[107],256],120313:[[108],256],120314:[[109],256],120315:[[110],256],120316:[[111],256],120317:[[112],256],120318:[[113],256],120319:[[114],256]},54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[977],256],120542:[[1008],256],120543:[[981],256],120544:[[1009],256],120545:[[982],256],120546:[[913],256],120547:[[914],256],120548:[[915],256],120549:[[916],256],120550:[[917],256],120551:[[918],256],120552:[[919],256],120553:[[920],256],120554:[[921],256],120555:[[922],256],120556:[[923],256],120557:[[924],256],120558:[[925],256],120559:[[926],256],120560:[[927],256],120561:[[928],256],120562:[[929],256],120563:[[1012],256],120564:[[931],256],120565:[[932],256],120566:[[933],256],120567:[[934],256],120568:[[935],256],120569:[[936],256],120570:[[937],256],120571:[[8711],256],120572:[[945],256],120573:[[946],256],120574:[[947],256],120575:[[948],256]},55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[48],256],120793:[[49],256],120794:[[50],256],120795:[[51],256],120796:[[52],256],120797:[[53],256],120798:[[54],256],120799:[[55],256],120800:[[56],256],120801:[[57],256],120802:[[48],256],120803:[[49],256],120804:[[50],256],120805:[[51],256],120806:[[52],256],120807:[[53],256],120808:[[54],256],120809:[[55],256],120810:[[56],256],120811:[[57],256],120812:[[48],256],120813:[[49],256],120814:[[50],256],120815:[[51],256],120816:[[52],256],120817:[[53],256],120818:[[54],256],120819:[[55],256],120820:[[56],256],120821:[[57],256],120822:[[48],256],120823:[[49],256],120824:[[50],256],120825:[[51],256],120826:[[52],256],120827:[[53],256],120828:[[54],256],120829:[[55],256],120830:[[56],256],120831:[[57],256]},59392:{125136:[,220],125137:[,220],125138:[,220],125139:[,220],125140:[,220],125141:[,220],125142:[,220]},60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]},61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]},61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]},63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23e3]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384]],194799:[[27425]],194800:[[145575]],194801:[[27476]],194802:[[15438]],194803:[[27506]],194804:[[27551]],194805:[[27578]],194806:[[27579]],194807:[[146061]],194808:[[138507]],194809:[[146170]],194810:[[27726]],194811:[[146620]],194812:[[27839]],194813:[[27853]],194814:[[27751]],194815:[[27926]]},63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[[21050]],194816:[[27966]],194817:[[28023]],194818:[[27969]],194819:[[28009]],194820:[[28024]],194821:[[28037]],194822:[[146718]],194823:[[27956]],194824:[[28207]],194825:[[28270]],194826:[[15667]],194827:[[28363]],194828:[[28359]],194829:[[147153]],194830:[[28153]],194831:[[28526]],194832:[[147294]],194833:[[147342]],194834:[[28614]],194835:[[28729]],194836:[[28702]],194837:[[28699]],194838:[[15766]],194839:[[28746]],194840:[[28797]],194841:[[28791]],194842:[[28845]],194843:[[132389]],194844:[[28997]],194845:[[148067]],194846:[[29084]],194847:[[148395]],194848:[[29224]],194849:[[29237]],194850:[[29264]],194851:[[149e3]],194852:[[29312]],194853:[[29333]],194854:[[149301]],194855:[[149524]],194856:[[29562]],194857:[[29579]],194858:[[16044]],194859:[[29605]],194860:[[16056]],194861:[[16056]],194862:[[29767]],194863:[[29788]],194864:[[29809]],194865:[[29829]],194866:[[29898]],194867:[[16155]],194868:[[29988]],194869:[[150582]],194870:[[30014]],194871:[[150674]],194872:[[30064]],194873:[[139679]],194874:[[30224]],194875:[[151457]],194876:[[151480]],194877:[[151620]],194878:[[16380]],194879:[[16392]],194880:[[30452]],194881:[[151795]],194882:[[151794]],194883:[[151833]],194884:[[151859]],194885:[[30494]],194886:[[30495]],194887:[[30495]],194888:[[30538]],194889:[[16441]],194890:[[30603]],194891:[[16454]],194892:[[16534]],194893:[[152605]],194894:[[30798]],194895:[[30860]],194896:[[30924]],194897:[[16611]],194898:[[153126]],194899:[[31062]],194900:[[153242]],194901:[[153285]],194902:[[31119]],194903:[[31211]],194904:[[16687]],194905:[[31296]],194906:[[31306]],194907:[[31311]],194908:[[153980]],194909:[[154279]],194910:[[154279]],194911:[[31470]],194912:[[16898]],194913:[[154539]],194914:[[31686]],194915:[[31689]],194916:[[16935]],194917:[[154752]],194918:[[31954]],194919:[[17056]],194920:[[31976]],194921:[[31971]],194922:[[32e3]],194923:[[155526]],194924:[[32099]],194925:[[17153]],194926:[[32199]],194927:[[32258]],194928:[[32325]],194929:[[17204]],194930:[[156200]],194931:[[156231]],194932:[[17241]],194933:[[156377]],194934:[[32634]],194935:[[156478]],194936:[[32661]],194937:[[32762]],194938:[[32773]],194939:[[156890]],194940:[[156963]],194941:[[32864]],194942:[[157096]],194943:[[32880]],194944:[[144223]],194945:[[17365]],194946:[[32946]],194947:[[33027]],194948:[[17419]],194949:[[33086]],194950:[[23221]],194951:[[157607]],194952:[[157621]],194953:[[144275]],194954:[[144284]],194955:[[33281]],194956:[[33284]],194957:[[36766]],194958:[[17515]],194959:[[33425]],194960:[[33419]],194961:[[33437]],194962:[[21171]],194963:[[33457]],194964:[[33459]],194965:[[33469]],194966:[[33510]],194967:[[158524]],194968:[[33509]],194969:[[33565]],194970:[[33635]],194971:[[33709]],194972:[[33571]],194973:[[33725]],194974:[[33767]],194975:[[33879]],194976:[[33619]],194977:[[33738]],194978:[[33740]],194979:[[33756]],194980:[[158774]],194981:[[159083]],194982:[[158933]],194983:[[17707]],194984:[[34033]],194985:[[34035]],194986:[[34070]],194987:[[160714]],194988:[[34148]],194989:[[159532]],194990:[[17757]],194991:[[17761]],194992:[[159665]],194993:[[159954]],194994:[[17771]],194995:[[34384]],194996:[[34396]],194997:[[34407]],194998:[[34409]],194999:[[34473]],195e3:[[34440]],195001:[[34574]],195002:[[34530]],195003:[[34681]],195004:[[34600]],195005:[[34667]],195006:[[34694]],195007:[[17879]],195008:[[34785]],195009:[[34817]],195010:[[17913]],195011:[[34912]],195012:[[34915]],195013:[[161383]],195014:[[35031]],195015:[[35038]],195016:[[17973]],195017:[[35066]],195018:[[13499]],195019:[[161966]],195020:[[162150]],195021:[[18110]],195022:[[18119]],195023:[[35488]],195024:[[35565]],195025:[[35722]],195026:[[35925]],195027:[[162984]],195028:[[36011]],195029:[[36033]],195030:[[36123]],195031:[[36215]],195032:[[163631]],195033:[[133124]],195034:[[36299]],195035:[[36284]],195036:[[36336]],195037:[[133342]],195038:[[36564]],195039:[[36664]],195040:[[165330]],195041:[[165357]],195042:[[37012]],195043:[[37105]],195044:[[37137]],195045:[[165678]],195046:[[37147]],195047:[[37432]],195048:[[37591]],195049:[[37592]],195050:[[37500]],195051:[[37881]],195052:[[37909]],195053:[[166906]],195054:[[38283]],195055:[[18837]],195056:[[38327]],195057:[[167287]],195058:[[18918]],195059:[[38595]],195060:[[23986]],195061:[[38691]],195062:[[168261]],195063:[[168474]],195064:[[19054]],195065:[[19062]],195066:[[38880]],195067:[[168970]],195068:[[19122]],195069:[[169110]],195070:[[38923]],195071:[[38923]]},64e3:{64e3:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[4e4]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]},64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740],256],64510:[[1740],256],64511:[[1740],256]},64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,1580],256],64682:[[1581,1605],256],64683:[[1582,1580],256],64684:[[1582,1605],256],64685:[[1587,1580],256],64686:[[1587,1581],256],64687:[[1587,1582],256],64688:[[1587,1605],256],64689:[[1589,1581],256],64690:[[1589,1582],256],64691:[[1589,1605],256],64692:[[1590,1580],256],64693:[[1590,1581],256],64694:[[1590,1582],256],64695:[[1590,1605],256],64696:[[1591,1581],256],64697:[[1592,1605],256],64698:[[1593,1580],256],64699:[[1593,1605],256],64700:[[1594,1580],256],64701:[[1594,1605],256],64702:[[1601,1580],256],64703:[[1601,1581],256],64704:[[1601,1582],256],64705:[[1601,1605],256],64706:[[1602,1581],256],64707:[[1602,1605],256],64708:[[1603,1580],256],64709:[[1603,1581],256],64710:[[1603,1582],256],64711:[[1603,1604],256],64712:[[1603,1605],256],64713:[[1604,1580],256],64714:[[1604,1581],256],64715:[[1604,1582],256],64716:[[1604,1605],256],64717:[[1604,1607],256],64718:[[1605,1580],256],64719:[[1605,1581],256],64720:[[1605,1582],256],64721:[[1605,1605],256],64722:[[1606,1580],256],64723:[[1606,1581],256],64724:[[1606,1582],256],64725:[[1606,1605],256],64726:[[1606,1607],256],64727:[[1607,1580],256],64728:[[1607,1605],256],64729:[[1607,1648],256],64730:[[1610,1580],256],64731:[[1610,1581],256],64732:[[1610,1582],256],64733:[[1610,1605],256],64734:[[1610,1607],256],64735:[[1574,1605],256],64736:[[1574,1607],256],64737:[[1576,1605],256],64738:[[1576,1607],256],64739:[[1578,1605],256],64740:[[1578,1607],256],64741:[[1579,1605],256],64742:[[1579,1607],256],64743:[[1587,1605],256],64744:[[1587,1607],256],64745:[[1588,1605],256],64746:[[1588,1607],256],64747:[[1603,1604],256],64748:[[1603,1605],256],64749:[[1604,1605],256],64750:[[1606,1605],256],64751:[[1606,1607],256],64752:[[1610,1605],256],64753:[[1610,1607],256],64754:[[1600,1614,1617],256],64755:[[1600,1615,1617],256],64756:[[1600,1616,1617],256],64757:[[1591,1609],256],64758:[[1591,1610],256],64759:[[1593,1609],256],64760:[[1593,1610],256],64761:[[1594,1609],256],64762:[[1594,1610],256],64763:[[1587,1609],256],64764:[[1587,1610],256],64765:[[1588,1609],256],64766:[[1588,1610],256],64767:[[1581,1609],256]},64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,1610],256],64940:[[1604,1580,1610],256],64941:[[1604,1605,1610],256],64942:[[1610,1581,1610],256],64943:[[1610,1580,1610],256],64944:[[1610,1605,1610],256],64945:[[1605,1605,1610],256],64946:[[1602,1605,1610],256],64947:[[1606,1581,1610],256],64948:[[1602,1605,1581],256],64949:[[1604,1581,1605],256],64950:[[1593,1605,1610],256],64951:[[1603,1605,1610],256],64952:[[1606,1580,1581],256],64953:[[1605,1582,1610],256],64954:[[1604,1580,1605],256],64955:[[1603,1605,1605],256],64956:[[1604,1580,1605],256],64957:[[1606,1580,1581],256],64958:[[1580,1581,1610],256],64959:[[1581,1580,1610],256],64960:[[1605,1580,1610],256],64961:[[1601,1605,1610],256],64962:[[1576,1581,1610],256],64963:[[1603,1605,1605],256],64964:[[1593,1580,1605],256],64965:[[1589,1605,1605],256],64966:[[1587,1582,1610],256],64967:[[1606,1580,1610],256],65008:[[1589,1604,1746],256],65009:[[1602,1604,1746],256],65010:[[1575,1604,1604,1607],256],65011:[[1575,1603,1576,1585],256],65012:[[1605,1581,1605,1583],256],65013:[[1589,1604,1593,1605],256],65014:[[1585,1587,1608,1604],256],65015:[[1593,1604,1610,1607],256],65016:[[1608,1587,1604,1605],256],65017:[[1589,1604,1609],256],65018:[[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],256],65019:[[1580,1604,32,1580,1604,1575,1604,1607],256],65020:[[1585,1740,1575,1604],256]},65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65063:[,220],65064:[,220],65065:[,220],65066:[,220],65067:[,220],65068:[,220],65069:[,220],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575],256],65276:[[1604,1575],256]},65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],256],65512:[[9474],256],65513:[[8592],256],65514:[[8593],256],65515:[[8594],256],65516:[[8595],256],65517:[[9632],256],65518:[[9675],256]}};var E={nfc:function(e){return S("NFC",e)},nfd:function(e){return S("NFD",e)},nfkc:function(e){return S("NFKC",e)},nfkd:function(e){return S("NFKD",e)}};e.exports=E,E.shimApplied=!1,String.prototype.normalize||(Object.defineProperty(String.prototype,"normalize",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=""+this,t=void 0===arguments[0]?"NFC":arguments[0];if(null===this||void 0===this)throw new TypeError("Cannot call method on "+Object.prototype.toString.call(this));if("NFC"===t)return E.nfc(e);if("NFD"===t)return E.nfd(e);if("NFKC"===t)return E.nfkc(e);if("NFKD"===t)return E.nfkd(e);throw new RangeError("Invalid normalization form: "+t)}}),E.shimApplied=!0)}()})),o=n((function(e,t){!function(e){if(e.atob)try{e.atob(" ")}catch(n){e.atob=(t=e.atob,(r=function(e){return t(String(e).replace(/[\t\n\f\r ]+/g,""))}).original=t,r)}else{var t,r,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){for(var t,r,i,o,a="",s=0,u=(e=String(e)).length%3;s<e.length;){if((r=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");a+=n.charAt((t=r<<16|i<<8|o)>>18&63)+n.charAt(t>>12&63)+n.charAt(t>>6&63)+n.charAt(63&t)}return u?a.slice(0,u-3)+"===".substring(u):a},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!i.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");e+="==".slice(2-(3&e.length));for(var t,r,o,a="",s=0;s<e.length;)t=n.indexOf(e.charAt(s++))<<18|n.indexOf(e.charAt(s++))<<12|(r=n.indexOf(e.charAt(s++)))<<6|(o=n.indexOf(e.charAt(s++))),a+=64===r?String.fromCharCode(t>>16&255):64===o?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return a}}}(t)}));!function(){var e=[];try{for(var t=[],n=["NFD","NFC","NFKD","NFKC"],a=0;a<n.length;a++)try{if("test"!=="test".normalize(n[a]))throw new Error("failed to normalize")}catch(e){t.push(n[a])}if(t.length)throw e.push("String.prototype.normalize (missing: "+t.join(", ")+")"),new Error("bad normalize");if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw e.push("String.prototype.normalize (broken)"),new Error("bad normalize")}catch(e){var s=i;String.prototype.normalize=function(e){var t=s[(e||"NFC").toLowerCase()];if(!t)throw new RangeError("invalid form - "+e);return t(this)}}var u=o;r.atob||(e.push("atob"),r.atob=u.atob),r.btoa||(e.push("btoa"),r.btoa=u.btoa),ArrayBuffer.isView||(e.push("ArrayBuffer.isView"),ArrayBuffer.isView=function(e){return!!e.buffer}),r.nextTick||(e.push("nextTick"),r.nextTick=function(e){setTimeout(e,0)}),r.crypto||(r.crypto={}),r.crypto.getRandomValues||(e.push("crypto.getRandomValues"),console.log("WARNING: This environment is missing a secure random source; generated private keys may be at risk, think VERY carefully about not adding a better secure source."),r.crypto.getRandomValues=function(e){for(var t=Math.floor((new Date).getTime())%e.length,r=0;r<e.length;r++)e[(t+r)%e.length]=Math.floor(256*Math.random())});try{var c=new FileReader;try{c.readAsArrayBuffer(new Blob(["hello"],{type:"text/plain"}))}catch(r){e.push("FileReader.prototype.readAsArrayBuffer"),FileReader.prototype.readAsArrayBuffer=function(e){var t=this;if(this.readyState===this.LOADING)throw new Error("InvalidStateError");this._setReadyState(this.LOADING),this._result=null,this._error=null;var r=new FileReader;r.onloadend=function(){var e=atob(r.result.split(",").pop().trim()),n=new ArrayBuffer(e.length);new Uint8Array(n).set(Array.from(e).map((function(e){return e.charCodeAt(0)}))),t._result=n,t._setReadyState(t.DONE)},r.readAsDataURL(e)}}}catch(e){console.log("Missing FileReader; unsupported platform")}if(e.length)for(console.log("Shims Injected:"),a=0;a<e.length;a++)console.log(" - "+e[a])}(),t.default={},Object.defineProperty(t,"__esModule",{value:!0})}(t)}).call(this,r(36))},function(e,t,r){"use strict";e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,i=2,o=!0;for(;i<arguments.length;)r[n++]=arguments[i++];return new Promise((function(i,a){r[n]=function(e){if(o)if(o=!1,e)a(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];i.apply(null,t)}};try{e.apply(t||null,r)}catch(s){o&&(o=!1,a(s))}}))}},function(module,exports,__webpack_require__){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},function(e,t,r){"use strict";t.Service=r(546)},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";e.exports=function(e){for(var t,r=o.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),s=e.fieldsArray.slice().sort(o.compareFieldsById),u=0;u<s.length;++u){var c=s[u].resolve(),f=e._fieldsArray.indexOf(c),l=c.resolvedType instanceof n?"int32":c.type,h=i.basic[l];t="m"+o.safeProp(c.name),c.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|i.mapKey[c.keyType],c.keyType),void 0===h?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",f,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,l,t),r("}")("}")):c.repeated?(r("if(%s!=null&&%s.length){",t,t),c.packed&&void 0!==i.packed[l]?r("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",l,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===h?a(r,c,f,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(c.id<<3|h)>>>0,l,t)),r("}")):(c.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,c.name),void 0===h?a(r,c,f,t):r("w.uint32(%i).%s(%s)",(c.id<<3|h)>>>0,l,t))}return r("return w")};var n=r(83),i=r(153),o=r(56);function a(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},function(e,t,r){"use strict";e.exports=g;var n=r(152);((g.prototype=Object.create(n.prototype)).constructor=g).className="Type";var i=r(83),o=r(187),a=r(129),s=r(327),u=r(328),c=r(239),f=r(238),l=r(237),h=r(56),d=r(325),p=r(330),v=r(331),y=r(332),b=r(333);function g(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function m(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(g.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=g.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,c,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:h.oneOfGetter(this._oneofsArray[r].oneof),set:h.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),g.generateConstructor=function(e){for(var t,r=h.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",h.safeProp(t.name)):t.repeated&&r("this%s=[]",h.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},g.fromJSON=function(e,t){var r=new g(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var c=Object.keys(t.fields),f=0;f<c.length;++f)r.add(("undefined"!==typeof t.fields[c[f]].keyType?s.fromJSON:a.fromJSON)(c[f],t.fields[c[f]]));if(t.oneofs)for(c=Object.keys(t.oneofs),f=0;f<c.length;++f)r.add(o.fromJSON(c[f],t.oneofs[c[f]]));if(t.nested)for(c=Object.keys(t.nested),f=0;f<c.length;++f){var l=t.nested[c[f]];r.add((void 0!==l.id?a.fromJSON:void 0!==l.fields?g.fromJSON:void 0!==l.values?i.fromJSON:void 0!==l.methods?u.fromJSON:n.fromJSON)(c[f],l))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},g.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},g.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},g.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},g.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof a&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),m(this)}return e instanceof o?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),m(this)):n.prototype.add.call(this,e)},g.prototype.remove=function(e){if(e instanceof a&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),m(this)}if(e instanceof o){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),m(this)}return n.prototype.remove.call(this,e)},g.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},g.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},g.prototype.create=function(e){return new this.ctor(e)},g.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=d(this)({Writer:l,types:t,util:h}),this.decode=p(this)({Reader:f,types:t,util:h}),this.verify=v(this)({types:t,util:h}),this.fromObject=y.fromObject(this)({types:t,util:h}),this.toObject=y.toObject(this)({types:t,util:h});var n=b[e];if(n){var i=Object.create(this);i.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(i),i.toObject=this.toObject,this.toObject=n.toObject.bind(i)}return this},g.prototype.encode=function(e,t){return this.setup().encode(e,t)},g.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},g.prototype.decode=function(e,t){return this.setup().decode(e,t)},g.prototype.decodeDelimited=function(e){return e instanceof f||(e=f.create(e)),this.decode(e,e.uint32())},g.prototype.verify=function(e){return this.setup().verify(e)},g.prototype.fromObject=function(e){return this.setup().fromObject(e)},g.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},g.d=function(e){return function(t){h.decorateType(t,e)}}},function(e,t,r){"use strict";e.exports=a;var n=r(129);((a.prototype=Object.create(n.prototype)).constructor=a).className="MapField";var i=r(153),o=r(56);function a(e,t,r,i,a,s){if(n.call(this,e,t,i,void 0,void 0,a,s),!o.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}a.fromJSON=function(e,t){return new a(e,t.id,t.keyType,t.type,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},a.prototype.resolve=function(){if(this.resolved)return this;if(void 0===i.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},a.d=function(e,t,r){return"function"===typeof r?r=o.decorateType(r).name:r&&"object"===typeof r&&(r=o.decorateEnum(r).name),function(n,i){o.decorateType(n.constructor).add(new a(i,e,t,r))}}},function(e,t,r){"use strict";e.exports=s;var n=r(152);((s.prototype=Object.create(n.prototype)).constructor=s).className="Service";var i=r(329),o=r(56),a=r(323);function s(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function u(e){return e._methodsArray=null,e}s.fromJSON=function(e,t){var r=new s(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),o=0;o<n.length;++o)r.add(i.fromJSON(n[o],t.methods[n[o]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},s.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return o.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(s.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=o.toArray(this.methods))}}),s.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},s.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},s.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof i?(this.methods[e.name]=e,e.parent=this,u(this)):n.prototype.add.call(this,e)},s.prototype.remove=function(e){if(e instanceof i){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,u(this)}return n.prototype.remove.call(this,e)},s.prototype.create=function(e,t,r){for(var n,i=new a.Service(e,t,r),s=0;s<this.methodsArray.length;++s){var u=o.lcFirst((n=this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g,"");i[u]=o.codegen(["r","c"],o.isReserved(u)?u+"_":u)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return i}},function(e,t,r){"use strict";e.exports=o;var n=r(128);((o.prototype=Object.create(n.prototype)).constructor=o).className="Method";var i=r(56);function o(e,t,r,o,a,s,u,c,f){if(i.isObject(a)?(u=a,a=s=void 0):i.isObject(s)&&(u=s,s=void 0),void 0!==t&&!i.isString(t))throw TypeError("type must be a string");if(!i.isString(r))throw TypeError("requestType must be a string");if(!i.isString(o))throw TypeError("responseType must be a string");n.call(this,e,u),this.type=t||"rpc",this.requestType=r,this.requestStream=!!a||void 0,this.responseType=o,this.responseStream=!!s||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=f}o.fromJSON=function(e,t){return new o(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},o.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},function(e,t,r){"use strict";e.exports=function(e){var t=o.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var s=e._fieldsArray[r].resolve(),u=s.resolvedType instanceof n?"int32":s.type,c="m"+o.safeProp(s.name);t("case %i:",s.id),s.map?(t("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),void 0!==i.defaults[s.keyType]?t("k=%j",i.defaults[s.keyType]):t("k=null"),void 0!==i.defaults[u]?t("value=%j",i.defaults[u]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",s.keyType)("case 2:"),void 0===i.basic[u]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",u),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==i.long[s.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',c):t("%s[k]=value",c)):s.repeated?(t("if(!(%s&&%s.length))",c,c)("%s=[]",c),void 0!==i.packed[u]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,u)("}else"),void 0===i.basic[u]?t(s.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,r):t("%s.push(r.%s())",c,u)):void 0===i.basic[u]?t(s.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,r):t("%s=r.%s()",c,u),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var f=e._fieldsArray[r];f.required&&t("if(!m.hasOwnProperty(%j))",f.name)("throw util.ProtocolError(%j,{instance:m})",a(f))}return t("return m")};var n=r(83),i=r(153),o=r(56);function a(e){return"missing required '"+e.name+"'"}},function(e,t,r){"use strict";e.exports=function(e){var t=i.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r=e.oneofsArray,n={};r.length&&t("var p={}");for(var u=0;u<e.fieldsArray.length;++u){var c=e._fieldsArray[u].resolve(),f="m"+i.safeProp(c.name);if(c.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",f,c.name),c.map)t("if(!util.isObject(%s))",f)("return%j",o(c,"object"))("var k=Object.keys(%s)",f)("for(var i=0;i<k.length;++i){"),s(t,c,"k[i]"),a(t,c,u,f+"[k[i]]")("}");else if(c.repeated)t("if(!Array.isArray(%s))",f)("return%j",o(c,"array"))("for(var i=0;i<%s.length;++i){",f),a(t,c,u,f+"[i]")("}");else{if(c.partOf){var l=i.safeProp(c.partOf.name);1===n[c.partOf.name]&&t("if(p%s===1)",l)("return%j",c.partOf.name+": multiple values"),n[c.partOf.name]=1,t("p%s=1",l)}a(t,c,u,f)}c.optional&&t("}")}return t("return null")};var n=r(83),i=r(56);function o(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function a(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",i)("default:")("return%j",o(t,"enum value"));for(var a=Object.keys(t.resolvedType.values),s=0;s<a.length;++s)e("case %i:",t.resolvedType.values[a[s]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,i)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",o(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",o(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",o(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",o(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",o(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",o(t,"buffer"))}return e}function s(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",o(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",o(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",o(t,"boolean key"))}return e}},function(e,t,r){"use strict";var n=t,i=r(83),o=r(56);function a(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof i){e("switch(d%s){",n);for(var o=t.resolvedType.values,a=Object.keys(o),s=0;s<a.length;++s)t.repeated&&o[a[s]]===t.typeDefault&&e("default:"),e("case%j:",a[s])("case %i:",o[a[s]])("m%s=%j",n,o[a[s]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var u=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,u)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,u?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function s(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof i?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var o=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":o=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,o?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=o.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var s=t[n].resolve(),u=o.safeProp(s.name);s.map?(r("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",s.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),a(r,s,n,u+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",s.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),a(r,s,n,u+"[i]")("}")("}")):(s.resolvedType instanceof i||r("if(d%s!=null){",u),a(r,s,n,u),s.resolvedType instanceof i||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(o.compareFieldsById);if(!t.length)return o.codegen()("return {}");for(var r=o.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],a=[],u=[],c=0;c<t.length;++c)t[c].partOf||(t[c].resolve().repeated?n:t[c].map?a:u).push(t[c]);if(n.length){for(r("if(o.arrays||o.defaults){"),c=0;c<n.length;++c)r("d%s=[]",o.safeProp(n[c].name));r("}")}if(a.length){for(r("if(o.objects||o.defaults){"),c=0;c<a.length;++c)r("d%s={}",o.safeProp(a[c].name));r("}")}if(u.length){for(r("if(o.defaults){"),c=0;c<u.length;++c){var f=u[c],l=o.safeProp(f.name);if(f.resolvedType instanceof i)r("d%s=o.enums===String?%j:%j",l,f.resolvedType.valuesById[f.typeDefault],f.typeDefault);else if(f.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",f.typeDefault.low,f.typeDefault.high,f.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,f.typeDefault.toString(),f.typeDefault.toNumber());else if(f.bytes){var h="["+Array.prototype.slice.call(f.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,f.typeDefault))("else{")("d%s=%s",l,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else r("d%s=%j",l,f.typeDefault)}r("}")}var d=!1;for(c=0;c<t.length;++c){f=t[c];var p=e._fieldsArray.indexOf(f);l=o.safeProp(f.name);f.map?(d||(d=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),s(r,f,p,l+"[ks2[j]]")("}")):f.repeated?(r("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),s(r,f,p,l+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",l,f.name),s(r,f,p,l),f.partOf&&r("if(o.oneofs)")("d%s=%j",o.safeProp(f.partOf.name),f.name)),r("}")}return r("return d")}},function(e,t,r){"use strict";var n=t,i=r(239);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(n);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof i){var a=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),a["@type"]=n,a}return this.toObject(e,t)}}},function(e,t,r){"use strict";e.exports=l;var n=r(152);((l.prototype=Object.create(n.prototype)).constructor=l).className="Root";var i,o,a,s=r(129),u=r(83),c=r(187),f=r(56);function l(e){n.call(this,"",e),this.deferred=[],this.files=[]}function h(){}l.fromJSON=function(e,t){return t||(t=new l),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},l.prototype.resolvePath=f.path.resolve,l.prototype.fetch=f.fetch,l.prototype.load=function e(t,r,n){"function"===typeof r&&(n=r,r=void 0);var i=this;if(!n)return f.asPromise(e,i,t,r);var s=n===h;function u(e,t){if(n){var r=n;if(n=null,s)throw e;r(e,t)}}function c(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in a)return r}return null}function l(e,t){try{if(f.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),f.isString(t)){o.filename=e;var n,a=o(t,i,r),l=0;if(a.imports)for(;l<a.imports.length;++l)(n=c(a.imports[l])||i.resolvePath(e,a.imports[l]))&&d(n);if(a.weakImports)for(l=0;l<a.weakImports.length;++l)(n=c(a.weakImports[l])||i.resolvePath(e,a.weakImports[l]))&&d(n,!0)}else i.setOptions(t.options).addJSON(t.nested)}catch(h){u(h)}s||p||u(null,i)}function d(e,t){if(!(i.files.indexOf(e)>-1))if(i.files.push(e),e in a)s?l(e,a[e]):(++p,setTimeout((function(){--p,l(e,a[e])})));else if(s){var r;try{r=f.fs.readFileSync(e).toString("utf8")}catch(o){return void(t||u(o))}l(e,r)}else++p,i.fetch(e,(function(r,o){--p,n&&(r?t?p||u(null,i):u(r):l(e,o))}))}var p=0;f.isString(t)&&(t=[t]);for(var v,y=0;y<t.length;++y)(v=i.resolvePath("",t[y]))&&d(v);if(s)return i;p||u(null,i)},l.prototype.loadSync=function(e,t){if(!f.isNode)throw Error("not supported");return this.load(e,t,h)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var d=/^[A-Z]/;function p(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new s(t.fullName,t.id,t.type,t.rule,void 0,t.options);return n.declaringField=t,t.extensionField=n,r.add(n),!0}return!1}l.prototype._handleAdd=function(e){if(e instanceof s)void 0===e.extend||e.extensionField||p(0,e)||this.deferred.push(e);else if(e instanceof u)d.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof c)){if(e instanceof i)for(var t=0;t<this.deferred.length;)p(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);d.test(e.name)&&(e.parent[e.name]=e)}},l.prototype._handleRemove=function(e){if(e instanceof s){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof u)d.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);d.test(e.name)&&delete e.parent[e.name]}},l._configure=function(e,t,r){i=e,o=t,a=r}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(554),i=r(555);t.keccak224=n.createHashFunction((function(){return i("keccak224")})),t.keccak256=n.createHashFunction((function(){return i("keccak256")})),t.keccak384=n.createHashFunction((function(){return i("keccak384")})),t.keccak512=n.createHashFunction((function(){return i("keccak512")}))},function(e,t){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,r){var n=r(558),i=r(61);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!==typeof t?i(e):t}},function(e,t,r){"use strict";(function(t,n){var i=r(189);e.exports=m;var o,a=r(335);m.ReadableState=g;r(57).EventEmitter;var s=function(e,t){return e.listeners(t).length},u=r(344),c=r(244).Buffer,f=t.Uint8Array||function(){};var l=Object.create(r(154));l.inherits=r(23);var h=r(559),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,v=r(560),y=r(345);l.inherits(m,u);var b=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var n=t instanceof(o=o||r(105));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(155).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function m(e){if(o=o||r(105),!(this instanceof m))return new m(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function w(e,t,r,n,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,_(e)}(e,a)):(i||(o=function(e,t){var r;n=t,c.isBuffer(n)||n instanceof f||"string"===typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):k(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?k(e,a,t,!1):x(e,a)):k(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function k(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&_(e)),x(e,t)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),m.prototype.destroy=y.destroy,m.prototype._undestroy=y.undestroy,m.prototype._destroy=function(e,t){this.push(null),t(e)},m.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"===typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),w(this,e,t,!1,r)},m.prototype.unshift=function(e){return w(this,e,null,!0,!1)},m.prototype.isPaused=function(){return!1===this._readableState.flowing},m.prototype.setEncoding=function(e){return p||(p=r(155).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var S=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){d("emit readable"),e.emit("readable"),O(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(T,e,t))}function T(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function M(e){d("readable nexttick read 0"),e.read(0)}function C(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),O(e),t.flowing&&!t.reading&&e.read(0)}function O(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function I(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}m.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):_(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?I(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:m;function c(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",y),e.removeListener("unpipe",c),r.removeListener("end",f),r.removeListener("end",m),r.removeListener("data",v),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",c);var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,O(e))}}(r);e.on("drain",l);var h=!1;var p=!1;function v(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function y(t){d("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",g),m()}function g(){d("onfinish"),e.removeListener("close",b),m()}function m(){d("unpipe"),r.unpipe(e)}return r.on("data",v),function(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",b),e.once("finish",g),e.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var a=B(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},m.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&_(this):i.nextTick(M,this))}return r},m.prototype.addListener=m.prototype.on,m.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(C,e,t))}(this,e)),this},m.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},m.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<b.length;o++)e.on(b[o],this.emit.bind(this,b[o]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=I}).call(this,r(36),r(39))},function(e,t,r){e.exports=r(57).EventEmitter},function(e,t,r){"use strict";var n=r(189);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),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(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(n){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(36))},function(e,t,r){"use strict";e.exports=a;var n=r(105),i=Object.create(r(154));function o(e,t){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!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"===typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(23),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(349),a=r(595);t.createPrivateKey=function(){return n(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,a.getRandomBytes(32)];case 1:return e=t.sent(),o.privateKeyVerify(e)?[2,e]:[3,0];case 2:return[2]}}))}))},t.createPrivateKeySync=function(){for(;;){var e=a.getRandomBytesSync(32);if(o.privateKeyVerify(e))return e}},function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r(349))},function(e,t,r){e.exports=r(573)(r(574))},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!==typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n=t;n.base=r(190),n.short=r(578),n.mont=r(579),n.edwards=r(580)},function(e,t,r){"use strict";var n=r(75).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(75),i=r(157),o=r(352),a=r(66),s=n.sum32,u=n.sum32_4,c=n.sum32_5,f=o.ch32,l=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,v=o.g1_256,y=i.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}n.inherits(g,y),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(v(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],b=this.h[3],g=this.h[4],m=this.h[5],w=this.h[6],k=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var S=c(k,d(g),f(g,m,w),this.k[n],r[n]),E=s(h(i),l(i,o,y));k=w,w=m,m=g,g=s(b,S),b=y,y=o,o=i,i=s(S,E)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],y),this.h[3]=s(this.h[3],b),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],m),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],k)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(75),i=r(157),o=r(66),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,l=n.sum64_hi,h=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,v=n.sum64_5_hi,y=n.sum64_5_lo,b=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function m(){if(!(this instanceof m))return new m;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function k(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function _(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function M(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function C(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(m,b),e.exports=m,m.blockSize=1024,m.outSize=512,m.hmacStrength=192,m.padLength=128,m.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=O(r[n-4],r[n-3]),o=I(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],u=M(r[n-30],r[n-29]),c=C(r[n-30],r[n-29]),f=r[n-32],l=r[n-31];r[n]=d(i,o,a,s,u,c,f,l),r[n+1]=p(i,o,a,s,u,c,f,l)}},m.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],d=this.h[6],p=this.h[7],b=this.h[8],g=this.h[9],m=this.h[10],M=this.h[11],C=this.h[12],O=this.h[13],I=this.h[14],P=this.h[15];o(this.k.length===r.length);for(var R=0;R<r.length;R+=2){var B=I,D=P,N=x(b,g),L=T(b,g),j=w(b,g,m,M,C),U=k(b,g,m,M,C,O),F=this.k[R],K=this.k[R+1],z=r[R],V=r[R+1],H=v(B,D,N,L,j,U,F,K,z,V),J=y(B,D,N,L,j,U,F,K,z,V);B=_(n,i),D=A(n,i),N=S(n,i,a,s,u),L=E(n,i,a,s,u,c);var q=l(B,D,N,L),G=h(B,D,N,L);I=C,P=O,C=m,O=M,m=b,M=g,b=l(d,p,H,J),g=h(p,p,H,J),d=u,p=c,u=a,c=s,a=n,s=i,n=l(H,J,q,G),i=h(H,J,q,G)}f(this.h,0,n,i),f(this.h,2,a,s),f(this.h,4,u,c),f(this.h,6,d,p),f(this.h,8,b,g),f(this.h,10,m,M),f(this.h,12,C,O),f(this.h,14,I,P)},m.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(28).Buffer,i=r(356).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(23)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(i){n=i}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var a=0,s=8*e.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){(t=e.exports=r(357)).Stream=t,t.Readable=t,t.Writable=r(361),t.Duplex=r(132),t.Transform=r(362),t.PassThrough=r(606),t.finished=r(250),t.pipeline=r(607)},function(e,t,r){"use strict";(function(t,n){var i;e.exports=A,A.ReadableState=_;r(57).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=r(358),s=r(13).Buffer,u=t.Uint8Array||function(){};var c,f=r(601);c=f&&f.debuglog?f.debuglog("stream"):function(){};var l,h,d,p=r(602),v=r(359),y=r(360).getHighWaterMark,b=r(131).codes,g=b.ERR_INVALID_ARG_TYPE,m=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,k=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(23)(A,a);var S=v.errorOrDestroy,E=["error","close","destroy","pause","resume"];function _(e,t,n){i=i||r(132),e=e||{},"boolean"!==typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",n),this.buffer=new p,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.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(155).StringDecoder),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function A(e){if(i=i||r(132),!(this instanceof A))return new A(e);var t=this instanceof i;this._readableState=new _(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function x(e,t,r,n,i){c("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}(e,a);else if(i||(o=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof u||"string"===typeof t||void 0===t||e.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(a,t)),o)S(e,o);else if(a.objectMode||t&&t.length>0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?S(e,new k):T(e,a,t,!0);else if(a.ended)S(e,new m);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?T(e,a,t,!1):P(e,a)):T(e,a,t,!1)}else n||(a.reading=!1,P(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&O(e)),P(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=v.destroy,A.prototype._undestroy=v.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"===typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=s.from(e,t),t=""),r=!0),x(this,e,t,!1,r)},A.prototype.unshift=function(e){return x(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){l||(l=r(155).StringDecoder);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var M=1073741824;function C(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(I,e))}function I(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function P(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function B(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){c("readable nexttick read 0"),e.read(0)}function N(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function U(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function K(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}A.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):O(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=C(r,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){S(this,new w("_read()"))},A.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:y;function s(t,n){c("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",h),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function u(){c("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var f=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",f);var l=!1;function h(t){c("ondata");var n=e.write(t);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==K(i.pipes,e))&&!l&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(t){c("onerror",t),y(),e.removeListener("error",d),0===o(e,"error")&&S(e,t)}function p(){e.removeListener("finish",v),y()}function v(){c("onfinish"),e.removeListener("close",p),y()}function y(){c("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",v),e.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=K(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},A.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||n.nextTick(D,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<E.length;o++)e.on(E[o],this.emit.bind(this,E[o]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"===typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(604)),h(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=j,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(A.from=function(e,t){return void 0===d&&(d=r(605)),d(A,e,t)})}).call(this,r(36),r(39))},function(e,t,r){e.exports=r(57).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!o&&e?a._writableState?a._writableState.errorEmitted?t.nextTick(n,a):(a._writableState.errorEmitted=!0,t.nextTick(r,a,e)):t.nextTick(r,a,e):o?(t.nextTick(n,a),o(e)):t.nextTick(n,a)})),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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(39))},function(e,t,r){"use strict";var n=r(131).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=A,A.WritableState=_;var a={deprecate:r(346)},s=r(358),u=r(13).Buffer,c=t.Uint8Array||function(){};var f,l=r(359),h=r(360).getHighWaterMark,d=r(131).codes,p=d.ERR_INVALID_ARG_TYPE,v=d.ERR_METHOD_NOT_IMPLEMENTED,y=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,g=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,k=d.ERR_UNKNOWN_ENCODING,S=l.errorOrDestroy;function E(){}function _(e,t,a){o=o||r(132),e=e||{},"boolean"!==typeof a&&(a=t instanceof o),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!==typeof o)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(I,e,t),e._writableState.errorEmitted=!0,S(e,i)):(o(i),e._writableState.errorEmitted=!0,S(e,i),I(e,t))}(e,r,i,t,o);else{var a=C(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||M(e,r),i?n.nextTick(T,e,r,a,o):T(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){var t=this instanceof(o=o||r(132));if(!t&&!f.call(A,this))return new A(e);this._writableState=new _(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),s.call(this)}function x(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function T(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),I(e,t)}function M(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,x(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(x(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),I(e,t)}))}function I(e,t){var r=C(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}r(23)(A,s),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(_.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===A&&(e&&e._writableState instanceof _)}})):f=function(e){return e instanceof this},A.prototype.pipe=function(){S(this,new b)},A.prototype.write=function(e,t,r){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,u.isBuffer(i)||i instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"===typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!==typeof r&&(r=E),o.ending?function(e,t){var r=new w;S(e,r),n.nextTick(t,r)}(this,r):(s||function(e,t,r,i){var o;return null===r?o=new m:"string"===typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(S(e,o),n.nextTick(i,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=u.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,s,n,i,o);return c}(this,o,s,e,t,r)),a},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||M(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new v("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var i=this._writableState;return"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,I(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}}).call(this,r(36),r(39))},function(e,t,r){"use strict";e.exports=f;var n=r(131).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(132);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!==typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(23)(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,r){var n=r(23),i=r(133),o=r(28).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,v=0|this._g,y=0|this._h,b=0;b<16;++b)r[b]=e.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((t=r[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[b-7]+d(r[b-15])+r[b-16];for(var g=0;g<64;++g){var m=y+h(u)+c(u,p,v)+a[g]+r[g]|0,w=l(n)+f(n,i,o)|0;y=v,v=p,p=u,u=s+m|0,s=o,o=i,i=n,n=m+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=v+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,r){var n=r(23),i=r(133),o=r(28).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function b(e,t){return e>>>0<t>>>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(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,g=0|this._gh,m=0|this._hh,w=0|this._al,k=0|this._bl,S=0|this._cl,E=0|this._dl,_=0|this._el,A=0|this._fl,x=0|this._gl,T=0|this._hl,M=0;M<32;M+=2)t[M]=e.readInt32BE(4*M),t[M+1]=e.readInt32BE(4*M+4);for(;M<160;M+=2){var C=t[M-30],O=t[M-30+1],I=d(C,O),P=p(O,C),R=v(C=t[M-4],O=t[M-4+1]),B=y(O,C),D=t[M-14],N=t[M-14+1],L=t[M-32],j=t[M-32+1],U=P+N|0,F=I+D+b(U,P)|0;F=(F=F+R+b(U=U+B|0,B)|0)+L+b(U=U+j|0,j)|0,t[M]=F,t[M+1]=U}for(var K=0;K<160;K+=2){F=t[K],U=t[K+1];var z=f(r,n,i),V=f(w,k,S),H=l(r,w),J=l(w,r),q=h(s,_),G=h(_,s),X=a[K],W=a[K+1],Z=c(s,u,g),Y=c(_,A,x),Q=T+G|0,$=m+q+b(Q,T)|0;$=($=($=$+Z+b(Q=Q+Y|0,Y)|0)+X+b(Q=Q+W|0,W)|0)+F+b(Q=Q+U|0,U)|0;var ee=J+V|0,te=H+z+b(ee,J)|0;m=g,T=x,g=u,x=A,u=s,A=_,s=o+$+b(_=E+Q|0,E)|0,o=i,E=S,i=n,S=k,n=r,k=w,r=$+te+b(w=Q+ee|0,Q)|0}this._al=this._al+w|0,this._bl=this._bl+k|0,this._cl=this._cl+S|0,this._dl=this._dl+E|0,this._el=this._el+_|0,this._fl=this._fl+A|0,this._gl=this._gl+x|0,this._hl=this._hl+T|0,this._ah=this._ah+r+b(this._al,w)|0,this._bh=this._bh+n+b(this._bl,k)|0,this._ch=this._ch+i+b(this._cl,S)|0,this._dh=this._dh+o+b(this._dl,E)|0,this._eh=this._eh+s+b(this._el,_)|0,this._fh=this._fh+u+b(this._fl,A)|0,this._gh=this._gh+g+b(this._gl,x)|0,this._hh=this._hh+m+b(this._hl,T)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t){e.exports=function(e){if("string"!==typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},function(e,t,r){"use strict";var n=r(29),i=r(98);function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var a=o("utf8","u",(function(e){return"u"+new TextDecoder("utf8").decode(e)}),(function(e){return(new TextEncoder).encode(e.substring(1))})),s=o("ascii","a",(function(e){for(var t="a",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(function(e){e=e.substring(1);for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),u=n({utf8:a,"utf-8":a,hex:i.bases.base16,latin1:s,ascii:s,binary:s},i.bases);e.exports=u},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(64);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,r){"use strict";var n=r(64),i=r(646),o=r(647),a=r(368),s=r(648),u=r(651),c=r(652),f=r(371);e.exports=function(e){return new Promise((function(t,r){var l=e.data,h=e.headers,d=e.responseType;n.isFormData(l)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(v+":"+y)}var b=s(e.baseURL,e.url);function g(){if(p){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,o={data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};i(t,r,o),p=null}}if(p.open(e.method.toUpperCase(),a(b,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,"onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(g)},p.onabort=function(){p&&(r(f("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(f("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var m=(e.withCredentials||c(b))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;m&&(h[e.xsrfHeaderName]=m)}"setRequestHeader"in p&&n.forEach(h,(function(e,t){"undefined"===typeof l&&"content-type"===t.toLowerCase()?delete h[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),d&&"json"!==d&&(p.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),l||(l=null),p.send(l)}))}},function(e,t,r){"use strict";var n=r(369);e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(64);e.exports=function(e,t){t=t||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=u(void 0,e[i])):r[i]=u(e[i],t[i])}n.forEach(i,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(o,c),n.forEach(a,(function(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=u(void 0,e[i])):r[i]=u(void 0,t[i])})),n.forEach(s,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var f=i.concat(o).concat(a).concat(s),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===f.indexOf(e)}));return n.forEach(l,c),r}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){var r=1e3,n=60*r,i=60*n,o=24*i,a=7*o,s=365.25*o;function u(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,t){t=t||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var u=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*a;case"days":case"day":case"d":return u*o;case"hours":case"hour":case"hrs":case"hr":case"h":return u*i;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return u(e,t,o,"day");if(t>=i)return u(e,t,i,"hour");if(t>=n)return u(e,t,n,"minute");if(t>=r)return u(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){"use strict";var n=r(662),i=r(195),o=r(90).CID,a=r(67).base32,s=r(58).base58btc,u=r(88),c=r(91),f=r(194).toString,l=r(667).fromString,h=r(380).concat;function d(e,t){return t instanceof Uint8Array?d.toString(e,t):d.toBytes(e,t)}function p(e){if(!n.isIP(e))throw new Error("invalid ip address");return n.toBytes(e)}function v(e){var t=new ArrayBuffer(2);return new DataView(t).setUint16(0,e),new Uint8Array(t)}function y(e){return new DataView(e.buffer).getUint16(e.byteOffset)}function b(e){var t=e.slice(0,e.length-2),r=e.slice(e.length-2);return f(t,"base32")+":"+y(r)}e.exports=d,d.toString=function(e,t){switch(i(e).code){case 4:case 41:return function(e){var t=n.toString(e);if(!t||!n.isIP(t))throw new Error("invalid ip address");return t}(t);case 6:case 273:case 33:case 132:return y(t).toString();case 53:case 54:case 55:case 56:case 400:case 777:return function(e){var t=c.decode(e);if((e=e.slice(c.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return f(e)}(t);case 421:return function(e){var t=c.decode(e),r=e.slice(c.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return f(r,"base58btc")}(t);case 444:case 445:return b(t);default:return f(t,"base16")}},d.toBytes=function(e,t){switch(i(e).code){case 4:case 41:return p(t);case 6:case 273:case 33:case 132:return v(parseInt(t,10));case 53:case 54:case 55:case 56:case 400:case 777:return function(e){var t=l(e),r=Uint8Array.from(c.encode(t.length));return h([r,t],r.length+t.length)}(t);case 421:return function(e){var t;t="Q"===e[0]||"1"===e[0]?u.decode(s.decode("z".concat(e))).bytes:o.parse(e).multihash.bytes;var r=Uint8Array.from(c.encode(t.length));return h([r,t],r.length+t.length)}(t);case 444:return function(e){var t=e.split(":");if(2!==t.length)throw new Error("failed to parse onion addr: "+t+" does not contain a port number");if(16!==t[0].length)throw new Error("failed to parse onion addr: "+t[0]+" not a Tor onion address.");var r=a.decode("b"+t[0]),n=parseInt(t[1],10);if(n<1||n>65536)throw new Error("Port number is not in range(1, 65536)");var i=v(n);return h([r,i],r.length+i.length)}(t);case 445:return function(e){var t=e.split(":");if(2!==t.length)throw new Error("failed to parse onion addr: "+t+" does not contain a port number");if(56!==t[0].length)throw new Error("failed to parse onion addr: "+t[0]+" not a Tor onion3 address.");var r=a.decode("b"+t[0]),n=parseInt(t[1],10);if(n<1||n>65536)throw new Error("Port number is not in range(1, 65536)");var i=v(n);return h([r,i],r.length+i.length)}(t);default:return l(t,"base16")}}},function(e,t,r){"use strict";var n="[a-fA-F\\d:]",i=function(e){return e&&e.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(n,")|(?<=").concat(n,")(?=\\s|$))"):""},o="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",a="[a-fA-F\\d]{1,4}",s="\n(?:\n(?:".concat(a,":){7}(?:").concat(a,"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:").concat(a,":){6}(?:").concat(o,"|:").concat(a,"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:").concat(a,":){5}(?::").concat(o,"|(?::").concat(a,"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:").concat(a,":){4}(?:(?::").concat(a,"){0,1}:").concat(o,"|(?::").concat(a,"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:").concat(a,":){3}(?:(?::").concat(a,"){0,2}:").concat(o,"|(?::").concat(a,"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:").concat(a,":){2}(?:(?::").concat(a,"){0,3}:").concat(o,"|(?::").concat(a,"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:").concat(a,":){1}(?:(?::").concat(a,"){0,4}:").concat(o,"|(?::").concat(a,"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::").concat(a,"){0,5}:").concat(o,"|(?::").concat(a,"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),u=new RegExp("(?:^".concat(o,"$)|(?:^").concat(s,"$)")),c=new RegExp("^".concat(o,"$")),f=new RegExp("^".concat(s,"$")),l=function(e){return e&&e.exact?u:new RegExp("(?:".concat(i(e)).concat(o).concat(i(e),")|(?:").concat(i(e)).concat(s).concat(i(e),")"),"g")};l.v4=function(e){return e&&e.exact?c:new RegExp("".concat(i(e)).concat(o).concat(i(e)),"g")},l.v6=function(e){return e&&e.exact?f:new RegExp("".concat(i(e)).concat(s).concat(i(e)),"g")},e.exports=l},function(e,t,r){"use strict";var n=r(29),i=r(98);function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var a=o("utf8","u",(function(e){return"u"+new TextDecoder("utf8").decode(e)}),(function(e){return(new TextEncoder).encode(e.substring(1))})),s=o("ascii","a",(function(e){for(var t="a",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(function(e){e=e.substring(1);for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),u=n({utf8:a,"utf-8":a,hex:i.bases.base16,latin1:s,ascii:s,binary:s},i.bases);e.exports=u},function(e,t,r){"use strict";var n=r(21);Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e,t){t||(t=e.reduce((function(e,t){return e+t.length}),0));var r,i=new Uint8Array(t),o=0,a=n(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}},,,function(e,t,r){"use strict";var n=r(23),i=r(670),o=r(97),a=r(28).Buffer,s=r(384),u=r(251),c=r(252),f=a.alloc(128);function l(e,t){o.call(this,"digest"),"string"===typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length<r&&(t=a.concat([t,f],r));for(var n=this._ipad=a.allocUnsafe(r),i=this._opad=a.allocUnsafe(r),s=0;s<r;s++)n[s]=54^t[s],i[s]=92^t[s];this._hash="rmd160"===e?new u:c(e),this._hash.update(n)}n(l,o),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new l("rmd160",t):"md5"===e?new i(s,t):new l(e,t)}},function(e,t,r){var n=r(249);e.exports=function(e){return(new n).update(e).digest()}},function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(e,t,r){t.pbkdf2=r(672),t.pbkdf2Sync=r(389)},function(e,t){var r=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!==typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!==typeof t)throw new TypeError("Key length not a number");if(t<0||t>r||t!==t)throw new TypeError("Bad key length")}},function(e,t,r){(function(t,r){var n;if(t.process&&t.process.browser)n="utf-8";else if(t.process&&t.process.version){n=parseInt(r.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";e.exports=n}).call(this,r(36),r(39))},function(e,t,r){var n=r(384),i=r(251),o=r(252),a=r(28).Buffer,s=r(387),u=r(388),c=r(390),f=a.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,r){var s=function(e){function t(t){return o(e).update(t).digest()}function r(e){return(new i).update(e).digest()}return"rmd160"===e||"ripemd160"===e?r:"md5"===e?n:t}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=s(t):t.length<u&&(t=a.concat([t,f],u));for(var c=a.allocUnsafe(u+l[e]),h=a.allocUnsafe(u+l[e]),d=0;d<u;d++)c[d]=54^t[d],h[d]=92^t[d];var p=a.allocUnsafe(u+r+4);c.copy(p,0,0,u),this.ipad1=p,this.ipad2=c,this.opad=h,this.alg=e,this.blocksize=u,this.hash=s,this.size=l[e]}h.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,n,i){s(r,n);var o=new h(i=i||"sha1",e=c(e,u,"Password"),(t=c(t,u,"Salt")).length),f=a.allocUnsafe(n),d=a.allocUnsafe(t.length+4);t.copy(d,0,0,t.length);for(var p=0,v=l[i],y=Math.ceil(n/v),b=1;b<=y;b++){d.writeUInt32BE(b,t.length);for(var g=o.run(d,o.ipad1),m=g,w=1;w<r;w++){m=o.run(m,o.ipad2);for(var k=0;k<v;k++)g[k]^=m[k]}g.copy(f,p),p+=v}return f}},function(e,t,r){var n=r(28).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"===typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},function(e,t,r){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,i){for(var o=0,a=0,s=n.length>>>1,u=0;u<s;u++)o<<=1,o|=e>>>n[u]&1;for(u=s;u<n.length;u++)a<<=1,a|=t>>>n[u]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r<o.length;r++)t<<=1,t|=e>>>o[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],o=0;o<t;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},function(e,t,r){"use strict";var n=r(66),i=r(23),o=r(391),a=r(257);function s(){this.tmp=new Array(2),this.keys=null}function u(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(u,a),e.exports=u,u.create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var s=c[a>>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},u.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,n,i){for(var a=t,s=r,u=0;u<e.keys.length;u+=2){var c=e.keys[u],f=e.keys[u+1];o.expand(s,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var l=o.substitute(c,f),h=s;s=(a^o.permute(l))>>>0,a=h}o.rip(s,a,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],f=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var l=o.substitute(c,f),h=a;a=(s^o.permute(l))>>>0,s=h}o.rip(a,s,n,i)}},function(e,t,r){var n=r(163),i=r(28).Buffer,o=r(394);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;s<r;s++){var u=a(e),c=o+16*s;e._cache.writeUInt32BE(u[0],c+0),e._cache.writeUInt32BE(u[1],c+4),e._cache.writeUInt32BE(u[2],c+8),e._cache.writeUInt32BE(u[3],c+12)}var f=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,f)}},function(e,t){e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(e,t,r){var n=r(197),i=r(28).Buffer,o=r(97),a=r(23),s=r(685),u=r(163),c=r(394);function f(e,t,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var f=this._cipher.encryptBlock(u);this._ghash=new s(f),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),e._finID=n.state;var l=i.from(e._finID);return c(l),l}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},f.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=f},function(e,t,r){var n=r(197),i=r(28).Buffer,o=r(97);function a(e,t,r,a){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}r(23)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},function(e,t,r){var n=r(106);e.exports=g,g.simpleSieve=y,g.fermatTest=b;var i=r(14),o=new i(24),a=new(r(399)),s=new i(1),u=new i(2),c=new i(5),f=(new i(16),new i(8),new i(10)),l=new i(3),h=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function v(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!==0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}function y(e){for(var t=v(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function b(e){var t=i.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function g(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(f).cmp(l);)r.iadd(d)}else for(;r.mod(o).cmp(h);)r.iadd(d);if(y(p=r.shrn(1))&&y(r)&&b(p)&&b(r)&&a.test(p)&&a.test(r))return r}}},function(e,t,r){var n=r(14),i=r(247);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),f=s.toRed(o);t>0;t--){var l=this._randrange(new n(2),s);r&&r(l);var h=l.toRed(o).redPow(c);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d<u;d++){if(0===(h=h.redSqr()).cmp(a))return!1;if(0===h.cmp(f))break}if(d===u)return!1}}return!0},o.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var u=e.shrn(s),c=a.toRed(i);t>0;t--){var f=this._randrange(new n(2),a),l=e.gcd(f);if(0!==l.cmpn(1))return l;var h=f.toRed(i).redPow(u);if(0!==h.cmp(o)&&0!==h.cmp(c)){for(var d=1;d<s;d++){if(0===(h=h.redSqr()).cmp(o))return h.fromRed().subn(1).gcd(e);if(0===h.cmp(c))break}if(d===s)return(h=h.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(695).Buffer}catch(M){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u<s;u++){var c=e.charCodeAt(u)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),o+=a}return o}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){f(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(M){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=p[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var v=l.modrn(f).toString(e);r=(l=l.idivn(f)).isZero()?v+r:h[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function v(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var y=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,v=d>>>13,y=0|a[2],b=8191&y,g=y>>>13,m=0|a[3],w=8191&m,k=m>>>13,S=0|a[4],E=8191&S,_=S>>>13,A=0|a[5],x=8191&A,T=A>>>13,M=0|a[6],C=8191&M,O=M>>>13,I=0|a[7],P=8191&I,R=I>>>13,B=0|a[8],D=8191&B,N=B>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],K=8191&F,z=F>>>13,V=0|s[1],H=8191&V,J=V>>>13,q=0|s[2],G=8191&q,X=q>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,K)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(v,K)|0,o=Math.imul(v,z);var be=(c+(n=n+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,K),i=(i=Math.imul(b,z))+Math.imul(g,K)|0,o=Math.imul(g,z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,J)|0;var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(k,K)|0,o=Math.imul(k,z),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,X)|0;var me=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(E,K),i=(i=Math.imul(E,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var ke=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(C,K),i=(i=Math.imul(C,z))+Math.imul(O,K)|0,o=Math.imul(O,z),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var Se=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,K),i=(i=Math.imul(P,z))+Math.imul(R,K)|0,o=Math.imul(R,z),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var Ee=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(N,K)|0,o=Math.imul(N,z),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var _e=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ae=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,J))+Math.imul(U,H)|0,o=Math.imul(U,J),n=n+Math.imul(D,G)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0;var xe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,X))+Math.imul(U,G)|0,o=Math.imul(U,X),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Te=(c+(n=n+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ve)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,Y))+Math.imul(U,Z)|0,o=Math.imul(U,Y),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,he)|0;var Me=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,he)|0;var Ce=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Oe=(c+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ve)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Ie=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,he)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,le),i=(i=Math.imul(j,he))+Math.imul(U,le)|0,o=Math.imul(U,he);var Re=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ve)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ve))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ve))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=be,u[2]=ge,u[3]=me,u[4]=we,u[5]=ke,u[6]=Se,u[7]=Ee,u[8]=_e,u[9]=Ae,u[10]=xe,u[11]=Te,u[12]=Me,u[13]=Ce,u[14]=Oe,u[15]=Ie,u[16]=Pe,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,l=(0|e.words[f])*(0|t.words[c]),h=67108863&l;s=67108863&(h=h+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(e,t,r){return b(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(y=v),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?y(this,e,t):r<63?v(this,e,t):r<1024?b(this,e,t):g(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},m.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=u,h=c,d=0;d<a;d++){var p=r[f+d],v=n[f+d],y=r[f+d+a],b=n[f+d+a],g=l*y-h*b;b=l*b+h*y,y=g,r[f+d]=p+y,n[f+d]=v+b,r[f+d+a]=p-y,n[f+d+a]=v-b,d!==s&&(g=u*l-c*h,h=u*h+c*l,l=g)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},m.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0===(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,l,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*l[d];u[d]=s[d]*l[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"===typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new x(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function k(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}k.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},k.prototype.split=function(e,t){e.iushrn(this.n,0,t)},k.prototype.imulK=function(e){return e.imul(this.k)},i(S,k),S.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,k),i(_,k),i(A,k),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,y=0;0!==v.cmp(s);y++)v=v.redSqr();n(y<p);var b=this.pow(l,new o(1).iushln(p-y-1));h=h.redMul(b),l=b.redSqr(),d=d.redMul(l),p=y}return h},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new T(e)},i(T,x),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(156)(e))},function(e,t,r){"use strict";var n=t;n.bignum=r(14),n.define=r(697).define,n.base=r(700),n.constants=r(701),n.decoders=r(404),n.encoders=r(402)},function(e,t,r){"use strict";var n=t;n.der=r(403),n.pem=r(698)},function(e,t,r){"use strict";var n=r(23),i=r(261).Buffer,o=r(262),a=r(264);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(u,o),u.prototype._encodeComposite=function(e,t,r,n){var o=function(e,t,r,n){var i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!==typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}if(i>=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var u=1,c=n.length;c>=256;c>>=8)u++;var f=i.alloc(2+u);f[0]=o,f[1]=128|u;for(var l=1+u,h=n.length;h>0;l--,h>>=8)f[l]=255&h;return this._createEncoderBuffer([f,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=i.alloc(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},u.prototype._encodeObjid=function(e,t,r){if("string"===typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(var o=0;o<e.length;o++)e[o]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s<e.length;s++){var u=e[s];for(a++;u>=128;u>>=7)a++}for(var c=i.alloc(a),f=c.length-1,l=e.length-1;l>=0;l--){var h=e[l];for(c[f--]=127&h;(h>>=7)>0;)c[f--]=128|127&h}return this._createEncoderBuffer(c)},u.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=i.from(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=i.alloc(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;s>=256;s>>=8)a++;for(var u=new Array(a),c=u.length-1;c>=0;c--)u[c]=255&e,e>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},function(e,t,r){"use strict";var n=t;n.der=r(405),n.pem=r(699)},function(e,t,r){"use strict";var n=r(23),i=r(14),o=r(164).DecoderBuffer,a=r(262),s=r(264);function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.call(this,"der",e)}function f(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=0===(32&r);if(31===(31&r)){var o=r;for(r=0;128===(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function l(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0===(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o<i;o++){n<<=8;var a=e.readUInt8(r);if(e.isError(a))return a;n|=a}return n}e.exports=u,u.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},n(c,a),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var n=e.save(),i=f(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){var n=f(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;var i=l(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){var r=f(e,t);if(e.isError(r))return r;var n=l(e,r.primitive,t);if(e.isError(n))return n;var i=void 0;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,n){for(var i=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var a=r.decode(e,"der",n);if(e.isError(a)&&o)break;i.push(a)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if("numstr"===t){var a=e.raw().toString("ascii");return this._isNumstr(a)?a:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,r){for(var n,i=[],o=0,a=0;!e.isEmpty();)o<<=7,o|=127&(a=e.readUInt8()),0===(128&a)&&(i.push(o),o=0);128&a&&i.push(o);var s=i[0]/40|0,u=i[0]%40;if(n=r?i:[s,u].concat(i.slice(1)),t){var c=t[n.join(" ")];void 0===c&&(c=t[n.join(".")]),void 0!==c&&(n=c)}return n},c.prototype._decodeTime=function(e,t){var r,n,i,o,a,s,u=e.raw().toString();if("gentime"===t)r=0|u.slice(0,4),n=0|u.slice(4,6),i=0|u.slice(6,8),o=0|u.slice(8,10),a=0|u.slice(10,12),s=0|u.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|u.slice(0,2),n=0|u.slice(2,4),i=0|u.slice(4,6),o=0|u.slice(6,8),a=0|u.slice(8,10),s=0|u.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,n-1,i,o,a,s,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){var r=e.raw(),n=new i(r);return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(e,t,r){var n=r(107),i=r(28).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,a=i.alloc(0),s=0;a.length<t;)r=o(s++),a=i.concat([a,n("sha1").update(e).update(r).digest()]);return a.slice(0,t)}},function(e,t){e.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},function(e,t,r){var n=r(14),i=r(28).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},function(e,t,r){"use strict";var n=t;n.version=r(713).version,n.utils=r(68),n.rand=r(412),n.curve=r(413),n.curves=r(265),n.ec=r(726),n.eddsa=r(730)},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!==typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"===typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"===typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(715);if("function"!==typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(a){}},function(e,t,r){"use strict";var n=t;n.base=r(200),n.short=r(716),n.mont=r(717),n.edwards=r(718)},function(e,t,r){"use strict";var n=r(77).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(77),i=r(166),o=r(414),a=r(108),s=n.sum32,u=n.sum32_4,c=n.sum32_5,f=o.ch32,l=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,v=o.g1_256,y=i.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}n.inherits(g,y),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(v(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],b=this.h[3],g=this.h[4],m=this.h[5],w=this.h[6],k=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var S=c(k,d(g),f(g,m,w),this.k[n],r[n]),E=s(h(i),l(i,o,y));k=w,w=m,m=g,g=s(b,S),b=y,y=o,o=i,i=s(S,E)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],y),this.h[3]=s(this.h[3],b),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],m),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],k)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(77),i=r(166),o=r(108),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,l=n.sum64_hi,h=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,v=n.sum64_5_hi,y=n.sum64_5_lo,b=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function m(){if(!(this instanceof m))return new m;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function k(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function _(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function M(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function C(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(m,b),e.exports=m,m.blockSize=1024,m.outSize=512,m.hmacStrength=192,m.padLength=128,m.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=O(r[n-4],r[n-3]),o=I(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],u=M(r[n-30],r[n-29]),c=C(r[n-30],r[n-29]),f=r[n-32],l=r[n-31];r[n]=d(i,o,a,s,u,c,f,l),r[n+1]=p(i,o,a,s,u,c,f,l)}},m.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],d=this.h[6],p=this.h[7],b=this.h[8],g=this.h[9],m=this.h[10],M=this.h[11],C=this.h[12],O=this.h[13],I=this.h[14],P=this.h[15];o(this.k.length===r.length);for(var R=0;R<r.length;R+=2){var B=I,D=P,N=x(b,g),L=T(b,g),j=w(b,g,m,M,C),U=k(b,g,m,M,C,O),F=this.k[R],K=this.k[R+1],z=r[R],V=r[R+1],H=v(B,D,N,L,j,U,F,K,z,V),J=y(B,D,N,L,j,U,F,K,z,V);B=_(n,i),D=A(n,i),N=S(n,i,a,s,u),L=E(n,i,a,s,u,c);var q=l(B,D,N,L),G=h(B,D,N,L);I=C,P=O,C=m,O=M,m=b,M=g,b=l(d,p,H,J),g=h(p,p,H,J),d=u,p=c,u=a,c=s,a=n,s=i,n=l(H,J,q,G),i=h(H,J,q,G)}f(this.h,0,n,i),f(this.h,2,a,s),f(this.h,4,u,c),f(this.h,6,d,p),f(this.h,8,b,g),f(this.h,10,m,M),f(this.h,12,C,O),f(this.h,14,I,P)},m.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},,,function(e,t,r){var n=r(241),i=r(341);function o(t,r,a){return i()?e.exports=o=Reflect.construct:e.exports=o=function(e,t,r){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return r&&n(o,r.prototype),o},o.apply(null,arguments)}e.exports=o},function(e,t,r){e.exports=r(737).default,e.exports.default=e.exports},,function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(202),a=r(743),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"},u=function(){var e=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.sign({name:"HMAC"},t,r);case 2:return i=e.sent,e.abrupt("return",new Uint8Array(i,i.byteOffset,i.byteLength));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.create=function(){var e=i(n.mark((function e(t,r){var c,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=s[t],e.next=3,o.get().subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]);case 3:return f=e.sent,e.abrupt("return",{digest:function(e){return i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u(f,e));case 1:case"end":return t.stop()}}),t)})))()},length:a[t]});case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},function(e,t,r){var n=r(18);r(34),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"===typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"===typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t,r){var n=r(18);r(34),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function o(e,t){if("string"===typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var r=e;e=n.util.createBuffer();for(var i=0;i<r.length;++i)e.putByte(r[i])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!n.util.isArray(e)){var o=[],a=t/4;for(i=0;i<a;++i)o.push(e.getInt32());e=o}return e}function a(e){e[e.length-1]=e[e.length-1]+1&4294967295}function s(e){return[e/4294967296|0,4294967295&e]}i.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.ecb.prototype.start=function(e){},i.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]);this._prev=this._outBlock},i.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)},i.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(o>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(o>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]);else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}a(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s(8*i)))}this._inBlock=this._j0.slice(0),a(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=s(8*t.length());var o=t.length()%this.blockSize;for(o&&t.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32());this._cipherLength+=this.blockSize}else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o<=0||r){if(r){var s=n%this.blockSize;this._cipherLength+=s,this._partialOutput.truncate(this.blockSize-s)}else this._cipherLength+=this.blockSize;for(i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),a(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),a(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize},i.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=n.util.createBuffer();var i=this._aDataLength.concat(s(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,i);var o=[];this.cipher.encrypt(this._j0,o);for(var a=0;a<this._ints;++a)this.tag.putInt32(this._s[a]^o[a]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},i.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),i=0;i<128;++i){e[i/32|0]&1<<31-i%32&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n)}return r},i.gcm.prototype.pow=function(e,t){for(var r=1&e[3],n=3;n>0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),a=0;a<i;++a){var s=[0,0,0,0],u=(n-1-a%n)*t;s[a/n|0]=1<<t-1<<u,o[a]=this.generateSubHashTable(this.multiply(s,e),t)}return o},i.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,i=new Array(r);i[n]=e.slice(0);for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o<n;){for(var a=1;a<o;++a){var s=i[o],u=i[a];i[o+a]=[s[0]^u[0],s[1]^u[1],s[2]^u[2],s[3]^u[3]]}o*=2}for(i[0]=[0,0,0,0],o=n+1;o<r;++o){var c=i[o^n];i[o]=[e[0]^c[0],e[1]^c[1],e[2]^c[2],e[3]^c[3]]}return i}},function(e,t,r){"use strict";var n=r(29),i=r(98);function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var a=o("utf8","u",(function(e){return"u"+new TextDecoder("utf8").decode(e)}),(function(e){return(new TextEncoder).encode(e.substring(1))})),s=o("ascii","a",(function(e){for(var t="a",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(function(e){e=e.substring(1);for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),u=n({utf8:a,"utf-8":a,hex:i.bases.base16,latin1:s,ascii:s,binary:s},i.bases);e.exports=u},function(e,t,r){"use strict";e.exports=l;var n,i=r(111),o=i.LongBits,a=i.base64,s=i.utf8;function u(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function c(){}function f(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}var h=function(){return i.Buffer?function(){return(l.create=function(){return new n})()}:function(){return new l}};function d(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function v(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}l.create=h(),l.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(l.alloc=i.pool(l.alloc,i.Array.prototype.subarray)),l.prototype._push=function(e,t,r){return this.tail=this.tail.next=new u(e,t,r),this.len+=t,this},p.prototype=Object.create(u.prototype),p.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(v,10,o.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=o.from(e);return this._push(v,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(v,t.length(),t)},l.prototype.bool=function(e){return this._push(d,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=o.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var b=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(d,1,0);if(i.isString(e)){var r=l.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(b,t,e)},l.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(d,1,0)},l.prototype.fork=function(){return this.states=new f(this),this.head=this.tail=new u(c,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(c,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},l._configure=function(e){n=e,l.create=h(),n._configure()}},function(e,t,r){"use strict";e.exports=u;var n,i=r(111),o=i.LongBits,a=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")},f=function(){return i.Buffer?function(e){return(u.create=function(e){return i.Buffer.isBuffer(e)?new n(e):c(e)})(e)}:c};function l(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw s(this,8);return new o(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}u.create=f(),u.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,u.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},u.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},u.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},u._configure=function(e){n=e,u.create=f(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(u.prototype,{int64:function(){return l.call(this)[t](!1)},uint64:function(){return l.call(this)[t](!0)},sint64:function(){return l.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},function(e,t,r){(function(t){var n=r(18);r(762),r(112),r(34);var i,o=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(i=r(271)),e.exports=n.pbkdf2=o.pbkdf2=function(e,r,o,a,s,u){if("function"===typeof s&&(u=s,s=null),n.util.isNodejs&&!n.options.usePureJavaScript&&i.pbkdf2&&(null===s||"object"!==typeof s)&&(i.pbkdf2Sync.length>4||!s||"sha1"===s))return"string"!==typeof s&&(s="sha1"),e=t.from(e,"binary"),r=t.from(r,"binary"),u?4===i.pbkdf2Sync.length?i.pbkdf2(e,r,o,a,(function(e,t){if(e)return u(e);u(null,t.toString("binary"))})):i.pbkdf2(e,r,o,a,s,(function(e,t){if(e)return u(e);u(null,t.toString("binary"))})):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,r,o,a).toString("binary"):i.pbkdf2Sync(e,r,o,a,s).toString("binary");if("undefined"!==typeof s&&null!==s||(s="sha1"),"string"===typeof s){if(!(s in n.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=n.md[s].create()}var c=s.digestLength;if(a>4294967295*c){var f=new Error("Derived key is too long.");if(u)return u(f);throw f}var l=Math.ceil(a/c),h=a-(l-1)*c,d=n.hmac.create();d.start(s,e);var p,v,y,b="";if(!u){for(var g=1;g<=l;++g){d.start(null,null),d.update(r),d.update(n.util.int32ToBytes(g)),p=y=d.digest().getBytes();for(var m=2;m<=o;++m)d.start(null,null),d.update(y),v=d.digest().getBytes(),p=n.util.xorBytes(p,v,c),y=v;b+=g<l?p:p.substr(0,h)}return b}g=1;function w(){if(g>l)return u(null,b);d.start(null,null),d.update(r),d.update(n.util.int32ToBytes(g)),p=y=d.digest().getBytes(),m=2,k()}function k(){if(m<=o)return d.start(null,null),d.update(y),v=d.digest().getBytes(),p=n.util.xorBytes(p,v,c),y=v,++m,n.util.setImmediate(k);b+=g<l?p:p.substr(0,h),++g,w()}w()}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(203).concat,a=r(110).fromString,s=r(202);e.exports={create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.algorithm,r=void 0===t?"AES-GCM":t,u=e.nonceLength,c=void 0===u?12:u,f=e.keyLength,l=void 0===f?16:f,h=e.digest,d=void 0===h?"SHA-256":h,p=e.saltLength,v=void 0===p?16:p,y=e.iterations,b=void 0===y?32767:y,g=s.get();function m(e,t){return w.apply(this,arguments)}function w(){return(w=i(n.mark((function e(t,i){var s,u,f,h,p,y,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=g.getRandomValues(new Uint8Array(v)),u=g.getRandomValues(new Uint8Array(c)),f={name:r,iv:u},h={name:"PBKDF2",salt:s,iterations:b,hash:{name:d}},e.next=6,g.subtle.importKey("raw",a(i),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]);case 6:return p=e.sent,e.next=9,g.subtle.deriveKey(h,p,{name:r,length:l},!0,["encrypt"]);case 9:return y=e.sent,e.next=12,g.subtle.encrypt(f,y,t);case 12:return m=e.sent,e.abrupt("return",o([s,f.iv,new Uint8Array(m)]));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t){return S.apply(this,arguments)}function S(){return(S=i(n.mark((function e(t,i){var o,s,u,f,h,p,y,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.slice(0,v),s=t.slice(v,v+c),u=t.slice(v+c),f={name:r,iv:s},h={name:"PBKDF2",salt:o,iterations:b,hash:{name:d}},e.next=7,g.subtle.importKey("raw",a(i),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]);case 7:return p=e.sent,e.next=10,g.subtle.deriveKey(h,p,{name:r,length:l},!0,["decrypt"]);case 10:return y=e.sent,e.next=13,g.subtle.decrypt(f,y,u);case 13:return m=e.sent,e.abrupt("return",new Uint8Array(m));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return l*=8,{encrypt:m,decrypt:k}}}},function(e,t,r){(function(t){var n=r(18);r(114),r(113),r(137),r(34);var i=r(771),o=i.publicKeyValidator,a=i.privateKeyValidator;if("undefined"===typeof s)var s=n.jsbn.BigInteger;var u=n.util.ByteBuffer,c="undefined"===typeof t?Uint8Array:t;n.pki=n.pki||{},e.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var f=n.ed25519;function l(e){var r=e.message;if(r instanceof Uint8Array||r instanceof c)return r;var n=e.encoding;if(void 0===r){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');r=e.md.digest().getBytes(),n="binary"}if("string"===typeof r&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"===typeof r){if("undefined"!==typeof t)return t.from(r,n);r=new u(r,n)}else if(!(r instanceof u))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var i=new c(r.length()),o=0;o<i.length;++o)i[o]=r.at(o);return i}f.constants={},f.constants.PUBLIC_KEY_BYTE_LENGTH=32,f.constants.PRIVATE_KEY_BYTE_LENGTH=64,f.constants.SEED_BYTE_LENGTH=32,f.constants.SIGN_BYTE_LENGTH=64,f.constants.HASH_BYTE_LENGTH=64,f.generateKeyPair=function(e){var t=(e=e||{}).seed;if(void 0===t)t=n.random.getBytesSync(f.constants.SEED_BYTE_LENGTH);else if("string"===typeof t){if(t.length!==f.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+f.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=l({message:t,encoding:"binary"});for(var r=new c(f.constants.PUBLIC_KEY_BYTE_LENGTH),i=new c(f.constants.PRIVATE_KEY_BYTE_LENGTH),o=0;o<32;++o)i[o]=t[o];return function(e,t){var r,n=[D(),D(),D(),D()],i=w(t,32);for(i[0]&=248,i[31]&=127,i[31]|=64,I(n,i),A(e,n),r=0;r<32;++r)t[r+32]=e[r]}(r,i),{publicKey:r,privateKey:i}},f.privateKeyFromAsn1=function(e){var t={},r=[];if(!n.asn1.validate(e,a,t,r)){var i=new Error("Invalid Key.");throw i.errors=r,i}var o=n.asn1.derToOid(t.privateKeyOid),s=n.oids.EdDSA25519;if(o!==s)throw new Error('Invalid OID "'+o+'"; OID must be "'+s+'".');var u=t.privateKey;return{privateKeyBytes:l({message:n.asn1.fromDer(u).value,encoding:"binary"})}},f.publicKeyFromAsn1=function(e){var t={},r=[];if(!n.asn1.validate(e,o,t,r)){var i=new Error("Invalid Key.");throw i.errors=r,i}var a=n.asn1.derToOid(t.publicKeyOid),s=n.oids.EdDSA25519;if(a!==s)throw new Error('Invalid OID "'+a+'"; OID must be "'+s+'".');var u=t.ed25519PublicKey;if(u.length!==f.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return l({message:u,encoding:"binary"})},f.publicKeyFromPrivateKey=function(e){var t=l({message:(e=e||{}).privateKey,encoding:"binary"});if(t.length!==f.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+f.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new c(f.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<r.length;++n)r[n]=t[32+n];return r},f.sign=function(e){var t=l(e=e||{}),r=l({message:e.privateKey,encoding:"binary"});if(r.length===f.constants.SEED_BYTE_LENGTH)r=f.generateKeyPair({seed:r}).privateKey;else if(r.length!==f.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+f.constants.SEED_BYTE_LENGTH+" or "+f.constants.PRIVATE_KEY_BYTE_LENGTH);var n=new c(f.constants.SIGN_BYTE_LENGTH+t.length);!function(e,t,r,n){var i,o,a=new Float64Array(64),s=[D(),D(),D(),D()],u=w(n,32);u[0]&=248,u[31]&=127,u[31]|=64;var c=r+64;for(i=0;i<r;++i)e[64+i]=t[i];for(i=0;i<32;++i)e[32+i]=u[32+i];var f=w(e.subarray(32),r+32);for(S(f),I(s,f),A(e,s),i=32;i<64;++i)e[i]=n[i];var l=w(e,r+64);for(S(l),i=32;i<64;++i)a[i]=0;for(i=0;i<32;++i)a[i]=f[i];for(i=0;i<32;++i)for(o=0;o<32;o++)a[i+o]+=l[i]*u[o];k(e.subarray(32),a)}(n,t,t.length,r);for(var i=new c(f.constants.SIGN_BYTE_LENGTH),o=0;o<i.length;++o)i[o]=n[o];return i},f.verify=function(e){var t=l(e=e||{});if(void 0===e.signature)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var r=l({message:e.signature,encoding:"binary"});if(r.length!==f.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+f.constants.SIGN_BYTE_LENGTH);var n=l({message:e.publicKey,encoding:"binary"});if(n.length!==f.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+f.constants.PUBLIC_KEY_BYTE_LENGTH);var i,o=new c(f.constants.SIGN_BYTE_LENGTH+t.length),a=new c(f.constants.SIGN_BYTE_LENGTH+t.length);for(i=0;i<f.constants.SIGN_BYTE_LENGTH;++i)o[i]=r[i];for(i=0;i<t.length;++i)o[i+f.constants.SIGN_BYTE_LENGTH]=t[i];return function(e,t,r,n){var i,o=new c(32),a=[D(),D(),D(),D()],s=[D(),D(),D(),D()];if(-1,r<64)return-1;if(function(e,t){var r=D(),n=D(),i=D(),o=D(),a=D(),s=D(),u=D();P(e[2],d),function(e,t){var r;for(r=0;r<16;++r)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(e[1],t),j(i,e[1]),U(o,i,p),L(i,i,e[2]),N(o,e[2],o),j(a,o),j(s,a),U(u,s,a),U(r,u,i),U(r,r,o),function(e,t){var r,n=D();for(r=0;r<16;++r)n[r]=t[r];for(r=250;r>=0;--r)j(n,n),1!==r&&U(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(r,r),U(r,r,i),U(r,r,o),U(r,r,o),U(e[0],r,o),j(n,e[0]),U(n,n,o),T(n,i)&&U(e[0],e[0],m);if(j(n,e[0]),U(n,n,o),T(n,i))return-1;C(e[0])===t[31]>>7&&L(e[0],h,e[0]);return U(e[3],e[0],e[1]),0}(s,n))return-1;for(i=0;i<r;++i)e[i]=t[i];for(i=0;i<32;++i)e[i+32]=n[i];var u=w(e,r);if(S(u),O(a,s,u),I(s,t.subarray(32)),E(a,s),A(o,a),r-=64,M(t,0,o,0)){for(i=0;i<r;++i)e[i]=0;return-1}for(i=0;i<r;++i)e[i]=t[i+64];return r}(a,o,o.length,n)>=0};var h=D(),d=D([1]),p=D([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),v=D([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),y=D([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),b=D([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),g=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),m=D([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function w(e,r){var i=n.md.sha512.create(),o=new u(e);i.update(o.getBytes(r),"binary");var a=i.digest().getBytes();if("undefined"!==typeof t)return t.from(a,"binary");for(var s=new c(f.constants.HASH_BYTE_LENGTH),l=0;l<64;++l)s[l]=a.charCodeAt(l);return s}function k(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*g[i-(n-32)],r=t[i]+128>>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*g[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*g[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function S(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;k(e,t)}function E(e,t){var r=D(),n=D(),i=D(),o=D(),a=D(),s=D(),u=D(),c=D(),f=D();L(r,e[1],e[0]),L(f,t[1],t[0]),U(r,r,f),N(n,e[0],e[1]),N(f,t[0],t[1]),U(n,n,f),U(i,e[3],t[3]),U(i,i,v),U(o,e[2],t[2]),N(o,o,o),L(a,n,r),L(s,o,i),N(u,o,i),N(c,n,r),U(e[0],a,s),U(e[1],c,u),U(e[2],u,s),U(e[3],a,c)}function _(e,t,r){for(var n=0;n<4;++n)B(e[n],t[n],r)}function A(e,t){var r=D(),n=D(),i=D();!function(e,t){var r,n=D();for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)j(n,n),2!==r&&4!==r&&U(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(i,t[2]),U(r,t[0],i),U(n,t[1],i),x(e,n),e[31]^=C(r)<<7}function x(e,t){var r,n,i,o=D(),a=D();for(r=0;r<16;++r)a[r]=t[r];for(R(a),R(a),R(a),n=0;n<2;++n){for(o[0]=a[0]-65517,r=1;r<15;++r)o[r]=a[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=a[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,B(a,o,1-i)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function T(e,t){var r=new c(32),n=new c(32);return x(r,e),x(n,t),M(r,0,n,0)}function M(e,t,r,n){return function(e,t,r,n,i){var o,a=0;for(o=0;o<i;++o)a|=e[t+o]^r[n+o];return(1&a-1>>>8)-1}(e,t,r,n,32)}function C(e){var t=new c(32);return x(t,e),1&t[0]}function O(e,t,r){var n,i;for(P(e[0],h),P(e[1],d),P(e[2],d),P(e[3],h),i=255;i>=0;--i)_(e,t,n=r[i/8|0]>>(7&i)&1),E(t,e),E(e,e),_(e,t,n)}function I(e,t){var r=[D(),D(),D(),D()];P(r[0],y),P(r[1],b),P(r[2],d),U(r[3],y,b),O(e,r,t)}function P(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function R(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function B(e,t,r){for(var n,i=~(r-1),o=0;o<16;++o)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function D(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;++t)r[t]=e[t];return r}function N(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]+r[n]}function L(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]-r[n]}function j(e,t){U(e,t,t)}function U(e,t,r){var n,i,o=0,a=0,s=0,u=0,c=0,f=0,l=0,h=0,d=0,p=0,v=0,y=0,b=0,g=0,m=0,w=0,k=0,S=0,E=0,_=0,A=0,x=0,T=0,M=0,C=0,O=0,I=0,P=0,R=0,B=0,D=0,N=r[0],L=r[1],j=r[2],U=r[3],F=r[4],K=r[5],z=r[6],V=r[7],H=r[8],J=r[9],q=r[10],G=r[11],X=r[12],W=r[13],Z=r[14],Y=r[15];o+=(n=t[0])*N,a+=n*L,s+=n*j,u+=n*U,c+=n*F,f+=n*K,l+=n*z,h+=n*V,d+=n*H,p+=n*J,v+=n*q,y+=n*G,b+=n*X,g+=n*W,m+=n*Z,w+=n*Y,a+=(n=t[1])*N,s+=n*L,u+=n*j,c+=n*U,f+=n*F,l+=n*K,h+=n*z,d+=n*V,p+=n*H,v+=n*J,y+=n*q,b+=n*G,g+=n*X,m+=n*W,w+=n*Z,k+=n*Y,s+=(n=t[2])*N,u+=n*L,c+=n*j,f+=n*U,l+=n*F,h+=n*K,d+=n*z,p+=n*V,v+=n*H,y+=n*J,b+=n*q,g+=n*G,m+=n*X,w+=n*W,k+=n*Z,S+=n*Y,u+=(n=t[3])*N,c+=n*L,f+=n*j,l+=n*U,h+=n*F,d+=n*K,p+=n*z,v+=n*V,y+=n*H,b+=n*J,g+=n*q,m+=n*G,w+=n*X,k+=n*W,S+=n*Z,E+=n*Y,c+=(n=t[4])*N,f+=n*L,l+=n*j,h+=n*U,d+=n*F,p+=n*K,v+=n*z,y+=n*V,b+=n*H,g+=n*J,m+=n*q,w+=n*G,k+=n*X,S+=n*W,E+=n*Z,_+=n*Y,f+=(n=t[5])*N,l+=n*L,h+=n*j,d+=n*U,p+=n*F,v+=n*K,y+=n*z,b+=n*V,g+=n*H,m+=n*J,w+=n*q,k+=n*G,S+=n*X,E+=n*W,_+=n*Z,A+=n*Y,l+=(n=t[6])*N,h+=n*L,d+=n*j,p+=n*U,v+=n*F,y+=n*K,b+=n*z,g+=n*V,m+=n*H,w+=n*J,k+=n*q,S+=n*G,E+=n*X,_+=n*W,A+=n*Z,x+=n*Y,h+=(n=t[7])*N,d+=n*L,p+=n*j,v+=n*U,y+=n*F,b+=n*K,g+=n*z,m+=n*V,w+=n*H,k+=n*J,S+=n*q,E+=n*G,_+=n*X,A+=n*W,x+=n*Z,T+=n*Y,d+=(n=t[8])*N,p+=n*L,v+=n*j,y+=n*U,b+=n*F,g+=n*K,m+=n*z,w+=n*V,k+=n*H,S+=n*J,E+=n*q,_+=n*G,A+=n*X,x+=n*W,T+=n*Z,M+=n*Y,p+=(n=t[9])*N,v+=n*L,y+=n*j,b+=n*U,g+=n*F,m+=n*K,w+=n*z,k+=n*V,S+=n*H,E+=n*J,_+=n*q,A+=n*G,x+=n*X,T+=n*W,M+=n*Z,C+=n*Y,v+=(n=t[10])*N,y+=n*L,b+=n*j,g+=n*U,m+=n*F,w+=n*K,k+=n*z,S+=n*V,E+=n*H,_+=n*J,A+=n*q,x+=n*G,T+=n*X,M+=n*W,C+=n*Z,O+=n*Y,y+=(n=t[11])*N,b+=n*L,g+=n*j,m+=n*U,w+=n*F,k+=n*K,S+=n*z,E+=n*V,_+=n*H,A+=n*J,x+=n*q,T+=n*G,M+=n*X,C+=n*W,O+=n*Z,I+=n*Y,b+=(n=t[12])*N,g+=n*L,m+=n*j,w+=n*U,k+=n*F,S+=n*K,E+=n*z,_+=n*V,A+=n*H,x+=n*J,T+=n*q,M+=n*G,C+=n*X,O+=n*W,I+=n*Z,P+=n*Y,g+=(n=t[13])*N,m+=n*L,w+=n*j,k+=n*U,S+=n*F,E+=n*K,_+=n*z,A+=n*V,x+=n*H,T+=n*J,M+=n*q,C+=n*G,O+=n*X,I+=n*W,P+=n*Z,R+=n*Y,m+=(n=t[14])*N,w+=n*L,k+=n*j,S+=n*U,E+=n*F,_+=n*K,A+=n*z,x+=n*V,T+=n*H,M+=n*J,C+=n*q,O+=n*G,I+=n*X,P+=n*W,R+=n*Z,B+=n*Y,w+=(n=t[15])*N,a+=38*(S+=n*j),s+=38*(E+=n*U),u+=38*(_+=n*F),c+=38*(A+=n*K),f+=38*(x+=n*z),l+=38*(T+=n*V),h+=38*(M+=n*H),d+=38*(C+=n*J),p+=38*(O+=n*q),v+=38*(I+=n*G),y+=38*(P+=n*X),b+=38*(R+=n*W),g+=38*(B+=n*Z),m+=38*(D+=n*Y),o=(n=(o+=38*(k+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=f,e[6]=l,e[7]=h,e[8]=d,e[9]=p,e[10]=v,e[11]=y,e[12]=b,e[13]=g,e[14]=m,e[15]=w}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";var n=r(29),i=r(98);function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var a=o("utf8","u",(function(e){return"u"+new TextDecoder("utf8").decode(e)}),(function(e){return(new TextEncoder).encode(e.substring(1))})),s=o("ascii","a",(function(e){for(var t="a",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(function(e){e=e.substring(1);for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),u=n({utf8:a,"utf-8":a,hex:i.bases.base16,latin1:s,ascii:s,binary:s},i.bases);e.exports=u},function(e,t,r){"use strict";var n=r(29),i=r(98);function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var a=o("utf8","u",(function(e){return"u"+new TextDecoder("utf8").decode(e)}),(function(e){return(new TextEncoder).encode(e.substring(1))})),s=o("ascii","a",(function(e){for(var t="a",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(function(e){e=e.substring(1);for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),u=n({utf8:a,"utf-8":a,hex:i.bases.base16,latin1:s,ascii:s,binary:s},i.bases);e.exports=u},,,function(e,t,r){"use strict";(function(t){function n(e,t){Object.defineProperty(e,"super_",{value:t,writable:!0,configurable:!0}),Object.setPrototypeOf(e.prototype,t.prototype)}var i="undefined"!==typeof t?t.AbortError:"undefined"!==typeof window?window.AbortError:null;function o(e,t,r){Error.captureStackTrace(this,o),this.message="status="+t+" while requesting "+e+" ["+r+"]",this.uri=e,this.status=t,this.method=r}function a(e,t){Error.captureStackTrace(this,a),this.message=e,this.cause=t}function s(e){Error.captureStackTrace(this,s),this.message="Timeout (t="+e+").",this.timeout=e}function u(e){if(e.protocol){if(!["http:","https:","udp4:","udp6:"].includes(e.protocol))throw new Error('Invalid Endpoint: unsupported protocol "'.concat(e.protocol,'" for endpoint: ').concat(JSON.stringify(e)))}else e.protocol="https:";if("string"!==typeof e.host)throw new Error('Invalid Endpoint: host "'.concat(e.host,'" needs to be a string: ').concat(JSON.stringify(e)));if("number"!==typeof e.port&&!isNaN(e.port))throw new Error('Invalid Endpoint: port "'.concat(e.port,'" needs to be a number: ').concat(JSON.stringify(e)));for(var t in e)void 0!==e[t]&&(this[t]=e[t])}i||(n(i=function(){Error.captureStackTrace(this,i),this.message="Request aborted."},Error),i.prototype.code="ABORT_ERR",i.prototype.name="AbortError"),n(o,Error),o.prototype.code="HTTP_STATUS",o.prototype.name="StatusError",n(a,Error),a.prototype.code="RESPONSE_ERR",a.prototype.name="ResponseError",n(s,Error),s.prototype.code="ETIMEOUT",s.prototype.name="TimeoutError";var c=r(812),f={};for(var l in c)f[l]=new u(c[l]);e.exports={endpoints:f,AbortError:i,HTTPStatusError:o,ResponseError:a,TimeoutError:s,Endpoint:u}}).call(this,r(36))},,function(e,t){e.exports=function(e){this.wrapped=e}},function(e,t,r){var n=r(0),i=r(45),o=r(44),a=r(30),s=r(79);e.exports=function(e){var t=o(n.mark((function t(){var r,o,u,c,f,l,h,d,p,v;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void(t.next=2);case 2:r=t.sent,o=new s,u=!0,c=!1,t.prev=6,l=a(e);case 8:return t.next=10,i(l.next());case 10:return h=t.sent,u=h.done,t.next=14,i(h.value);case 14:if(d=t.sent,u){t.next=42;break}if(p=d,r){t.next=23;break}return t.next=20,o.append(p);case 20:return r=t.sent,o=new s,t.abrupt("continue",39);case 23:o.append(p);case 24:if(!(o.length>=r)){t.next=39;break}return v=o.shallowSlice(0,r),o.consume(r),t.next=29,v;case 29:if(r=t.sent){t.next=37;break}if(!o.length){t.next=36;break}return t.next=34,o;case 34:r=t.sent,o=new s;case 36:return t.abrupt("break",39);case 37:t.next=24;break;case 39:u=!0,t.next=8;break;case 42:t.next=48;break;case 44:t.prev=44,t.t0=t.catch(6),c=!0,f=t.t0;case 48:if(t.prev=48,t.prev=49,u||null==l.return){t.next=53;break}return t.next=53,i(l.return());case 53:if(t.prev=53,!c){t.next=56;break}throw f;case 56:return t.finish(53);case 57:return t.finish(48);case 58:if(!r){t.next=60;break}throw Object.assign(new Error("stream ended before ".concat(r," bytes became available")),{code:"ERR_UNDER_READ",buffer:o});case 60:case"end":return t.stop()}}),t,null,[[6,44,48,58],[49,,53,57]])})))();return t.next(),t}},function(e,t,r){var n=r(8),i=r(9),o=r(824);e.exports=function(){"use strict";function e(t){n(this,e),this.hwm=t||16,this.head=new o(this.hwm),this.tail=this.head}return i(e,[{key:"push",value:function(e){if(!this.head.push(e)){var t=this.head;this.head=t.next=new o(2*this.head.buffer.length),this.head.push(e)}}},{key:"shift",value:function(){var e=this.tail.shift();if(void 0===e&&this.tail.next){var t=this.tail.next;return this.tail.next=null,this.tail=t,this.tail.shift()}return e}},{key:"isEmpty",value:function(){return this.head.isEmpty()}}]),e}()},function(e,t,r){"use strict";var n=r(91),i=r(13).Buffer;e.exports=function e(t,r,o){var a=n.encode(t,r,o);return e.bytes=n.encode.bytes,r||i.from(a)}},function(e,t,r){"use strict";var n=r(91),i=r(13).Buffer;e.exports=function e(t){var r,o=n.decode(i.isBuffer(t)?t:(r=t,new Proxy({},{get:function(e,t){return"l"===t[0]?r[t]:r.get(parseInt(t))}})));return e.bytes=n.decode.bytes,o}},function(e,t){e.exports=function(e){if(e){if("function"===typeof e[Symbol.iterator])return e[Symbol.iterator]();if("function"===typeof e[Symbol.asyncIterator])return e[Symbol.asyncIterator]();if("function"===typeof e.next)return e}throw new Error("argument is not an iterator or iterable")}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9);Object.defineProperty(t,"__esModule",{value:!0}),t.XXHandshake=void 0;var s=r(13),u=r(831),c=r(115),f=r(174),l=r(209),h=function(){function e(t,r,n,i,a,c,f){o(this,e),this.isInitiator=t,this.payload=r,this.prologue=n,this.staticKeypair=i,this.connection=a,c&&(this.remotePeer=c),this.xx=null!==f&&void 0!==f?f:new u.XX,this.session=this.xx.initSession(this.isInitiator,this.prologue,this.staticKeypair),this.remoteEarlyData=s.Buffer.alloc(0)}return a(e,[{key:"propose",value:function(){var e=i(n.mark((function e(){var t,r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f.logLocalStaticKeys(this.session.hs.s),!this.isInitiator){e.next=9;break}f.logger("Stage 0 - Initiator starting to send first message."),t=this.xx.sendMessage(this.session,s.Buffer.alloc(0)),this.connection.writeLP(l.encode0(t)),f.logger("Stage 0 - Initiator finished sending first message."),f.logLocalEphemeralKeys(this.session.hs.e),e.next=20;break;case 9:return f.logger("Stage 0 - Responder waiting to receive first message..."),e.t0=l,e.next=13,this.connection.readLP();case 13:if(e.t1=e.sent.slice(),r=e.t0.decode0.call(e.t0,e.t1),i=this.xx.recvMessage(this.session,r),i.valid){e.next=18;break}throw new Error("xx handshake stage 0 validation fail");case 18:f.logger("Stage 0 - Responder received first message."),f.logRemoteEphemeralKey(this.session.hs.re);case 20:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"exchange",value:function(){var e=i(n.mark((function e(){var t,r,i,o,a,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isInitiator){e.next=37;break}return f.logger("Stage 1 - Initiator waiting to receive first message from responder..."),e.t0=l,e.next=5,this.connection.readLP();case 5:if(e.t1=e.sent.slice(),t=e.t0.decode1.call(e.t0,e.t1),r=this.xx.recvMessage(this.session,t),i=r.plaintext,r.valid){e.next=10;break}throw new Error("xx handshake stage 1 validation fail");case 10:return f.logger("Stage 1 - Initiator received the message."),f.logRemoteEphemeralKey(this.session.hs.re),f.logRemoteStaticKey(this.session.hs.rs),f.logger("Initiator going to check remote's signature..."),e.prev=14,e.next=17,c.decodePayload(i);case 17:if(o=e.sent,e.t2=this.remotePeer,e.t2){e.next=23;break}return e.next=22,c.getPeerIdFromPayload(o);case 22:e.t2=e.sent;case 23:return this.remotePeer=e.t2,e.next=26,c.verifySignedPayload(t.ns,o,this.remotePeer);case 26:this.remotePeer=e.sent,this.setRemoteEarlyData(o.data),e.next=34;break;case 30:throw e.prev=30,e.t3=e.catch(14),a=e.t3,new Error("Error occurred while verifying signed payload: ".concat(a.message));case 34:f.logger("All good with the signature!"),e.next=42;break;case 37:f.logger("Stage 1 - Responder sending out first message with signed payload and static key."),s=this.xx.sendMessage(this.session,this.payload),this.connection.writeLP(l.encode1(s)),f.logger("Stage 1 - Responder sent the second handshake message with signed payload."),f.logLocalEphemeralKeys(this.session.hs.e);case 42:case"end":return e.stop()}}),e,this,[[14,30]])})));return function(){return e.apply(this,arguments)}}()},{key:"finish",value:function(){var e=i(n.mark((function e(){var t,r,i,o,a,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isInitiator){e.next=7;break}f.logger("Stage 2 - Initiator sending third handshake message."),t=this.xx.sendMessage(this.session,this.payload),this.connection.writeLP(l.encode2(t)),f.logger("Stage 2 - Initiator sent message with signed payload."),e.next=36;break;case 7:return f.logger("Stage 2 - Responder waiting for third handshake message..."),e.t0=l,e.next=11,this.connection.readLP();case 11:if(e.t1=e.sent.slice(),r=e.t0.decode2.call(e.t0,e.t1),i=this.xx.recvMessage(this.session,r),o=i.plaintext,i.valid){e.next=16;break}throw new Error("xx handshake stage 2 validation fail");case 16:return f.logger("Stage 2 - Responder received the message, finished handshake."),e.prev=17,e.next=20,c.decodePayload(o);case 20:if(a=e.sent,e.t2=this.remotePeer,e.t2){e.next=26;break}return e.next=25,c.getPeerIdFromPayload(a);case 25:e.t2=e.sent;case 26:return this.remotePeer=e.t2,e.next=29,c.verifySignedPayload(this.session.hs.rs,a,this.remotePeer);case 29:this.setRemoteEarlyData(a.data),e.next=36;break;case 32:throw e.prev=32,e.t3=e.catch(17),s=e.t3,new Error("Error occurred while verifying signed payload: ".concat(s.message));case 36:f.logCipherState(this.session);case 37:case"end":return e.stop()}}),e,this,[[17,32]])})));return function(){return e.apply(this,arguments)}}()},{key:"encrypt",value:function(e,t){var r=this.getCS(t);return this.xx.encryptWithAd(r,s.Buffer.alloc(0),e)}},{key:"decrypt",value:function(e,t){var r=this.getCS(t,!1);return this.xx.decryptWithAd(r,s.Buffer.alloc(0),e)}},{key:"getRemoteStaticKey",value:function(){return this.session.hs.rs}},{key:"getCS",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e.cs1||!e.cs2)throw new Error("Handshake not completed properly, cipher state does not exist.");return this.isInitiator?t?e.cs1:e.cs2:t?e.cs2:e.cs1}},{key:"setRemoteEarlyData",value:function(e){e&&(this.remoteEarlyData=s.Buffer.from(e.buffer,e.byteOffset,e.length))}}]),e}();t.XXHandshake=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(206),i=r(94);t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var o=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=s(this._temp,this._state,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,a=t%64<56?64:128;this._buffer[r]=128;for(var u=r+1;u<a-8;u++)this._buffer[u]=0;n.writeUint32BE(i,this._buffer,a-8),n.writeUint32BE(o,this._buffer,a-4),s(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(u=0;u<this.digestLength/4;u++)n.writeUint32BE(this._state[u],e,4*u);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA256=o;var a=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(e,t,r,i,o){for(;o>=64;){for(var s=t[0],u=t[1],c=t[2],f=t[3],l=t[4],h=t[5],d=t[6],p=t[7],v=0;v<16;v++){var y=i+4*v;e[v]=n.readUint32BE(r,y)}for(v=16;v<64;v++){var b=e[v-2],g=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10,m=((b=e[v-15])>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;e[v]=(g+e[v-7]|0)+(m+e[v-16]|0)}for(v=0;v<64;v++){g=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&h^~l&d)|0)+(p+(a[v]+e[v]|0)|0)|0,m=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&u^s&c^u&c)|0;p=d,d=h,h=l,l=f+g|0,f=c,c=u,u=s,s=g+m|0}t[0]+=s,t[1]+=u,t[2]+=c,t[3]+=f,t[4]+=l,t[5]+=h,t[6]+=d,t[7]+=p,i+=64,o-=64}return i}t.hash=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},function(e,t,r){"use strict";var n=r(29),i=r(98);function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var a=o("utf8","u",(function(e){return"u"+new TextDecoder("utf8").decode(e)}),(function(e){return(new TextEncoder).encode(e.substring(1))})),s=o("ascii","a",(function(e){for(var t="a",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(function(e){e=e.substring(1);for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),u=n({utf8:a,"utf-8":a,hex:i.bases.base16,latin1:s,ascii:s,binary:s},i.bases);e.exports=u},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(207).concat,a=r(116).fromString,s=r(208);e.exports={create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.algorithm,r=void 0===t?"AES-GCM":t,u=e.nonceLength,c=void 0===u?12:u,f=e.keyLength,l=void 0===f?16:f,h=e.digest,d=void 0===h?"SHA-256":h,p=e.saltLength,v=void 0===p?16:p,y=e.iterations,b=void 0===y?32767:y,g=s.get();function m(e,t){return w.apply(this,arguments)}function w(){return(w=i(n.mark((function e(t,i){var s,u,f,h,p,y,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=g.getRandomValues(new Uint8Array(v)),u=g.getRandomValues(new Uint8Array(c)),f={name:r,iv:u},h={name:"PBKDF2",salt:s,iterations:b,hash:{name:d}},e.next=6,g.subtle.importKey("raw",a(i),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]);case 6:return p=e.sent,e.next=9,g.subtle.deriveKey(h,p,{name:r,length:l},!0,["encrypt"]);case 9:return y=e.sent,e.next=12,g.subtle.encrypt(f,y,t);case 12:return m=e.sent,e.abrupt("return",o([s,f.iv,new Uint8Array(m)]));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t){return S.apply(this,arguments)}function S(){return(S=i(n.mark((function e(t,i){var o,s,u,f,h,p,y,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.slice(0,v),s=t.slice(v,v+c),u=t.slice(v+c),f={name:r,iv:s},h={name:"PBKDF2",salt:o,iterations:b,hash:{name:d}},e.next=7,g.subtle.importKey("raw",a(i),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]);case 7:return p=e.sent,e.next=10,g.subtle.deriveKey(h,p,{name:r,length:l},!0,["decrypt"]);case 10:return y=e.sent,e.next=13,g.subtle.decrypt(f,y,u);case 13:return m=e.sent,e.abrupt("return",new Uint8Array(m));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return l*=8,{encrypt:m,decrypt:k}}}},function(e,t,r){"use strict";var n=r(205),i=r(15);e.exports=function(e){if(isNaN(e)||e<=0)throw i(new Error("random bytes length must be a Number bigger than 0"),"ERR_INVALID_LENGTH");return n(e)}},function(e,t,r){"use strict";var n=r(40),i=r(48),o=r(8),a=r(9),s=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),u=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&s(t,e,r);return u(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractHandshake=t.MIN_NONCE=void 0;var f=r(13),l=c(r(279)),h=c(r(444)),d=r(854),p=r(115),v=r(174);t.MIN_NONCE=0;var y=function(){function e(){o(this,e)}return a(e,[{key:"encryptWithAd",value:function(e,t,r){var n=this.encrypt(e.k,e.n,t,r);return this.setNonce(e,this.incrementNonce(e.n)),n}},{key:"decryptWithAd",value:function(e,t,r){var n=this.decrypt(e.k,e.n,t,r),i=n.plaintext,o=n.valid;return this.setNonce(e,this.incrementNonce(e.n)),{plaintext:i,valid:o}}},{key:"hasKey",value:function(e){return!this.isEmptyKey(e.k)}},{key:"setNonce",value:function(e,t){e.n=t}},{key:"createEmptyKey",value:function(){return f.Buffer.alloc(32)}},{key:"isEmptyKey",value:function(e){return this.createEmptyKey().equals(e)}},{key:"incrementNonce",value:function(e){return e+1}},{key:"nonceToBytes",value:function(e){var t=f.Buffer.alloc(12);return t.writeUInt32LE(e,4),t}},{key:"encrypt",value:function(e,t,r,n){var i=this.nonceToBytes(t),o=new d.ChaCha20Poly1305(e).seal(i,n,r);return f.Buffer.from(o.buffer,o.byteOffset,o.length)}},{key:"encryptAndHash",value:function(e,t){var r;return r=this.hasKey(e.cs)?this.encryptWithAd(e.cs,e.h,t):t,this.mixHash(e,r),r}},{key:"decrypt",value:function(e,t,r,n){var i=this.nonceToBytes(t),o=new d.ChaCha20Poly1305(e).open(i,n,r);return o?{plaintext:f.Buffer.from(o.buffer,o.byteOffset,o.length),valid:!0}:{plaintext:f.Buffer.from(""),valid:!1}}},{key:"decryptAndHash",value:function(e,t){var r,n=!0;if(this.hasKey(e.cs)){var i=this.decryptWithAd(e.cs,e.h,t);r=i.plaintext,n=i.valid}else r=t;return this.mixHash(e,t),{plaintext:r,valid:n}}},{key:"dh",value:function(e,t){try{var r=l.sharedKey(e,t),n=f.Buffer.from(r.buffer,r.byteOffset,r.length),i=f.Buffer.alloc(32);return n.copy(i),i}catch(o){return v.logger(o.message),f.Buffer.alloc(32)}}},{key:"mixHash",value:function(e,t){e.h=this.getHash(e.h,t)}},{key:"getHash",value:function(e,t){var r=h.hash(f.Buffer.from([].concat(i(e),i(t))));return f.Buffer.from(r.buffer,r.byteOffset,r.length)}},{key:"mixKey",value:function(e,t){var r=p.getHkdf(e.ck,t),i=n(r,2),o=i[0],a=i[1];e.cs=this.initializeKey(a),e.ck=o}},{key:"initializeKey",value:function(e){return{k:e,n:t.MIN_NONCE}}},{key:"initializeSymmetric",value:function(e){var t=f.Buffer.from(e,"utf-8"),r=this.hashProtocolName(t),n=r,i=this.createEmptyKey();return{cs:this.initializeKey(i),ck:n,h:r}}},{key:"hashProtocolName",value:function(e){if(e.length<=32){var t=f.Buffer.alloc(32);return e.copy(t),t}return this.getHash(e,f.Buffer.alloc(0))}},{key:"split",value:function(e){var t=p.getHkdf(e.ck,f.Buffer.alloc(0)),r=n(t,2),i=r[0],o=r[1];return{cs1:this.initializeKey(i),cs2:this.initializeKey(o)}}},{key:"writeMessageRegular",value:function(e,t){var r=this.encryptWithAd(e,f.Buffer.alloc(0),t);return{ne:this.createEmptyKey(),ns:f.Buffer.alloc(0),ciphertext:r}}},{key:"readMessageRegular",value:function(e,t){return this.decryptWithAd(e,f.Buffer.alloc(0),t.ciphertext)}}]),e}();t.AbstractHandshake=y},function(e,t,r){"use strict";var n=r(0),i=r(45),o=r(44),a=r(30),s=r(15),u=r(289),c=r(865),f=r(450);function l(){return(l=o(n.mark((function e(t){var r,o,u,c,f,l,h,d,p,v=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=v.length>1&&void 0!==v[1]?v[1]:1,o=0,u=!0,c=!1,e.prev=4,l=a(t);case 6:return e.next=8,i(l.next());case 8:return h=e.sent,u=h.done,e.next=12,i(h.value);case 12:if(d=e.sent,u){e.next=21;break}return p=d,o++,e.next=18,p;case 18:u=!0,e.next=6;break;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(4),c=!0,f=e.t0;case 27:if(e.prev=27,e.prev=28,u||null==l.return){e.next=32;break}return e.next=32,i(l.return());case 32:if(e.prev=32,!c){e.next=35;break}throw f;case 35:return e.finish(32);case 36:return e.finish(27);case 37:if(!(o<r)){e.next=39;break}throw s(new Error("not found"),"NOT_FOUND");case 39:case"end":return e.stop()}}),e,null,[[4,23,27,37],[28,,32,36]])})))).apply(this,arguments)}e.exports={storeAddresses:function(e,t){return c(e,(function(e){return t.addressBook.add(e.id,e.multiaddrs),e}))},uniquePeers:function(e){var t=new Set;return u(e,(function(e){return!t.has(e.id.toString())&&(t.add(e.id.toString()),!0)}))},requirePeers:function(e){return l.apply(this,arguments)},maybeLimitSource:function(e,t){return t?f(e,t):e}}},function(e,t,r){"use strict";var n=r(0),i=r(45),o=r(44),a=r(30),s=function(){var e=o(n.mark((function e(t,r){var o,s,u,c,f,l,h,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=0,!(r<1)){e.next=3;break}return e.abrupt("return");case 3:s=!0,u=!1,e.prev=5,f=a(t);case 7:return e.next=9,i(f.next());case 9:return l=e.sent,s=l.done,e.next=13,i(l.value);case 13:if(h=e.sent,s){e.next=24;break}return d=h,e.next=18,d;case 18:if(++o!==r){e.next=21;break}return e.abrupt("return");case 21:s=!0,e.next=7;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(5),u=!0,c=e.t0;case 30:if(e.prev=30,e.prev=31,s||null==f.return){e.next=35;break}return e.next=35,i(f.return());case 35:if(e.prev=35,!u){e.next=38;break}throw c;case 38:return e.finish(35);case 39:return e.finish(30);case 40:case"end":return e.stop()}}),e,null,[[5,26,30,40],[31,,35,39]])})));return function(t,r){return e.apply(this,arguments)}}();e.exports=s},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(44),a=r(45),s=r(30),u=r(138),c=r(173),f=function(){var e=o(n.mark((function e(){var t,r,o,f,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=l.length,r=new Array(t),o=0;o<t;o++)r[o]=l[o];return f=c(),setTimeout(i(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.all(r.map(function(){var e=i(n.mark((function e(t){var r,i,o,a,u,c,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,i=!1,e.prev=2,a=s(t);case 4:return e.next=6,a.next();case 6:return u=e.sent,r=u.done,e.next=10,u.value;case 10:if(c=e.sent,r){e.next=17;break}l=c,f.push(l);case 14:r=!0,e.next=4;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(2),i=!0,o=e.t0;case 23:if(e.prev=23,e.prev=24,r||null==a.return){e.next=28;break}return e.next=28,a.return();case 28:if(e.prev=28,!i){e.next=31;break}throw o;case 31:return e.finish(28);case 32:return e.finish(23);case 33:case"end":return e.stop()}}),e,null,[[2,19,23,33],[24,,28,32]])})));return function(t){return e.apply(this,arguments)}}()));case 3:f.end(),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),f.end(e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])}))),0),e.delegateYield(u(s(f),a),"t0",4);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e.exports=f},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(30),a=function(){var e=i(n.mark((function e(t){var r,i,a,s,u,c,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,i=!1,e.prev=2,s=o(t);case 4:return e.next=6,s.next();case 6:return u=e.sent,r=u.done,e.next=10,u.value;case 10:if(c=e.sent,r){e.next=17;break}return f=c,e.abrupt("return",f);case 14:r=!0,e.next=4;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(2),i=!0,a=e.t0;case 23:if(e.prev=23,e.prev=24,r||null==s.return){e.next=28;break}return e.next=28,s.return();case 28:if(e.prev=28,!i){e.next=31;break}throw a;case 31:return e.finish(28);case 32:return e.finish(23);case 33:return e.abrupt("return",void 0);case 34:case"end":return e.stop()}}),e,null,[[2,19,23,33],[24,,28,32]])})));return function(t){return e.apply(this,arguments)}}();e.exports=a},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(30),a=function(){var e=i(n.mark((function e(t){var r,i,a,s,u,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,i=!1,e.prev=2,s=o(t);case 4:return e.next=6,s.next();case 6:return u=e.sent,r=u.done,e.next=10,u.value;case 10:if(c=e.sent,r){e.next=16;break}c;case 13:r=!0,e.next=4;break;case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(2),i=!0,a=e.t0;case 22:if(e.prev=22,e.prev=23,r||null==s.return){e.next=27;break}return e.next=27,s.return();case 27:if(e.prev=27,!i){e.next=30;break}throw a;case 30:return e.finish(27);case 31:return e.finish(22);case 32:case"end":return e.stop()}}),e,null,[[2,18,22,32],[23,,27,31]])})));return function(t){return e.apply(this,arguments)}}();e.exports=a},function(e,t,r){"use strict";var n=r(0),i=r(6),o=new Map;function a(){return(a=i(n.mark((function e(t,r,i){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.get(i)){e.next=16;break}return e.prev=1,e.next=4,t();case 4:e.next=10;break;case 6:return e.prev=6,e.t0=e.catch(1),setTimeout((function(){throw e.t0}),1),e.abrupt("break",16);case 10:if(o.get(i)){e.next=12;break}return e.abrupt("break",16);case 12:return e.next=14,new Promise((function(e){var t=setTimeout(e,r);o.set(i,t)}));case 14:e.next=0;break;case 16:case"end":return e.stop()}}),e,null,[[1,6]])})))).apply(this,arguments)}e.exports={setDelayedInterval:function(e,t,r){r=r||t;var n="".concat(Date.now(),":").concat(Math.floor(1e6*Math.random())),i=setTimeout((function(){!function(e,t,r){a.apply(this,arguments)}(e,t,n)}),r);return o.set(n,i),n},clearDelayedInterval:function(e){var t=o.get(e);t&&(clearTimeout(t),o.delete(e))}}},function(e,t,r){"use strict";var n=r(43),i=r(42).Multiaddr,o=r(15),a=r(50).codes;e.exports=function(e){var t;if("string"===typeof e&&(e=new i(e)),i.isMultiaddr(e)){t=e;var r=e.getPeerId();if(!r)throw o(new Error("".concat(e," does not have a valid peer type")),a.ERR_INVALID_MULTIADDR);try{e=n.createFromB58String(r)}catch(s){throw o(new Error("".concat(e," is not a valid peer type")),a.ERR_INVALID_MULTIADDR)}}return{id:e,multiaddrs:t?[t]:void 0}}},function(e,t,r){"use strict";var n=r(457).version;e.exports.PROTOCOL_VERSION="ipfs/0.1.0",e.exports.AGENT_VERSION="js-libp2p/".concat(n),e.exports.MULTICODEC_IDENTIFY="/ipfs/id/1.0.0",e.exports.MULTICODEC_IDENTIFY_PUSH="/ipfs/id/push/1.0.0",e.exports.IDENTIFY_PROTOCOL_VERSION="0.1.0",e.exports.MULTICODEC_IDENTIFY_PROTOCOL_NAME="id",e.exports.MULTICODEC_IDENTIFY_PUSH_PROTOCOL_NAME="id/push",e.exports.MULTICODEC_IDENTIFY_PROTOCOL_VERSION="1.0.0",e.exports.MULTICODEC_IDENTIFY_PUSH_PROTOCOL_VERSION="1.0.0"},function(e){e.exports=JSON.parse('{"name":"libp2p","version":"0.32.4","description":"JavaScript implementation of libp2p, a modular peer to peer network stack","leadMaintainer":"Jacob Heun <jacobheun@gmail.com>","main":"src/index.js","types":"dist/src/index.d.ts","typesVersions":{"*":{"src/*":["dist/src/*","dist/src/*/index"]}},"files":["dist","src"],"scripts":{"lint":"aegir lint","build":"aegir build","build:proto":"npm run build:proto:circuit && npm run build:proto:identify && npm run build:proto:plaintext && npm run build:proto:address-book && npm run build:proto:proto-book && npm run build:proto:peer-record && npm run build:proto:envelope","build:proto:circuit":"pbjs -t static-module -w commonjs -r libp2p-circuit --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/circuit/protocol/index.js ./src/circuit/protocol/index.proto","build:proto:identify":"pbjs -t static-module -w commonjs -r libp2p-identify --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/identify/message.js ./src/identify/message.proto","build:proto:plaintext":"pbjs -t static-module -w commonjs -r libp2p-plaintext --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/insecure/proto.js ./src/insecure/proto.proto","build:proto:address-book":"pbjs -t static-module -w commonjs -r libp2p-address-book --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/peer-store/persistent/pb/address-book.js ./src/peer-store/persistent/pb/address-book.proto","build:proto:proto-book":"pbjs -t static-module -w commonjs -r libp2p-proto-book --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/peer-store/persistent/pb/proto-book.js ./src/peer-store/persistent/pb/proto-book.proto","build:proto:peer-record":"pbjs -t static-module -w commonjs -r libp2p-peer-record --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/record/peer-record/peer-record.js ./src/record/peer-record/peer-record.proto","build:proto:envelope":"pbjs -t static-module -w commonjs -r libp2p-envelope --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/record/envelope/envelope.js ./src/record/envelope/envelope.proto","build:proto-types":"npm run build:proto-types:circuit && npm run build:proto-types:identify && npm run build:proto-types:plaintext && npm run build:proto-types:address-book && npm run build:proto-types:proto-book && npm run build:proto-types:peer-record && npm run build:proto-types:envelope","build:proto-types:circuit":"pbts -o src/circuit/protocol/index.d.ts src/circuit/protocol/index.js","build:proto-types:identify":"pbts -o src/identify/message.d.ts src/identify/message.js","build:proto-types:plaintext":"pbts -o src/insecure/proto.d.ts src/insecure/proto.js","build:proto-types:address-book":"pbts -o src/peer-store/persistent/pb/address-book.d.ts src/peer-store/persistent/pb/address-book.js","build:proto-types:proto-book":"pbts -o src/peer-store/persistent/pb/proto-book.d.ts src/peer-store/persistent/pb/proto-book.js","build:proto-types:peer-record":"pbts -o src/record/peer-record/peer-record.d.ts src/record/peer-record/peer-record.js","build:proto-types:envelope":"pbts -o src/record/envelope/envelope.d.ts src/record/envelope/envelope.js","test":"aegir test","test:ts":"aegir build --no-bundle && npm run test --prefix test/ts-use","test:node":"aegir test -t node -f \\"./test/**/*.{node,spec}.js\\"","test:browser":"aegir test -t browser","test:examples":"cd examples && npm run test:all","prepare":"aegir build --no-bundle","release":"aegir release -t node -t browser","release-minor":"aegir release --type minor -t node -t browser","release-major":"aegir release --type major -t node -t browser","coverage":"nyc --reporter=text --reporter=lcov npm run test:node"},"repository":{"type":"git","url":"https://github.com/libp2p/js-libp2p.git"},"keywords":["libp2p","network","p2p","peer","peer-to-peer","IPFS"],"bugs":{"url":"https://github.com/libp2p/js-libp2p/issues"},"homepage":"https://libp2p.io","license":"MIT","engines":{"node":">=14.0.0"},"browser":{"@motrix/nat-api":false},"eslintConfig":{"extends":"ipfs","ignorePatterns":["!.aegir.js","test/ts-use"]},"dependencies":{"@motrix/nat-api":"^0.3.1","@vascosantos/moving-average":"^1.1.0","abort-controller":"^3.0.0","aggregate-error":"^3.1.0","any-signal":"^2.1.1","bignumber.js":"^9.0.1","class-is":"^1.1.0","debug":"^4.3.1","err-code":"^3.0.0","es6-promisify":"^6.1.1","events":"^3.3.0","hashlru":"^2.3.0","interface-datastore":"^5.1.1","it-all":"^1.0.4","it-buffer":"^0.1.2","it-drain":"^1.0.3","it-filter":"^1.0.1","it-first":"^1.0.4","it-handshake":"^2.0.0","it-length-prefixed":"^5.0.2","it-map":"^1.0.4","it-merge":"^1.0.0","it-pipe":"^1.1.0","it-take":"^1.0.0","libp2p-crypto":"^0.19.4","libp2p-interfaces":"^1.0.0","libp2p-utils":"^0.4.0","mafmt":"^10.0.0","merge-options":"^3.0.4","multiaddr":"^10.0.0","multiformats":"^9.0.0","multistream-select":"^2.0.0","mutable-proxy":"^1.0.0","node-forge":"^0.10.0","p-any":"^3.0.0","p-fifo":"^1.0.0","p-retry":"^4.4.0","p-settle":"^4.1.1","peer-id":"^0.15.0","private-ip":"^2.1.0","protobufjs":"^6.10.2","retimer":"^3.0.0","sanitize-filename":"^1.6.3","set-delayed-interval":"^1.0.0","streaming-iterables":"^6.0.0","timeout-abort-controller":"^1.1.1","uint8arrays":"^3.0.0","varint":"^6.0.0","wherearewe":"^1.0.0","xsalsa20":"^1.1.0"},"devDependencies":{"@chainsafe/libp2p-noise":"^4.0.0","@nodeutils/defaults-deep":"^1.1.0","@types/es6-promisify":"^6.0.0","@types/node":"^16.0.1","@types/node-forge":"^0.10.1","@types/varint":"^6.0.0","abortable-iterator":"^3.0.0","aegir":"^33.1.1","buffer":"^6.0.3","delay":"^5.0.0","interop-libp2p":"^0.4.0","into-stream":"^6.0.0","ipfs-http-client":"^50.1.1","it-concat":"^2.0.0","it-pair":"^1.0.0","it-pushable":"^1.4.0","libp2p":".","libp2p-bootstrap":"^0.13.0","libp2p-delegated-content-routing":"^0.11.0","libp2p-delegated-peer-routing":"^0.10.0","libp2p-floodsub":"^0.27.0","libp2p-gossipsub":"^0.11.0","libp2p-interfaces-compliance-tests":"^1.0.0","libp2p-kad-dht":"^0.23.0","libp2p-mdns":"^0.17.0","libp2p-mplex":"^0.10.1","libp2p-tcp":"^0.17.0","libp2p-webrtc-star":"^0.23.0","libp2p-websockets":"^0.16.0","nock":"^13.0.3","p-defer":"^3.0.0","p-times":"^3.0.0","p-wait-for":"^3.2.0","rimraf":"^3.0.2","sinon":"^11.1.1","util":"^0.12.3"},"contributors":["Vasco Santos <vasco.santos@moxy.studio>","David Dias <daviddias.p@gmail.com>","Jacob Heun <jacobheun@gmail.com>","Alex Potsides <alex@achingbrain.net>","Alan Shaw <alan@tableflip.io>","Cayman <caymannava@gmail.com>","Pedro Teixeira <i@pgte.me>","Friedel Ziegelmayer <dignifiedquire@gmail.com>","Maciej Kr\xfcger <mkg20001@gmail.com>","Hugo Dias <mail@hugodias.me>","Volker Mische <volker.mische@gmail.com>","Chris Dostert <chrisdostert@users.noreply.github.com>","dirkmc <dirkmdev@gmail.com>","Richard Littauer <richard.littauer@gmail.com>","zeim839 <50573884+zeim839@users.noreply.github.com>","Ryan Bell <ryan@piing.net>","a1300 <matthias-knopp@gmx.net>","\u1d20\u026a\u1d04\u1d1b\u1d0f\u0280 \u0299\u1d0a\u1d07\u029f\u1d0b\u029c\u1d0f\u029f\u1d0d <victorbjelkholm@gmail.com>","Andrew Nesbitt <andrewnez@gmail.com>","Elven <mon.samuel@qq.com>","Franck Royer <franck@royer.one>","Giovanni T. Parra <fiatjaf@gmail.com>","Samlior <samlior@foxmail.com>","Thomas Eizinger <thomas@eizinger.io>","acolytec3 <17355484+acolytec3@users.noreply.github.com>","Didrik Nordstr\xf6m <didrik@betamos.se>","Irakli Gozalishvili <rfobic@gmail.com>","Joel Gustafson <joelg@mit.edu>","John Rees <johnrees@users.noreply.github.com>","Jo\xe3o Santos <joaosantos15@users.noreply.github.com>","Julien Bouquillon <contact@revolunet.com>","Kevin Kwok <antimatter15@gmail.com>","Kevin Lacker <lacker@gmail.com>","Lars Gierth <lgierth@users.noreply.github.com>","Ethan Lam <elmemphis2000@gmail.com>","Marcin Tojek <mtojek@users.noreply.github.com>","Michael Burns <5170+mburns@users.noreply.github.com>","Miguel Mota <miguelmota2@gmail.com>","Nuno Nogueira <nunofmn@gmail.com>","Dmitriy Ryajov <dryajov@gmail.com>","Philipp Muens <raute1337@gmx.de>","RasmusErik Voel Jensen <github@solsort.com>","Diogo Silva <fsdiogo@gmail.com>","Robert Kiel <robert.kiel@hoprnet.org>","phillmac <phillmac@users.noreply.github.com>","robertkiel <robert.kiel@validitylabs.org>","Smite Chow <xiaopengyou@live.com>","Soeren <nikorpoulsen@gmail.com>","S\xf6nke Hahn <soenkehahn@gmail.com>","TJKoury <TJKoury@gmail.com>","shresthagrawal <34920931+shresthagrawal@users.noreply.github.com>","Tiago Alves <alvesjtiago@gmail.com>","Daijiro Wachi <daijiro.wachi@gmail.com>","Yusef Napora <yusef@napora.org>","Zane Starr <zcstarr@gmail.com>","swedneck <40505480+swedneck@users.noreply.github.com>","Aleksei <vozhdb@gmail.com>","Cindy Wu <ciindy.wu@gmail.com>","Aditya Bose <13054902+adbose@users.noreply.github.com>","Chris Bratlien <chrisbratlien@gmail.com>","ebinks <elizabethjbinks@gmail.com>","greenSnot <greenSnot@users.noreply.github.com>","Bernd Strehl <bernd.strehl@gmail.com>","Francis Gulotta <wizard@roborooter.com>","isan_rivkin <isanrivkin@gmail.com>","Florian-Merle <florian.david.merle@gmail.com>","mayerwin <mayerwin@users.noreply.github.com>","Guy Sviry <32539816+guysv@users.noreply.github.com>","Henrique Dias <hacdias@gmail.com>","mcclure <andi.m.mcclure@gmail.com>","Felipe Martins <felipebrasil93@gmail.com>","Fei Liu <liu.feiwood@gmail.com>"]}')},function(e,t,r){"use strict";var n=r(48),i=r(875);function o(e,t){var r=i(e.multiaddr),n=i(t.multiaddr);return r&&!n?1:!r&&n||e.isCertified&&!t.isCertified?-1:!e.isCertified&&t.isCertified?1:0}e.exports.publicAddressesFirst=function(e){return n(e).sort(o)}},function(e,t,r){"use strict";e.exports=r(876)},function(e,t,r){"use strict";var n=r(48),i=r(0),o=r(40),a=r(21),s=r(6),u=r(29),c=r(8),f=r(9),l=r(22),h=Object.assign(l("libp2p:transports"),{error:l("libp2p:transports:err")}),d=r(878),p=r(50).codes,v=r(15),y=r(461).updateSelfPeerRecord,b=function(){function e(t){var r=t.libp2p,n=t.upgrader,i=t.faultTolerance,o=void 0===i?g.FATAL_ALL:i;c(this,e),this.libp2p=r,this.upgrader=n,this._transports=new Map,this._listeners=new Map,this._listenerOptions=new Map,this.faultTolerance=o}return f(e,[{key:"add",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(h("adding %s",e),!e)throw v(new Error("Transport must have a valid key, was given '".concat(e,"'")),p.ERR_INVALID_KEY);if(this._transports.has(e))throw v(new Error("There is already a transport with this key"),p.ERR_DUPLICATE_TRANSPORT);var n=new t(u(u({},r),{},{libp2p:this.libp2p,upgrader:this.upgrader}));this._transports.set(e,n),this._listenerOptions.set(e,r.listenerOptions||{}),this._listeners.has(e)||this._listeners.set(e,[])}},{key:"close",value:function(){var e=s(i.mark((function e(){var t,r,n,s,u,c,f,l,d,p;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],r=a(this._listeners);try{for(r.s();!(n=r.n()).done;)for(s=o(n.value,2),u=s[0],c=s[1],h("closing listeners for %s",u);c.length;)(f=c.pop()).removeAllListeners("listening"),f.removeAllListeners("close"),t.push(f.close())}catch(i){r.e(i)}finally{r.f()}return e.next=5,Promise.all(t);case 5:h("all listeners closed"),l=a(this._listeners.keys());try{for(l.s();!(d=l.n()).done;)p=d.value,this._listeners.set(p,[])}catch(i){l.e(i)}finally{l.f()}case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"dial",value:function(){var e=s(i.mark((function e(t,r){var n;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.transportForMultiaddr(t)){e.next=3;break}throw v(new Error("No transport available for address ".concat(String(t))),p.ERR_TRANSPORT_UNAVAILABLE);case 3:return e.prev=3,e.next=6,n.dial(t,r);case 6:return e.abrupt("return",e.sent);case 9:throw e.prev=9,e.t0=e.catch(3),e.t0.code||(e.t0.code=p.ERR_TRANSPORT_DIAL_FAILED),e.t0;case 13:case"end":return e.stop()}}),e,this,[[3,9]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getAddrs",value:function(){var e,t=[],r=a(this._listeners.values());try{for(r.s();!(e=r.n()).done;){var i,o=e.value,s=a(o);try{for(s.s();!(i=s.n()).done;){var u=i.value;t=[].concat(n(t),n(u.getAddrs()))}}catch(c){s.e(c)}finally{s.f()}}}catch(c){r.e(c)}finally{r.f()}return t}},{key:"getTransports",value:function(){return this._transports.values()}},{key:"transportForMultiaddr",value:function(e){var t,r=a(this._transports.values());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n.filter([e]).length)return n}}catch(i){r.e(i)}finally{r.f()}return null}},{key:"listen",value:function(){var e=s(i.mark((function e(t){var r,n,s,u,c,f,l,b,m,w,k,S,E,_,A=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&0!==t.length){e.next=3;break}return h("no addresses were provided for listening, this node is dial only"),e.abrupt("return");case 3:r=[],n=a(this._transports.entries()),e.prev=5,n.s();case 7:if((s=n.n()).done){e.next=24;break}u=o(s.value,2),c=u[0],f=u[1],l=f.filter(t),b=[],m=a(l);try{for(m.s();!(w=m.n()).done;)k=w.value,h("creating listener for %s on %s",c,k),S=f.createListener(this._listenerOptions.get(c)),this._listeners.get(c).push(S),S.on("listening",(function(){return y(A.libp2p)})),S.on("close",(function(){return y(A.libp2p)})),b.push(S.listen(k))}catch(i){m.e(i)}finally{m.f()}if(0!==b.length){e.next=16;break}return r.push(c),e.abrupt("continue",22);case 16:return e.next=18,d(b);case 18:if(E=e.sent,E.find((function(e){return!0===e.isFulfilled}))||this.faultTolerance===g.NO_FATAL){e.next=22;break}throw v(new Error("Transport (".concat(c,") could not listen on any available address")),p.ERR_NO_VALID_ADDRESSES);case 22:e.next=7;break;case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(5),n.e(e.t0);case 29:return e.prev=29,n.f(),e.finish(29);case 32:if(r.length!==this._transports.size){e.next=37;break}if(_="no valid addresses were provided for transports [".concat(r,"]"),this.faultTolerance!==g.FATAL_ALL){e.next=36;break}throw v(new Error(_),p.ERR_NO_VALID_ADDRESSES);case 36:h("libp2p in dial mode only: ".concat(_));case 37:case"end":return e.stop()}}),e,this,[[5,26,29,32]])})));return function(t){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=s(i.mark((function e(t){var r,n,o;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h("removing %s",t),!this._listeners.has(t)){e.next=21;break}r=a(this._listeners.get(t)),e.prev=3,r.s();case 5:if((n=r.n()).done){e.next=13;break}return(o=n.value).removeAllListeners("listening"),o.removeAllListeners("close"),e.next=11,o.close();case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:this._transports.delete(t),this._listeners.delete(t);case 23:case"end":return e.stop()}}),e,this,[[3,15,18,21]])})));return function(t){return e.apply(this,arguments)}}()},{key:"removeAll",value:function(){var e=s(i.mark((function e(){var t,r,n,o;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],r=a(this._transports.keys());try{for(r.s();!(n=r.n()).done;)o=n.value,t.push(this.remove(o))}catch(i){r.e(i)}finally{r.f()}return e.next=5,Promise.all(t);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),g={FATAL_ALL:0,NO_FATAL:1};b.FaultTolerance=g,e.exports=b},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(212),a=r(293);function s(){return(s=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new a({peerId:t.peerId,multiaddrs:t.multiaddrs}),e.next=3,o.seal(r,t.peerId);case 3:i=e.sent,t.peerStore.addressBook.consumePeerRecord(i);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports.updateSelfPeerRecord=function(e){return s.apply(this,arguments)}},function(e,t,r){"use strict";var n=r(29),i=r(98);function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var a=o("utf8","u",(function(e){return"u"+new TextDecoder("utf8").decode(e)}),(function(e){return(new TextEncoder).encode(e.substring(1))})),s=o("ascii","a",(function(e){for(var t="a",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(function(e){e=e.substring(1);for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),u=n({utf8:a,"utf-8":a,hex:i.bases.base16,latin1:s,ascii:s,binary:s},i.bases);e.exports=u},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(891),a=function(){function e(t,r,i){n(this,e);var a=this;this._started=o(),this._rescheduled=0,this._scheduled=r,this._args=i,this._triggered=!1,this._timerWrapper=function(){a._rescheduled>0?(a._scheduled=a._rescheduled-(o()-a._started),a._schedule(a._scheduled)):(a._triggered=!0,t.apply(null,a._args))},this._timer=setTimeout(this._timerWrapper,r)}return i(e,[{key:"reschedule",value:function(e){e||(e=this._scheduled);var t=o();t+e-(this._started+this._scheduled)<0?(clearTimeout(this._timer),this._schedule(e)):this._triggered?this._schedule(e):(this._started=t,this._rescheduled=e)}},{key:"_schedule",value:function(e){this._triggered=!1,this._started=o(),this._rescheduled=0,this._scheduled=e,this._timer=setTimeout(this._timerWrapper,e)}},{key:"clear",value:function(){clearTimeout(this._timer)}}]),e}();e.exports=function(){if("function"!==typeof arguments[0])throw new Error("callback needed");if("number"!==typeof arguments[1])throw new Error("timeout needed");var e;if(arguments.length>0){e=new Array(arguments.length-2);for(var t=0;t<e.length;t++)e[t]=arguments[t+2]}return new a(arguments[0],arguments[1],e)}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(22),a=Object.assign(o("libp2p:circuit:hop"),{error:o("libp2p:circuit:hop:err")}),s=r(15),u=r(43),c=r(465).validateAddrs,f=r(295),l=r(176).CircuitRelay,h=r(60).pipe,d=r(50).codes,p=r(466).stop,v=r(213);function y(){return(y=i(n.mark((function e(t){var r,i,o,s,f,d,v,y,b;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.connection,i=t.request,o=t.streamHandler,(s=t.circuit)._options.hop.enabled){e.next=4;break}return a("HOP request received but we are not acting as a relay"),e.abrupt("return",o.end({type:l.Type.STATUS,code:l.Status.HOP_CANT_SPEAK_RELAY}));case 4:e.prev=4,c(i,o),e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(4),e.abrupt("return",a.error("invalid hop request via peer %s",r.remotePeer.toB58String(),e.t0));case 11:if(i.dstPeer){e.next=14;break}return a("HOP request received but we do not receive a dstPeer"),e.abrupt("return");case 14:if(f=new u(i.dstPeer.id),(d=s._connectionManager.get(f))||s._options.hop.active){e.next=19;break}return a("HOP request received but we are not connected to the destination peer"),e.abrupt("return",o.end({type:l.Type.STATUS,code:l.Status.HOP_NO_CONN_TO_DST}));case 19:if(d){e.next=21;break}return e.abrupt("return");case 21:return v={type:l.Type.STOP,dstPeer:i.dstPeer,srcPeer:i.srcPeer},e.prev=22,e.next=25,p({connection:d,request:v});case 25:y=e.sent,e.next=31;break;case 28:return e.prev=28,e.t1=e.catch(22),e.abrupt("return",a.error(e.t1));case 31:return a("hop request from %s is valid",r.remotePeer.toB58String()),o.write({type:l.Type.STATUS,code:l.Status.SUCCESS}),b=o.rest(),e.abrupt("return",h(b,y,b));case 35:case"end":return e.stop()}}),e,null,[[4,8],[22,28]])})))).apply(this,arguments)}function b(){return(b=i(n.mark((function e(t){var r,i,o,u,c,h;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.connection,i=t.request,e.next=3,r.newStream([v.relay]);case 3:return o=e.sent,u=o.stream,(c=new f({stream:u})).write(i),e.next=9,c.read();case 9:if(h=e.sent){e.next=12;break}throw s(new Error("HOP request had no response"),d.ERR_HOP_REQUEST_FAILED);case 12:if(h.code!==l.Status.SUCCESS){e.next=15;break}return a("hop request was successful"),e.abrupt("return",c.rest());case 15:throw a("hop request failed with code %d, closing stream",h.code),c.close(),s(new Error("HOP request failed with code ".concat(h.code)),d.ERR_HOP_REQUEST_FAILED);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=i(n.mark((function e(t){var r,i,o,a,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.connection,e.next=3,r.newStream([v.relay]);case 3:return i=e.sent,o=i.stream,(a=new f({stream:o})).write({type:l.Type.CAN_HOP}),e.next=9,a.read();case 9:return s=e.sent,e.next=12,a.close();case 12:if(s&&s.code===l.Status.SUCCESS){e.next=14;break}return e.abrupt("return",!1);case 14:return e.abrupt("return",!0);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports={handleHop:function(e){return y.apply(this,arguments)},hop:function(e){return b.apply(this,arguments)},canHop:function(e){return g.apply(this,arguments)},handleCanHop:function(e){var t=e.connection,r=e.streamHandler,n=e.circuit._options.hop.enabled;a("can hop (%s) request from %s",n,t.remotePeer.toB58String()),r.end({type:l.Type.STATUS,code:n?l.Status.SUCCESS:l.Status.HOP_CANT_SPEAK_RELAY})}}},function(e,t,r){"use strict";var n=r(42).Multiaddr,i=r(176).CircuitRelay;function o(e,t){e.write({type:i.Type.STATUS,code:t})}e.exports={validateAddrs:function(e,t){try{e.dstPeer&&e.dstPeer.addrs&&e.dstPeer.addrs.forEach((function(e){return new n(e)}))}catch(r){throw o(t,e.type===i.Type.HOP?i.Status.HOP_DST_MULTIADDR_INVALID:i.Status.STOP_DST_MULTIADDR_INVALID),r}try{e.srcPeer&&e.srcPeer.addrs&&e.srcPeer.addrs.forEach((function(e){return new n(e)}))}catch(r){throw o(t,e.type===i.Type.HOP?i.Status.HOP_SRC_MULTIADDR_INVALID:i.Status.STOP_SRC_MULTIADDR_INVALID),r}}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(22),a=Object.assign(o("libp2p:circuit:stop"),{error:o("libp2p:circuit:stop:err")}),s=r(176).CircuitRelay,u=r(213),c=r(295),f=r(465).validateAddrs;e.exports.handleStop=function(e){var t=e.connection,r=e.request,n=e.streamHandler;try{f(r,n)}catch(i){return a.error("invalid stop request via peer %s",t.remotePeer.toB58String(),i)}return a("stop request is valid"),n.write({type:s.Type.STATUS,code:s.Status.SUCCESS}),n.rest()},e.exports.stop=function(){var e=i(n.mark((function e(t){var r,i,o,f,l,h;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.connection,i=t.request,e.next=3,r.newStream([u.relay]);case 3:return o=e.sent,f=o.stream,a("starting stop request to %s",r.remotePeer.toB58String()),(l=new c({stream:f})).write(i),e.next=10,l.read();case 10:if(h=e.sent){e.next=13;break}return e.abrupt("return",l.close());case 13:if(h.code!==s.Status.SUCCESS){e.next=16;break}return a("stop request to %s was successful",r.remotePeer.toB58String()),e.abrupt("return",l.rest());case 16:a("stop request failed with code %d",h.code),l.close();case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(90).CID,a=r(49).sha256;e.exports.namespaceToCid=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(new TextEncoder).encode(t),e.next=3,a.digest(r);case 3:return i=e.sent,e.abrupt("return",o.createV0(i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){var n=r(21),i=r(902).AbortController;function o(e){var t=new i;function r(){t.abort();var i,o=n(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;a&&a.removeEventListener&&a.removeEventListener("abort",r)}}catch(s){o.e(s)}finally{o.f()}}var o,a=n(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s&&s.addEventListener){if(s.aborted){r();break}s.addEventListener("abort",r)}}}catch(u){a.e(u)}finally{a.f()}return t.signal}e.exports=o,e.exports.anySignal=o},function(e,t,r){"use strict";var n=r(21),i=r(8),o=r(9),a=r(26),s=r(27),u=function(e){a(r,e);var t=s(r);function r(e){var n;return i(this,r),(n=t.call(this,e||"Promise was canceled")).name="CancelError",n}return o(r,[{key:"isCanceled",get:function(){return!0}}]),r}(r(93)(Error)),c=function(){function e(t){var r=this;i(this,e),this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((function(e,n){r._reject=n;var i=function(e){if(!r._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");r._cancelHandlers.push(e)};return Object.defineProperties(i,{shouldReject:{get:function(){return r._rejectOnCancel},set:function(e){r._rejectOnCancel=e}}}),t((function(t){r._isCanceled&&i.shouldReject||(r._isPending=!1,e(t))}),(function(e){r._isPending=!1,n(e)}),i)}))}return o(e,[{key:"then",value:function(e,t){return this._promise.then(e,t)}},{key:"catch",value:function(e){return this._promise.catch(e)}},{key:"finally",value:function(e){return this._promise.finally(e)}},{key:"cancel",value:function(e){if(this._isPending&&!this._isCanceled){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{var t,r=n(this._cancelHandlers);try{for(r.s();!(t=r.n()).done;){(0,t.value)()}}catch(i){r.e(i)}finally{r.f()}}catch(o){return void this._reject(o)}this._rejectOnCancel&&this._reject(new u(e))}}},{key:"isCanceled",get:function(){return this._isCanceled}}],[{key:"fn",value:function(t){return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return new e((function(e,r,i){n.push(i),t.apply(void 0,n).then(e,r)}))}}}]),e}();Object.setPrototypeOf(c.prototype,Promise.prototype),e.exports=c,e.exports.CancelError=u},function(e,t,r){"use strict";var n=r(471),i=r(917),o=r(474),a=r(475),s=r(473);e.exports={Key:n,MemoryDatastore:i,utils:o,Errors:a,Adapter:s}},function(e,t,r){"use strict";var n=r(48),i=r(8),o=r(9),a=r(503).nanoid,s=r(916),u=r(472),c="/",f=(new TextEncoder).encode(c),l=f[0],h=function(){function e(t,r){if(i(this,e),"string"===typeof t)this._buf=u(t);else{if(!(t instanceof Uint8Array))throw new Error("Invalid key, should be String of Uint8Array");this._buf=t}if(null==r&&(r=!0),r&&this.clean(),0===this._buf.byteLength||this._buf[0]!==l)throw new Error("Invalid key")}return o(e,[{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf8";return s(this._buf,e)}},{key:"uint8Array",value:function(){return this._buf}},{key:Symbol.toStringTag,get:function(){return"Key(".concat(this.toString(),")")}},{key:"clean",value:function(){if(this._buf&&0!==this._buf.byteLength||(this._buf=f),this._buf[0]!==l){var e=new Uint8Array(this._buf.byteLength+1);e.fill(l,0,1),e.set(this._buf,1),this._buf=e}for(;this._buf.byteLength>1&&this._buf[this._buf.byteLength-1]===l;)this._buf=this._buf.subarray(0,-1)}},{key:"less",value:function(e){for(var t=this.list(),r=e.list(),n=0;n<t.length;n++){if(r.length<n+1)return!1;var i=t[n],o=r[n];if(i<o)return!0;if(i>o)return!1}return t.length<r.length}},{key:"reverse",value:function(){return e.withNamespaces(this.list().slice().reverse())}},{key:"namespaces",value:function(){return this.list()}},{key:"baseNamespace",value:function(){var e=this.namespaces();return e[e.length-1]}},{key:"list",value:function(){return this.toString().split(c).slice(1)}},{key:"type",value:function(){return function(e){var t=e.split(":");if(t.length<2)return"";return t.slice(0,-1).join(":")}(this.baseNamespace())}},{key:"name",value:function(){return function(e){var t=e.split(":");return t[t.length-1]}(this.baseNamespace())}},{key:"instance",value:function(t){return new e(this.toString()+":"+t)}},{key:"path",value:function(){var t=this.parent().toString();return t.endsWith(c)||(t+=c),new e(t+=this.type())}},{key:"parent",value:function(){var t=this.list();return 1===t.length?new e(c):new e(t.slice(0,-1).join(c))}},{key:"child",value:function(t){return this.toString()===c?t:t.toString()===c?this:new e(this.toString()+t.toString(),!1)}},{key:"isAncestorOf",value:function(e){return e.toString()!==this.toString()&&e.toString().startsWith(this.toString())}},{key:"isDecendantOf",value:function(e){return e.toString()!==this.toString()&&this.toString().startsWith(e.toString())}},{key:"isTopLevel",value:function(){return 1===this.list().length}},{key:"concat",value:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.withNamespaces([].concat(n(this.namespaces()),n(d(r.map((function(e){return e.namespaces()}))))))}}],[{key:"withNamespaces",value:function(t){return new e(t.join(c))}},{key:"random",value:function(){return new e(a().replace(/-/g,""))}}]),e}();function d(e){var t;return(t=[]).concat.apply(t,n(e))}e.exports=h},function(e,t,r){"use strict";var n=r(276).encoding,i=new TextEncoder;function o(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";return"utf8"===t||"utf-8"===t?i.encode(e):"ascii"===t?o(e):n(t).decode(e)}},function(e,t,r){"use strict";var n=r(6),i=r(0),o=r(8),a=r(9),s=r(45),u=r(44),c=r(30),f=r(474).sortAll,l=r(453),h=r(289),d=r(450),p=function(){function e(){o(this,e)}return a(e,[{key:"open",value:function(){return Promise.reject(new Error(".open is not implemented"))}},{key:"close",value:function(){return Promise.reject(new Error(".close is not implemented"))}},{key:"put",value:function(e,t,r){return Promise.reject(new Error(".put is not implemented"))}},{key:"get",value:function(e,t){return Promise.reject(new Error(".get is not implemented"))}},{key:"has",value:function(e,t){return Promise.reject(new Error(".has is not implemented"))}},{key:"delete",value:function(e,t){return Promise.reject(new Error(".delete is not implemented"))}},{key:"putMany",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(i.mark((function n(){var o,a,u,f,l,h,d,p,v;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o=!0,a=!1,n.prev=2,f=c(e);case 4:return n.next=6,s(f.next());case 6:return l=n.sent,o=l.done,n.next=10,s(l.value);case 10:if(h=n.sent,o){n.next=20;break}return p=(d=h).key,v=d.value,n.next=15,s(t.put(p,v,r));case 15:return n.next=17,{key:p,value:v};case 17:o=!0,n.next=4;break;case 20:n.next=26;break;case 22:n.prev=22,n.t0=n.catch(2),a=!0,u=n.t0;case 26:if(n.prev=26,n.prev=27,o||null==f.return){n.next=31;break}return n.next=31,s(f.return());case 31:if(n.prev=31,!a){n.next=34;break}throw u;case 34:return n.finish(31);case 35:return n.finish(26);case 36:case"end":return n.stop()}}),n,null,[[2,22,26,36],[27,,31,35]])})))()}},{key:"getMany",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(i.mark((function n(){var o,a,u,f,l,h,d;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o=!0,a=!1,n.prev=2,f=c(e);case 4:return n.next=6,s(f.next());case 6:return l=n.sent,o=l.done,n.next=10,s(l.value);case 10:if(h=n.sent,o){n.next=18;break}return d=h,n.next=15,t.get(d,r);case 15:o=!0,n.next=4;break;case 18:n.next=24;break;case 20:n.prev=20,n.t0=n.catch(2),a=!0,u=n.t0;case 24:if(n.prev=24,n.prev=25,o||null==f.return){n.next=29;break}return n.next=29,s(f.return());case 29:if(n.prev=29,!a){n.next=32;break}throw u;case 32:return n.finish(29);case 33:return n.finish(24);case 34:case"end":return n.stop()}}),n,null,[[2,20,24,34],[25,,29,33]])})))()}},{key:"deleteMany",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(i.mark((function n(){var o,a,u,f,l,h,d;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o=!0,a=!1,n.prev=2,f=c(e);case 4:return n.next=6,s(f.next());case 6:return l=n.sent,o=l.done,n.next=10,s(l.value);case 10:if(h=n.sent,o){n.next=20;break}return d=h,n.next=15,s(t.delete(d,r));case 15:return n.next=17,d;case 17:o=!0,n.next=4;break;case 20:n.next=26;break;case 22:n.prev=22,n.t0=n.catch(2),a=!0,u=n.t0;case 26:if(n.prev=26,n.prev=27,o||null==f.return){n.next=31;break}return n.next=31,s(f.return());case 31:if(n.prev=31,!a){n.next=34;break}throw u;case 34:return n.finish(31);case 35:return n.finish(26);case 36:case"end":return n.stop()}}),n,null,[[2,22,26,36],[27,,31,35]])})))()}},{key:"batch",value:function(){var e=this,t=[],r=[];return{put:function(e,r){t.push({key:e,value:r})},delete:function(e){r.push(e)},commit:function(){var o=n(i.mark((function n(o){return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,l(e.putMany(t,o));case 2:return t=[],n.next=5,l(e.deleteMany(r,o));case 5:r=[];case 6:case"end":return n.stop()}}),n)})));return function(e){return o.apply(this,arguments)}}()}}},{key:"_all",value:function(e,t){return u(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("._all is not implemented");case 1:case"end":return e.stop()}}),e)})))()}},{key:"_allKeys",value:function(e,t){return u(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("._allKeys is not implemented");case 1:case"end":return e.stop()}}),e)})))()}},{key:"query",value:function(e,t){var r=this._all(e,t);if(null!=e.prefix&&(r=h(r,(function(t){return t.key.toString().startsWith(e.prefix)}))),Array.isArray(e.filters)&&(r=e.filters.reduce((function(e,t){return h(e,t)}),r)),Array.isArray(e.orders)&&(r=e.orders.reduce((function(e,t){return f(e,t)}),r)),null!=e.offset){var n=0;r=h(r,(function(){return n++>=e.offset}))}return null!=e.limit&&(r=d(r,e.limit)),r}},{key:"queryKeys",value:function(e,t){var r=this._allKeys(e,t);if(null!=e.prefix&&(r=h(r,(function(t){return t.toString().startsWith(e.prefix)}))),Array.isArray(e.filters)&&(r=e.filters.reduce((function(e,t){return h(e,t)}),r)),Array.isArray(e.orders)&&(r=e.orders.reduce((function(e,t){return f(e,t)}),r)),null!=e.offset){var n=0;r=h(r,(function(){return n++>=e.offset}))}return null!=e.limit&&(r=d(r,e.limit)),r}}]),e}();e.exports=p},function(e,t,r){"use strict";var n=r(0),i=r(44),o=r(45),a=r(30),s=r(138),u=r(918),c=r(919);e.exports={sortAll:function(e,t){return i(n.mark((function r(){var i;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,o(c(e));case 2:return i=r.sent,r.delegateYield(s(a(i.sort(t)),o),"t0",4);case 4:case"end":return r.stop()}}),r)})))()},tmpdir:u,replaceStartWith:function(e,t){var r=new RegExp("^"+t);return e.replace(r,"")}}},function(e,t,r){"use strict";var n=r(15);e.exports={dbOpenFailedError:function(e){return e=e||new Error("Cannot open database"),n(e,"ERR_DB_OPEN_FAILED")},dbDeleteFailedError:function(e){return e=e||new Error("Delete failed"),n(e,"ERR_DB_DELETE_FAILED")},dbWriteFailedError:function(e){return e=e||new Error("Write failed"),n(e,"ERR_DB_WRITE_FAILED")},notFoundError:function(e){return e=e||new Error("Not Found"),n(e,"ERR_NOT_FOUND")},abortedError:function(e){return e=e||new Error("Aborted"),n(e,"ERR_ABORTED")}}},function(e,t,r){var n=r(18);r(167),r(62),r(270),r(112),r(923),r(168),r(272),r(925),r(78),r(34);var i=n.asn1,o=e.exports=n.pki=n.pki||{},a=o.oids,s={};s.CN=a.commonName,s.commonName="CN",s.C=a.countryName,s.countryName="C",s.L=a.localityName,s.localityName="L",s.ST=a.stateOrProvinceName,s.stateOrProvinceName="ST",s.O=a.organizationName,s.organizationName="O",s.OU=a.organizationalUnitName,s.organizationalUnitName="OU",s.E=a.emailAddress,s.emailAddress="E";var u=n.pki.rsa.publicKeyValidator,c={name:"Certificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},u,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},f={name:"rsapss",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},l={name:"CertificationRequestInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},u,{name:"CertificationRequestInfo.attributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0}]}]}]},h={name:"CertificationRequest",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[l,{name:"CertificationRequest.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function d(e,t){"string"===typeof t&&(t={shortName:t});for(var r,n=null,i=0;null===n&&i<e.attributes.length;++i)r=e.attributes[i],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(n=r);return n}o.RDNAttributesAsArray=function(e,t){for(var r,n,o,u=[],c=0;c<e.value.length;++c){r=e.value[c];for(var f=0;f<r.value.length;++f)o={},n=r.value[f],o.type=i.derToOid(n.value[0].value),o.value=n.value[1].value,o.valueTagClass=n.value[1].type,o.type in a&&(o.name=a[o.type],o.name in s&&(o.shortName=s[o.name])),t&&(t.update(o.type),t.update(o.value)),u.push(o)}return u},o.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],u=i.derToOid(n.value[0].value),c=n.value[1].value,f=0;f<c.length;++f){var l={};if(l.type=u,l.value=c[f].value,l.valueTagClass=c[f].type,l.type in a&&(l.name=a[l.type],l.name in s&&(l.shortName=s[l.name])),l.type===a.extensionRequest){l.extensions=[];for(var h=0;h<l.value.length;++h)l.extensions.push(o.certificateExtensionFromAsn1(l.value[h]))}t.push(l)}return t};var p=function(e,t,r){var n={};if(e!==a["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:a.sha1},mgf:{algorithmOid:a.mgf1,hash:{algorithmOid:a.sha1}},saltLength:20});var o={},s=[];if(!i.validate(t,f,o,s)){var u=new Error("Cannot read RSASSA-PSS parameter block.");throw u.errors=s,u}return void 0!==o.hashOid&&(n.hash=n.hash||{},n.hash.algorithmOid=i.derToOid(o.hashOid)),void 0!==o.maskGenOid&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=i.derToOid(o.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=i.derToOid(o.maskGenHashOid)),void 0!==o.saltLength&&(n.saltLength=o.saltLength.charCodeAt(0)),n};function v(e){for(var t,r,o=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),a=e.attributes,s=0;s<a.length;++s){var u=(t=a[s]).value,c=i.Type.PRINTABLESTRING;"valueTagClass"in t&&(c=t.valueTagClass)===i.Type.UTF8&&(u=n.util.encodeUtf8(u)),r=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.type).getBytes()),i.create(i.Class.UNIVERSAL,c,!1,u)])]),o.value.push(r)}return o}function y(e){for(var t,r=0;r<e.length;++r){if("undefined"===typeof(t=e[r]).name&&(t.type&&t.type in o.oids?t.name=o.oids[t.type]:t.shortName&&t.shortName in s&&(t.name=o.oids[s[t.shortName]])),"undefined"===typeof t.type){if(!t.name||!(t.name in o.oids))throw(u=new Error("Attribute type not specified.")).attribute=t,u;t.type=o.oids[t.name]}if("undefined"===typeof t.shortName&&t.name&&t.name in s&&(t.shortName=s[t.name]),t.type===a.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=i.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var n=0;n<t.extensions.length;++n)t.value.push(o.certificateExtensionToAsn1(b(t.extensions[n])))}var u;if("undefined"===typeof t.value)throw(u=new Error("Attribute value not specified.")).attribute=t,u}}function b(e,t){if(t=t||{},"undefined"===typeof e.name&&e.id&&e.id in o.oids&&(e.name=o.oids[e.id]),"undefined"===typeof e.id){if(!e.name||!(e.name in o.oids))throw(k=new Error("Extension ID not specified.")).extension=e,k;e.id=o.oids[e.name]}if("undefined"!==typeof e.value)return e;if("keyUsage"===e.name){var r=0,s=0,u=0;e.digitalSignature&&(s|=128,r=7),e.nonRepudiation&&(s|=64,r=6),e.keyEncipherment&&(s|=32,r=5),e.dataEncipherment&&(s|=16,r=4),e.keyAgreement&&(s|=8,r=3),e.keyCertSign&&(s|=4,r=2),e.cRLSign&&(s|=2,r=1),e.encipherOnly&&(s|=1,r=0),e.decipherOnly&&(u|=128,r=7);var c=String.fromCharCode(r);0!==u?c+=String.fromCharCode(s)+String.fromCharCode(u):0!==s&&(c+=String.fromCharCode(s)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,c)}else if("basicConstraints"===e.name)e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.pathLenConstraint).getBytes()));else if("extKeyUsage"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);var f=e.value.value;for(var l in e)!0===e[l]&&(l in a?f.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a[l]).getBytes())):-1!==l.indexOf(".")&&f.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(l).getBytes())))}else if("nsCertType"===e.name){r=0,s=0;e.client&&(s|=128,r=7),e.server&&(s|=64,r=6),e.email&&(s|=32,r=5),e.objsign&&(s|=16,r=4),e.reserved&&(s|=8,r=3),e.sslCA&&(s|=4,r=2),e.emailCA&&(s|=2,r=1),e.objCA&&(s|=1,r=0);c=String.fromCharCode(r);0!==s&&(c+=String.fromCharCode(s)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,c)}else if("subjectAltName"===e.name||"issuerAltName"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);for(var h=0;h<e.altNames.length;++h){c=(g=e.altNames[h]).value;if(7===g.type&&g.ip){if(null===(c=n.util.bytesFromIP(g.ip)))throw(k=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,k}else 8===g.type&&(c=g.oid?i.oidToDer(i.oidToDer(g.oid)):i.oidToDer(c));e.value.value.push(i.create(i.Class.CONTEXT_SPECIFIC,g.type,!1,c))}}else if("nsComment"===e.name&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=i.create(i.Class.UNIVERSAL,i.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&t.cert){var d=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=d.toHex(),e.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,d.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);f=e.value.value;if(e.keyIdentifier){var p=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;f.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,p))}if(e.authorityCertIssuer){var y=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[v(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];f.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,y))}if(e.serialNumber){var b=n.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);f.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,b))}}else if("cRLDistributionPoints"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);f=e.value.value;var g,m=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),w=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(h=0;h<e.altNames.length;++h){c=(g=e.altNames[h]).value;if(7===g.type&&g.ip){if(null===(c=n.util.bytesFromIP(g.ip)))throw(k=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,k}else 8===g.type&&(c=g.oid?i.oidToDer(i.oidToDer(g.oid)):i.oidToDer(c));w.value.push(i.create(i.Class.CONTEXT_SPECIFIC,g.type,!1,c))}m.value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[w])),f.push(m)}var k;if("undefined"===typeof e.value)throw(k=new Error("Extension value not specified.")).extension=e,k;return e}function g(e,t){switch(e){case a["RSASSA-PSS"]:var r=[];return void 0!==t.hash.algorithmOid&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])),void 0!==t.mgf.algorithmOid&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])])),void 0!==t.saltLength&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.saltLength).getBytes())])),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,r);default:return i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")}}function m(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===e.attributes.length)return t;for(var r=e.attributes,o=0;o<r.length;++o){var a=r[o],s=a.value,u=i.Type.UTF8;"valueTagClass"in a&&(u=a.valueTagClass),u===i.Type.UTF8&&(s=n.util.encodeUtf8(s));var c=!1;"valueConstructed"in a&&(c=a.valueConstructed);var f=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.type).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,u,c,s)])]);t.value.push(f)}return t}o.certificateFromPem=function(e,t,r){var a=n.pem.decode(e)[0];if("CERTIFICATE"!==a.type&&"X509 CERTIFICATE"!==a.type&&"TRUSTED CERTIFICATE"!==a.type){var s=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw s.headerType=a.type,s}if(a.procType&&"ENCRYPTED"===a.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=i.fromDer(a.body,r);return o.certificateFromAsn1(u,t)},o.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:i.toDer(o.certificateToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},o.publicKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PUBLIC KEY"!==t.type&&"RSA PUBLIC KEY"!==t.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var a=i.fromDer(t.body);return o.publicKeyFromAsn1(a)},o.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:i.toDer(o.publicKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},o.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:i.toDer(o.publicKeyToRSAPublicKey(e)).getBytes()};return n.pem.encode(r,{maxline:t})},o.getPublicKeyFingerprint=function(e,t){var r,a=(t=t||{}).md||n.md.sha1.create();switch(t.type||"RSAPublicKey"){case"RSAPublicKey":r=i.toDer(o.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":r=i.toDer(o.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}a.start(),a.update(r);var s=a.digest();if("hex"===t.encoding){var u=s.toHex();return t.delimiter?u.match(/.{2}/g).join(t.delimiter):u}if("binary"===t.encoding)return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".');return s},o.certificationRequestFromPem=function(e,t,r){var a=n.pem.decode(e)[0];if("CERTIFICATE REQUEST"!==a.type){var s=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw s.headerType=a.type,s}if(a.procType&&"ENCRYPTED"===a.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var u=i.fromDer(a.body,r);return o.certificationRequestFromAsn1(u,t)},o.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:i.toDer(o.certificationRequestToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},o.createCertificate=function(){var e={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return d(e.issuer,t)},e.issuer.addField=function(t){y([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return d(e.subject,t)},e.subject.addField=function(t){y([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){y(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){y(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)b(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){"string"===typeof t&&(t={name:t});for(var r,n=null,i=0;null===n&&i<e.extensions.length;++i)r=e.extensions[i],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(n=r);return n},e.sign=function(t,r){e.md=r||n.md.sha1.create();var s=a[e.md.algorithm+"WithRSAEncryption"];if(!s){var u=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=s,e.tbsCertificate=o.getTBSCertificate(e);var c=i.toDer(e.tbsCertificate);e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var s=t.issuer,u=e.subject;throw(v=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.")).expectedIssuer=s.attributes,v.actualIssuer=u.attributes,v}var c=t.md;if(null===c){if(t.signatureOid in a)switch(a[t.signatureOid]){case"sha1WithRSAEncryption":c=n.md.sha1.create();break;case"md5WithRSAEncryption":c=n.md.md5.create();break;case"sha256WithRSAEncryption":c=n.md.sha256.create();break;case"sha384WithRSAEncryption":c=n.md.sha384.create();break;case"sha512WithRSAEncryption":c=n.md.sha512.create();break;case"RSASSA-PSS":c=n.md.sha256.create()}if(null===c)throw(v=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=t.signatureOid,v;var f=t.tbsCertificate||o.getTBSCertificate(t),l=i.toDer(f);c.update(l.getBytes())}if(null!==c){var h;switch(t.signatureOid){case a.sha1WithRSAEncryption:h=void 0;break;case a["RSASSA-PSS"]:var d,p,v;if(void 0===(d=a[t.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[d])throw(v=new Error("Unsupported MGF hash function.")).oid=t.signatureParameters.mgf.hash.algorithmOid,v.name=d,v;if(void 0===(p=a[t.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[p])throw(v=new Error("Unsupported MGF function.")).oid=t.signatureParameters.mgf.algorithmOid,v.name=p,v;if(p=n.mgf[p].create(n.md[d].create()),void 0===(d=a[t.signatureParameters.hash.algorithmOid])||void 0===n.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:t.signatureParameters.hash.algorithmOid,name:d};h=n.pss.create(n.md[d].create(),p,t.signatureParameters.saltLength)}r=e.publicKey.verify(c.digest().getBytes(),t.signature,h)}return r},e.isIssuer=function(t){var r=!1,n=e.issuer,i=t.subject;if(n.hash&&i.hash)r=n.hash===i.hash;else if(n.attributes.length===i.attributes.length){var o,a;r=!0;for(var s=0;r&&s<n.attributes.length;++s)o=n.attributes[s],a=i.attributes[s],o.type===a.type&&o.value===a.value||(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return o.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=a.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var i=e.extensions[r];if(i.id===t){var o=e.generateSubjectKeyIdentifier().getBytes();return n.util.hexToBytes(i.subjectKeyIdentifier)===o}}return!1},e},o.certificateFromAsn1=function(e,t){var r={},s=[];if(!i.validate(e,c,r,s))throw(h=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.")).errors=s,h;if(i.derToOid(r.publicKeyOid)!==o.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=o.createCertificate();u.version=r.certVersion?r.certVersion.charCodeAt(0):0;var f=n.util.createBuffer(r.certSerialNumber);u.serialNumber=f.toHex(),u.signatureOid=n.asn1.derToOid(r.certSignatureOid),u.signatureParameters=p(u.signatureOid,r.certSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.certinfoSignatureOid),u.siginfo.parameters=p(u.siginfo.algorithmOid,r.certinfoSignatureParams,!1),u.signature=r.certSignature;var l=[];if(void 0!==r.certValidity1UTCTime&&l.push(i.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&l.push(i.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&l.push(i.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&l.push(i.generalizedTimeToDate(r.certValidity4GeneralizedTime)),l.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(u.validity.notBefore=l[0],u.validity.notAfter=l[1],u.tbsCertificate=r.tbsCertificate,t){var h;if(u.md=null,u.signatureOid in a)switch(a[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(h=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=u.signatureOid,h;var v=i.toDer(u.tbsCertificate);u.md.update(v.getBytes())}var b=n.md.sha1.create();u.issuer.getField=function(e){return d(u.issuer,e)},u.issuer.addField=function(e){y([e]),u.issuer.attributes.push(e)},u.issuer.attributes=o.RDNAttributesAsArray(r.certIssuer,b),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=b.digest().toHex();var g=n.md.sha1.create();return u.subject.getField=function(e){return d(u.subject,e)},u.subject.addField=function(e){y([e]),u.subject.attributes.push(e)},u.subject.attributes=o.RDNAttributesAsArray(r.certSubject,g),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=g.digest().toHex(),r.certExtensions?u.extensions=o.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},o.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],i=0;i<n.value.length;++i)t.push(o.certificateExtensionFromAsn1(n.value[i]));return t},o.certificateExtensionFromAsn1=function(e){var t={};if(t.id=i.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===i.Type.BOOLEAN?(t.critical=0!==e.value[1].value.charCodeAt(0),t.value=e.value[2].value):t.value=e.value[1].value,t.id in a)if(t.name=a[t.id],"keyUsage"===t.name){var r=0,o=0;(u=i.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1),o=u.value.length>2?u.value.charCodeAt(2):0),t.digitalSignature=128===(128&r),t.nonRepudiation=64===(64&r),t.keyEncipherment=32===(32&r),t.dataEncipherment=16===(16&r),t.keyAgreement=8===(8&r),t.keyCertSign=4===(4&r),t.cRLSign=2===(2&r),t.encipherOnly=1===(1&r),t.decipherOnly=128===(128&o)}else if("basicConstraints"===t.name){(u=i.fromDer(t.value)).value.length>0&&u.value[0].type===i.Type.BOOLEAN?t.cA=0!==u.value[0].value.charCodeAt(0):t.cA=!1;var s=null;u.value.length>0&&u.value[0].type===i.Type.INTEGER?s=u.value[0].value:u.value.length>1&&(s=u.value[1].value),null!==s&&(t.pathLenConstraint=i.derToInteger(s))}else if("extKeyUsage"===t.name)for(var u=i.fromDer(t.value),c=0;c<u.value.length;++c){var f=i.derToOid(u.value[c].value);f in a?t[a[f]]=!0:t[f]=!0}else if("nsCertType"===t.name){r=0;(u=i.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1)),t.client=128===(128&r),t.server=64===(64&r),t.email=32===(32&r),t.objsign=16===(16&r),t.reserved=8===(8&r),t.sslCA=4===(4&r),t.emailCA=2===(2&r),t.objCA=1===(1&r)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var l;t.altNames=[];u=i.fromDer(t.value);for(var h=0;h<u.value.length;++h){var d={type:(l=u.value[h]).type,value:l.value};switch(t.altNames.push(d),l.type){case 1:case 2:case 6:break;case 7:d.ip=n.util.bytesToIP(l.value);break;case 8:d.oid=i.derToOid(l.value)}}}else if("subjectKeyIdentifier"===t.name){u=i.fromDer(t.value);t.subjectKeyIdentifier=n.util.bytesToHex(u.value)}return t},o.certificationRequestFromAsn1=function(e,t){var r={},s=[];if(!i.validate(e,h,r,s))throw(c=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.")).errors=s,c;if(i.derToOid(r.publicKeyOid)!==o.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=o.createCertificationRequest();if(u.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,u.signatureOid=n.asn1.derToOid(r.csrSignatureOid),u.signatureParameters=p(u.signatureOid,r.csrSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.csrSignatureOid),u.siginfo.parameters=p(u.siginfo.algorithmOid,r.csrSignatureParams,!1),u.signature=r.csrSignature,u.certificationRequestInfo=r.certificationRequestInfo,t){var c;if(u.md=null,u.signatureOid in a)switch(a[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(c=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=u.signatureOid,c;var f=i.toDer(u.certificationRequestInfo);u.md.update(f.getBytes())}var l=n.md.sha1.create();return u.subject.getField=function(e){return d(u.subject,e)},u.subject.addField=function(e){y([e]),u.subject.attributes.push(e)},u.subject.attributes=o.RDNAttributesAsArray(r.certificationRequestInfoSubject,l),u.subject.hash=l.digest().toHex(),u.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),u.getAttribute=function(e){return d(u,e)},u.addAttribute=function(e){y([e]),u.attributes.push(e)},u.attributes=o.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),u},o.createCertificationRequest=function(){var e={version:0,signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return d(e.subject,t)},e.subject.addField=function(t){y([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return d(e,t)},e.addAttribute=function(t){y([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){y(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){y(t),e.attributes=t},e.sign=function(t,r){e.md=r||n.md.sha1.create();var s=a[e.md.algorithm+"WithRSAEncryption"];if(!s){var u=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=s,e.certificationRequestInfo=o.getCertificationRequestInfo(e);var c=i.toDer(e.certificationRequestInfo);e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(null===r){if(e.signatureOid in a)switch(a[e.signatureOid]){case"sha1WithRSAEncryption":r=n.md.sha1.create();break;case"md5WithRSAEncryption":r=n.md.md5.create();break;case"sha256WithRSAEncryption":r=n.md.sha256.create();break;case"sha384WithRSAEncryption":r=n.md.sha384.create();break;case"sha512WithRSAEncryption":r=n.md.sha512.create();break;case"RSASSA-PSS":r=n.md.sha256.create()}if(null===r)throw(h=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=e.signatureOid,h;var s=e.certificationRequestInfo||o.getCertificationRequestInfo(e),u=i.toDer(s);r.update(u.getBytes())}if(null!==r){var c;switch(e.signatureOid){case a.sha1WithRSAEncryption:break;case a["RSASSA-PSS"]:var f,l,h;if(void 0===(f=a[e.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[f])throw(h=new Error("Unsupported MGF hash function.")).oid=e.signatureParameters.mgf.hash.algorithmOid,h.name=f,h;if(void 0===(l=a[e.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[l])throw(h=new Error("Unsupported MGF function.")).oid=e.signatureParameters.mgf.algorithmOid,h.name=l,h;if(l=n.mgf[l].create(n.md[f].create()),void 0===(f=a[e.signatureParameters.hash.algorithmOid])||void 0===n.md[f])throw(h=new Error("Unsupported RSASSA-PSS hash function.")).oid=e.signatureParameters.hash.algorithmOid,h.name=f,h;c=n.pss.create(n.md[f].create(),l,e.signatureParameters.saltLength)}t=e.publicKey.verify(r.digest().getBytes(),e.signature,c)}return t},e};var w=new Date("1950-01-01T00:00:00Z"),k=new Date("2050-01-01T00:00:00Z");function S(e){return e>=w&&e<k?i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(e)):i.create(i.Class.UNIVERSAL,i.Type.GENERALIZEDTIME,!1,i.dateToGeneralizedTime(e))}o.getTBSCertificate=function(e){var t=S(e.validity.notBefore),r=S(e.validity.notAfter),a=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(e.serialNumber)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.siginfo.algorithmOid).getBytes()),g(e.siginfo.algorithmOid,e.siginfo.parameters)]),v(e.issuer),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,r]),v(e.subject),o.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&a.value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&a.value.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&a.value.push(o.certificateExtensionsToAsn1(e.extensions)),a},o.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),v(e.subject),o.publicKeyToAsn1(e.publicKey),m(e)])},o.distinguishedNameToAsn1=function(e){return v(e)},o.certificateToAsn1=function(e){var t=e.tbsCertificate||o.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),g(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},o.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(o.certificateExtensionToAsn1(e[n]));return t},o.certificateExtensionToAsn1=function(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.id).getBytes())),e.critical&&t.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=e.value;return"string"!==typeof e.value&&(r=i.toDer(r).getBytes()),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r)),t},o.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||o.getCertificationRequestInfo(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),g(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},o.createCaStore=function(e){var t={certs:{}};function r(e){return a(e),t.certs[e.hash]||null}function a(e){if(!e.hash){var t=n.md.sha1.create();e.attributes=o.RDNAttributesAsArray(v(e),t),e.hash=t.digest().toHex()}}if(t.getIssuer=function(e){return r(e.issuer)},t.addCertificate=function(e){if("string"===typeof e&&(e=n.pki.certificateFromPem(e)),a(e.subject),!t.hasCertificate(e))if(e.subject.hash in t.certs){var r=t.certs[e.subject.hash];n.util.isArray(r)||(r=[r]),r.push(e),t.certs[e.subject.hash]=r}else t.certs[e.subject.hash]=e},t.hasCertificate=function(e){"string"===typeof e&&(e=n.pki.certificateFromPem(e));var t=r(e.subject);if(!t)return!1;n.util.isArray(t)||(t=[t]);for(var a=i.toDer(o.certificateToAsn1(e)).getBytes(),s=0;s<t.length;++s){if(a===i.toDer(o.certificateToAsn1(t[s])).getBytes())return!0}return!1},t.listAllCertificates=function(){var e=[];for(var r in t.certs)if(t.certs.hasOwnProperty(r)){var i=t.certs[r];if(n.util.isArray(i))for(var o=0;o<i.length;++o)e.push(i[o]);else e.push(i)}return e},t.removeCertificate=function(e){var s;if("string"===typeof e&&(e=n.pki.certificateFromPem(e)),a(e.subject),!t.hasCertificate(e))return null;var u=r(e.subject);if(!n.util.isArray(u))return s=t.certs[e.subject.hash],delete t.certs[e.subject.hash],s;for(var c=i.toDer(o.certificateToAsn1(e)).getBytes(),f=0;f<u.length;++f){c===i.toDer(o.certificateToAsn1(u[f])).getBytes()&&(s=u[f],u.splice(f,1))}return 0===u.length&&delete t.certs[e.subject.hash],s},e)for(var s=0;s<e.length;++s){var u=e[s];t.addCertificate(u)}return t},o.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},o.verifyCertificateChain=function(e,t,r){"function"===typeof r&&(r={verify:r}),r=r||{};var i=(t=t.slice(0)).slice(0),a=r.validityCheckDate;"undefined"===typeof a&&(a=new Date);var s=!0,u=null,c=0;do{var f=t.shift(),l=null,h=!1;if(a&&(a<f.validity.notBefore||a>f.validity.notAfter)&&(u={message:"Certificate is not valid yet or has expired.",error:o.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:a}),null===u){if(null===(l=t[0]||e.getIssuer(f))&&f.isIssuer(f)&&(h=!0,l=f),l){var d=l;n.util.isArray(d)||(d=[d]);for(var p=!1;!p&&d.length>0;){l=d.shift();try{p=l.verify(f)}catch(S){}}p||(u={message:"Certificate signature is invalid.",error:o.certificateError.bad_certificate})}null!==u||l&&!h||e.hasCertificate(f)||(u={message:"Certificate is not trusted.",error:o.certificateError.unknown_ca})}if(null===u&&l&&!f.isIssuer(l)&&(u={message:"Certificate issuer is invalid.",error:o.certificateError.bad_certificate}),null===u)for(var v={keyUsage:!0,basicConstraints:!0},y=0;null===u&&y<f.extensions.length;++y){var b=f.extensions[y];b.critical&&!(b.name in v)&&(u={message:"Certificate has an unsupported critical extension.",error:o.certificateError.unsupported_certificate})}if(null===u&&(!s||0===t.length&&(!l||h))){var g=f.getExtension("basicConstraints"),m=f.getExtension("keyUsage");if(null!==m&&(m.keyCertSign&&null!==g||(u={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:o.certificateError.bad_certificate})),null!==u||null===g||g.cA||(u={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:o.certificateError.bad_certificate}),null===u&&null!==m&&"pathLenConstraint"in g)c-1>g.pathLenConstraint&&(u={message:"Certificate basicConstraints pathLenConstraint violated.",error:o.certificateError.bad_certificate})}var w=null===u||u.error,k=r.verify?r.verify(w,c,i):w;if(!0!==k)throw!0===w&&(u={message:"The application rejected the certificate.",error:o.certificateError.bad_certificate}),(k||0===k)&&("object"!==typeof k||n.util.isArray(k)?"string"===typeof k&&(u.error=k):(k.message&&(u.message=k.message),k.error&&(u.error=k.error))),u;u=null,s=!1,++c}while(t.length>0);return!0}},function(e,t,r){"use strict";t.PROTOCOL_ID="/multistream/1.0.0"},function(e,t,r){"use strict";var n=r(48),i=r(8),o=r(9),a=r(61),s=r(26),u=r(27),c=r(15),f=r(57).EventEmitter,l=r(43),h=r(942),d=r(943),p=r(944),v=r(945),y=r(50).codes.ERR_INVALID_PARAMETERS,b=function(e){s(r,e);var t=u(r);function r(e){var n,o=e.peerId;return i(this,r),(n=t.call(this))._peerId=o,n.addressBook=new h(a(n)),n.keyBook=new d(a(n)),n.metadataBook=new p(a(n)),n.protoBook=new v(a(n)),n}return o(r,[{key:"start",value:function(){}},{key:"stop",value:function(){}},{key:"peers",get:function(){var e=this,t=new Set([].concat(n(this.addressBook.data.keys()),n(this.keyBook.data.keys()),n(this.protoBook.data.keys()),n(this.metadataBook.data.keys())));this._peerId&&t.delete(this._peerId.toB58String());var r=new Map;return t.forEach((function(t){r.set(t,e.get(l.createFromB58String(t)))})),r}},{key:"delete",value:function(e){var t=this.addressBook.delete(e),r=this.keyBook.delete(e),n=this.protoBook.delete(e),i=this.metadataBook.delete(e);return t||r||n||i}},{key:"get",value:function(e){if(!l.isPeerId(e))throw c(new Error("peerId must be an instance of peer-id"),y);var t=this.keyBook.data.get(e.toB58String()),r=this.addressBook.get(e),n=this.metadataBook.get(e),i=this.protoBook.get(e);if(t||r||n||i)return{id:t||e,addresses:r||[],protocols:i||[],metadata:n}}}]),r}(f);e.exports=b},function(e,t,r){"use strict";var n=r(0),i=r(40),o=r(6),a=r(22),s=Object.assign(a("libp2p:ping"),{error:a("libp2p:ping:err")}),u=r(15),c=r(267),f=r(60).pipe,l=r(281).toBuffer,h=r(312),d=h.collect,p=h.take,v=r(292).equals,y=r(953),b=y.PROTOCOL_NAME,g=y.PING_LENGTH,m=y.PROTOCOL_VERSION;function w(){return(w=o(n.mark((function e(t,r){var o,a,h,y,w,k,S,E,_,A;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="/".concat(t._config.protocolPrefix,"/").concat(b,"/").concat(m),s("dialing %s to %s",o,r.toB58String?r.toB58String():r),e.next=4,t.dial(r);case 4:return a=e.sent,e.next=7,a.newStream(o);case 7:return h=e.sent,y=h.stream,w=Date.now(),k=c.randomBytes(g),e.next=13,f([k],y,(function(e){return p(1,e)}),l,d);case 13:if(S=e.sent,E=i(S,1),_=E[0],A=Date.now(),v(k,_)){e.next=19;break}throw u(new Error("Received wrong ping ack"),"ERR_WRONG_PING_ACK");case 19:return e.abrupt("return",A-w);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(t=e.exports=function(e,t){return w.apply(this,arguments)}).mount=function(e){e.handle("/".concat(e._config.protocolPrefix,"/").concat(b,"/").concat(m),(function(e){var t=e.stream;return f(t,t)}))},t.unmount=function(e){e.unhandle("/".concat(e._config.protocolPrefix,"/").concat(b,"/").concat(m))}},function(e,t,r){(function(t){e.exports=function(){return"undefined"!==typeof window&&"object"===typeof window.process&&"renderer"===window.process.type||(!("undefined"===typeof t||"object"!==typeof t.versions||!t.versions.electron)||"object"===typeof navigator&&"string"===typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}}).call(this,r(39))},function(e,t,r){"use strict";var n=r(29),i=r(98);function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}var a=o("utf8","u",(function(e){return"u"+new TextDecoder("utf8").decode(e)}),(function(e){return(new TextEncoder).encode(e.substring(1))})),s=o("ascii","a",(function(e){for(var t="a",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(function(e){e=e.substring(1);for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),u=n({utf8:a,"utf-8":a,hex:i.bases.base16,latin1:s,ascii:s,binary:s},i.bases);e.exports=u},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(215).concat,a=r(119).fromString,s=r(216);e.exports={create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.algorithm,r=void 0===t?"AES-GCM":t,u=e.nonceLength,c=void 0===u?12:u,f=e.keyLength,l=void 0===f?16:f,h=e.digest,d=void 0===h?"SHA-256":h,p=e.saltLength,v=void 0===p?16:p,y=e.iterations,b=void 0===y?32767:y,g=s.get();function m(e,t){return w.apply(this,arguments)}function w(){return(w=i(n.mark((function e(t,i){var s,u,f,h,p,y,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=g.getRandomValues(new Uint8Array(v)),u=g.getRandomValues(new Uint8Array(c)),f={name:r,iv:u},h={name:"PBKDF2",salt:s,iterations:b,hash:{name:d}},e.next=6,g.subtle.importKey("raw",a(i),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]);case 6:return p=e.sent,e.next=9,g.subtle.deriveKey(h,p,{name:r,length:l},!0,["encrypt"]);case 9:return y=e.sent,e.next=12,g.subtle.encrypt(f,y,t);case 12:return m=e.sent,e.abrupt("return",o([s,f.iv,new Uint8Array(m)]));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t){return S.apply(this,arguments)}function S(){return(S=i(n.mark((function e(t,i){var o,s,u,f,h,p,y,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.slice(0,v),s=t.slice(v,v+c),u=t.slice(v+c),f={name:r,iv:s},h={name:"PBKDF2",salt:o,iterations:b,hash:{name:d}},e.next=7,g.subtle.importKey("raw",a(i),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]);case 7:return p=e.sent,e.next=10,g.subtle.deriveKey(h,p,{name:r,length:l},!0,["decrypt"]);case 10:return y=e.sent,e.next=13,g.subtle.decrypt(f,y,u);case 13:return m=e.sent,e.abrupt("return",new Uint8Array(m));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return l*=8,{encrypt:m,decrypt:k}}}},function(e,t,r){"use strict";var n=r(205),i=r(15);e.exports=function(e){if(isNaN(e)||e<=0)throw i(new Error("random bytes length must be a Number bigger than 0"),"ERR_INVALID_LENGTH");return n(e)}},function(e,t,r){"use strict";var n=r(0),i=r(45),o=r(44),a=r(30),s=1<<20;e.exports=function(e){e=e||s;var t=function(t){if(t.data&&t.data.length>e)throw Object.assign(new Error("message size too large!"),{code:"ERR_MSG_TOO_BIG"})};return function(e){return function(){var r=o(n.mark((function r(){var o,s,u,c,f,l,h;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=!0,s=!1,r.prev=2,c=a(e);case 4:return r.next=6,i(c.next());case 6:return f=r.sent,o=f.done,r.next=10,i(f.value);case 10:if(l=r.sent,o){r.next=19;break}return h=l,Array.isArray(h)?h.forEach(t):t(h),r.next=16,h;case 16:o=!0,r.next=4;break;case 19:r.next=25;break;case 21:r.prev=21,r.t0=r.catch(2),s=!0,u=r.t0;case 25:if(r.prev=25,r.prev=26,o||null==c.return){r.next=30;break}return r.next=30,i(c.return());case 30:if(r.prev=30,!s){r.next=33;break}throw u;case 33:return r.finish(30);case 34:return r.finish(25);case 35:case"end":return r.stop()}}),r,null,[[2,21,25,35],[26,,30,34]])})));return function(){return r.apply(this,arguments)}}()()}},e.exports.MAX_MSG_SIZE=s},function(e,t,r){"use strict";var n=Object.freeze({NEW_STREAM:0,MESSAGE_RECEIVER:1,MESSAGE_INITIATOR:2,CLOSE_RECEIVER:3,CLOSE_INITIATOR:4,RESET_RECEIVER:5,RESET_INITIATOR:6});t.MessageTypes=n,t.InitiatorMessageTypes=Object.freeze({NEW_STREAM:n.NEW_STREAM,MESSAGE:n.MESSAGE_INITIATOR,CLOSE:n.CLOSE_INITIATOR,RESET:n.RESET_INITIATOR}),t.ReceiverMessageTypes=Object.freeze({MESSAGE:n.MESSAGE_RECEIVER,CLOSE:n.CLOSE_RECEIVER,RESET:n.RESET_RECEIVER}),t.MessageTypeNames=Object.freeze(Object.entries(n).reduce((function(e,t){return e[t[1]]=t[0],e}),{}))},function(e,t,r){"use strict";var n=r(8),i=r(9),o="undefined"!==typeof navigator&&"ReactNative"===navigator.product;var a=self.URL,s=o?"http://localhost":self.location.protocol+"//"+self.location.host,u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;n(this,e),this.super=new a(t,r),this.path=this.pathname+this.search,this.auth=this.username&&this.password?this.username+":"+this.password:null,this.query=this.search&&this.search.startsWith("?")?this.search.slice(1):null}return i(e,[{key:"hash",get:function(){return this.super.hash},set:function(e){this.super.hash=e}},{key:"host",get:function(){return this.super.host},set:function(e){this.super.host=e}},{key:"hostname",get:function(){return this.super.hostname},set:function(e){this.super.hostname=e}},{key:"href",get:function(){return this.super.href},set:function(e){this.super.href=e}},{key:"origin",get:function(){return this.super.origin}},{key:"password",get:function(){return this.super.password},set:function(e){this.super.password=e}},{key:"pathname",get:function(){return this.super.pathname},set:function(e){this.super.pathname=e}},{key:"port",get:function(){return this.super.port},set:function(e){this.super.port=e}},{key:"protocol",get:function(){return this.super.protocol},set:function(e){this.super.protocol=e}},{key:"search",get:function(){return this.super.search},set:function(e){this.super.search=e}},{key:"searchParams",get:function(){return this.super.searchParams}},{key:"username",get:function(){return this.super.username},set:function(e){this.super.username=e}},{key:"toJSON",value:function(){return this.super.toJSON()}},{key:"toString",value:function(){return this.super.toString()}},{key:"format",value:function(){return this.toString()}}],[{key:"createObjectURL",value:function(e){return a.createObjectURL(e)}},{key:"revokeObjectURL",value:function(e){a.revokeObjectURL(e)}}]),e}();e.exports={URLWithLegacySupport:u,URLSearchParams:self.URLSearchParams,defaultBase:s,format:function(e){if("string"===typeof e)return new a(e).toString();if(!(e instanceof a)){var t=e.username&&e.password?"".concat(e.username,":").concat(e.password,"@"):"",r=e.auth?e.auth+"@":"",n=e.port?":"+e.port:"",i=e.protocol?e.protocol+"//":"",o=e.host||"",s=e.hostname||"",u=e.search||(e.query?"?"+e.query:""),c=e.hash||"",f=e.pathname||"",l=e.path||f+u;return"".concat(i).concat(t||r).concat(o||s+n).concat(l).concat(c)}}}},function(e,t,r){"use strict";t.CODE_P2P=421,t.CODE_CIRCUIT=290,t.CODE_TCP=6,t.CODE_WS=477,t.CODE_WSS=478,t.CLOSE_TIMEOUT=2e3},function(e,t,r){"use strict";var n=r(294),i=r(487),o=i.CODE_CIRCUIT,a=i.CODE_P2P,s=i.CODE_TCP,u=i.CODE_WS,c=i.CODE_WSS;e.exports={all:function(e){return e.filter((function(e){if(e.protoCodes().includes(o))return!1;var t=e.decapsulateCode(a);return n.WebSockets.matches(t)||n.WebSocketsSecure.matches(t)}))},dnsWss:function(e){return e.filter((function(e){if(e.protoCodes().includes(o))return!1;var t=e.decapsulateCode(a);return n.WebSocketsSecure.matches(t)&&n.DNS.matches(t.decapsulateCode(s).decapsulateCode(c))}))},dnsWsOrWss:function(e){return e.filter((function(e){if(e.protoCodes().includes(o))return!1;var t=e.decapsulateCode(a);return n.WebSockets.matches(t)?n.DNS.matches(t.decapsulateCode(s).decapsulateCode(u)):n.WebSocketsSecure.matches(t)&&n.DNS.matches(t.decapsulateCode(s).decapsulateCode(c))}))}}},function(e,t,r){var n=r(0),i=r(6),o=r(30),a=r(79),s={string:function(){return""},buffer:function(){return a()}};e.exports=function(){var e=i(n.mark((function e(t,r){var i,a,u,c,f,l,h,d,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=r||{}).type||s[r.type]){e.next=3;break}throw new Error('invalid type "'.concat(r.type,'"'));case 3:u=!0,c=!1,e.prev=5,l=o(t);case 7:return e.next=9,l.next();case 9:return h=e.sent,u=h.done,e.next=13,h.value;case 13:if(d=e.sent,u){e.next=21;break}p=d,i||(a=r.type||("string"===typeof p?"string":"buffer"),i=s[a]()),"string"===a?i+=p:i.append(p);case 18:u=!0,e.next=7;break;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(5),c=!0,f=e.t0;case 27:if(e.prev=27,e.prev=28,u||null==l.return){e.next=32;break}return e.next=32,l.return();case 32:if(e.prev=32,!c){e.next=35;break}throw f;case 35:return e.finish(32);case 36:return e.finish(27);case 37:return e.abrupt("return",i||s[r.type||"buffer"]());case 38:case"end":return e.stop()}}),e,null,[[5,23,27,37],[28,,32,36]])})));return function(t,r){return e.apply(this,arguments)}}()},,,function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-pubsub-rpc"]||(n.roots["libp2p-pubsub-rpc"]={});s.RPC=function(){function e(e){if(this.subscriptions=[],this.msgs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.subscriptions=a.emptyArray,e.prototype.msgs=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.subscriptions&&e.subscriptions.length)for(var r=0;r<e.subscriptions.length;++r)s.RPC.SubOpts.encode(e.subscriptions[r],t.uint32(10).fork()).ldelim();if(null!=e.msgs&&e.msgs.length)for(r=0;r<e.msgs.length;++r)s.RPC.Message.encode(e.msgs[r],t.uint32(18).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.RPC;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.subscriptions&&n.subscriptions.length||(n.subscriptions=[]),n.subscriptions.push(s.RPC.SubOpts.decode(e,e.uint32()));break;case 2:n.msgs&&n.msgs.length||(n.msgs=[]),n.msgs.push(s.RPC.Message.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.RPC)return e;var t=new s.RPC;if(e.subscriptions){if(!Array.isArray(e.subscriptions))throw TypeError(".RPC.subscriptions: array expected");t.subscriptions=[];for(var r=0;r<e.subscriptions.length;++r){if("object"!==typeof e.subscriptions[r])throw TypeError(".RPC.subscriptions: object expected");t.subscriptions[r]=s.RPC.SubOpts.fromObject(e.subscriptions[r])}}if(e.msgs){if(!Array.isArray(e.msgs))throw TypeError(".RPC.msgs: array expected");t.msgs=[];for(r=0;r<e.msgs.length;++r){if("object"!==typeof e.msgs[r])throw TypeError(".RPC.msgs: object expected");t.msgs[r]=s.RPC.Message.fromObject(e.msgs[r])}}return t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.subscriptions=[],r.msgs=[]),e.subscriptions&&e.subscriptions.length){r.subscriptions=[];for(var n=0;n<e.subscriptions.length;++n)r.subscriptions[n]=s.RPC.SubOpts.toObject(e.subscriptions[n],t)}if(e.msgs&&e.msgs.length){r.msgs=[];for(n=0;n<e.msgs.length;++n)r.msgs[n]=s.RPC.Message.toObject(e.msgs[n],t)}return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e.SubOpts=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.subscribe=null,e.prototype.topicID=null,Object.defineProperty(e.prototype,"_subscribe",{get:a.oneOfGetter(t=["subscribe"]),set:a.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_topicID",{get:a.oneOfGetter(t=["topicID"]),set:a.oneOfSetter(t)}),e.encode=function(e,t){return t||(t=o.create()),null!=e.subscribe&&Object.hasOwnProperty.call(e,"subscribe")&&t.uint32(8).bool(e.subscribe),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&t.uint32(18).string(e.topicID),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.RPC.SubOpts;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.subscribe=e.bool();break;case 2:n.topicID=e.string();break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.RPC.SubOpts)return e;var t=new s.RPC.SubOpts;return null!=e.subscribe&&(t.subscribe=Boolean(e.subscribe)),null!=e.topicID&&(t.topicID=String(e.topicID)),t},e.toObject=function(e,t){t||(t={});var r={};return null!=e.subscribe&&e.hasOwnProperty("subscribe")&&(r.subscribe=e.subscribe,t.oneofs&&(r._subscribe="subscribe")),null!=e.topicID&&e.hasOwnProperty("topicID")&&(r.topicID=e.topicID,t.oneofs&&(r._topicID="topicID")),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.Message=function(){function e(e){if(this.topicIDs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.from=null,e.prototype.data=null,e.prototype.seqno=null,e.prototype.topicIDs=a.emptyArray,e.prototype.signature=null,e.prototype.key=null,Object.defineProperty(e.prototype,"_from",{get:a.oneOfGetter(t=["from"]),set:a.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_data",{get:a.oneOfGetter(t=["data"]),set:a.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_seqno",{get:a.oneOfGetter(t=["seqno"]),set:a.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_signature",{get:a.oneOfGetter(t=["signature"]),set:a.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_key",{get:a.oneOfGetter(t=["key"]),set:a.oneOfSetter(t)}),e.encode=function(e,t){if(t||(t=o.create()),null!=e.from&&Object.hasOwnProperty.call(e,"from")&&t.uint32(10).bytes(e.from),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(18).bytes(e.data),null!=e.seqno&&Object.hasOwnProperty.call(e,"seqno")&&t.uint32(26).bytes(e.seqno),null!=e.topicIDs&&e.topicIDs.length)for(var r=0;r<e.topicIDs.length;++r)t.uint32(34).string(e.topicIDs[r]);return null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(42).bytes(e.signature),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(50).bytes(e.key),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.RPC.Message;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.from=e.bytes();break;case 2:n.data=e.bytes();break;case 3:n.seqno=e.bytes();break;case 4:n.topicIDs&&n.topicIDs.length||(n.topicIDs=[]),n.topicIDs.push(e.string());break;case 5:n.signature=e.bytes();break;case 6:n.key=e.bytes();break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.RPC.Message)return e;var t=new s.RPC.Message;if(null!=e.from&&("string"===typeof e.from?a.base64.decode(e.from,t.from=a.newBuffer(a.base64.length(e.from)),0):e.from.length&&(t.from=e.from)),null!=e.data&&("string"===typeof e.data?a.base64.decode(e.data,t.data=a.newBuffer(a.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),null!=e.seqno&&("string"===typeof e.seqno?a.base64.decode(e.seqno,t.seqno=a.newBuffer(a.base64.length(e.seqno)),0):e.seqno.length&&(t.seqno=e.seqno)),e.topicIDs){if(!Array.isArray(e.topicIDs))throw TypeError(".RPC.Message.topicIDs: array expected");t.topicIDs=[];for(var r=0;r<e.topicIDs.length;++r)t.topicIDs[r]=String(e.topicIDs[r])}return null!=e.signature&&("string"===typeof e.signature?a.base64.decode(e.signature,t.signature=a.newBuffer(a.base64.length(e.signature)),0):e.signature.length&&(t.signature=e.signature)),null!=e.key&&("string"===typeof e.key?a.base64.decode(e.key,t.key=a.newBuffer(a.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.topicIDs=[]),null!=e.from&&e.hasOwnProperty("from")&&(r.from=t.bytes===String?a.base64.encode(e.from,0,e.from.length):t.bytes===Array?Array.prototype.slice.call(e.from):e.from,t.oneofs&&(r._from="from")),null!=e.data&&e.hasOwnProperty("data")&&(r.data=t.bytes===String?a.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data,t.oneofs&&(r._data="data")),null!=e.seqno&&e.hasOwnProperty("seqno")&&(r.seqno=t.bytes===String?a.base64.encode(e.seqno,0,e.seqno.length):t.bytes===Array?Array.prototype.slice.call(e.seqno):e.seqno,t.oneofs&&(r._seqno="seqno")),e.topicIDs&&e.topicIDs.length){r.topicIDs=[];for(var n=0;n<e.topicIDs.length;++n)r.topicIDs[n]=e.topicIDs[n]}return null!=e.signature&&e.hasOwnProperty("signature")&&(r.signature=t.bytes===String?a.base64.encode(e.signature,0,e.signature.length):t.bytes===Array?Array.prototype.slice.call(e.signature):e.signature,t.oneofs&&(r._signature="signature")),null!=e.key&&e.hasOwnProperty("key")&&(r.key=t.bytes===String?a.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key,t.oneofs&&(r._key="key")),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e}(),e.exports=s},function(e,t,r){"use strict";var n=r(21),i=r(306),o=r(85).toString,a=r(96).fromString,s=r(219),u=r(49).sha256;e.exports={randomSeqno:function(){return i(8)},msgId:function(e,t){var r;r=e instanceof Uint8Array?s.createFromBytes(e).id:s.parse(e).id;var n=new Uint8Array(r.length+t.length);return n.set(r,0),n.set(t,r.length),n},noSignMsgId:function(e){return u.encode(e)},anyMatch:function(e,t){var r;r=Array.isArray(t)?function(e){return t.indexOf(e)>-1}:function(e){return t.has(e)};var i,o=n(e);try{for(o.s();!(i=o.n()).done;){if(r(i.value))return!0}}catch(a){o.e(a)}finally{o.f()}return!1},ensureArray:function(e){return Array.isArray(e)?e:[e]},normalizeInRpcMessage:function(e,t){var r=Object.assign({},e);return e.from instanceof Uint8Array&&(r.from=o(e.from,"base58btc")),t&&(r.receivedFrom=t),r},normalizeOutRpcMessage:function(e){var t=Object.assign({},e);return"string"===typeof e.from&&(t.from=a(e.from,"base58btc")),"string"===typeof e.data&&(t.data=a(e.data)),t}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(180).concat,a=r(96).fromString,s=r(220);e.exports={create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.algorithm,r=void 0===t?"AES-GCM":t,u=e.nonceLength,c=void 0===u?12:u,f=e.keyLength,l=void 0===f?16:f,h=e.digest,d=void 0===h?"SHA-256":h,p=e.saltLength,v=void 0===p?16:p,y=e.iterations,b=void 0===y?32767:y,g=s.get();function m(e,t){return w.apply(this,arguments)}function w(){return(w=i(n.mark((function e(t,i){var s,u,f,h,p,y,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=g.getRandomValues(new Uint8Array(v)),u=g.getRandomValues(new Uint8Array(c)),f={name:r,iv:u},h={name:"PBKDF2",salt:s,iterations:b,hash:{name:d}},e.next=6,g.subtle.importKey("raw",a(i),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]);case 6:return p=e.sent,e.next=9,g.subtle.deriveKey(h,p,{name:r,length:l},!0,["encrypt"]);case 9:return y=e.sent,e.next=12,g.subtle.encrypt(f,y,t);case 12:return m=e.sent,e.abrupt("return",o([s,f.iv,new Uint8Array(m)]));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t){return S.apply(this,arguments)}function S(){return(S=i(n.mark((function e(t,i){var o,s,u,f,h,p,y,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.slice(0,v),s=t.slice(v,v+c),u=t.slice(v+c),f={name:r,iv:s},h={name:"PBKDF2",salt:o,iterations:b,hash:{name:d}},e.next=7,g.subtle.importKey("raw",a(i),{name:"PBKDF2"},!1,["deriveKey","deriveBits"]);case 7:return p=e.sent,e.next=10,g.subtle.deriveKey(h,p,{name:r,length:l},!0,["decrypt"]);case 10:return y=e.sent,e.next=13,g.subtle.decrypt(f,y,u);case 13:return m=e.sent,e.abrupt("return",new Uint8Array(m));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return l*=8,{encrypt:m,decrypt:k}}}},function(e,t,r){"use strict";var n=r(8),i=r(9),o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Heartbeat=void 0;var u=s(r(135)),c=r(496),f=r(76),l=function(){function e(t){n(this,e),this.gossipsub=t}return i(e,[{key:"start",value:function(){var e=this;if(!this._heartbeatTimer){var t=this._heartbeat.bind(this),r=setTimeout((function(){t(),e._heartbeatTimer.runPeriodically(t,e.gossipsub._options.heartbeatInterval)}),u.GossipsubHeartbeatInitialDelay);this._heartbeatTimer={_intervalId:void 0,runPeriodically:function(t,r){e._heartbeatTimer._intervalId=setInterval(t,r)},cancel:function(){clearTimeout(r),clearInterval(e._heartbeatTimer._intervalId)}}}}},{key:"stop",value:function(){this._heartbeatTimer&&(this._heartbeatTimer.cancel(),this._heartbeatTimer=null)}},{key:"_heartbeat",value:function(){var e=this,t=this.gossipsub._options,r=t.D,n=t.Dlo,i=t.Dhi,o=t.Dscore,a=t.Dout,s=t.fanoutTTL;this.gossipsub.heartbeatTicks++;var l=new Map,h=function(t){var r=l.get(t);return void 0===r&&(r=e.gossipsub.score.score(t),l.set(t,r)),r},d=new Map,p=new Map,v=new Map;this.gossipsub._clearBackoff(),this.gossipsub.peerhave.clear(),this.gossipsub.iasked.clear(),this.gossipsub._applyIwantPenalties(),this.gossipsub._directConnect(),this.gossipsub.mesh.forEach((function(t,s){var l=function(r){e.gossipsub.log("HEARTBEAT: Remove mesh link to %s in %s",r,s),e.gossipsub.score.prune(r,s),e.gossipsub._addBackoff(r,s),t.delete(r);var n=p.get(r);n?n.push(s):p.set(r,[s])},y=function(r){e.gossipsub.log("HEARTBEAT: Add mesh link to %s in %s",r,s),e.gossipsub.score.graft(r,s),t.add(r);var n=d.get(r);n?n.push(s):d.set(r,[s])};if(t.forEach((function(t){var r=h(t);r<0&&(e.gossipsub.log("HEARTBEAT: Prune peer %s with negative score: score=%d, topic=%s",t,r,s),l(t),v.set(t,!0))})),t.size<n){var b=e.gossipsub.backoff.get(s),g=r-t.size;c.getGossipPeers(e.gossipsub,s,g,(function(r){return!t.has(r)&&!e.gossipsub.direct.has(r)&&(!b||!b.has(r))&&h(r)>=0})).forEach(y)}if(t.size>i){var m=Array.from(t);m.sort((function(e,t){return h(t)-h(e)})),m=m.slice(0,o).concat(f.shuffle(m.slice(o)));var w=0;if(m.slice(0,r).forEach((function(t){e.gossipsub.outbound.get(t)&&w++})),w<a){var k=function(e){for(var t=m[e],r=e;r>0;r--)m[r]=m[r-1];m[0]=t};if(w>0)for(var S=w,E=1;E<r&&S>0;E++)e.gossipsub.outbound.get(m[E])&&(k(E),S--);for(var _=r-w,A=r;A<m.length&&_>0;A++)e.gossipsub.outbound.get(m[A])&&(k(A),_--)}m.slice(r).forEach(l)}if(t.size>=n){var x=0;if(t.forEach((function(t){e.gossipsub.outbound.get(t)&&x++})),x<a){var T=a-x,M=e.gossipsub.backoff.get(s);c.getGossipPeers(e.gossipsub,s,T,(function(r){return!t.has(r)&&!e.gossipsub.direct.has(r)&&(!M||!M.has(r))&&h(r)>=0})).forEach(y)}}if(e.gossipsub.heartbeatTicks%u.GossipsubOpportunisticGraftTicks===0&&t.size>1){var C=Array.from(t).sort((function(e,t){return h(e)-h(t)})),O=Math.floor(t.size/2),I=h(C[O]);if(I<e.gossipsub._options.scoreThresholds.opportunisticGraftThreshold){var P=e.gossipsub.backoff.get(s);c.getGossipPeers(e.gossipsub,s,u.GossipsubOpportunisticGraftPeers,(function(r){return t.has(r)&&!e.gossipsub.direct.has(r)&&(!P||!P.has(r))&&h(r)>I})).forEach((function(t){e.gossipsub.log("HEARTBEAT: Opportunistically graft peer %s on topic %s",t,s),y(t)}))}}e.gossipsub._emitGossip(s,t)}));var y=this.gossipsub._now();this.gossipsub.lastpub.forEach((function(t,r){t+s<y&&(e.gossipsub.fanout.delete(r),e.gossipsub.lastpub.delete(r))})),this.gossipsub.fanout.forEach((function(t,n){var i=e.gossipsub.topics.get(n);if(t.forEach((function(r){(!i.has(r)||h(r)<e.gossipsub._options.scoreThresholds.publishThreshold)&&t.delete(r)})),t.size<r){var o=r-t.size;c.getGossipPeers(e.gossipsub,n,o,(function(r){return!t.has(r)&&!e.gossipsub.direct.has(r)&&h(r)>=e.gossipsub._options.scoreThresholds.publishThreshold})).forEach((function(e){t.add(e)}))}e.gossipsub._emitGossip(n,t)})),this.gossipsub._sendGraftPrune(d,p,v),this.gossipsub._flush(),this.gossipsub.messageCache.shift(),this.gossipsub.emit("gossipsub:heartbeat")}}]),e}();t.Heartbeat=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGossipPeers=void 0;var n=r(76);t.getGossipPeers=function(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0},o=e.topics.get(t);if(!o)return new Set;var a=[];return o.forEach((function(t){var r=e.peers.get(t);r&&n.hasGossipProtocol(r.protocol)&&i(t)&&a.push(t)})),a=n.shuffle(a),r>0&&a.length>r&&(a=a.slice(0,r)),new Set(a)}},function(e,t,r){"use strict";var n=r(40);Object.defineProperty(t,"__esModule",{value:!0}),t.validateTopicScoreParams=t.validatePeerScoreParams=t.createTopicScoreParams=t.createPeerScoreParams=t.defaultTopicScoreParams=t.defaultPeerScoreParams=void 0;var i=r(498),o=r(15);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(Object.assign({},t.defaultTopicScoreParams),e)}function s(e){if(e.topicWeight<0)throw o(new Error("invalid topic weight; must be >= 0"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0===e.timeInMeshQuantum)throw o(new Error("invalid TimeInMeshQuantum; must be non zero"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.timeInMeshWeight<0)throw o(new Error("invalid TimeInMeshWeight; must be positive (or 0 to disable)"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.timeInMeshWeight&&e.timeInMeshQuantum<=0)throw o(new Error("invalid TimeInMeshQuantum; must be positive"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.timeInMeshWeight&&e.timeInMeshCap<=0)throw o(new Error("invalid TimeInMeshCap; must be positive"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.firstMessageDeliveriesWeight<0)throw o(new Error("invallid FirstMessageDeliveriesWeight; must be positive (or 0 to disable)"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.firstMessageDeliveriesWeight&&(e.firstMessageDeliveriesDecay<=0||e.firstMessageDeliveriesDecay>=1))throw o(new Error("invalid FirstMessageDeliveriesDecay; must be between 0 and 1"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.firstMessageDeliveriesWeight&&e.firstMessageDeliveriesCap<=0)throw o(new Error("invalid FirstMessageDeliveriesCap; must be positive"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.meshMessageDeliveriesWeight>0)throw o(new Error("invalid MeshMessageDeliveriesWeight; must be negative (or 0 to disable)"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.meshMessageDeliveriesWeight&&(e.meshMessageDeliveriesDecay<=0||e.meshMessageDeliveriesDecay>=1))throw o(new Error("invalid MeshMessageDeliveriesDecay; must be between 0 and 1"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.meshMessageDeliveriesWeight&&e.meshMessageDeliveriesCap<=0)throw o(new Error("invalid MeshMessageDeliveriesCap; must be positive"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.meshMessageDeliveriesWeight&&e.meshMessageDeliveriesThreshold<=0)throw o(new Error("invalid MeshMessageDeliveriesThreshold; must be positive"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.meshMessageDeliveriesWindow<0)throw o(new Error("invalid MeshMessageDeliveriesWindow; must be non-negative"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.meshMessageDeliveriesWeight&&e.meshMessageDeliveriesActivation<1e3)throw o(new Error("invalid MeshMessageDeliveriesActivation; must be at least 1s"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.meshFailurePenaltyWeight>0)throw o(new Error("invalid MeshFailurePenaltyWeight; must be negative (or 0 to disable)"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.meshFailurePenaltyWeight&&(e.meshFailurePenaltyDecay<=0||e.meshFailurePenaltyDecay>=1))throw o(new Error("invalid MeshFailurePenaltyDecay; must be between 0 and 1"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.invalidMessageDeliveriesWeight>0)throw o(new Error("invalid InvalidMessageDeliveriesWeight; must be negative (or 0 to disable)"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.invalidMessageDeliveriesDecay<=0||e.invalidMessageDeliveriesDecay>=1)throw o(new Error("invalid InvalidMessageDeliveriesDecay; must be between 0 and 1"),i.ERR_INVALID_PEER_SCORE_PARAMS)}t.defaultPeerScoreParams={topics:{},topicScoreCap:10,appSpecificScore:function(){return 0},appSpecificWeight:10,IPColocationFactorWeight:-5,IPColocationFactorThreshold:10,IPColocationFactorWhitelist:new Set,behaviourPenaltyWeight:-10,behaviourPenaltyDecay:.2,decayInterval:1e3,decayToZero:.1,retainScore:36e5},t.defaultTopicScoreParams={topicWeight:.5,timeInMeshWeight:1,timeInMeshQuantum:1,timeInMeshCap:3600,firstMessageDeliveriesWeight:1,firstMessageDeliveriesDecay:.5,firstMessageDeliveriesCap:2e3,meshMessageDeliveriesWeight:-1,meshMessageDeliveriesDecay:.5,meshMessageDeliveriesCap:100,meshMessageDeliveriesThreshold:20,meshMessageDeliveriesWindow:10,meshMessageDeliveriesActivation:5e3,meshFailurePenaltyWeight:-1,meshFailurePenaltyDecay:.5,invalidMessageDeliveriesWeight:-1,invalidMessageDeliveriesDecay:.3},t.createPeerScoreParams=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(Object.assign(Object.assign({},t.defaultPeerScoreParams),e),{topics:e.topics?Object.entries(e.topics).reduce((function(e,t){var r=n(t,2),i=r[0],o=r[1];return e[i]=a(o),e}),{}):{}})},t.createTopicScoreParams=a,t.validatePeerScoreParams=function(e){for(var t=0,r=Object.entries(e.topics);t<r.length;t++){var a=n(r[t],2),u=a[0],c=a[1];try{s(c)}catch(f){throw o(new Error("invalid score parameters for topic ".concat(u,": ").concat(f.message)),i.ERR_INVALID_PEER_SCORE_PARAMS)}}if(e.topicScoreCap<0)throw o(new Error("invalid topic score cap; must be positive (or 0 for no cap)"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(null===e.appSpecificScore||void 0===e.appSpecificScore)throw o(new Error("missing application specific score function"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.IPColocationFactorWeight>0)throw o(new Error("invalid IPColocationFactorWeight; must be negative (or 0 to disable)"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.IPColocationFactorWeight&&e.IPColocationFactorThreshold<1)throw o(new Error("invalid IPColocationFactorThreshold; must be at least 1"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.behaviourPenaltyWeight>0)throw o(new Error("invalid BehaviourPenaltyWeight; must be negative (or 0 to disable)"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(0!==e.behaviourPenaltyWeight&&(e.behaviourPenaltyDecay<=0||e.behaviourPenaltyDecay>=1))throw o(new Error("invalid BehaviourPenaltyDecay; must be between 0 and 1"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.decayInterval<1e3)throw o(new Error("invalid DecayInterval; must be at least 1s"),i.ERR_INVALID_PEER_SCORE_PARAMS);if(e.decayToZero<=0||e.decayToZero>=1)throw o(new Error("invalid DecayToZero; must be between 0 and 1"),i.ERR_INVALID_PEER_SCORE_PARAMS)},t.validateTopicScoreParams=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERR_INVALID_PEER_SCORE_THRESHOLDS=t.ERR_INVALID_PEER_SCORE_PARAMS=void 0,t.ERR_INVALID_PEER_SCORE_PARAMS="ERR_INVALID_PEER_SCORE_PARAMS",t.ERR_INVALID_PEER_SCORE_THRESHOLDS="ERR_INVALID_PEER_SCORE_THRESHOLDS"},,,,function(e,t,r){"use strict";var n;r.r(t),r.d(t,"v1",(function(){return v})),r.d(t,"v3",(function(){return A})),r.d(t,"v4",(function(){return x})),r.d(t,"v5",(function(){return C})),r.d(t,"NIL",(function(){return O})),r.d(t,"version",(function(){return I})),r.d(t,"validate",(function(){return s})),r.d(t,"stringify",(function(){return h})),r.d(t,"parse",(function(){return y}));var i=new Uint8Array(16);function o(){if(!n&&!(n="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(e){return"string"===typeof e&&a.test(e)},u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));var f,l,h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!s(r))throw TypeError("Stringified UUID is invalid");return r},d=0,p=0;var v=function(e,t,r){var n=t&&r||0,i=t||new Array(16),a=(e=e||{}).node||f,s=void 0!==e.clockseq?e.clockseq:l;if(null==a||null==s){var u=e.random||(e.rng||o)();null==a&&(a=f=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==s&&(s=l=16383&(u[6]<<8|u[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:p+1,y=c-d+(v-p)/1e4;if(y<0&&void 0===e.clockseq&&(s=s+1&16383),(y<0||c>d)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=c,p=v,l=s;var b=(1e4*(268435455&(c+=122192928e5))+v)%4294967296;i[n++]=b>>>24&255,i[n++]=b>>>16&255,i[n++]=b>>>8&255,i[n++]=255&b;var g=c/4294967296*1e4&268435455;i[n++]=g>>>8&255,i[n++]=255&g,i[n++]=g>>>24&15|16,i[n++]=g>>>16&255,i[n++]=s>>>8|128,i[n++]=255&s;for(var m=0;m<6;++m)i[n+m]=a[m];return t||h(i)};var y=function(e){if(!s(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};var b=function(e,t,r){function n(e,n,i,o){if("string"===typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"===typeof n&&(n=y(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(n),a.set(e,n.length),(a=r(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(var s=0;s<16;++s)i[o+s]=a[s];return i}return h(a)}try{n.name=e}catch(i){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n};function g(e){return 14+(e+64>>>9<<4)+1}function m(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function w(e,t,r,n,i,o){return m((a=m(m(t,e),m(n,o)))<<(s=i)|a>>>32-s,r);var a,s}function k(e,t,r,n,i,o,a){return w(t&r|~t&n,e,t,i,o,a)}function S(e,t,r,n,i,o,a){return w(t&n|r&~n,e,t,i,o,a)}function E(e,t,r,n,i,o,a){return w(t^r^n,e,t,i,o,a)}function _(e,t,r,n,i,o,a){return w(r^(t|~n),e,t,i,o,a)}var A=b("v3",48,(function(e){if("string"===typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){for(var t=[],r=32*e.length,n="0123456789abcdef",i=0;i<r;i+=8){var o=e[i>>5]>>>i%32&255,a=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[g(t)-1]=t;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,a=0;a<e.length;a+=16){var s=r,u=n,c=i,f=o;r=k(r,n,i,o,e[a],7,-680876936),o=k(o,r,n,i,e[a+1],12,-389564586),i=k(i,o,r,n,e[a+2],17,606105819),n=k(n,i,o,r,e[a+3],22,-1044525330),r=k(r,n,i,o,e[a+4],7,-176418897),o=k(o,r,n,i,e[a+5],12,1200080426),i=k(i,o,r,n,e[a+6],17,-1473231341),n=k(n,i,o,r,e[a+7],22,-45705983),r=k(r,n,i,o,e[a+8],7,1770035416),o=k(o,r,n,i,e[a+9],12,-1958414417),i=k(i,o,r,n,e[a+10],17,-42063),n=k(n,i,o,r,e[a+11],22,-1990404162),r=k(r,n,i,o,e[a+12],7,1804603682),o=k(o,r,n,i,e[a+13],12,-40341101),i=k(i,o,r,n,e[a+14],17,-1502002290),r=S(r,n=k(n,i,o,r,e[a+15],22,1236535329),i,o,e[a+1],5,-165796510),o=S(o,r,n,i,e[a+6],9,-1069501632),i=S(i,o,r,n,e[a+11],14,643717713),n=S(n,i,o,r,e[a],20,-373897302),r=S(r,n,i,o,e[a+5],5,-701558691),o=S(o,r,n,i,e[a+10],9,38016083),i=S(i,o,r,n,e[a+15],14,-660478335),n=S(n,i,o,r,e[a+4],20,-405537848),r=S(r,n,i,o,e[a+9],5,568446438),o=S(o,r,n,i,e[a+14],9,-1019803690),i=S(i,o,r,n,e[a+3],14,-187363961),n=S(n,i,o,r,e[a+8],20,1163531501),r=S(r,n,i,o,e[a+13],5,-1444681467),o=S(o,r,n,i,e[a+2],9,-51403784),i=S(i,o,r,n,e[a+7],14,1735328473),r=E(r,n=S(n,i,o,r,e[a+12],20,-1926607734),i,o,e[a+5],4,-378558),o=E(o,r,n,i,e[a+8],11,-2022574463),i=E(i,o,r,n,e[a+11],16,1839030562),n=E(n,i,o,r,e[a+14],23,-35309556),r=E(r,n,i,o,e[a+1],4,-1530992060),o=E(o,r,n,i,e[a+4],11,1272893353),i=E(i,o,r,n,e[a+7],16,-155497632),n=E(n,i,o,r,e[a+10],23,-1094730640),r=E(r,n,i,o,e[a+13],4,681279174),o=E(o,r,n,i,e[a],11,-358537222),i=E(i,o,r,n,e[a+3],16,-722521979),n=E(n,i,o,r,e[a+6],23,76029189),r=E(r,n,i,o,e[a+9],4,-640364487),o=E(o,r,n,i,e[a+12],11,-421815835),i=E(i,o,r,n,e[a+15],16,530742520),r=_(r,n=E(n,i,o,r,e[a+2],23,-995338651),i,o,e[a],6,-198630844),o=_(o,r,n,i,e[a+7],10,1126891415),i=_(i,o,r,n,e[a+14],15,-1416354905),n=_(n,i,o,r,e[a+5],21,-57434055),r=_(r,n,i,o,e[a+12],6,1700485571),o=_(o,r,n,i,e[a+3],10,-1894986606),i=_(i,o,r,n,e[a+10],15,-1051523),n=_(n,i,o,r,e[a+1],21,-2054922799),r=_(r,n,i,o,e[a+8],6,1873313359),o=_(o,r,n,i,e[a+15],10,-30611744),i=_(i,o,r,n,e[a+6],15,-1560198380),n=_(n,i,o,r,e[a+13],21,1309151649),r=_(r,n,i,o,e[a+4],6,-145523070),o=_(o,r,n,i,e[a+11],10,-1120210379),i=_(i,o,r,n,e[a+2],15,718787259),n=_(n,i,o,r,e[a+9],21,-343485551),r=m(r,s),n=m(n,u),i=m(i,c),o=m(o,f)}return[r,n,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(g(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length))}));var x=function(e,t,r){var n=(e=e||{}).random||(e.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return h(n)};function T(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function M(e,t){return e<<t|e>>>32-t}var C=b("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"===typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i<n.length;++i)e.push(n.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,a=Math.ceil(o/16),s=new Array(a),u=0;u<a;++u){for(var c=new Uint32Array(16),f=0;f<16;++f)c[f]=e[64*u+4*f]<<24|e[64*u+4*f+1]<<16|e[64*u+4*f+2]<<8|e[64*u+4*f+3];s[u]=c}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var l=0;l<a;++l){for(var h=new Uint32Array(80),d=0;d<16;++d)h[d]=s[l][d];for(var p=16;p<80;++p)h[p]=M(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var v=r[0],y=r[1],b=r[2],g=r[3],m=r[4],w=0;w<80;++w){var k=Math.floor(w/20),S=M(v,5)+T(k,y,b,g)+m+t[k]+h[w]>>>0;m=g,g=b,b=M(y,30)>>>0,y=v,v=S}r[0]=r[0]+v>>>0,r[1]=r[1]+y>>>0,r[2]=r[2]+b>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+m>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]})),O="00000000-0000-0000-0000-000000000000";var I=function(e){if(!s(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},function(e,t,r){"use strict";r.r(t),r.d(t,"nanoid",(function(){return s})),r.d(t,"customAlphabet",(function(){return a})),r.d(t,"customRandom",(function(){return o})),r.d(t,"urlAlphabet",(function(){return n})),r.d(t,"random",(function(){return i}));var n="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";var i=function(e){return crypto.getRandomValues(new Uint8Array(e))},o=function(e,t,r){var n=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*n*t/e.length);return function(){for(var o="";;)for(var a=r(i),s=i;s--;)if((o+=e[a[s]&n]||"").length===t)return o}},a=function(e,t){return o(e,t,i)},s=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21,t="",r=crypto.getRandomValues(new Uint8Array(e));e--;){var n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t}},,,function(e,t,r){"use strict";function n(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n=r(1065),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(p){var i=d(r);i&&i!==p&&e(t,i,n)}var a=f(r);l&&(a=a.concat(l(r)));for(var s=u(t),v=u(r),y=0;y<a.length;++y){var b=a[y];if(!o[b]&&(!n||!n[b])&&(!v||!v[b])&&(!s||!s[b])){var g=h(r,b);try{c(t,b,g)}catch(m){}}}}return t}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,"a",(function(){return n}))},,,function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return z}));var n=r(14),i=r.n(n),o=r(52),a=r.n(o);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e||"undefined"!==typeof self&&self;function s(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&r.path)}},r.exports),r.exports}var u=c;function c(e,t){if(!e)throw new Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var f=s((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!==typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),l=s((function(e,t){var r=t;r.assert=u,r.toArray=f.toArray,r.zero2=f.zero2,r.toHex=f.toHex,r.encode=f.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<n.length;a++){var s,u=o.andln(i-1);o.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0===(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0===(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i.a(e,"hex","le")}})),h=l.getNAF,d=l.getJSF,p=l.assert;function v(e,t){this.type=e,this.p=new i.a(t.p,16),this.red=t.prime?i.a.red(t.prime):i.a.mont(this.p),this.zero=new i.a(0).toRed(this.red),this.one=new i.a(1).toRed(this.red),this.two=new i.a(2).toRed(this.red),this.n=t.n&&new i.a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var y=v;function b(e,t){this.curve=e,this.type=t,this.precomputed=null}v.prototype.point=function(){throw new Error("Not implemented")},v.prototype.validate=function(){throw new Error("Not implemented")},v.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=h(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2===0?2:1);i/=3;var o,a,s=[];for(o=0;o<n.length;o+=r.step){a=0;for(var u=o+r.step-1;u>=o;u--)a=(a<<1)+n[u];s.push(a)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o<s.length;o++)(a=s[o])===l?f=f.mixedAdd(r.points[o]):a===-l&&(f=f.mixedAdd(r.points[o].neg()));c=c.add(f)}return c.toP()},v.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=h(t,r,this._bitLength),a=this.jpoint(null,null,null),s=o.length-1;s>=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];p(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},v.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o<n;o++){var p=(s=t[o])._getNAFPoints(e);u[o]=p.wnd,c[o]=p.points}for(o=n-1;o>=1;o-=2){var v=o-1,y=o;if(1===u[v]&&1===u[y]){var b=[t[v],null,null,t[y]];0===t[v].y.cmp(t[y].y)?(b[1]=t[v].add(t[y]),b[2]=t[v].toJ().mixedAdd(t[y].neg())):0===t[v].y.cmp(t[y].y.redNeg())?(b[1]=t[v].toJ().mixedAdd(t[y]),b[2]=t[v].add(t[y].neg())):(b[1]=t[v].toJ().mixedAdd(t[y]),b[2]=t[v].toJ().mixedAdd(t[y].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],m=d(r[v],r[y]);for(l=Math.max(m[0].length,l),f[v]=new Array(l),f[y]=new Array(l),a=0;a<l;a++){var w=0|m[0][a],k=0|m[1][a];f[v][a]=g[3*(w+1)+(k+1)],f[y][a]=0,c[v]=b}}else f[v]=h(r[v],u[v],this._bitLength),f[y]=h(r[y],u[y],this._bitLength),l=Math.max(f[v].length,l),l=Math.max(f[y].length,l)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(o=l;o>=0;o--){for(var _=0;o>=0;){var A=!0;for(a=0;a<n;a++)E[a]=0|f[a][o],0!==E[a]&&(A=!1);if(!A)break;_++,o--}if(o>=0&&_++,S=S.dblp(_),o<0)break;for(a=0;a<n;a++){var x=E[a];0!==x&&(x>0?s=c[a][x-1>>1]:x<0&&(s=c[a][-x-1>>1].neg()),S="affine"===s.type?S.mixedAdd(s):S.add(s))}}for(o=0;o<n;o++)c[o]=null;return i?S:S.toP()},v.BasePoint=b,b.prototype.eq=function(){throw new Error("Not implemented")},b.prototype.validate=function(){return this.curve.validate(this)},v.prototype.decodePoint=function(e,t){e=l.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1===2*r)return 6===e[0]?p(e[e.length-1]%2===0):7===e[0]&&p(e[e.length-1]%2===1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},b.prototype.encodeCompressed=function(e){return this.encode(e,!0)},b.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},b.prototype.encode=function(e,t){return l.encode(this._encode(t),e)},b.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},b.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},b.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},b.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},b.prototype._getBeta=function(){return null},b.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var g=s((function(e){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),m=l.assert;function w(e){y.call(this,"short",e),this.a=new i.a(e.a,16).toRed(this.red),this.b=new i.a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}g(w,y);var k=w;function S(e,t,r,n){y.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i.a(t,16),this.y=new i.a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function E(e,t,r,n){y.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i.a(0)):(this.x=new i.a(t,16),this.y=new i.a(r,16),this.z=new i.a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}w.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i.a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i.a(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],m(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i.a(e.a,16),b:new i.a(e.b,16)}})):this._getEndoBasis(r)}}},w.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.a.mont(e),r=new i.a(2).toRed(t).redInvm(),n=r.redNeg(),o=new i.a(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},w.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new i.a(1),v=new i.a(0),y=new i.a(0),b=new i.a(1),g=0;0!==h.cmpn(0);){var m=d.div(h);c=d.sub(m.mul(h)),f=y.sub(m.mul(p));var w=b.sub(m.mul(v));if(!n&&c.cmp(l)<0)t=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2===++g)break;u=c,d=h,h=c,y=p,p=f,b=v,v=w}a=c.neg(),s=f;var k=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(k)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new i.a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return c},g(S,y.BasePoint),w.prototype.point=function(e,t,r){return new S(this,e,t,r)},w.prototype.pointFromJSON=function(e,t){return S.fromJSON(this,e,t)},S.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},S.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},S.fromJSON=function(e,t,r){"string"===typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},S.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},S.prototype.isInfinity=function(){return this.inf},S.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},S.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},S.prototype.getX=function(){return this.x.fromRed()},S.prototype.getY=function(){return this.y.fromRed()},S.prototype.mul=function(e){return e=new i.a(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},S.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},S.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},S.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},S.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},S.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},g(E,y.BasePoint),w.prototype.jpoint=function(e,t,r){return new E(this,e,t,r)},E.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},E.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},E.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var f=o.redSqr(),l=c.redSqr(),h=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),p=o.redMul(l),v=d.redSqr().redISub(p.redAdd(p)),y=p.redISub(v),b=d.redMul(y);b=b.redIAdd(b).redISub(h);var g=c.redMul(s);t+1<e&&(u=u.redMul(h)),o=v,s=g,c=b}return this.curve.jpoint(o,c.redMul(i),s)},E.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},E.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(h);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),v=p.redSqr(),y=h.redIAdd(h);y=(y=y.redIAdd(y)).redIAdd(y),e=v.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},E.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),v=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(v),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var y=l.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=d.redMul(p.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,r)},E.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),l=c.redISub(f),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=s.redMul(l).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,d,p)},E.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),f=t.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(l,h,d)},E.prototype.mul=function(e,t){return e=new i.a(e,t),this.curve._wnafMul(this,e)},E.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},E.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},E.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var _=s((function(e,t){var r=t;r.base=y,r.short=k,r.mont=null,r.edwards=null})),A=s((function(e,t){var r,n=t,i=l.assert;function o(e){"short"===e.type?this.curve=new _.short(e):"edwards"===e.type?this.curve=new _.edwards(e):this.curve=new _.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(u){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function x(e){if(!(this instanceof x))return new x(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=f.toArray(e.entropy,e.entropyEnc||"hex"),r=f.toArray(e.nonce,e.nonceEnc||"hex"),n=f.toArray(e.pers,e.persEnc||"hex");u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var T=x;x.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},x.prototype._hmac=function(){return new a.a.hmac(this.hash,this.K)},x.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},x.prototype.reseed=function(e,t,r,n){"string"!==typeof t&&(n=r,r=t,t=null),e=f.toArray(e,t),r=f.toArray(r,n),u(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},x.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=f.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(r),this._reseed++,f.encode(o,t)};var M=l.assert;function C(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var O=C;C.fromPublic=function(e,t,r){return t instanceof C?t:new C(e,{pub:t,pubEnc:r})},C.fromPrivate=function(e,t,r){return t instanceof C?t:new C(e,{priv:t,privEnc:r})},C.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},C.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},C.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},C.prototype._importPrivate=function(e,t){this.priv=new i.a(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},C.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?M(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||M(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},C.prototype.derive=function(e){return e.validate()||M(e.validate(),"public point not validated"),e.mul(this.priv).getX()},C.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},C.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},C.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var I=l.assert;function P(e,t){if(e instanceof P)return e;this._importDER(e,t)||(I(e.r&&e.s,"Signature without r or s"),this.r=new i.a(e.r,16),this.s=new i.a(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var R=P;function B(){this.place=0}function D(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function N(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function L(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}P.prototype._importDER=function(e,t){e=l.toArray(e,t);var r=new B;if(48!==e[r.place++])return!1;var n=D(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=D(e,r);if(!1===o)return!1;var a=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var s=D(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var u=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new i.a(a),this.s=new i.a(u),this.recoveryParam=null,!0},P.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=N(t),r=N(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];L(n,t.length),(n=n.concat(t)).push(2),L(n,r.length);var i=n.concat(r),o=[48];return L(o,i.length),o=o.concat(i),l.encode(o,e)};var j=function(){throw new Error("unsupported")},U=l.assert;function F(e){if(!(this instanceof F))return new F(e);"string"===typeof e&&(U(Object.prototype.hasOwnProperty.call(A,e),"Unknown curve "+e),e=A[e]),e instanceof A.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var K=F;F.prototype.keyPair=function(e){return new O(this,e)},F.prototype.keyFromPrivate=function(e,t){return O.fromPrivate(this,e,t)},F.prototype.keyFromPublic=function(e,t){return O.fromPublic(this,e,t)},F.prototype.genKeyPair=function(e){e||(e={});for(var t=new T({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||j(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i.a(2));;){var o=new i.a(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},F.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},F.prototype.sign=function(e,t,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i.a(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),s=e.toArray("be",o),u=new T({hash:this.hash,entropy:a,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new i.a(1)),f=0;;f++){var l=n.k?n.k(f):new i.a(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var d=h.getX(),p=d.umod(this.n);if(0!==p.cmpn(0)){var v=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var y=(h.getY().isOdd()?1:0)|(0!==d.cmp(p)?2:0);return n.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new R({r:p,s:v,recoveryParam:y})}}}}}},F.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i.a(e,16)),r=this.keyFromPublic(r,n);var o=(t=new R(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},F.prototype.recoverPubKey=function(e,t,r,n){U((3&r)===r,"The recovery param is more than two bits"),t=new R(t,n);var o=this.n,a=new i.a(e),s=t.r,u=t.s,c=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var l=t.r.invm(o),h=o.sub(a).mul(l).umod(o),d=u.mul(l).umod(o);return this.g.mulAdd(h,s,d)},F.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new R(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var z=s((function(e,t){var r=t;r.version="6.5.4",r.utils=l,r.rand=function(){throw new Error("unsupported")},r.curve=_,r.curves=A,r.ec=K,r.eddsa=null})).ec}).call(this,r(36))},function(e,t,r){(function(t,r){!function(){"use strict";var n="object"===typeof window?window:{};!n.JS_SHA3_NO_NODE_JS&&"object"===typeof t&&t.versions&&t.versions.node&&(n=r);for(var i=!n.JS_SHA3_NO_COMMON_JS&&"object"===typeof e&&e.exports,o="0123456789abcdef".split(""),a=[0,8,16,24],s=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],c=["hex","buffer","arrayBuffer","array"],f=function(e,t,r){return function(n){return new k(e,t,e).update(n)[r]()}},l=function(e,t,r){return function(n,i){return new k(e,t,i).update(n)[r]()}},h=function(e,t){var r=f(e,t,"hex");r.create=function(){return new k(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n<c.length;++n){var i=c[n];r[i]=f(e,t,i)}return r},d=[{name:"keccak",padding:[1,256,65536,16777216],bits:u,createMethod:h},{name:"sha3",padding:[6,1536,393216,100663296],bits:u,createMethod:h},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(e,t){var r=l(e,t,"hex");r.create=function(r){return new k(e,t,r)},r.update=function(e,t){return r.create(t).update(e)};for(var n=0;n<c.length;++n){var i=c[n];r[i]=l(e,t,i)}return r}}],p={},v=[],y=0;y<d.length;++y)for(var b=d[y],g=b.bits,m=0;m<g.length;++m){var w=b.name+"_"+g[m];v.push(w),p[w]=b.createMethod(g[m],b.padding)}function k(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}k.prototype.update=function(e){var t="string"!==typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,s=this.byteCount,u=this.blockCount,c=0,f=this.s;c<i;){if(this.reset)for(this.reset=!1,o[0]=this.block,r=1;r<u+1;++r)o[r]=0;if(t)for(r=this.start;c<i&&r<s;++c)o[r>>2]|=e[c]<<a[3&r++];else for(r=this.start;c<i&&r<s;++c)(n=e.charCodeAt(c))<128?o[r>>2]|=n<<a[3&r++]:n<2048?(o[r>>2]|=(192|n>>6)<<a[3&r++],o[r>>2]|=(128|63&n)<<a[3&r++]):n<55296||n>=57344?(o[r>>2]|=(224|n>>12)<<a[3&r++],o[r>>2]|=(128|n>>6&63)<<a[3&r++],o[r>>2]|=(128|63&n)<<a[3&r++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++c)),o[r>>2]|=(240|n>>18)<<a[3&r++],o[r>>2]|=(128|n>>12&63)<<a[3&r++],o[r>>2]|=(128|n>>6&63)<<a[3&r++],o[r>>2]|=(128|63&n)<<a[3&r++]);if(this.lastByteIndex=r,r>=s){for(this.start=r-s,this.block=o[u],r=0;r<u;++r)f[r]^=o[r];S(f),this.reset=!0}else this.start=r}return this},k.prototype.finalize=function(){var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];S(n)},k.prototype.toString=k.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,s=0,u="";s<n;){for(a=0;a<t&&s<n;++a,++s)e=r[a],u+=o[e>>4&15]+o[15&e]+o[e>>12&15]+o[e>>8&15]+o[e>>20&15]+o[e>>16&15]+o[e>>28&15]+o[e>>24&15];s%t===0&&(S(r),a=0)}return i&&(e=r[a],i>0&&(u+=o[e>>4&15]+o[15&e]),i>1&&(u+=o[e>>12&15]+o[e>>8&15]),i>2&&(u+=o[e>>20&15]+o[e>>16&15])),u},k.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a<n;){for(o=0;o<t&&a<n;++o,++a)u[a]=r[o];a%t===0&&S(r)}return i&&(u[o]=r[o],e=e.slice(0,s)),e},k.prototype.buffer=k.prototype.arrayBuffer,k.prototype.digest=k.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,u=[];s<i;){for(a=0;a<r&&s<i;++a,++s)e=s<<2,t=n[a],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r===0&&S(n)}return o&&(e=s<<2,t=n[a],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u};var S=function(e){var t,r,n,i,o,a,u,c,f,l,h,d,p,v,y,b,g,m,w,k,S,E,_,A,x,T,M,C,O,I,P,R,B,D,N,L,j,U,F,K,z,V,H,J,q,G,X,W,Z,Y,Q,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|f>>>31),r=o^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=f^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=h^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,v=e[0],y=e[1],G=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,C=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,b=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,I=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,m=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,J=e[8]<<27|e[9]>>>5,q=e[9]<<27|e[8]>>>5,T=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,K=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=v^~b&m,e[1]=y^~g&w,e[10]=A^~T&C,e[11]=x^~M&O,e[20]=D^~L&U,e[21]=N^~j&F,e[30]=J^~G&W,e[31]=q^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=b^~m&k,e[3]=g^~w&S,e[12]=T^~C&I,e[13]=M^~O&P,e[22]=L^~U&K,e[23]=j^~F&z,e[32]=G^~W&Y,e[33]=X^~Z&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=m^~k&E,e[5]=w^~S&_,e[14]=C^~I&R,e[15]=O^~P&B,e[24]=U^~K&V,e[25]=F^~z&H,e[34]=W^~Y&$,e[35]=Z^~Q&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=k^~E&v,e[7]=S^~_&y,e[16]=I^~R&A,e[17]=P^~B&x,e[26]=K^~V&D,e[27]=z^~H&N,e[36]=Y^~$&J,e[37]=Q^~ee&q,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=E^~v&b,e[9]=_^~y&g,e[18]=R^~A&T,e[19]=B^~x&M,e[28]=V^~D&L,e[29]=H^~N&j,e[38]=$^~J&G,e[39]=ee^~q&X,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=s[n],e[1]^=s[n+1]};if(i)e.exports=p;else for(y=0;y<v.length;++y)n[v[y]]=p[v[y]]}()}).call(this,r(39),r(36))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n="random/5.3.0"},function(e,t,r){"use strict";var n=r(1068),i=r(1069);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(r(1)),a=(0,n(r(1071)).default)(o.createElement("path",{d:"M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"}),"Wifi");t.default=a},function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n={};r.r(n),r.d(n,"encode",(function(){return oe})),r.d(n,"decode",(function(){return ue}));var i={};r.r(i),r.d(i,"AddressZero",(function(){return Yi})),r.d(i,"NegativeOne",(function(){return qe})),r.d(i,"Zero",(function(){return Ge})),r.d(i,"One",(function(){return Xe})),r.d(i,"Two",(function(){return We})),r.d(i,"WeiPerEther",(function(){return Ze})),r.d(i,"MaxUint256",(function(){return Ye})),r.d(i,"MinInt256",(function(){return Qe})),r.d(i,"MaxInt256",(function(){return $e})),r.d(i,"HashZero",(function(){return Qi})),r.d(i,"EtherSymbol",(function(){return $i}));var o={};r.r(o),r.d(o,"Provider",(function(){return Ft})),r.d(o,"BaseProvider",(function(){return aa})),r.d(o,"Resolver",(function(){return na})),r.d(o,"UrlJsonRpcProvider",(function(){return Ma})),r.d(o,"FallbackProvider",(function(){return as})),r.d(o,"AlchemyProvider",(function(){return Pa})),r.d(o,"AlchemyWebSocketProvider",(function(){return Ia})),r.d(o,"CloudflareProvider",(function(){return Da})),r.d(o,"EtherscanProvider",(function(){return Ha})),r.d(o,"InfuraProvider",(function(){return ls})),r.d(o,"InfuraWebSocketProvider",(function(){return fs})),r.d(o,"JsonRpcProvider",(function(){return ga})),r.d(o,"JsonRpcBatchProvider",(function(){return hs})),r.d(o,"NodesmithProvider",(function(){return ps})),r.d(o,"PocketProvider",(function(){return bs})),r.d(o,"StaticJsonRpcProvider",(function(){return Ta})),r.d(o,"Web3Provider",(function(){return ks})),r.d(o,"WebSocketProvider",(function(){return _a})),r.d(o,"IpcProvider",(function(){return ss})),r.d(o,"JsonRpcSigner",(function(){return va})),r.d(o,"getDefaultProvider",(function(){return Es})),r.d(o,"getNetwork",(function(){return so})),r.d(o,"isCommunityResource",(function(){return zo})),r.d(o,"isCommunityResourcable",(function(){return Ko})),r.d(o,"showThrottleMessage",(function(){return Ho})),r.d(o,"Formatter",(function(){return Fo}));var a={};r.r(a),r.d(a,"decode",(function(){return Ao})),r.d(a,"encode",(function(){return xo}));var s={};r.r(s),r.d(s,"AbiCoder",(function(){return Ct})),r.d(s,"defaultAbiCoder",(function(){return Ot})),r.d(s,"Fragment",(function(){return dt})),r.d(s,"ErrorFragment",(function(){return kt})),r.d(s,"EventFragment",(function(){return pt})),r.d(s,"FunctionFragment",(function(){return mt})),r.d(s,"ParamType",(function(){return lt})),r.d(s,"FormatTypes",(function(){return ct})),r.d(s,"checkResultErrors",(function(){return X})),r.d(s,"Logger",(function(){return S.b})),r.d(s,"RLP",(function(){return n})),r.d(s,"_fetchData",(function(){return Ro})),r.d(s,"fetchJson",(function(){return Bo})),r.d(s,"poll",(function(){return Do})),r.d(s,"checkProperties",(function(){return U})),r.d(s,"deepCopy",(function(){return H})),r.d(s,"defineReadOnly",(function(){return N})),r.d(s,"getStatic",(function(){return L})),r.d(s,"resolveProperties",(function(){return j})),r.d(s,"shallowCopy",(function(){return F})),r.d(s,"arrayify",(function(){return m.a})),r.d(s,"concat",(function(){return m.b})),r.d(s,"stripZeros",(function(){return m.o})),r.d(s,"zeroPad",(function(){return m.p})),r.d(s,"isBytes",(function(){return m.j})),r.d(s,"isBytesLike",(function(){return m.k})),r.d(s,"defaultPath",(function(){return hi})),r.d(s,"HDNode",(function(){return di})),r.d(s,"SigningKey",(function(){return Yt})),r.d(s,"Interface",(function(){return Lt})),r.d(s,"LogDescription",(function(){return Pt})),r.d(s,"TransactionDescription",(function(){return Rt})),r.d(s,"base58",(function(){return cn})),r.d(s,"base64",(function(){return a})),r.d(s,"hexlify",(function(){return m.i})),r.d(s,"isHexString",(function(){return m.l})),r.d(s,"hexConcat",(function(){return m.c})),r.d(s,"hexStripZeros",(function(){return m.f})),r.d(s,"hexValue",(function(){return m.g})),r.d(s,"hexZeroPad",(function(){return m.h})),r.d(s,"hexDataLength",(function(){return m.d})),r.d(s,"hexDataSlice",(function(){return m.e})),r.d(s,"nameprep",(function(){return mo})),r.d(s,"_toEscapedUtf8String",(function(){return Oe})),r.d(s,"toUtf8Bytes",(function(){return Me})),r.d(s,"toUtf8CodePoints",(function(){return Re})),r.d(s,"toUtf8String",(function(){return Pe})),r.d(s,"Utf8ErrorFuncs",(function(){return xe})),r.d(s,"formatBytes32String",(function(){return Is})),r.d(s,"parseBytes32String",(function(){return Ps})),r.d(s,"hashMessage",(function(){return zr})),r.d(s,"namehash",(function(){return _o})),r.d(s,"isValidName",(function(){return Eo})),r.d(s,"id",(function(){return Be})),r.d(s,"_TypedDataEncoder",(function(){return sn})),r.d(s,"getAddress",(function(){return be})),r.d(s,"getIcapAddress",(function(){return me})),r.d(s,"getContractAddress",(function(){return we})),r.d(s,"getCreate2Address",(function(){return ke})),r.d(s,"isAddress",(function(){return ge})),r.d(s,"formatEther",(function(){return js})),r.d(s,"parseEther",(function(){return Us})),r.d(s,"formatUnits",(function(){return Ns})),r.d(s,"parseUnits",(function(){return Ls})),r.d(s,"commify",(function(){return Ds})),r.d(s,"computeHmac",(function(){return yn})),r.d(s,"keccak256",(function(){return ee})),r.d(s,"ripemd160",(function(){return dn})),r.d(s,"sha256",(function(){return pn})),r.d(s,"sha512",(function(){return vn})),r.d(s,"randomBytes",(function(){return mi.a})),r.d(s,"shuffled",(function(){return Ja})),r.d(s,"solidityPack",(function(){return Ms})),r.d(s,"solidityKeccak256",(function(){return Cs})),r.d(s,"soliditySha256",(function(){return Os})),r.d(s,"splitSignature",(function(){return m.n})),r.d(s,"joinSignature",(function(){return m.m})),r.d(s,"accessListify",(function(){return cr})),r.d(s,"parseTransaction",(function(){return hr})),r.d(s,"serializeTransaction",(function(){return lr})),r.d(s,"getJsonWalletAddress",(function(){return Vi})),r.d(s,"computeAddress",(function(){return or})),r.d(s,"recoverAddress",(function(){return ar})),r.d(s,"computePublicKey",(function(){return $t})),r.d(s,"recoverPublicKey",(function(){return Qt})),r.d(s,"verifyMessage",(function(){return Wi})),r.d(s,"verifyTypedData",(function(){return Zi})),r.d(s,"getAccountPath",(function(){return gi})),r.d(s,"mnemonicToEntropy",(function(){return vi})),r.d(s,"entropyToMnemonic",(function(){return yi})),r.d(s,"isValidMnemonic",(function(){return bi})),r.d(s,"mnemonicToSeed",(function(){return pi})),r.d(s,"SupportedAlgorithm",(function(){return an})),r.d(s,"UnicodeNormalizationForm",(function(){return Se})),r.d(s,"Utf8ErrorReason",(function(){return Ee})),r.d(s,"Indexed",(function(){return Bt}));var u={};r.r(u),r.d(u,"Signer",(function(){return Jt})),r.d(u,"Wallet",(function(){return Xi})),r.d(u,"VoidSigner",(function(){return qt})),r.d(u,"getDefaultProvider",(function(){return Es})),r.d(u,"providers",(function(){return o})),r.d(u,"BaseContract",(function(){return xr})),r.d(u,"Contract",(function(){return Tr})),r.d(u,"ContractFactory",(function(){return Mr})),r.d(u,"BigNumber",(function(){return C})),r.d(u,"FixedNumber",(function(){return Ur})),r.d(u,"constants",(function(){return i})),r.d(u,"errors",(function(){return S.a})),r.d(u,"logger",(function(){return Ks})),r.d(u,"utils",(function(){return s})),r.d(u,"wordlists",(function(){return ri})),r.d(u,"version",(function(){return Fs})),r.d(u,"Wordlist",(function(){return mn}));var c=r(104),f=r(17),l=r(37);function h(e,t,r){return(h="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(l.a)(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}var d=r(10),p=r(11),v=r(5),y=r(7),b=r(0),g=r.n(b),m=r(2),w=r(14),k=r.n(w),S=r(3),E="bignumber/5.3.0",_=k.a.BN,A=new S.b(E),x={},T=9007199254740991;var M=!1,C=function(){function e(t,r){Object(v.a)(this,e),A.checkNew(this instanceof e?this.constructor:void 0,e),t!==x&&A.throwError("cannot call constructor directly; use BigNumber.from",S.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return Object(y.a)(e,[{key:"fromTwos",value:function(e){return I(P(this).fromTwos(e))}},{key:"toTwos",value:function(e){return I(P(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return I(P(this).add(P(e)))}},{key:"sub",value:function(e){return I(P(this).sub(P(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&R("division by zero","div"),I(P(this).div(P(t)))}},{key:"mul",value:function(e){return I(P(this).mul(P(e)))}},{key:"mod",value:function(e){var t=P(e);return t.isNeg()&&R("cannot modulo negative values","mod"),I(P(this).umod(t))}},{key:"pow",value:function(e){var t=P(e);return t.isNeg()&&R("cannot raise to negative values","pow"),I(P(this).pow(t))}},{key:"and",value:function(e){var t=P(e);return(this.isNegative()||t.isNeg())&&R("cannot 'and' negative values","and"),I(P(this).and(t))}},{key:"or",value:function(e){var t=P(e);return(this.isNegative()||t.isNeg())&&R("cannot 'or' negative values","or"),I(P(this).or(t))}},{key:"xor",value:function(e){var t=P(e);return(this.isNegative()||t.isNeg())&&R("cannot 'xor' negative values","xor"),I(P(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&R("cannot mask negative values","mask"),I(P(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&R("cannot shift negative values","shl"),I(P(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&R("cannot shift negative values","shr"),I(P(this).shrn(e))}},{key:"eq",value:function(e){return P(this).eq(P(e))}},{key:"lt",value:function(e){return P(this).lt(P(e))}},{key:"lte",value:function(e){return P(this).lte(P(e))}},{key:"gt",value:function(e){return P(this).gt(P(e))}},{key:"gte",value:function(e){return P(this).gte(P(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return P(this).isZero()}},{key:"toNumber",value:function(){try{return P(this).toNumber()}catch(e){R("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return A.throwError("this platform does not support BigInt",S.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?M||(M=!0,A.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?A.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",S.b.errors.UNEXPECTED_ARGUMENT,{}):A.throwError("BigNumber.toString does not accept parameters",S.b.errors.UNEXPECTED_ARGUMENT,{})),P(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(x,O(t)):t.match(/^-?[0-9]+$/)?new e(x,O(new _(t))):A.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&R("underflow","BigNumber.from",t),(t>=T||t<=-T)&&R("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"===typeof r)return e.from(r.toString());if(Object(m.j)(r))return e.from(Object(m.i)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"===typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"===typeof i&&(Object(m.l)(i)||"-"===i[0]&&Object(m.l)(i.substring(1))))return e.from(i)}return A.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function O(e){if("string"!==typeof e)return O(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&A.throwArgumentError("invalid hex","value",e),"0x00"===(e=O(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function I(e){return C.from(O(e))}function P(e){var t=C.from(e).toHexString();return"-"===t[0]?new _("-"+t.substring(3),16):new _(t.substring(2),16)}function R(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),A.throwError(e,S.b.errors.NUMERIC_FAULT,n)}var B=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},D=new S.b("properties/5.3.0");function N(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function L(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function j(e){return B(this,void 0,void 0,g.a.mark((function t(){var r,n;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))}function U(e,t){e&&"object"===typeof e||D.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(r){t[r]||D.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function F(e){var t={};for(var r in e)t[r]=e[r];return t}var K={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function z(e){if(void 0===e||null===e||K[typeof e])return!0;if(Array.isArray(e)||"object"===typeof e){if(!Object.isFrozen(e))return!1;for(var t=Object.keys(e),r=0;r<t.length;r++)if(!z(e[t[r]]))return!1;return!0}return D.throwArgumentError("Cannot deepCopy ".concat(typeof e),"object",e)}function V(e){if(z(e))return e;if(Array.isArray(e))return Object.freeze(e.map((function(e){return H(e)})));if("object"===typeof e){var t={};for(var r in e){var n=e[r];void 0!==n&&N(t,r,H(n))}return t}return D.throwArgumentError("Cannot deepCopy ".concat(typeof e),"object",e)}function H(e){return V(e)}var J=function e(t){for(var r in Object(v.a)(this,e),t)this[r]=H(t[r])},q="abi/5.3.1",G=new S.b(q);function X(e){var t=[];return function e(r,n){if(Array.isArray(n))for(var i in n){var o=r.slice();o.push(i);try{e(o,n[i])}catch(a){t.push({path:o,error:a})}}}([],e),t}var W=function(){function e(t,r,n,i){Object(v.a)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=i}return Object(y.a)(e,[{key:"_throwError",value:function(e,t){G.throwArgumentError(e,this.localName,t)}}]),e}(),Z=function(){function e(t){Object(v.a)(this,e),N(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return Object(y.a)(e,[{key:"data",get:function(){return Object(m.c)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData(Object(m.b)(e._data))}},{key:"writeBytes",value:function(e){var t=Object(m.a)(e),r=t.length%this.wordSize;return r&&(t=Object(m.b)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=Object(m.a)(C.from(e));return t.length>this.wordSize&&G.throwError("value out-of-bounds",S.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(m.b)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}(),Y=function(){function e(t,r,n,i){Object(v.a)(this,e),N(this,"_data",Object(m.a)(t)),N(this,"wordSize",r||32),N(this,"_coerceFunc",n),N(this,"allowLoose",i),this._offset=0}return Object(y.a)(e,[{key:"data",get:function(){return Object(m.i)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:G.throwError("data out-of-bounds",S.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return C.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}(),Q=r(514),$=r.n(Q);function ee(e){return"0x"+$.a.keccak_256(Object(m.a)(e))}var te=new S.b("rlp/5.3.0");function re(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function ne(e,t,r){for(var n=0,i=0;i<r;i++)n=256*n+e[t+i];return n}function ie(e){if(Array.isArray(e)){var t=[];if(e.forEach((function(e){t=t.concat(ie(e))})),t.length<=55)return t.unshift(192+t.length),t;var r=re(t.length);return r.unshift(247+r.length),r.concat(t)}Object(m.k)(e)||te.throwArgumentError("RLP object must be BytesLike","object",e);var n=Array.prototype.slice.call(Object(m.a)(e));if(1===n.length&&n[0]<=127)return n;if(n.length<=55)return n.unshift(128+n.length),n;var i=re(n.length);return i.unshift(183+i.length),i.concat(n)}function oe(e){return Object(m.i)(ie(e))}function ae(e,t,r,n){for(var i=[];r<t+1+n;){var o=se(e,r);i.push(o.result),(r+=o.consumed)>t+1+n&&te.throwError("child data too short",S.b.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function se(e,t){if(0===e.length&&te.throwError("data too short",S.b.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&te.throwError("data short segment too short",S.b.errors.BUFFER_OVERRUN,{});var n=ne(e,t+1,r);return t+1+r+n>e.length&&te.throwError("data long segment too short",S.b.errors.BUFFER_OVERRUN,{}),ae(e,t,t+1+r,r+n)}if(e[t]>=192){var i=e[t]-192;return t+1+i>e.length&&te.throwError("data array too short",S.b.errors.BUFFER_OVERRUN,{}),ae(e,t,t+1,i)}if(e[t]>=184){var o=e[t]-183;t+1+o>e.length&&te.throwError("data array too short",S.b.errors.BUFFER_OVERRUN,{});var a=ne(e,t+1,o);return t+1+o+a>e.length&&te.throwError("data array too short",S.b.errors.BUFFER_OVERRUN,{}),{consumed:1+o+a,result:Object(m.i)(e.slice(t+1+o,t+1+o+a))}}if(e[t]>=128){var s=e[t]-128;return t+1+s>e.length&&te.throwError("data too short",S.b.errors.BUFFER_OVERRUN,{}),{consumed:1+s,result:Object(m.i)(e.slice(t+1,t+1+s))}}return{consumed:1,result:Object(m.i)(e[t])}}function ue(e){var t=Object(m.a)(e),r=se(t,0);return r.consumed!==t.length&&te.throwArgumentError("invalid rlp data","data",e),r.result}var ce=new S.b("address/5.3.0");function fe(e){Object(m.l)(e,20)||ce.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=t[n].charCodeAt(0);for(var i=Object(m.a)(ee(r)),o=0;o<40;o+=2)i[o>>1]>>4>=8&&(t[o]=t[o].toUpperCase()),(15&i[o>>1])>=8&&(t[o+1]=t[o+1].toUpperCase());return"0x"+t.join("")}for(var le={},he=0;he<10;he++)le[String(he)]=String(he);for(var de=0;de<26;de++)le[String.fromCharCode(65+de)]=String(10+de);var pe,ve=Math.floor((pe=9007199254740991,Math.log10?Math.log10(pe):Math.log(pe)/Math.LN10));function ye(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return le[e]})).join("");t.length>=ve;){var r=t.substring(0,ve);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function be(e){var t,r=null;if("string"!==typeof e&&ce.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),r=fe(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==e&&ce.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==ye(e)&&ce.throwArgumentError("bad icap checksum","address",e),t=e.substring(4),r=new _(t,36).toString(16);r.length<40;)r="0"+r;r=fe("0x"+r)}else ce.throwArgumentError("invalid address","address",e);return r}function ge(e){try{return be(e),!0}catch(t){}return!1}function me(e){for(var t,r=(t=be(e).substring(2),new _(t,16).toString(36)).toUpperCase();r.length<30;)r="0"+r;return"XE"+ye("XE00"+r)+r}function we(e){var t=null;try{t=be(e.from)}catch(n){ce.throwArgumentError("missing from address","transaction",e)}var r=Object(m.o)(Object(m.a)(C.from(e.nonce).toHexString()));return be(Object(m.e)(ee(oe([t,r])),12))}function ke(e,t,r){return 32!==Object(m.d)(t)&&ce.throwArgumentError("salt must be 32 bytes","salt",t),32!==Object(m.d)(r)&&ce.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),be(Object(m.e)(ee(Object(m.b)(["0xff",be(e),t,r])),12))}var Se,Ee,_e=new S.b("strings/5.3.0");function Ae(e,t,r,n,i){if(e===Ee.BAD_PREFIX||e===Ee.UNEXPECTED_CONTINUE){for(var o=0,a=t+1;a<r.length&&r[a]>>6===2;a++)o++;return o}return e===Ee.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(Se||(Se={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(Ee||(Ee={}));var xe=Object.freeze({error:function(e,t,r,n,i){return _e.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:Ae,replace:function(e,t,r,n,i){return e===Ee.OVERLONG?(n.push(i),0):(n.push(65533),Ae(e,t,r))}});function Te(e,t){null==t&&(t=xe.error),e=Object(m.a)(e);for(var r=[],n=0;n<e.length;){var i=e[n++];if(i>>7!==0){var o=null,a=null;if(192===(224&i))o=1,a=127;else if(224===(240&i))o=2,a=2047;else{if(240!==(248&i)){n+=t(128===(192&i)?Ee.UNEXPECTED_CONTINUE:Ee.BAD_PREFIX,n-1,e,r);continue}o=3,a=65535}if(n-1+o>=e.length)n+=t(Ee.OVERRUN,n-1,e,r);else{for(var s=i&(1<<8-o-1)-1,u=0;u<o;u++){var c=e[n];if(128!=(192&c)){n+=t(Ee.MISSING_CONTINUE,n,e,r),s=null;break}s=s<<6|63&c,n++}null!==s&&(s>1114111?n+=t(Ee.OUT_OF_RANGE,n-1-o,e,r,s):s>=55296&&s<=57343?n+=t(Ee.UTF16_SURROGATE,n-1-o,e,r,s):s<=a?n+=t(Ee.OVERLONG,n-1-o,e,r,s):r.push(s))}}else r.push(i)}return r}function Me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se.current;t!=Se.current&&(_e.checkNormalize(),e=e.normalize(t));for(var r=[],n=0;n<e.length;n++){var i=e.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(63&i|128);else if(55296==(64512&i)){n++;var o=e.charCodeAt(n);if(n>=e.length||56320!==(64512&o))throw new Error("invalid utf-8 string");var a=65536+((1023&i)<<10)+(1023&o);r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(63&i|128)}return Object(m.a)(r)}function Ce(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function Oe(e,t){return'"'+Te(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?Ce(e):Ce(55296+((e-=65536)>>10&1023))+Ce(56320+(1023&e))})).join("")+'"'}function Ie(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function Pe(e,t){return Ie(Te(e,t))}function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se.current;return Te(Me(e,t))}function Be(e){return ee(Me(e))}var De=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e){return Object(v.a)(this,r),t.call(this,"address","address",e,!1)}return Object(y.a)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{be(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return be(Object(m.h)(e.readValue().toHexString(),20))}}]),r}(W),Ne=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e){var n;return Object(v.a)(this,r),(n=t.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,n}return Object(y.a)(r,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),r}(W),Le=new S.b(q);function je(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){var i={};n=t.map((function(e){var t=e.localName;return t||Le.throwError("cannot encode object for signature with missing names",S.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]&&Le.throwError("cannot encode object for signature with duplicate names",S.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]=!0,r[t]}))}else Le.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&Le.throwArgumentError("types/value length mismatch","tuple",r);var o=new Z(e.wordSize),a=new Z(e.wordSize),s=[];t.forEach((function(e,t){var r=n[t];if(e.dynamic){var i=a.length;e.encode(a,r);var u=o.writeUpdatableValue();s.push((function(e){u(e+i)}))}else e.encode(o,r)})),s.forEach((function(e){e(o.length)}));var u=e.appendWriter(o);return u+=e.appendWriter(a)}function Ue(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=n.subReader(o.toNumber());try{i=t.decode(a)}catch(s){if(s.code===S.b.errors.BUFFER_OVERRUN)throw s;(i=s).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(s){if(s.code===S.b.errors.BUFFER_OVERRUN)throw s;(i=s).baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&r.push(i)}));var i=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===i[n]&&("length"===n&&(n="_length"),null==r[n])){var o=r[t];o instanceof Error?Object.defineProperty(r,n,{get:function(){throw o}}):r[n]=o}}));for(var o=function(e){var t=r[e];t instanceof Error&&Object.defineProperty(r,e,{get:function(){throw t}})},a=0;a<r.length;a++)o(a);return Object.freeze(r)}var Fe=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n,i){var o;Object(v.a)(this,r);var a=e.type+"["+(n>=0?n:"")+"]",s=-1===n||e.dynamic;return(o=t.call(this,"array",a,i,s)).coder=e,o.length=n,o}return Object(y.a)(r,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;r<this.length;r++)t.push(e);return t}},{key:"encode",value:function(e,t){Array.isArray(t)||this._throwError("expected array value",t);var r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),Le.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));for(var n=[],i=0;i<t.length;i++)n.push(this.coder);return je(e,n,t)}},{key:"decode",value:function(e){var t=this.length;-1===t&&32*(t=e.readValue().toNumber())>e._data.length&&Le.throwError("insufficient data length",S.b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n<t;n++)r.push(new Ne(this.coder));return e.coerce(this.name,Ue(e,r))}}]),r}(W),Ke=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e){return Object(v.a)(this,r),t.call(this,"bool","bool",e,!1)}return Object(y.a)(r,[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(e,t){return e.writeValue(t?1:0)}},{key:"decode",value:function(e){return e.coerce(this.type,!e.readValue().isZero())}}]),r}(W),ze=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){return Object(v.a)(this,r),t.call(this,e,e,n,!0)}return Object(y.a)(r,[{key:"defaultValue",value:function(){return"0x"}},{key:"encode",value:function(e,t){t=Object(m.a)(t);var r=e.writeValue(t.length);return r+=e.writeBytes(t)}},{key:"decode",value:function(e){return e.readBytes(e.readValue().toNumber(),!0)}}]),r}(W),Ve=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e){return Object(v.a)(this,r),t.call(this,"bytes",e)}return Object(y.a)(r,[{key:"decode",value:function(e){return e.coerce(this.name,Object(m.i)(h(Object(l.a)(r.prototype),"decode",this).call(this,e)))}}]),r}(ze),He=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;Object(v.a)(this,r);var o="bytes"+String(e);return(i=t.call(this,o,o,n,!1)).size=e,i}return Object(y.a)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(e,t){var r=Object(m.a)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}},{key:"decode",value:function(e){return e.coerce(this.name,Object(m.i)(e.readBytes(this.size)))}}]),r}(W),Je=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e){return Object(v.a)(this,r),t.call(this,"null","",e,!1)}return Object(y.a)(r,[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}},{key:"decode",value:function(e){return e.readBytes(0),e.coerce(this.name,null)}}]),r}(W),qe=C.from(-1),Ge=C.from(0),Xe=C.from(1),We=C.from(2),Ze=C.from("1000000000000000000"),Ye=C.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Qe=C.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),$e=C.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),et=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n,i){var o;Object(v.a)(this,r);var a=(n?"int":"uint")+8*e;return(o=t.call(this,a,a,i,!1)).size=e,o.signed=n,o}return Object(y.a)(r,[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(e,t){var r=C.from(t),n=Ye.mask(8*e.wordSize);if(this.signed){var i=n.mask(8*this.size-1);(r.gt(i)||r.lt(i.add(Xe).mul(qe)))&&this._throwError("value out-of-bounds",t)}else(r.lt(Ge)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}},{key:"decode",value:function(e){var t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}]),r}(W),tt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e){return Object(v.a)(this,r),t.call(this,"string",e)}return Object(y.a)(r,[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(e,t){return h(Object(l.a)(r.prototype),"encode",this).call(this,e,Me(t))}},{key:"decode",value:function(e){return Pe(h(Object(l.a)(r.prototype),"decode",this).call(this,e))}}]),r}(ze),rt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;Object(v.a)(this,r);var o=!1,a=[];e.forEach((function(e){e.dynamic&&(o=!0),a.push(e.type)}));var s="tuple("+a.join(",")+")";return(i=t.call(this,"tuple",s,n,o)).coders=e,i}return Object(y.a)(r,[{key:"defaultValue",value:function(){var e=[];this.coders.forEach((function(t){e.push(t.defaultValue())}));var t=this.coders.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach((function(r,n){var i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}},{key:"encode",value:function(e,t){return je(e,this.coders,t)}},{key:"decode",value:function(e){return e.coerce(this.name,Ue(e,this.coders))}}]),r}(W),nt=new S.b(q),it={},ot={calldata:!0,memory:!0,storage:!0},at={calldata:!0,memory:!0};function st(e,t){if("bytes"===e||"string"===e){if(ot[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&at[t])return!0;return(ot[t]||"payable"===t)&&nt.throwArgumentError("invalid modifier","name",t),!1}function ut(e,t){for(var r in t)N(e,r,t[r])}var ct=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),ft=new RegExp(/^(.*)\[([0-9]*)\]$/),lt=function(){function e(t,r){Object(v.a)(this,e),t!==it&&nt.throwError("use fromString",S.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),ut(this,r);var n=this.type.match(ft);ut(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return Object(y.a)(e,[{key:"format",value:function(e){if(e||(e=ct.sighash),ct[e]||nt.throwArgumentError("invalid format type","format",e),e===ct.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==ct.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===ct.full?", ":",")+")"):r+=this.type,e!==ct.sighash&&(!0===this.indexed&&(r+=" indexed"),e===ct.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"===typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(it,{name:t.name||null,type:St(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return n=function(e,t){var r=e;function n(t){nt.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s<e.length;s++){var u=e[s];switch(u){case"(":a.state.allowType&&""===a.type?a.type="tuple":a.state.allowParams||n(s),a.state.allowType=!1,a.type=St(a.type),a.components=[i(a)],a=a.components[0];break;case")":delete a.state,"indexed"===a.name&&(t||n(s),a.indexed=!0,a.name=""),st(a.type,a.name)&&(a.name=""),a.type=St(a.type);var c=a;(a=a.parent)||n(s),delete c.parent,a.state.allowParams=!1,a.state.allowName=!0,a.state.allowArray=!0;break;case",":delete a.state,"indexed"===a.name&&(t||n(s),a.indexed=!0,a.name=""),st(a.type,a.name)&&(a.name=""),a.type=St(a.type);var f=i(a.parent);a.parent.components.push(f),delete a.parent,a=f;break;case" ":a.state.allowType&&""!==a.type&&(a.type=St(a.type),delete a.state.allowType,a.state.allowName=!0,a.state.allowParams=!0),a.state.allowName&&""!==a.name&&("indexed"===a.name?(t||n(s),a.indexed&&n(s),a.indexed=!0,a.name=""):st(a.type,a.name)?a.name="":a.state.allowName=!1);break;case"[":a.state.allowArray||n(s),a.type+=u,a.state.allowArray=!1,a.state.allowName=!1,a.state.readArray=!0;break;case"]":a.state.readArray||n(s),a.type+=u,a.state.readArray=!1,a.state.allowArray=!0,a.state.allowName=!0;break;default:a.state.allowType?(a.type+=u,a.state.allowParams=!0,a.state.allowArray=!0):a.state.allowName?(a.name+=u,delete a.state.allowArray):a.state.readArray?a.type+=u:n(s)}}return a.parent&&nt.throwArgumentError("unexpected eof","param",e),delete o.state,"indexed"===a.name?(t||n(r.length-7),a.indexed&&n(r.length-7),a.indexed=!0,a.name=""):st(a.type,a.name)&&(a.name=""),o.type=St(o.type),o}(t,!!r),e.fromObject({name:n.name,type:n.type,indexed:n.indexed,components:n.components});var n}},{key:"isParamType",value:function(e){return!(null==e||!e._isParamType)}}]),e}();function ht(e,t){return function(e){e=e.trim();for(var t=[],r="",n=0,i=0;i<e.length;i++){var o=e[i];","===o&&0===n?(t.push(r),r=""):(r+=o,"("===o?n++:")"===o&&-1===--n&&nt.throwArgumentError("unbalanced parenthesis","value",e))}r&&t.push(r);return t}(e).map((function(e){return lt.fromString(e,t)}))}var dt=function(){function e(t,r){Object(v.a)(this,e),t!==it&&nt.throwError("use a static from method",S.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),ut(this,r),this._isFragment=!0,Object.freeze(this)}return Object(y.a)(e,null,[{key:"from",value:function(t){return e.isFragment(t)?t:"string"===typeof t?e.fromString(t):e.fromObject(t)}},{key:"fromObject",value:function(t){if(e.isFragment(t))return t;switch(t.type){case"function":return mt.fromObject(t);case"event":return pt.fromObject(t);case"constructor":return gt.fromObject(t);case"error":return kt.fromObject(t);case"fallback":case"receive":return null}return nt.throwArgumentError("invalid fragment object","value",t)}},{key:"fromString",value:function(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?pt.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?mt.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?gt.fromString(e.trim()):"error"===e.split(" ")[0]?kt.fromString(e.substring(5).trim()):nt.throwArgumentError("unsupported fragment","value",e)}},{key:"isFragment",value:function(e){return!(!e||!e._isFragment)}}]),e}(),pt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"format",value:function(e){if(e||(e=ct.sighash),ct[e]||nt.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==ct.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===ct.full?", ":",")+") ",e!==ct.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isEventFragment(e))return e;"event"!==e.type&&nt.throwArgumentError("invalid event object","value",e);var t={name:_t(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(lt.fromObject):[],type:"event"};return new r(it,t)}},{key:"fromString",value:function(e){var t=e.match(At);t||nt.throwArgumentError("invalid event string","value",e);var n=!1;return t[3].split(" ").forEach((function(e){switch(e.trim()){case"anonymous":n=!0;break;case"":break;default:nt.warn("unknown modifier: "+e)}})),r.fromObject({name:t[1].trim(),anonymous:n,inputs:ht(t[2],!0),type:"event"})}},{key:"isEventFragment",value:function(e){return e&&e._isFragment&&"event"===e.type}}]),r}(dt);function vt(e,t){t.gas=null;var r=e.split("@");return 1!==r.length?(r.length>2&&nt.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||nt.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=C.from(r[1]),r[0]):e}function yt(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function bt(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&nt.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&nt.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||nt.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&nt.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&nt.throwArgumentError("unable to determine stateMutability","value",e),t}var gt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"format",value:function(e){if(e||(e=ct.sighash),ct[e]||nt.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===ct.sighash&&nt.throwError("cannot format a constructor for sighash",S.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===ct.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&nt.throwArgumentError("invalid constructor object","value",e);var t=bt(e);t.constant&&nt.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(lt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?C.from(e.gas):null};return new r(it,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=vt(e,t)).match(At);return n&&"constructor"===n[1].trim()||nt.throwArgumentError("invalid constructor string","value",e),t.inputs=ht(n[2].trim(),!1),yt(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(dt),mt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"format",value:function(e){if(e||(e=ct.sighash),ct[e]||nt.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==ct.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===ct.full?", ":",")+") ",e!==ct.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&nt.throwArgumentError("invalid function object","value",e);var t=bt(e),n={type:e.type,name:_t(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(lt.fromObject):[],outputs:e.outputs?e.outputs.map(lt.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?C.from(e.gas):null};return new r(it,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=vt(e,t)).split(" returns ");n.length>2&&nt.throwArgumentError("invalid function string","value",e);var i=n[0].match(At);if(i||nt.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&_t(t.name),t.inputs=ht(i[2],!1),yt(i[3].trim(),t),n.length>1){var o=n[1].match(At);""==o[1].trim()&&""==o[3].trim()||nt.throwArgumentError("unexpected tokens","value",e),t.outputs=ht(o[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(gt);function wt(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||nt.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}var kt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"format",value:function(e){if(e||(e=ct.sighash),ct[e]||nt.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==ct.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===ct.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"===typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&nt.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:_t(e.name),inputs:e.inputs?e.inputs.map(lt.fromObject):[]};return wt(new r(it,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(At);return n||nt.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&_t(t.name),t.inputs=ht(n[2],!1),wt(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(dt);function St(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var Et=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function _t(e){return e&&e.match(Et)||nt.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var At=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");var xt=new S.b(q),Tt=new RegExp(/^bytes([0-9]*)$/),Mt=new RegExp(/^(u?int)([0-9]*)$/),Ct=function(){function e(t){Object(v.a)(this,e),xt.checkNew(this instanceof e?this.constructor:void 0,e),N(this,"coerceFunc",t||null)}return Object(y.a)(e,[{key:"_getCoder",value:function(e){var t=this;switch(e.baseType){case"address":return new De(e.name);case"bool":return new Ke(e.name);case"string":return new tt(e.name);case"bytes":return new Ve(e.name);case"array":return new Fe(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new rt((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new Je(e.name)}var r=e.type.match(Mt);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!==0)&&xt.throwArgumentError("invalid "+r[1]+" bit length","param",e),new et(n/8,"int"===r[1],e.name)}if(r=e.type.match(Tt)){var i=parseInt(r[1]);return(0===i||i>32)&&xt.throwArgumentError("invalid bytes length","param",e),new He(i,e.name)}return xt.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new Y(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new Z(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(lt.from(e))}));return new rt(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&xt.throwError("types/values length mismatch",S.b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(lt.from(e))})),i=new rt(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,r){var n=this,i=e.map((function(e){return n._getCoder(lt.from(e))}));return new rt(i,"_").decode(this._getReader(Object(m.a)(t),r))}}]),e}(),Ot=new Ct,It=new S.b(q),Pt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return r}(J),Rt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return r}(J),Bt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),r}(J),Dt={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Nt(e,t){var r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}var Lt=function(){function e(t){var r=this;Object(v.a)(this,e),It.checkNew(this instanceof e?this.constructor:void 0,e);N(this,"fragments",("string"===typeof t?JSON.parse(t):t).map((function(e){return dt.from(e)})).filter((function(e){return null!=e}))),N(this,"_abiCoder",L(this instanceof e?this.constructor:void 0,"getAbiCoder")()),N(this,"functions",{}),N(this,"errors",{}),N(this,"events",{}),N(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return r.deploy?void It.warn("duplicate definition - constructor"):void N(r,"deploy",e);case"function":t=r.functions;break;case"event":t=r.events;break;case"error":t=r.errors;break;default:return}var n=e.format();t[n]?It.warn("duplicate definition - "+n):t[n]=e})),this.deploy||N(this,"deploy",gt.from({payable:!1,type:"constructor"})),N(this,"_isInterface",!0)}return Object(y.a)(e,[{key:"format",value:function(e){e||(e=ct.full),e===ct.sighash&&It.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===ct.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if(Object(m.l)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];It.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),n=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===r}));return 0===n.length?It.throwArgumentError("no matching function","name",r):n.length>1&&It.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var i=this.functions[mt.fromString(e).format()];return i||It.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if(Object(m.l)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];It.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?It.throwArgumentError("no matching event","name",n):i.length>1&&It.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}var o=this.events[pt.fromString(e).format()];return o||It.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if(Object(m.l)(e)){var t=L(this.constructor,"getSighash");for(var r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}It.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?It.throwArgumentError("no matching error","name",n):i.length>1&&It.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[mt.fromString(e).format()];return o||It.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){return"string"===typeof e&&(e=this.getFunction(e)),L(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"===typeof e&&(e=this.getEvent(e)),L(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeFunctionData",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var r=Object(m.a)(t);return Object(m.i)(r.slice(0,4))!==this.getSighash(e)&&It.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",Object(m.i)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(m.i)(Object(m.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var r=Object(m.a)(t),n=null,i=null,o=null,a=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(c){}break;case 4:var s=Object(m.i)(r.slice(0,4)),u=Dt[s];if(u)i=this._abiCoder.decode(u.inputs,r.slice(4)),o=u.name,a=u.signature,u.reason&&(n=i[0]);else try{var c=this.getError(s);i=this._abiCoder.decode(c.inputs,r.slice(4)),o=c.name,a=c.format()}catch(c){console.log(c)}}return It.throwError("call revert exception",S.b.errors.CALL_EXCEPTION,{method:e.format(),errorArgs:i,errorName:o,errorSignature:a,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(m.i)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&It.throwError("too many arguments for "+e.format(),S.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?Be(t):"bytes"===e.type?ee(Object(m.i)(t)):("address"===e.type&&r._abiCoder.encode(["address"],[t]),Object(m.h)(Object(m.i)(t),32))};for(t.forEach((function(t,r){var o=e.inputs[r];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?It.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((function(e){return i(o,e)}))):n.push(i(o,t)):null!=t&&It.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"===typeof e&&(e=this.getEvent(e));var n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&It.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)n.push(Be(s));else if("bytes"===e.type)n.push(ee(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"===typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);Object(m.l)(r[0],32)&&r[0].toLowerCase()===n||It.throwError("fragment/topic mismatch",S.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(lt.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=r?this._abiCoder.decode(i,Object(m.b)(r)):null,u=this._abiCoder.decode(o,t,!0),c=[],f=0,l=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)c[t]=new Bt({_isIndexed:!0,hash:null});else if(a[t])c[t]=new Bt({_isIndexed:!0,hash:s[l++]});else try{c[t]=s[l++]}catch(n){c[t]=n}else try{c[t]=u[f++]}catch(n){c[t]=n}if(e.name&&null==c[e.name]){var r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{get:function(){throw Nt("property ".concat(JSON.stringify(e.name)),r)}}):c[e.name]=r}}));for(var h=function(e){var t=c[e];t instanceof Error&&Object.defineProperty(c,e,{get:function(){throw Nt("index ".concat(e),t)}})},d=0;d<c.length;d++)h(d);return Object.freeze(c)}},{key:"parseTransaction",value:function(e){var t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Rt({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:C.from(e.value||"0")}):null}},{key:"parseLog",value:function(e){var t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Pt({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}}],[{key:"getAbiCoder",value:function(){return Ot}},{key:"getAddress",value:function(e){return be(e)}},{key:"getSighash",value:function(e){return Object(m.e)(Be(e.format()),0,4)}},{key:"getEventTopic",value:function(e){return Be(e.format())}},{key:"isInterface",value:function(e){return!(!e||!e._isInterface)}}]),e}(),jt=new S.b("abstract-provider/5.3.0"),Ut=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,null,[{key:"isForkEvent",value:function(e){return!(!e||!e._isForkEvent)}}]),r}(J),Ft=function(){function e(){Object(v.a)(this,e),jt.checkAbstract(this instanceof e?this.constructor:void 0,e),N(this,"_isProvider",!0)}return Object(y.a)(e,[{key:"addListener",value:function(e,t){return this.on(e,t)}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"isProvider",value:function(e){return!(!e||!e._isProvider)}}]),e}(),Kt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},zt=new S.b("abstract-signer/5.3.0"),Vt=["accessList","chainId","data","from","gasLimit","gasPrice","nonce","to","type","value"],Ht=[S.b.errors.INSUFFICIENT_FUNDS,S.b.errors.NONCE_EXPIRED,S.b.errors.REPLACEMENT_UNDERPRICED],Jt=function(){function e(){Object(v.a)(this,e),zt.checkAbstract(this instanceof e?this.constructor:void 0,e),N(this,"_isSigner",!0)}return Object(y.a)(e,[{key:"getBalance",value:function(e){return Kt(this,void 0,void 0,g.a.mark((function t(){return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getBalance"),t.next=3,this.provider.getBalance(this.getAddress(),e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getTransactionCount",value:function(e){return Kt(this,void 0,void 0,g.a.mark((function t(){return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("getTransactionCount"),t.next=3,this.provider.getTransactionCount(this.getAddress(),e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"estimateGas",value:function(e){return Kt(this,void 0,void 0,g.a.mark((function t(){var r;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("estimateGas"),t.next=3,j(this.checkTransaction(e));case 3:return r=t.sent,t.next=6,this.provider.estimateGas(r);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"call",value:function(e,t){return Kt(this,void 0,void 0,g.a.mark((function r(){var n;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this._checkProvider("call"),r.next=3,j(this.checkTransaction(e));case 3:return n=r.sent,r.next=6,this.provider.call(n,t);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"sendTransaction",value:function(e){var t=this;return this._checkProvider("sendTransaction"),this.populateTransaction(e).then((function(e){return t.signTransaction(e).then((function(e){return t.provider.sendTransaction(e)}))}))}},{key:"getChainId",value:function(){return Kt(this,void 0,void 0,g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getChainId"),e.next=3,this.provider.getNetwork();case 3:return t=e.sent,e.abrupt("return",t.chainId);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return Kt(this,void 0,void 0,g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._checkProvider("getGasPrice"),e.next=3,this.provider.getGasPrice();case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"resolveName",value:function(e){return Kt(this,void 0,void 0,g.a.mark((function t(){return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._checkProvider("resolveName"),t.next=3,this.provider.resolveName(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"checkTransaction",value:function(e){for(var t in e)-1===Vt.indexOf(t)&&zt.throwArgumentError("invalid transaction key: "+t,"transaction",e);var r=F(e);return null==r.from?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then((function(t){return t[0].toLowerCase()!==t[1].toLowerCase()&&zt.throwArgumentError("from address mismatch","transaction",e),t[0]})),r}},{key:"populateTransaction",value:function(e){return Kt(this,void 0,void 0,g.a.mark((function t(){var r,n=this;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,j(this.checkTransaction(e));case 2:return null!=(r=t.sent).to&&(r.to=Promise.resolve(r.to).then((function(e){return Kt(n,void 0,void 0,g.a.mark((function t(){var r;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this.resolveName(e);case 4:return null==(r=t.sent)&&zt.throwArgumentError("provided ENS name resolves to null","tx.to",e),t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)})))}))),null==r.gasPrice&&(r.gasPrice=this.getGasPrice()),null==r.nonce&&(r.nonce=this.getTransactionCount("pending")),null==r.gasLimit&&(r.gasLimit=this.estimateGas(r).catch((function(e){if(Ht.indexOf(e.code)>=0)throw e;return zt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",S.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:r})}))),null==r.chainId?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then((function(t){return 0!==t[1]&&t[0]!==t[1]&&zt.throwArgumentError("chainId address mismatch","transaction",e),t[0]})),t.next=10,j(r);case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"_checkProvider",value:function(e){this.provider||zt.throwError("missing provider",S.b.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}}],[{key:"isSigner",value:function(e){return!(!e||!e._isSigner)}}]),e}(),qt=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;return Object(v.a)(this,r),zt.checkNew(this instanceof r?this.constructor:void 0,r),i=t.call(this),N(Object(f.a)(i),"address",e),N(Object(f.a)(i),"provider",n||null),i}return Object(y.a)(r,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(e,t){return Promise.resolve().then((function(){zt.throwError(e,S.b.errors.UNSUPPORTED_OPERATION,{operation:t})}))}},{key:"signMessage",value:function(e){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(e){return new r(this.address,e)}}]),r}(Jt),Gt=r(513),Xt=new S.b("signing-key/5.3.0"),Wt=null;function Zt(){return Wt||(Wt=new Gt.a("secp256k1")),Wt}var Yt=function(){function e(t){Object(v.a)(this,e),N(this,"curve","secp256k1"),N(this,"privateKey",Object(m.i)(t));var r=Zt().keyFromPrivate(Object(m.a)(this.privateKey));N(this,"publicKey","0x"+r.getPublic(!1,"hex")),N(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),N(this,"_isSigningKey",!0)}return Object(y.a)(e,[{key:"_addPoint",value:function(e){var t=Zt().keyFromPublic(Object(m.a)(this.publicKey)),r=Zt().keyFromPublic(Object(m.a)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=Zt().keyFromPrivate(Object(m.a)(this.privateKey)),r=Object(m.a)(e);32!==r.length&&Xt.throwArgumentError("bad digest length","digest",e);var n=t.sign(r,{canonical:!0});return Object(m.n)({recoveryParam:n.recoveryParam,r:Object(m.h)("0x"+n.r.toString(16),32),s:Object(m.h)("0x"+n.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=Zt().keyFromPrivate(Object(m.a)(this.privateKey)),r=Zt().keyFromPublic(Object(m.a)($t(e)));return Object(m.h)("0x"+t.derive(r.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function Qt(e,t){var r=Object(m.n)(t),n={r:Object(m.a)(r.r),s:Object(m.a)(r.s)};return"0x"+Zt().recoverPubKey(Object(m.a)(e),n,r.recoveryParam).encode("hex",!1)}function $t(e,t){var r=Object(m.a)(e);if(32===r.length){var n=new Yt(r);return t?"0x"+Zt().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}return 33===r.length?t?Object(m.i)(r):"0x"+Zt().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+Zt().keyFromPublic(r).getPublic(!0,"hex"):Object(m.i)(r):Xt.throwArgumentError("invalid public or private key","key","[REDACTED]")}var er=new S.b("transactions/5.3.0");function tr(e){return"0x"===e?null:be(e)}function rr(e){return"0x"===e?Ge:C.from(e)}var nr=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],ir={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0};function or(e){var t=$t(e);return be(Object(m.e)(ee(Object(m.e)(t,1)),12))}function ar(e,t){return or(Qt(Object(m.a)(e),t))}function sr(e,t){var r=Object(m.o)(C.from(e).toHexString());return r.length>32&&er.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function ur(e,t){return{address:be(e),storageKeys:(t||[]).map((function(t,r){return 32!==Object(m.d)(t)&&er.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function cr(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&er.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),ur(e[0],e[1])):ur(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return ur(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function fr(e,t){var r,n=[sr(e.chainId||0,"chainId"),sr(e.nonce||0,"nonce"),sr(e.gasPrice||0,"gasPrice"),sr(e.gasLimit||0,"gasLimit"),null!=e.to?be(e.to):"0x",sr(e.value||0,"value"),e.data||"0x",(r=e.accessList||[],cr(r).map((function(e){return[e.address,e.storageKeys]})))];if(t){var i=Object(m.n)(t);n.push(sr(i.recoveryParam,"recoveryParam")),n.push(Object(m.o)(i.r)),n.push(Object(m.o)(i.s))}return Object(m.c)(["0x01",oe(n)])}function lr(e,t){if(null==e.type)return null!=e.accessList&&er.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){U(e,ir);var r=[];nr.forEach((function(t){var n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=Object(m.a)(Object(m.i)(n,i)),t.length&&n.length!==t.length&&n.length>0&&er.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=Object(m.o)(n)).length>t.maxLength&&er.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push(Object(m.i)(n))}));var n=0;if(null!=e.chainId?"number"!==typeof(n=e.chainId)&&er.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!Object(m.k)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push(Object(m.i)(n)),r.push("0x"),r.push("0x")),!t)return oe(r);var i=Object(m.n)(t),o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&er.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&er.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push(Object(m.i)(o)),r.push(Object(m.o)(Object(m.a)(i.r))),r.push(Object(m.o)(Object(m.a)(i.s))),oe(r)}(e,t);switch(e.type){case 1:return fr(e,t)}return er.throwError("unsupported transaction type: ".concat(e.type),S.b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function hr(e){var t=Object(m.a)(e);if(t[0]>127)return function(e){var t=ue(e);9!==t.length&&6!==t.length&&er.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:rr(t[0]).toNumber(),gasPrice:rr(t[1]),gasLimit:rr(t[2]),to:tr(t[3]),value:rr(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=C.from(t[6]).toNumber()}catch(a){return console.log(a),r}if(r.r=Object(m.h)(t[7],32),r.s=Object(m.h)(t[8],32),C.from(r.r).isZero()&&C.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,i=t.slice(0,6);0!==r.chainId&&(i.push(Object(m.i)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);var o=ee(oe(i));try{r.from=ar(o,{r:Object(m.i)(r.r),s:Object(m.i)(r.s),recoveryParam:n})}catch(a){console.log(a)}r.hash=ee(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=ue(e.slice(1));8!==t.length&&11!==t.length&&er.throwArgumentError("invalid component count for transaction type: 1","payload",Object(m.i)(e));var r={type:1,chainId:rr(t[0]).toNumber(),nonce:rr(t[1]).toNumber(),gasPrice:rr(t[2]),gasLimit:rr(t[3]),to:tr(t[4]),value:rr(t[5]),data:t[6],accessList:cr(t[7])};if(8===t.length)return r;try{var n=rr(t[8]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");r.v=n}catch(o){er.throwArgumentError("invalid v for transaction type: 1","v",t[8])}r.r=Object(m.h)(t[9],32),r.s=Object(m.h)(t[10],32);try{var i=ee(fr(r));r.from=ar(i,{r:r.r,s:r.s,recoveryParam:r.v})}catch(o){console.log(o)}return r.hash=ee(e),r}(t)}return er.throwError("unsupported transaction type: ".concat(t[0]),S.b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}var dr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},pr=new S.b("contracts/5.3.0"),vr={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0};function yr(e,t){return dr(this,void 0,void 0,g.a.mark((function r(){var n,i;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return n=r.sent,r.prev=3,r.abrupt("return",be(n));case 7:r.prev=7,r.t0=r.catch(3);case 9:return e||pr.throwError("a provider or signer is needed to resolve ENS names",S.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),r.next=12,e.resolveName(n);case 12:return null==(i=r.sent)&&pr.throwArgumentError("resolver or addr is not configured for ENS name","name",n),r.abrupt("return",i);case 15:case"end":return r.stop()}}),r,null,[[3,7]])})))}function br(e,t,r){return dr(this,void 0,void 0,g.a.mark((function n(){return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Array.isArray(r)){n.next=4;break}return n.next=3,Promise.all(r.map((function(r,n){return br(e,Array.isArray(t)?t[n]:t[r.name],r)})));case 3:return n.abrupt("return",n.sent);case 4:if("address"!==r.type){n.next=8;break}return n.next=7,yr(e,t);case 7:return n.abrupt("return",n.sent);case 8:if("tuple"!==r.type){n.next=12;break}return n.next=11,br(e,t,r.components);case 11:return n.abrupt("return",n.sent);case 12:if("array"!==r.baseType){n.next=18;break}if(Array.isArray(t)){n.next=15;break}return n.abrupt("return",Promise.reject(new Error("invalid value for array")));case 15:return n.next=17,Promise.all(t.map((function(t){return br(e,t,r.arrayChildren)})));case 17:return n.abrupt("return",n.sent);case 18:return n.abrupt("return",t);case 19:case"end":return n.stop()}}),n)})))}function gr(e,t,r){return dr(this,void 0,void 0,g.a.mark((function n(){var i,o,a,s,u,c,f,l,h,d,p=this;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i={},r.length===t.inputs.length+1&&"object"===typeof r[r.length-1]&&(i=F(r.pop())),pr.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?i.from?i.from=j({override:yr(e.signer,i.from),signer:e.signer.getAddress()}).then((function(e){return dr(p,void 0,void 0,g.a.mark((function t(){return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return be(e.signer)!==e.override&&pr.throwError("Contract with a Signer cannot override from",S.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.abrupt("return",e.override);case 2:case"end":return t.stop()}}),t)})))})):i.from=e.signer.getAddress():i.from&&(i.from=yr(e.provider,i.from)),n.next=6,j({args:br(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:j(i)||{}});case 6:if(o=n.sent,a=e.interface.encodeFunctionData(t,o.args),s={data:a,to:o.address},null!=(u=o.overrides).nonce&&(s.nonce=C.from(u.nonce).toNumber()),null!=u.gasLimit&&(s.gasLimit=C.from(u.gasLimit)),null!=u.gasPrice&&(s.gasPrice=C.from(u.gasPrice)),null!=u.from&&(s.from=u.from),null!=u.type&&(s.type=u.type),null!=u.accessList&&(s.accessList=cr(u.accessList)),null==s.gasLimit&&null!=t.gas){for(c=21e3,f=Object(m.a)(a),l=0;l<f.length;l++)c+=4,f[l]&&(c+=64);s.gasLimit=C.from(t.gas).add(c)}return u.value&&((h=C.from(u.value)).isZero()||t.payable||pr.throwError("non-payable method cannot override value",S.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:i.value}),s.value=h),delete i.nonce,delete i.gasLimit,delete i.gasPrice,delete i.from,delete i.value,delete i.type,delete i.accessList,(d=Object.keys(i).filter((function(e){return null!=i[e]}))).length&&pr.throwError("cannot override ".concat(d.map((function(e){return JSON.stringify(e)})).join(",")),S.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),n.abrupt("return",s);case 28:case"end":return n.stop()}}),n)})))}function mr(e,t,r){var n=e.signer||e.provider;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dr(this,void 0,void 0,g.a.mark((function i(){var a,s,u,c,f;return g.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(a=void 0,o.length!==t.inputs.length+1||"object"!==typeof o[o.length-1]){i.next=9;break}if(null==(s=F(o.pop())).blockTag){i.next=7;break}return i.next=6,s.blockTag;case 6:a=i.sent;case 7:delete s.blockTag,o.push(s);case 9:if(null==e.deployTransaction){i.next=12;break}return i.next=12,e._deployed(a);case 12:return i.next=14,gr(e,t,o);case 14:return u=i.sent,i.next=17,n.call(u,a);case 17:return c=i.sent,i.prev=18,f=e.interface.decodeFunctionResult(t,c),r&&1===t.outputs.length&&(f=f[0]),i.abrupt("return",f);case 24:throw i.prev=24,i.t0=i.catch(18),i.t0.code===S.b.errors.CALL_EXCEPTION&&(i.t0.address=e.address,i.t0.args=o,i.t0.transaction=u),i.t0;case 28:case"end":return i.stop()}}),i,null,[[18,24]])})))}}function wr(e,t,r){return t.constant?mr(e,t,r):function(e,t){return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return dr(this,void 0,void 0,g.a.mark((function r(){var i,o,a;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.signer||pr.throwError("sending a transaction requires a signer",S.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null==e.deployTransaction){r.next=4;break}return r.next=4,e._deployed();case 4:return r.next=6,gr(e,t,n);case 6:return i=r.sent,r.next=9,e.signer.sendTransaction(i);case 9:return o=r.sent,a=o.wait.bind(o),o.wait=function(t){return a(t).then((function(t){return t.events=t.logs.map((function(r){var n=H(r),i=null;try{i=e.interface.parseLog(r)}catch(o){}return i&&(n.args=i.args,n.decode=function(t,r){return e.interface.decodeEventLog(i.eventFragment,t,r)},n.event=i.name,n.eventSignature=i.signature),n.removeListener=function(){return e.provider},n.getBlock=function(){return e.provider.getBlock(t.blockHash)},n.getTransaction=function(){return e.provider.getTransaction(t.transactionHash)},n.getTransactionReceipt=function(){return Promise.resolve(t)},n})),t}))},r.abrupt("return",o);case 13:case"end":return r.stop()}}),r)})))}}(e,t)}function kr(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((function(e){return Array.isArray(e)?e.join("|"):e})).join(":"):""):"*"}var Sr=function(){function e(t,r){Object(v.a)(this,e),N(this,"tag",t),N(this,"filter",r),this._listeners=[]}return Object(y.a)(e,[{key:"addListener",value:function(e,t){this._listeners.push({listener:e,once:t})}},{key:"removeListener",value:function(e){var t=!1;this._listeners=this._listeners.filter((function(r){return!(!t&&r.listener===e)||(t=!0,!1)}))}},{key:"removeAllListeners",value:function(){this._listeners=[]}},{key:"listeners",value:function(){return this._listeners.map((function(e){return e.listener}))}},{key:"listenerCount",value:function(){return this._listeners.length}},{key:"run",value:function(e){var t=this,r=this.listenerCount();return this._listeners=this._listeners.filter((function(r){var n=e.slice();return setTimeout((function(){r.listener.apply(t,n)}),0),!r.once})),r}},{key:"prepareEvent",value:function(e){}},{key:"getEmit",value:function(e){return[e]}}]),e}(),Er=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.call(this,"error",null)}return r}(Sr),_r=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n,i,o){var a;Object(v.a)(this,r);var s={address:e},u=n.getEventTopic(i);return o?(u!==o[0]&&pr.throwArgumentError("topic mismatch","topics",o),s.topics=o.slice()):s.topics=[u],a=t.call(this,kr(s),s),N(Object(f.a)(a),"address",e),N(Object(f.a)(a),"interface",n),N(Object(f.a)(a),"fragment",i),a}return Object(y.a)(r,[{key:"prepareEvent",value:function(e){var t=this;h(Object(l.a)(r.prototype),"prepareEvent",this).call(this,e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=function(e,r){return t.interface.decodeEventLog(t.fragment,e,r)};try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(n){e.args=null,e.decodeError=n}}},{key:"getEmit",value:function(e){var t=X(e.args);if(t.length)throw t[0].error;var r=(e.args||[]).slice();return r.push(e),r}}]),r}(Sr),Ar=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;return Object(v.a)(this,r),i=t.call(this,"*",{address:e}),N(Object(f.a)(i),"address",e),N(Object(f.a)(i),"interface",n),i}return Object(y.a)(r,[{key:"prepareEvent",value:function(e){var t=this;h(Object(l.a)(r.prototype),"prepareEvent",this).call(this,e);try{var n=this.interface.parseLog(e);e.event=n.name,e.eventSignature=n.signature,e.decode=function(e,r){return t.interface.decodeEventLog(n.eventFragment,e,r)},e.args=n.args}catch(i){}}}]),r}(Sr),xr=function(){function e(t,r,n){var i=this;Object(v.a)(this,e),pr.checkNew(this instanceof e?this.constructor:void 0,Tr),N(this,"interface",L(this instanceof e?this.constructor:void 0,"getInterface")(r)),null==n?(N(this,"provider",null),N(this,"signer",null)):Jt.isSigner(n)?(N(this,"provider",n.provider||null),N(this,"signer",n)):Ft.isProvider(n)?(N(this,"provider",n),N(this,"signer",null)):pr.throwArgumentError("invalid signer or provider","signerOrProvider",n),N(this,"callStatic",{}),N(this,"estimateGas",{}),N(this,"functions",{}),N(this,"populateTransaction",{}),N(this,"filters",{});var o={};if(Object.keys(this.interface.events).forEach((function(e){var t=i.interface.events[e];N(i.filters,e,(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return{address:i.address,topics:i.interface.encodeFilterTopics(t,r)}})),o[t.name]||(o[t.name]=[]),o[t.name].push(e)})),Object.keys(o).forEach((function(e){var t=o[e];1===t.length?N(i.filters,e,i.filters[t[0]]):pr.warn("Duplicate definition of ".concat(e," (").concat(t.join(", "),")"))})),N(this,"_runningEvents",{}),N(this,"_wrappedEmits",{}),null==t&&pr.throwArgumentError("invalid contract address or ENS name","addressOrName",t),N(this,"address",t),this.provider)N(this,"resolvedAddress",yr(this.provider,t));else try{N(this,"resolvedAddress",Promise.resolve(be(t)))}catch(u){pr.throwError("provider is required to use ENS name as contract address",S.b.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}var a={},s={};Object.keys(this.interface.functions).forEach((function(e){var t=i.interface.functions[e];if(s[e])pr.warn("Duplicate ABI entry for ".concat(JSON.stringify(e)));else{s[e]=!0;var r=t.name;a[r]||(a[r]=[]),a[r].push(e),null==i[e]&&N(i,e,wr(i,t,!0)),null==i.functions[e]&&N(i.functions,e,wr(i,t,!1)),null==i.callStatic[e]&&N(i.callStatic,e,mr(i,t,!0)),null==i.populateTransaction[e]&&N(i.populateTransaction,e,function(e,t){return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return gr(e,t,n)}}(i,t)),null==i.estimateGas[e]&&N(i.estimateGas,e,function(e,t){var r=e.signer||e.provider;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return dr(this,void 0,void 0,g.a.mark((function n(){var o;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r||pr.throwError("estimate require a provider or signer",S.b.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"}),n.next=3,gr(e,t,i);case 3:return o=n.sent,n.next=6,r.estimateGas(o);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n)})))}}(i,t))}})),Object.keys(a).forEach((function(e){var t=a[e];if(!(t.length>1)){var r=t[0];try{null==i[e]&&N(i,e,i[r])}catch(n){}null==i.functions[e]&&N(i.functions,e,i.functions[r]),null==i.callStatic[e]&&N(i.callStatic,e,i.callStatic[r]),null==i.populateTransaction[e]&&N(i.populateTransaction,e,i.populateTransaction[r]),null==i.estimateGas[e]&&N(i.estimateGas,e,i.estimateGas[r])}}))}return Object(y.a)(e,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(e){var t=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return t})):this._deployedPromise=this.provider.getCode(this.address,e).then((function(e){return"0x"===e&&pr.throwError("contract not deployed",S.b.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||pr.throwError("sending a transactions require a signer",S.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=F(e||{});return["from","to"].forEach((function(e){null!=r[e]&&pr.throwError("cannot override "+e,S.b.errors.UNSUPPORTED_OPERATION,{operation:e})})),r.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(r)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new qt(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&N(t,"deployTransaction",this.deployTransaction),t}},{key:"attach",value:function(e){return new this.constructor(e,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}},{key:"_getRunningEvent",value:function(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new Er);if("event"===e)return this._normalizeRunningEvent(new Sr("event",null));if("*"===e)return this._normalizeRunningEvent(new Ar(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new _r(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var r=e.topics[0];if("string"!==typeof r)throw new Error("invalid topic");var n=this.interface.getEvent(r);return this._normalizeRunningEvent(new _r(this.address,this.interface,n,e.topics))}catch(o){}var i={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Sr(kr(i),i))}return this._normalizeRunningEvent(new Ar(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];var t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}},{key:"_wrapEvent",value:function(e,t,r){var n=this,i=H(t);return i.removeListener=function(){r&&(e.removeListener(r),n._checkRunningEvents(e))},i.getBlock=function(){return n.provider.getBlock(t.blockHash)},i.getTransaction=function(){return n.provider.getTransaction(t.transactionHash)},i.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(i),i}},{key:"_addEventListener",value:function(e,t,r){var n=this;if(this.provider||pr.throwError("events require a provider or a signer with a provider",S.b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var i=function(r){var i=n._wrapEvent(e,r,t);if(null==i.decodeError)try{var o=e.getEmit(i);n.emit.apply(n,[e.filter].concat(Object(c.a)(o)))}catch(a){i.decodeError=a.error}null!=e.filter&&n.emit("event",i),null!=i.decodeError&&n.emit("error",i.decodeError,i)};this._wrappedEmits[e.tag]=i,null!=e.filter&&this.provider.on(e.filter,i)}}},{key:"queryFilter",value:function(e,t,r){var n=this,i=this._getRunningEvent(e),o=F(i.filter);return"string"===typeof t&&Object(m.l)(t,32)?(null!=r&&pr.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),o.blockHash=t):(o.fromBlock=null!=t?t:0,o.toBlock=null!=r?r:"latest"),this.provider.getLogs(o).then((function(e){return e.map((function(e){return n._wrapEvent(i,e,null)}))}))}},{key:"on",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}},{key:"once",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}},{key:"emit",value:function(e){if(!this.provider)return!1;for(var t=this._getRunningEvent(e),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=t.run(n)>0;return this._checkRunningEvents(t),o}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,r){return e+t._runningEvents[r].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){var t=this;if(!this.provider)return[];if(null==e){var r=function(){var e=[];for(var r in t._runningEvents)t._runningEvents[r].listeners().forEach((function(t){e.push(t)}));return{v:e}}();if("object"===typeof r)return r.v}return this._getRunningEvent(e).listeners()}},{key:"removeAllListeners",value:function(e){if(!this.provider)return this;if(null==e){for(var t in this._runningEvents){var r=this._runningEvents[t];r.removeAllListeners(),this._checkRunningEvents(r)}return this}var n=this._getRunningEvent(e);return n.removeAllListeners(),this._checkRunningEvents(n),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return we(e)}},{key:"getInterface",value:function(e){return Lt.isInterface(e)?e:new Lt(e)}},{key:"isIndexed",value:function(e){return Bt.isIndexed(e)}}]),e}(),Tr=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return r}(xr),Mr=function(){function e(t,r,n){Object(v.a)(this,e);var i=null;"0x"!==(i="string"===typeof r?r:Object(m.j)(r)?Object(m.i)(r):r&&"string"===typeof r.object?r.object:"!").substring(0,2)&&(i="0x"+i),(!Object(m.l)(i)||i.length%2)&&pr.throwArgumentError("invalid bytecode","bytecode",r),n&&!Jt.isSigner(n)&&pr.throwArgumentError("invalid signer","signer",n),N(this,"bytecode",i),N(this,"interface",L(this instanceof e?this.constructor:void 0,"getInterface")(t)),N(this,"signer",n||null)}return Object(y.a)(e,[{key:"getDeployTransaction",value:function(){for(var e={},t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===this.interface.deploy.inputs.length+1&&"object"===typeof r[r.length-1])for(var i in e=F(r.pop()))if(!vr[i])throw new Error("unknown transaction override "+i);return["data","from","to"].forEach((function(t){null!=e[t]&&pr.throwError("cannot override "+t,S.b.errors.UNSUPPORTED_OPERATION,{operation:t})})),pr.checkArgumentCount(r.length,this.interface.deploy.inputs.length," in Contract constructor"),e.data=Object(m.i)(Object(m.b)([this.bytecode,this.interface.encodeDeploy(r)])),e}},{key:"deploy",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return dr(this,void 0,void 0,g.a.mark((function e(){var r,n,i,o,a,s;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t.length===this.interface.deploy.inputs.length+1&&(r=t.pop()),pr.checkArgumentCount(t.length,this.interface.deploy.inputs.length," in Contract constructor"),e.next=5,br(this.signer,t,this.interface.deploy.inputs);case 5:return(n=e.sent).push(r),i=this.getDeployTransaction.apply(this,Object(c.a)(n)),e.next=10,this.signer.sendTransaction(i);case 10:return o=e.sent,a=L(this.constructor,"getContractAddress")(o),N(s=L(this.constructor,"getContract")(a,this.interface,this.signer),"deployTransaction",o),e.abrupt("return",s);case 15:case"end":return e.stop()}}),e,this)})))}},{key:"attach",value:function(e){return this.constructor.getContract(e,this.interface,this.signer)}},{key:"connect",value:function(e){return new this.constructor(this.interface,this.bytecode,e)}}],[{key:"fromSolidity",value:function(e,t){null==e&&pr.throwError("missing compiler output",S.b.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"===typeof e&&(e=JSON.parse(e));var r=e.abi,n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}},{key:"getInterface",value:function(e){return Tr.getInterface(e)}},{key:"getContractAddress",value:function(e){return we(e)}},{key:"getContract",value:function(e,t,r){return new Tr(e,t,r)}}]),e}(),Cr=new S.b(E),Or={},Ir=C.from(0),Pr=C.from(-1);function Rr(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),Cr.throwError(e,S.b.errors.NUMERIC_FAULT,i)}for(var Br="0";Br.length<256;)Br+=Br;function Dr(e){if("number"!==typeof e)try{e=C.from(e).toNumber()}catch(t){}return"number"===typeof e&&e>=0&&e<=256&&!(e%1)?"1"+Br.substring(0,e):Cr.throwArgumentError("invalid decimal size","decimals",e)}function Nr(e,t){null==t&&(t=0);var r=Dr(t),n=(e=C.from(e)).lt(Ir);n&&(e=e.mul(Pr));for(var i=e.mod(r).toString();i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];var o=e.div(r).toString();return e=1===r.length?o:o+"."+i,n&&(e="-"+e),e}function Lr(e,t){null==t&&(t=0);var r=Dr(t);"string"===typeof e&&e.match(/^-?[0-9.,]+$/)||Cr.throwArgumentError("invalid decimal value","value",e);var n="-"===e.substring(0,1);n&&(e=e.substring(1)),"."===e&&Cr.throwArgumentError("missing value","value",e);var i=e.split(".");i.length>2&&Cr.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0"),a.replace(/^([0-9]*?)(0*)$/,(function(e,t,r){return t})).length>r.length-1&&Rr("fractional component exceeds decimals","underflow","parseFixed");a.length<r.length-1;)a+="0";var s=C.from(o),u=C.from(a),c=s.mul(r).add(u);return n&&(c=c.mul(Pr)),c}var jr=function(){function e(t,r,n,i){Object(v.a)(this,e),t!==Or&&Cr.throwError("cannot use FixedFormat constructor; use FixedFormat.from",S.b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=r,this.width=n,this.decimals=i,this.name=(r?"":"u")+"fixed"+String(n)+"x"+String(i),this._multiplier=Dr(i),Object.freeze(this)}return Object(y.a)(e,null,[{key:"from",value:function(t){if(t instanceof e)return t;"number"===typeof t&&(t="fixed128x".concat(t));var r=!0,n=128,i=18;if("string"===typeof t)if("fixed"===t);else if("ufixed"===t)r=!1;else{var o=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);o||Cr.throwArgumentError("invalid fixed format","format",t),r="u"!==o[1],n=parseInt(o[2]),i=parseInt(o[3])}else if(t){var a=function(e,r,n){return null==t[e]?n:(typeof t[e]!==r&&Cr.throwArgumentError("invalid fixed format ("+e+" not "+r+")","format."+e,t[e]),t[e])};r=a("signed","boolean",r),n=a("width","number",n),i=a("decimals","number",i)}return n%8&&Cr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Cr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new e(Or,r,n,i)}}]),e}(),Ur=function(){function e(t,r,n,i){Object(v.a)(this,e),Cr.checkNew(this instanceof e?this.constructor:void 0,e),t!==Or&&Cr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",S.b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return Object(y.a)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&Cr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=Lr(this._value,this.format.decimals),n=Lr(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=Lr(this._value,this.format.decimals),n=Lr(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=Lr(this._value,this.format.decimals),n=Lr(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=Lr(this._value,this.format.decimals),n=Lr(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Fr)),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Fr)),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&Cr.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+Br.substring(0,t),this.format),i=Kr.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&Cr.throwArgumentError("invalid byte width","width",e);var t=C.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Object(m.h)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||function(e){return null!=e&&(C.isBigNumber(e)||"number"===typeof e&&e%1===0||"string"===typeof e&&!!e.match(/^-?[0-9]+$/)||Object(m.l)(e)||"bigint"===typeof e||Object(m.j)(e))}(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(Nr(t,r),jr.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=jr.from(r),i=Lr(t,n.decimals);!n.signed&&i.lt(Ir)&&Rr("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=Object(m.h)(o,n.width/8));var a=Nr(i,n.decimals);return new e(Or,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=jr.from(r);if(Object(m.a)(t).length>n.width/8)throw new Error("overflow");var i=C.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=Nr(i,n.decimals);return new e(Or,o,a,n)}},{key:"from",value:function(t,r){if("string"===typeof t)return e.fromString(t,r);if(Object(m.j)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(n){if(n.code!==S.b.errors.INVALID_ARGUMENT)throw n}return Cr.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}(),Fr=Ur.from(1),Kr=Ur.from("0.5");function zr(e){return"string"===typeof e&&(e=Me(e)),ee(Object(m.b)([Me("\x19Ethereum Signed Message:\n"),Me(String(e.length)),e]))}var Vr="hash/5.3.0",Hr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Jr=new S.b(Vr),qr=new Uint8Array(32);qr.fill(0);var Gr=C.from(-1),Xr=C.from(0),Wr=C.from(1),Zr=C.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Yr=Object(m.h)(Wr.toHexString(),32),Qr=Object(m.h)(Xr.toHexString(),32),$r={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},en=["name","version","chainId","verifyingContract","salt"];function tn(e){return function(t){return"string"!==typeof t&&Jr.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var rn={name:tn("name"),version:tn("version"),chainId:function(e){try{return C.from(e).toString()}catch(t){}return Jr.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return be(e).toLowerCase()}catch(t){}return Jr.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=Object(m.a)(e);if(32!==t.length)throw new Error("bad length");return Object(m.i)(t)}catch(r){}return Jr.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function nn(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var r=""===t[1],n=parseInt(t[2]||"256");(n%8!==0||n>256||t[2]&&t[2]!==String(n))&&Jr.throwArgumentError("invalid numeric width","type",e);var i=Zr.mask(r?n-1:n),o=r?i.add(Wr).mul(Gr):Xr;return function(t){var r=C.from(t);return(r.lt(o)||r.gt(i))&&Jr.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),Object(m.h)(r.toTwos(256).toHexString(),32)}}var a=e.match(/^bytes(\d+)$/);if(a){var s=parseInt(a[1]);return(0===s||s>32||a[1]!==String(s))&&Jr.throwArgumentError("invalid bytes width","type",e),function(t){return Object(m.a)(t).length!==s&&Jr.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=Object(m.a)(e),r=t.length%32;return r?Object(m.c)([t,qr.slice(r)]):Object(m.i)(t)}(t)}}switch(e){case"address":return function(e){return Object(m.h)(be(e),32)};case"bool":return function(e){return e?Yr:Qr};case"bytes":return function(e){return ee(e)};case"string":return function(e){return Be(e)}}return null}function on(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var an,sn=function(){function e(t){Object(v.a)(this,e),N(this,"types",Object.freeze(H(t))),N(this,"_encoderCache",{}),N(this,"_types",{});var r={},n={},i={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],i[e]={}}));var o=function(e){var i={};t[e].forEach((function(o){i[o.name]&&Jr.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&Jr.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),nn(a)||(n[a]||Jr.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),n[a].push(e),r[e][a]=!0)}))};for(var a in t)o(a);var s=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var u in 0===s.length?Jr.throwArgumentError("missing primary type","types",t):s.length>1&&Jr.throwArgumentError("ambiguous primary types or unused types: ".concat(s.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),N(this,"primaryType",s[0]),function e(o,a){a[o]&&Jr.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(r[o]).forEach((function(t){n[t]&&(e(t,a),Object.keys(a).forEach((function(e){i[e][t]=!0})))})),delete a[o]}(this.primaryType,{}),i){var c=Object.keys(i[u]);c.sort(),this._types[u]=on(u,t[u])+c.map((function(e){return on(e,t[e])})).join("")}}return Object(y.a)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=nn(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(e){a>=0&&e.length!==a&&Jr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(o);return t._types[i]&&(r=r.map(ee)),ee(Object(m.c)(r))}}var s=this.types[e];if(s){var u=Be(this._types[e]);return function(e){var r=s.map((function(r){var n=r.name,i=r.type,o=t.getEncoder(i)(e[n]);return t._types[i]?ee(o):o}));return r.unshift(u),Object(m.c)(r)}}return Jr.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||Jr.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return ee(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(nn(e))return r(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&Jr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):Jr.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var i=$r[n];i||Jr.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:i})}return r.sort((function(e,t){return en.indexOf(e.name)-en.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return Object(m.c)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return ee(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,i){return Hr(this,void 0,void 0,g.a.mark((function o(){var a,s,u;return g.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=F(t),a={},t.verifyingContract&&!Object(m.l)(t.verifyingContract,20)&&(a[t.verifyingContract]="0x"),(s=e.from(r)).visit(n,(function(e,t){return"address"!==e||Object(m.l)(t,20)||(a[t]="0x"),t})),o.t0=g.a.keys(a);case 6:if((o.t1=o.t0()).done){o.next=13;break}return u=o.t1.value,o.next=10,i(u);case 10:a[u]=o.sent,o.next=6;break;case 13:return t.verifyingContract&&a[t.verifyingContract]&&(t.verifyingContract=a[t.verifyingContract]),n=s.visit(n,(function(e,t){return"address"===e&&a[t]?a[t]:t})),o.abrupt("return",{domain:t,value:n});case 16:case"end":return o.stop()}}),o)})))}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];en.forEach((function(e){var r=t[e];null!=r&&(i[e]=rn[e](r),o.push({name:e,type:$r[e]}))}));var a=e.from(r),s=F(r);return s.EIP712Domain?Jr.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=o,a.encode(n),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return Object(m.i)(Object(m.a)(t));if(e.match(/^u?int/))return C.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&Jr.throwArgumentError("invalid string","value",t),t}return Jr.throwArgumentError("unsupported type","type",e)}))}}}]),e}(),un=function(){function e(t){Object(v.a)(this,e),N(this,"alphabet",t),N(this,"base",t.length),N(this,"_alphabetMap",{}),N(this,"_leader",t.charAt(0));for(var r=0;r<t.length;r++)this._alphabetMap[t.charAt(r)]=r}return Object(y.a)(e,[{key:"encode",value:function(e){var t=Object(m.a)(e);if(0===t.length)return"";for(var r=[0],n=0;n<t.length;++n){for(var i=t[n],o=0;o<r.length;++o)i+=r[o]<<8,r[o]=i%this.base,i=i/this.base|0;for(;i>0;)r.push(i%this.base),i=i/this.base|0}for(var a="",s=0;0===t[s]&&s<t.length-1;++s)a+=this._leader;for(var u=r.length-1;u>=0;--u)a+=this.alphabet[r[u]];return a}},{key:"decode",value:function(e){if("string"!==typeof e)throw new TypeError("Expected String");var t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(var r=0;r<e.length;r++){var n=this._alphabetMap[e[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");for(var i=n,o=0;o<t.length;++o)i+=t[o]*this.base,t[o]=255&i,i>>=8;for(;i>0;)t.push(255&i),i>>=8}for(var a=0;e[a]===this._leader&&a<e.length-1;++a)t.push(0);return Object(m.a)(new Uint8Array(t.reverse()))}}]),e}(),cn=(new un("abcdefghijklmnopqrstuvwxyz234567"),new un("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),fn=r(52),ln=r.n(fn);!function(e){e.sha256="sha256",e.sha512="sha512"}(an||(an={}));var hn=new S.b("sha2/5.3.0");function dn(e){return"0x"+ln.a.ripemd160().update(Object(m.a)(e)).digest("hex")}function pn(e){return"0x"+ln.a.sha256().update(Object(m.a)(e)).digest("hex")}function vn(e){return"0x"+ln.a.sha512().update(Object(m.a)(e)).digest("hex")}function yn(e,t,r){return an[e]||hn.throwError("unsupported algorithm "+e,S.b.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+ln.a.hmac(ln.a[e],Object(m.a)(t)).update(Object(m.a)(r)).digest("hex")}function bn(e,t,r,n,i){var o;e=Object(m.a)(e),t=Object(m.a)(t);var a,s,u=1,c=new Uint8Array(n),f=new Uint8Array(t.length+4);f.set(t);for(var l=1;l<=u;l++){f[t.length]=l>>24&255,f[t.length+1]=l>>16&255,f[t.length+2]=l>>8&255,f[t.length+3]=255&l;var h=Object(m.a)(yn(i,e,f));o||(o=h.length,s=new Uint8Array(o),a=n-((u=Math.ceil(n/o))-1)*o),s.set(h);for(var d=1;d<r;d++){h=Object(m.a)(yn(i,e,h));for(var p=0;p<o;p++)s[p]^=h[p]}var v=(l-1)*o,y=l===u?a:o;c.set(Object(m.a)(s).slice(0,y),v)}return Object(m.i)(c)}var gn=new S.b("wordlists/5.3.0"),mn=function(){function e(t){Object(v.a)(this,e),gn.checkAbstract(this instanceof e?this.constructor:void 0,e),N(this,"locale",t)}return Object(y.a)(e,[{key:"split",value:function(e){return e.toLowerCase().split(/ +/g)}},{key:"join",value:function(e){return e.join(" ")}}],[{key:"check",value:function(e){for(var t=[],r=0;r<2048;r++){var n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return Be(t.join("\n")+"\n")}},{key:"register",value:function(e,t){t||(t=e.locale)}}]),e}(),wn=null;function kn(e){if(null==wn&&(wn="AbdikaceAbecedaAdresaAgreseAkceAktovkaAlejAlkoholAmputaceAnanasAndulkaAnekdotaAnketaAntikaAnulovatArchaAroganceAsfaltAsistentAspiraceAstmaAstronomAtlasAtletikaAtolAutobusAzylBabkaBachorBacilBaculkaBadatelBagetaBagrBahnoBakterieBaladaBaletkaBalkonBalonekBalvanBalzaBambusBankomatBarbarBaretBarmanBarokoBarvaBaterkaBatohBavlnaBazalkaBazilikaBazukaBednaBeranBesedaBestieBetonBezinkaBezmocBeztakBicyklBidloBiftekBikinyBilanceBiografBiologBitvaBizonBlahobytBlatouchBlechaBleduleBleskBlikatBliznaBlokovatBlouditBludBobekBobrBodlinaBodnoutBohatostBojkotBojovatBokorysBolestBorecBoroviceBotaBoubelBouchatBoudaBouleBouratBoxerBradavkaBramboraBrankaBratrBreptaBriketaBrkoBrlohBronzBroskevBrunetkaBrusinkaBrzdaBrzyBublinaBubnovatBuchtaBuditelBudkaBudovaBufetBujarostBukviceBuldokBulvaBundaBunkrBurzaButikBuvolBuzolaBydletBylinaBytovkaBzukotCapartCarevnaCedrCeduleCejchCejnCelaCelerCelkemCelniceCeninaCennostCenovkaCentrumCenzorCestopisCetkaChalupaChapadloCharitaChataChechtatChemieChichotChirurgChladChlebaChlubitChmelChmuraChobotChocholChodbaCholeraChomoutChopitChorobaChovChrapotChrlitChrtChrupChtivostChudinaChutnatChvatChvilkaChvostChybaChystatChytitCibuleCigaretaCihelnaCihlaCinkotCirkusCisternaCitaceCitrusCizinecCizostClonaCokolivCouvatCtitelCtnostCudnostCuketaCukrCupotCvaknoutCvalCvikCvrkotCyklistaDalekoDarebaDatelDatumDceraDebataDechovkaDecibelDeficitDeflaceDeklDekretDemokratDepreseDerbyDeskaDetektivDikobrazDiktovatDiodaDiplomDiskDisplejDivadloDivochDlahaDlouhoDluhopisDnesDobroDobytekDocentDochutitDodnesDohledDohodaDohraDojemDojniceDokladDokolaDoktorDokumentDolarDolevaDolinaDomaDominantDomluvitDomovDonutitDopadDopisDoplnitDoposudDoprovodDopustitDorazitDorostDortDosahDoslovDostatekDosudDosytaDotazDotekDotknoutDoufatDoutnatDovozceDozaduDoznatDozorceDrahotaDrakDramatikDravecDrazeDrdolDrobnostDrogerieDrozdDrsnostDrtitDrzostDubenDuchovnoDudekDuhaDuhovkaDusitDusnoDutostDvojiceDvorecDynamitEkologEkonomieElektronElipsaEmailEmiseEmoceEmpatieEpizodaEpochaEpopejEposEsejEsenceEskortaEskymoEtiketaEuforieEvoluceExekuceExkurzeExpediceExplozeExportExtraktFackaFajfkaFakultaFanatikFantazieFarmacieFavoritFazoleFederaceFejetonFenkaFialkaFigurantFilozofFiltrFinanceFintaFixaceFjordFlanelFlirtFlotilaFondFosforFotbalFotkaFotonFrakceFreskaFrontaFukarFunkceFyzikaGalejeGarantGenetikaGeologGilotinaGlazuraGlejtGolemGolfistaGotikaGrafGramofonGranuleGrepGrilGrogGroteskaGumaHadiceHadrHalaHalenkaHanbaHanopisHarfaHarpunaHavranHebkostHejkalHejnoHejtmanHektarHelmaHematomHerecHernaHesloHezkyHistorikHladovkaHlasivkyHlavaHledatHlenHlodavecHlohHloupostHltatHlubinaHluchotaHmatHmotaHmyzHnisHnojivoHnoutHoblinaHobojHochHodinyHodlatHodnotaHodovatHojnostHokejHolinkaHolkaHolubHomoleHonitbaHonoraceHoralHordaHorizontHorkoHorlivecHormonHorninaHoroskopHorstvoHospodaHostinaHotovostHoubaHoufHoupatHouskaHovorHradbaHraniceHravostHrazdaHrbolekHrdinaHrdloHrdostHrnekHrobkaHromadaHrotHroudaHrozenHrstkaHrubostHryzatHubenostHubnoutHudbaHukotHumrHusitaHustotaHvozdHybnostHydrantHygienaHymnaHysterikIdylkaIhnedIkonaIluzeImunitaInfekceInflaceInkasoInovaceInspekceInternetInvalidaInvestorInzerceIronieJablkoJachtaJahodaJakmileJakostJalovecJantarJarmarkJaroJasanJasnoJatkaJavorJazykJedinecJedleJednatelJehlanJekotJelenJelitoJemnostJenomJepiceJeseterJevitJezdecJezeroJinakJindyJinochJiskraJistotaJitrniceJizvaJmenovatJogurtJurtaKabaretKabelKabinetKachnaKadetKadidloKahanKajakKajutaKakaoKaktusKalamitaKalhotyKalibrKalnostKameraKamkolivKamnaKanibalKanoeKantorKapalinaKapelaKapitolaKapkaKapleKapotaKaprKapustaKapybaraKaramelKarotkaKartonKasaKatalogKatedraKauceKauzaKavalecKazajkaKazetaKazivostKdekolivKdesiKedlubenKempKeramikaKinoKlacekKladivoKlamKlapotKlasikaKlaunKlecKlenbaKlepatKlesnoutKlidKlimaKlisnaKloboukKlokanKlopaKloubKlubovnaKlusatKluzkostKmenKmitatKmotrKnihaKnotKoaliceKoberecKobkaKoblihaKobylaKocourKohoutKojenecKokosKoktejlKolapsKoledaKolizeKoloKomandoKometaKomikKomnataKomoraKompasKomunitaKonatKonceptKondiceKonecKonfeseKongresKoninaKonkursKontaktKonzervaKopanecKopieKopnoutKoprovkaKorbelKorektorKormidloKoroptevKorpusKorunaKorytoKorzetKosatecKostkaKotelKotletaKotoulKoukatKoupelnaKousekKouzloKovbojKozaKozorohKrabiceKrachKrajinaKralovatKrasopisKravataKreditKrejcarKresbaKrevetaKriketKritikKrizeKrkavecKrmelecKrmivoKrocanKrokKronikaKropitKroupaKrovkaKrtekKruhadloKrupiceKrutostKrvinkaKrychleKryptaKrystalKrytKudlankaKufrKujnostKuklaKulajdaKulichKulkaKulometKulturaKunaKupodivuKurtKurzorKutilKvalitaKvasinkaKvestorKynologKyselinaKytaraKyticeKytkaKytovecKyvadloLabradorLachtanLadnostLaikLakomecLamelaLampaLanovkaLasiceLasoLasturaLatinkaLavinaLebkaLeckdyLedenLedniceLedovkaLedvinaLegendaLegieLegraceLehceLehkostLehnoutLektvarLenochodLentilkaLepenkaLepidloLetadloLetecLetmoLetokruhLevhartLevitaceLevobokLibraLichotkaLidojedLidskostLihovinaLijavecLilekLimetkaLinieLinkaLinoleumListopadLitinaLitovatLobistaLodivodLogikaLogopedLokalitaLoketLomcovatLopataLopuchLordLososLotrLoudalLouhLoukaLouskatLovecLstivostLucernaLuciferLumpLuskLustraceLviceLyraLyrikaLysinaMadamMadloMagistrMahagonMajetekMajitelMajoritaMakakMakoviceMakrelaMalbaMalinaMalovatMalviceMaminkaMandleMankoMarnostMasakrMaskotMasopustMaticeMatrikaMaturitaMazanecMazivoMazlitMazurkaMdlobaMechanikMeditaceMedovinaMelasaMelounMentolkaMetlaMetodaMetrMezeraMigraceMihnoutMihuleMikinaMikrofonMilenecMilimetrMilostMimikaMincovnaMinibarMinometMinulostMiskaMistrMixovatMladostMlhaMlhovinaMlokMlsatMluvitMnichMnohemMobilMocnostModelkaModlitbaMohylaMokroMolekulaMomentkaMonarchaMonoklMonstrumMontovatMonzunMosazMoskytMostMotivaceMotorkaMotykaMouchaMoudrostMozaikaMozekMozolMramorMravenecMrkevMrtvolaMrzetMrzutostMstitelMudrcMuflonMulatMumieMuniceMusetMutaceMuzeumMuzikantMyslivecMzdaNabouratNachytatNadaceNadbytekNadhozNadobroNadpisNahlasNahnatNahodileNahraditNaivitaNajednouNajistoNajmoutNaklonitNakonecNakrmitNalevoNamazatNamluvitNanometrNaokoNaopakNaostroNapadatNapevnoNaplnitNapnoutNaposledNaprostoNaroditNarubyNarychloNasaditNasekatNaslepoNastatNatolikNavenekNavrchNavzdoryNazvatNebeNechatNeckyNedalekoNedbatNeduhNegaceNehetNehodaNejenNejprveNeklidNelibostNemilostNemocNeochotaNeonkaNepokojNerostNervNesmyslNesouladNetvorNeuronNevinaNezvykleNicotaNijakNikamNikdyNiklNikterakNitroNoclehNohaviceNominaceNoraNorekNositelNosnostNouzeNovinyNovotaNozdraNudaNudleNugetNutitNutnostNutrieNymfaObalObarvitObavaObdivObecObehnatObejmoutObezitaObhajobaObilniceObjasnitObjektObklopitOblastOblekOblibaOblohaObludaObnosObohatitObojekOboutObrazecObrnaObrubaObrysObsahObsluhaObstaratObuvObvazObvinitObvodObvykleObyvatelObzorOcasOcelOcenitOchladitOchotaOchranaOcitnoutOdbojOdbytOdchodOdcizitOdebratOdeslatOdevzdatOdezvaOdhadceOdhoditOdjetOdjinudOdkazOdkoupitOdlivOdlukaOdmlkaOdolnostOdpadOdpisOdploutOdporOdpustitOdpykatOdrazkaOdsouditOdstupOdsunOdtokOdtudOdvahaOdvetaOdvolatOdvracetOdznakOfinaOfsajdOhlasOhniskoOhradaOhrozitOhryzekOkapOkeniceOklikaOknoOkouzlitOkovyOkrasaOkresOkrsekOkruhOkupantOkurkaOkusitOlejninaOlizovatOmakOmeletaOmezitOmladinaOmlouvatOmluvaOmylOnehdyOpakovatOpasekOperaceOpiceOpilostOpisovatOporaOpoziceOpravduOprotiOrbitalOrchestrOrgieOrliceOrlojOrtelOsadaOschnoutOsikaOsivoOslavaOslepitOslnitOslovitOsnovaOsobaOsolitOspalecOstenOstrahaOstudaOstychOsvojitOteplitOtiskOtopOtrhatOtrlostOtrokOtrubyOtvorOvanoutOvarOvesOvlivnitOvoceOxidOzdobaPachatelPacientPadouchPahorekPaktPalandaPalecPalivoPalubaPamfletPamlsekPanenkaPanikaPannaPanovatPanstvoPantoflePaprikaParketaParodiePartaParukaParybaPasekaPasivitaPastelkaPatentPatronaPavoukPaznehtPazourekPeckaPedagogPejsekPekloPelotonPenaltaPendrekPenzePeriskopPeroPestrostPetardaPeticePetrolejPevninaPexesoPianistaPihaPijavicePiklePiknikPilinaPilnostPilulkaPinzetaPipetaPisatelPistolePitevnaPivnicePivovarPlacentaPlakatPlamenPlanetaPlastikaPlatitPlavidloPlazPlechPlemenoPlentaPlesPletivoPlevelPlivatPlnitPlnoPlochaPlodinaPlombaPloutPlukPlynPobavitPobytPochodPocitPoctivecPodatPodcenitPodepsatPodhledPodivitPodkladPodmanitPodnikPodobaPodporaPodrazPodstataPodvodPodzimPoeziePohankaPohnutkaPohovorPohromaPohybPointaPojistkaPojmoutPokazitPoklesPokojPokrokPokutaPokynPolednePolibekPolknoutPolohaPolynomPomaluPominoutPomlkaPomocPomstaPomysletPonechatPonorkaPonurostPopadatPopelPopisekPoplachPoprositPopsatPopudPoradcePorcePorodPoruchaPoryvPosaditPosedPosilaPoskokPoslanecPosouditPospoluPostavaPosudekPosypPotahPotkanPotleskPotomekPotravaPotupaPotvoraPoukazPoutoPouzdroPovahaPovidlaPovlakPovozPovrchPovstatPovykPovzdechPozdravPozemekPoznatekPozorPozvatPracovatPrahoryPraktikaPralesPraotecPraporekPrasePravdaPrincipPrknoProbuditProcentoProdejProfeseProhraProjektProlomitPromilePronikatPropadProrokProsbaProtonProutekProvazPrskavkaPrstenPrudkostPrutPrvekPrvohoryPsanecPsovodPstruhPtactvoPubertaPuchPudlPukavecPuklinaPukrlePultPumpaPuncPupenPusaPusinkaPustinaPutovatPutykaPyramidaPyskPytelRacekRachotRadiaceRadniceRadonRaftRagbyRaketaRakovinaRamenoRampouchRandeRarachRaritaRasovnaRastrRatolestRazanceRazidloReagovatReakceReceptRedaktorReferentReflexRejnokReklamaRekordRekrutRektorReputaceRevizeRevmaRevolverRezervaRiskovatRizikoRobotikaRodokmenRohovkaRokleRokokoRomanetoRopovodRopuchaRorejsRosolRostlinaRotmistrRotopedRotundaRoubenkaRouchoRoupRouraRovinaRovniceRozborRozchodRozdatRozeznatRozhodceRozinkaRozjezdRozkazRozlohaRozmarRozpadRozruchRozsahRoztokRozumRozvodRubrikaRuchadloRukaviceRukopisRybaRybolovRychlostRydloRypadloRytinaRyzostSadistaSahatSakoSamecSamizdatSamotaSanitkaSardinkaSasankaSatelitSazbaSazeniceSborSchovatSebrankaSeceseSedadloSedimentSedloSehnatSejmoutSekeraSektaSekundaSekvojeSemenoSenoServisSesaditSeshoraSeskokSeslatSestraSesuvSesypatSetbaSetinaSetkatSetnoutSetrvatSeverSeznamShodaShrnoutSifonSilniceSirkaSirotekSirupSituaceSkafandrSkaliskoSkanzenSkautSkeptikSkicaSkladbaSkleniceSkloSkluzSkobaSkokanSkoroSkriptaSkrzSkupinaSkvostSkvrnaSlabikaSladidloSlaninaSlastSlavnostSledovatSlepecSlevaSlezinaSlibSlinaSlizniceSlonSloupekSlovoSluchSluhaSlunceSlupkaSlzaSmaragdSmetanaSmilstvoSmlouvaSmogSmradSmrkSmrtkaSmutekSmyslSnadSnahaSnobSobotaSochaSodovkaSokolSopkaSotvaSoubojSoucitSoudceSouhlasSouladSoumrakSoupravaSousedSoutokSouvisetSpalovnaSpasitelSpisSplavSpodekSpojenecSpoluSponzorSpornostSpoustaSprchaSpustitSrandaSrazSrdceSrnaSrnecSrovnatSrpenSrstSrubStaniceStarostaStatikaStavbaStehnoStezkaStodolaStolekStopaStornoStoupatStrachStresStrhnoutStromStrunaStudnaStupniceStvolStykSubjektSubtropySucharSudostSuknoSundatSunoutSurikataSurovinaSvahSvalstvoSvetrSvatbaSvazekSvisleSvitekSvobodaSvodidloSvorkaSvrabSykavkaSykotSynekSynovecSypatSypkostSyrovostSyselSytostTabletkaTabuleTahounTajemnoTajfunTajgaTajitTajnostTaktikaTamhleTamponTancovatTanecTankerTapetaTaveninaTazatelTechnikaTehdyTekutinaTelefonTemnotaTendenceTenistaTenorTeplotaTepnaTeprveTerapieTermoskaTextilTichoTiskopisTitulekTkadlecTkaninaTlapkaTleskatTlukotTlupaTmelToaletaTopinkaTopolTorzoTouhaToulecTradiceTraktorTrampTrasaTraverzaTrefitTrestTrezorTrhavinaTrhlinaTrochuTrojiceTroskaTroubaTrpceTrpitelTrpkostTrubecTruchlitTruhliceTrusTrvatTudyTuhnoutTuhostTundraTuristaTurnajTuzemskoTvarohTvorbaTvrdostTvrzTygrTykevUbohostUbozeUbratUbrousekUbrusUbytovnaUchoUctivostUdivitUhraditUjednatUjistitUjmoutUkazatelUklidnitUklonitUkotvitUkrojitUliceUlitaUlovitUmyvadloUnavitUniformaUniknoutUpadnoutUplatnitUplynoutUpoutatUpravitUranUrazitUsednoutUsilovatUsmrtitUsnadnitUsnoutUsouditUstlatUstrnoutUtahovatUtkatUtlumitUtonoutUtopenecUtrousitUvalitUvolnitUvozovkaUzdravitUzelUzeninaUzlinaUznatVagonValchaValounVanaVandalVanilkaVaranVarhanyVarovatVcelkuVchodVdovaVedroVegetaceVejceVelbloudVeletrhVelitelVelmocVelrybaVenkovVerandaVerzeVeselkaVeskrzeVesniceVespoduVestaVeterinaVeverkaVibraceVichrVideohraVidinaVidleVilaViniceVisetVitalitaVizeVizitkaVjezdVkladVkusVlajkaVlakVlasecVlevoVlhkostVlivVlnovkaVloupatVnucovatVnukVodaVodivostVodoznakVodstvoVojenskyVojnaVojskoVolantVolbaVolitVolnoVoskovkaVozidloVozovnaVpravoVrabecVracetVrahVrataVrbaVrcholekVrhatVrstvaVrtuleVsaditVstoupitVstupVtipVybavitVybratVychovatVydatVydraVyfotitVyhledatVyhnoutVyhoditVyhraditVyhubitVyjasnitVyjetVyjmoutVyklopitVykonatVylekatVymazatVymezitVymizetVymysletVynechatVynikatVynutitVypadatVyplatitVypravitVypustitVyrazitVyrovnatVyrvatVyslovitVysokoVystavitVysunoutVysypatVytasitVytesatVytratitVyvinoutVyvolatVyvrhelVyzdobitVyznatVzaduVzbuditVzchopitVzdorVzduchVzdychatVzestupVzhledemVzkazVzlykatVznikVzorekVzpouraVztahVztekXylofonZabratZabydletZachovatZadarmoZadusitZafoukatZahltitZahoditZahradaZahynoutZajatecZajetZajistitZaklepatZakoupitZalepitZamezitZamotatZamysletZanechatZanikatZaplatitZapojitZapsatZarazitZastavitZasunoutZatajitZatemnitZatknoutZaujmoutZavalitZaveletZavinitZavolatZavrtatZazvonitZbavitZbrusuZbudovatZbytekZdalekaZdarmaZdatnostZdivoZdobitZdrojZdvihZdymadloZeleninaZemanZeminaZeptatZezaduZezdolaZhatitZhltnoutZhlubokaZhotovitZhrubaZimaZimniceZjemnitZklamatZkoumatZkratkaZkumavkaZlatoZlehkaZlobaZlomZlostZlozvykZmapovatZmarZmatekZmijeZmizetZmocnitZmodratZmrzlinaZmutovatZnakZnalostZnamenatZnovuZobrazitZotavitZoubekZoufaleZploditZpomalitZpravaZprostitZprudkaZprvuZradaZranitZrcadloZrnitostZrnoZrovnaZrychlitZrzavostZtichaZtratitZubovinaZubrZvednoutZvenkuZveselaZvonZvratZvukovodZvyk".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x25f44555f4af25b51a711136e1c7d6e50ce9f8917d39d6b1f076b2bb4d2fac1a"!==mn.check(e)))throw wn=null,new Error("BIP39 Wordlist for en (English) FAILED")}var Sn=new(function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.call(this,"cz")}return Object(y.a)(r,[{key:"getWord",value:function(e){return kn(this),wn[e]}},{key:"getWordIndex",value:function(e){return kn(this),wn.indexOf(e)}}]),r}(mn));mn.register(Sn);var En=null;function _n(e){if(null==En&&(En="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==mn.check(e)))throw En=null,new Error("BIP39 Wordlist for en (English) FAILED")}var An=new(function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.call(this,"en")}return Object(y.a)(r,[{key:"getWord",value:function(e){return _n(this),En[e]}},{key:"getWordIndex",value:function(e){return _n(this),En.indexOf(e)}}]),r}(mn));mn.register(An);var xn={},Tn=null;function Mn(e){return gn.checkNormalize(),Pe(Array.prototype.filter.call(Me(e.normalize("NFD").toLowerCase()),(function(e){return e>=65&&e<=90||e>=97&&e<=123})))}function Cn(e){if(null==Tn&&((Tn="A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map((function(e){return function(e){var t=[];return Array.prototype.forEach.call(Me(e),(function(e){47===e?(t.push(204),t.push(129)):126===e?(t.push(110),t.push(204),t.push(131)):t.push(e)})),Pe(t)}(e)}))).forEach((function(e,t){xn[Mn(e)]=t})),"0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300"!==mn.check(e)))throw Tn=null,new Error("BIP39 Wordlist for es (Spanish) FAILED")}var On=new(function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.call(this,"es")}return Object(y.a)(r,[{key:"getWord",value:function(e){return Cn(this),Tn[e]}},{key:"getWordIndex",value:function(e){return Cn(this),xn[Mn(e)]}}]),r}(mn));mn.register(On);var In=null,Pn={};function Rn(e){return gn.checkNormalize(),Pe(Array.prototype.filter.call(Me(e.normalize("NFD").toLowerCase()),(function(e){return e>=65&&e<=90||e>=97&&e<=123})))}function Bn(e){if(null==In&&((In="AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map((function(e){return function(e){var t=[];return Array.prototype.forEach.call(Me(e),(function(e){47===e?(t.push(204),t.push(129)):45===e?(t.push(204),t.push(128)):t.push(e)})),Pe(t)}(e)}))).forEach((function(e,t){Pn[Rn(e)]=t})),"0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045"!==mn.check(e)))throw In=null,new Error("BIP39 Wordlist for fr (French) FAILED")}var Dn=new(function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.call(this,"fr")}return Object(y.a)(r,[{key:"getWord",value:function(e){return Bn(this),In[e]}},{key:"getWordIndex",value:function(e){return Bn(this),Pn[Rn(e)]}}]),r}(mn));mn.register(Dn);var Nn=["AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR","ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR","AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm","ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC","BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD","QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD","IJBEJqXZJ"],Ln=null;function jn(e){return Object(m.i)(Me(e))}function Un(e){if(null===Ln){Ln=[];var t={};t[Pe([227,130,154])]=!1,t[Pe([227,130,153])]=!1,t[Pe([227,130,133])]=Pe([227,130,134]),t[Pe([227,129,163])]=Pe([227,129,164]),t[Pe([227,130,131])]=Pe([227,130,132]),t[Pe([227,130,135])]=Pe([227,130,136]);for(var r=3;r<=9;r++)for(var n=Nn[r-3],i=0;i<n.length;i+=r){for(var o=[],a=0;a<r;a++){var s="~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt".indexOf(n[i+a]);o.push(227),o.push(64&s?130:129),o.push(128+(63&s))}Ln.push(Pe(o))}if(Ln.sort((function(e,t){return(e=c(e))<(t=c(t))?-1:e>t?1:0})),"0xe3818de38284e3818f"===jn(Ln[442])&&"0xe3818de38283e3818f"===jn(Ln[443])){var u=Ln[442];Ln[442]=Ln[443],Ln[443]=u}if("0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600"!==mn.check(e))throw Ln=null,new Error("BIP39 Wordlist for ja (Japanese) FAILED")}function c(e){for(var r="",n=0;n<e.length;n++){var i=e[n],o=t[i];!1!==o&&(o&&(i=o),r+=i)}return r}}var Fn=new(function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.call(this,"ja")}return Object(y.a)(r,[{key:"getWord",value:function(e){return Un(this),Ln[e]}},{key:"getWordIndex",value:function(e){return Un(this),Ln.indexOf(e)}},{key:"split",value:function(e){return gn.checkNormalize(),e.split(/(?:\u3000| )+/g)}},{key:"join",value:function(e){return e.join("\u3000")}}]),r}(mn));mn.register(Fn);var Kn=["OYAa","ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQgAjAgoAjJnrAkMX8AkOnoAlCTvAlCV8AlClvAlFg4AlFl6AlFn3AloSnAlrAXAlrAfAlrFUAlrFbAlrGgAlrOXAlvKnAlvMTAl3AbAl3MnAnATrAnAcrAnCZ3AnCl8AnDg8AnFboAnFl3AnHX4AnHbrAnHgrAnIl3AnJgvAnLXoAnLX4AnLbrAnLgrAnLhrAnMXoAnMgrAnOn3AnSbrAnSeoAnvLnAn3OnCTGgvCTSlvCTvAUCTvKnCTvNTCT3CZCT3GUCT3MTCT8HnCUCZrCULf8CULnvCU3HnCU3JUCY6NUCbDb8CbFZoCbLnrCboOTCboScCbrFnCbvLnCb8AgCb8HgCb$LnCkLfoClBn3CloDUDTHT8DTLl3DTSU8DTrAaDTrLXDTrLjDTrOYDTrOgDTvFXDTvFnDT3HUDT3LfDUCT9DUDT4DUFVoDUFV8DUFkoDUGgrDUJnrDULl8DUMT8DUMXrDUMX4DUMg8DUOUoDUOgvDUOg8DUSToDUSZ8DbDXoDbDgoDbGT8DbJn3DbLg3DbLn4DbMXrDbMg8DbOToDboJXGTClvGTDT8GTFZrGTLVoGTLlvGTLl3GTMg8GTOTvGTSlrGToCUGTrDgGTrJYGTrScGTtLnGTvAnGTvQgGUCZrGUDTvGUFZoGUHXrGULnvGUMT8GUoMgGXoLnGXrMXGXrMnGXvFnGYLnvGZOnvGZvOnGZ8LaGZ8LmGbAl3GbDYvGbDlrGbHX3GbJl4GbLV8GbLn3GbMn4GboJTGboRfGbvFUGb3GUGb4JnGgDX3GgFl$GgJlrGgLX6GgLZoGgLf8GgOXoGgrAgGgrJXGgrMYGgrScGgvATGgvOYGnAgoGnJgvGnLZoGnLg3GnLnrGnQn8GnSbrGnrMgHTClvHTDToHTFT3HTQT8HToJTHToJgHTrDUHTrMnHTvFYHTvRfHT8MnHT8SUHUAZ8HUBb4HUDTvHUoMYHXFl6HXJX6HXQlrHXrAUHXrMnHXrSbHXvFYHXvKXHX3LjHX3MeHYvQlHZrScHZvDbHbAcrHbFT3HbFl3HbJT8HbLTrHbMT8HbMXrHbMbrHbQb8HbSX3HboDbHboJTHbrFUHbrHgHbrJTHb8JTHb8MnHb8QgHgAlrHgDT3HgGgrHgHgrHgJTrHgJT8HgLX@HgLnrHgMT8HgMX8HgMboHgOnrHgQToHgRg3HgoHgHgrCbHgrFnHgrLVHgvAcHgvAfHnAloHnCTrHnCnvHnGTrHnGZ8HnGnvHnJT8HnLf8HnLkvHnMg8HnRTrITvFUITvFnJTAXrJTCV8JTFT3JTFT8JTFn4JTGgvJTHT8JTJT8JTJXvJTJl3JTJnvJTLX4JTLf8JTLhvJTMT8JTMXrJTMnrJTObrJTQT8JTSlvJT8DUJT8FkJT8MTJT8OXJT8OgJT8QUJT8RfJUHZoJXFT4JXFlrJXGZ8JXGnrJXLV8JXLgvJXMXoJXMX3JXNboJXPlvJXoJTJXoLkJXrAXJXrHUJXrJgJXvJTJXvOnJX4KnJYAl3JYJT8JYLhvJYQToJYrQXJY6NUJbAl3JbCZrJbDloJbGT8JbGgrJbJXvJbJboJbLf8JbLhrJbLl3JbMnvJbRg8JbSZ8JboDbJbrCZJbrSUJb3KnJb8LnJfRn8JgAXrJgCZrJgDTrJgGZrJgGZ8JgHToJgJT8JgJXoJgJgvJgLX4JgLZ3JgLZ8JgLn4JgMgrJgMn4JgOgvJgPX6JgRnvJgSToJgoCZJgoJbJgoMYJgrJXJgrJgJgrLjJg6MTJlCn3JlGgvJlJl8Jl4AnJl8FnJl8HgJnAToJnATrJnAbvJnDUoJnGnrJnJXrJnJXvJnLhvJnLnrJnLnvJnMToJnMT8JnMXvJnMX3JnMg8JnMlrJnMn4JnOX8JnST4JnSX3JnoAgJnoAnJnoJTJnoObJnrAbJnrAkJnrHnJnrJTJnrJYJnrOYJnrScJnvCUJnvFaJnvJgJnvJnJnvOYJnvQUJnvRUJn3FnJn3JTKnFl3KnLT6LTDlvLTMnoLTOn3LTRl3LTSb4LTSlrLToAnLToJgLTrAULTrAcLTrCULTrHgLTrMgLT3JnLULnrLUMX8LUoJgLVATrLVDTrLVLb8LVoJgLV8MgLV8RTLXDg3LXFlrLXrCnLXrLXLX3GTLX4GgLX4OYLZAXrLZAcrLZAgrLZAhrLZDXyLZDlrLZFbrLZFl3LZJX6LZJX8LZLc8LZLnrLZSU8LZoJTLZoJnLZrAgLZrAnLZrJYLZrLULZrMgLZrSkLZvAnLZvGULZvJeLZvOTLZ3FZLZ4JXLZ8STLZ8ScLaAT3LaAl3LaHT8LaJTrLaJT8LaJXrLaJgvLaJl4LaLVoLaMXrLaMXvLaMX8LbClvLbFToLbHlrLbJn4LbLZ3LbLhvLbMXrLbMnoLbvSULcLnrLc8HnLc8MTLdrMnLeAgoLeOgvLeOn3LfAl3LfLnvLfMl3LfOX8Lf8AnLf8JXLf8LXLgJTrLgJXrLgJl8LgMX8LgRZrLhCToLhrAbLhrFULhrJXLhvJYLjHTrLjHX4LjJX8LjLhrLjSX3LjSZ4LkFX4LkGZ8LkGgvLkJTrLkMXoLkSToLkSU8LkSZ8LkoOYLl3FfLl3MgLmAZrLmCbrLmGgrLmHboLmJnoLmJn3LmLfoLmLhrLmSToLnAX6LnAb6LnCZ3LnCb3LnDTvLnDb8LnFl3LnGnrLnHZvLnHgvLnITvLnJT8LnJX8LnJlvLnLf8LnLg6LnLhvLnLnoLnMXrLnMg8LnQlvLnSbrLnrAgLnrAnLnrDbLnrFkLnrJdLnrMULnrOYLnrSTLnvAnLnvDULnvHgLnvOYLnvOnLn3GgLn4DULn4JTLn4JnMTAZoMTAloMTDb8MTFT8MTJnoMTJnrMTLZrMTLhrMTLkvMTMX8MTRTrMToATMTrDnMTrOnMT3JnMT4MnMT8FUMT8FaMT8FlMT8GTMT8GbMT8GnMT8HnMT8JTMT8JbMT8OTMUCl8MUJTrMUJU8MUMX8MURTrMUSToMXAX6MXAb6MXCZoMXFXrMXHXrMXLgvMXOgoMXrAUMXrAnMXrHgMXrJYMXrJnMXrMTMXrMgMXrOYMXrSZMXrSgMXvDUMXvOTMX3JgMX3OTMX4JnMX8DbMX8FnMX8HbMX8HgMX8HnMX8LbMX8MnMX8OnMYAb8MYGboMYHTvMYHX4MYLTrMYLnvMYMToMYOgvMYRg3MYSTrMbAToMbAXrMbAl3MbAn8MbGZ8MbJT8MbJXrMbMXvMbMX8MbMnoMbrMUMb8AfMb8FbMb8FkMcJXoMeLnrMgFl3MgGTvMgGXoMgGgrMgGnrMgHT8MgHZrMgJnoMgLnrMgLnvMgMT8MgQUoMgrHnMgvAnMg8HgMg8JYMg8LfMloJnMl8ATMl8AXMl8JYMnAToMnAT4MnAZ8MnAl3MnAl4MnCl8MnHT8MnHg8MnJnoMnLZoMnLhrMnMXoMnMX3MnMnrMnOgvMnrFbMnrFfMnrFnMnrNTMnvJXNTMl8OTCT3OTFV8OTFn3OTHZvOTJXrOTOl3OT3ATOT3JUOT3LZOT3LeOT3MbOT8ATOT8AbOT8AgOT8MbOUCXvOUMX3OXHXvOXLl3OXrMUOXvDbOX6NUOX8JbOYFZoOYLbrOYLkoOYMg8OYSX3ObHTrObHT4ObJgrObLhrObMX3ObOX8Ob8FnOeAlrOeJT8OeJXrOeJnrOeLToOeMb8OgJXoOgLXoOgMnrOgOXrOgOloOgoAgOgoJbOgoMYOgoSTOg8AbOjLX4OjMnoOjSV8OnLVoOnrAgOn3DUPXQlrPXvFXPbvFTPdAT3PlFn3PnvFbQTLn4QToAgQToMTQULV8QURg8QUoJnQXCXvQbFbrQb8AaQb8AcQb8FbQb8MYQb8ScQeAlrQeLhrQjAn3QlFXoQloJgQloSnRTLnvRTrGURTrJTRUJZrRUoJlRUrQnRZrLmRZrMnRZrSnRZ8ATRZ8JbRZ8ScRbMT8RbST3RfGZrRfMX8RfMgrRfSZrRnAbrRnGT8RnvJgRnvLfRnvMTRn8AaSTClvSTJgrSTOXrSTRg3STRnvSToAcSToAfSToAnSToHnSToLjSToMTSTrAaSTrEUST3BYST8AgST8LmSUAZvSUAgrSUDT4SUDT8SUGgvSUJXoSUJXvSULTrSU8JTSU8LjSV8AnSV8JgSXFToSXLf8SYvAnSZrDUSZrMUSZrMnSZ8HgSZ8JTSZ8JgSZ8MYSZ8QUSaQUoSbCT3SbHToSbQYvSbSl4SboJnSbvFbSb8HbSb8JgSb8OTScGZrScHgrScJTvScMT8ScSToScoHbScrMTScvAnSeAZrSeAcrSeHboSeJUoSeLhrSeMT8SeMXrSe6JgSgHTrSkJnoSkLnvSk8CUSlFl3SlrSnSl8GnSmAboSmGT8SmJU8","ATLnDlATrAZoATrJX4ATrMT8ATrMX4ATrRTrATvDl8ATvJUoATvMl8AT3AToAT3MX8AT8CT3AT8DT8AT8HZrAT8HgoAUAgFnAUCTFnAXoMX8AXrAT8AXrGgvAXrJXvAXrOgoAXvLl3AZvAgoAZvFbrAZvJXoAZvJl8AZvJn3AZvMX8AZvSbrAZ8FZoAZ8LZ8AZ8MU8AZ8OTvAZ8SV8AZ8SX3AbAgFZAboJnoAbvGboAb8ATrAb8AZoAb8AgrAb8Al4Ab8Db8Ab8JnoAb8LX4Ab8LZrAb8LhrAb8MT8Ab8OUoAb8Qb8Ab8ST8AcrAUoAcrAc8AcrCZ3AcrFT3AcrFZrAcrJl4AcrJn3AcrMX3AcrOTvAc8AZ8Ac8MT8AfAcJXAgoFn4AgoGgvAgoGnrAgoLc8AgoMXoAgrLnrAkrSZ8AlFXCTAloHboAlrHbrAlrLhrAlrLkoAl3CZrAl3LUoAl3LZrAnrAl4AnrMT8An3HT4BT3IToBX4MnvBb!Ln$CTGXMnCToLZ4CTrHT8CT3JTrCT3RZrCT#GTvCU6GgvCU8Db8CU8GZrCU8HT8CboLl3CbrGgrCbrMU8Cb8DT3Cb8GnrCb8LX4Cb8MT8Cb8ObrCgrGgvCgrKX4Cl8FZoDTrAbvDTrDboDTrGT6DTrJgrDTrMX3DTrRZrDTrRg8DTvAVvDTvFZoDT3DT8DT3Ln3DT4HZrDT4MT8DT8AlrDT8MT8DUAkGbDUDbJnDYLnQlDbDUOYDbMTAnDbMXSnDboAT3DboFn4DboLnvDj6JTrGTCgFTGTGgFnGTJTMnGTLnPlGToJT8GTrCT3GTrLVoGTrLnvGTrMX3GTrMboGTvKl3GZClFnGZrDT3GZ8DTrGZ8FZ8GZ8MXvGZ8On8GZ8ST3GbCnQXGbMbFnGboFboGboJg3GboMXoGb3JTvGb3JboGb3Mn6Gb3Qb8GgDXLjGgMnAUGgrDloGgrHX4GgrSToGgvAXrGgvAZvGgvFbrGgvLl3GgvMnvGnDnLXGnrATrGnrMboGnuLl3HTATMnHTAgCnHTCTCTHTrGTvHTrHTvHTrJX8HTrLl8HTrMT8HTrMgoHTrOTrHTuOn3HTvAZrHTvDTvHTvGboHTvJU8HTvLl3HTvMXrHTvQb4HT4GT6HT4JT8HT4Jb#HT8Al3HT8GZrHT8GgrHT8HX4HT8Jb8HT8JnoHT8LTrHT8LgvHT8SToHT8SV8HUoJUoHUoJX8HUoLnrHXrLZoHXvAl3HX3LnrHX4FkvHX4LhrHX4MXoHX4OnoHZrAZ8HZrDb8HZrGZ8HZrJnrHZvGZ8HZvLnvHZ8JnvHZ8LhrHbCXJlHbMTAnHboJl4HbpLl3HbrJX8HbrLnrHbrMnvHbvRYrHgoSTrHgrFV8HgrGZ8HgrJXoHgrRnvHgvBb!HgvGTrHgvHX4HgvHn!HgvLTrHgvSU8HnDnLbHnFbJbHnvDn8Hn6GgvHn!BTvJTCTLnJTQgFnJTrAnvJTrLX4JTrOUoJTvFn3JTvLnrJTvNToJT3AgoJT3Jn4JT3LhvJT3ObrJT8AcrJT8Al3JT8JT8JT8JnoJT8LX4JT8LnrJT8MX3JT8Rg3JT8Sc8JUoBTvJU8AToJU8GZ8JU8GgvJU8JTrJU8JXrJU8JnrJU8LnvJU8ScvJXHnJlJXrGgvJXrJU8JXrLhrJXrMT8JXrMXrJXrQUoJXvCTvJXvGZ8JXvGgrJXvQT8JX8Ab8JX8DT8JX8GZ8JX8HZvJX8LnrJX8MT8JX8MXoJX8MnvJX8ST3JYGnCTJbAkGbJbCTAnJbLTAcJboDT3JboLb6JbrAnvJbrCn3JbrDl8JbrGboJbrIZoJbrJnvJbrMnvJbrQb4Jb8RZrJeAbAnJgJnFbJgScAnJgrATrJgvHZ8JgvMn4JlJlFbJlLiQXJlLjOnJlRbOlJlvNXoJlvRl3Jl4AcrJl8AUoJl8MnrJnFnMlJnHgGbJnoDT8JnoFV8JnoGgvJnoIT8JnoQToJnoRg3JnrCZ3JnrGgrJnrHTvJnrLf8JnrOX8JnvAT3JnvFZoJnvGT8JnvJl4JnvMT8JnvMX8JnvOXrJnvPX6JnvSX3JnvSZrJn3MT8Jn3MX8Jn3RTrLTATKnLTJnLTLTMXKnLTRTQlLToGb8LTrAZ8LTrCZ8LTrDb8LTrHT8LT3PX6LT4FZoLT$CTvLT$GgrLUvHX3LVoATrLVoAgoLVoJboLVoMX3LVoRg3LV8CZ3LV8FZoLV8GTvLXrDXoLXrFbrLXvAgvLXvFlrLXvLl3LXvRn6LX4Mb8LX8GT8LYCXMnLYrMnrLZoSTvLZrAZvLZrAloLZrFToLZrJXvLZrJboLZrJl4LZrLnrLZrMT8LZrOgvLZrRnvLZrST4LZvMX8LZvSlvLZ8AgoLZ8CT3LZ8JT8LZ8LV8LZ8LZoLZ8Lg8LZ8SV8LZ8SbrLZ$HT8LZ$Mn4La6CTvLbFbMnLbRYFTLbSnFZLboJT8LbrAT9LbrGb3LbrQb8LcrJX8LcrMXrLerHTvLerJbrLerNboLgrDb8LgrGZ8LgrHTrLgrMXrLgrSU8LgvJTrLgvLl3Lg6Ll3LhrLnrLhrMT8LhvAl4LiLnQXLkoAgrLkoJT8LkoJn4LlrSU8Ll3FZoLl3HTrLl3JX8Ll3JnoLl3LToLmLeFbLnDUFbLnLVAnLnrATrLnrAZoLnrAb8LnrAlrLnrGgvLnrJU8LnrLZrLnrLhrLnrMb8LnrOXrLnrSZ8LnvAb4LnvDTrLnvDl8LnvHTrLnvHbrLnvJT8LnvJU8LnvJbrLnvLhvLnvMX8LnvMb8LnvNnoLnvSU8Ln3Al3Ln4FZoLn4GT6Ln4JgvLn4LhrLn4MT8Ln4SToMToCZrMToJX8MToLX4MToLf8MToRg3MTrEloMTvGb6MT3BTrMT3Lb6MT8AcrMT8AgrMT8GZrMT8JnoMT8LnrMT8MX3MUOUAnMXAbFnMXoAloMXoJX8MXoLf8MXoLl8MXrAb8MXrDTvMXrGT8MXrGgrMXrHTrMXrLf8MXrMU8MXrOXvMXrQb8MXvGT8MXvHTrMXvLVoMX3AX3MX3Jn3MX3LhrMX3MX3MX4AlrMX4OboMX8GTvMX8GZrMX8GgrMX8JT8MX8JX8MX8LhrMX8MT8MYDUFbMYMgDbMbGnFfMbvLX4MbvLl3Mb8Mb8Mb8ST4MgGXCnMg8ATrMg8AgoMg8CZrMg8DTrMg8DboMg8HTrMg8JgrMg8LT8MloJXoMl8AhrMl8JT8MnLgAUMnoJXrMnoLX4MnoLhrMnoMT8MnrAl4MnrDb8MnrOTvMnrOgvMnrQb8MnrSU8MnvGgrMnvHZ8Mn3MToMn4DTrMn4LTrMn4Mg8NnBXAnOTFTFnOToAToOTrGgvOTrJX8OT3JXoOT6MTrOT8GgrOT8HTpOT8MToOUoHT8OUoJT8OUoLn3OXrAgoOXrDg8OXrMT8OXvSToOX6CTvOX8CZrOX8OgrOb6HgvOb8AToOb8MT8OcvLZ8OgvAlrOgvHTvOgvJTrOgvJnrOgvLZrOgvLn4OgvMT8OgvRTrOg8AZoOg8DbvOnrOXoOnvJn4OnvLhvOnvRTrOn3GgoOn3JnvOn6JbvOn8OTrPTGYFTPbBnFnPbGnDnPgDYQTPlrAnvPlrETvPlrLnvPlrMXvPlvFX4QTMTAnQTrJU8QYCnJlQYJlQlQbGTQbQb8JnrQb8LZoQb8LnvQb8MT8Qb8Ml8Qb8ST4QloAl4QloHZvQloJX8QloMn8QnJZOlRTrAZvRTrDTrRTvJn4RTvLhvRT4Jb8RZrAZrRZ8AkrRZ8JU8RZ8LV8RZ8LnvRbJlQXRg3GboRg3MnvRg8AZ8Rg8JboRg8Jl4RnLTCbRnvFl3RnvQb8SToAl4SToCZrSToFZoSToHXrSToJU8SToJgvSToJl4SToLhrSToMX3STrAlvSTrCT9STrCgrSTrGgrSTrHXrSTrHboSTrJnoSTrNboSTvLnrST4AZoST8Ab8ST8JT8SUoJn3SU6HZ#SU6JTvSU8Db8SU8HboSU8LgrSV8JT8SZrAcrSZrAl3SZrJT8SZrJnvSZrMT8SZvLUoSZ4FZoSZ8JnoSZ8RZrScoLnrScoMT8ScoMX8ScrAT4ScrAZ8ScrLZ8ScrLkvScvDb8ScvLf8ScvNToSgrFZrShvKnrSloHUoSloLnrSlrMXoSl8HgrSmrJUoSn3BX6","ATFlOn3ATLgrDYAT4MTAnAT8LTMnAYJnRTrAbGgJnrAbLV8LnAbvNTAnAeFbLg3AgOYMXoAlQbFboAnDboAfAnJgoJTBToDgAnBUJbAl3BboDUAnCTDlvLnCTFTrSnCYoQTLnDTwAbAnDUDTrSnDUHgHgrDX8LXFnDbJXAcrETvLTLnGTFTQbrGTMnGToGT3DUFbGUJlPX3GbQg8LnGboJbFnGb3GgAYGgAg8ScGgMbAXrGgvAbAnGnJTLnvGnvATFgHTDT6ATHTrDlJnHYLnMn8HZrSbJTHZ8LTFnHbFTJUoHgSeMT8HgrLjAnHgvAbAnHlFUrDlHnDgvAnHnHTFT3HnQTGnrJTAaMXvJTGbCn3JTOgrAnJXvAXMnJbMg8SnJbMnRg3Jb8LTMnJnAl3OnJnGYrQlJnJlQY3LTDlCn3LTJjLg3LTLgvFXLTMg3GTLV8HUOgLXFZLg3LXNXrMnLX8QXFnLX9AlMYLYLXPXrLZAbJU8LZDUJU8LZMXrSnLZ$AgFnLaPXrDULbFYrMnLbMn8LXLboJgJgLeFbLg3LgLZrSnLgOYAgoLhrRnJlLkCTrSnLkOnLhrLnFX%AYLnFZoJXLnHTvJbLnLloAbMTATLf8MTHgJn3MTMXrAXMT3MTFnMUITvFnMXFX%AYMXMXvFbMXrFTDbMYAcMX3MbLf8SnMb8JbFnMgMXrMTMgvAXFnMgvGgCmMnAloSnMnFnJTrOXvMXSnOX8HTMnObJT8ScObLZFl3ObMXCZoPTLgrQXPUFnoQXPU3RXJlPX3RkQXPbrJXQlPlrJbFnQUAhrDbQXGnCXvQYLnHlvQbLfLnvRTOgvJbRXJYrQlRYLnrQlRbLnrQlRlFT8JlRlFnrQXSTClCn3STHTrAnSTLZQlrSTMnGTrSToHgGbSTrGTDnSTvGXCnST3HgFbSU3HXAXSbAnJn3SbFT8LnScLfLnv","AT3JgJX8AT8FZoSnAT8JgFV8AT8LhrDbAZ8JT8DbAb8GgLhrAb8SkLnvAe8MT8SnAlMYJXLVAl3GYDTvAl3LfLnvBUDTvLl3CTOn3HTrCT3DUGgrCU8MT8AbCbFTrJUoCgrDb8MTDTLV8JX8DTLnLXQlDT8LZrSnDUQb8FZ8DUST4JnvDb8ScOUoDj6GbJl4GTLfCYMlGToAXvFnGboAXvLnGgAcrJn3GgvFnSToGnLf8JnvGn#HTDToHTLnFXJlHTvATFToHTvHTDToHTvMTAgoHT3STClvHT4AlFl6HT8HTDToHUoDgJTrHUoScMX3HbRZrMXoHboJg8LTHgDb8JTrHgMToLf8HgvLnLnoHnHn3HT4Hn6MgvAnJTJU8ScvJT3AaQT8JT8HTrAnJXrRg8AnJbAloMXoJbrATFToJbvMnoSnJgDb6GgvJgDb8MXoJgSX3JU8JguATFToJlPYLnQlJlQkDnLbJlQlFYJlJl8Lf8OTJnCTFnLbJnLTHXMnJnLXGXCnJnoFfRg3JnrMYRg3Jn3HgFl3KT8Dg8LnLTRlFnPTLTvPbLbvLVoSbrCZLXMY6HT3LXNU7DlrLXNXDTATLX8DX8LnLZDb8JU8LZMnoLhrLZSToJU8LZrLaLnrLZvJn3SnLZ8LhrSnLaJnoMT8LbFlrHTvLbrFTLnrLbvATLlvLb6OTFn3LcLnJZOlLeAT6Mn4LeJT3ObrLg6LXFlrLhrJg8LnLhvDlPX4LhvLfLnvLj6JTFT3LnFbrMXoLnQluCTvLnrQXCY6LnvLfLnvLnvMgLnvLnvSeLf8MTMbrJn3MT3JgST3MT8AnATrMT8LULnrMUMToCZrMUScvLf8MXoDT8SnMX6ATFToMX8AXMT8MX8FkMT8MX8HTrDUMX8ScoSnMYJT6CTvMgAcrMXoMg8SToAfMlvAXLg3MnFl3AnvOT3AnFl3OUoATHT8OU3RnLXrOXrOXrSnObPbvFn6Og8HgrSnOg8OX8DbPTvAgoJgPU3RYLnrPXrDnJZrPb8CTGgvPlrLTDlvPlvFUJnoQUvFXrQlQeMnoAl3QlrQlrSnRTFTrJUoSTDlLiLXSTFg6HT3STJgoMn4STrFTJTrSTrLZFl3ST4FnMXoSUrDlHUoScvHTvSnSfLkvMXo","AUoAcrMXoAZ8HboAg8AbOg6ATFgAg8AloMXoAl3AT8JTrAl8MX8MXoCT3SToJU8Cl8Db8MXoDT8HgrATrDboOT8MXoGTOTrATMnGT8LhrAZ8GnvFnGnQXHToGgvAcrHTvAXvLl3HbrAZoMXoHgBlFXLg3HgMnFXrSnHgrSb8JUoHn6HT8LgvITvATrJUoJUoLZrRnvJU8HT8Jb8JXvFX8QT8JXvLToJTrJYrQnGnQXJgrJnoATrJnoJU8ScvJnvMnvMXoLTCTLgrJXLTJlRTvQlLbRnJlQYvLbrMb8LnvLbvFn3RnoLdCVSTGZrLeSTvGXCnLg3MnoLn3MToLlrETvMT8SToAl3MbrDU6GTvMb8LX4LhrPlrLXGXCnSToLf8Rg3STrDb8LTrSTvLTHXMnSb3RYLnMnSgOg6ATFg","HUDlGnrQXrJTrHgLnrAcJYMb8DULc8LTvFgGnCk3Mg8JbAnLX4QYvFYHnMXrRUoJnGnvFnRlvFTJlQnoSTrBXHXrLYSUJgLfoMT8Se8DTrHbDb","AbDl8SToJU8An3RbAb8ST8DUSTrGnrAgoLbFU6Db8LTrMg8AaHT8Jb8ObDl8SToJU8Pb3RlvFYoJl"];var zn=null;function Vn(e){if(null==zn&&(zn=[],Kn.forEach((function(e,t){t+=4;for(var r=0;r<e.length;r+=t){for(var n="",i=0;i<t;i++)n+=((o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*".indexOf(e[r+i]))>=40?o=o+168-40:o>=19&&(o=o+97-19),Pe([225,132+(o>>6),128+(63&o)]));zn.push(n)}var o})),zn.sort(),"0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a"!==mn.check(e)))throw zn=null,new Error("BIP39 Wordlist for ko (Korean) FAILED")}var Hn=new(function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.call(this,"ko")}return Object(y.a)(r,[{key:"getWord",value:function(e){return Vn(this),zn[e]}},{key:"getWordIndex",value:function(e){return Vn(this),zn.indexOf(e)}}]),r}(mn));mn.register(Hn);var Jn=null;function qn(e){if(null==Jn&&(Jn="AbacoAbbaglioAbbinatoAbeteAbissoAbolireAbrasivoAbrogatoAccadereAccennoAccusatoAcetoneAchilleAcidoAcquaAcreAcrilicoAcrobataAcutoAdagioAddebitoAddomeAdeguatoAderireAdipeAdottareAdulareAffabileAffettoAffissoAffrantoAforismaAfosoAfricanoAgaveAgenteAgevoleAggancioAgireAgitareAgonismoAgricoloAgrumetoAguzzoAlabardaAlatoAlbatroAlberatoAlboAlbumeAlceAlcolicoAlettoneAlfaAlgebraAlianteAlibiAlimentoAllagatoAllegroAllievoAllodolaAllusivoAlmenoAlogenoAlpacaAlpestreAltalenaAlternoAlticcioAltroveAlunnoAlveoloAlzareAmalgamaAmanitaAmarenaAmbitoAmbratoAmebaAmericaAmetistaAmicoAmmassoAmmendaAmmirareAmmonitoAmoreAmpioAmpliareAmuletoAnacardoAnagrafeAnalistaAnarchiaAnatraAncaAncellaAncoraAndareAndreaAnelloAngeloAngolareAngustoAnimaAnnegareAnnidatoAnnoAnnuncioAnonimoAnticipoAnziApaticoAperturaApodeApparireAppetitoAppoggioApprodoAppuntoAprileArabicaArachideAragostaAraldicaArancioAraturaArazzoArbitroArchivioArditoArenileArgentoArgineArgutoAriaArmoniaArneseArredatoArringaArrostoArsenicoArsoArteficeArzilloAsciuttoAscoltoAsepsiAsetticoAsfaltoAsinoAsolaAspiratoAsproAssaggioAsseAssolutoAssurdoAstaAstenutoAsticeAstrattoAtavicoAteismoAtomicoAtonoAttesaAttivareAttornoAttritoAttualeAusilioAustriaAutistaAutonomoAutunnoAvanzatoAvereAvvenireAvvisoAvvolgereAzioneAzotoAzzimoAzzurroBabeleBaccanoBacinoBacoBadessaBadilataBagnatoBaitaBalconeBaldoBalenaBallataBalzanoBambinoBandireBaraondaBarbaroBarcaBaritonoBarlumeBaroccoBasilicoBassoBatostaBattutoBauleBavaBavosaBeccoBeffaBelgioBelvaBendaBenevoleBenignoBenzinaBereBerlinaBetaBibitaBiciBidoneBifidoBigaBilanciaBimboBinocoloBiologoBipedeBipolareBirbanteBirraBiscottoBisestoBisnonnoBisonteBisturiBizzarroBlandoBlattaBollitoBonificoBordoBoscoBotanicoBottinoBozzoloBraccioBradipoBramaBrancaBravuraBretellaBrevettoBrezzaBrigliaBrillanteBrindareBroccoloBrodoBronzinaBrulloBrunoBubboneBucaBudinoBuffoneBuioBulboBuonoBurloneBurrascaBussolaBustaCadettoCaducoCalamaroCalcoloCalesseCalibroCalmoCaloriaCambusaCamerataCamiciaCamminoCamolaCampaleCanapaCandelaCaneCaninoCanottoCantinaCapaceCapelloCapitoloCapogiroCapperoCapraCapsulaCarapaceCarcassaCardoCarismaCarovanaCarrettoCartolinaCasaccioCascataCasermaCasoCassoneCastelloCasualeCatastaCatenaCatrameCautoCavilloCedibileCedrataCefaloCelebreCellulareCenaCenoneCentesimoCeramicaCercareCertoCerumeCervelloCesoiaCespoCetoChelaChiaroChiccaChiedereChimeraChinaChirurgoChitarraCiaoCiclismoCifrareCignoCilindroCiottoloCircaCirrosiCitricoCittadinoCiuffoCivettaCivileClassicoClinicaCloroCoccoCodardoCodiceCoerenteCognomeCollareColmatoColoreColposoColtivatoColzaComaCometaCommandoComodoComputerComuneConcisoCondurreConfermaCongelareConiugeConnessoConoscereConsumoContinuoConvegnoCopertoCopioneCoppiaCopricapoCorazzaCordataCoricatoCorniceCorollaCorpoCorredoCorsiaCorteseCosmicoCostanteCotturaCovatoCratereCravattaCreatoCredereCremosoCrescitaCretaCricetoCrinaleCrisiCriticoCroceCronacaCrostataCrucialeCruscaCucireCuculoCuginoCullatoCupolaCuratoreCursoreCurvoCuscinoCustodeDadoDainoDalmataDamerinoDanielaDannosoDanzareDatatoDavantiDavveroDebuttoDecennioDecisoDeclinoDecolloDecretoDedicatoDefinitoDeformeDegnoDelegareDelfinoDelirioDeltaDemenzaDenotatoDentroDepositoDerapataDerivareDerogaDescrittoDesertoDesiderioDesumereDetersivoDevotoDiametroDicembreDiedroDifesoDiffusoDigerireDigitaleDiluvioDinamicoDinnanziDipintoDiplomaDipoloDiradareDireDirottoDirupoDisagioDiscretoDisfareDisgeloDispostoDistanzaDisumanoDitoDivanoDiveltoDividereDivoratoDobloneDocenteDoganaleDogmaDolceDomatoDomenicaDominareDondoloDonoDormireDoteDottoreDovutoDozzinaDragoDruidoDubbioDubitareDucaleDunaDuomoDupliceDuraturoEbanoEccessoEccoEclissiEconomiaEderaEdicolaEdileEditoriaEducareEgemoniaEgliEgoismoEgregioElaboratoElargireEleganteElencatoElettoElevareElficoElicaElmoElsaElusoEmanatoEmblemaEmessoEmiroEmotivoEmozioneEmpiricoEmuloEndemicoEnduroEnergiaEnfasiEnotecaEntrareEnzimaEpatiteEpilogoEpisodioEpocaleEppureEquatoreErarioErbaErbosoEredeEremitaErigereErmeticoEroeErosivoErranteEsagonoEsameEsanimeEsaudireEscaEsempioEsercitoEsibitoEsigenteEsistereEsitoEsofagoEsortatoEsosoEspansoEspressoEssenzaEssoEstesoEstimareEstoniaEstrosoEsultareEtilicoEtnicoEtruscoEttoEuclideoEuropaEvasoEvidenzaEvitatoEvolutoEvvivaFabbricaFaccendaFachiroFalcoFamigliaFanaleFanfaraFangoFantasmaFareFarfallaFarinosoFarmacoFasciaFastosoFasulloFaticareFatoFavolosoFebbreFecolaFedeFegatoFelpaFeltroFemminaFendereFenomenoFermentoFerroFertileFessuraFestivoFettaFeudoFiabaFiduciaFifaFiguratoFiloFinanzaFinestraFinireFioreFiscaleFisicoFiumeFlaconeFlamencoFleboFlemmaFloridoFluenteFluoroFobicoFocacciaFocosoFoderatoFoglioFolataFolcloreFolgoreFondenteFoneticoFoniaFontanaForbitoForchettaForestaFormicaFornaioForoFortezzaForzareFosfatoFossoFracassoFranaFrassinoFratelloFreccettaFrenataFrescoFrigoFrollinoFrondeFrugaleFruttaFucilataFucsiaFuggenteFulmineFulvoFumanteFumettoFumosoFuneFunzioneFuocoFurboFurgoneFuroreFusoFutileGabbianoGaffeGalateoGallinaGaloppoGamberoGammaGaranziaGarboGarofanoGarzoneGasdottoGasolioGastricoGattoGaudioGazeboGazzellaGecoGelatinaGelsoGemelloGemmatoGeneGenitoreGennaioGenotipoGergoGhepardoGhiaccioGhisaGialloGildaGineproGiocareGioielloGiornoGioveGiratoGironeGittataGiudizioGiuratoGiustoGlobuloGlutineGnomoGobbaGolfGomitoGommoneGonfioGonnaGovernoGracileGradoGraficoGrammoGrandeGrattareGravosoGraziaGrecaGreggeGrifoneGrigioGrinzaGrottaGruppoGuadagnoGuaioGuantoGuardareGufoGuidareIbernatoIconaIdenticoIdillioIdoloIdraIdricoIdrogenoIgieneIgnaroIgnoratoIlareIllesoIllogicoIlludereImballoImbevutoImboccoImbutoImmaneImmersoImmolatoImpaccoImpetoImpiegoImportoImprontaInalareInarcareInattivoIncantoIncendioInchinoIncisivoInclusoIncontroIncrocioIncuboIndagineIndiaIndoleIneditoInfattiInfilareInflittoIngaggioIngegnoIngleseIngordoIngrossoInnescoInodoreInoltrareInondatoInsanoInsettoInsiemeInsonniaInsulinaIntasatoInteroIntonacoIntuitoInumidireInvalidoInveceInvitoIperboleIpnoticoIpotesiIppicaIrideIrlandaIronicoIrrigatoIrrorareIsolatoIsotopoIstericoIstitutoIstriceItaliaIterareLabbroLabirintoLaccaLaceratoLacrimaLacunaLaddoveLagoLampoLancettaLanternaLardosoLargaLaringeLastraLatenzaLatinoLattugaLavagnaLavoroLegaleLeggeroLemboLentezzaLenzaLeoneLepreLesivoLessatoLestoLetteraleLevaLevigatoLiberoLidoLievitoLillaLimaturaLimitareLimpidoLineareLinguaLiquidoLiraLiricaLiscaLiteLitigioLivreaLocandaLodeLogicaLombareLondraLongevoLoquaceLorenzoLotoLotteriaLuceLucidatoLumacaLuminosoLungoLupoLuppoloLusingaLussoLuttoMacabroMacchinaMaceroMacinatoMadamaMagicoMagliaMagneteMagroMaiolicaMalafedeMalgradoMalintesoMalsanoMaltoMalumoreManaManciaMandorlaMangiareManifestoMannaroManovraMansardaMantideManubrioMappaMaratonaMarcireMarettaMarmoMarsupioMascheraMassaiaMastinoMaterassoMatricolaMattoneMaturoMazurcaMeandroMeccanicoMecenateMedesimoMeditareMegaMelassaMelisMelodiaMeningeMenoMensolaMercurioMerendaMerloMeschinoMeseMessereMestoloMetalloMetodoMettereMiagolareMicaMicelioMicheleMicroboMidolloMieleMiglioreMilanoMiliteMimosaMineraleMiniMinoreMirinoMirtilloMiscelaMissivaMistoMisurareMitezzaMitigareMitraMittenteMnemonicoModelloModificaModuloMoganoMogioMoleMolossoMonasteroMoncoMondinaMonetarioMonileMonotonoMonsoneMontatoMonvisoMoraMordereMorsicatoMostroMotivatoMotosegaMottoMovenzaMovimentoMozzoMuccaMucosaMuffaMughettoMugnaioMulattoMulinelloMultiploMummiaMuntoMuovereMuraleMusaMuscoloMusicaMutevoleMutoNababboNaftaNanometroNarcisoNariceNarratoNascereNastrareNaturaleNauticaNaviglioNebulosaNecrosiNegativoNegozioNemmenoNeofitaNerettoNervoNessunoNettunoNeutraleNeveNevroticoNicchiaNinfaNitidoNobileNocivoNodoNomeNominaNordicoNormaleNorvegeseNostranoNotareNotiziaNotturnoNovellaNucleoNullaNumeroNuovoNutrireNuvolaNuzialeOasiObbedireObbligoObeliscoOblioOboloObsoletoOccasioneOcchioOccidenteOccorrereOccultareOcraOculatoOdiernoOdorareOffertaOffrireOffuscatoOggettoOggiOgnunoOlandeseOlfattoOliatoOlivaOlogrammaOltreOmaggioOmbelicoOmbraOmegaOmissioneOndosoOnereOniceOnnivoroOnorevoleOntaOperatoOpinioneOppostoOracoloOrafoOrdineOrecchinoOreficeOrfanoOrganicoOrigineOrizzonteOrmaOrmeggioOrnativoOrologioOrrendoOrribileOrtensiaOrticaOrzataOrzoOsareOscurareOsmosiOspedaleOspiteOssaOssidareOstacoloOsteOtiteOtreOttagonoOttimoOttobreOvaleOvestOvinoOviparoOvocitoOvunqueOvviareOzioPacchettoPacePacificoPadellaPadronePaesePagaPaginaPalazzinaPalesarePallidoPaloPaludePandoroPannelloPaoloPaonazzoPapricaParabolaParcellaParerePargoloPariParlatoParolaPartireParvenzaParzialePassivoPasticcaPataccaPatologiaPattumePavonePeccatoPedalarePedonalePeggioPelosoPenarePendicePenisolaPennutoPenombraPensarePentolaPepePepitaPerbenePercorsoPerdonatoPerforarePergamenaPeriodoPermessoPernoPerplessoPersuasoPertugioPervasoPesatorePesistaPesoPestiferoPetaloPettinePetulantePezzoPiacerePiantaPiattinoPiccinoPicozzaPiegaPietraPifferoPigiamaPigolioPigroPilaPiliferoPillolaPilotaPimpantePinetaPinnaPinoloPioggiaPiomboPiramidePireticoPiritePirolisiPitonePizzicoPlaceboPlanarePlasmaPlatanoPlenarioPochezzaPoderosoPodismoPoesiaPoggiarePolentaPoligonoPollicePolmonitePolpettaPolsoPoltronaPolverePomicePomodoroPontePopolosoPorfidoPorosoPorporaPorrePortataPosaPositivoPossessoPostulatoPotassioPoterePranzoPrassiPraticaPreclusoPredicaPrefissoPregiatoPrelievoPremerePrenotarePreparatoPresenzaPretestoPrevalsoPrimaPrincipePrivatoProblemaProcuraProdurreProfumoProgettoProlungaPromessaPronomePropostaProrogaProtesoProvaPrudentePrugnaPruritoPsichePubblicoPudicaPugilatoPugnoPulcePulitoPulsantePuntarePupazzoPupillaPuroQuadroQualcosaQuasiQuerelaQuotaRaccoltoRaddoppioRadicaleRadunatoRafficaRagazzoRagioneRagnoRamarroRamingoRamoRandagioRantolareRapatoRapinaRappresoRasaturaRaschiatoRasenteRassegnaRastrelloRataRavvedutoRealeRecepireRecintoReclutaReconditoRecuperoRedditoRedimereRegalatoRegistroRegolaRegressoRelazioneRemareRemotoRennaReplicaReprimereReputareResaResidenteResponsoRestauroReteRetinaRetoricaRettificaRevocatoRiassuntoRibadireRibelleRibrezzoRicaricaRiccoRicevereRiciclatoRicordoRicredutoRidicoloRidurreRifasareRiflessoRiformaRifugioRigareRigettatoRighelloRilassatoRilevatoRimanereRimbalzoRimedioRimorchioRinascitaRincaroRinforzoRinnovoRinomatoRinsavitoRintoccoRinunciaRinvenireRiparatoRipetutoRipienoRiportareRipresaRipulireRisataRischioRiservaRisibileRisoRispettoRistoroRisultatoRisvoltoRitardoRitegnoRitmicoRitrovoRiunioneRivaRiversoRivincitaRivoltoRizomaRobaRoboticoRobustoRocciaRocoRodaggioRodereRoditoreRogitoRollioRomanticoRompereRonzioRosolareRospoRotanteRotondoRotulaRovescioRubizzoRubricaRugaRullinoRumineRumorosoRuoloRupeRussareRusticoSabatoSabbiareSabotatoSagomaSalassoSaldaturaSalgemmaSalivareSalmoneSaloneSaltareSalutoSalvoSapereSapidoSaporitoSaracenoSarcasmoSartoSassosoSatelliteSatiraSatolloSaturnoSavanaSavioSaziatoSbadiglioSbalzoSbancatoSbarraSbattereSbavareSbendareSbirciareSbloccatoSbocciatoSbrinareSbruffoneSbuffareScabrosoScadenzaScalaScambiareScandaloScapolaScarsoScatenareScavatoSceltoScenicoScettroSchedaSchienaSciarpaScienzaScindereScippoSciroppoScivoloSclerareScodellaScolpitoScompartoSconfortoScoprireScortaScossoneScozzeseScribaScrollareScrutinioScuderiaScultoreScuolaScuroScusareSdebitareSdoganareSeccaturaSecondoSedanoSeggiolaSegnalatoSegregatoSeguitoSelciatoSelettivoSellaSelvaggioSemaforoSembrareSemeSeminatoSempreSensoSentireSepoltoSequenzaSerataSerbatoSerenoSerioSerpenteSerraglioServireSestinaSetolaSettimanaSfaceloSfaldareSfamatoSfarzosoSfaticatoSferaSfidaSfilatoSfingeSfocatoSfoderareSfogoSfoltireSforzatoSfrattoSfruttatoSfuggitoSfumareSfusoSgabelloSgarbatoSgonfiareSgorbioSgrassatoSguardoSibiloSiccomeSierraSiglaSignoreSilenzioSillabaSimboloSimpaticoSimulatoSinfoniaSingoloSinistroSinoSintesiSinusoideSiparioSismaSistoleSituatoSlittaSlogaturaSlovenoSmarritoSmemoratoSmentitoSmeraldoSmilzoSmontareSmottatoSmussatoSnellireSnervatoSnodoSobbalzoSobrioSoccorsoSocialeSodaleSoffittoSognoSoldatoSolenneSolidoSollazzoSoloSolubileSolventeSomaticoSommaSondaSonettoSonniferoSopireSoppesoSopraSorgereSorpassoSorrisoSorsoSorteggioSorvolatoSospiroSostaSottileSpadaSpallaSpargereSpatolaSpaventoSpazzolaSpecieSpedireSpegnereSpelaturaSperanzaSpessoreSpettraleSpezzatoSpiaSpigolosoSpillatoSpinosoSpiraleSplendidoSportivoSposoSprangaSprecareSpronatoSpruzzoSpuntinoSquilloSradicareSrotolatoStabileStaccoStaffaStagnareStampatoStantioStarnutoStaseraStatutoSteloSteppaSterzoStilettoStimaStirpeStivaleStizzosoStonatoStoricoStrappoStregatoStriduloStrozzareStruttoStuccareStufoStupendoSubentroSuccosoSudoreSuggeritoSugoSultanoSuonareSuperboSupportoSurgelatoSurrogatoSussurroSuturaSvagareSvedeseSveglioSvelareSvenutoSveziaSviluppoSvistaSvizzeraSvoltaSvuotareTabaccoTabulatoTacciareTaciturnoTaleTalismanoTamponeTanninoTaraTardivoTargatoTariffaTarpareTartarugaTastoTatticoTavernaTavolataTazzaTecaTecnicoTelefonoTemerarioTempoTemutoTendoneTeneroTensioneTentacoloTeoremaTermeTerrazzoTerzettoTesiTesseratoTestatoTetroTettoiaTifareTigellaTimbroTintoTipicoTipografoTiraggioTiroTitanioTitoloTitubanteTizioTizzoneToccareTollerareToltoTombolaTomoTonfoTonsillaTopazioTopologiaToppaTorbaTornareTorroneTortoraToscanoTossireTostaturaTotanoTraboccoTracheaTrafilaTragediaTralcioTramontoTransitoTrapanoTrarreTraslocoTrattatoTraveTrecciaTremolioTrespoloTributoTrichecoTrifoglioTrilloTrinceaTrioTristezzaTrituratoTrivellaTrombaTronoTroppoTrottolaTrovareTruccatoTubaturaTuffatoTulipanoTumultoTunisiaTurbareTurchinoTutaTutelaUbicatoUccelloUccisoreUdireUditivoUffaUfficioUgualeUlisseUltimatoUmanoUmileUmorismoUncinettoUngereUnghereseUnicornoUnificatoUnisonoUnitarioUnteUovoUpupaUraganoUrgenzaUrloUsanzaUsatoUscitoUsignoloUsuraioUtensileUtilizzoUtopiaVacanteVaccinatoVagabondoVagliatoValangaValgoValicoVallettaValorosoValutareValvolaVampataVangareVanitosoVanoVantaggioVanveraVaporeVaranoVarcatoVarianteVascaVedettaVedovaVedutoVegetaleVeicoloVelcroVelinaVellutoVeloceVenatoVendemmiaVentoVeraceVerbaleVergognaVerificaVeroVerrucaVerticaleVescicaVessilloVestaleVeteranoVetrinaVetustoViandanteVibranteVicendaVichingoVicinanzaVidimareVigiliaVignetoVigoreVileVillanoViminiVincitoreViolaViperaVirgolaVirologoVirulentoViscosoVisioneVispoVissutoVisuraVitaVitelloVittimaVivandaVividoViziareVoceVogaVolatileVolereVolpeVoragineVulcanoZampognaZannaZappatoZatteraZavorraZefiroZelanteZeloZenzeroZerbinoZibettoZincoZirconeZittoZollaZoticoZuccheroZufoloZuluZuppa".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620"!==mn.check(e)))throw Jn=null,new Error("BIP39 Wordlist for it (Italian) FAILED")}var Gn=new(function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.call(this,"it")}return Object(y.a)(r,[{key:"getWord",value:function(e){return qn(this),Jn[e]}},{key:"getWordIndex",value:function(e){return qn(this),Jn.indexOf(e)}}]),r}(mn));mn.register(Gn);var Xn="}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN<di,AM=W5%QO&ka&ua,hM^tm=zV=JA=wR&+X]7P&NB#4J#5L|/b[dA}tJ<Do&6m&u2[U1&Kb.HM&mC=w0&MW<rY,Hq#6M}QG,13&wP}Jp]Ow%ue&Kg<HP<D9~4k~9T&I2_c6$9T#9/[C5~7O~4a=cs&O7=KK=An&l9$6U$8A&uD&QI|/Y&bg}Ux&F2#6b}E2&JN&kW&kp=U/&bb=Xl<Cj}k+~5J#6L&5z&9i}b4&Fo,ho(X0_g3~4O$Fz&QE<HN=Ww]6/%GF-Vw=tj&/D&PN#9g=YO}cL&Of&PI~5I&Ip=vU=IW#9G;0o-wU}ss&QR<BT&R9=tk$PY_dh&Pq-yh]7T,nj.Xu=EP&76=cI&Fs*Xg}z7$Gb&+I=DF,AF=cA}rL#7j=Dz&3y<Aa$52=PQ}b0(iY$Fa}oL&xV#6U=ec=WZ,xh%RY<dp#9N&Fl&44=WH*A7=sh&TB&8P=07;u+&PK}uh}J5#72)V/=xC,AB$k0&f6;1E|+5=1B,3v]6n&wR%b+&xx]7f=Ol}fl;+D^wG]7E;nB;uh^Ir&l5=JL,nS=cf=g5;u6|/Q$Gc=MH%Hg#5d%M6^86=U+$Gz,l/,ir^5y&Ba&/F-IY&FI&be%IZ#77&PW_Nu$kE(Yf&NX]7Z,Jy&FJ(Xo&Nz#/d=y7&MX<Ag}Z+;nE]Dt(iG#4D=13&Pj~4c%v8&Zo%OL&/X#4W<HR&ie~6J_1O(Y2=y5=Ad*cv_eB#6k&PX:BU#7A;uk&Ft&Fx_dD=U2;vB=U5=4F}+O&GN.HH:9s=b0%NV(jO&IH=JT}Z9=VZ<Af,Kx^4m&uJ%c6,6r;9m#+L}cf%Kh&F3~4H=vP}bu,Hz|++,1w]nv}k6;uu$jw*Kl*WX&uM[x7&Fr[m7$NO&QN]hu=JN}nR^8g#/h(ps|KC;vd}xz=V0}p6&FD$G1#7K<bG_4p~8g&cf;u4=tl}+k%5/}fz;uw<cA=u1}gU}VM=LJ=eX&+L&Pr#4U}p2:nC,2K]7H:jF&9x}uX#9O=MB<fz~8X~5m&4D&kN&u5%E/(h7(ZF&VG<de(qM|/e-Wt=3x(a+,/R]f/&ND$Ro&nU}0g=KA%kH&NK$Ke<dS}cB&IX~5g$TN]6m=Uv,Is&Py=Ef%Kz#+/%bi&+A<F4$OG&4C&FL#9V<Zk=2I_eE&6c]nw&kq$HG}y+&A8$P3}OH=XP]70%IS(AJ_gH%GZ&tY&AZ=vb~6y&/r=VI=Wv<Zi=fl=xf&eL}c8}OL=MJ=g8$F7=YT}9u=0+^xC}JH&nL^N0~4T]K2,Cy%OC#6s;vG(AC^xe^cG&MF}Br#9P;wD-7h$O/&xA}Fn^PC]6i]7G&8V$Qs;vl(TB~73~4l<mW&6V=2y&uY&+3)aP}XF;LP&kx$wU=t7;uy<FN&lz)7E=Oo*Y+;wI}9q}le;J6&Ri&4t&Qr#8B=cb&vG=J5|Ql(h5<Yy~4+}QD,Lx=wn%K/&RK=dO&Pw,Q9=co%4u;9u}g0@6a^4I%b0=zo|/c&tX=dQ=OS#+b=yz_AB&wB&Pm=W9$HP_gR=62=AO=ti=hI,oA&jr&dH=tm&b6$P2(x8=zi;nG~7F;05]0n[Ix&3m}rg=Xp=cd&uz]7t;97=cN;vV<jf&FF&F1=6Q&Ik*Kk&P4,2z=fQ]7D&3u,H0=d/}Uw<ZN<7R}Kv;0f$H7,MD]7n$F0#88~9Z%da=by;+T#/u=VF&fO&kr^kf<AB]sU,I5$Ng&Pz;0i&QD&vM=Yl:BM;nJ_xJ]U7&Kf&30,3f|Z9*dC)je_jA&Q4&Kp$NH(Yz#6S&Id%Ib=KX,AD=KV%dP}tW&Pk^+E_Ni=cq,3R}VZ(Si=b+}rv;0j}rZ]uA,/w(Sx&Jv$w9&4d&wE,NJ$Gy=J/]Ls#7k<ZQ<Y/&uj]Ov$PM;v3,2F&+u:up=On&3e,Jv;90=J+&Qm]6q}bK#+d~8Y(h2]hA;99&AS=I/}qB&dQ}yJ-VM}Vl&ui,iB&G3|Dc]7d=eQ%dX%JC_1L~4d^NP;vJ&/1)ZI#7N]9X[bQ&PL=0L(UZ,Lm&kc&IR}n7(iR<AQ<dg=33=vN}ft}au]7I,Ba=x9=dR~6R&Tq=Xi,3d$Nr&Bc}DI&ku&vf]Dn,/F&iD,Ll&Nw=0y&I7=Ls=/A&tU=Qe}Ua&uk&+F=g4=gh=Vj#+1&Qn}Uy*44#5F,Pc&Rz*Xn=oh=5W;0n_Nf(iE<Y7=vr=Zu]oz#5Z%mI=kN=Bv_Jp(T2;vt_Ml<FS&uI=L/&6P]64$M7}86<bo%QX(SI%IY&VK=Al&Ux;vv;ut*E/%uh<ZE|O3,M2(yc]yu=Wk&tp:Ex}hr,Cl&WE)+Z=8U}I2_4Q,hA_si=iw=OM=tM=yZ%Ia=U7;wT}b+;uo=Za}yS!5x}HD}fb#5O_dA;Nv%uB(yB;01(Sf}Fk;v7}Pt#8v<mZ#7L,/r&Pl~4w&f5=Ph$Fw_LF&8m,bL=yJ&BH}p/*Jn}tU~5Q;wB(h6]Df]8p^+B;E4&Wc=d+;Ea&bw$8C&FN,DM=Yf}mP~5w=fT#6V=mC=Fi=AV}jB&AN}lW}aH#/D)dZ;hl;vE}/7,CJ;31&w8,hj%u9_Js=jJ&4M~8k=TN&eC}nL&uc-wi&lX}dj=Mv=e2#6u=cr$uq$6G]8W}Jb:nm=Yg<b3(UA;vX&6n&xF=KT,jC,De&R8&oY=Zv&oB]7/=Z2&Oa}bf,hh(4h^tZ&72&Nx;D2&xL~5h~40)ZG)h+=OJ&RA]Bv$yB=Oq=df,AQ%Jn}OJ;11,3z&Tl&tj;v+^Hv,Dh(id=s+]7N&N3)9Q~8f,S4=uW=w4&uX,LX&3d]CJ&yp&8x<b2_do&lP=y/<cy_dG=Oi=7R(VH(lt_1T,Iq_AA;12^6T%k6#8K[B1{oO<AU[Bt;1b$9S&Ps<8T=St{bY,jB(Zp&63&Uv$9V,PM]6v&Af}zW[bW_oq}sm}nB&Kq&gC&ff_eq_2m&5F&TI}rf}Gf;Zr_z9;ER&jk}iz_sn<BN~+n&vo=Vi%97|ZR=Wc,WE&6t]6z%85(ly#84=KY)6m_5/=aX,N3}Tm&he&6K]tR_B2-I3;u/&hU&lH<AP=iB&IA=XL;/5&Nh=wv<BH#79=vS=zl<AA=0X_RG}Bw&9p$NW,AX&kP_Lp&/Z(Tc]Mu}hs#6I}5B&cI<bq&H9#6m=K9}vH(Y1(Y0#4B&w6,/9&gG<bE,/O=zb}I4_l8<B/;wL%Qo<HO[Mq=XX}0v&BP&F4(mG}0i}nm,EC=9u{I3,xG&/9=JY*DK&hR)BX=EI=cx=b/{6k}yX%A+&wa}Xb=la;wi^lL;0t}jo&Qb=xg=XB}iO<qo{bR=NV&8f=a0&Jy;0v=uK)HK;vN#6h&jB(h/%ud&NI%wY.X7=Pt}Cu-uL&Gs_hl%mH,tm]78=Lb^Q0#7Y=1u<Bt&+Q=Co_RH,w3;1e}ux<aU;ui}U3&Q5%bt]63&UQ|0l&uL}O7&3o,AV&dm|Nj(Xt*5+(Uu&Hh(p7(UF=VR=Bp^Jl&Hd[ix)9/=Iq]C8<67]66}mB%6f}bb}JI]8T$HA}db=YM&pa=2J}tS&Y0=PS&y4=cX$6E,hX,XP&nR;04,FQ&l0&Vm_Dv#5Y~8Z=Bi%MA]6x=JO:+p,Az&9q,Hj~6/}SD=K1:EJ}nA;Qo#/E]9R,Ie&6X%W3]61&v4=xX_MC=0q;06(Xq=fs}IG}Dv=0l}o7$iZ;9v&LH&DP-7a&OY,SZ,Kz,Cv&dh=fx|Nh,F/~7q=XF&w+;9n&Gw;0h}Z7<7O&JK(S7&LS<AD<ac=wo<Dt&zw%4B=4v#8P;9o~6p*vV=Tm,Or&I6=1q}nY=P0=gq&Bl&Uu,Ch%yb}UY=zh}dh}rl(T4_xk(YA#8R*xH,IN}Jn]7V}C4&Ty}j3]7p=cL=3h&wW%Qv<Z3=f0&RI&+S(ic_zq}oN&/Y=z1;Td=LW=0e=OI(Vc,+b^ju(UL;0r:Za%8v=Rp=zw&58&73&wK}qX]6y&8E)a2}WR=wP^ur&nQ<cH}Re=Aq&wk}Q0&+q=PP,Gc|/d^k5,Fw]8Y}Pg]p3=ju=ed}r5_yf&Cs]7z$/G<Cm&Jp&54_1G_gP_Ll}JZ;0u]k8_7k(Sg]65{9i=LN&Sx&WK,iW&fD&Lk{9a}Em-9c#8N&io=sy]8d&nT&IK(lx#7/$lW(Td<s8~49,3o<7Y=MW(T+_Jr&Wd,iL}Ct=xh&5V;v4&8n%Kx=iF&l2_0B{B+,If(J0,Lv;u8=Kx-vB=HC&vS=Z6&fU&vE^xK;3D=4h=MR#45:Jw;0d}iw=LU}I5=I0]gB*im,K9}GU,1k_4U&Tt=Vs(iX&lU(TF#7y,ZO}oA&m5#5P}PN}Uz=hM<B1&FB<aG,e6~7T<tP(UQ_ZT=wu&F8)aQ]iN,1r_Lo&/g:CD}84{J1_Ki&Na&3n$jz&FE=dc;uv;va}in}ll=fv(h1&3h}fp=Cy}BM(+E~8m}lo%v7=hC(T6$cj=BQ=Bw(DR,2j=Ks,NS|F+;00=fU=70}Mb(YU;+G&m7&hr=Sk%Co]t+(X5_Jw}0r}gC(AS-IP&QK<Z2#8Q$WC]WX}T2&pG_Ka,HC=R4&/N;Z+;ch(C7,D4$3p_Mk&B2$8D=n9%Ky#5z(CT&QJ#7B]DC]gW}nf~5M;Iw#80}Tc_1F#4Z-aC}Hl=ph=fz,/3=aW}JM}nn;DG;vm}wn,4P}T3;wx&RG$u+}zK=0b;+J_Ek{re<aZ=AS}yY#5D]7q,Cp}xN=VP*2C}GZ}aG~+m_Cs=OY#6r]6g<GS}LC(UB=3A=Bo}Jy<c4}Is;1P<AG}Op<Z1}ld}nS=1Z,yM&95&98=CJ(4t:2L$Hk=Zo}Vc;+I}np&N1}9y=iv}CO*7p=jL)px]tb^zh&GS&Vl%v/;vR=14=zJ&49|/f]hF}WG;03=8P}o/&Gg&rp;DB,Kv}Ji&Pb;aA^ll(4j%yt}+K$Ht#4y&hY]7Y<F1,eN}bG(Uh%6Z]t5%G7;+F_RE;it}tL=LS&Da=Xx(S+(4f=8G=yI}cJ}WP=37=jS}pX}hd)fp<A8=Jt~+o$HJ=M6}iX=g9}CS=dv=Cj(mP%Kd,xq|+9&LD(4/=Xm&QP=Lc}LX&fL;+K=Op(lu=Qs.qC:+e&L+=Jj#8w;SL]7S(b+#4I=c1&nG_Lf&uH;+R)ZV<bV%B/,TE&0H&Jq&Ah%OF&Ss(p2,Wv&I3=Wl}Vq;1L&lJ#9b_1H=8r=b8=JH(SZ=hD=J2#7U,/U#/X~6P,FU<eL=jx,mG=hG=CE&PU=Se(qX&LY=X6=y4&tk&QQ&tf=4g&xI}W+&mZ=Dc#7w}Lg;DA;wQ_Kb(cJ=hR%yX&Yb,hw{bX_4X;EP;1W_2M}Uc=b5(YF,CM&Tp^OJ{DD]6s=vF=Yo~8q}XH}Fu%P5(SJ=Qt;MO]s8<F3&B3&8T(Ul-BS*dw&dR<87}/8]62$PZ]Lx<Au}9Q]7c=ja=KR,Go,Us&v6(qk}pG&G2=ev^GM%w4&H4]7F&dv]J6}Ew:9w=sj-ZL}Ym$+h(Ut(Um~4n=Xs(U7%eE=Qc_JR<CA#6t<Fv|/I,IS,EG<F2(Xy$/n<Fa(h9}+9_2o&N4#7X<Zq|+f_Dp=dt&na,Ca=NJ)jY=8C=YG=s6&Q+<DO}D3=xB&R1(lw;Qn<bF(Cu|/B}HV=SS&n7,10&u0]Dm%A6^4Q=WR(TD=Xo<GH,Rj(l8)bP&n/=LM&CF,F5&ml=PJ;0k=LG=tq,Rh,D6@4i=1p&+9=YC%er_Mh;nI;0q=Fw]80=xq=FM$Gv;v6&nc;wK%H2&Kj;vs,AA=YP,66}bI(qR~5U=6q~4b$Ni=K5.X3$So&Iu(p+]8G=Cf=RY(TS_O3(iH&57=fE=Dg_Do#9z#7H;FK{qd_2k%JR}en&gh_z8;Rx}9p<cN_Ne,DO;LN_7o~/p=NF=5Y}gN<ce<C1,QE]Wv=3u<BC}GK]yq}DY&u/_hj=II(pz&rC,jV&+Z}ut=NQ;Cg-SR_ZS,+o=u/;Oy_RK_QF(Fx&xP}Wr&TA,Uh&g1=yr{ax[VF$Pg(YB;Ox=Vy;+W(Sp}XV%dd&33(l/]l4#4Y}OE=6c=bw(A7&9t%wd&N/&mo,JH&Qe)fm=Ao}fu=tH",Wn={zh_cn:null,zh_tw:null},Zn={zh_cn:"0x17bcc4d8547e5a7135e365d1ab443aaae95e76d8230c2782c67305d4f21497a1",zh_tw:"0x51e720e90c7b87bec1d70eb6e74a21a449bd3ec9c020b01d3a40ed991b60ce5d"},Yn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Qn(e){if(null===Wn[e.locale]){Wn[e.locale]=[];for(var t=0,r=0;r<2048;r++){var n="~!@#$%^&*_-=[]{}|;:,.()<>?".indexOf(Xn[3*r]),i=[228+(n>>2),128+Yn.indexOf(Xn[3*r+1]),128+Yn.indexOf(Xn[3*r+2])];if("zh_tw"===e.locale)for(var o=n%4;o<3;o++)i[o]=Yn.indexOf("FAZDC6BALcLZCA+GBARCW8wNCcDDZ8LVFBOqqDUiou+M42TFAyERXFb7EjhP+vmBFpFrUpfDV2F7eB+eCltCHJFWLFCED+pWTojEIHFXc3aFn4F68zqjEuKidS1QBVPDEhE7NA4mhMF7oThD49ot3FgtzHFCK0acW1x8DH1EmLoIlrWFBLE+y5+NA3Cx65wJHTaEZVaK1mWAmPGxgYCdxwOjTDIt/faOEhTl1vqNsKtJCOhJWuio2g07KLZEQsFBUpNtwEByBgxFslFheFbiEPvi61msDvApxCzB6rBCzox7joYA5UdDc+Cb4FSgIabpXFAj3bjkmFAxCZE+mD/SFf/0ELecYCt3nLoxC6WEZf2tKDB4oZvrEmqFkKk7BwILA7gtYBpsTq//D4jD0F0wEB9pyQ1BD5Ba0oYHDI+sbDFhvrHXdDHfgFEIJLi5r8qercNFBgFLC4bo5ERJtamWBDFy73KCEb6M8VpmEt330ygCTK58EIIFkYgF84gtGA9Uyh3m68iVrFbWFbcbqiCYHZ9J1jeRPbL8yswhMiDbhEhdNoSwFbZrLT740ABEqgCkO8J1BLd1VhKKR4sD1yUo0z+FF59Mvg71CFbyEhbHSFBKEIKyoQNgQppq9T0KAqePu0ZFGrXOHdKJqkoTFhYvpDNyuuznrN84thJbsCoO6Cu6Xlvntvy0QYuAExQEYtTUBf3CoCqwgGFZ4u1HJFzDVwEy3cjcpV4QvsPaBC3rCGyCF23o4K3pp2gberGgFEJEHo4nHICtyKH2ZqyxhN05KBBJIQlKh/Oujv/DH32VrlqFdIFC7Fz9Ct4kaqFME0UETLprnN9kfy+kFmtQBB0+5CFu0N9Ij8l/VvJDh2oq3hT6EzjTHKFN7ZjZwoTsAZ4Exsko6Fpa6WC+sduz8jyrLpegTv2h1EBeYpLpm2czQW0KoCcS0bCVXCmuWJDBjN1nQNLdF58SFJ0h7i3pC3oEOKy/FjBklL70XvBEEIWp2yZ04xObzAWDDJG7f+DbqBEA7LyiR95j7MDVdDViz2RE5vWlBMv5e4+VfhP3aXNPhvLSynb9O2x4uFBV+3jqu6d5pCG28/sETByvmu/+IJ0L3wb4rj9DNOLBF6XPIODr4L19U9RRofAG6Nxydi8Bki8BhGJbBAJKzbJxkZSlF9Q2Cu8oKqggB9hBArwLLqEBWEtFowy8XK8bEyw9snT+BeyFk1ZCSrdmgfEwFePTgCjELBEnIbjaDDPJm36rG9pztcEzT8dGk23SBhXBB1H4z+OWze0ooFzz8pDBYFvp9j9tvFByf9y4EFdVnz026CGR5qMr7fxMHN8UUdlyJAzlTBDRC28k+L4FB8078ljyD91tUj1ocnTs8vdEf7znbzm+GIjEZnoZE5rnLL700Xc7yHfz05nWxy03vBB9YGHYOWxgMQGBCR24CVYNE1hpfKxN0zKnfJDmmMgMmBWqNbjfSyFCBWSCGCgR8yFXiHyEj+VtD1FB3FpC1zI0kFbzifiKTLm9yq5zFmur+q8FHqjoOBWsBPiDbnCC2ErunV6cJ6TygXFYHYp7MKN9RUlSIS8/xBAGYLzeqUnBF4QbsTuUkUqGs6CaiDWKWjQK9EJkjpkTmNCPYXL"[t++])+(0==o?228:128);Wn[e.locale].push(Pe(i))}if(mn.check(e)!==Zn[e.locale])throw Wn[e.locale]=null,new Error("BIP39 Wordlist for "+e.locale+" (Chinese) FAILED")}}var $n=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e){return Object(v.a)(this,r),t.call(this,"zh_"+e)}return Object(y.a)(r,[{key:"getWord",value:function(e){return Qn(this),Wn[this.locale][e]}},{key:"getWordIndex",value:function(e){return Qn(this),Wn[this.locale].indexOf(e)}},{key:"split",value:function(e){return(e=e.replace(/(?:\u3000| )+/g,"")).split("")}}]),r}(mn),ei=new $n("cn");mn.register(ei),mn.register(ei,"zh");var ti=new $n("tw");mn.register(ti);var ri={cz:Sn,en:An,es:On,fr:Dn,it:Gn,ja:Fn,ko:Hn,zh:ei,zh_cn:ei,zh_tw:ti},ni=new S.b("hdnode/5.3.0"),ii=C.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),oi=Me("Bitcoin seed"),ai=2147483648;function si(e){return(1<<e)-1<<8-e}function ui(e){return Object(m.h)(Object(m.i)(e),32)}function ci(e){return cn.encode(Object(m.b)([e,Object(m.e)(pn(pn(e)),0,4)]))}function fi(e){if(null==e)return ri.en;if("string"===typeof e){var t=ri[e];return null==t&&ni.throwArgumentError("unknown locale","wordlist",e),t}return e}var li={},hi="m/44'/60'/0'/0/0",di=function(){function e(t,r,n,i,o,a,s,u){if(Object(v.a)(this,e),ni.checkNew(this instanceof e?this.constructor:void 0,e),t!==li)throw new Error("HDNode constructor cannot be called directly");if(r){var c=new Yt(r);N(this,"privateKey",c.privateKey),N(this,"publicKey",c.compressedPublicKey)}else N(this,"privateKey",null),N(this,"publicKey",Object(m.i)(n));N(this,"parentFingerprint",i),N(this,"fingerprint",Object(m.e)(dn(pn(this.publicKey)),0,4)),N(this,"address",or(this.publicKey)),N(this,"chainCode",o),N(this,"index",a),N(this,"depth",s),null==u?(N(this,"mnemonic",null),N(this,"path",null)):"string"===typeof u?(N(this,"mnemonic",null),N(this,"path",u)):(N(this,"mnemonic",u),N(this,"path",u.path))}return Object(y.a)(e,[{key:"extendedKey",get:function(){if(this.depth>=256)throw new Error("Depth too large!");return ci(Object(m.b)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(m.i)(this.depth),this.parentFingerprint,Object(m.h)(Object(m.i)(this.index),4),this.chainCode,null!=this.privateKey?Object(m.b)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new e(li,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(t){if(t>4294967295)throw new Error("invalid index - "+String(t));var r=this.path;r&&(r+="/"+(2147483647&t));var n=new Uint8Array(37);if(t&ai){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Object(m.a)(this.privateKey),1),r&&(r+="'")}else n.set(Object(m.a)(this.publicKey));for(var i=24;i>=0;i-=8)n[33+(i>>3)]=t>>24-i&255;var o=Object(m.a)(yn(an.sha512,this.chainCode,n)),a=o.slice(0,32),s=o.slice(32),u=null,c=null;this.privateKey?u=ui(C.from(a).add(this.privateKey).mod(ii)):c=new Yt(Object(m.i)(a))._addPoint(this.publicKey);var f=r,l=this.mnemonic;return l&&(f=Object.freeze({phrase:l.phrase,path:r,locale:l.locale||"en"})),new e(li,u,c,this.fingerprint,ui(s),t,this.depth+1,f)}},{key:"derivePath",value:function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var r=this,n=0;n<t.length;n++){var i=t[n];if(i.match(/^[0-9]+'$/)){var o=parseInt(i.substring(0,i.length-1));if(o>=ai)throw new Error("invalid path index - "+i);r=r._derive(ai+o)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);var a=parseInt(i);if(a>=ai)throw new Error("invalid path index - "+i);r=r._derive(a)}}return r}}],[{key:"_fromSeed",value:function(t,r){var n=Object(m.a)(t);if(n.length<16||n.length>64)throw new Error("invalid seed");var i=Object(m.a)(yn(an.sha512,oi,n));return new e(li,ui(i.slice(0,32)),null,"0x00000000",ui(i.slice(32)),0,0,r)}},{key:"fromMnemonic",value:function(t,r,n){return t=yi(vi(t,n=fi(n)),n),e._fromSeed(pi(t,r),{phrase:t,path:"m",locale:n.locale})}},{key:"fromSeed",value:function(t){return e._fromSeed(t,null)}},{key:"fromExtendedKey",value:function(t){var r=cn.decode(t);82===r.length&&ci(r.slice(0,78))===t||ni.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var n=r[4],i=Object(m.i)(r.slice(5,9)),o=parseInt(Object(m.i)(r.slice(9,13)).substring(2),16),a=Object(m.i)(r.slice(13,45)),s=r.slice(45,78);switch(Object(m.i)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(li,null,Object(m.i)(s),i,a,o,n,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new e(li,Object(m.i)(s.slice(1)),null,i,a,o,n,null)}return ni.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}]),e}();function pi(e,t){t||(t="");var r=Me("mnemonic"+t,Se.NFKD);return bn(Me(e,Se.NFKD),r,2048,64,"sha512")}function vi(e,t){t=fi(t),ni.checkNormalize();var r=t.split(e);if(r.length%3!==0)throw new Error("invalid mnemonic");for(var n=Object(m.a)(new Uint8Array(Math.ceil(11*r.length/8))),i=0,o=0;o<r.length;o++){var a=t.getWordIndex(r[o].normalize("NFKD"));if(-1===a)throw new Error("invalid mnemonic");for(var s=0;s<11;s++)a&1<<10-s&&(n[i>>3]|=1<<7-i%8),i++}var u=32*r.length/3,c=si(r.length/3);if((Object(m.a)(pn(n.slice(0,u/8)))[0]&c)!==(n[n.length-1]&c))throw new Error("invalid checksum");return Object(m.i)(n.slice(0,u/8))}function yi(e,t){if(t=fi(t),(e=Object(m.a)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var r=[0],n=11,i=0;i<e.length;i++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[i]>>8-n,r.push(e[i]&(1<<8-n)-1),n+=3);var o=e.length/4,a=Object(m.a)(pn(e))[0]&si(o);return r[r.length-1]<<=o,r[r.length-1]|=a>>8-o,t.join(r.map((function(e){return t.getWord(e)})))}function bi(e,t){try{return vi(e,t),!0}catch(r){}return!1}function gi(e){return("number"!==typeof e||e<0||e>=ai||e%1)&&ni.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}var mi=r(1120),wi=r(72),ki=r.n(wi),Si=r(234),Ei=r.n(Si);function _i(e){return"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Object(m.a)(e)}function Ai(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}function xi(e){return"string"===typeof e?Me(e,Se.NFKC):Object(m.a)(e)}function Ti(e,t){for(var r=e,n=t.toLowerCase().split("/"),i=0;i<n.length;i++){var o=null;for(var a in r)if(a.toLowerCase()===n[i]){o=r[a];break}if(null===o)return null;r=o}return r}function Mi(e){var t=Object(m.a)(e);t[6]=15&t[6]|64,t[8]=63&t[8]|128;var r=Object(m.i)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}var Ci="json-wallets/5.3.0",Oi=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ii=new S.b(Ci);function Pi(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}var Ri=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"isKeystoreAccount",value:function(e){return!(!e||!e._isKeystoreAccount)}}]),r}(J);function Bi(e,t){var r=_i(Ti(e,"crypto/ciphertext"));if(Object(m.i)(ee(Object(m.b)([t.slice(16,32),r]))).substring(2)!==Ti(e,"crypto/mac").toLowerCase())throw new Error("invalid password");var n=function(e,t,r){if("aes-128-ctr"===Ti(e,"crypto/cipher")){var n=_i(Ti(e,"crypto/cipherparams/iv")),i=new ki.a.Counter(n),o=new ki.a.ModeOfOperation.ctr(t,i);return Object(m.a)(o.decrypt(r))}return null}(e,t.slice(0,16),r);n||Ii.throwError("unsupported cipher",S.b.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});var i=t.slice(32,64),o=or(n);if(e.address){var a=e.address.toLowerCase();if("0x"!==a.substring(0,2)&&(a="0x"+a),be(a)!==o)throw new Error("address mismatch")}var s={_isKeystoreAccount:!0,address:o,privateKey:Object(m.i)(n)};if("0.1"===Ti(e,"x-ethers/version")){var u=_i(Ti(e,"x-ethers/mnemonicCiphertext")),c=_i(Ti(e,"x-ethers/mnemonicCounter")),f=new ki.a.Counter(c),l=new ki.a.ModeOfOperation.ctr(i,f),h=Ti(e,"x-ethers/path")||hi,d=Ti(e,"x-ethers/locale")||"en",p=Object(m.a)(l.decrypt(u));try{var v=yi(p,d),y=di.fromMnemonic(v,null,d).derivePath(h);if(y.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=y.mnemonic}catch(b){if(b.code!==S.b.errors.INVALID_ARGUMENT||"wordlist"!==b.argument)throw b}}return new Ri(s)}function Di(e,t,r,n,i){return Object(m.a)(bn(e,t,r,n,i))}function Ni(e,t,r,n,i){return Promise.resolve(Di(e,t,r,n,i))}function Li(e,t,r,n,i){var o=xi(t),a=Ti(e,"crypto/kdf");if(a&&"string"===typeof a){var s=function(e,t){return Ii.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===a.toLowerCase()){var u=_i(Ti(e,"crypto/kdfparams/salt")),c=parseInt(Ti(e,"crypto/kdfparams/n")),f=parseInt(Ti(e,"crypto/kdfparams/r")),l=parseInt(Ti(e,"crypto/kdfparams/p"));c&&f&&l||s("kdf",a),0!==(c&c-1)&&s("N",c);var h=parseInt(Ti(e,"crypto/kdfparams/dklen"));return 32!==h&&s("dklen",h),n(o,u,c,f,l,64,i)}if("pbkdf2"===a.toLowerCase()){var d=_i(Ti(e,"crypto/kdfparams/salt")),p=null,v=Ti(e,"crypto/kdfparams/prf");"hmac-sha256"===v?p="sha256":"hmac-sha512"===v?p="sha512":s("prf",v);var y=parseInt(Ti(e,"crypto/kdfparams/c")),b=parseInt(Ti(e,"crypto/kdfparams/dklen"));return 32!==b&&s("dklen",b),r(o,d,y,b,p)}}return Ii.throwArgumentError("unsupported key-derivation function","kdf",a)}var ji=new S.b(Ci),Ui=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"isCrowdsaleAccount",value:function(e){return!(!e||!e._isCrowdsaleAccount)}}]),r}(J);function Fi(e,t){var r=JSON.parse(e);t=xi(t);var n=be(Ti(r,"ethaddr")),i=_i(Ti(r,"encseed"));i&&i.length%16===0||ji.throwArgumentError("invalid encseed","json",e);for(var o=Object(m.a)(bn(t,t,2e3,32,"sha256")).slice(0,16),a=i.slice(0,16),s=i.slice(16),u=new ki.a.ModeOfOperation.cbc(o,a),c=ki.a.padding.pkcs7.strip(Object(m.a)(u.decrypt(s))),f="",l=0;l<c.length;l++)f+=String.fromCharCode(c[l]);var h=ee(Me(f));return new Ui({_isCrowdsaleAccount:!0,address:n,privateKey:h})}function Ki(e){var t=null;try{t=JSON.parse(e)}catch(r){return!1}return t.encseed&&t.ethaddr}function zi(e){var t=null;try{t=JSON.parse(e)}catch(r){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function Vi(e){if(Ki(e))try{return be(JSON.parse(e).ethaddr)}catch(t){return null}if(zi(e))try{return be(JSON.parse(e).address)}catch(t){return null}return null}function Hi(e,t,r){if(Ki(e)){r&&r(0);var n=Fi(e,t);return r&&r(1),Promise.resolve(n)}return zi(e)?function(e,t,r){return Oi(this,void 0,void 0,g.a.mark((function n(){var i,o;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=JSON.parse(e),n.next=3,Li(i,t,Ni,Ei.a.scrypt,r);case 3:return o=n.sent,n.abrupt("return",Bi(i,o));case 5:case"end":return n.stop()}}),n)})))}(e,t,r):Promise.reject(new Error("invalid JSON wallet"))}function Ji(e,t){if(Ki(e))return Fi(e,t);if(zi(e))return function(e,t){var r=JSON.parse(e);return Bi(r,Li(r,t,Di,Ei.a.syncScrypt))}(e,t);throw new Error("invalid JSON wallet")}var qi=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Gi=new S.b("wallet/5.3.0");var Xi=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i,o;if(Object(v.a)(this,r),Gi.checkNew(this instanceof r?this.constructor:void 0,r),i=t.call(this),null!=(o=e)&&Object(m.l)(o.privateKey,32)&&null!=o.address){var a=new Yt(e.privateKey);if(N(Object(f.a)(i),"_signingKey",(function(){return a})),N(Object(f.a)(i),"address",or(i.publicKey)),i.address!==be(e.address)&&Gi.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){var t=e.mnemonic;return t&&t.phrase}(e)){var s=e.mnemonic;N(Object(f.a)(i),"_mnemonic",(function(){return{phrase:s.phrase,path:s.path||hi,locale:s.locale||"en"}}));var u=i.mnemonic;or(di.fromMnemonic(u.phrase,null,u.locale).derivePath(u.path).privateKey)!==i.address&&Gi.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else N(Object(f.a)(i),"_mnemonic",(function(){return null}))}else{if(Yt.isSigningKey(e))"secp256k1"!==e.curve&&Gi.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),N(Object(f.a)(i),"_signingKey",(function(){return e}));else{"string"===typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);var c=new Yt(e);N(Object(f.a)(i),"_signingKey",(function(){return c}))}N(Object(f.a)(i),"_mnemonic",(function(){return null})),N(Object(f.a)(i),"address",or(i.publicKey))}return n&&!Ft.isProvider(n)&&Gi.throwArgumentError("invalid provider","provider",n),N(Object(f.a)(i),"provider",n||null),i}return Object(y.a)(r,[{key:"mnemonic",get:function(){return this._mnemonic()}},{key:"privateKey",get:function(){return this._signingKey().privateKey}},{key:"publicKey",get:function(){return this._signingKey().publicKey}},{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"connect",value:function(e){return new r(this,e)}},{key:"signTransaction",value:function(e){var t=this;return j(e).then((function(r){null!=r.from&&(be(r.from)!==t.address&&Gi.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);var n=t._signingKey().signDigest(ee(lr(r)));return lr(r,n)}))}},{key:"signMessage",value:function(e){return qi(this,void 0,void 0,g.a.mark((function t(){return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(m.m)(this._signingKey().signDigest(zr(e))));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"_signTypedData",value:function(e,t,r){return qi(this,void 0,void 0,g.a.mark((function n(){var i,o=this;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,sn.resolveNames(e,t,r,(function(e){return null==o.provider&&Gi.throwError("cannot resolve ENS names without a provider",S.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),o.provider.resolveName(e)}));case 2:return i=n.sent,n.abrupt("return",Object(m.m)(this._signingKey().signDigest(sn.hash(i.domain,t,i.value))));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"encrypt",value:function(e,t,r){if("function"!==typeof t||r||(r=t,t={}),r&&"function"!==typeof r)throw new Error("invalid callback");return t||(t={}),function(e,t,r,n){try{if(be(e.address)!==or(e.privateKey))throw new Error("address/privateKey mismatch");if(Pi(e)){var i=e.mnemonic;if(di.fromMnemonic(i.phrase,null,i.locale).derivePath(i.path||hi).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(g){return Promise.reject(g)}"function"!==typeof r||n||(n=r,r={}),r||(r={});var o=Object(m.a)(e.privateKey),a=xi(t),s=null,u=null,c=null;if(Pi(e)){var f=e.mnemonic;s=Object(m.a)(vi(f.phrase,f.locale||"en")),u=f.path||hi,c=f.locale||"en"}var l=r.client;l||(l="ethers.js");var h=null;h=r.salt?Object(m.a)(r.salt):Object(mi.a)(32);var d=null;if(r.iv){if(16!==(d=Object(m.a)(r.iv)).length)throw new Error("invalid iv")}else d=Object(mi.a)(16);var p=null;if(r.uuid){if(16!==(p=Object(m.a)(r.uuid)).length)throw new Error("invalid uuid")}else p=Object(mi.a)(16);var v=1<<17,y=8,b=1;return r.scrypt&&(r.scrypt.N&&(v=r.scrypt.N),r.scrypt.r&&(y=r.scrypt.r),r.scrypt.p&&(b=r.scrypt.p)),Ei.a.scrypt(a,h,v,y,b,64,n).then((function(t){var r=(t=Object(m.a)(t)).slice(0,16),n=t.slice(16,32),i=t.slice(32,64),a=new ki.a.Counter(d),f=new ki.a.ModeOfOperation.ctr(r,a),g=Object(m.a)(f.encrypt(o)),w=ee(Object(m.b)([n,g])),k={address:e.address.substring(2).toLowerCase(),id:Mi(p),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Object(m.i)(d).substring(2)},ciphertext:Object(m.i)(g).substring(2),kdf:"scrypt",kdfparams:{salt:Object(m.i)(h).substring(2),n:v,dklen:32,p:b,r:y},mac:w.substring(2)}};if(s){var S=Object(mi.a)(16),E=new ki.a.Counter(S),_=new ki.a.ModeOfOperation.ctr(i,E),A=Object(m.a)(_.encrypt(s)),x=new Date,T=x.getUTCFullYear()+"-"+Ai(x.getUTCMonth()+1,2)+"-"+Ai(x.getUTCDate(),2)+"T"+Ai(x.getUTCHours(),2)+"-"+Ai(x.getUTCMinutes(),2)+"-"+Ai(x.getUTCSeconds(),2)+".0Z";k["x-ethers"]={client:l,gethFilename:"UTC--"+T+"--"+k.address,mnemonicCounter:Object(m.i)(S).substring(2),mnemonicCiphertext:Object(m.i)(A).substring(2),path:u,locale:c,version:"0.1"}}return JSON.stringify(k)}))}(this,e,t,r)}}],[{key:"createRandom",value:function(e){var t=Object(mi.a)(16);e||(e={}),e.extraEntropy&&(t=Object(m.a)(Object(m.e)(ee(Object(m.b)([t,e.extraEntropy])),0,16)));var n=yi(t,e.locale);return r.fromMnemonic(n,e.path,e.locale)}},{key:"fromEncryptedJson",value:function(e,t,n){return Hi(e,t,n).then((function(e){return new r(e)}))}},{key:"fromEncryptedJsonSync",value:function(e,t){return new r(Ji(e,t))}},{key:"fromMnemonic",value:function(e,t,n){return t||(t=hi),new r(di.fromMnemonic(e,null,n).derivePath(t))}}]),r}(Jt);function Wi(e,t){return ar(zr(e),t)}function Zi(e,t,r,n){return ar(sn.hash(e,t,r),n)}var Yi="0x0000000000000000000000000000000000000000",Qi="0x0000000000000000000000000000000000000000000000000000000000000000",$i="\u039e",eo=new S.b("networks/5.3.1");function to(e){var t=function(t,r){null==r&&(r={});var n=[];if(t.InfuraProvider)try{n.push(new t.InfuraProvider(e,r.infura))}catch(o){}if(t.EtherscanProvider)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(o){}if(t.AlchemyProvider)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(o){}if(t.CloudflareProvider)try{n.push(new t.CloudflareProvider(e))}catch(o){}if(0===n.length)return null;if(t.FallbackProvider){var i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return to(e)},t}function ro(e,t){var r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return ro(e,t)},r}var no={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:to("homestead")},io={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:to("ropsten")},oo={chainId:63,name:"classicMordor",_defaultProvider:ro("https://www.ethercluster.com/mordor","classicMordor")},ao={unspecified:{chainId:0,name:"unspecified"},homestead:no,mainnet:no,morden:{chainId:2,name:"morden"},ropsten:io,testnet:io,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:to("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:to("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:to("goerli")},classic:{chainId:61,name:"classic",_defaultProvider:ro("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:oo,classicTestnet:oo,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:ro("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic"},maticmum:{chainId:80001,name:"maticmum"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function so(e){if(null==e)return null;if("number"===typeof e){for(var t in ao){var r=ao[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"===typeof e){var n=ao[e];return null==n?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}var i=ao[e.name];if(!i)return"number"!==typeof e.chainId&&eo.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==i.chainId&&eo.throwArgumentError("network chainId mismatch","network",e);var o,a=e._defaultProvider||null;return null==a&&i._defaultProvider&&(a=(o=i._defaultProvider)&&"function"===typeof o.renetwork?i._defaultProvider.renetwork(e):i._defaultProvider),{name:e.name,chainId:i.chainId,ensAddress:e.ensAddress||i.ensAddress||null,_defaultProvider:a}}function uo(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function co(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function fo(e,t){for(var r=0,n=0;n<t.length;n++){var i=t[n];if(e>=(r+=i.l)&&e<=r+i.h&&(e-r)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}var lo=co("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),ho="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),po=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],vo=uo("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),yo=uo("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),bo=uo("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");for(var t=[],r=0;r<e.length;r+=4)t.push(parseInt(e.substring(r,r+4),16));return t})),go=co("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function mo(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();var t,r=Re(e);t=r.map((function(e){if(ho.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];var t=function(e){var t=fo(e,po);if(t)return[e+t.s];var r=vo[e];if(r)return r;var n=yo[e];return n?[e+n[0]]:bo[e]||null}(e);return t||[e]})),(r=Re(Ie(r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[])),Se.NFKC)).forEach((function(e){if(fo(e,go))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(fo(e,lo))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var n=Ie(r);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");if(n.length>63)throw new Error("too long");return n}var wo=new S.b(Vr),ko=new Uint8Array(32);ko.fill(0);var So=new RegExp("^((.*)\\.)?([^.]+)$");function Eo(e){try{for(var t=e.split("."),r=0;r<t.length;r++)if(0===mo(t[r]).length)throw new Error("empty");return!0}catch(n){}return!1}function _o(e){"string"!==typeof e&&wo.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=e,r=ko;t.length;){var n=t.match(So);null!=n&&""!==n[2]||wo.throwArgumentError("invalid ENS address; missing component","name",e);var i=Me(mo(n[3]));r=ee(Object(m.b)([r,ee(i)])),t=n[2]||""}return Object(m.i)(r)}function Ao(e){e=atob(e);for(var t=[],r=0;r<e.length;r++)t.push(e.charCodeAt(r));return Object(m.a)(t)}function xo(e){e=Object(m.a)(e);for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}var To=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};function Mo(e,t){return To(this,void 0,void 0,g.a.mark((function r(){var n,i,o,a;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==t&&(t={}),n={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0,mode:"cors",cache:"no-cache",credentials:"same-origin",redirect:"follow",referrer:"client"},r.next=4,fetch(e,n);case 4:return i=r.sent,r.next=7,i.arrayBuffer();case 7:return o=r.sent,a={},i.headers.forEach?i.headers.forEach((function(e,t){a[t.toLowerCase()]=e})):i.headers.keys().forEach((function(e){a[e.toLowerCase()]=i.headers.get(e)})),r.abrupt("return",{headers:a,statusCode:i.status,statusMessage:i.statusText,body:Object(m.a)(new Uint8Array(o))});case 11:case"end":return r.stop()}}),r)})))}var Co=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Oo=new S.b("web/5.3.0");function Io(e){return new Promise((function(t){setTimeout(t,e)}))}function Po(e,t){if(null==e)return null;if("string"===typeof e)return e;if(Object(m.k)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return Pe(e)}catch(r){}return Object(m.i)(e)}return e}function Ro(e,t,r){var n="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;Oo.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);var i="object"===typeof e?e.throttleCallback:null,o="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;Oo.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);var a={},s=null,u={method:"GET"},c=!1,f=12e4;if("string"===typeof e)s=e;else if("object"===typeof e){if(null!=e&&null!=e.url||Oo.throwArgumentError("missing URL","connection.url",e),s=e.url,"number"===typeof e.timeout&&e.timeout>0&&(f=e.timeout),e.headers)for(var l in e.headers)a[l.toLowerCase()]={key:l,value:String(e.headers[l])},["if-none-match","if-modified-since"].indexOf(l.toLowerCase())>=0&&(c=!0);if(u.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==s.substring(0,6)&&!0!==e.allowInsecureAuthentication&&Oo.throwError("basic authentication requires a secure https url",S.b.errors.INVALID_ARGUMENT,{argument:"url",url:s,user:e.user,password:"[REDACTED]"});var h=e.user+":"+e.password;a.authorization={key:"Authorization",value:"Basic "+xo(Me(h))}}}t&&(u.method="POST",u.body=t,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(t.length)}));var d={};Object.keys(a).forEach((function(e){var t=a[e];d[t.key]=t.value})),u.headers=d;var p=function(){var e=null;return{promise:new Promise((function(t,r){f&&(e=setTimeout((function(){null!=e&&(e=null,r(Oo.makeError("timeout",S.b.errors.TIMEOUT,{requestBody:Po(u.body,d["content-type"]),requestMethod:u.method,timeout:f,url:s})))}),f))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),v=function(){return Co(this,void 0,void 0,g.a.mark((function e(){var t,a,f,l,h,v,y,b,m;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t<n)){e.next=57;break}return a=null,e.prev=3,e.next=6,Mo(s,u);case 6:if(!(429===(a=e.sent).statusCode&&t<n)){e.next=20;break}if(f=!0,!i){e.next=13;break}return e.next=12,i(t,s);case 12:f=e.sent;case 13:if(!f){e.next=20;break}return l=0,h=a.headers["retry-after"],l="string"===typeof h&&h.match(/^[1-9][0-9]*$/)?1e3*parseInt(h):o*parseInt(String(Math.random()*Math.pow(2,t))),e.next=19,Io(l);case 19:return e.abrupt("continue",54);case 20:e.next=26;break;case 22:e.prev=22,e.t0=e.catch(3),null==(a=e.t0.response)&&(p.cancel(),Oo.throwError("missing response",S.b.errors.SERVER_ERROR,{requestBody:Po(u.body,d["content-type"]),requestMethod:u.method,serverError:e.t0,url:s}));case 26:if(v=a.body,c&&304===a.statusCode?v=null:(a.statusCode<200||a.statusCode>=300)&&(p.cancel(),Oo.throwError("bad response",S.b.errors.SERVER_ERROR,{status:a.statusCode,headers:a.headers,body:Po(v,a.headers?a.headers["content-type"]:null),requestBody:Po(u.body,d["content-type"]),requestMethod:u.method,url:s})),!r){e.next=52;break}return e.prev=29,e.next=32,r(v,a);case 32:return y=e.sent,p.cancel(),e.abrupt("return",y);case 37:if(e.prev=37,e.t1=e.catch(29),!(e.t1.throttleRetry&&t<n)){e.next=50;break}if(b=!0,!i){e.next=45;break}return e.next=44,i(t,s);case 44:b=e.sent;case 45:if(!b){e.next=50;break}return m=o*parseInt(String(Math.random()*Math.pow(2,t))),e.next=49,Io(m);case 49:return e.abrupt("continue",54);case 50:p.cancel(),Oo.throwError("processing response error",S.b.errors.SERVER_ERROR,{body:Po(v,a.headers?a.headers["content-type"]:null),error:e.t1,requestBody:Po(u.body,d["content-type"]),requestMethod:u.method,url:s});case 52:return p.cancel(),e.abrupt("return",v);case 54:t++,e.next=1;break;case 57:return e.abrupt("return",Oo.throwError("failed response",S.b.errors.SERVER_ERROR,{requestBody:Po(u.body,d["content-type"]),requestMethod:u.method,url:s}));case 58:case"end":return e.stop()}}),e,null,[[3,22],[29,37]])})))}();return Promise.race([p.promise,v])}function Bo(e,t,r){var n=null;if(null!=t){n=Me(t);var i="string"===typeof e?{url:e}:F(e);if(i.headers)0!==Object.keys(i.headers).filter((function(e){return"content-type"===e.toLowerCase()})).length||(i.headers=F(i.headers),i.headers["content-type"]="application/json");else i.headers={"content-type":"application/json"};e=i}return Ro(e,n,(function(e,t){var n=null;if(null!=e)try{n=JSON.parse(Pe(e))}catch(i){Oo.throwError("invalid JSON",S.b.errors.SERVER_ERROR,{body:e,error:i})}return r&&(n=r(n,t)),n}))}function Do(e,t){return t||(t={}),null==(t=F(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){var i=null,o=!1,a=function(){return!o&&(o=!0,i&&clearTimeout(i),!0)};t.timeout&&(i=setTimeout((function(){a()&&n(new Error("timeout"))}),t.timeout));var s=t.retryLimit,u=0;!function i(){return e().then((function(e){if(void 0!==e)a()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(++u>s)return void(a()&&n(new Error("retry limit reached")));var c=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));c<t.floor&&(c=t.floor),c>t.ceiling&&(c=t.ceiling),setTimeout(i,c)}return null}),(function(e){a()&&n(e)}))}()}))}var No=r(313),Lo=r.n(No),jo="providers/5.3.1",Uo=new S.b(jo),Fo=function(){function e(){Object(v.a)(this,e),Uo.checkNew(this instanceof e?this.constructor:void 0,e),this.formats=this.getDefaultFormats()}return Object(y.a)(e,[{key:"getDefaultFormats",value:function(){var t=this,r={},n=this.address.bind(this),i=this.bigNumber.bind(this),o=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),u=this.hex.bind(this),c=this.number.bind(this);return r.transaction={hash:s,type:e.allowNull(c,null),accessList:e.allowNull(this.accessList.bind(this),null),blockHash:e.allowNull(s,null),blockNumber:e.allowNull(c,null),transactionIndex:e.allowNull(c,null),confirmations:e.allowNull(c,null),from:n,gasPrice:i,gasLimit:i,to:e.allowNull(n,null),value:i,nonce:c,data:a,r:e.allowNull(this.uint256),s:e.allowNull(this.uint256),v:e.allowNull(c),creates:e.allowNull(n,null),raw:e.allowNull(a)},r.transactionRequest={from:e.allowNull(n),nonce:e.allowNull(c),gasLimit:e.allowNull(i),gasPrice:e.allowNull(i),to:e.allowNull(n),value:e.allowNull(i),data:e.allowNull((function(e){return t.data(e,!0)})),type:e.allowNull(c),accessList:e.allowNull(this.accessList.bind(this),null)},r.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:s,address:n,topics:e.arrayOf(s),data:a,logIndex:c,blockHash:s},r.receipt={to:e.allowNull(this.address,null),from:e.allowNull(this.address,null),contractAddress:e.allowNull(n,null),transactionIndex:c,root:e.allowNull(u),gasUsed:i,logsBloom:e.allowNull(a),blockHash:s,transactionHash:s,logs:e.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:e.allowNull(c,null),cumulativeGasUsed:i,status:e.allowNull(c)},r.block={hash:s,parentHash:s,number:c,timestamp:c,nonce:e.allowNull(u),difficulty:this.difficulty.bind(this),gasLimit:i,gasUsed:i,miner:n,extraData:a,transactions:e.allowNull(e.arrayOf(s))},r.blockWithTransactions=F(r.block),r.blockWithTransactions.transactions=e.allowNull(e.arrayOf(this.transactionResponse.bind(this))),r.filter={fromBlock:e.allowNull(o,void 0),toBlock:e.allowNull(o,void 0),blockHash:e.allowNull(s,void 0),address:e.allowNull(n,void 0),topics:e.allowNull(this.topics.bind(this),void 0)},r.filterLog={blockNumber:e.allowNull(c),blockHash:e.allowNull(s),transactionIndex:c,removed:e.allowNull(this.boolean.bind(this)),address:n,data:e.allowFalsish(a,"0x"),topics:e.arrayOf(s),transactionHash:s,logIndex:c},r}},{key:"accessList",value:function(e){return cr(e||[])}},{key:"number",value:function(e){return"0x"===e?0:C.from(e).toNumber()}},{key:"bigNumber",value:function(e){return C.from(e)}},{key:"boolean",value:function(e){if("boolean"===typeof e)return e;if("string"===typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}},{key:"hex",value:function(e,t){return"string"===typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),Object(m.l)(e))?e.toLowerCase():Uo.throwArgumentError("invalid hash","value",e)}},{key:"data",value:function(e,t){var r=this.hex(e,t);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+e);return r}},{key:"address",value:function(e){return be(e)}},{key:"callAddress",value:function(e){if(!Object(m.l)(e,32))return null;var t=be(Object(m.e)(e,12));return t===Yi?null:t}},{key:"contractAddress",value:function(e){return we(e)}},{key:"blockTag",value:function(e){if(null==e)return"latest";if("earliest"===e)return"0x0";if("latest"===e||"pending"===e)return e;if("number"===typeof e||Object(m.l)(e))return Object(m.g)(e);throw new Error("invalid blockTag")}},{key:"hash",value:function(e,t){var r=this.hex(e,t);return 32!==Object(m.d)(r)?Uo.throwArgumentError("invalid hash","value",e):r}},{key:"difficulty",value:function(e){if(null==e)return null;var t=C.from(e);try{return t.toNumber()}catch(r){}return null}},{key:"uint256",value:function(e){if(!Object(m.l)(e))throw new Error("invalid uint256");return Object(m.h)(e,32)}},{key:"_block",value:function(t,r){return null!=t.author&&null==t.miner&&(t.miner=t.author),e.check(r,t)}},{key:"block",value:function(e){return this._block(e,this.formats.block)}},{key:"blockWithTransactions",value:function(e){return this._block(e,this.formats.blockWithTransactions)}},{key:"transactionRequest",value:function(t){return e.check(this.formats.transactionRequest,t)}},{key:"transactionResponse",value:function(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&C.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1===t.type&&null==t.accessList&&(t.accessList=[]);var r=e.check(this.formats.transaction,t);if(null!=t.chainId){var n=t.chainId;Object(m.l)(n)&&(n=C.from(n).toNumber()),r.chainId=n}else{var i=t.networkId;null==i&&null==r.v&&(i=t.chainId),Object(m.l)(i)&&(i=C.from(i).toNumber()),"number"!==typeof i&&null!=r.v&&((i=(r.v-35)/2)<0&&(i=0),i=parseInt(i)),"number"!==typeof i&&(i=0),r.chainId=i}return r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}},{key:"transaction",value:function(e){return hr(e)}},{key:"receiptLog",value:function(t){return e.check(this.formats.receiptLog,t)}},{key:"receipt",value:function(t){var r=e.check(this.formats.receipt,t);if(null!=r.root)if(r.root.length<=4){var n=C.from(r.root).toNumber();0===n||1===n?(null!=r.status&&r.status!==n&&Uo.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Uo.throwArgumentError("invalid alt-root-status","value.root",r.root)}else 66!==r.root.length&&Uo.throwArgumentError("invalid root hash","value.root",r.root);return null!=r.status&&(r.byzantium=!0),r}},{key:"topics",value:function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.topics(e)})):null!=e?this.hash(e,!0):null}},{key:"filter",value:function(t){return e.check(this.formats.filter,t)}},{key:"filterLog",value:function(t){return e.check(this.formats.filterLog,t)}}],[{key:"check",value:function(e,t){var r={};for(var n in e)try{var i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(o){throw o.checkKey=n,o.checkValue=t[n],o}return r}},{key:"allowNull",value:function(e,t){return function(r){return null==r?t:e(r)}}},{key:"allowFalsish",value:function(e,t){return function(r){return r?e(r):t}}},{key:"arrayOf",value:function(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");var r=[];return t.forEach((function(t){r.push(e(t))})),r}}}]),e}();function Ko(e){return e&&"function"===typeof e.isCommunityResource}function zo(e){return Ko(e)&&e.isCommunityResource()}var Vo=!1;function Ho(){Vo||(Vo=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var Jo=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},qo=new S.b(jo);function Go(e){return null==e?"null":(32!==Object(m.d)(e)&&qo.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function Xo(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((function(e){if(Array.isArray(e)){var t={};e.forEach((function(e){t[Go(e)]=!0}));var r=Object.keys(t);return r.sort(),r.join("|")}return Go(e)})).join("&")}function Wo(e){if("string"===typeof e){if(e=e.toLowerCase(),32===Object(m.d)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+Xo(e);if(Ut.isForkEvent(e))throw qo.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+Xo(e.topics||[])}throw new Error("invalid event - "+e)}function Zo(){return(new Date).getTime()}function Yo(e){return new Promise((function(t){setTimeout(t,e)}))}var Qo=["block","network","pending","poll"],$o=function(){function e(t,r,n){Object(v.a)(this,e),N(this,"tag",t),N(this,"listener",r),N(this,"once",n)}return Object(y.a)(e,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}},{key:"filter",get:function(){var e=this.tag.split(":");if("filter"!==e[0])return null;var t,r=e[1],n=""===(t=e[2])?[]:t.split(/&/g).map((function(e){if(""===e)return[];var t=e.split("|").map((function(e){return"null"===e?null:e}));return 1===t.length?t[0]:t})),i={};return n.length>0&&(i.topics=n),r&&"*"!==r&&(i.address=r),i}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||Qo.indexOf(this.tag)>=0}}]),e}(),ea={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function ta(e){return Object(m.h)(C.from(e).toHexString(),32)}function ra(e){return cn.encode(Object(m.b)([e,Object(m.e)(pn(pn(e)),0,4)]))}var na=function(){function e(t,r,n){Object(v.a)(this,e),N(this,"provider",t),N(this,"name",n),N(this,"address",t.formatter.address(r))}return Object(y.a)(e,[{key:"_fetchBytes",value:function(e,t){return Jo(this,void 0,void 0,g.a.mark((function r(){var n,i,o,a;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n={to:this.address,data:Object(m.c)([e,_o(this.name),t||"0x"])},r.next=3,this.provider.call(n);case 3:if("0x"!==(i=r.sent)){r.next=6;break}return r.abrupt("return",null);case 6:return o=C.from(Object(m.e)(i,0,32)).toNumber(),a=C.from(Object(m.e)(i,o,o+32)).toNumber(),r.abrupt("return",Object(m.e)(i,o+32,o+32+a));case 9:case"end":return r.stop()}}),r,this)})))}},{key:"_getAddress",value:function(e,t){var r=ea[String(e)];if(null==r&&qo.throwError("unsupported coin type: ".concat(e),S.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")")}),"eth"===r.ilk)return this.provider.formatter.address(t);var n=Object(m.a)(t);if(null!=r.p2pkh){var i=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){var o=parseInt(i[1],16);if(i[2].length===2*o&&o>=1&&o<=75)return ra(Object(m.b)([[r.p2pkh],"0x"+i[2]]))}}if(null!=r.p2sh){var a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===2*s&&s>=1&&s<=75)return ra(Object(m.b)([[r.p2sh],"0x"+a[2]]))}}if(null!=r.prefix){var u=n[1],c=n[0];if(0===c?20!==u&&32!==u&&(c=-1):c=-1,c>=0&&n.length===2+u&&u>=1&&u<=75){var f=Lo.a.toWords(n.slice(2));return f.unshift(c),Lo.a.encode(r.prefix,f)}}return null}},{key:"getAddress",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n,i,o;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e&&(e=60),60!==e){t.next=9;break}return r={to:this.address,data:"0x3b3b57de"+_o(this.name).substring(2)},t.next=5,this.provider.call(r);case 5:if("0x"!==(n=t.sent)&&n!==Qi){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",this.provider.formatter.callAddress(n));case 9:return t.next=11,this._fetchBytes("0xf1cb7e06",ta(e));case 11:if(null!=(i=t.sent)&&"0x"!==i){t.next=14;break}return t.abrupt("return",null);case 14:return null==(o=this._getAddress(e,i))&&qo.throwError("invalid or unsupported coin data",S.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:i}),t.abrupt("return",o);case 17:case"end":return t.stop()}}),t,this)})))}},{key:"getContentHash",value:function(){return Jo(this,void 0,void 0,g.a.mark((function e(){var t,r,n,i;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._fetchBytes("0xbc1c58d1");case 2:if(null!=(t=e.sent)&&"0x"!==t){e.next=5;break}return e.abrupt("return",null);case 5:if(!(r=t.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){e.next=10;break}if(n=parseInt(r[3],16),r[4].length!==2*n){e.next=10;break}return e.abrupt("return","ipfs://"+cn.encode("0x"+r[1]));case 10:if(!(i=t.match(/^0xe40101fa011b20([0-9a-f]*)$/))){e.next=14;break}if(64!==i[1].length){e.next=14;break}return e.abrupt("return","bzz://"+i[1]);case 14:return e.abrupt("return",qo.throwError("invalid or unsupported content hash data",S.b.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t}));case 15:case"end":return e.stop()}}),e,this)})))}},{key:"getText",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Me(e),(r=Object(m.b)([ta(64),ta(r.length),r])).length%32!==0&&(r=Object(m.b)([r,Object(m.h)("0x",32-e.length%32)])),t.next=5,this._fetchBytes("0x59d1d43c",Object(m.i)(r));case 5:if(null!=(n=t.sent)&&"0x"!==n){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",Pe(n));case 9:case"end":return t.stop()}}),t,this)})))}}]),e}(),ia=null,oa=1,aa=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e){var n;if(Object(v.a)(this,r),qo.checkNew(this instanceof r?this.constructor:void 0,Ft),(n=t.call(this))._events=[],n._emitted={block:-2},n.formatter=(this instanceof r?this.constructor:void 0).getFormatter(),N(Object(f.a)(n),"anyNetwork","any"===e),n.anyNetwork&&(e=n.detectNetwork()),e instanceof Promise)n._networkPromise=e,e.catch((function(e){})),n._ready().catch((function(e){}));else{var i=L(this instanceof r?this.constructor:void 0,"getNetwork")(e);i?(N(Object(f.a)(n),"_network",i),n.emit("network",i,null)):qo.throwArgumentError("invalid network","network",e)}return n._maxInternalBlockNumber=-1024,n._lastBlockNumber=-2,n._pollingInterval=4e3,n._fastQueryDate=0,n}return Object(y.a)(r,[{key:"_ready",value:function(){return Jo(this,void 0,void 0,g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=this._network){e.next=17;break}if(t=null,!this._networkPromise){e.next=11;break}return e.prev=3,e.next=6,this._networkPromise;case 6:t=e.sent,e.next=11;break;case 9:e.prev=9,e.t0=e.catch(3);case 11:if(null!=t){e.next=15;break}return e.next=14,this.detectNetwork();case 14:t=e.sent;case 15:t||qo.throwError("no network detected",S.b.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=t:N(this,"_network",t),this.emit("network",t,null));case 17:return e.abrupt("return",this._network);case 18:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"ready",get:function(){var e=this;return Do((function(){return e._ready().then((function(e){return e}),(function(e){if(e.code!==S.b.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}))}},{key:"_getInternalBlockNumber",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n,i,o,a=this;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:if(!(e>0)){t.next=20;break}case 3:if(!this._internalBlockNumber){t.next=20;break}return r=this._internalBlockNumber,t.prev=5,t.next=8,r;case 8:if(n=t.sent,!(Zo()-n.respTime<=e)){t.next=11;break}return t.abrupt("return",n.blockNumber);case 11:return t.abrupt("break",20);case 14:if(t.prev=14,t.t0=t.catch(5),this._internalBlockNumber!==r){t.next=18;break}return t.abrupt("break",20);case 18:t.next=3;break;case 20:return i=Zo(),o=j({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(e){return null}),(function(e){return e}))}).then((function(e){var t=e.blockNumber,r=e.networkError;if(r)throw a._internalBlockNumber===o&&(a._internalBlockNumber=null),r;var n=Zo();return(t=C.from(t).toNumber())<a._maxInternalBlockNumber&&(t=a._maxInternalBlockNumber),a._maxInternalBlockNumber=t,a._setFastBlockNumber(t),{blockNumber:t,reqTime:i,respTime:n}})),this._internalBlockNumber=o,o.catch((function(e){a._internalBlockNumber===o&&(a._internalBlockNumber=null)})),t.next=26,o;case 26:return t.abrupt("return",t.sent.blockNumber);case 27:case"end":return t.stop()}}),t,this,[[5,14]])})))}},{key:"poll",value:function(){return Jo(this,void 0,void 0,g.a.mark((function e(){var t,r,n,i,o=this;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=oa++,r=[],n=null,e.prev=3,e.next=6,this._getInternalBlockNumber(100+this.pollingInterval/2);case 6:n=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),this.emit("error",e.t0),e.abrupt("return");case 13:if(this._setFastBlockNumber(n),this.emit("poll",t,n),n!==this._lastBlockNumber){e.next=18;break}return this.emit("didPoll",t),e.abrupt("return");case 18:if(-2===this._emitted.block&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)qo.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(n,")")),this.emit("error",qo.makeError("network block skew detected",S.b.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(i=this._emitted.block+1;i<=n;i++)this.emit("block",i);return this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach((function(e){if("block"!==e){var t=o._emitted[e];"pending"!==t&&n-t>12&&delete o._emitted[e]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=n-1),this._events.forEach((function(e){switch(e.type){case"tx":var t=e.hash,i=o.getTransactionReceipt(t).then((function(e){return e&&null!=e.blockNumber?(o._emitted["t:"+t]=e.blockNumber,o.emit(t,e),null):null})).catch((function(e){o.emit("error",e)}));r.push(i);break;case"filter":var a=e.filter;a.fromBlock=o._lastBlockNumber+1,a.toBlock=n;var s=o.getLogs(a).then((function(e){0!==e.length&&e.forEach((function(e){o._emitted["b:"+e.blockHash]=e.blockNumber,o._emitted["t:"+e.transactionHash]=e.blockNumber,o.emit(a,e)}))})).catch((function(e){o.emit("error",e)}));r.push(s)}})),this._lastBlockNumber=n,Promise.all(r).then((function(){o.emit("didPoll",t)})).catch((function(e){o.emit("error",e)})),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return Jo(this,void 0,void 0,g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",qo.throwError("provider does not support network detection",S.b.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return e.stop()}}),e)})))}},{key:"getNetwork",value:function(){return Jo(this,void 0,void 0,g.a.mark((function e(){var t,r,n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:return t=e.sent,e.next=5,this.detectNetwork();case 5:if(r=e.sent,t.chainId===r.chainId){e.next=23;break}if(!this.anyNetwork){e.next=20;break}return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,t),e.next=19,Yo(0);case 19:return e.abrupt("return",this._network);case 20:throw n=qo.makeError("underlying network changed",S.b.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:r}),this.emit("error",n),n;case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"blockNumber",get:function(){var e=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(t){e._setFastBlockNumber(t)}),(function(e){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(e){var t=this;e&&!this._poller?(this._poller=setInterval((function(){t.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){t.poll(),t._bootstrapPoll=setTimeout((function(){t._poller||t.poll(),t._bootstrapPoll=null}),t.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(e){var t=this;if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){t.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var e=this,t=Zo();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=Zo(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}},{key:"waitForTransaction",value:function(e,t,r){return Jo(this,void 0,void 0,g.a.mark((function n(){return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._waitForTransaction(e,null==t?1:t,r||0,null));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_waitForTransaction",value:function(e,t,r,n){return Jo(this,void 0,void 0,g.a.mark((function i(){var o,a=this;return g.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getTransactionReceipt(e);case 2:if(!(((o=i.sent)?o.confirmations:0)>=t)){i.next=5;break}return i.abrupt("return",o);case 5:return i.abrupt("return",new Promise((function(i,o){var s=[],u=!1,c=function(){return!!u||(u=!0,s.forEach((function(e){e()})),!1)},f=function(e){e.confirmations<t||c()||i(e)};if(a.on(e,f),s.push((function(){a.removeListener(e,f)})),n){var l=n.startBlock,h=null,d=function r(i){return Jo(a,void 0,void 0,g.a.mark((function a(){var s=this;return g.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!u){a.next=2;break}return a.abrupt("return");case 2:return a.next=4,Yo(1e3);case 4:this.getTransactionCount(n.from).then((function(a){return Jo(s,void 0,void 0,g.a.mark((function s(){var f,d,p,v,y,b;return g.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!u){s.next=2;break}return s.abrupt("return");case 2:if(!(a<=n.nonce)){s.next=6;break}l=i,s.next=41;break;case 6:return s.next=8,this.getTransaction(e);case 8:if(!(f=s.sent)||null==f.blockNumber){s.next=11;break}return s.abrupt("return");case 11:null==h&&(h=l-3)<n.startBlock&&(h=n.startBlock);case 12:if(!(h<=i)){s.next=41;break}if(!u){s.next=15;break}return s.abrupt("return");case 15:return s.next=17,this.getBlockWithTransactions(h);case 17:d=s.sent,p=0;case 19:if(!(p<d.transactions.length)){s.next=38;break}if((v=d.transactions[p]).hash!==e){s.next=23;break}return s.abrupt("return");case 23:if(v.from!==n.from||v.nonce!==n.nonce){s.next=35;break}if(!u){s.next=26;break}return s.abrupt("return");case 26:return s.next=28,this.waitForTransaction(v.hash,t);case 28:if(y=s.sent,!c()){s.next=31;break}return s.abrupt("return");case 31:return b="replaced",v.data===n.data&&v.to===n.to&&v.value.eq(n.value)?b="repriced":"0x"===v.data&&v.from===v.to&&v.value.isZero()&&(b="cancelled"),o(qo.makeError("transaction was replaced",S.b.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===b||"cancelled"===b,reason:b,replacement:this._wrapTransaction(v),hash:e,receipt:y})),s.abrupt("return");case 35:p++,s.next=19;break;case 38:h++,s.next=12;break;case 41:if(!u){s.next=43;break}return s.abrupt("return");case 43:this.once("block",r);case 44:case"end":return s.stop()}}),s,this)})))}),(function(e){u||s.once("block",r)}));case 5:case"end":return a.stop()}}),a,this)})))};if(u)return;a.once("block",d),s.push((function(){a.removeListener("block",d)}))}if("number"===typeof r&&r>0){var p=setTimeout((function(){c()||o(qo.makeError("timeout exceeded",S.b.errors.TIMEOUT,{timeout:r}))}),r);p.unref&&p.unref(),s.push((function(){clearTimeout(p)}))}})));case 6:case"end":return i.stop()}}),i,this)})))}},{key:"getBlockNumber",value:function(){return Jo(this,void 0,void 0,g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return Jo(this,void 0,void 0,g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,this.perform("getGasPrice",{});case 4:return t=e.sent,e.prev=5,e.abrupt("return",C.from(t));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",qo.throwError("bad result from backend",S.b.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e.t0}));case 12:case"end":return e.stop()}}),e,this,[[5,9]])})))}},{key:"getBalance",value:function(e,t){return Jo(this,void 0,void 0,g.a.mark((function r(){var n,i;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,j({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getBalance",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",C.from(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",qo.throwError("bad result from backend",S.b.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(e,t){return Jo(this,void 0,void 0,g.a.mark((function r(){var n,i;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,j({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getTransactionCount",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",C.from(i).toNumber());case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",qo.throwError("bad result from backend",S.b.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getCode",value:function(e,t){return Jo(this,void 0,void 0,g.a.mark((function r(){var n,i;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,j({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getCode",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",Object(m.i)(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",qo.throwError("bad result from backend",S.b.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getStorageAt",value:function(e,t,r){return Jo(this,void 0,void 0,g.a.mark((function n(){var i,o;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,j({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((function(e){return Object(m.g)(e)}))});case 4:return i=n.sent,n.next=7,this.perform("getStorageAt",i);case 7:return o=n.sent,n.prev=8,n.abrupt("return",Object(m.i)(o));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",qo.throwError("bad result from backend",S.b.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(e,t,r){var n=this;if(null!=t&&32!==Object(m.d)(t))throw new Error("invalid response - sendTransaction");var i=e;return null!=t&&e.hash!==t&&qo.throwError("Transaction hash mismatch from Provider.sendTransaction.",S.b.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=function(t,i){return Jo(n,void 0,void 0,g.a.mark((function n(){var o,a;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==t&&(t=1),null==i&&(i=0),o=void 0,0!==t&&null!=r&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r}),n.next=6,this._waitForTransaction(e.hash,t,i,o);case 6:if(null!=(a=n.sent)||0!==t){n.next=9;break}return n.abrupt("return",null);case 9:return this._emitted["t:"+e.hash]=a.blockNumber,0===a.status&&qo.throwError("transaction failed",S.b.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:a}),n.abrupt("return",a);case 12:case"end":return n.stop()}}),n,this)})))},i}},{key:"sendTransaction",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n,i,o;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Promise.resolve(e).then((function(e){return Object(m.i)(e)}));case 4:return r=t.sent,n=this.formatter.transaction(e),t.next=8,this._getInternalBlockNumber(100+2*this.pollingInterval);case 8:return i=t.sent,t.prev=9,t.next=12,this.perform("sendTransaction",{signedTransaction:r});case 12:return o=t.sent,t.abrupt("return",this._wrapTransaction(n,o,i));case 16:throw t.prev=16,t.t0=t.catch(9),t.t0.transaction=n,t.t0.transactionHash=n.hash,t.t0;case 21:case"end":return t.stop()}}),t,this,[[9,16]])})))}},{key:"_getTransactionRequest",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n,i=this;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return r=t.sent,n={},["from","to"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?i._getAddress(e):null})))})),["gasLimit","gasPrice","value"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?C.from(e):null})))})),["type"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return null!=e?e:null})))})),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?Object(m.i)(e):null})))})),t.t0=this.formatter,t.next=12,j(n);case 12:return t.t1=t.sent,t.abrupt("return",t.t0.transactionRequest.call(t.t0,t.t1));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"_getFilter",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n=this;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,r={},null!=e.address&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach((function(t){null!=e[t]&&(r[t]=e[t])})),["fromBlock","toBlock"].forEach((function(t){null!=e[t]&&(r[t]=n._getBlockTag(e[t]))})),t.t0=this.formatter,t.next=10,j(r);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.filter.call(t.t0,t.t1));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"call",value:function(e,t){return Jo(this,void 0,void 0,g.a.mark((function r(){var n,i;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,j({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("call",n);case 7:return i=r.sent,r.prev=8,r.abrupt("return",Object(m.i)(i));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",qo.throwError("bad result from backend",S.b.errors.SERVER_ERROR,{method:"call",params:n,result:i,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"estimateGas",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,j({transaction:this._getTransactionRequest(e)});case 4:return r=t.sent,t.next=7,this.perform("estimateGas",r);case 7:return n=t.sent,t.prev=8,t.abrupt("return",C.from(n));case 12:return t.prev=12,t.t0=t.catch(8),t.abrupt("return",qo.throwError("bad result from backend",S.b.errors.SERVER_ERROR,{method:"estimateGas",params:r,result:n,error:t.t0}));case 15:case"end":return t.stop()}}),t,this,[[8,12]])})))}},{key:"_getAddress",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.resolveName(e);case 2:return null==(r=t.sent)&&qo.throwError("ENS name not configured",S.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName(".concat(JSON.stringify(e),")")}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"_getBlock",value:function(e,t){return Jo(this,void 0,void 0,g.a.mark((function r(){var n,i,o=this;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,e;case 4:if(e=r.sent,n=-128,i={includeTransactions:!!t},!Object(m.l)(e,32)){r.next=11;break}i.blockHash=e,r.next=23;break;case 11:return r.prev=11,r.t0=this.formatter,r.next=15,this._getBlockTag(e);case 15:r.t1=r.sent,i.blockTag=r.t0.blockTag.call(r.t0,r.t1),Object(m.l)(i.blockTag)&&(n=parseInt(i.blockTag.substring(2),16)),r.next=23;break;case 20:r.prev=20,r.t2=r.catch(11),qo.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e);case 23:return r.abrupt("return",Do((function(){return Jo(o,void 0,void 0,g.a.mark((function e(){var r,o,a,s,u;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getBlock",i);case 2:if(null!=(r=e.sent)){e.next=11;break}if(null==i.blockHash){e.next=7;break}if(null!=this._emitted["b:"+i.blockHash]){e.next=7;break}return e.abrupt("return",null);case 7:if(null==i.blockTag){e.next=10;break}if(!(n>this._emitted.block)){e.next=10;break}return e.abrupt("return",null);case 10:return e.abrupt("return",void 0);case 11:if(!t){e.next=32;break}o=null,a=0;case 14:if(!(a<r.transactions.length)){e.next=31;break}if(null!=(s=r.transactions[a]).blockNumber){e.next=20;break}s.confirmations=0,e.next=28;break;case 20:if(null!=s.confirmations){e.next=28;break}if(null!=o){e.next=25;break}return e.next=24,this._getInternalBlockNumber(100+2*this.pollingInterval);case 24:o=e.sent;case 25:(u=o-s.blockNumber+1)<=0&&(u=1),s.confirmations=u;case 28:a++,e.next=14;break;case 31:return e.abrupt("return",this.formatter.blockWithTransactions(r));case 32:return e.abrupt("return",this.formatter.block(r));case 33:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this}));case 24:case"end":return r.stop()}}),r,this,[[11,20]])})))}},{key:"getBlock",value:function(e){return this._getBlock(e,!1)}},{key:"getBlockWithTransactions",value:function(e){return this._getBlock(e,!0)}},{key:"getTransaction",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n=this;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,e;case 4:return e=t.sent,r={transactionHash:this.formatter.hash(e,!0)},t.abrupt("return",Do((function(){return Jo(n,void 0,void 0,g.a.mark((function t(){var n,i,o,a;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.perform("getTransaction",r);case 2:if(null!=(n=t.sent)){t.next=7;break}if(null!=this._emitted["t:"+e]){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",void 0);case 7:if(null!=(i=this.formatter.transactionResponse(n)).blockNumber){t.next=12;break}i.confirmations=0,t.next=19;break;case 12:if(null!=i.confirmations){t.next=19;break}return t.next=15,this._getInternalBlockNumber(100+2*this.pollingInterval);case 15:o=t.sent,(a=o-i.blockNumber+1)<=0&&(a=1),i.confirmations=a;case 19:return t.abrupt("return",this._wrapTransaction(i));case 20:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this}));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getTransactionReceipt",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n=this;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,e;case 4:return e=t.sent,r={transactionHash:this.formatter.hash(e,!0)},t.abrupt("return",Do((function(){return Jo(n,void 0,void 0,g.a.mark((function t(){var n,i,o,a;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.perform("getTransactionReceipt",r);case 2:if(null!=(n=t.sent)){t.next=7;break}if(null!=this._emitted["t:"+e]){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",void 0);case 7:if(null!=n.blockHash){t.next=9;break}return t.abrupt("return",void 0);case 9:if(null!=(i=this.formatter.receipt(n)).blockNumber){t.next=14;break}i.confirmations=0,t.next=21;break;case 14:if(null!=i.confirmations){t.next=21;break}return t.next=17,this._getInternalBlockNumber(100+2*this.pollingInterval);case 17:o=t.sent,(a=o-i.blockNumber+1)<=0&&(a=1),i.confirmations=a;case 21:return t.abrupt("return",i);case 22:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this}));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getLogs",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,j({filter:this._getFilter(e)});case 4:return r=t.sent,t.next=7,this.perform("getLogs",r);case 7:return(n=t.sent).forEach((function(e){null==e.removed&&(e.removed=!1)})),t.abrupt("return",Fo.arrayOf(this.formatter.filterLog.bind(this.formatter))(n));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"getEtherPrice",value:function(){return Jo(this,void 0,void 0,g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.abrupt("return",this.perform("getEtherPrice",{}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"_getBlockTag",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:if(!("number"===typeof(e=t.sent)&&e<0)){t.next=11;break}return e%1&&qo.throwArgumentError("invalid BlockTag","blockTag",e),t.next=7,this._getInternalBlockNumber(100+2*this.pollingInterval);case 7:return r=t.sent,(r+=e)<0&&(r=0),t.abrupt("return",this.formatter.blockTag(r));case 11:return t.abrupt("return",this.formatter.blockTag(e));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"getResolver",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._getResolver(e);case 2:if(null!=(r=t.sent)){t.next=5;break}return t.abrupt("return",null);case 5:return t.abrupt("return",new na(this,r,e));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"_getResolver",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return(r=t.sent).ensAddress||qo.throwError("network does not support ENS",S.b.errors.UNSUPPORTED_OPERATION,{operation:"ENS",network:r.name}),n={to:r.ensAddress,data:"0x0178b8bf"+_o(e).substring(2)},t.t0=this.formatter,t.next=8,this.call(n);case 8:return t.t1=t.sent,t.abrupt("return",t.t0.callAddress.call(t.t0,t.t1));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"resolveName",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,t.prev=3,t.abrupt("return",Promise.resolve(this.formatter.address(e)));case 7:if(t.prev=7,t.t0=t.catch(3),!Object(m.l)(e)){t.next=11;break}throw t.t0;case 11:return"string"!==typeof e&&qo.throwArgumentError("invalid ENS name","name",e),t.next=14,this.getResolver(e);case 14:if(r=t.sent){t.next=17;break}return t.abrupt("return",null);case 17:return t.next=19,r.getAddress();case 19:return t.abrupt("return",t.sent);case 20:case"end":return t.stop()}}),t,this,[[3,7]])})))}},{key:"lookupAddress",value:function(e){return Jo(this,void 0,void 0,g.a.mark((function t(){var r,n,i,o,a;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,e=this.formatter.address(e),r=e.substring(2).toLowerCase()+".addr.reverse",t.next=7,this._getResolver(r);case 7:if(n=t.sent){t.next=10;break}return t.abrupt("return",null);case 10:return t.t0=m.a,t.next=13,this.call({to:n,data:"0x691f3431"+_o(r).substring(2)});case 13:if(t.t1=t.sent,!((i=(0,t.t0)(t.t1)).length<32)&&C.from(i.slice(0,32)).eq(32)){t.next=17;break}return t.abrupt("return",null);case 17:if(!((i=i.slice(32)).length<32)){t.next=20;break}return t.abrupt("return",null);case 20:if(o=C.from(i.slice(0,32)).toNumber(),i=i.slice(32),!(o>i.length)){t.next=24;break}return t.abrupt("return",null);case 24:return a=Pe(i.slice(0,o)),t.next=27,this.resolveName(a);case 27:if(t.sent==e){t.next=30;break}return t.abrupt("return",null);case 30:return t.abrupt("return",a);case 31:case"end":return t.stop()}}),t,this)})))}},{key:"perform",value:function(e,t){return qo.throwError(e+" not implemented",S.b.errors.NOT_IMPLEMENTED,{operation:e})}},{key:"_startEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_stopEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_addEventListener",value:function(e,t,r){var n=new $o(Wo(e),t,r);return this._events.push(n),this._startEvent(n),this}},{key:"on",value:function(e,t){return this._addEventListener(e,t,!1)}},{key:"once",value:function(e,t){return this._addEventListener(e,t,!0)}},{key:"emit",value:function(e){for(var t=this,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=!1,a=[],s=Wo(e);return this._events=this._events.filter((function(e){return e.tag!==s||(setTimeout((function(){e.listener.apply(t,n)}),0),o=!0,!e.once||(a.push(e),!1))})),a.forEach((function(e){t._stopEvent(e)})),o}},{key:"listenerCount",value:function(e){if(!e)return this._events.length;var t=Wo(e);return this._events.filter((function(e){return e.tag===t})).length}},{key:"listeners",value:function(e){if(null==e)return this._events.map((function(e){return e.listener}));var t=Wo(e);return this._events.filter((function(e){return e.tag===t})).map((function(e){return e.listener}))}},{key:"off",value:function(e,t){var r=this;if(null==t)return this.removeAllListeners(e);var n=[],i=!1,o=Wo(e);return this._events=this._events.filter((function(e){return e.tag!==o||e.listener!=t||(!!i||(i=!0,n.push(e),!1))})),n.forEach((function(e){r._stopEvent(e)})),this}},{key:"removeAllListeners",value:function(e){var t=this,r=[];if(null==e)r=this._events,this._events=[];else{var n=Wo(e);this._events=this._events.filter((function(e){return e.tag!==n||(r.push(e),!1)}))}return r.forEach((function(e){t._stopEvent(e)})),this}}],[{key:"getFormatter",value:function(){return null==ia&&(ia=new Fo),ia}},{key:"getNetwork",value:function(e){return so(null==e?"homestead":e)}}]),r}(Ft),sa=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},ua=new S.b(jo),ca=["call","estimateGas"];function fa(e,t,r){if("call"===e&&t.code===S.b.errors.SERVER_ERROR){var n=t.error;if(n&&n.message.match("reverted")&&Object(m.l)(n.data))return n.data}var i=t.message;t.code===S.b.errors.SERVER_ERROR&&t.error&&"string"===typeof t.error.message?i=t.error.message:"string"===typeof t.body?i=t.body:"string"===typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase();var o=r.transaction||r.signedTransaction;throw i.match(/insufficient funds/)&&ua.throwError("insufficient funds for intrinsic transaction cost",S.b.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:o}),i.match(/nonce too low/)&&ua.throwError("nonce has already been used",S.b.errors.NONCE_EXPIRED,{error:t,method:e,transaction:o}),i.match(/replacement transaction underpriced/)&&ua.throwError("replacement fee too low",S.b.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:o}),i.match(/only replay-protected/)&&ua.throwError("legacy pre-eip-155 transactions not supported",S.b.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:o}),ca.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&ua.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",S.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:o}),t}function la(e){return new Promise((function(t){setTimeout(t,e)}))}function ha(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function da(e){return e?e.toLowerCase():e}var pa={},va=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n,i){var o;if(Object(v.a)(this,r),ua.checkNew(this instanceof r?this.constructor:void 0,r),o=t.call(this),e!==pa)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return N(Object(f.a)(o),"provider",n),null==i&&(i=0),"string"===typeof i?(N(Object(f.a)(o),"_address",o.provider.formatter.address(i)),N(Object(f.a)(o),"_index",null)):"number"===typeof i?(N(Object(f.a)(o),"_index",i),N(Object(f.a)(o),"_address",null)):ua.throwArgumentError("invalid address or index","addressOrIndex",i),o}return Object(y.a)(r,[{key:"connect",value:function(e){return ua.throwError("cannot alter JSON-RPC Signer connection",S.b.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new ya(pa,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var e=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(t){return t.length<=e._index&&ua.throwError("unknown account #"+e._index,S.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),e.provider.formatter.address(t[e._index])}))}},{key:"sendUncheckedTransaction",value:function(e){var t=this;e=F(e);var r=this.getAddress().then((function(e){return e&&(e=e.toLowerCase()),e}));if(null==e.gasLimit){var n=F(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return j({tx:j(e),sender:r}).then((function(r){var n=r.tx,i=r.sender;null!=n.from?n.from.toLowerCase()!==i&&ua.throwArgumentError("from address mismatch","transaction",e):n.from=i;var o=t.provider.constructor.hexlifyTransaction(n,{from:!0});return t.provider.send("eth_sendTransaction",[o]).then((function(e){return e}),(function(e){return fa("sendTransaction",e,o)}))}))}},{key:"signTransaction",value:function(e){return ua.throwError("signing transactions is unsupported",S.b.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(e){return sa(this,void 0,void 0,g.a.mark((function t(){var r,n,i=this;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);case 2:return r=t.sent,t.next=5,this.sendUncheckedTransaction(e);case 5:return n=t.sent,t.prev=6,t.next=9,Do((function(){return sa(i,void 0,void 0,g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.getTransaction(n);case 2:if(null!==(t=e.sent)){e.next=5;break}return e.abrupt("return",void 0);case 5:return e.abrupt("return",this.provider._wrapTransaction(t,n,r));case 6:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this.provider});case 9:return t.abrupt("return",t.sent);case 12:throw t.prev=12,t.t0=t.catch(6),t.t0.transactionHash=n,t.t0;case 16:case"end":return t.stop()}}),t,this,[[6,12]])})))}},{key:"signMessage",value:function(e){return sa(this,void 0,void 0,g.a.mark((function t(){var r,n;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="string"===typeof e?Me(e):e,t.next=3,this.getAddress();case 3:return n=t.sent,t.next=6,this.provider.send("eth_sign",[n.toLowerCase(),Object(m.i)(r)]);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"_signTypedData",value:function(e,t,r){return sa(this,void 0,void 0,g.a.mark((function n(){var i,o,a=this;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,sn.resolveNames(e,t,r,(function(e){return a.provider.resolveName(e)}));case 2:return i=n.sent,n.next=5,this.getAddress();case 5:return o=n.sent,n.next=8,this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(sn.getPayload(i.domain,t,i.value))]);case 8:return n.abrupt("return",n.sent);case 9:case"end":return n.stop()}}),n,this)})))}},{key:"unlock",value:function(e){return sa(this,void 0,void 0,g.a.mark((function t(){var r,n;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.provider,t.next=3,this.getAddress();case 3:return n=t.sent,t.abrupt("return",r.send("personal_unlockAccount",[n.toLowerCase(),e,null]));case 5:case"end":return t.stop()}}),t,this)})))}}]),r}(Jt),ya=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return{hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(r){return t.provider.waitForTransaction(e,r)}}}))}}]),r}(va),ba={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0},ga=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;Object(v.a)(this,r),ua.checkNew(this instanceof r?this.constructor:void 0,r);var o=n;return null==o&&(o=new Promise((function(e,t){setTimeout((function(){i.detectNetwork().then((function(t){e(t)}),(function(e){t(e)}))}),0)}))),i=t.call(this,o),e||(e=L(i.constructor,"defaultUrl")()),N(Object(f.a)(i),"connection","string"===typeof e?Object.freeze({url:e}):Object.freeze(F(e))),i._nextId=42,i}return Object(y.a)(r,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var e=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){e._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return sa(this,void 0,void 0,g.a.mark((function e(){var t,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,la(0);case 2:return t=null,e.prev=3,e.next=6,this.send("eth_chainId",[]);case 6:t=e.sent,e.next=19;break;case 9:return e.prev=9,e.t0=e.catch(3),e.prev=11,e.next=14,this.send("net_version",[]);case 14:t=e.sent,e.next=19;break;case 17:e.prev=17,e.t1=e.catch(11);case 19:if(null==t){e.next=28;break}return r=L(this.constructor,"getNetwork"),e.prev=21,e.abrupt("return",r(C.from(t).toNumber()));case 25:return e.prev=25,e.t2=e.catch(21),e.abrupt("return",ua.throwError("could not detect network",S.b.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e.t2}));case 28:return e.abrupt("return",ua.throwError("could not detect network",S.b.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return e.stop()}}),e,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(e){return new va(pa,this,e)}},{key:"getUncheckedSigner",value:function(e){return this.getSigner(e).connectUnchecked()}},{key:"listAccounts",value:function(){var e=this;return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return e.formatter.address(t)}))}))}},{key:"send",value:function(e,t){var r=this,n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:H(n),provider:this});var i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];var o=Bo(this.connection,JSON.stringify(n),ha).then((function(e){return r.emit("debug",{action:"response",request:n,response:e,provider:r}),e}),(function(e){throw r.emit("debug",{action:"response",error:e,request:n,provider:r}),e}));return i&&(this._cache[e]=o,setTimeout((function(){r._cache[e]=null}),0)),o}},{key:"prepareRequest",value:function(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[da(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[da(t.address),t.blockTag]];case"getCode":return["eth_getCode",[da(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[da(t.address),t.position,t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[L(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[L(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=da(t.filter.address)),["eth_getLogs",[t.filter]]}return null}},{key:"perform",value:function(e,t){return sa(this,void 0,void 0,g.a.mark((function r(){var n;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==(n=this.prepareRequest(e,t))&&ua.throwError(e+" not implemented",S.b.errors.NOT_IMPLEMENTED,{operation:e}),r.prev=2,r.next=5,this.send(n[0],n[1]);case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),r.abrupt("return",fa(e,r.t0,t));case 11:case"end":return r.stop()}}),r,this,[[2,8]])})))}},{key:"_startEvent",value:function(e){"pending"===e.tag&&this._startPending(),h(Object(l.a)(r.prototype),"_startEvent",this).call(this,e)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;var n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return la(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((function(e){}))}(),r})).catch((function(e){}))}}},{key:"_stopEvent",value:function(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),h(Object(l.a)(r.prototype),"_stopEvent",this).call(this,e)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(e,t){var r=F(ba);if(t)for(var n in t)t[n]&&(r[n]=!0);U(e,r);var i={};return["gasLimit","gasPrice","type","nonce","value"].forEach((function(t){if(null!=e[t]){var r=Object(m.g)(e[t]);"gasLimit"===t&&(t="gas"),i[t]=r}})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=Object(m.i)(e[t]))})),e.accessList&&(i.accessList=cr(e.accessList)),i}}]),r}(aa),ma=null;try{if(null==(ma=WebSocket))throw new Error("inject please")}catch(Vs){var wa=new S.b(jo);ma=function(){wa.throwError("WebSockets not supported in this environment",S.b.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var ka=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Sa=new S.b(jo),Ea=1,_a=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i,o;Object(v.a)(this,r),"any"===n&&Sa.throwError("WebSocketProvider does not support 'any' network yet",S.b.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),(o=t.call(this,e,n))._pollingInterval=-1,o._wsReady=!1,N(Object(f.a)(o),"_websocket",new ma(o.connection.url)),N(Object(f.a)(o),"_requests",{}),N(Object(f.a)(o),"_subs",{}),N(Object(f.a)(o),"_subIds",{}),N(Object(f.a)(o),"_detectNetwork",h((i=Object(f.a)(o),Object(l.a)(r.prototype)),"detectNetwork",i).call(i)),o._websocket.onopen=function(){o._wsReady=!0,Object.keys(o._requests).forEach((function(e){o._websocket.send(o._requests[e].payload)}))},o._websocket.onmessage=function(e){var t=e.data,r=JSON.parse(t);if(null!=r.id){var n=String(r.id),i=o._requests[n];if(delete o._requests[n],void 0!==r.result)i.callback(null,r.result),o.emit("debug",{action:"response",request:JSON.parse(i.payload),response:r.result,provider:Object(f.a)(o)});else{var a=null;r.error?(N(a=new Error(r.error.message||"unknown error"),"code",r.error.code||null),N(a,"response",t)):a=new Error("unknown error"),i.callback(a,void 0),o.emit("debug",{action:"response",error:a,request:JSON.parse(i.payload),provider:Object(f.a)(o)})}}else if("eth_subscription"===r.method){var s=o._subs[r.params.subscription];s&&s.processFunc(r.params.result)}else console.warn("this should not happen")};var a=setInterval((function(){o.emit("poll")}),1e3);return a.unref&&a.unref(),o}return Object(y.a)(r,[{key:"detectNetwork",value:function(){return this._detectNetwork}},{key:"pollingInterval",get:function(){return 0},set:function(e){Sa.throwError("cannot set polling interval on WebSocketProvider",S.b.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}},{key:"resetEventsBlock",value:function(e){Sa.throwError("cannot reset events block on WebSocketProvider",S.b.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}},{key:"poll",value:function(){return ka(this,void 0,void 0,g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)})))}},{key:"polling",set:function(e){e&&Sa.throwError("cannot set polling on WebSocketProvider",S.b.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}},{key:"send",value:function(e,t){var r=this,n=Ea++;return new Promise((function(i,o){var a=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});r.emit("debug",{action:"request",request:JSON.parse(a),provider:r}),r._requests[String(n)]={callback:function(e,t){return e?o(e):i(t)},payload:a},r._wsReady&&r._websocket.send(a)}))}},{key:"_subscribe",value:function(e,t,r){return ka(this,void 0,void 0,g.a.mark((function n(){var i,o,a=this;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==(i=this._subIds[e])&&(i=Promise.all(t).then((function(e){return a.send("eth_subscribe",e)})),this._subIds[e]=i),n.next=4,i;case 4:o=n.sent,this._subs[o]={tag:e,processFunc:r};case 6:case"end":return n.stop()}}),n,this)})))}},{key:"_startEvent",value:function(e){var t=this;switch(e.type){case"block":this._subscribe("block",["newHeads"],(function(e){var r=C.from(e.number).toNumber();t._emitted.block=r,t.emit("block",r)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(function(e){t.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(function(r){null==r.removed&&(r.removed=!1),t.emit(e.filter,t.formatter.filterLog(r))}));break;case"tx":var r=function(e){var r=e.hash;t.getTransactionReceipt(r).then((function(e){e&&t.emit(r,e)}))};r(e),this._subscribe("tx",["newHeads"],(function(e){t._events.filter((function(e){return"tx"===e.type})).forEach(r)}));break;case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}},{key:"_stopEvent",value:function(e){var t=this,r=e.tag;if("tx"===e.type){if(this._events.filter((function(e){return"tx"===e.type})).length)return;r="tx"}else if(this.listenerCount(e.event))return;var n=this._subIds[r];n&&(delete this._subIds[r],n.then((function(e){t._subs[e]&&(delete t._subs[e],t.send("eth_unsubscribe",[e]))})))}},{key:"destroy",value:function(){return ka(this,void 0,void 0,g.a.mark((function e(){var t=this;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._websocket.readyState!==ma.CONNECTING){e.next=3;break}return e.next=3,new Promise((function(e){t._websocket.onopen=function(){e(!0)},t._websocket.onerror=function(){e(!1)}}));case 3:this._websocket.close(1e3);case 4:case"end":return e.stop()}}),e,this)})))}}],[{key:"defaultUrl",value:function(){return"ws://localhost:8546"}}]),r}(ga),Aa=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},xa=new S.b(jo),Ta=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"detectNetwork",value:function(){var e=this,t=Object.create(null,{detectNetwork:{get:function(){return h(Object(l.a)(r.prototype),"detectNetwork",e)}}});return Aa(this,void 0,void 0,g.a.mark((function e(){var r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(r=this.network)){e.next=7;break}return e.next=4,t.detectNetwork.call(this);case 4:(r=e.sent)||xa.throwError("no network detected",S.b.errors.UNKNOWN_ERROR,{}),null==this._network&&(N(this,"_network",r),this.emit("network",r,null));case 7:return e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})))}}]),r}(ga),Ma=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;Object(v.a)(this,r),xa.checkAbstract(this instanceof r?this.constructor:void 0,r),e=L(this instanceof r?this.constructor:void 0,"getNetwork")(e),n=L(this instanceof r?this.constructor:void 0,"getApiKey")(n);var o=L(this instanceof r?this.constructor:void 0,"getUrl")(e,n);return i=t.call(this,o,e),"string"===typeof n?N(Object(f.a)(i),"apiKey",n):null!=n&&Object.keys(n).forEach((function(e){N(Object(f.a)(i),e,n[e])})),i}return Object(y.a)(r,[{key:"_startPending",value:function(){xa.warn("WARNING: API provider does not support pending filters")}},{key:"isCommunityResource",value:function(){return!1}},{key:"getSigner",value:function(e){return xa.throwError("API provider does not support signing",S.b.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}},{key:"listAccounts",value:function(){return Promise.resolve([])}}],[{key:"getApiKey",value:function(e){return e}},{key:"getUrl",value:function(e,t){return xa.throwError("not implemented; sub-classes must override getUrl",S.b.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}]),r}(Ta),Ca=new S.b(jo),Oa="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",Ia=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;Object(v.a)(this,r);var o=new Pa(e,n),a=o.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");return i=t.call(this,a,o.network),N(Object(f.a)(i),"apiKey",o.apiKey),i}return Object(y.a)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===Oa}}]),r}(_a),Pa=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===Oa}}],[{key:"getWebSocketProvider",value:function(e,t){return new Ia(e,t)}},{key:"getApiKey",value:function(e){return null==e?Oa:(e&&"string"!==typeof e&&Ca.throwArgumentError("invalid apiKey","apiKey",e),e)}},{key:"getUrl",value:function(e,t){var r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"ropsten":r="eth-ropsten.alchemyapi.io/v2/";break;case"rinkeby":r="eth-rinkeby.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.alchemyapi.io/v2/";break;case"kovan":r="eth-kovan.alchemyapi.io/v2/";break;default:Ca.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:function(e,r){return t===Oa&&Ho(),Promise.resolve(!0)}}}}]),r}(Ma),Ra=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ba=new S.b(jo),Da=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"perform",value:function(e,t){var n=this,i=Object.create(null,{perform:{get:function(){return h(Object(l.a)(r.prototype),"perform",n)}}});return Ra(this,void 0,void 0,g.a.mark((function r(){var n;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("getBlockNumber"!==e){r.next=5;break}return r.next=3,i.perform.call(this,"getBlock",{blockTag:"latest"});case 3:return n=r.sent,r.abrupt("return",n.number);case 5:return r.abrupt("return",i.perform.call(this,e,t));case 6:case"end":return r.stop()}}),r,this)})))}}],[{key:"getApiKey",value:function(e){return null!=e&&Ba.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}},{key:"getUrl",value:function(e,t){var r=null;switch(e.name){case"homestead":r="https://cloudflare-eth.com/";break;default:Ba.throwArgumentError("unsupported network","network",arguments[0])}return r}}]),r}(Ma),Na=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},La=new S.b(jo);function ja(e){var t={};for(var r in e)if(null!=e[r]){var n=e[r];n={type:!0,gasLimit:!0,gasPrice:!0,nonce:!0,value:!0}[r]?Object(m.g)(Object(m.i)(n)):"accessList"===r?"["+cr(n).map((function(e){return'{address:"'.concat(e.address,'",storageKeys:["').concat(e.storageKeys.join('","'),'"]}')})).join(",")+"]":Object(m.i)(n),t[r]=n}return t}function Ua(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"OK"!=e.message){var t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function Fa(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){var r=new Error("invalid response");throw r.result=JSON.stringify(e),r}if(e.error){var n=new Error(e.error.message||"unknown error");throw e.error.code&&(n.code=e.error.code),e.error.data&&(n.data=e.error.data),n}return e.result}function Ka(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}var za="9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB";function Va(e,t,r){if("call"===e&&t.code===S.b.errors.SERVER_ERROR){var n=t.error;if(n&&n.message.match("reverted")&&Object(m.l)(n.data))return n.data}var i=t.message;throw t.code===S.b.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?i=t.error.message:"string"===typeof t.body?i=t.body:"string"===typeof t.responseText&&(i=t.responseText)),(i=(i||"").toLowerCase()).match(/insufficient funds/)&&La.throwError("insufficient funds for intrinsic transaction cost",S.b.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),i.match(/same hash was already imported|transaction nonce is too low/)&&La.throwError("nonce has already been used",S.b.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),i.match(/another transaction with same nonce/)&&La.throwError("replacement fee too low",S.b.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),i.match(/execution failed due to an exception/)&&La.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",S.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}var Ha=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;return Object(v.a)(this,r),La.checkNew(this instanceof r?this.constructor:void 0,r),i=t.call(this,e),N(Object(f.a)(i),"baseUrl",i.getBaseUrl()),N(Object(f.a)(i),"apiKey",n||za),i}return Object(y.a)(r,[{key:"getBaseUrl",value:function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"ropsten":return"https://api-ropsten.etherscan.io";case"rinkeby":return"https://api-rinkeby.etherscan.io";case"kovan":return"https://api-kovan.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io"}return La.throwArgumentError("unsupported network","network",name)}},{key:"getUrl",value:function(e,t){var r=Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&(e+="&".concat(r,"=").concat(n)),e}),""),n=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(e).concat(r).concat(n)}},{key:"getPostUrl",value:function(){return"".concat(this.baseUrl,"/api")}},{key:"getPostData",value:function(e,t){return t.module=e,t.apikey=this.apiKey,t}},{key:"fetch",value:function(e,t,r){return Na(this,void 0,void 0,g.a.mark((function n(){var i,o,a,s,u,c,f=this;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null,a="proxy"===e?Fa:Ua,this.emit("debug",{action:"request",request:i,provider:this}),s={url:i,throttleSlotInterval:1e3,throttleCallback:function(e,t){return f.isCommunityResource()&&Ho(),Promise.resolve(!0)}},u=null,o&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(o).map((function(e){return"".concat(e,"=").concat(o[e])})).join("&")),n.next=9,Bo(s,u,a||Fa);case 9:return c=n.sent,this.emit("debug",{action:"response",request:i,response:H(c),provider:this}),n.abrupt("return",c);case 12:case"end":return n.stop()}}),n,this)})))}},{key:"detectNetwork",value:function(){return Na(this,void 0,void 0,g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.network);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){var n=this,i=Object.create(null,{perform:{get:function(){return h(Object(l.a)(r.prototype),"perform",n)}}});return Na(this,void 0,void 0,g.a.mark((function r(){var n,o,a,s,u,c,f,l,h;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=e,r.next="getBlockNumber"===r.t0?3:"getGasPrice"===r.t0?4:"getBalance"===r.t0?5:"getTransactionCount"===r.t0?6:"getCode"===r.t0?7:"getStorageAt"===r.t0?8:"sendTransaction"===r.t0?9:"getBlock"===r.t0?10:"getTransaction"===r.t0?13:"getTransactionReceipt"===r.t0?14:"call"===r.t0?15:"estimateGas"===r.t0?29:"getLogs"===r.t0?41:"getEtherPrice"===r.t0?65:72;break;case 3:return r.abrupt("return",this.fetch("proxy",{action:"eth_blockNumber"}));case 4:return r.abrupt("return",this.fetch("proxy",{action:"eth_gasPrice"}));case 5:return r.abrupt("return",this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag}));case 6:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag}));case 7:return r.abrupt("return",this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag}));case 8:return r.abrupt("return",this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag}));case 9:return r.abrupt("return",this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((function(e){return Va("sendTransaction",e,t.signedTransaction)})));case 10:if(!t.blockTag){r.next=12;break}return r.abrupt("return",this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"}));case 12:throw new Error("getBlock by blockHash not implemented");case 13:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash}));case 14:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash}));case 15:if("latest"===t.blockTag){r.next=17;break}throw new Error("EtherscanProvider does not support blockTag for call");case 17:return(n=ja(t.transaction)).module="proxy",n.action="eth_call",r.prev=20,r.next=23,this.fetch("proxy",n,!0);case 23:return r.abrupt("return",r.sent);case 26:return r.prev=26,r.t1=r.catch(20),r.abrupt("return",Va("call",r.t1,t.transaction));case 29:return(o=ja(t.transaction)).module="proxy",o.action="eth_estimateGas",r.prev=32,r.next=35,this.fetch("proxy",o,!0);case 35:return r.abrupt("return",r.sent);case 38:return r.prev=38,r.t2=r.catch(32),r.abrupt("return",Va("estimateGas",r.t2,t.transaction));case 41:return a={action:"getLogs"},t.filter.fromBlock&&(a.fromBlock=Ka(t.filter.fromBlock)),t.filter.toBlock&&(a.toBlock=Ka(t.filter.toBlock)),t.filter.address&&(a.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&La.throwError("unsupported topic count",S.b.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length&&("string"===typeof(s=t.filter.topics[0])&&66===s.length||La.throwError("unsupported topic format",S.b.errors.UNSUPPORTED_OPERATION,{topic0:s}),a.topic0=s)),r.next=48,this.fetch("logs",a);case 48:u=r.sent,c={},f=0;case 51:if(!(f<u.length)){r.next=64;break}if(null==(l=u[f]).blockHash){r.next=55;break}return r.abrupt("continue",61);case 55:if(null!=c[l.blockNumber]){r.next=60;break}return r.next=58,this.getBlock(l.blockNumber);case 58:(h=r.sent)&&(c[l.blockNumber]=h.hash);case 60:l.blockHash=c[l.blockNumber];case 61:f++,r.next=51;break;case 64:return r.abrupt("return",u);case 65:if("homestead"===this.network.name){r.next=67;break}return r.abrupt("return",0);case 67:return r.t3=parseFloat,r.next=70,this.fetch("stats",{action:"ethprice"});case 70:return r.t4=r.sent.ethusd,r.abrupt("return",(0,r.t3)(r.t4));case 72:return r.abrupt("break",73);case 73:return r.abrupt("return",i.perform.call(this,e,t));case 74:case"end":return r.stop()}}),r,this,[[20,26],[32,38]])})))}},{key:"getHistory",value:function(e,t,r){return Na(this,void 0,void 0,g.a.mark((function n(){var i,o,a=this;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.resolveName(e);case 2:return n.t0=n.sent,n.t1=null==t?0:t,n.t2=null==r?99999999:r,i={action:"txlist",address:n.t0,startblock:n.t1,endblock:n.t2,sort:"asc"},n.next=8,this.fetch("account",i);case 8:return o=n.sent,n.abrupt("return",o.map((function(e){["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);var t=a.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t})));case 10:case"end":return n.stop()}}),n,this)})))}},{key:"isCommunityResource",value:function(){return this.apiKey===za}}]),r}(aa);function Ja(e){for(var t=(e=e.slice()).length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}var qa=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ga=new S.b(jo);function Xa(){return(new Date).getTime()}function Wa(e){for(var t=null,r=0;r<e.length;r++){var n=e[r];if(null==n)return null;t?t.name===n.name&&t.chainId===n.chainId&&(t.ensAddress===n.ensAddress||null==t.ensAddress&&null==n.ensAddress)||Ga.throwArgumentError("provider mismatch","networks",e):t=n}return t}function Za(e,t){e=e.slice().sort();var r=Math.floor(e.length/2);if(e.length%2)return e[r];var n=e[r-1],i=e[r];return null!=t&&Math.abs(n-i)>t?null:(n+i)/2}function Ya(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(C.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((function(e){return Ya(e)})));if("object"===typeof e){var t=Object.keys(e);return t.sort(),"{"+t.map((function(t){var r=e[t];return r="function"===typeof r?"[function]":Ya(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}var Qa=1;function $a(e){var t=null,r=null,n=new Promise((function(n){t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:function(e){return n=n.then(e)}}}var es=[S.b.errors.CALL_EXCEPTION,S.b.errors.INSUFFICIENT_FUNDS,S.b.errors.NONCE_EXPIRED,S.b.errors.REPLACEMENT_UNDERPRICED,S.b.errors.UNPREDICTABLE_GAS_LIMIT],ts=["address","args","errorArgs","errorSignature","method","transaction"];function rs(e,t){var r={weight:e.weight};return Object.defineProperty(r,"provider",{get:function(){return e.provider}}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function ns(e,t,r){var n=Ya;switch(t){case"getBlockNumber":return function(t){var r=t.map((function(e){return e.result})),n=Za(t.map((function(e){return e.result})),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){var t=e.map((function(e){return e.result}));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Za(e.map((function(e){return e.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=F(e)).confirmations=-1,Ya(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=F(e)).transactions=e.transactions.map((function(e){return(e=F(e)).confirmations=-1,e})),Ya(e))}:function(e){return null==e?null:Ya(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){var n={};r.forEach((function(t){var r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));for(var i=Object.keys(n),o=0;o<i.length;o++){var a=n[i[o]];if(a.count>=t)return a.result}}}(n,e.quorum)}function is(e,t){return qa(this,void 0,void 0,g.a.mark((function r(){var n;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(null!=(n=e.provider).blockNumber&&n.blockNumber>=t||-1===t)){r.next=3;break}return r.abrupt("return",n);case 3:return r.abrupt("return",Do((function(){return new Promise((function(r,i){setTimeout((function(){return n.blockNumber>=t?r(n):e.cancelled?r(null):r(void 0)}),0)}))}),{oncePoll:n}));case 4:case"end":return r.stop()}}),r)})))}function os(e,t,r,n){return qa(this,void 0,void 0,g.a.mark((function i(){var o,a;return g.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=e.provider,i.t0=r,i.next="getBlockNumber"===i.t0||"getGasPrice"===i.t0?4:"getEtherPrice"===i.t0?5:"getBalance"===i.t0||"getTransactionCount"===i.t0||"getCode"===i.t0?8:"getStorageAt"===i.t0?13:"getBlock"===i.t0?18:"call"===i.t0||"estimateGas"===i.t0?23:"getTransaction"===i.t0||"getTransactionReceipt"===i.t0?28:"getLogs"===i.t0?29:35;break;case 4:return i.abrupt("return",o[r]());case 5:if(!o.getEtherPrice){i.next=7;break}return i.abrupt("return",o.getEtherPrice());case 7:return i.abrupt("break",35);case 8:if(!n.blockTag||!Object(m.l)(n.blockTag)){i.next=12;break}return i.next=11,is(e,t);case 11:o=i.sent;case 12:return i.abrupt("return",o[r](n.address,n.blockTag||"latest"));case 13:if(!n.blockTag||!Object(m.l)(n.blockTag)){i.next=17;break}return i.next=16,is(e,t);case 16:o=i.sent;case 17:return i.abrupt("return",o.getStorageAt(n.address,n.position,n.blockTag||"latest"));case 18:if(!n.blockTag||!Object(m.l)(n.blockTag)){i.next=22;break}return i.next=21,is(e,t);case 21:o=i.sent;case 22:return i.abrupt("return",o[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash));case 23:if(!n.blockTag||!Object(m.l)(n.blockTag)){i.next=27;break}return i.next=26,is(e,t);case 26:o=i.sent;case 27:return i.abrupt("return",o[r](n.transaction));case 28:return i.abrupt("return",o[r](n.transactionHash));case 29:if(!((a=n.filter).fromBlock&&Object(m.l)(a.fromBlock)||a.toBlock&&Object(m.l)(a.toBlock))){i.next=34;break}return i.next=33,is(e,t);case 33:o=i.sent;case 34:return i.abrupt("return",o.getLogs(a));case 35:return i.abrupt("return",Ga.throwError("unknown method error",S.b.errors.UNKNOWN_ERROR,{method:r,params:n}));case 36:case"end":return i.stop()}}),i)})))}var as=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;Object(v.a)(this,r),Ga.checkNew(this instanceof r?this.constructor:void 0,r),0===e.length&&Ga.throwArgumentError("missing providers","providers",e);var o=e.map((function(e,t){if(Ft.isProvider(e)){var r=zo(e)?2e3:750;return Object.freeze({provider:e,weight:1,stallTimeout:r,priority:1})}var n=F(e);null==n.priority&&(n.priority=1),null==n.stallTimeout&&(n.stallTimeout=zo(e)?2e3:750),null==n.weight&&(n.weight=1);var i=n.weight;return(i%1||i>512||i<1)&&Ga.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(t,"].weight"),i),Object.freeze(n)})),a=o.reduce((function(e,t){return e+t.weight}),0);null==n?n=a/2:n>a&&Ga.throwArgumentError("quorum will always fail; larger than total weight","quorum",n);var s=Wa(o.map((function(e){return e.provider.network})));return null==s&&(s=new Promise((function(e,t){setTimeout((function(){i.detectNetwork().then(e,t)}),0)}))),i=t.call(this,s),N(Object(f.a)(i),"providerConfigs",Object.freeze(o)),N(Object(f.a)(i),"quorum",n),i._highestBlockNumber=-1,i}return Object(y.a)(r,[{key:"detectNetwork",value:function(){return qa(this,void 0,void 0,g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.providerConfigs.map((function(e){return e.provider.getNetwork()})));case 2:return t=e.sent,e.abrupt("return",Wa(t));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){return qa(this,void 0,void 0,g.a.mark((function r(){var n,i,o,a,s,u,c,f,l,h,d=this;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("sendTransaction"!==e){r.next=13;break}return r.next=3,Promise.all(this.providerConfigs.map((function(e){return e.provider.sendTransaction(t.signedTransaction).then((function(e){return e.hash}),(function(e){return e}))})));case 3:n=r.sent,i=0;case 5:if(!(i<n.length)){r.next=12;break}if("string"!==typeof(o=n[i])){r.next=9;break}return r.abrupt("return",o);case 9:i++,r.next=5;break;case 12:throw n[0];case 13:if(-1!==this._highestBlockNumber||"getBlockNumber"===e){r.next=16;break}return r.next=16,this.getBlockNumber();case 16:a=ns(this,e,t),(s=Ja(this.providerConfigs.map(F))).sort((function(e,t){return e.priority-t.priority})),u=this._highestBlockNumber,c=0,f=!0,l=g.a.mark((function r(){var n,i,o,l,h,p,v;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(n=Xa(),i=s.filter((function(e){return e.runner&&n-e.start<e.stallTimeout})).reduce((function(e,t){return e+t.weight}),0),o=function(){var r=s[c++],n=Qa++;r.start=Xa(),r.staller=$a(r.stallTimeout),r.staller.wait((function(){r.staller=null})),r.runner=os(r,u,e,t).then((function(i){r.done=!0,r.result=i,d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:n,backend:rs(r,Xa()),request:{method:e,params:H(t)},provider:d})}),(function(i){r.done=!0,r.error=i,d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:n,backend:rs(r,Xa()),request:{method:e,params:H(t)},provider:d})})),d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:n,backend:rs(r,null),request:{method:e,params:H(t)},provider:d}),i+=r.weight};i<d.quorum&&c<s.length;)o();if(l=[],s.forEach((function(e){!e.done&&e.runner&&(l.push(e.runner),e.staller&&l.push(e.staller.getPromise()))})),!l.length){r.next=9;break}return r.next=9,Promise.race(l);case 9:if(!((h=s.filter((function(e){return e.done&&null==e.error}))).length>=d.quorum)){r.next=19;break}if(void 0===(p=a(h))){r.next=15;break}return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),r.abrupt("return",{v:p});case 15:if(f){r.next=18;break}return r.next=18,$a(100).getPromise();case 18:f=!1;case 19:if(v=s.reduce((function(e,t){if(!t.done||null==t.error)return e;var r=t.error.code;return es.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{}),Object.keys(v).forEach((function(e){var t=v[e];if(!(t.weight<d.quorum)){s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0}));var r=t.error,n={};ts.forEach((function(e){null!=r[e]&&(n[e]=r[e])})),Ga.throwError(r.reason||r.message,e,n)}})),0!==s.filter((function(e){return!e.done})).length){r.next=23;break}return r.abrupt("return","break");case 23:case"end":return r.stop()}}),r)}));case 23:return r.delegateYield(l(),"t0",25);case 25:if("break"!==(h=r.t0)){r.next=28;break}return r.abrupt("break",32);case 28:if("object"!==typeof h){r.next=30;break}return r.abrupt("return",h.v);case 30:r.next=23;break;case 32:return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),r.abrupt("return",Ga.throwError("failed to meet quorum",S.b.errors.SERVER_ERROR,{method:e,params:t,results:s.map((function(e){return rs(e)})),provider:this}));case 34:case"end":return r.stop()}}),r,this)})))}}]),r}(aa),ss=null,us=new S.b(jo),cs="84842078b09946638c03157f83405213",fs=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;Object(v.a)(this,r);var o=new ls(e,n),a=o.connection;a.password&&us.throwError("INFURA WebSocket project secrets unsupported",S.b.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});var s=a.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");return i=t.call(this,s,e),N(Object(f.a)(i),"apiKey",o.projectId),N(Object(f.a)(i),"projectId",o.projectId),N(Object(f.a)(i),"projectSecret",o.projectSecret),i}return Object(y.a)(r,[{key:"isCommunityResource",value:function(){return this.projectId===cs}}]),r}(_a),ls=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"isCommunityResource",value:function(){return this.projectId===cs}}],[{key:"getWebSocketProvider",value:function(e,t){return new fs(e,t)}},{key:"getApiKey",value:function(e){var t={apiKey:cs,projectId:cs,projectSecret:null};return null==e||("string"===typeof e?t.projectId=e:null!=e.projectSecret?(us.assertArgument("string"===typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),us.assertArgument("string"===typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}},{key:"getUrl",value:function(e,t){var r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"ropsten":r="ropsten.infura.io";break;case"rinkeby":r="rinkeby.infura.io";break;case"kovan":r="kovan.infura.io";break;case"goerli":r="goerli.infura.io";break;default:us.throwError("unsupported network",S.b.errors.INVALID_ARGUMENT,{argument:"network",value:e})}var n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:function(e,r){return t.projectId===cs&&Ho(),Promise.resolve(!0)}};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}}]),r}(Ma),hs=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,[{key:"send",value:function(e,t){var r=this,n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);var i={request:n,resolve:null,reject:null},o=new Promise((function(e,t){i.resolve=e,i.reject=t}));return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((function(){var e=r._pendingBatch;r._pendingBatch=null,r._pendingBatchAggregator=null;var t=e.map((function(e){return e.request}));return r.emit("debug",{action:"requestBatch",request:H(t),provider:r}),Bo(r.connection,JSON.stringify(t)).then((function(n){r.emit("debug",{action:"response",request:t,response:n,provider:r}),e.forEach((function(e,t){var r=n[t];if(r.error){var i=new Error(r.error.message);i.code=r.error.code,i.data=r.error.data,e.reject(i)}else e.resolve(r.result)}))}),(function(n){r.emit("debug",{action:"response",error:n,request:t,provider:r}),e.forEach((function(e){e.reject(n)}))}))}),10)),o}}]),r}(ga),ds=new S.b(jo),ps=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(){return Object(v.a)(this,r),t.apply(this,arguments)}return Object(y.a)(r,null,[{key:"getApiKey",value:function(e){return e&&"string"!==typeof e&&ds.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}},{key:"getUrl",value:function(e,t){ds.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");var r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:ds.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}]),r}(Ma),vs=new S.b(jo),ys={homestead:"6004bcd10040261633ade990",ropsten:"6004bd4d0040261633ade991",rinkeby:"6004bda20040261633ade994",goerli:"6004bd860040261633ade992"},bs=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){if(Object(v.a)(this,r),null==n){var i=L(this instanceof r?this.constructor:void 0,"getNetwork")(e);if(i){var o=ys[i.name];o&&(n={applicationId:o,loadBalancer:!0})}null==n&&vs.throwError("unsupported network",S.b.errors.INVALID_ARGUMENT,{argument:"network",value:e})}return t.call(this,e,n)}return Object(y.a)(r,[{key:"isCommunityResource",value:function(){return this.applicationId===ys[this.network.name]}}],[{key:"getApiKey",value:function(e){null==e&&vs.throwArgumentError("PocketProvider.getApiKey does not support null apiKey","apiKey",e);var t={applicationId:null,loadBalancer:!1,applicationSecretKey:null};return"string"===typeof e?t.applicationId=e:null!=e.applicationSecretKey?(vs.assertArgument("string"===typeof e.applicationId,"applicationSecretKey requires an applicationId","applicationId",e.applicationId),vs.assertArgument("string"===typeof e.applicationSecretKey,"invalid applicationSecretKey","applicationSecretKey","[REDACTED]"),t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey,t.loadBalancer=!!e.loadBalancer):e.applicationId?(vs.assertArgument("string"===typeof e.applicationId,"apiKey.applicationId must be a string","apiKey.applicationId",e.applicationId),t.applicationId=e.applicationId,t.loadBalancer=!!e.loadBalancer):vs.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}},{key:"getUrl",value:function(e,t){var r=null;switch(e?e.name:"unknown"){case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"goerli":r="eth-goerli.gateway.pokt.network";break;default:vs.throwError("unsupported network",S.b.errors.INVALID_ARGUMENT,{argument:"network",value:e})}var n={url:t.loadBalancer?"https://".concat(r,"/v1/lb/").concat(t.applicationId):"https://".concat(r,"/v1/").concat(t.applicationId),headers:{}};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}}]),r}(Ma),gs=new S.b(jo),ms=1;function ws(e,t){var r="Web3LegacyFetcher";return function(n,i){var o=this;"eth_sign"==n&&(e.isMetaMask||e.isStatus)&&(n="personal_sign",i=[i[1],i[0]]);var a={method:n,params:i,id:ms++,jsonrpc:"2.0"};return new Promise((function(e,n){o.emit("debug",{action:"request",fetcher:r,request:H(a),provider:o}),t(a,(function(t,i){if(t)return o.emit("debug",{action:"response",fetcher:r,error:t,request:a,provider:o}),n(t);if(o.emit("debug",{action:"response",fetcher:r,request:a,response:i,provider:o}),i.error){var s=new Error(i.error.message);return s.code=i.error.code,s.data=i.error.data,n(s)}e(i.result)}))}))}}var ks=function(e){Object(d.a)(r,e);var t=Object(p.a)(r);function r(e,n){var i;Object(v.a)(this,r),gs.checkNew(this instanceof r?this.constructor:void 0,r),null==e&&gs.throwArgumentError("missing provider","provider",e);var o=null,a=null,s=null;return"function"===typeof e?(o="unknown:",a=e):(!(o=e.host||e.path||"")&&e.isMetaMask&&(o="metamask"),s=e,e.request?(""===o&&(o="eip-1193:"),a=function(e){return function(t,r){var n=this;null==r&&(r=[]),"eth_sign"==t&&(e.isMetaMask||e.isStatus)&&(t="personal_sign",r=[r[1],r[0]]);var i={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:H(i),provider:this}),e.request(i).then((function(e){return n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:e,provider:n}),e}),(function(e){throw n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:e,provider:n}),e}))}}(e)):e.sendAsync?a=ws(e,e.sendAsync.bind(e)):e.send?a=ws(e,e.send.bind(e)):gs.throwArgumentError("unsupported provider","provider",e),o||(o="unknown:")),i=t.call(this,o,n),N(Object(f.a)(i),"jsonRpcFetchFunc",a),N(Object(f.a)(i),"provider",s),i}return Object(y.a)(r,[{key:"send",value:function(e,t){return this.jsonRpcFetchFunc(e,t)}}]),r}(ga),Ss=new S.b(jo);function Es(e,t){if(null==e&&(e="homestead"),"string"===typeof e){var r=e.match(/^(ws|http)s?:/i);if(r)switch(r[1]){case"http":return new ga(e);case"ws":return new _a(e);default:Ss.throwArgumentError("unsupported URL scheme","network",e)}}var n=so(e);return n&&n._defaultProvider||Ss.throwError("unsupported getDefaultProvider network",S.b.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),n._defaultProvider({FallbackProvider:as,AlchemyProvider:Pa,CloudflareProvider:Da,EtherscanProvider:Ha,InfuraProvider:ls,JsonRpcProvider:ga,NodesmithProvider:ps,PocketProvider:bs,Web3Provider:ks,IpcProvider:ss},t)}var _s=new RegExp("^bytes([0-9]+)$"),As=new RegExp("^(u?int)([0-9]*)$"),xs=new RegExp("^(.*)\\[([0-9]*)\\]$");function Ts(e,t,r){switch(e){case"address":return r?Object(m.p)(t,32):Object(m.a)(t);case"string":return Me(t);case"bytes":return Object(m.a)(t);case"bool":return t=t?"0x01":"0x00",r?Object(m.p)(t,32):Object(m.a)(t)}var n=e.match(As);if(n){var i=parseInt(n[2]||"256");if(n[2]&&String(i)!==n[2]||i%8!==0||0===i||i>256)throw new Error("invalid number type - "+e);return r&&(i=256),t=C.from(t).toTwos(i),Object(m.p)(t,i/8)}if(n=e.match(_s)){var o=parseInt(n[1]);if(String(o)!==n[1]||0===o||o>32)throw new Error("invalid bytes type - "+e);if(Object(m.a)(t).byteLength!==o)throw new Error("invalid value for "+e);return r?Object(m.a)((t+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):t}if((n=e.match(xs))&&Array.isArray(t)){var a=n[1];if(parseInt(n[2]||String(t.length))!=t.length)throw new Error("invalid value for "+e);var s=[];return t.forEach((function(e){s.push(Ts(a,e,!0))})),Object(m.b)(s)}throw new Error("invalid type - "+e)}function Ms(e,t){if(e.length!=t.length)throw new Error("type/value count mismatch");var r=[];return e.forEach((function(e,n){r.push(Ts(e,t[n]))})),Object(m.i)(Object(m.b)(r))}function Cs(e,t){return ee(Ms(e,t))}function Os(e,t){return pn(Ms(e,t))}function Is(e){var t=Me(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Object(m.i)(Object(m.b)([t,Qi]).slice(0,32))}function Ps(e){var t=Object(m.a)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===t[r-1];)r--;return Pe(t.slice(0,r))}var Rs=new S.b("units/5.3.0"),Bs=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Ds(e){var t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&Rs.throwArgumentError("invalid value","value",e);var r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");var i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);for(var o=[];r.length;){if(r.length<=3){o.unshift(r);break}var a=r.length-3;o.unshift(r.substring(a)),r=r.substring(0,a)}return n+o.join(",")+i}function Ns(e,t){if("string"===typeof t){var r=Bs.indexOf(t);-1!==r&&(t=3*r)}return Nr(e,null!=t?t:18)}function Ls(e,t){if("string"!==typeof e&&Rs.throwArgumentError("value must be a string","value",e),"string"===typeof t){var r=Bs.indexOf(t);-1!==r&&(t=3*r)}return Lr(e,null!=t?t:18)}function js(e){return Ns(e,18)}function Us(e){return Ls(e,18)}var Fs="ethers/5.3.1",Ks=new S.b(Fs);try{var zs=window;null==zs._ethers&&(zs._ethers=u)}catch(Vs){}},function(e,t,r){"use strict";var n=r(73),i=r(12),o=r(1114),a=r(4),s=["xs","sm","md","lg","xl"];function u(e){var t=e.values,r=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,n=e.unit,o=void 0===n?"px":n,u=e.step,c=void 0===u?5:u,f=Object(i.a)(e,["values","unit","step"]);function l(e){var t="number"===typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function h(e,t){var n=s.indexOf(t);return n===s.length-1?l(e):"@media (min-width:".concat("number"===typeof r[e]?r[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==n&&"number"===typeof r[s[n+1]]?r[s[n+1]]:t)-c/100).concat(o,")")}return Object(a.a)({keys:s,values:r,up:l,down:function(e){var t=s.indexOf(e)+1,n=r[s[t]];return t===s.length?l("xs"):"@media (max-width:".concat(("number"===typeof n&&t>0?n:e)-c/100).concat(o,")")},between:h,only:function(e){return h(e,e)},width:function(e){return r[e]}},f)}function c(e,t,r){var i;return Object(a.a)({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(a.a)({paddingLeft:t(2),paddingRight:t(2)},r,Object(n.a)({},e.up("sm"),Object(a.a)({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(i={minHeight:56},Object(n.a)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(n.a)(i,e.up("sm"),{minHeight:64}),i)},r)}var f=r(519),l={black:"#000",white:"#fff"},h={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},d={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},p={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},v={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},y=r(233),b={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},g={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},m=r(59),w={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:l.white,default:h[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},k={text:{primary:l.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:h[800],default:"#303030"},action:{active:l.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function S(e,t,r,n){var i=n.light||n,o=n.dark||1.5*n;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=Object(m.d)(e.main,i):"dark"===t&&(e.dark=Object(m.a)(e.main,o)))}function E(e){var t=e.primary,r=void 0===t?{light:d[300],main:d[500],dark:d[700]}:t,n=e.secondary,s=void 0===n?{light:p.A200,main:p.A400,dark:p.A700}:n,u=e.error,c=void 0===u?{light:v[300],main:v[500],dark:v[700]}:u,E=e.warning,_=void 0===E?{light:y.a[300],main:y.a[500],dark:y.a[700]}:E,A=e.info,x=void 0===A?{light:b[300],main:b[500],dark:b[700]}:A,T=e.success,M=void 0===T?{light:g[300],main:g[500],dark:g[700]}:T,C=e.type,O=void 0===C?"light":C,I=e.contrastThreshold,P=void 0===I?3:I,R=e.tonalOffset,B=void 0===R?.2:R,D=Object(i.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function N(e){return Object(m.c)(e,k.text.primary)>=P?k.text.primary:w.text.primary}var L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(a.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(f.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(f.a)(5,JSON.stringify(e.main)));return S(e,"light",r,B),S(e,"dark",n,B),e.contrastText||(e.contrastText=N(e.main)),e},j={dark:k,light:w};return Object(o.a)(Object(a.a)({common:l,type:O,primary:L(r),secondary:L(s,"A400","A200","A700"),error:L(c),warning:L(_),info:L(x),success:L(M),grey:h,contrastThreshold:P,getContrastText:N,augmentColor:L,tonalOffset:B},j[O]),D)}function _(e){return Math.round(1e5*e)/1e5}var A={textTransform:"uppercase"},x='"Roboto", "Helvetica", "Arial", sans-serif';function T(e,t){var r="function"===typeof t?t(e):t,n=r.fontFamily,s=void 0===n?x:n,u=r.fontSize,c=void 0===u?14:u,f=r.fontWeightLight,l=void 0===f?300:f,h=r.fontWeightRegular,d=void 0===h?400:h,p=r.fontWeightMedium,v=void 0===p?500:p,y=r.fontWeightBold,b=void 0===y?700:y,g=r.htmlFontSize,m=void 0===g?16:g,w=r.allVariants,k=r.pxToRem,S=Object(i.a)(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var E=c/14,T=k||function(e){return"".concat(e/m*E,"rem")},M=function(e,t,r,n,i){return Object(a.a)({fontFamily:s,fontWeight:e,fontSize:T(t),lineHeight:r},s===x?{letterSpacing:"".concat(_(n/t),"em")}:{},i,w)},C={h1:M(l,96,1.167,-1.5),h2:M(l,60,1.2,-.5),h3:M(d,48,1.167,0),h4:M(d,34,1.235,.25),h5:M(d,24,1.334,0),h6:M(v,20,1.6,.15),subtitle1:M(d,16,1.75,.15),subtitle2:M(v,14,1.57,.1),body1:M(d,16,1.5,.15),body2:M(d,14,1.43,.15),button:M(v,14,1.75,.4,A),caption:M(d,12,1.66,.4),overline:M(d,12,2.66,1,A)};return Object(o.a)(Object(a.a)({htmlFontSize:m,pxToRem:T,round:_,fontFamily:s,fontSize:c,fontWeightLight:l,fontWeightRegular:d,fontWeightMedium:v,fontWeightBold:b},C),S,{clone:!1})}function M(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var C=["none",M(0,2,1,-1,0,1,1,0,0,1,3,0),M(0,3,1,-2,0,2,2,0,0,1,5,0),M(0,3,3,-2,0,3,4,0,0,1,8,0),M(0,2,4,-1,0,4,5,0,0,1,10,0),M(0,3,5,-1,0,5,8,0,0,1,14,0),M(0,3,5,-1,0,6,10,0,0,1,18,0),M(0,4,5,-2,0,7,10,1,0,2,16,1),M(0,5,5,-3,0,8,10,1,0,3,14,2),M(0,5,6,-3,0,9,12,1,0,3,16,2),M(0,6,6,-3,0,10,14,1,0,4,18,3),M(0,6,7,-4,0,11,15,1,0,4,20,3),M(0,7,8,-4,0,12,17,2,0,5,22,4),M(0,7,8,-4,0,13,19,2,0,5,24,4),M(0,7,9,-4,0,14,21,2,0,5,26,4),M(0,8,9,-5,0,15,22,2,0,6,28,5),M(0,8,10,-5,0,16,24,2,0,6,30,5),M(0,8,11,-5,0,17,26,2,0,6,32,5),M(0,9,11,-5,0,18,28,2,0,7,34,6),M(0,9,12,-6,0,19,29,2,0,7,36,6),M(0,10,13,-6,0,20,31,3,0,8,38,7),M(0,10,13,-6,0,21,33,3,0,8,40,7),M(0,10,14,-6,0,22,35,3,0,8,42,7),M(0,11,14,-7,0,23,36,3,0,9,44,8),M(0,11,15,-7,0,24,38,3,0,9,46,8)],O={borderRadius:4},I=r(147),P=(r(102),r(121));r(24);var R=function(e,t){return t?Object(o.a)(e,t,{clone:!1}):e},B={xs:0,sm:600,md:960,lg:1280,xl:1920},D={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(B[e],"px)")}};var N={m:"margin",p:"padding"},L={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},j={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},U=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}((function(e){if(e.length>2){if(!j[e])return[e];e=j[e]}var t=e.split(""),r=Object(I.a)(t,2),n=r[0],i=r[1],o=N[n],a=L[i]||"";return Array.isArray(a)?a.map((function(e){return o+e})):[o+a]})),F=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function K(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function z(e,t){return function(r){return e.reduce((function(e,n){return e[n]=function(e,t){if("string"===typeof t||null==t)return t;var r=e(Math.abs(t));return t>=0?r:"number"===typeof r?-r:"-".concat(r)}(t,r),e}),{})}}function V(e){var t=K(e.theme);return Object.keys(e).map((function(r){if(-1===F.indexOf(r))return null;var n=z(U(r),t),i=e[r];return function(e,t,r){if(Array.isArray(t)){var n=e.theme.breakpoints||D;return t.reduce((function(e,i,o){return e[n.up(n.keys[o])]=r(t[o]),e}),{})}if("object"===Object(P.a)(t)){var i=e.theme.breakpoints||D;return Object.keys(t).reduce((function(e,n){return e[i.up(n)]=r(t[n]),e}),{})}return r(t)}(e,i,n)})).reduce(R,{})}V.propTypes={},V.filterProps=F;function H(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=K({spacing:e}),r=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return 0===r.length?t(1):1===r.length?t(r[0]):r.map((function(e){if("string"===typeof e)return e;var r=t(e);return"number"===typeof r?"".concat(r,"px"):r})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return e}}),r.mui=!0,r}var J={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},q={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function G(e){return"".concat(Math.round(e),"ms")}var X={easing:J,duration:q,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.duration,n=void 0===r?q.standard:r,o=t.easing,a=void 0===o?J.easeInOut:o,s=t.delay,u=void 0===s?0:s;Object(i.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof n?n:G(n)," ").concat(a," ").concat("string"===typeof u?u:G(u))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},W=r(231);t.a=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,r=void 0===t?{}:t,n=e.mixins,a=void 0===n?{}:n,s=e.palette,f=void 0===s?{}:s,l=e.spacing,h=e.typography,d=void 0===h?{}:h,p=Object(i.a)(e,["breakpoints","mixins","palette","spacing","typography"]),v=E(f),y=u(r),b=H(l),g=Object(o.a)({breakpoints:y,direction:"ltr",mixins:c(y,b,a),overrides:{},palette:v,props:{},shadows:C,typography:T(v,d),spacing:b,shape:O,transitions:X,zIndex:W.a},p),m=arguments.length,w=new Array(m>1?m-1:0),k=1;k<m;k++)w[k-1]=arguments[k];return g=w.reduce((function(e,t){return Object(o.a)(e,t)}),g)}},function(e,t,r){"use strict";function n(e){for(var t="https://material-ui.com/production-error/?code="+e,r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(1),i=r.n(n),o=r(229);function a(){return i.a.useContext(o.a)}},function(e,t,r){"use strict";var n=r(12),i=r(4),o=r(519),a=r(1),s=(r(24),r(16)),u=r(69),c=r(126),f=r(19),l=r(31),h=r(35),d=r(140);function p(e,t){return parseInt(e[t],10)||0}var v="undefined"!==typeof window?a.useLayoutEffect:a.useEffect,y={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},b=a.forwardRef((function(e,t){var r=e.onChange,o=e.rows,s=e.rowsMax,u=e.rowsMin,c=void 0===u?1:u,f=e.style,l=e.value,b=Object(n.a)(e,["onChange","rows","rowsMax","rowsMin","style","value"]),g=o||c,m=a.useRef(null!=l).current,w=a.useRef(null),k=Object(h.a)(t,w),S=a.useRef(null),E=a.useRef(0),_=a.useState({}),A=_[0],x=_[1],T=a.useCallback((function(){var t=w.current,r=window.getComputedStyle(t),n=S.current;n.style.width=r.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");var i=r["box-sizing"],o=p(r,"padding-bottom")+p(r,"padding-top"),a=p(r,"border-bottom-width")+p(r,"border-top-width"),u=n.scrollHeight-o;n.value="x";var c=n.scrollHeight-o,f=u;g&&(f=Math.max(Number(g)*c,f)),s&&(f=Math.min(Number(s)*c,f));var l=(f=Math.max(f,c))+("border-box"===i?o+a:0),h=Math.abs(f-u)<=1;x((function(e){return E.current<20&&(l>0&&Math.abs((e.outerHeightStyle||0)-l)>1||e.overflow!==h)?(E.current+=1,{overflow:h,outerHeightStyle:l}):e}))}),[s,g,e.placeholder]);a.useEffect((function(){var e=Object(d.a)((function(){E.current=0,T()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[T]),v((function(){T()})),a.useEffect((function(){E.current=0}),[l]);return a.createElement(a.Fragment,null,a.createElement("textarea",Object(i.a)({value:l,onChange:function(e){E.current=0,m||T(),r&&r(e)},ref:k,rows:g,style:Object(i.a)({height:A.outerHeightStyle,overflow:A.overflow?"hidden":null},f)},b)),a.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:S,tabIndex:-1,style:Object(i.a)({},y,f)}))})),g=r(125),m="undefined"===typeof window?a.useEffect:a.useLayoutEffect,w=a.forwardRef((function(e,t){var r=e["aria-describedby"],f=e.autoComplete,d=e.autoFocus,p=e.classes,v=e.className,y=(e.color,e.defaultValue),w=e.disabled,k=e.endAdornment,S=(e.error,e.fullWidth),E=void 0!==S&&S,_=e.id,A=e.inputComponent,x=void 0===A?"input":A,T=e.inputProps,M=void 0===T?{}:T,C=e.inputRef,O=(e.margin,e.multiline),I=void 0!==O&&O,P=e.name,R=e.onBlur,B=e.onChange,D=e.onClick,N=e.onFocus,L=e.onKeyDown,j=e.onKeyUp,U=e.placeholder,F=e.readOnly,K=e.renderSuffix,z=e.rows,V=e.rowsMax,H=e.rowsMin,J=e.startAdornment,q=e.type,G=void 0===q?"text":q,X=e.value,W=Object(n.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","startAdornment","type","value"]),Z=null!=M.value?M.value:X,Y=a.useRef(null!=Z).current,Q=a.useRef(),$=a.useCallback((function(e){0}),[]),ee=Object(h.a)(M.ref,$),te=Object(h.a)(C,ee),re=Object(h.a)(Q,te),ne=a.useState(!1),ie=ne[0],oe=ne[1],ae=Object(c.b)();var se=Object(u.a)({props:e,muiFormControl:ae,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});se.focused=ae?ae.focused:ie,a.useEffect((function(){!ae&&w&&ie&&(oe(!1),R&&R())}),[ae,w,ie,R]);var ue=ae&&ae.onFilled,ce=ae&&ae.onEmpty,fe=a.useCallback((function(e){Object(g.b)(e)?ue&&ue():ce&&ce()}),[ue,ce]);m((function(){Y&&fe({value:Z})}),[Z,fe,Y]);a.useEffect((function(){fe(Q.current)}),[]);var le=x,he=Object(i.a)({},M,{ref:re});"string"!==typeof le?he=Object(i.a)({inputRef:re,type:G},he,{ref:null}):I?!z||V||H?(he=Object(i.a)({rows:z,rowsMax:V},he),le=b):le="textarea":he=Object(i.a)({type:G},he);return a.useEffect((function(){ae&&ae.setAdornedStart(Boolean(J))}),[ae,J]),a.createElement("div",Object(i.a)({className:Object(s.a)(p.root,p["color".concat(Object(l.a)(se.color||"primary"))],v,se.disabled&&p.disabled,se.error&&p.error,E&&p.fullWidth,se.focused&&p.focused,ae&&p.formControl,I&&p.multiline,J&&p.adornedStart,k&&p.adornedEnd,"dense"===se.margin&&p.marginDense),onClick:function(e){Q.current&&e.currentTarget===e.target&&Q.current.focus(),D&&D(e)},ref:t},W),J,a.createElement(c.a.Provider,{value:null},a.createElement(le,Object(i.a)({"aria-invalid":se.error,"aria-describedby":r,autoComplete:f,autoFocus:d,defaultValue:y,disabled:se.disabled,id:_,onAnimationStart:function(e){fe("mui-auto-fill-cancel"===e.animationName?Q.current:{value:"x"})},name:P,placeholder:U,readOnly:F,required:se.required,rows:z,value:Z,onKeyDown:L,onKeyUp:j},he,{className:Object(s.a)(p.input,M.className,se.disabled&&p.disabled,I&&p.inputMultiline,se.hiddenLabel&&p.inputHiddenLabel,J&&p.inputAdornedStart,k&&p.inputAdornedEnd,"search"===G&&p.inputTypeSearch,"dense"===se.margin&&p.inputMarginDense),onBlur:function(e){R&&R(e),M.onBlur&&M.onBlur(e),ae&&ae.onBlur?ae.onBlur(e):oe(!1)},onChange:function(e){if(!Y){var t=e.target||Q.current;if(null==t)throw new Error(Object(o.a)(1));fe({value:t.value})}for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];M.onChange&&M.onChange.apply(M,[e].concat(n)),B&&B.apply(void 0,[e].concat(n))},onFocus:function(e){se.disabled?e.stopPropagation():(N&&N(e),M.onFocus&&M.onFocus(e),ae&&ae.onFocus?ae.onFocus(e):oe(!0))}}))),k,K?K(Object(i.a)({},se,{startAdornment:J})):null)}));t.a=Object(f.a)((function(e){var t="light"===e.palette.type,r={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},n={opacity:"0 !important"},o={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:Object(i.a)({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(w)},,,,,,,function(e,t,r){"use strict";var n=r(186),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,f=60116;if("function"===typeof Symbol&&Symbol.for){var l=Symbol.for;i=l("react.element"),o=l("react.portal"),t.Fragment=l("react.fragment"),t.StrictMode=l("react.strict_mode"),t.Profiler=l("react.profiler"),a=l("react.provider"),s=l("react.context"),u=l("react.forward_ref"),t.Suspense=l("react.suspense"),c=l("react.memo"),f=l("react.lazy")}var h="function"===typeof Symbol&&Symbol.iterator;function d(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function y(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||p}function b(){}function g(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(d(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var m=g.prototype=new b;m.constructor=g,n(m,y.prototype),m.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,r){var n,o={},a=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,n)&&!S.hasOwnProperty(n)&&(o[n]=t[n]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var c=Array(u),f=0;f<u;f++)c[f]=arguments[f+2];o.children=c}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===o[n]&&(o[n]=u[n]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:w.current}}function _(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var A=/\/+/g;function x(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,r,n,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case o:u=!0}}if(u)return a=a(u=e),e=""===n?"."+x(u,0):n,Array.isArray(a)?(r="",null!=e&&(r=e.replace(A,"$&/")+"/"),T(a,t,r,"",(function(e){return e}))):null!=a&&(_(a)&&(a=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,r+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(A,"$&/")+"/")+e)),t.push(a)),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c<e.length;c++){var f=n+x(s=e[c],c);u+=T(s,t,r,f,a)}else if("function"===typeof(f=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e)))for(e=f.call(e),c=0;!(s=e.next()).done;)u+=T(s=s.value,t,r,f=n+x(s,c++),a);else if("object"===s)throw t=""+e,Error(d(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function M(e,t,r){if(null==e)return e;var n=[],i=0;return T(e,n,"","",(function(e){return t.call(r,e,i++)})),n}function C(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var O={current:null};function I(){var e=O.current;if(null===e)throw Error(d(321));return e}var P={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:n};t.Children={map:M,forEach:function(e,t,r){M(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return M(e,(function(){t++})),t},toArray:function(e){return M(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error(d(143));return e}},t.Component=y,t.PureComponent=g,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error(d(267,e));var o=n({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(f in t)k.call(t,f)&&!S.hasOwnProperty(f)&&(o[f]=void 0===t[f]&&void 0!==c?c[f]:t[f])}var f=arguments.length-2;if(1===f)o.children=r;else if(1<f){c=Array(f);for(var l=0;l<f;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:C}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return I().useCallback(e,t)},t.useContext=function(e,t){return I().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return I().useEffect(e,t)},t.useImperativeHandle=function(e,t,r){return I().useImperativeHandle(e,t,r)},t.useLayoutEffect=function(e,t){return I().useLayoutEffect(e,t)},t.useMemo=function(e,t){return I().useMemo(e,t)},t.useReducer=function(e,t,r){return I().useReducer(e,t,r)},t.useRef=function(e){return I().useRef(e)},t.useState=function(e){return I().useState(e)},t.version="17.0.2"},function(e,t,r){"use strict";var n=r(1),i=r(186),o=r(530);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!n)throw Error(a(227));var s=new Set,u={};function c(e,t){f(e,t),f(e+"Capture",t)}function f(e,t){for(u[e]=t,e=0;e<t.length;e++)s.add(t[e])}var l=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d=Object.prototype.hasOwnProperty,p={},v={};function y(e,t,r,n,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new y(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];b[t]=new y(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new y(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new y(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new y(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){b[e]=new y(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){b[e]=new y(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){b[e]=new y(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){b[e]=new y(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function w(e,t,r,n){var i=b.hasOwnProperty(t)?b[t]:null;(null!==i?0===i.type:!n&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,r,n){if(null===t||"undefined"===typeof t||function(e,t,r,n){if(null!==r&&0===r.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!n&&(null!==r?!r.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,r,i,n)&&(r=null),n||null===i?function(e){return!!d.call(v,e)||!d.call(p,e)&&(h.test(e)?v[e]=!0:(p[e]=!0,!1))}(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=null===r?3!==i.type&&"":r:(t=i.attributeName,n=i.attributeNamespace,null===r?e.removeAttribute(t):(r=3===(i=i.type)||4===i&&!0===r?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,m);b[t]=new y(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,m);b[t]=new y(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,m);b[t]=new y(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){b[e]=new y(e,1,!1,e.toLowerCase(),null,!1,!1)})),b.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){b[e]=new y(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=60103,E=60106,_=60107,A=60108,x=60114,T=60109,M=60110,C=60112,O=60113,I=60120,P=60115,R=60116,B=60121,D=60128,N=60129,L=60130,j=60131;if("function"===typeof Symbol&&Symbol.for){var U=Symbol.for;S=U("react.element"),E=U("react.portal"),_=U("react.fragment"),A=U("react.strict_mode"),x=U("react.profiler"),T=U("react.provider"),M=U("react.context"),C=U("react.forward_ref"),O=U("react.suspense"),I=U("react.suspense_list"),P=U("react.memo"),R=U("react.lazy"),B=U("react.block"),U("react.scope"),D=U("react.opaque.id"),N=U("react.debug_trace_mode"),L=U("react.offscreen"),j=U("react.legacy_hidden")}var F,K="function"===typeof Symbol&&Symbol.iterator;function z(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=K&&e[K]||e["@@iterator"])?e:null}function V(e){if(void 0===F)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||""}return"\n"+F+e}var H=!1;function J(e,t){if(!e||H)return"";H=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&"string"===typeof u.stack){for(var i=u.stack.split("\n"),o=n.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?V(e):""}function q(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1);case 11:return e=J(e.type.render,!1);case 22:return e=J(e.type._render,!1);case 1:return e=J(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case _:return"Fragment";case E:return"Portal";case x:return"Profiler";case A:return"StrictMode";case O:return"Suspense";case I:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case M:return(e.displayName||"Context")+".Consumer";case T:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case P:return G(e.type);case B:return G(e._render);case R:t=e._payload,e=e._init;try{return G(e(t))}catch(r){}}return null}function X(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Y(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=W(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}function Q(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $(e,t){var r=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function ee(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=X(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function re(e,t){te(e,t);var r=X(t.value),n=t.type;if(null!=r)"number"===n?(0===r&&""===e.value||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,r):t.hasOwnProperty("defaultValue")&&ie(e,t.type,X(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ne(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}""!==(r=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==r&&(e.name=r)}function ie(e,t,r){"number"===t&&Q(e.ownerDocument)===e||(null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}function oe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return n.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+X(r),t=null,i=0;i<e.length;i++){if(e[i].value===r)return e[i].selected=!0,void(n&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(a(92));if(Array.isArray(r)){if(!(1>=r.length))throw Error(a(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:X(r)}}function ce(e,t){var r=X(t.value),n=X(t.defaultValue);null!=r&&((r=""+r)!==e.value&&(e.value=r),null==t.defaultValue&&e.defaultValue!==r&&(e.defaultValue=r)),null!=n&&(e.defaultValue=""+n)}function fe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var le="http://www.w3.org/1999/xhtml",he="http://www.w3.org/2000/svg";function de(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,ye,be=(ye=function(e,t){if(e.namespaceURI!==he||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,r,n){MSApp.execUnsafeLocalFunction((function(){return ye(e,t)}))}:ye);function ge(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}var me={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function ke(e,t,r){return null==t||"boolean"===typeof t||""===t?"":r||"number"!==typeof t||0===t||me.hasOwnProperty(e)&&me[e]?(""+t).trim():t+"px"}function Se(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),i=ke(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}Object.keys(me).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),me[t]=me[e]}))}));var Ee=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _e(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function Ae(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,Me=null,Ce=null;function Oe(e){if(e=ei(e)){if("function"!==typeof Te)throw Error(a(280));var t=e.stateNode;t&&(t=ri(t),Te(e.stateNode,e.type,t))}}function Ie(e){Me?Ce?Ce.push(e):Ce=[e]:Me=e}function Pe(){if(Me){var e=Me,t=Ce;if(Ce=Me=null,Oe(e),t)for(e=0;e<t.length;e++)Oe(t[e])}}function Re(e,t){return e(t)}function Be(e,t,r,n,i){return e(t,r,n,i)}function De(){}var Ne=Re,Le=!1,je=!1;function Ue(){null===Me&&null===Ce||(De(),Pe())}function Fe(e,t){var r=e.stateNode;if(null===r)return null;var n=ri(r);if(null===n)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(n=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!n;break e;default:e=!1}if(e)return null;if(r&&"function"!==typeof r)throw Error(a(231,t,typeof r));return r}var Ke=!1;if(l)try{var ze={};Object.defineProperty(ze,"passive",{get:function(){Ke=!0}}),window.addEventListener("test",ze,ze),window.removeEventListener("test",ze,ze)}catch(ye){Ke=!1}function Ve(e,t,r,n,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(f){this.onError(f)}}var He=!1,Je=null,qe=!1,Ge=null,Xe={onError:function(e){He=!0,Je=e}};function We(e,t,r,n,i,o,a,s,u){He=!1,Je=null,Ve.apply(Xe,arguments)}function Ze(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(r=t.return),e=t.return}while(e)}return 3===t.tag?r:null}function Ye(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Qe(e){if(Ze(e)!==e)throw Error(a(188))}function $e(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ze(e)))throw Error(a(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(n=i.return)){r=n;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===r)return Qe(i),e;if(o===n)return Qe(i),t;o=o.sibling}throw Error(a(188))}if(r.return!==n.return)r=i,n=o;else{for(var s=!1,u=i.child;u;){if(u===r){s=!0,r=i,n=o;break}if(u===n){s=!0,n=i,r=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===r){s=!0,r=o,n=i;break}if(u===n){s=!0,n=o,r=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(r.alternate!==n)throw Error(a(190))}if(3!==r.tag)throw Error(a(188));return r.stateNode.current===r?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var r=e.alternate;null!==t;){if(t===e||t===r)return!0;t=t.return}return!1}var tt,rt,nt,it,ot=!1,at=[],st=null,ut=null,ct=null,ft=new Map,lt=new Map,ht=[],dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,r,n,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|r,nativeEvent:i,targetContainers:[n]}}function vt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":ft.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":lt.delete(t.pointerId)}}function yt(e,t,r,n,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,r,n,i,o),null!==t&&(null!==(t=ei(t))&&rt(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function bt(e){var t=$n(e.target);if(null!==t){var r=Ze(t);if(null!==r)if(13===(t=r.tag)){if(null!==(t=Ye(r)))return e.blockedOn=t,void it(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){nt(r)}))}))}else if(3===t&&r.stateNode.hydrate)return void(e.blockedOn=3===r.tag?r.stateNode.containerInfo:null)}e.blockedOn=null}function gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var r=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==r)return null!==(t=ei(r))&&rt(t),e.blockedOn=r,!1;t.shift()}return!0}function mt(e,t,r){gt(e)&&r.delete(t)}function wt(){for(ot=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ei(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var r=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==r){e.blockedOn=r;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&gt(st)&&(st=null),null!==ut&&gt(ut)&&(ut=null),null!==ct&&gt(ct)&&(ct=null),ft.forEach(mt),lt.forEach(mt)}function kt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,wt)))}function St(e){function t(t){return kt(t,e)}if(0<at.length){kt(at[0],e);for(var r=1;r<at.length;r++){var n=at[r];n.blockedOn===e&&(n.blockedOn=null)}}for(null!==st&&kt(st,e),null!==ut&&kt(ut,e),null!==ct&&kt(ct,e),ft.forEach(t),lt.forEach(t),r=0;r<ht.length;r++)(n=ht[r]).blockedOn===e&&(n.blockedOn=null);for(;0<ht.length&&null===(r=ht[0]).blockedOn;)bt(r),null===r.blockedOn&&ht.shift()}function Et(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var _t={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},At={},xt={};function Tt(e){if(At[e])return At[e];if(!_t[e])return e;var t,r=_t[e];for(t in r)if(r.hasOwnProperty(t)&&t in xt)return At[e]=r[t];return e}l&&(xt=document.createElement("div").style,"AnimationEvent"in window||(delete _t.animationend.animation,delete _t.animationiteration.animation,delete _t.animationstart.animation),"TransitionEvent"in window||delete _t.transitionend.transition);var Mt=Tt("animationend"),Ct=Tt("animationiteration"),Ot=Tt("animationstart"),It=Tt("transitionend"),Pt=new Map,Rt=new Map,Bt=["abort","abort",Mt,"animationEnd",Ct,"animationIteration",Ot,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",It,"transitionEnd","waiting","waiting"];function Dt(e,t){for(var r=0;r<e.length;r+=2){var n=e[r],i=e[r+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Rt.set(n,t),Pt.set(n,i),c(i,[n])}}(0,o.unstable_now)();var Nt=8;function Lt(e){if(0!==(1&e))return Nt=15,1;if(0!==(2&e))return Nt=14,2;if(0!==(4&e))return Nt=13,4;var t=24&e;return 0!==t?(Nt=12,t):0!==(32&e)?(Nt=11,32):0!==(t=192&e)?(Nt=10,t):0!==(256&e)?(Nt=9,256):0!==(t=3584&e)?(Nt=8,t):0!==(4096&e)?(Nt=7,4096):0!==(t=4186112&e)?(Nt=6,t):0!==(t=62914560&e)?(Nt=5,t):67108864&e?(Nt=4,67108864):0!==(134217728&e)?(Nt=3,134217728):0!==(t=805306368&e)?(Nt=2,t):0!==(1073741824&e)?(Nt=1,1073741824):(Nt=8,e)}function jt(e,t){var r=e.pendingLanes;if(0===r)return Nt=0;var n=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)n=o,i=Nt=15;else if(0!==(o=134217727&r)){var u=o&~a;0!==u?(n=Lt(u),i=Nt):0!==(s&=o)&&(n=Lt(s),i=Nt)}else 0!==(o=r&~a)?(n=Lt(o),i=Nt):0!==s&&(n=Lt(s),i=Nt);if(0===n)return 0;if(n=r&((0>(n=31-Ht(n))?0:1<<n)<<1)-1,0!==t&&t!==n&&0===(t&a)){if(Lt(t),i<=Nt)return t;Nt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=n;0<t;)i=1<<(r=31-Ht(t)),n|=e[r],t&=~i;return n}function Ut(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ft(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Kt(24&~t))?Ft(10,t):e;case 10:return 0===(e=Kt(192&~t))?Ft(8,t):e;case 8:return 0===(e=Kt(3584&~t))&&(0===(e=Kt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Kt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Kt(e){return e&-e}function zt(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Vt(e,t,r){e.pendingLanes|=t;var n=t-1;e.suspendedLanes&=n,e.pingedLanes&=n,(e=e.eventTimes)[t=31-Ht(t)]=r}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Jt(e)/qt|0)|0},Jt=Math.log,qt=Math.LN2;var Gt=o.unstable_UserBlockingPriority,Xt=o.unstable_runWithPriority,Wt=!0;function Zt(e,t,r,n){Le||De();var i=Qt,o=Le;Le=!0;try{Be(i,e,t,r,n)}finally{(Le=o)||Ue()}}function Yt(e,t,r,n){Xt(Gt,Qt.bind(null,e,t,r,n))}function Qt(e,t,r,n){var i;if(Wt)if((i=0===(4&t))&&0<at.length&&-1<dt.indexOf(e))e=pt(null,e,t,r,n),at.push(e);else{var o=$t(e,t,r,n);if(null===o)i&&vt(e,n);else{if(i){if(-1<dt.indexOf(e))return e=pt(o,e,t,r,n),void at.push(e);if(function(e,t,r,n,i){switch(t){case"focusin":return st=yt(st,e,t,r,n,i),!0;case"dragenter":return ut=yt(ut,e,t,r,n,i),!0;case"mouseover":return ct=yt(ct,e,t,r,n,i),!0;case"pointerover":var o=i.pointerId;return ft.set(o,yt(ft.get(o)||null,e,t,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,lt.set(o,yt(lt.get(o)||null,e,t,r,n,i)),!0}return!1}(o,e,t,r,n))return;vt(e,n)}Pn(e,t,n,null,r)}}}function $t(e,t,r,n){var i=xe(n);if(null!==(i=$n(i))){var o=Ze(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Ye(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Pn(e,t,n,i,r),null}var er=null,tr=null,rr=null;function nr(){if(rr)return rr;var e,t,r=tr,n=r.length,i="value"in er?er.value:er.textContent,o=i.length;for(e=0;e<n&&r[e]===i[e];e++);var a=n-e;for(t=1;t<=a&&r[n-t]===i[o-t];t++);return rr=i.slice(e,1<t?1-t:void 0)}function ir(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function or(){return!0}function ar(){return!1}function sr(e){function t(t,r,n,i,o){for(var a in this._reactName=t,this._targetInst=n,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?or:ar,this.isPropagationStopped=ar,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=or)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=or)},persist:function(){},isPersistent:or}),t}var ur,cr,fr,lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hr=sr(lr),dr=i({},lr,{view:0,detail:0}),pr=sr(dr),vr=i({},dr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fr&&(fr&&"mousemove"===e.type?(ur=e.screenX-fr.screenX,cr=e.screenY-fr.screenY):cr=ur=0,fr=e),ur)},movementY:function(e){return"movementY"in e?e.movementY:cr}}),yr=sr(vr),br=sr(i({},vr,{dataTransfer:0})),gr=sr(i({},dr,{relatedTarget:0})),mr=sr(i({},lr,{animationName:0,elapsedTime:0,pseudoElement:0})),wr=sr(i({},lr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),kr=sr(i({},lr,{data:0})),Sr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Er={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ar(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_r[e])&&!!t[e]}function xr(){return Ar}var Tr=sr(i({},dr,{key:function(e){if(e.key){var t=Sr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ir(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Er[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xr,charCode:function(e){return"keypress"===e.type?ir(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ir(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Mr=sr(i({},vr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cr=sr(i({},dr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xr})),Or=sr(i({},lr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ir=sr(i({},vr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Pr=[9,13,27,32],Rr=l&&"CompositionEvent"in window,Br=null;l&&"documentMode"in document&&(Br=document.documentMode);var Dr=l&&"TextEvent"in window&&!Br,Nr=l&&(!Rr||Br&&8<Br&&11>=Br),Lr=String.fromCharCode(32),jr=!1;function Ur(e,t){switch(e){case"keyup":return-1!==Pr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fr(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Kr=!1;var zr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zr[e.type]:"textarea"===t}function Hr(e,t,r,n){Ie(n),0<(t=Bn(t,"onChange")).length&&(r=new hr("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Jr=null,qr=null;function Gr(e){xn(e,0)}function Xr(e){if(Y(ti(e)))return e}function Wr(e,t){if("change"===e)return t}var Zr=!1;if(l){var Yr;if(l){var Qr="oninput"in document;if(!Qr){var $r=document.createElement("div");$r.setAttribute("oninput","return;"),Qr="function"===typeof $r.oninput}Yr=Qr}else Yr=!1;Zr=Yr&&(!document.documentMode||9<document.documentMode)}function en(){Jr&&(Jr.detachEvent("onpropertychange",tn),qr=Jr=null)}function tn(e){if("value"===e.propertyName&&Xr(qr)){var t=[];if(Hr(t,qr,e,xe(e)),e=Gr,Le)e(t);else{Le=!0;try{Re(e,t)}finally{Le=!1,Ue()}}}}function rn(e,t,r){"focusin"===e?(en(),qr=r,(Jr=t).attachEvent("onpropertychange",tn)):"focusout"===e&&en()}function nn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xr(qr)}function on(e,t){if("click"===e)return Xr(t)}function an(e,t){if("input"===e||"change"===e)return Xr(t)}var sn="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},un=Object.prototype.hasOwnProperty;function cn(e,t){if(sn(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++)if(!un.call(t,r[n])||!sn(e[r[n]],t[r[n]]))return!1;return!0}function fn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ln(e,t){var r,n=fn(e);for(e=0;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fn(n)}}function hn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dn(){for(var e=window,t=Q();t instanceof e.HTMLIFrameElement;){try{var r="string"===typeof t.contentWindow.location.href}catch(n){r=!1}if(!r)break;t=Q((e=t.contentWindow).document)}return t}function pn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vn=l&&"documentMode"in document&&11>=document.documentMode,yn=null,bn=null,gn=null,mn=!1;function wn(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;mn||null==yn||yn!==Q(n)||("selectionStart"in(n=yn)&&pn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},gn&&cn(gn,n)||(gn=n,0<(n=Bn(bn,"onSelect")).length&&(t=new hr("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=yn)))}Dt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Dt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Dt(Bt,2);for(var kn="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Sn=0;Sn<kn.length;Sn++)Rt.set(kn[Sn],0);f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var En="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_n=new Set("cancel close invalid load scroll toggle".split(" ").concat(En));function An(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,n,i,o,s,u,c){if(We.apply(this,arguments),He){if(!He)throw Error(a(198));var f=Je;He=!1,Je=null,qe||(qe=!0,Ge=f)}}(n,t,void 0,e),e.currentTarget=null}function xn(e,t){t=0!==(4&t);for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break e;An(i,s,c),o=u}else for(a=0;a<n.length;a++){if(u=(s=n[a]).instance,c=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break e;An(i,s,c),o=u}}}if(qe)throw e=Ge,qe=!1,Ge=null,e}function Tn(e,t){var r=ni(t),n=e+"__bubble";r.has(n)||(In(t,e,2,!1),r.add(n))}var Mn="_reactListening"+Math.random().toString(36).slice(2);function Cn(e){e[Mn]||(e[Mn]=!0,s.forEach((function(t){_n.has(t)||On(t,!1,e,null),On(t,!0,e,null)})))}function On(e,t,r,n){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=r;if("selectionchange"===e&&9!==r.nodeType&&(o=r.ownerDocument),null!==n&&!t&&_n.has(e)){if("scroll"!==e)return;i|=2,o=n}var a=ni(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),In(o,e,i,t),a.add(s))}function In(e,t,r,n){var i=Rt.get(t);switch(void 0===i?2:i){case 0:i=Zt;break;case 1:i=Yt;break;default:i=Qt}r=i.bind(null,t,r,e),i=void 0,!Ke||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),n?void 0!==i?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):void 0!==i?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function Pn(e,t,r,n,i){var o=n;if(0===(1&t)&&0===(2&t)&&null!==n)e:for(;;){if(null===n)return;var a=n.tag;if(3===a||4===a){var s=n.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=n.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=$n(s)))return;if(5===(u=a.tag)||6===u){n=o=a;continue e}s=s.parentNode}}n=n.return}!function(e,t,r){if(je)return e(t,r);je=!0;try{Ne(e,t,r)}finally{je=!1,Ue()}}((function(){var n=o,i=xe(r),a=[];e:{var s=Pt.get(e);if(void 0!==s){var u=hr,c=e;switch(e){case"keypress":if(0===ir(r))break e;case"keydown":case"keyup":u=Tr;break;case"focusin":c="focus",u=gr;break;case"focusout":c="blur",u=gr;break;case"beforeblur":case"afterblur":u=gr;break;case"click":if(2===r.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=br;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Cr;break;case Mt:case Ct:case Ot:u=mr;break;case It:u=Or;break;case"scroll":u=pr;break;case"wheel":u=Ir;break;case"copy":case"cut":case"paste":u=wr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Mr}var f=0!==(4&t),l=!f&&"scroll"===e,h=f?null!==s?s+"Capture":null:s;f=[];for(var d,p=n;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Fe(p,h))&&f.push(Rn(p,v,d)))),l)break;p=p.return}0<f.length&&(s=new u(s,c,null,r,i),a.push({event:s,listeners:f}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=r.relatedTarget||r.fromElement)||!$n(c)&&!c[Yn])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=n,null!==(c=(c=r.relatedTarget||r.toElement)?$n(c):null)&&(c!==(l=Ze(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=n),u!==c)){if(f=yr,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(f=Mr,v="onPointerLeave",h="onPointerEnter",p="pointer"),l=null==u?s:ti(u),d=null==c?s:ti(c),(s=new f(v,p+"leave",u,r,i)).target=l,s.relatedTarget=d,v=null,$n(i)===n&&((f=new f(h,p+"enter",c,r,i)).target=d,f.relatedTarget=l,v=f),l=v,u&&c)e:{for(h=c,p=0,d=f=u;d;d=Dn(d))p++;for(d=0,v=h;v;v=Dn(v))d++;for(;0<p-d;)f=Dn(f),p--;for(;0<d-p;)h=Dn(h),d--;for(;p--;){if(f===h||null!==h&&f===h.alternate)break e;f=Dn(f),h=Dn(h)}f=null}else f=null;null!==u&&Nn(a,s,u,f,!1),null!==c&&null!==l&&Nn(a,l,c,f,!0)}if("select"===(u=(s=n?ti(n):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var y=Wr;else if(Vr(s))if(Zr)y=an;else{y=nn;var b=rn}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(y=on);switch(y&&(y=y(e,n))?Hr(a,y,r,i):(b&&b(e,s,n),"focusout"===e&&(b=s._wrapperState)&&b.controlled&&"number"===s.type&&ie(s,"number",s.value)),b=n?ti(n):window,e){case"focusin":(Vr(b)||"true"===b.contentEditable)&&(yn=b,bn=n,gn=null);break;case"focusout":gn=bn=yn=null;break;case"mousedown":mn=!0;break;case"contextmenu":case"mouseup":case"dragend":mn=!1,wn(a,r,i);break;case"selectionchange":if(vn)break;case"keydown":case"keyup":wn(a,r,i)}var g;if(Rr)e:{switch(e){case"compositionstart":var m="onCompositionStart";break e;case"compositionend":m="onCompositionEnd";break e;case"compositionupdate":m="onCompositionUpdate";break e}m=void 0}else Kr?Ur(e,r)&&(m="onCompositionEnd"):"keydown"===e&&229===r.keyCode&&(m="onCompositionStart");m&&(Nr&&"ko"!==r.locale&&(Kr||"onCompositionStart"!==m?"onCompositionEnd"===m&&Kr&&(g=nr()):(tr="value"in(er=i)?er.value:er.textContent,Kr=!0)),0<(b=Bn(n,m)).length&&(m=new kr(m,e,null,r,i),a.push({event:m,listeners:b}),g?m.data=g:null!==(g=Fr(r))&&(m.data=g))),(g=Dr?function(e,t){switch(e){case"compositionend":return Fr(t);case"keypress":return 32!==t.which?null:(jr=!0,Lr);case"textInput":return(e=t.data)===Lr&&jr?null:e;default:return null}}(e,r):function(e,t){if(Kr)return"compositionend"===e||!Rr&&Ur(e,t)?(e=nr(),rr=tr=er=null,Kr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nr&&"ko"!==t.locale?null:t.data;default:return null}}(e,r))&&(0<(n=Bn(n,"onBeforeInput")).length&&(i=new kr("onBeforeInput","beforeinput",null,r,i),a.push({event:i,listeners:n}),i.data=g))}xn(a,t)}))}function Rn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Bn(e,t){for(var r=t+"Capture",n=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Fe(e,r))&&n.unshift(Rn(e,o,i)),null!=(o=Fe(e,t))&&n.push(Rn(e,o,i))),e=e.return}return n}function Dn(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Nn(e,t,r,n,i){for(var o=t._reactName,a=[];null!==r&&r!==n;){var s=r,u=s.alternate,c=s.stateNode;if(null!==u&&u===n)break;5===s.tag&&null!==c&&(s=c,i?null!=(u=Fe(r,o))&&a.unshift(Rn(r,u,s)):i||null!=(u=Fe(r,o))&&a.push(Rn(r,u,s))),r=r.return}0!==a.length&&e.push({event:t,listeners:a})}function Ln(){}var jn=null,Un=null;function Fn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Kn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var zn="function"===typeof setTimeout?setTimeout:void 0,Vn="function"===typeof clearTimeout?clearTimeout:void 0;function Hn(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Jn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function qn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var r=e.data;if("$"===r||"$!"===r||"$?"===r){if(0===t)return e;t--}else"/$"===r&&t++}e=e.previousSibling}return null}var Gn=0;var Xn=Math.random().toString(36).slice(2),Wn="__reactFiber$"+Xn,Zn="__reactProps$"+Xn,Yn="__reactContainer$"+Xn,Qn="__reactEvents$"+Xn;function $n(e){var t=e[Wn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Yn]||r[Wn]){if(r=t.alternate,null!==t.child||null!==r&&null!==r.child)for(e=qn(e);null!==e;){if(r=e[Wn])return r;e=qn(e)}return t}r=(e=r).parentNode}return null}function ei(e){return!(e=e[Wn]||e[Yn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ti(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function ri(e){return e[Zn]||null}function ni(e){var t=e[Qn];return void 0===t&&(t=e[Qn]=new Set),t}var ii=[],oi=-1;function ai(e){return{current:e}}function si(e){0>oi||(e.current=ii[oi],ii[oi]=null,oi--)}function ui(e,t){oi++,ii[oi]=e.current,e.current=t}var ci={},fi=ai(ci),li=ai(!1),hi=ci;function di(e,t){var r=e.type.contextTypes;if(!r)return ci;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in r)o[i]=t[i];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function pi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function vi(){si(li),si(fi)}function yi(e,t,r){if(fi.current!==ci)throw Error(a(168));ui(fi,t),ui(li,r)}function bi(e,t,r){var n=e.stateNode;if(e=t.childContextTypes,"function"!==typeof n.getChildContext)return r;for(var o in n=n.getChildContext())if(!(o in e))throw Error(a(108,G(t)||"Unknown",o));return i({},r,n)}function gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,hi=fi.current,ui(fi,e),ui(li,li.current),!0}function mi(e,t,r){var n=e.stateNode;if(!n)throw Error(a(169));r?(e=bi(e,t,hi),n.__reactInternalMemoizedMergedChildContext=e,si(li),si(fi),ui(fi,e)):si(li),ui(li,r)}var wi=null,ki=null,Si=o.unstable_runWithPriority,Ei=o.unstable_scheduleCallback,_i=o.unstable_cancelCallback,Ai=o.unstable_shouldYield,xi=o.unstable_requestPaint,Ti=o.unstable_now,Mi=o.unstable_getCurrentPriorityLevel,Ci=o.unstable_ImmediatePriority,Oi=o.unstable_UserBlockingPriority,Ii=o.unstable_NormalPriority,Pi=o.unstable_LowPriority,Ri=o.unstable_IdlePriority,Bi={},Di=void 0!==xi?xi:function(){},Ni=null,Li=null,ji=!1,Ui=Ti(),Fi=1e4>Ui?Ti:function(){return Ti()-Ui};function Ki(){switch(Mi()){case Ci:return 99;case Oi:return 98;case Ii:return 97;case Pi:return 96;case Ri:return 95;default:throw Error(a(332))}}function zi(e){switch(e){case 99:return Ci;case 98:return Oi;case 97:return Ii;case 96:return Pi;case 95:return Ri;default:throw Error(a(332))}}function Vi(e,t){return e=zi(e),Si(e,t)}function Hi(e,t,r){return e=zi(e),Ei(e,t,r)}function Ji(){if(null!==Li){var e=Li;Li=null,_i(e)}qi()}function qi(){if(!ji&&null!==Ni){ji=!0;var e=0;try{var t=Ni;Vi(99,(function(){for(;e<t.length;e++){var r=t[e];do{r=r(!0)}while(null!==r)}})),Ni=null}catch(r){throw null!==Ni&&(Ni=Ni.slice(e+1)),Ei(Ci,Ji),r}finally{ji=!1}}}var Gi=k.ReactCurrentBatchConfig;function Xi(e,t){if(e&&e.defaultProps){for(var r in t=i({},t),e=e.defaultProps)void 0===t[r]&&(t[r]=e[r]);return t}return t}var Wi=ai(null),Zi=null,Yi=null,Qi=null;function $i(){Qi=Yi=Zi=null}function eo(e){var t=Wi.current;si(Wi),e.type._context._currentValue=t}function to(e,t){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)===t){if(null===r||(r.childLanes&t)===t)break;r.childLanes|=t}else e.childLanes|=t,null!==r&&(r.childLanes|=t);e=e.return}}function ro(e,t){Zi=e,Qi=Yi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Ba=!0),e.firstContext=null)}function no(e,t){if(Qi!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Qi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Yi){if(null===Zi)throw Error(a(308));Yi=t,Zi.dependencies={lanes:0,firstContext:t,responders:null}}else Yi=Yi.next=t;return e._currentValue}var io=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function so(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t){if(null!==(e=e.updateQueue)){var r=(e=e.shared).pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}}function co(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&r===(n=n.updateQueue)){var i=null,o=null;if(null!==(r=r.firstBaseUpdate)){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===o?i=o=a:o=o.next=a,r=r.next}while(null!==r);null===o?i=o=t:o=o.next=t}else i=o=t;return r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},void(e.updateQueue=r)}null===(e=r.lastBaseUpdate)?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function fo(e,t,r,n){var o=e.updateQueue;io=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,u=o.shared.pending;if(null!==u){o.shared.pending=null;var c=u,f=c.next;c.next=null,null===s?a=f:s.next=f,s=c;var l=e.alternate;if(null!==l){var h=(l=l.updateQueue).lastBaseUpdate;h!==s&&(null===h?l.firstBaseUpdate=f:h.next=f,l.lastBaseUpdate=c)}}if(null!==a){for(h=o.baseState,s=0,l=f=c=null;;){u=a.lane;var d=a.eventTime;if((n&u)===u){null!==l&&(l=l.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,v=a;switch(u=t,d=r,v.tag){case 1:if("function"===typeof(p=v.payload)){h=p.call(d,h,u);break e}h=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(u="function"===typeof(p=v.payload)?p.call(d,h,u):p)||void 0===u)break e;h=i({},h,u);break e;case 2:io=!0}}null!==a.callback&&(e.flags|=32,null===(u=o.effects)?o.effects=[a]:u.push(a))}else d={eventTime:d,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===l?(f=l=d,c=h):l=l.next=d,s|=u;if(null===(a=a.next)){if(null===(u=o.shared.pending))break;a=u.next,u.next=null,o.lastBaseUpdate=u,o.shared.pending=null}}null===l&&(c=h),o.baseState=c,o.firstBaseUpdate=f,o.lastBaseUpdate=l,js|=s,e.lanes=s,e.memoizedState=h}}function lo(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(null!==i){if(n.callback=null,n=r,"function"!==typeof i)throw Error(a(191,i));i.call(n)}}}var ho=(new n.Component).refs;function po(e,t,r,n){r=null===(r=r(n,t=e.memoizedState))||void 0===r?t:i({},t,r),e.memoizedState=r,0===e.lanes&&(e.updateQueue.baseState=r)}var vo={isMounted:function(e){return!!(e=e._reactInternals)&&Ze(e)===e},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=cu(),i=fu(e),o=so(n,i);o.payload=t,void 0!==r&&null!==r&&(o.callback=r),uo(e,o),lu(e,i,n)},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=cu(),i=fu(e),o=so(n,i);o.tag=1,o.payload=t,void 0!==r&&null!==r&&(o.callback=r),uo(e,o),lu(e,i,n)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=cu(),n=fu(e),i=so(r,n);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),uo(e,i),lu(e,n,r)}};function yo(e,t,r,n,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!cn(r,n)||!cn(i,o))}function bo(e,t,r){var n=!1,i=ci,o=t.contextType;return"object"===typeof o&&null!==o?o=no(o):(i=pi(t)?hi:fi.current,o=(n=null!==(n=t.contextTypes)&&void 0!==n)?di(e,i):ci),t=new t(r,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=vo,e.stateNode=t,t._reactInternals=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function go(e,t,r,n){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&vo.enqueueReplaceState(t,t.state,null)}function mo(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs=ho,oo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=no(o):(o=pi(t)?hi:fi.current,i.context=di(e,o)),fo(e,r,i,n),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(po(e,t,o,r),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&vo.enqueueReplaceState(i,i.state,null),fo(e,r,i,n),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var wo=Array.isArray;function ko(e,t,r){if(null!==(e=r.ref)&&"function"!==typeof e&&"object"!==typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(a(309));var n=r.stateNode}if(!n)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=n.refs;t===ho&&(t=n.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!r._owner)throw Error(a(290,e))}return e}function So(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Eo(e){function t(t,r){if(e){var n=t.lastEffect;null!==n?(n.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r,r.nextEffect=null,r.flags=8}}function r(r,n){if(!e)return null;for(;null!==n;)t(r,n),n=n.sibling;return null}function n(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Vu(e,t)).index=0,e.sibling=null,e}function o(t,r,n){return t.index=n,e?null!==(n=t.alternate)?(n=n.index)<r?(t.flags=2,r):n:(t.flags=2,r):r}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,r,n){return null===t||6!==t.tag?((t=Gu(r,e.mode,n)).return=e,t):((t=i(t,r)).return=e,t)}function c(e,t,r,n){return null!==t&&t.elementType===r.type?((n=i(t,r.props)).ref=ko(e,t,r),n.return=e,n):((n=Hu(r.type,r.key,r.props,null,e.mode,n)).ref=ko(e,t,r),n.return=e,n)}function f(e,t,r,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation?((t=Xu(r,e.mode,n)).return=e,t):((t=i(t,r.children||[])).return=e,t)}function l(e,t,r,n,o){return null===t||7!==t.tag?((t=Ju(r,e.mode,n,o)).return=e,t):((t=i(t,r)).return=e,t)}function h(e,t,r){if("string"===typeof t||"number"===typeof t)return(t=Gu(""+t,e.mode,r)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case S:return(r=Hu(t.type,t.key,t.props,null,e.mode,r)).ref=ko(e,null,t),r.return=e,r;case E:return(t=Xu(t,e.mode,r)).return=e,t}if(wo(t)||z(t))return(t=Ju(t,e.mode,r,null)).return=e,t;So(e,t)}return null}function d(e,t,r,n){var i=null!==t?t.key:null;if("string"===typeof r||"number"===typeof r)return null!==i?null:u(e,t,""+r,n);if("object"===typeof r&&null!==r){switch(r.$$typeof){case S:return r.key===i?r.type===_?l(e,t,r.props.children,n,i):c(e,t,r,n):null;case E:return r.key===i?f(e,t,r,n):null}if(wo(r)||z(r))return null!==i?null:l(e,t,r,n,null);So(e,r)}return null}function p(e,t,r,n,i){if("string"===typeof n||"number"===typeof n)return u(t,e=e.get(r)||null,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case S:return e=e.get(null===n.key?r:n.key)||null,n.type===_?l(t,e,n.props.children,i,n.key):c(t,e,n,i);case E:return f(t,e=e.get(null===n.key?r:n.key)||null,n,i)}if(wo(n)||z(n))return l(t,e=e.get(r)||null,n,i,null);So(t,n)}return null}function v(i,a,s,u){for(var c=null,f=null,l=a,v=a=0,y=null;null!==l&&v<s.length;v++){l.index>v?(y=l,l=null):y=l.sibling;var b=d(i,l,s[v],u);if(null===b){null===l&&(l=y);break}e&&l&&null===b.alternate&&t(i,l),a=o(b,a,v),null===f?c=b:f.sibling=b,f=b,l=y}if(v===s.length)return r(i,l),c;if(null===l){for(;v<s.length;v++)null!==(l=h(i,s[v],u))&&(a=o(l,a,v),null===f?c=l:f.sibling=l,f=l);return c}for(l=n(i,l);v<s.length;v++)null!==(y=p(l,i,v,s[v],u))&&(e&&null!==y.alternate&&l.delete(null===y.key?v:y.key),a=o(y,a,v),null===f?c=y:f.sibling=y,f=y);return e&&l.forEach((function(e){return t(i,e)})),c}function y(i,s,u,c){var f=z(u);if("function"!==typeof f)throw Error(a(150));if(null==(u=f.call(u)))throw Error(a(151));for(var l=f=null,v=s,y=s=0,b=null,g=u.next();null!==v&&!g.done;y++,g=u.next()){v.index>y?(b=v,v=null):b=v.sibling;var m=d(i,v,g.value,c);if(null===m){null===v&&(v=b);break}e&&v&&null===m.alternate&&t(i,v),s=o(m,s,y),null===l?f=m:l.sibling=m,l=m,v=b}if(g.done)return r(i,v),f;if(null===v){for(;!g.done;y++,g=u.next())null!==(g=h(i,g.value,c))&&(s=o(g,s,y),null===l?f=g:l.sibling=g,l=g);return f}for(v=n(i,v);!g.done;y++,g=u.next())null!==(g=p(v,i,y,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?y:g.key),s=o(g,s,y),null===l?f=g:l.sibling=g,l=g);return e&&v.forEach((function(e){return t(i,e)})),f}return function(e,n,o,u){var c="object"===typeof o&&null!==o&&o.type===_&&null===o.key;c&&(o=o.props.children);var f="object"===typeof o&&null!==o;if(f)switch(o.$$typeof){case S:e:{for(f=o.key,c=n;null!==c;){if(c.key===f){switch(c.tag){case 7:if(o.type===_){r(e,c.sibling),(n=i(c,o.props.children)).return=e,e=n;break e}break;default:if(c.elementType===o.type){r(e,c.sibling),(n=i(c,o.props)).ref=ko(e,c,o),n.return=e,e=n;break e}}r(e,c);break}t(e,c),c=c.sibling}o.type===_?((n=Ju(o.props.children,e.mode,u,o.key)).return=e,e=n):((u=Hu(o.type,o.key,o.props,null,e.mode,u)).ref=ko(e,n,o),u.return=e,e=u)}return s(e);case E:e:{for(c=o.key;null!==n;){if(n.key===c){if(4===n.tag&&n.stateNode.containerInfo===o.containerInfo&&n.stateNode.implementation===o.implementation){r(e,n.sibling),(n=i(n,o.children||[])).return=e,e=n;break e}r(e,n);break}t(e,n),n=n.sibling}(n=Xu(o,e.mode,u)).return=e,e=n}return s(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==n&&6===n.tag?(r(e,n.sibling),(n=i(n,o)).return=e,e=n):(r(e,n),(n=Gu(o,e.mode,u)).return=e,e=n),s(e);if(wo(o))return v(e,n,o,u);if(z(o))return y(e,n,o,u);if(f&&So(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,G(e.type)||"Component"))}return r(e,n)}}var _o=Eo(!0),Ao=Eo(!1),xo={},To=ai(xo),Mo=ai(xo),Co=ai(xo);function Oo(e){if(e===xo)throw Error(a(174));return e}function Io(e,t){switch(ui(Co,t),ui(Mo,e),ui(To,xo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}si(To),ui(To,t)}function Po(){si(To),si(Mo),si(Co)}function Ro(e){Oo(Co.current);var t=Oo(To.current),r=pe(t,e.type);t!==r&&(ui(Mo,e),ui(To,r))}function Bo(e){Mo.current===e&&(si(To),si(Mo))}var Do=ai(0);function No(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||"$?"===r.data||"$!"===r.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lo=null,jo=null,Uo=!1;function Fo(e,t){var r=Ku(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=t,r.return=e,r.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function Ko(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function zo(e){if(Uo){var t=jo;if(t){var r=t;if(!Ko(e,t)){if(!(t=Jn(r.nextSibling))||!Ko(e,t))return e.flags=-1025&e.flags|2,Uo=!1,void(Lo=e);Fo(Lo,r)}Lo=e,jo=Jn(t.firstChild)}else e.flags=-1025&e.flags|2,Uo=!1,Lo=e}}function Vo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Lo=e}function Ho(e){if(e!==Lo)return!1;if(!Uo)return Vo(e),Uo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Kn(t,e.memoizedProps))for(t=jo;t;)Fo(e,t),t=Jn(t.nextSibling);if(Vo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){jo=Jn(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}jo=null}}else jo=Lo?Jn(e.stateNode.nextSibling):null;return!0}function Jo(){jo=Lo=null,Uo=!1}var qo=[];function Go(){for(var e=0;e<qo.length;e++)qo[e]._workInProgressVersionPrimary=null;qo.length=0}var Xo=k.ReactCurrentDispatcher,Wo=k.ReactCurrentBatchConfig,Zo=0,Yo=null,Qo=null,$o=null,ea=!1,ta=!1;function ra(){throw Error(a(321))}function na(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!sn(e[r],t[r]))return!1;return!0}function ia(e,t,r,n,i,o){if(Zo=o,Yo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xo.current=null===e||null===e.memoizedState?Oa:Ia,e=r(n,i),ta){o=0;do{if(ta=!1,!(25>o))throw Error(a(301));o+=1,$o=Qo=null,t.updateQueue=null,Xo.current=Pa,e=r(n,i)}while(ta)}if(Xo.current=Ca,t=null!==Qo&&null!==Qo.next,Zo=0,$o=Qo=Yo=null,ea=!1,t)throw Error(a(300));return e}function oa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===$o?Yo.memoizedState=$o=e:$o=$o.next=e,$o}function aa(){if(null===Qo){var e=Yo.alternate;e=null!==e?e.memoizedState:null}else e=Qo.next;var t=null===$o?Yo.memoizedState:$o.next;if(null!==t)$o=t,Qo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Qo=e).memoizedState,baseState:Qo.baseState,baseQueue:Qo.baseQueue,queue:Qo.queue,next:null},null===$o?Yo.memoizedState=$o=e:$o=$o.next=e}return $o}function sa(e,t){return"function"===typeof t?t(e):t}function ua(e){var t=aa(),r=t.queue;if(null===r)throw Error(a(311));r.lastRenderedReducer=e;var n=Qo,i=n.baseQueue,o=r.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}n.baseQueue=i=o,r.pending=null}if(null!==i){i=i.next,n=n.baseState;var u=s=o=null,c=i;do{var f=c.lane;if((Zo&f)===f)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),n=c.eagerReducer===e?c.eagerState:e(n,c.action);else{var l={lane:f,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=l,o=n):u=u.next=l,Yo.lanes|=f,js|=f}c=c.next}while(null!==c&&c!==i);null===u?o=n:u.next=s,sn(n,t.memoizedState)||(Ba=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=u,r.lastRenderedState=n}return[t.memoizedState,r.dispatch]}function ca(e){var t=aa(),r=t.queue;if(null===r)throw Error(a(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,o=t.memoizedState;if(null!==i){r.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sn(o,t.memoizedState)||(Ba=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function fa(e,t,r){var n=t._getVersion;n=n(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===n:(e=e.mutableReadLanes,(e=(Zo&e)===e)&&(t._workInProgressVersionPrimary=n,qo.push(t))),e)return r(t._source);throw qo.push(t),Error(a(350))}function la(e,t,r,n){var i=Os;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),u=Xo.current,c=u.useState((function(){return fa(i,t,r)})),f=c[1],l=c[0];c=$o;var h=e.memoizedState,d=h.refs,p=d.getSnapshot,v=h.source;h=h.subscribe;var y=Yo;return e.memoizedState={refs:d,source:t,subscribe:n},u.useEffect((function(){d.getSnapshot=r,d.setSnapshot=f;var e=o(t._source);if(!sn(s,e)){e=r(t._source),sn(l,e)||(f(e),e=fu(y),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var n=i.entanglements,a=e;0<a;){var u=31-Ht(a),c=1<<u;n[u]|=e,a&=~c}}}),[r,t,n]),u.useEffect((function(){return n(t._source,(function(){var e=d.getSnapshot,r=d.setSnapshot;try{r(e(t._source));var n=fu(y);i.mutableReadLanes|=n&i.pendingLanes}catch(o){r((function(){throw o}))}}))}),[t,n]),sn(p,r)&&sn(v,t)&&sn(h,n)||((e={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:l}).dispatch=f=Ma.bind(null,Yo,e),c.queue=e,c.baseQueue=null,l=fa(i,t,r),c.memoizedState=c.baseState=l),l}function ha(e,t,r){return la(aa(),e,t,r)}function da(e){var t=oa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e}).dispatch=Ma.bind(null,Yo,e),[t.memoizedState,e]}function pa(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},null===(t=Yo.updateQueue)?(t={lastEffect:null},Yo.updateQueue=t,t.lastEffect=e.next=e):null===(r=t.lastEffect)?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function va(e){return e={current:e},oa().memoizedState=e}function ya(){return aa().memoizedState}function ba(e,t,r,n){var i=oa();Yo.flags|=e,i.memoizedState=pa(1|t,r,void 0,void 0===n?null:n)}function ga(e,t,r,n){var i=aa();n=void 0===n?null:n;var o=void 0;if(null!==Qo){var a=Qo.memoizedState;if(o=a.destroy,null!==n&&na(n,a.deps))return void pa(t,r,o,n)}Yo.flags|=e,i.memoizedState=pa(1|t,r,o,n)}function ma(e,t){return ba(516,4,e,t)}function wa(e,t){return ga(516,4,e,t)}function ka(e,t){return ga(4,2,e,t)}function Sa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ea(e,t,r){return r=null!==r&&void 0!==r?r.concat([e]):null,ga(4,2,Sa.bind(null,t,e),r)}function _a(){}function Aa(e,t){var r=aa();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&na(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function xa(e,t){var r=aa();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&na(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Ta(e,t){var r=Ki();Vi(98>r?98:r,(function(){e(!0)})),Vi(97<r?97:r,(function(){var r=Wo.transition;Wo.transition=1;try{e(!1),t()}finally{Wo.transition=r}}))}function Ma(e,t,r){var n=cu(),i=fu(e),o={lane:i,action:r,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Yo||null!==a&&a===Yo)ta=ea=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,u=a(s,r);if(o.eagerReducer=a,o.eagerState=u,sn(u,s))return}catch(c){}lu(e,i,n)}}var Ca={readContext:no,useCallback:ra,useContext:ra,useEffect:ra,useImperativeHandle:ra,useLayoutEffect:ra,useMemo:ra,useReducer:ra,useRef:ra,useState:ra,useDebugValue:ra,useDeferredValue:ra,useTransition:ra,useMutableSource:ra,useOpaqueIdentifier:ra,unstable_isNewReconciler:!1},Oa={readContext:no,useCallback:function(e,t){return oa().memoizedState=[e,void 0===t?null:t],e},useContext:no,useEffect:ma,useImperativeHandle:function(e,t,r){return r=null!==r&&void 0!==r?r.concat([e]):null,ba(4,2,Sa.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ba(4,2,e,t)},useMemo:function(e,t){var r=oa();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=oa();return t=void 0!==r?r(t):t,n.memoizedState=n.baseState=t,e=(e=n.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ma.bind(null,Yo,e),[n.memoizedState,e]},useRef:va,useState:da,useDebugValue:_a,useDeferredValue:function(e){var t=da(e),r=t[0],n=t[1];return ma((function(){var t=Wo.transition;Wo.transition=1;try{n(e)}finally{Wo.transition=t}}),[e]),r},useTransition:function(){var e=da(!1),t=e[0];return va(e=Ta.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,r){var n=oa();return n.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:r},la(n,e,t,r)},useOpaqueIdentifier:function(){if(Uo){var e=!1,t=function(e){return{$$typeof:D,toString:e,valueOf:e}}((function(){throw e||(e=!0,r("r:"+(Gn++).toString(36))),Error(a(355))})),r=da(t)[1];return 0===(2&Yo.mode)&&(Yo.flags|=516,pa(5,(function(){r("r:"+(Gn++).toString(36))}),void 0,null)),t}return da(t="r:"+(Gn++).toString(36)),t},unstable_isNewReconciler:!1},Ia={readContext:no,useCallback:Aa,useContext:no,useEffect:wa,useImperativeHandle:Ea,useLayoutEffect:ka,useMemo:xa,useReducer:ua,useRef:ya,useState:function(){return ua(sa)},useDebugValue:_a,useDeferredValue:function(e){var t=ua(sa),r=t[0],n=t[1];return wa((function(){var t=Wo.transition;Wo.transition=1;try{n(e)}finally{Wo.transition=t}}),[e]),r},useTransition:function(){var e=ua(sa)[0];return[ya().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ua(sa)[0]},unstable_isNewReconciler:!1},Pa={readContext:no,useCallback:Aa,useContext:no,useEffect:wa,useImperativeHandle:Ea,useLayoutEffect:ka,useMemo:xa,useReducer:ca,useRef:ya,useState:function(){return ca(sa)},useDebugValue:_a,useDeferredValue:function(e){var t=ca(sa),r=t[0],n=t[1];return wa((function(){var t=Wo.transition;Wo.transition=1;try{n(e)}finally{Wo.transition=t}}),[e]),r},useTransition:function(){var e=ca(sa)[0];return[ya().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ca(sa)[0]},unstable_isNewReconciler:!1},Ra=k.ReactCurrentOwner,Ba=!1;function Da(e,t,r,n){t.child=null===e?Ao(t,null,r,n):_o(t,e.child,r,n)}function Na(e,t,r,n,i){r=r.render;var o=t.ref;return ro(t,i),n=ia(e,t,r,n,o,i),null===e||Ba?(t.flags|=1,Da(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,rs(e,t,i))}function La(e,t,r,n,i,o){if(null===e){var a=r.type;return"function"!==typeof a||zu(a)||void 0!==a.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=Hu(r.type,null,n,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ja(e,t,a,n,i,o))}return a=e.child,0===(i&o)&&(i=a.memoizedProps,(r=null!==(r=r.compare)?r:cn)(i,n)&&e.ref===t.ref)?rs(e,t,o):(t.flags|=1,(e=Vu(a,n)).ref=t.ref,e.return=t,t.child=e)}function ja(e,t,r,n,i,o){if(null!==e&&cn(e.memoizedProps,n)&&e.ref===t.ref){if(Ba=!1,0===(o&i))return t.lanes=e.lanes,rs(e,t,o);0!==(16384&e.flags)&&(Ba=!0)}return Ka(e,t,r,n,o)}function Ua(e,t,r){var n=t.pendingProps,i=n.children,o=null!==e?e.memoizedState:null;if("hidden"===n.mode||"unstable-defer-without-hiding"===n.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},mu(t,r);else{if(0===(1073741824&r))return e=null!==o?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},mu(t,e),null;t.memoizedState={baseLanes:0},mu(t,null!==o?o.baseLanes:r)}else null!==o?(n=o.baseLanes|r,t.memoizedState=null):n=r,mu(t,n);return Da(e,t,i,r),t.child}function Fa(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.flags|=128)}function Ka(e,t,r,n,i){var o=pi(r)?hi:fi.current;return o=di(t,o),ro(t,i),r=ia(e,t,r,n,o,i),null===e||Ba?(t.flags|=1,Da(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,rs(e,t,i))}function za(e,t,r,n,i){if(pi(r)){var o=!0;gi(t)}else o=!1;if(ro(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),bo(t,r,n),mo(t,r,n,i),n=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=r.contextType;"object"===typeof c&&null!==c?c=no(c):c=di(t,c=pi(r)?hi:fi.current);var f=r.getDerivedStateFromProps,l="function"===typeof f||"function"===typeof a.getSnapshotBeforeUpdate;l||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==n||u!==c)&&go(t,a,n,c),io=!1;var h=t.memoizedState;a.state=h,fo(t,n,a,i),u=t.memoizedState,s!==n||h!==u||li.current||io?("function"===typeof f&&(po(t,r,f,n),u=t.memoizedState),(s=io||yo(t,r,s,n,h,u,c))?(l||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=n,t.memoizedState=u),a.props=n,a.state=u,a.context=c,n=s):("function"===typeof a.componentDidMount&&(t.flags|=4),n=!1)}else{a=t.stateNode,ao(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xi(t.type,s),a.props=c,l=t.pendingProps,h=a.context,"object"===typeof(u=r.contextType)&&null!==u?u=no(u):u=di(t,u=pi(r)?hi:fi.current);var d=r.getDerivedStateFromProps;(f="function"===typeof d||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==l||h!==u)&&go(t,a,n,u),io=!1,h=t.memoizedState,a.state=h,fo(t,n,a,i);var p=t.memoizedState;s!==l||h!==p||li.current||io?("function"===typeof d&&(po(t,r,d,n),p=t.memoizedState),(c=io||yo(t,r,c,n,h,p,u))?(f||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(n,p,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,p,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=u,n=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),n=!1)}return Va(e,t,r,n,o,i)}function Va(e,t,r,n,i,o){Fa(e,t);var a=0!==(64&t.flags);if(!n&&!a)return i&&mi(t,r,!1),rs(e,t,o);n=t.stateNode,Ra.current=t;var s=a&&"function"!==typeof r.getDerivedStateFromError?null:n.render();return t.flags|=1,null!==e&&a?(t.child=_o(t,e.child,null,o),t.child=_o(t,null,s,o)):Da(e,t,s,o),t.memoizedState=n.state,i&&mi(t,r,!0),t.child}function Ha(e){var t=e.stateNode;t.pendingContext?yi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yi(0,t.context,!1),Io(e,t.containerInfo)}var Ja,qa,Ga,Xa={dehydrated:null,retryLane:0};function Wa(e,t,r){var n,i=t.pendingProps,o=Do.current,a=!1;return(n=0!==(64&t.flags))||(n=(null===e||null!==e.memoizedState)&&0!==(2&o)),n?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ui(Do,1&o),null===e?(void 0!==i.fallback&&zo(t),e=i.children,o=i.fallback,a?(e=Za(t,e,o,r),t.child.memoizedState={baseLanes:r},t.memoizedState=Xa,e):"number"===typeof i.unstable_expectedLoadTime?(e=Za(t,e,o,r),t.child.memoizedState={baseLanes:r},t.memoizedState=Xa,t.lanes=33554432,e):((r=qu({mode:"visible",children:e},t.mode,r,null)).return=t,t.child=r)):(e.memoizedState,a?(i=Qa(e,t,i.children,i.fallback,r),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:r}:{baseLanes:o.baseLanes|r},a.childLanes=e.childLanes&~r,t.memoizedState=Xa,i):(r=Ya(e,t,i.children,r),t.memoizedState=null,r))}function Za(e,t,r,n){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=qu(t,i,0,null),r=Ju(r,i,n,null),o.return=e,r.return=e,o.sibling=r,e.child=o,r}function Ya(e,t,r,n){var i=e.child;return e=i.sibling,r=Vu(i,{mode:"visible",children:r}),0===(2&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=r}function Qa(e,t,r,n,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:r};return 0===(2&o)&&t.child!==a?((r=t.child).childLanes=0,r.pendingProps=s,null!==(a=r.lastEffect)?(t.firstEffect=r.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):r=Vu(a,s),null!==e?n=Vu(e,n):(n=Ju(n,o,i,null)).flags|=2,n.return=t,r.return=t,r.sibling=n,t.child=r,n}function $a(e,t){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),to(e.return,t)}function es(e,t,r,n,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i,a.lastEffect=o)}function ts(e,t,r){var n=t.pendingProps,i=n.revealOrder,o=n.tail;if(Da(e,t,n.children,r),0!==(2&(n=Do.current)))n=1&n|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$a(e,r);else if(19===e.tag)$a(e,r);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(ui(Do,n),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;null!==r;)null!==(e=r.alternate)&&null===No(e)&&(i=r),r=r.sibling;null===(r=i)?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),es(t,!1,i,r,o,t.lastEffect);break;case"backwards":for(r=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===No(e)){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}es(t,!0,r,null,o,t.lastEffect);break;case"together":es(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function rs(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),js|=t.lanes,0!==(r&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(r=Vu(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Vu(e,e.pendingProps)).return=t;r.sibling=null}return t.child}return null}function ns(e,t){if(!Uo)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function is(e,t,r){var n=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return pi(t.type)&&vi(),null;case 3:return Po(),si(li),si(fi),Go(),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(Ho(t)?t.flags|=4:n.hydrate||(t.flags|=256)),null;case 5:Bo(t);var o=Oo(Co.current);if(r=t.type,null!==e&&null!=t.stateNode)qa(e,t,r,n),e.ref!==t.ref&&(t.flags|=128);else{if(!n){if(null===t.stateNode)throw Error(a(166));return null}if(e=Oo(To.current),Ho(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[Wn]=t,n[Zn]=s,r){case"dialog":Tn("cancel",n),Tn("close",n);break;case"iframe":case"object":case"embed":Tn("load",n);break;case"video":case"audio":for(e=0;e<En.length;e++)Tn(En[e],n);break;case"source":Tn("error",n);break;case"img":case"image":case"link":Tn("error",n),Tn("load",n);break;case"details":Tn("toggle",n);break;case"input":ee(n,s),Tn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Tn("invalid",n);break;case"textarea":ue(n,s),Tn("invalid",n)}for(var c in _e(r,s),e=null,s)s.hasOwnProperty(c)&&(o=s[c],"children"===c?"string"===typeof o?n.textContent!==o&&(e=["children",o]):"number"===typeof o&&n.textContent!==""+o&&(e=["children",""+o]):u.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Tn("scroll",n));switch(r){case"input":Z(n),ne(n,s,!0);break;case"textarea":Z(n),fe(n);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(n.onclick=Ln)}n=e,t.updateQueue=n,null!==n&&(t.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,e===le&&(e=de(r)),e===le?"script"===r?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof n.is?e=c.createElement(r,{is:n.is}):(e=c.createElement(r),"select"===r&&(c=e,n.multiple?c.multiple=!0:n.size&&(c.size=n.size))):e=c.createElementNS(e,r),e[Wn]=t,e[Zn]=n,Ja(e,t),t.stateNode=e,c=Ae(r,n),r){case"dialog":Tn("cancel",e),Tn("close",e),o=n;break;case"iframe":case"object":case"embed":Tn("load",e),o=n;break;case"video":case"audio":for(o=0;o<En.length;o++)Tn(En[o],e);o=n;break;case"source":Tn("error",e),o=n;break;case"img":case"image":case"link":Tn("error",e),Tn("load",e),o=n;break;case"details":Tn("toggle",e),o=n;break;case"input":ee(e,n),o=$(e,n),Tn("invalid",e);break;case"option":o=oe(e,n);break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=i({},n,{value:void 0}),Tn("invalid",e);break;case"textarea":ue(e,n),o=se(e,n),Tn("invalid",e);break;default:o=n}_e(r,o);var f=o;for(s in f)if(f.hasOwnProperty(s)){var l=f[s];"style"===s?Se(e,l):"dangerouslySetInnerHTML"===s?null!=(l=l?l.__html:void 0)&&be(e,l):"children"===s?"string"===typeof l?("textarea"!==r||""!==l)&&ge(e,l):"number"===typeof l&&ge(e,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=l&&"onScroll"===s&&Tn("scroll",e):null!=l&&w(e,s,l,c))}switch(r){case"input":Z(e),ne(e,n,!1);break;case"textarea":Z(e),fe(e);break;case"option":null!=n.value&&e.setAttribute("value",""+X(n.value));break;case"select":e.multiple=!!n.multiple,null!=(s=n.value)?ae(e,!!n.multiple,s,!1):null!=n.defaultValue&&ae(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Ln)}Fn(r,n)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ga(0,t,e.memoizedProps,n);else{if("string"!==typeof n&&null===t.stateNode)throw Error(a(166));r=Oo(Co.current),Oo(To.current),Ho(t)?(n=t.stateNode,r=t.memoizedProps,n[Wn]=t,n.nodeValue!==r&&(t.flags|=4)):((n=(9===r.nodeType?r:r.ownerDocument).createTextNode(n))[Wn]=t,t.stateNode=n)}return null;case 13:return si(Do),n=t.memoizedState,0!==(64&t.flags)?(t.lanes=r,t):(n=null!==n,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Ho(t):r=null!==e.memoizedState,n&&!r&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Do.current)?0===Ds&&(Ds=3):(0!==Ds&&3!==Ds||(Ds=4),null===Os||0===(134217727&js)&&0===(134217727&Us)||vu(Os,Ps))),(n||r)&&(t.flags|=4),null);case 4:return Po(),null===e&&Cn(t.stateNode.containerInfo),null;case 10:return eo(t),null;case 17:return pi(t.type)&&vi(),null;case 19:if(si(Do),null===(n=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(c=n.rendering))if(s)ns(n,!1);else{if(0!==Ds||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=No(e))){for(t.flags|=64,ns(n,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===n.lastEffect&&(t.firstEffect=null),t.lastEffect=n.lastEffect,n=r,r=t.child;null!==r;)e=n,(s=r).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ui(Do,1&Do.current|2),t.child}e=e.sibling}null!==n.tail&&Fi()>Vs&&(t.flags|=64,s=!0,ns(n,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=No(c))){if(t.flags|=64,s=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),ns(n,!0),null===n.tail&&"hidden"===n.tailMode&&!c.alternate&&!Uo)return null!==(t=t.lastEffect=n.lastEffect)&&(t.nextEffect=null),null}else 2*Fi()-n.renderingStartTime>Vs&&1073741824!==r&&(t.flags|=64,s=!0,ns(n,!1),t.lanes=33554432);n.isBackwards?(c.sibling=t.child,t.child=c):(null!==(r=n.last)?r.sibling=c:t.child=c,n.last=c)}return null!==n.tail?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=t.lastEffect,n.renderingStartTime=Fi(),r.sibling=null,t=Do.current,ui(Do,s?1&t|2:1&t),r):null;case 23:case 24:return wu(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==n.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function os(e){switch(e.tag){case 1:pi(e.type)&&vi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Po(),si(li),si(fi),Go(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Bo(e),null;case 13:return si(Do),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return si(Do),null;case 4:return Po(),null;case 10:return eo(e),null;case 23:case 24:return wu(),null;default:return null}}function as(e,t){try{var r="",n=t;do{r+=q(n),n=n.return}while(n);var i=r}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function ss(e,t){try{console.error(t.value)}catch(r){setTimeout((function(){throw r}))}}Ja=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},qa=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Oo(To.current);var a,s=null;switch(r){case"input":o=$(e,o),n=$(e,n),s=[];break;case"option":o=oe(e,o),n=oe(e,n),s=[];break;case"select":o=i({},o,{value:void 0}),n=i({},n,{value:void 0}),s=[];break;case"textarea":o=se(e,o),n=se(e,n),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof n.onClick&&(e.onclick=Ln)}for(l in _e(r,n),r=null,o)if(!n.hasOwnProperty(l)&&o.hasOwnProperty(l)&&null!=o[l])if("style"===l){var c=o[l];for(a in c)c.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(u.hasOwnProperty(l)?s||(s=[]):(s=s||[]).push(l,null));for(l in n){var f=n[l];if(c=null!=o?o[l]:void 0,n.hasOwnProperty(l)&&f!==c&&(null!=f||null!=c))if("style"===l)if(c){for(a in c)!c.hasOwnProperty(a)||f&&f.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in f)f.hasOwnProperty(a)&&c[a]!==f[a]&&(r||(r={}),r[a]=f[a])}else r||(s||(s=[]),s.push(l,r)),r=f;else"dangerouslySetInnerHTML"===l?(f=f?f.__html:void 0,c=c?c.__html:void 0,null!=f&&c!==f&&(s=s||[]).push(l,f)):"children"===l?"string"!==typeof f&&"number"!==typeof f||(s=s||[]).push(l,""+f):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(u.hasOwnProperty(l)?(null!=f&&"onScroll"===l&&Tn("scroll",e),s||c===f||(s=[])):"object"===typeof f&&null!==f&&f.$$typeof===D?f.toString():(s=s||[]).push(l,f))}r&&(s=s||[]).push("style",r);var l=s;(t.updateQueue=l)&&(t.flags|=4)}},Ga=function(e,t,r,n){r!==n&&(t.flags|=4)};var us="function"===typeof WeakMap?WeakMap:Map;function cs(e,t,r){(r=so(-1,r)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Gs||(Gs=!0,Xs=n),ss(0,t)},r}function fs(e,t,r){(r=so(-1,r)).tag=3;var n=e.type.getDerivedStateFromError;if("function"===typeof n){var i=t.value;r.payload=function(){return ss(0,t),n(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(r.callback=function(){"function"!==typeof n&&(null===Ws?Ws=new Set([this]):Ws.add(this),ss(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),r}var ls="function"===typeof WeakSet?WeakSet:Set;function hs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(r){Lu(e,r)}else t.current=null}function ds(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var r=e.memoizedProps,n=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?r:Xi(t.type,r),n),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Hn(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ps(e,t,r){switch(r.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=r.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var n=e.create;e.destroy=n()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=r.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;n=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(Bu(r,e),Ru(r,e)),e=n}while(e!==t)}return;case 1:return e=r.stateNode,4&r.flags&&(null===t?e.componentDidMount():(n=r.elementType===r.type?t.memoizedProps:Xi(r.type,t.memoizedProps),e.componentDidUpdate(n,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=r.updateQueue)&&lo(r,t,e));case 3:if(null!==(t=r.updateQueue)){if(e=null,null!==r.child)switch(r.child.tag){case 5:e=r.child.stateNode;break;case 1:e=r.child.stateNode}lo(r,t,e)}return;case 5:return e=r.stateNode,void(null===t&&4&r.flags&&Fn(r.type,r.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===r.memoizedState&&(r=r.alternate,null!==r&&(r=r.memoizedState,null!==r&&(r=r.dehydrated,null!==r&&St(r)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(a(163))}function vs(e,t){for(var r=e;;){if(5===r.tag){var n=r.stateNode;if(t)"function"===typeof(n=n.style).setProperty?n.setProperty("display","none","important"):n.display="none";else{n=r.stateNode;var i=r.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,n.style.display=ke("display",i)}}else if(6===r.tag)r.stateNode.nodeValue=t?"":r.memoizedProps;else if((23!==r.tag&&24!==r.tag||null===r.memoizedState||r===e)&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)break;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function ys(e,t){if(ki&&"function"===typeof ki.onCommitFiberUnmount)try{ki.onCommitFiberUnmount(wi,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e=e.next;do{var n=r,i=n.destroy;if(n=n.tag,void 0!==i)if(0!==(4&n))Bu(t,r);else{n=t;try{i()}catch(o){Lu(n,o)}}r=r.next}while(r!==e)}break;case 1:if(hs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Lu(t,o)}break;case 5:hs(t);break;case 4:Ss(e,t)}}function bs(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function gs(e){return 5===e.tag||3===e.tag||4===e.tag}function ms(e){e:{for(var t=e.return;null!==t;){if(gs(t))break e;t=t.return}throw Error(a(160))}var r=t;switch(t=r.stateNode,r.tag){case 5:var n=!1;break;case 3:case 4:t=t.containerInfo,n=!0;break;default:throw Error(a(161))}16&r.flags&&(ge(t,""),r.flags&=-17);e:t:for(r=e;;){for(;null===r.sibling;){if(null===r.return||gs(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;5!==r.tag&&6!==r.tag&&18!==r.tag;){if(2&r.flags)continue t;if(null===r.child||4===r.tag)continue t;r.child.return=r,r=r.child}if(!(2&r.flags)){r=r.stateNode;break e}}n?ws(e,r,t):ks(e,r,t)}function ws(e,t,r){var n=e.tag,i=5===n||6===n;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===r.nodeType?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(8===r.nodeType?(t=r.parentNode).insertBefore(e,r):(t=r).appendChild(e),null!==(r=r._reactRootContainer)&&void 0!==r||null!==t.onclick||(t.onclick=Ln));else if(4!==n&&null!==(e=e.child))for(ws(e,t,r),e=e.sibling;null!==e;)ws(e,t,r),e=e.sibling}function ks(e,t,r){var n=e.tag,i=5===n||6===n;if(i)e=i?e.stateNode:e.stateNode.instance,t?r.insertBefore(e,t):r.appendChild(e);else if(4!==n&&null!==(e=e.child))for(ks(e,t,r),e=e.sibling;null!==e;)ks(e,t,r),e=e.sibling}function Ss(e,t){for(var r,n,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(r=o.stateNode,o.tag){case 5:n=!1;break e;case 3:case 4:r=r.containerInfo,n=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var s=e,u=i,c=u;;)if(ys(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break e;for(;null===c.sibling;){if(null===c.return||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}n?(s=r,u=i.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,n=!0,i.child.return=i,i=i.child;continue}}else if(ys(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Es(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var n=r=r.next;do{3===(3&n.tag)&&(e=n.destroy,n.destroy=void 0,void 0!==e&&e()),n=n.next}while(n!==r)}return;case 1:return;case 5:if(null!=(r=t.stateNode)){n=t.memoizedProps;var i=null!==e?e.memoizedProps:n;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(r[Zn]=n,"input"===e&&"radio"===n.type&&null!=n.name&&te(r,n),Ae(e,i),t=Ae(e,n),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?Se(r,u):"dangerouslySetInnerHTML"===s?be(r,u):"children"===s?ge(r,u):w(r,s,u,t)}switch(e){case"input":re(r,n);break;case"textarea":ce(r,n);break;case"select":e=r._wrapperState.wasMultiple,r._wrapperState.wasMultiple=!!n.multiple,null!=(o=n.value)?ae(r,!!n.multiple,o,!1):e!==!!n.multiple&&(null!=n.defaultValue?ae(r,!!n.multiple,n.defaultValue,!0):ae(r,!!n.multiple,n.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((r=t.stateNode).hydrate&&(r.hydrate=!1,St(r.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(zs=Fi(),vs(t.child,!0)),void _s(t);case 19:return void _s(t);case 17:return;case 23:case 24:return void vs(t,null!==t.memoizedState)}throw Error(a(163))}function _s(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new ls),t.forEach((function(t){var n=Uu.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))}))}}function As(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var xs=Math.ceil,Ts=k.ReactCurrentDispatcher,Ms=k.ReactCurrentOwner,Cs=0,Os=null,Is=null,Ps=0,Rs=0,Bs=ai(0),Ds=0,Ns=null,Ls=0,js=0,Us=0,Fs=0,Ks=null,zs=0,Vs=1/0;function Hs(){Vs=Fi()+500}var Js,qs=null,Gs=!1,Xs=null,Ws=null,Zs=!1,Ys=null,Qs=90,$s=[],eu=[],tu=null,ru=0,nu=null,iu=-1,ou=0,au=0,su=null,uu=!1;function cu(){return 0!==(48&Cs)?Fi():-1!==iu?iu:iu=Fi()}function fu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Ki()?1:2;if(0===ou&&(ou=Ls),0!==Gi.transition){0!==au&&(au=null!==Ks?Ks.pendingLanes:0),e=ou;var t=4186112&~au;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Ki(),0!==(4&Cs)&&98===e?e=Ft(12,ou):e=Ft(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ou),e}function lu(e,t,r){if(50<ru)throw ru=0,nu=null,Error(a(185));if(null===(e=hu(e,t)))return null;Vt(e,t,r),e===Os&&(Us|=t,4===Ds&&vu(e,Ps));var n=Ki();1===t?0!==(8&Cs)&&0===(48&Cs)?yu(e):(du(e,r),0===Cs&&(Hs(),Ji())):(0===(4&Cs)||98!==n&&99!==n||(null===tu?tu=new Set([e]):tu.add(e)),du(e,r)),Ks=e}function hu(e,t){e.lanes|=t;var r=e.alternate;for(null!==r&&(r.lanes|=t),r=e,e=e.return;null!==e;)e.childLanes|=t,null!==(r=e.alternate)&&(r.childLanes|=t),r=e,e=e.return;return 3===r.tag?r.stateNode:null}function du(e,t){for(var r=e.callbackNode,n=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var u=31-Ht(s),c=1<<u,f=o[u];if(-1===f){if(0===(c&n)||0!==(c&i)){f=t,Lt(c);var l=Nt;o[u]=10<=l?f+250:6<=l?f+5e3:-1}}else f<=t&&(e.expiredLanes|=c);s&=~c}if(n=jt(e,e===Os?Ps:0),t=Nt,0===n)null!==r&&(r!==Bi&&_i(r),e.callbackNode=null,e.callbackPriority=0);else{if(null!==r){if(e.callbackPriority===t)return;r!==Bi&&_i(r)}15===t?(r=yu.bind(null,e),null===Ni?(Ni=[r],Li=Ei(Ci,qi)):Ni.push(r),r=Bi):14===t?r=Hi(99,yu.bind(null,e)):r=Hi(r=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),pu.bind(null,e)),e.callbackPriority=t,e.callbackNode=r}}function pu(e){if(iu=-1,au=ou=0,0!==(48&Cs))throw Error(a(327));var t=e.callbackNode;if(Pu()&&e.callbackNode!==t)return null;var r=jt(e,e===Os?Ps:0);if(0===r)return null;var n=r,i=Cs;Cs|=16;var o=Eu();for(Os===e&&Ps===n||(Hs(),ku(e,n));;)try{xu();break}catch(u){Su(e,u)}if($i(),Ts.current=o,Cs=i,null!==Is?n=0:(Os=null,Ps=0,n=Ds),0!==(Ls&Us))ku(e,0);else if(0!==n){if(2===n&&(Cs|=64,e.hydrate&&(e.hydrate=!1,Hn(e.containerInfo)),0!==(r=Ut(e))&&(n=_u(e,r))),1===n)throw t=Ns,ku(e,0),vu(e,r),du(e,Fi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=r,n){case 0:case 1:throw Error(a(345));case 2:Cu(e);break;case 3:if(vu(e,r),(62914560&r)===r&&10<(n=zs+500-Fi())){if(0!==jt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){cu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=zn(Cu.bind(null,e),n);break}Cu(e);break;case 4:if(vu(e,r),(4186112&r)===r)break;for(n=e.eventTimes,i=-1;0<r;){var s=31-Ht(r);o=1<<s,(s=n[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Fi()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xs(r/1960))-r)){e.timeoutHandle=zn(Cu.bind(null,e),r);break}Cu(e);break;case 5:Cu(e);break;default:throw Error(a(329))}}return du(e,Fi()),e.callbackNode===t?pu.bind(null,e):null}function vu(e,t){for(t&=~Fs,t&=~Us,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ht(t),n=1<<r;e[r]=-1,t&=~n}}function yu(e){if(0!==(48&Cs))throw Error(a(327));if(Pu(),e===Os&&0!==(e.expiredLanes&Ps)){var t=Ps,r=_u(e,t);0!==(Ls&Us)&&(r=_u(e,t=jt(e,t)))}else r=_u(e,t=jt(e,0));if(0!==e.tag&&2===r&&(Cs|=64,e.hydrate&&(e.hydrate=!1,Hn(e.containerInfo)),0!==(t=Ut(e))&&(r=_u(e,t))),1===r)throw r=Ns,ku(e,0),vu(e,t),du(e,Fi()),r;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cu(e),du(e,Fi()),null}function bu(e,t){var r=Cs;Cs|=1;try{return e(t)}finally{0===(Cs=r)&&(Hs(),Ji())}}function gu(e,t){var r=Cs;Cs&=-2,Cs|=8;try{return e(t)}finally{0===(Cs=r)&&(Hs(),Ji())}}function mu(e,t){ui(Bs,Rs),Rs|=t,Ls|=t}function wu(){Rs=Bs.current,si(Bs)}function ku(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(-1!==r&&(e.timeoutHandle=-1,Vn(r)),null!==Is)for(r=Is.return;null!==r;){var n=r;switch(n.tag){case 1:null!==(n=n.type.childContextTypes)&&void 0!==n&&vi();break;case 3:Po(),si(li),si(fi),Go();break;case 5:Bo(n);break;case 4:Po();break;case 13:case 19:si(Do);break;case 10:eo(n);break;case 23:case 24:wu()}r=r.return}Os=e,Is=Vu(e.current,null),Ps=Rs=Ls=t,Ds=0,Ns=null,Fs=Us=js=0}function Su(e,t){for(;;){var r=Is;try{if($i(),Xo.current=Ca,ea){for(var n=Yo.memoizedState;null!==n;){var i=n.queue;null!==i&&(i.pending=null),n=n.next}ea=!1}if(Zo=0,$o=Qo=Yo=null,ta=!1,Ms.current=null,null===r||null===r.return){Ds=1,Ns=t,Is=null;break}e:{var o=e,a=r.return,s=r,u=t;if(t=Ps,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u;if(0===(2&s.mode)){var f=s.alternate;f?(s.updateQueue=f.updateQueue,s.memoizedState=f.memoizedState,s.lanes=f.lanes):(s.updateQueue=null,s.memoizedState=null)}var l=0!==(1&Do.current),h=a;do{var d;if(d=13===h.tag){var p=h.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var v=h.memoizedProps;d=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!l)}}if(d){var y=h.updateQueue;if(null===y){var b=new Set;b.add(c),h.updateQueue=b}else y.add(c);if(0===(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var g=so(-1,1);g.tag=2,uo(s,g)}s.lanes|=1;break e}u=void 0,s=t;var m=o.pingCache;if(null===m?(m=o.pingCache=new us,u=new Set,m.set(c,u)):void 0===(u=m.get(c))&&(u=new Set,m.set(c,u)),!u.has(s)){u.add(s);var w=ju.bind(null,o,c,s);c.then(w,w)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);u=Error((G(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ds&&(Ds=2),u=as(u,s),h=a;do{switch(h.tag){case 3:o=u,h.flags|=4096,t&=-t,h.lanes|=t,co(h,cs(0,o,t));break e;case 1:o=u;var k=h.type,S=h.stateNode;if(0===(64&h.flags)&&("function"===typeof k.getDerivedStateFromError||null!==S&&"function"===typeof S.componentDidCatch&&(null===Ws||!Ws.has(S)))){h.flags|=4096,t&=-t,h.lanes|=t,co(h,fs(h,o,t));break e}}h=h.return}while(null!==h)}Mu(r)}catch(E){t=E,Is===r&&null!==r&&(Is=r=r.return);continue}break}}function Eu(){var e=Ts.current;return Ts.current=Ca,null===e?Ca:e}function _u(e,t){var r=Cs;Cs|=16;var n=Eu();for(Os===e&&Ps===t||ku(e,t);;)try{Au();break}catch(i){Su(e,i)}if($i(),Cs=r,Ts.current=n,null!==Is)throw Error(a(261));return Os=null,Ps=0,Ds}function Au(){for(;null!==Is;)Tu(Is)}function xu(){for(;null!==Is&&!Ai();)Tu(Is)}function Tu(e){var t=Js(e.alternate,e,Rs);e.memoizedProps=e.pendingProps,null===t?Mu(e):Is=t,Ms.current=null}function Mu(e){var t=e;do{var r=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(r=is(r,t,Rs)))return void(Is=r);if(24!==(r=t).tag&&23!==r.tag||null===r.memoizedState||0!==(1073741824&Rs)||0===(4&r.mode)){for(var n=0,i=r.child;null!==i;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(r=os(t)))return r.flags&=2047,void(Is=r);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Is=t);Is=t=e}while(null!==t);0===Ds&&(Ds=5)}function Cu(e){var t=Ki();return Vi(99,Ou.bind(null,e,t)),null}function Ou(e,t){do{Pu()}while(null!==Ys);if(0!==(48&Cs))throw Error(a(327));var r=e.finishedWork;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(a(177));e.callbackNode=null;var n=r.lanes|r.childLanes,i=n,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,u=e.expirationTimes;0<o;){var c=31-Ht(o),f=1<<c;i[c]=0,s[c]=-1,u[c]=-1,o&=~f}if(null!==tu&&0===(24&n)&&tu.has(e)&&tu.delete(e),e===Os&&(Is=Os=null,Ps=0),1<r.flags?null!==r.lastEffect?(r.lastEffect.nextEffect=r,n=r.firstEffect):n=r:n=r.firstEffect,null!==n){if(i=Cs,Cs|=32,Ms.current=null,jn=Wt,pn(s=dn())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else e:if(u=(u=s.ownerDocument)&&u.defaultView||window,(f=u.getSelection&&u.getSelection())&&0!==f.rangeCount){u=f.anchorNode,o=f.anchorOffset,c=f.focusNode,f=f.focusOffset;try{u.nodeType,c.nodeType}catch(x){u=null;break e}var l=0,h=-1,d=-1,p=0,v=0,y=s,b=null;t:for(;;){for(var g;y!==u||0!==o&&3!==y.nodeType||(h=l+o),y!==c||0!==f&&3!==y.nodeType||(d=l+f),3===y.nodeType&&(l+=y.nodeValue.length),null!==(g=y.firstChild);)b=y,y=g;for(;;){if(y===s)break t;if(b===u&&++p===o&&(h=l),b===c&&++v===f&&(d=l),null!==(g=y.nextSibling))break;b=(y=b).parentNode}y=g}u=-1===h||-1===d?null:{start:h,end:d}}else u=null;u=u||{start:0,end:0}}else u=null;Un={focusedElem:s,selectionRange:u},Wt=!1,su=null,uu=!1,qs=n;do{try{Iu()}catch(x){if(null===qs)throw Error(a(330));Lu(qs,x),qs=qs.nextEffect}}while(null!==qs);su=null,qs=n;do{try{for(s=e;null!==qs;){var m=qs.flags;if(16&m&&ge(qs.stateNode,""),128&m){var w=qs.alternate;if(null!==w){var k=w.ref;null!==k&&("function"===typeof k?k(null):k.current=null)}}switch(1038&m){case 2:ms(qs),qs.flags&=-3;break;case 6:ms(qs),qs.flags&=-3,Es(qs.alternate,qs);break;case 1024:qs.flags&=-1025;break;case 1028:qs.flags&=-1025,Es(qs.alternate,qs);break;case 4:Es(qs.alternate,qs);break;case 8:Ss(s,u=qs);var S=u.alternate;bs(u),null!==S&&bs(S)}qs=qs.nextEffect}}catch(x){if(null===qs)throw Error(a(330));Lu(qs,x),qs=qs.nextEffect}}while(null!==qs);if(k=Un,w=dn(),m=k.focusedElem,s=k.selectionRange,w!==m&&m&&m.ownerDocument&&hn(m.ownerDocument.documentElement,m)){null!==s&&pn(m)&&(w=s.start,void 0===(k=s.end)&&(k=w),"selectionStart"in m?(m.selectionStart=w,m.selectionEnd=Math.min(k,m.value.length)):(k=(w=m.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),u=m.textContent.length,S=Math.min(s.start,u),s=void 0===s.end?S:Math.min(s.end,u),!k.extend&&S>s&&(u=s,s=S,S=u),u=ln(m,S),o=ln(m,s),u&&o&&(1!==k.rangeCount||k.anchorNode!==u.node||k.anchorOffset!==u.offset||k.focusNode!==o.node||k.focusOffset!==o.offset)&&((w=w.createRange()).setStart(u.node,u.offset),k.removeAllRanges(),S>s?(k.addRange(w),k.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),k.addRange(w))))),w=[];for(k=m;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"===typeof m.focus&&m.focus(),m=0;m<w.length;m++)(k=w[m]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Wt=!!jn,Un=jn=null,e.current=r,qs=n;do{try{for(m=e;null!==qs;){var E=qs.flags;if(36&E&&ps(m,qs.alternate,qs),128&E){w=void 0;var _=qs.ref;if(null!==_){var A=qs.stateNode;switch(qs.tag){case 5:w=A;break;default:w=A}"function"===typeof _?_(w):_.current=w}}qs=qs.nextEffect}}catch(x){if(null===qs)throw Error(a(330));Lu(qs,x),qs=qs.nextEffect}}while(null!==qs);qs=null,Di(),Cs=i}else e.current=r;if(Zs)Zs=!1,Ys=e,Qs=t;else for(qs=n;null!==qs;)t=qs.nextEffect,qs.nextEffect=null,8&qs.flags&&((E=qs).sibling=null,E.stateNode=null),qs=t;if(0===(n=e.pendingLanes)&&(Ws=null),1===n?e===nu?ru++:(ru=0,nu=e):ru=0,r=r.stateNode,ki&&"function"===typeof ki.onCommitFiberRoot)try{ki.onCommitFiberRoot(wi,r,void 0,64===(64&r.current.flags))}catch(x){}if(du(e,Fi()),Gs)throw Gs=!1,e=Xs,Xs=null,e;return 0!==(8&Cs)||Ji(),null}function Iu(){for(;null!==qs;){var e=qs.alternate;uu||null===su||(0!==(8&qs.flags)?et(qs,su)&&(uu=!0):13===qs.tag&&As(e,qs)&&et(qs,su)&&(uu=!0));var t=qs.flags;0!==(256&t)&&ds(e,qs),0===(512&t)||Zs||(Zs=!0,Hi(97,(function(){return Pu(),null}))),qs=qs.nextEffect}}function Pu(){if(90!==Qs){var e=97<Qs?97:Qs;return Qs=90,Vi(e,Du)}return!1}function Ru(e,t){$s.push(t,e),Zs||(Zs=!0,Hi(97,(function(){return Pu(),null})))}function Bu(e,t){eu.push(t,e),Zs||(Zs=!0,Hi(97,(function(){return Pu(),null})))}function Du(){if(null===Ys)return!1;var e=Ys;if(Ys=null,0!==(48&Cs))throw Error(a(331));var t=Cs;Cs|=32;var r=eu;eu=[];for(var n=0;n<r.length;n+=2){var i=r[n],o=r[n+1],s=i.destroy;if(i.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===o)throw Error(a(330));Lu(o,c)}}for(r=$s,$s=[],n=0;n<r.length;n+=2){i=r[n],o=r[n+1];try{var u=i.create;i.destroy=u()}catch(c){if(null===o)throw Error(a(330));Lu(o,c)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return Cs=t,Ji(),!0}function Nu(e,t,r){uo(e,t=cs(0,t=as(r,t),1)),t=cu(),null!==(e=hu(e,1))&&(Vt(e,1,t),du(e,t))}function Lu(e,t){if(3===e.tag)Nu(e,e,t);else for(var r=e.return;null!==r;){if(3===r.tag){Nu(r,e,t);break}if(1===r.tag){var n=r.stateNode;if("function"===typeof r.type.getDerivedStateFromError||"function"===typeof n.componentDidCatch&&(null===Ws||!Ws.has(n))){var i=fs(r,e=as(t,e),1);if(uo(r,i),i=cu(),null!==(r=hu(r,1)))Vt(r,1,i),du(r,i);else if("function"===typeof n.componentDidCatch&&(null===Ws||!Ws.has(n)))try{n.componentDidCatch(t,e)}catch(o){}break}}r=r.return}}function ju(e,t,r){var n=e.pingCache;null!==n&&n.delete(t),t=cu(),e.pingedLanes|=e.suspendedLanes&r,Os===e&&(Ps&r)===r&&(4===Ds||3===Ds&&(62914560&Ps)===Ps&&500>Fi()-zs?ku(e,0):Fs|=r),du(e,t)}function Uu(e,t){var r=e.stateNode;null!==r&&r.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Ki()?1:2:(0===ou&&(ou=Ls),0===(t=Kt(62914560&~ou))&&(t=4194304))),r=cu(),null!==(e=hu(e,t))&&(Vt(e,t,r),du(e,r))}function Fu(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ku(e,t,r,n){return new Fu(e,t,r,n)}function zu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Vu(e,t){var r=e.alternate;return null===r?((r=Ku(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Hu(e,t,r,n,i,o){var s=2;if(n=e,"function"===typeof e)zu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case _:return Ju(r.children,i,o,t);case N:s=8,i|=16;break;case A:s=8,i|=1;break;case x:return(e=Ku(12,r,t,8|i)).elementType=x,e.type=x,e.lanes=o,e;case O:return(e=Ku(13,r,t,i)).type=O,e.elementType=O,e.lanes=o,e;case I:return(e=Ku(19,r,t,i)).elementType=I,e.lanes=o,e;case L:return qu(r,i,o,t);case j:return(e=Ku(24,r,t,i)).elementType=j,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case T:s=10;break e;case M:s=9;break e;case C:s=11;break e;case P:s=14;break e;case R:s=16,n=null;break e;case B:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ku(s,r,t,i)).elementType=e,t.type=n,t.lanes=o,t}function Ju(e,t,r,n){return(e=Ku(7,e,n,t)).lanes=r,e}function qu(e,t,r,n){return(e=Ku(23,e,n,t)).elementType=L,e.lanes=r,e}function Gu(e,t,r){return(e=Ku(6,e,null,t)).lanes=r,e}function Xu(e,t,r){return(t=Ku(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Wu(e,t,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=r,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=zt(0),this.expirationTimes=zt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zt(0),this.mutableSourceEagerHydrationData=null}function Zu(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}function Yu(e,t,r,n){var i=t.current,o=cu(),s=fu(i);e:if(r){t:{if(Ze(r=r._reactInternals)!==r||1!==r.tag)throw Error(a(170));var u=r;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(pi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===r.tag){var c=r.type;if(pi(c)){r=bi(r,c,u);break e}}r=u}else r=ci;return null===t.context?t.context=r:t.pendingContext=r,(t=so(o,s)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),uo(i,t),lu(i,s,o),s}function Qu(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function $u(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r<t?r:t}}function ec(e,t){$u(e,t),(e=e.alternate)&&$u(e,t)}function tc(e,t,r){var n=null!=r&&null!=r.hydrationOptions&&r.hydrationOptions.mutableSources||null;if(r=new Wu(e,t,null!=r&&!0===r.hydrate),t=Ku(3,null,null,2===t?7:1===t?3:0),r.current=t,t.stateNode=r,oo(t),e[Yn]=r.current,Cn(8===e.nodeType?e.parentNode:e),n)for(e=0;e<n.length;e++){var i=(t=n[e])._getVersion;i=i(t._source),null==r.mutableSourceEagerHydrationData?r.mutableSourceEagerHydrationData=[t,i]:r.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=r}function rc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function nc(e,t,r,n,i){var o=r._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=Qu(a);s.call(e)}}Yu(t,a,e,i)}else{if(o=r._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var r;r=e.lastChild;)e.removeChild(r);return new tc(e,0,t?{hydrate:!0}:void 0)}(r,n),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var e=Qu(a);u.call(e)}}gu((function(){Yu(t,a,e,i)}))}return Qu(a)}function ic(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!rc(t))throw Error(a(200));return Zu(e,t,null,r)}Js=function(e,t,r){var n=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||li.current)Ba=!0;else{if(0===(r&n)){switch(Ba=!1,t.tag){case 3:Ha(t),Jo();break;case 5:Ro(t);break;case 1:pi(t.type)&&gi(t);break;case 4:Io(t,t.stateNode.containerInfo);break;case 10:n=t.memoizedProps.value;var i=t.type._context;ui(Wi,i._currentValue),i._currentValue=n;break;case 13:if(null!==t.memoizedState)return 0!==(r&t.child.childLanes)?Wa(e,t,r):(ui(Do,1&Do.current),null!==(t=rs(e,t,r))?t.sibling:null);ui(Do,1&Do.current);break;case 19:if(n=0!==(r&t.childLanes),0!==(64&e.flags)){if(n)return ts(e,t,r);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(Do,Do.current),n)break;return null;case 23:case 24:return t.lanes=0,Ua(e,t,r)}return rs(e,t,r)}Ba=0!==(16384&e.flags)}else Ba=!1;switch(t.lanes=0,t.tag){case 2:if(n=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=di(t,fi.current),ro(t,r),i=ia(null,t,n,e,i,r),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,pi(n)){var o=!0;gi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(t);var s=n.getDerivedStateFromProps;"function"===typeof s&&po(t,n,s,e),i.updater=vo,t.stateNode=i,i._reactInternals=t,mo(t,n,e,r),t=Va(null,t,n,!0,o,r)}else t.tag=0,Da(null,t,i,r),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"===typeof e)return zu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===C)return 11;if(e===P)return 14}return 2}(i),e=Xi(i,e),o){case 0:t=Ka(null,t,i,e,r);break e;case 1:t=za(null,t,i,e,r);break e;case 11:t=Na(null,t,i,e,r);break e;case 14:t=La(null,t,i,Xi(i.type,e),n,r);break e}throw Error(a(306,i,""))}return t;case 0:return n=t.type,i=t.pendingProps,Ka(e,t,n,i=t.elementType===n?i:Xi(n,i),r);case 1:return n=t.type,i=t.pendingProps,za(e,t,n,i=t.elementType===n?i:Xi(n,i),r);case 3:if(Ha(t),n=t.updateQueue,null===e||null===n)throw Error(a(282));if(n=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ao(e,t),fo(t,n,null,r),(n=t.memoizedState.element)===i)Jo(),t=rs(e,t,r);else{if((o=(i=t.stateNode).hydrate)&&(jo=Jn(t.stateNode.containerInfo.firstChild),Lo=t,o=Uo=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],qo.push(o);for(r=Ao(t,null,n,r),t.child=r;r;)r.flags=-3&r.flags|1024,r=r.sibling}else Da(e,t,n,r),Jo();t=t.child}return t;case 5:return Ro(t),null===e&&zo(t),n=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Kn(n,i)?s=null:null!==o&&Kn(n,o)&&(t.flags|=16),Fa(e,t),Da(e,t,s,r),t.child;case 6:return null===e&&zo(t),null;case 13:return Wa(e,t,r);case 4:return Io(t,t.stateNode.containerInfo),n=t.pendingProps,null===e?t.child=_o(t,null,n,r):Da(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,Na(e,t,n,i=t.elementType===n?i:Xi(n,i),r);case 7:return Da(e,t,t.pendingProps,r),t.child;case 8:case 12:return Da(e,t,t.pendingProps.children,r),t.child;case 10:e:{n=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var u=t.type._context;if(ui(Wi,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=sn(u,o)?0:0|("function"===typeof n._calculateChangedBits?n._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!li.current){t=rs(e,t,r);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var f=c.firstContext;null!==f;){if(f.context===n&&0!==(f.observedBits&o)){1===u.tag&&((f=so(-1,r&-r)).tag=2,uo(u,f)),u.lanes|=r,null!==(f=u.alternate)&&(f.lanes|=r),to(u.return,r),c.lanes|=r;break}f=f.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Da(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=(o=t.pendingProps).children,ro(t,r),n=n(i=no(i,o.unstable_observedBits)),t.flags|=1,Da(e,t,n,r),t.child;case 14:return o=Xi(i=t.type,t.pendingProps),La(e,t,i,o=Xi(i.type,o),n,r);case 15:return ja(e,t,t.type,t.pendingProps,n,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Xi(n,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,pi(n)?(e=!0,gi(t)):e=!1,ro(t,r),bo(t,n,i),mo(t,n,i,r),Va(null,t,n,!0,e,r);case 19:return ts(e,t,r);case 23:case 24:return Ua(e,t,r)}throw Error(a(156,t.tag))},tc.prototype.render=function(e){Yu(e,this._internalRoot,null,null)},tc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Yu(null,e,null,(function(){t[Yn]=null}))},tt=function(e){13===e.tag&&(lu(e,4,cu()),ec(e,4))},rt=function(e){13===e.tag&&(lu(e,67108864,cu()),ec(e,67108864))},nt=function(e){if(13===e.tag){var t=cu(),r=fu(e);lu(e,r,t),ec(e,r)}},it=function(e,t){return t()},Te=function(e,t,r){switch(t){case"input":if(re(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=ri(n);if(!i)throw Error(a(90));Y(n),re(n,i)}}}break;case"textarea":ce(e,r);break;case"select":null!=(t=r.value)&&ae(e,!!r.multiple,t,!1)}},Re=bu,Be=function(e,t,r,n,i){var o=Cs;Cs|=4;try{return Vi(98,e.bind(null,t,r,n,i))}finally{0===(Cs=o)&&(Hs(),Ji())}},De=function(){0===(49&Cs)&&(function(){if(null!==tu){var e=tu;tu=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,du(e,Fi())}))}Ji()}(),Pu())},Ne=function(e,t){var r=Cs;Cs|=2;try{return e(t)}finally{0===(Cs=r)&&(Hs(),Ji())}};var oc={Events:[ei,ti,ri,Ie,Pe,Pu,{current:!1}]},ac={findFiberByHostInstance:$n,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},sc={bundleType:ac.bundleType,version:ac.version,rendererPackageName:ac.rendererPackageName,rendererConfig:ac.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=$e(e))?null:e.stateNode},findFiberByHostInstance:ac.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{wi=uc.inject(sc),ki=uc}catch(ye){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oc,t.createPortal=ic,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=$e(t))?null:e.stateNode},t.flushSync=function(e,t){var r=Cs;if(0!==(48&r))return e(t);Cs|=1;try{if(e)return Vi(99,e.bind(null,t))}finally{Cs=r,Ji()}},t.hydrate=function(e,t,r){if(!rc(t))throw Error(a(200));return nc(null,e,t,!0,r)},t.render=function(e,t,r){if(!rc(t))throw Error(a(200));return nc(null,e,t,!1,r)},t.unmountComponentAtNode=function(e){if(!rc(e))throw Error(a(40));return!!e._reactRootContainer&&(gu((function(){nc(null,null,e,!1,(function(){e._reactRootContainer=null,e[Yn]=null}))})),!0)},t.unstable_batchedUpdates=bu,t.unstable_createPortal=function(e,t){return ic(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!rc(r))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return nc(e,t,r,!1,n)},t.version="17.0.2"},function(e,t,r){"use strict";e.exports=r(531)},function(e,t,r){"use strict";var n,i,o,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();t.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var f=null,l=null,h=function e(){if(null!==f)try{var r=t.unstable_now();f(!0,r),f=null}catch(n){throw setTimeout(e,0),n}};n=function(e){null!==f?setTimeout(n,0,e):(f=e,setTimeout(h,0))},i=function(e,t){l=setTimeout(e,t)},o=function(){clearTimeout(l)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var v=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var y=!1,b=null,g=-1,m=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):m=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,S=k.port2;k.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();w=e+m;try{b(!0,e)?S.postMessage(null):(y=!1,b=null)}catch(r){throw S.postMessage(null),r}}else y=!1},n=function(e){b=e,y||(y=!0,S.postMessage(null))},i=function(e,r){g=d((function(){e(t.unstable_now())}),r)},o=function(){p(g),g=-1}}function E(e,t){var r=e.length;e.push(t);e:for(;;){var n=r-1>>>1,i=e[n];if(!(void 0!==i&&0<x(i,t)))break e;e[n]=t,e[r]=i,r=n}}function _(e){return void 0===(e=e[0])?null:e}function A(e){var t=e[0];if(void 0!==t){var r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,i=e.length;n<i;){var o=2*(n+1)-1,a=e[o],s=o+1,u=e[s];if(void 0!==a&&0>x(a,r))void 0!==u&&0>x(u,a)?(e[n]=u,e[s]=r,n=s):(e[n]=a,e[o]=r,n=o);else{if(!(void 0!==u&&0>x(u,r)))break e;e[n]=u,e[s]=r,n=s}}}return t}return null}function x(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}var T=[],M=[],C=1,O=null,I=3,P=!1,R=!1,B=!1;function D(e){for(var t=_(M);null!==t;){if(null===t.callback)A(M);else{if(!(t.startTime<=e))break;A(M),t.sortIndex=t.expirationTime,E(T,t)}t=_(M)}}function N(e){if(B=!1,D(e),!R)if(null!==_(T))R=!0,n(L);else{var t=_(M);null!==t&&i(N,t.startTime-e)}}function L(e,r){R=!1,B&&(B=!1,o()),P=!0;var n=I;try{for(D(r),O=_(T);null!==O&&(!(O.expirationTime>r)||e&&!t.unstable_shouldYield());){var a=O.callback;if("function"===typeof a){O.callback=null,I=O.priorityLevel;var s=a(O.expirationTime<=r);r=t.unstable_now(),"function"===typeof s?O.callback=s:O===_(T)&&A(T),D(r)}else A(T);O=_(T)}if(null!==O)var u=!0;else{var c=_(M);null!==c&&i(N,c.startTime-r),u=!1}return u}finally{O=null,I=n,P=!1}}var j=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||P||(R=!0,n(L))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return _(T)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var r=I;I=t;try{return e()}finally{I=r}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=j,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=I;I=e;try{return t()}finally{I=r}},t.unstable_scheduleCallback=function(e,r,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:C++,callback:r,priorityLevel:e,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(e.sortIndex=a,E(M,e),null===_(T)&&e===_(M)&&(B?o():B=!0,i(N,a-s))):(e.sortIndex=u,E(T,e),R||P||(R=!0,n(L))),e},t.unstable_wrapCallback=function(e){var t=I;return function(){var r=I;I=t;try{return e.apply(this,arguments)}finally{I=r}}}},,,function(e,t,r){},function(e,t,r){var n=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(I){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),a=new M(n||[]);return o._invoke=function(e,t,r){var n=l;return function(i,o){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var u=f(e,t,r);if("normal"===u.type){if(n=r.done?p:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(e,r,a),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(I){return{type:"throw",arg:I}}}e.wrap=c;var l="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function y(){}function b(){}function g(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,k=w&&w(w(C([])));k&&k!==r&&n.call(k,o)&&(m=k);var S=g.prototype=y.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"===typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function A(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=f(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function C(e){if(e){var r=e[o];if(r)return r.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:O}}function O(){return{value:t,done:!0}}return b.prototype=S.constructor=g,g.constructor=b,b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},E(_.prototype),_.prototype[a]=function(){return this},e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new _(c(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),u(S,s,"Generator"),S[o]=function(){return this},S.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=C,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=n}catch(i){Function("r","regeneratorRuntime = r")(n)}},function(e,t,r){"use strict";var n=e.exports=r(537);n.build="light",n.load=function(e,t,r){return"function"===typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(325),n.decoder=r(330),n.verifier=r(331),n.converter=r(332),n.ReflectionObject=r(128),n.Namespace=r(152),n.Root=r(334),n.Enum=r(83),n.Type=r(326),n.Field=r(129),n.OneOf=r(187),n.MapField=r(327),n.Service=r(328),n.Method=r(329),n.Message=r(239),n.wrappers=r(333),n.types=r(153),n.util=r(56),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},function(e,t,r){"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(237),n.BufferWriter=r(544),n.Reader=r(238),n.BufferReader=r(545),n.util=r(82),n.rpc=r(323),n.roots=r(324),n.configure=i,i()},function(e,t,r){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var i=new Array(64),o=new Array(123),a=0;a<64;)o[i[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,r){for(var n,o=null,a=[],s=0,u=0;t<r;){var c=e[t++];switch(u){case 0:a[s++]=i[c>>2],n=(3&c)<<4,u=1;break;case 1:a[s++]=i[n|c>>4],n=(15&c)<<2,u=2;break;case 2:a[s++]=i[n|c>>6],a[s++]=i[63&c],u=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return u&&(a[s++]=i[n],a[s++]=61,1===u&&(a[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var s="invalid encoding";n.decode=function(e,t,r){for(var n,i=r,a=0,u=0;u<e.length;){var c=e.charCodeAt(u++);if(61===c&&a>1)break;if(void 0===(c=o[c]))throw Error(s);switch(a){case 0:n=c,a=1;break;case 1:t[r++]=n<<2|(48&c)>>4,n=c,a=2;break;case 2:t[r++]=(15&n)<<4|(60&c)>>2,n=c,a=3;break;case 3:t[r++]=(3&n)<<6|c,a=0}}if(1===a)throw Error(s);return r-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},function(e,t,r){"use strict";function n(){this._listeners={}}e.exports=n,n.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},n.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},function(e,t,r){"use strict";function n(e){return"undefined"!==typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function o(e,n,i){t[0]=e,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function s(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?i:o,e.writeFloatBE=n?o:i,e.readFloatLE=n?a:s,e.readFloatBE=n?s:a}():function(){function t(e,t,r,n){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,n)}}function r(e,t,r){var n=e(t,r),i=2*(n>>31)+1,o=n>>>23&255,a=8388607&n;return 255===o?a?NaN:i*(1/0):0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,i),e.writeFloatBE=t.bind(null,o),e.readFloatLE=r.bind(null,a),e.readFloatBE=r.bind(null,s)}(),"undefined"!==typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,i,o){var a=n<0?1:0;if(a&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((a<<31|2146435072)>>>0,i,o+r);else{var s;if(n<22250738585072014e-324)e((s=n/5e-324)>>>0,i,o+t),e((a<<31|s/4294967296)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(s=n*Math.pow(2,-u))>>>0,i,o+t),e((a<<31|u+1023<<20|1048576*s&1048575)>>>0,i,o+r)}}}function r(e,t,r,n,i){var o=e(n,i+t),a=e(n,i+r),s=2*(a>>31)+1,u=a>>>20&2047,c=4294967296*(1048575&a)+o;return 2047===u?c?NaN:s*(1/0):0===u?5e-324*s*c:s*Math.pow(2,u-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,i,0,4),e.writeDoubleBE=t.bind(null,o,4,0),e.readDoubleLE=r.bind(null,a,0,4),e.readDoubleBE=r.bind(null,s,4,0)}(),e}function i(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function o(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function a(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=n(n)},function(e,t,r){"use strict";var n=t;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){if(r-t<1)return"";for(var n,i=null,o=[],a=0;t<r;)(n=e[t++])<128?o[a++]=n:n>191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},n.write=function(e,t,r){for(var n,i,o=r,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&i),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-o}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n=r||8192,i=n>>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);var s=t.call(o,a,a+=r);return 7&a&&(a=1+(7|a)),s}}},function(e,t,r){"use strict";e.exports=i;var n=r(82);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){if("number"===typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;i.fromHash=function(e){return e===a?o:new i((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},function(e,t,r){"use strict";e.exports=o;var n=r(237);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(82);function o(){n.call(this)}function a(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},o.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},o._configure()},function(e,t,r){"use strict";e.exports=o;var n=r(238);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(82);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},function(e,t,r){"use strict";e.exports=i;var n=r(82);function i(e,t,r){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,r,i,o);if(s.rpcImpl)try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,r){if(e)return s.emit("error",e,t),a(e);if(null!==r){if(!(r instanceof i))try{r=i[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)}s.end(!0)}))}catch(u){return s.emit("error",u,t),void setTimeout((function(){a(u)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},function(e,t,r){"use strict";function n(e,t){"string"===typeof e&&(t=e,e=void 0);var r=[];function i(e){if("string"!==typeof e){var t=o();if(n.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var a=Object.keys(e),s=new Array(a.length+1),u=new Array(a.length),c=0;c<a.length;)s[c]=a[c],u[c]=e[a[c++]];return s[c]=t,Function.apply(null,s).apply(null,u)}return Function(t)()}for(var f=new Array(arguments.length-1),l=0;l<f.length;)f[l]=arguments[++l];if(l=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=f[l++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),l!==f.length)throw Error("parameter count mismatch");return r.push(e),i}function o(n){return"function "+(n||t||"")+"("+(e&&e.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return i.toString=o,i}e.exports=n,n.verbose=!1},function(e,t,r){"use strict";e.exports=o;var n=r(321),i=r(322)("fs");function o(e,t,r){return"function"===typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&i&&i.readFile?i.readFile(e,(function(n,i){return n&&"undefined"!==typeof XMLHttpRequest?o.xhr(e,t,r):n?r(n):r(null,t.binary?i:i.toString("utf8"))})):o.xhr(e,t,r):n(o,this,e,t)}o.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var i=0;i<n.responseText.length;++i)e.push(255&n.responseText.charCodeAt(i))}return r(null,"undefined"!==typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},function(e,t,r){"use strict";var n=t,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=n.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var o=0;o<t.length;)".."===t[o]?o>0&&".."!==t[o-1]?t.splice(--o,2):r?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=o(t)),i(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[f++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,u=r-i;s<u;s+=a)o.push(f(e,s,s+a>u?u:s+a));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*v}},function(e,t){e.exports=function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(u){i=!0,o=u}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}},function(e,t,r){"use strict";var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(340),o=i.keccak224,a=i.keccak384,s=i.keccak256,u=i.keccak512,c=r(572),f=r(158),l=r(191),h=r(14),d=r(107),p=r(28).Buffer;Object.assign(t,r(134)),t.MAX_INTEGER=new h("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new h("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=p.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=p.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=p.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=h,t.rlp=l,t.secp256k1=c,t.zeros=function(e){return p.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=t.zeros(20);return t.bufferToHex(e)},t.setLengthLeft=t.setLength=function(e,r,n){var i=t.zeros(r);return e=t.toBuffer(e),n?e.length<r?(e.copy(i),i):e.slice(0,r):e.length<r?(e.copy(i,r-e.length),i):e.slice(-r)},t.setLengthRight=function(e,r){return t.setLength(e,r,!0)},t.unpad=t.stripZeros=function(e){for(var r=(e=t.stripHexPrefix(e))[0];e.length>0&&"0"===r.toString();)r=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!p.isBuffer(e))if(Array.isArray(e))e=p.from(e);else if("string"===typeof e)e=t.isHexString(e)?p.from(t.padToEven(t.stripHexPrefix(e)),"hex"):p.from(e);else if("number"===typeof e)e=t.intToBuffer(e);else if(null===e||void 0===e)e=p.allocUnsafe(0);else if(h.isBN(e))e=e.toArrayLike(p);else{if(!e.toArray)throw new Error("invalid type");e=p.from(e.toArray())}return e},t.bufferToInt=function(e){return new h(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new h(e).fromTwos(256)},t.toUnsigned=function(e){return p.from(e.toTwos(256).toArray())},t.keccak=function(e,r){switch(e=t.toBuffer(e),r||(r=256),r){case 224:return o(e);case 256:return s(e);case 384:return a(e);case 512:return u(e);default:throw new Error("Invald algorithm: keccak"+r)}},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),d("sha256").update(e).digest()},t.ripemd160=function(e,r){e=t.toBuffer(e);var n=d("rmd160").update(e).digest();return!0===r?t.setLength(n,32):n},t.rlphash=function(e){return t.keccak(l.encode(e))},t.isValidPrivate=function(e){return c.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?c.publicKeyVerify(p.concat([p.from([4]),e])):!!t&&c.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,r){return e=t.toBuffer(e),r&&64!==e.length&&(e=c.publicKeyConvert(e,!1).slice(1)),f(64===e.length),t.keccak(e).slice(-20)};var v=t.privateToPublic=function(e){return e=t.toBuffer(e),c.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=c.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var r=c.sign(e,t),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},t.hashPersonalMessage=function(e){var r=t.toBuffer("\x19Ethereum Signed Message:\n"+e.length.toString());return t.keccak(p.concat([r,e]))},t.ecrecover=function(e,r,n,i){var o=p.concat([t.setLength(n,32),t.setLength(i,32)],64),a=r-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var s=c.recover(e,o,a);return c.publicKeyConvert(s,!1).slice(1)},t.toRpcSig=function(e,r,n){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(p.concat([t.setLengthLeft(r,32),t.setLengthLeft(n,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var r=e[64];return r<27&&(r+=27),{v:r,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(v(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var r=t.keccak(e).toString("hex"),n="0x",i=0;i<e.length;i++)parseInt(r[i],16)>=8?n+=e[i].toUpperCase():n+=e[i];return n},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,r){return e=t.toBuffer(e),r=(r=new h(r)).isZero()?null:p.from(r.toArray()),t.rlphash([e,r]).slice(-20)},t.isPrecompiled=function(e){var r=t.unpad(e);return 1===r.length&&r[0]>=1&&r[0]<=8},t.addHexPrefix=function(e){return"string"!==typeof e||t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,r,n){var i=new h("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new h("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===r.length&&((27===e||28===e)&&(t=new h(t),r=new h(r),!(t.isZero()||t.gt(o)||r.isZero()||r.gt(o))&&(!1!==n||1!==new h(r).cmp(i))))},t.baToJSON=function(e){if(p.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var r=[],n=0;n<e.length;n++)r.push(t.baToJSON(e[n]));return r}},t.defineProperties=function(e,r,i){if(e.raw=[],e._fields=[],e.toJSON=function(r){if(r){var n={};return e._fields.forEach((function(t){n[t]="0x"+e[t].toString("hex")})),n}return t.baToJSON(this.raw)},e.serialize=function(){return l.encode(e.raw)},r.forEach((function(r,n){function i(){return e.raw[n]}function o(i){"00"!==(i=t.toBuffer(i)).toString("hex")||r.allowZero||(i=p.allocUnsafe(0)),r.allowLess&&r.length?(i=t.stripZeros(i),f(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||f(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),e.raw[n]=i}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),i)if("string"===typeof i&&(i=p.from(t.stripHexPrefix(i),"hex")),p.isBuffer(i)&&(i=l.decode(i)),Array.isArray(i)){if(i.length>e._fields.length)throw new Error("wrong number of fields in data");i.forEach((function(r,n){e[e._fields[n]]=t.toBuffer(r)}))}else{if("object"!==("undefined"===typeof i?"undefined":n(i)))throw new Error("invalid data");var o=Object.keys(i);r.forEach((function(t){-1!==o.indexOf(t.name)&&(e[t.name]=i[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=i[t.alias])}))}}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createHashFunction=function(t){return function(r){var n=t();return n.update(r),e.from(n.digest())}}}).call(this,r(13).Buffer)},function(e,t,r){e.exports=r(556)(r(570))},function(e,t,r){var n=r(557),i=r(569);e.exports=function(e){var t=n(e),r=i(e);return function(e,n){switch("string"===typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+e)}}}},function(e,t,r){(function(t){var n=r(8),i=r(9),o=r(26),a=r(27),s=r(242).Transform;e.exports=function(e){return function(r){"use strict";o(u,r);var s=a(u);function u(t,r,i,o,a){var c;return n(this,u),(c=s.call(this,a))._rate=t,c._capacity=r,c._delimitedSuffix=i,c._hashBitLength=o,c._options=a,c._state=new e,c._state.initialize(t,r),c._finalized=!1,c}return i(u,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(i){n=i}r(n)}},{key:"_flush",value:function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)}},{key:"update",value:function(e,r){if(!t.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return t.isBuffer(e)||(e=t.from(e,r)),this._state.absorb(e),this}},{key:"digest",value:function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new u(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),u}(s)}}).call(this,r(13).Buffer)},function(e,t){function r(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},,function(e,t,r){"use strict";var n=r(244).Buffer,i=r(561);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},,function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i=1,o={},a=!1,s=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){f(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?function(){var t="setImmediate$"+Math.random()+"$",r=function(r){r.source===e&&"string"===typeof r.data&&0===r.data.indexOf(t)&&f(+r.data.slice(t.length))};e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),n=function(r){e.postMessage(t+r,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){f(e.data)},n=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;n=function(t){var r=s.createElement("script");r.onreadystatechange=function(){f(t),r.onreadystatechange=null,e.removeChild(r),r=null},e.appendChild(r)}}():n=function(e){setTimeout(f,0,e)},u.setImmediate=function(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var a={callback:e,args:t};return o[i]=a,n(i),i++},u.clearImmediate=c}function c(e){delete o[e]}function f(e){if(a)setTimeout(f,0,e);else{var t=o[e];if(t){a=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{c(e),a=!1}}}}}("undefined"===typeof self?"undefined"===typeof e?this:e:self)}).call(this,r(36),r(39))},function(e,t,r){var n=r(13),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";e.exports=o;var n=r(347),i=Object.create(r(154));function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(23),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(245)},function(e,t,r){e.exports=r(105)},function(e,t,r){e.exports=r(243).Transform},function(e,t,r){e.exports=r(243).PassThrough},function(e,t,r){(function(t){var n=r(8),i=r(9),o=r(26),a=r(27),s=r(242).Transform;e.exports=function(e){return function(r){"use strict";o(u,r);var s=a(u);function u(t,r,i,o){var a;return n(this,u),(a=s.call(this,o))._rate=t,a._capacity=r,a._delimitedSuffix=i,a._options=o,a._state=new e,a._state.initialize(t,r),a._finalized=!1,a}return i(u,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(i){n=i}r(n)}},{key:"_flush",value:function(){}},{key:"_read",value:function(e){this.push(this.squeeze(e))}},{key:"update",value:function(e,r){if(!t.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return t.isBuffer(e)||(e=t.from(e,r)),this._state.absorb(e),this}},{key:"squeeze",value:function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new u(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),u}(s)}}).call(this,r(13).Buffer)},function(e,t,r){(function(t){var n=r(571);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(var t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,0!==(128&e)&&this.count===this.blockSize-1&&n.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,n.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);for(var r=t.alloc(e),i=0;i<e;++i)r[i]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},i.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i}).call(this,r(13).Buffer)},function(e,t){var r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(var t=0;t<24;++t){var n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],l=e[8]^e[18]^e[28]^e[38]^e[48],h=e[9]^e[19]^e[29]^e[39]^e[49],d=l^(o<<1|a>>>31),p=h^(a<<1|o>>>31),v=e[0]^d,y=e[1]^p,b=e[10]^d,g=e[11]^p,m=e[20]^d,w=e[21]^p,k=e[30]^d,S=e[31]^p,E=e[40]^d,_=e[41]^p;d=n^(s<<1|u>>>31),p=i^(u<<1|s>>>31);var A=e[2]^d,x=e[3]^p,T=e[12]^d,M=e[13]^p,C=e[22]^d,O=e[23]^p,I=e[32]^d,P=e[33]^p,R=e[42]^d,B=e[43]^p;d=o^(c<<1|f>>>31),p=a^(f<<1|c>>>31);var D=e[4]^d,N=e[5]^p,L=e[14]^d,j=e[15]^p,U=e[24]^d,F=e[25]^p,K=e[34]^d,z=e[35]^p,V=e[44]^d,H=e[45]^p;d=s^(l<<1|h>>>31),p=u^(h<<1|l>>>31);var J=e[6]^d,q=e[7]^p,G=e[16]^d,X=e[17]^p,W=e[26]^d,Z=e[27]^p,Y=e[36]^d,Q=e[37]^p,$=e[46]^d,ee=e[47]^p;d=c^(n<<1|i>>>31),p=f^(i<<1|n>>>31);var te=e[8]^d,re=e[9]^p,ne=e[18]^d,ie=e[19]^p,oe=e[28]^d,ae=e[29]^p,se=e[38]^d,ue=e[39]^p,ce=e[48]^d,fe=e[49]^p,le=v,he=y,de=g<<4|b>>>28,pe=b<<4|g>>>28,ve=m<<3|w>>>29,ye=w<<3|m>>>29,be=S<<9|k>>>23,ge=k<<9|S>>>23,me=E<<18|_>>>14,we=_<<18|E>>>14,ke=A<<1|x>>>31,Se=x<<1|A>>>31,Ee=M<<12|T>>>20,_e=T<<12|M>>>20,Ae=C<<10|O>>>22,xe=O<<10|C>>>22,Te=P<<13|I>>>19,Me=I<<13|P>>>19,Ce=R<<2|B>>>30,Oe=B<<2|R>>>30,Ie=N<<30|D>>>2,Pe=D<<30|N>>>2,Re=L<<6|j>>>26,Be=j<<6|L>>>26,De=F<<11|U>>>21,Ne=U<<11|F>>>21,Le=K<<15|z>>>17,je=z<<15|K>>>17,Ue=H<<29|V>>>3,Fe=V<<29|H>>>3,Ke=J<<28|q>>>4,ze=q<<28|J>>>4,Ve=X<<23|G>>>9,He=G<<23|X>>>9,Je=W<<25|Z>>>7,qe=Z<<25|W>>>7,Ge=Y<<21|Q>>>11,Xe=Q<<21|Y>>>11,We=ee<<24|$>>>8,Ze=$<<24|ee>>>8,Ye=te<<27|re>>>5,Qe=re<<27|te>>>5,$e=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|ue>>>24,it=ue<<8|se>>>24,ot=ce<<14|fe>>>18,at=fe<<14|ce>>>18;e[0]=le^~Ee&De,e[1]=he^~_e&Ne,e[10]=Ke^~$e&ve,e[11]=ze^~et&ye,e[20]=ke^~Re&Je,e[21]=Se^~Be&qe,e[30]=Ye^~de&Ae,e[31]=Qe^~pe&xe,e[40]=Ie^~Ve&tt,e[41]=Pe^~He&rt,e[2]=Ee^~De&Ge,e[3]=_e^~Ne&Xe,e[12]=$e^~ve&Te,e[13]=et^~ye&Me,e[22]=Re^~Je&nt,e[23]=Be^~qe&it,e[32]=de^~Ae&Le,e[33]=pe^~xe&je,e[42]=Ve^~tt&be,e[43]=He^~rt&ge,e[4]=De^~Ge&ot,e[5]=Ne^~Xe&at,e[14]=ve^~Te&Ue,e[15]=ye^~Me&Fe,e[24]=Je^~nt&me,e[25]=qe^~it&we,e[34]=Ae^~Le&We,e[35]=xe^~je&Ze,e[44]=tt^~be&Ce,e[45]=rt^~ge&Oe,e[6]=Ge^~ot&le,e[7]=Xe^~at&he,e[16]=Te^~Ue&Ke,e[17]=Me^~Fe&ze,e[26]=nt^~me&ke,e[27]=it^~we&Se,e[36]=Le^~We&Ye,e[37]=je^~Ze&Qe,e[46]=be^~Ce&Ie,e[47]=ge^~Oe&Pe,e[8]=ot^~le&Ee,e[9]=at^~he&_e,e[18]=Ue^~Ke&$e,e[19]=Fe^~ze&et,e[28]=me^~ke&Re,e[29]=we^~Se&Be,e[38]=We^~Ye&de,e[39]=Ze^~Qe&pe,e[48]=Ce^~Ie&Ve,e[49]=Oe^~Pe&He,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},function(e,t,r){"use strict";(function(t){var n=r(348),i=r(596),o=r(597),a=function(e){return 32===e.length&&n.privateKeyVerify(Uint8Array.from(e))};e.exports={privateKeyVerify:a,privateKeyExport:function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var r=i.privateKeyExport(e,t);return o.privateKeyExport(e,r,t)},privateKeyImport:function(e){if(null!==(e=o.privateKeyImport(e))&&32===e.length&&a(e))return e;throw new Error("couldn't import from DER format")},privateKeyNegate:function(e){return t.from(n.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return t.from(i.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,r){return t.from(n.privateKeyTweakAdd(Uint8Array.from(e),r))},privateKeyTweakMul:function(e,r){return t.from(n.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(r)))},publicKeyCreate:function(e,r){return t.from(n.publicKeyCreate(Uint8Array.from(e),r))},publicKeyConvert:function(e,r){return t.from(n.publicKeyConvert(Uint8Array.from(e),r))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&n.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,r,i){return t.from(n.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(r),i))},publicKeyTweakMul:function(e,r,i){return t.from(n.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(r),i))},publicKeyCombine:function(e,r){var i=[];return e.forEach((function(e){i.push(Uint8Array.from(e))})),t.from(n.publicKeyCombine(i,r))},signatureNormalize:function(e){return t.from(n.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return t.from(n.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return t.from(n.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=o.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return i.signatureImport(t)},sign:function(e,r,i){if(null===i)throw new TypeError("options should be an Object");var o=void 0;if(i){if(o={},null===i.data)throw new TypeError("options.data should be a Buffer");if(i.data){if(32!==i.data.length)throw new RangeError("options.data length is invalid");o.data=new Uint8Array(i.data)}if(null===i.noncefn)throw new TypeError("options.noncefn should be a Function");i.noncefn&&(o.noncefn=function(e,r,n,o,a){var s=null!=n?t.from(n):null,u=null!=o?t.from(o):null,c=t.from("");return i.noncefn&&(c=i.noncefn(t.from(e),t.from(r),s,u,a)),Uint8Array.from(c)})}var a=n.ecdsaSign(Uint8Array.from(e),Uint8Array.from(r),o);return{signature:t.from(a.signature),recovery:a.recid}},verify:function(e,t,r){return n.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),r)},recover:function(e,r,i,o){return t.from(n.ecdsaRecover(Uint8Array.from(r),i,Uint8Array.from(e),o))},ecdh:function(e,r){return t.from(n.ecdh(Uint8Array.from(e),Uint8Array.from(r),{}))},ecdhUnsafe:function(e,r,n){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==r.length)throw new RangeError("private key length is invalid");return t.from(i.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(r),n))}}}).call(this,r(13).Buffer)},function(e,t,r){var n=r(21),i="Impossible case. Please create issue.",o="The tweak was out of range or the resulted private key is invalid",a="The tweak was out of range or equal to zero",s="Unknow error on context randomization",u="Private Key is invalid",c="Public Key could not be parsed",f="Public Key serialization error",l="The sum of the public keys is not valid",h="Signature could not be parsed",d="The nonce generation function failed, or the private key was invalid",p="Public key could not be recover",v="Scalar was invalid (zero or overflow)";function y(e,t){if(!e)throw new Error(t)}function b(e,t,r){if(y(t instanceof Uint8Array,"Expected ".concat(e," to be an Uint8Array")),void 0!==r)if(Array.isArray(r)){var n=r.join(", "),i="Expected ".concat(e," to be an Uint8Array with length [").concat(n,"]");y(r.includes(t.length),i)}else{var o="Expected ".concat(e," to be an Uint8Array with length ").concat(r);y(t.length===r,o)}}function g(e){y("Boolean"===w(e),"Expected compressed to be a Boolean")}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"===typeof e&&(e=e(t)),b("output",e,t),e}function w(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){switch(y(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&b("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(s)}},privateKeyVerify:function(t){return b("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(b("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(i)}},privateKeyTweakAdd:function(t,r){switch(b("private key",t,32),b("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(o)}},privateKeyTweakMul:function(t,r){switch(b("private key",t,32),b("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(a)}},publicKeyVerify:function(t){return b("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(b("private key",t,32),g(r),n=m(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(u);case 2:throw new Error(f)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(b("public key",t,[33,65]),g(r),n=m(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(f)}},publicKeyNegate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(b("public key",t,[33,65]),g(r),n=m(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(i);case 3:throw new Error(f)}},publicKeyCombine:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;y(Array.isArray(t),"Expected public keys to be an Array"),y(t.length>0,"Expected public keys array will have more than zero items");var o,a=n(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;b("public key",s,[33,65])}}catch(u){a.e(u)}finally{a.f()}switch(g(r),i=m(i,r?33:65),e.publicKeyCombine(i,t)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(f)}},publicKeyTweakAdd:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(b("public key",t,[33,65]),b("tweak",r,32),g(n),i=m(i,n?33:65),e.publicKeyTweakAdd(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(o)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(b("public key",t,[33,65]),b("tweak",r,32),g(n),i=m(i,n?33:65),e.publicKeyTweakMul(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(a)}},signatureNormalize:function(t){switch(b("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(h)}},signatureExport:function(t,r){b("signature",t,64);var n={output:r=m(r,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(h);case 2:throw new Error(i)}},signatureImport:function(t,r){switch(b("signature",t),r=m(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(h);case 2:throw new Error(i)}},ecdsaSign:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;b("message",t,32),b("private key",r,32),y("Object"===w(n),"Expected options to be an Object"),void 0!==n.data&&b("options.data",n.data),void 0!==n.noncefn&&y("Function"===w(n.noncefn),"Expected options.noncefn to be a Function");var a={signature:o=m(o,64),recid:null};switch(e.ecdsaSign(a,t,r,n.data,n.noncefn)){case 0:return a;case 1:throw new Error(d);case 2:throw new Error(i)}},ecdsaVerify:function(t,r,n){switch(b("signature",t,64),b("message",r,32),b("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(h);case 2:throw new Error(c)}},ecdsaRecover:function(t,r,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(b("signature",t,64),y("Number"===w(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),b("message",n,32),g(o),a=m(a,o?33:65),e.ecdsaRecover(a,t,r,n)){case 0:return a;case 1:throw new Error(h);case 2:throw new Error(p);case 3:throw new Error(i)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(b("public key",t,[33,65]),b("private key",r,32),y("Object"===w(n),"Expected options to be an Object"),void 0!==n.data&&b("options.data",n.data),void 0!==n.hashfn?(y("Function"===w(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&b("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&b("options.ybuf",n.ybuf,32),b("output",i)):i=m(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(v)}}}}},function(e,t,r){var n=new(0,r(130).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var u=a.redSqr().redIMul(a);return s.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n<e.length;++n)e[n]=r[n]}e.exports={contextRandomize:function(){return 0},privateKeyVerify:function(e){var t=new o(e);return t.cmp(i.n)<0&&!t.isZero()?0:1},privateKeyNegate:function(e){var t=new o(e),r=i.n.sub(t).umod(i.n).toArrayLike(Uint8Array,"be",32);return e.set(r),0},privateKeyTweakAdd:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n<t.length;++n)if(r[n]=a(t[n]),null===r[n])return 1;for(var i=r[0].getPublic(),o=1;o<r.length;++o)i=i.add(r[o].pub);return i.isInfinity()?2:(s(e,i),0)},publicKeyTweakAdd:function(e,t,r){var n=a(t);if(null===n)return 1;if((r=new o(r)).cmp(i.n)>=0)return 2;var u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(s(e,u),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var u=33,c=0;u>1&&0===s[c]&&!(128&s[c+1]);--u,++c);if(128&(s=s.subarray(c))[0])return 1;if(u>1&&0===s[0]&&!(128&s[1]))return 1;var f=a.subarray(39,72);f[0]=0,f.set(n,1);for(var l=33,h=0;l>1&&0===f[h]&&!(128&f[h+1]);--l,++h);return 128&(f=f.subarray(h))[0]||l>1&&0===f[0]&&!(128&f[1])?1:(e.outputlen=6+u+l,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+u]=2,a[5+u]=f.length,a.set(f,6+u),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var u=new o(a);u.cmp(i.n)>=0&&(u=new o(0));var c=new o(t.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),e.set(u.toArrayLike(Uint8Array,"be",32),0),e.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var u=s;s=function(e){var n=u(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var c,f=new o(r);if(f.cmp(i.n)>=0||f.isZero())return 1;try{c=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(l){return 1}return e.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),e.recid=c.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},u=new o(s.r),c=new o(s.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;var f=a(r);if(null===f)return 2;var l=f.getPublic();return n.verify(t,s,l)?0:3},ecdsaRecover:function(e,t,r,a){var u,c={r:t.slice(0,32),s:t.slice(32,64)},f=new o(c.r),l=new o(c.s);if(f.cmp(i.n)>=0||l.cmp(i.n)>=0)return 1;if(f.isZero()||l.isZero())return 2;try{u=n.recoverPubKey(a,c,r)}catch(h){return 2}return s(e,u),0},ecdh:function(e,t,r,s,u,c,f){var l=a(t);if(null===l)return 1;var h=new o(r);if(h.cmp(i.n)>=0||h.isZero())return 2;var d=l.getPublic().mul(h);if(void 0===u)for(var p=d.encode(null,!0),v=n.hash().update(p).digest(),y=0;y<32;++y)e[y]=v[y];else{c||(c=new Uint8Array(32));for(var b=d.getX().toArray("be",32),g=0;g<32;++g)c[g]=b[g];f||(f=new Uint8Array(32));for(var m=d.getY().toArray("be",32),w=0;w<32;++w)f[w]=m[w];var k=u(c,f,s);if(!(k instanceof Uint8Array&&k.length===e.length))return 2;e.set(k)}return 0}}},function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},,,function(e,t,r){"use strict";var n=r(65),i=r(14),o=r(23),a=r(190),s=n.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new i(1),v=new i(0),y=new i(0),b=new i(1),g=0;0!==h.cmpn(0);){var m=d.div(h);c=d.sub(m.mul(h)),f=y.sub(m.mul(p));var w=b.sub(m.mul(v));if(!n&&c.cmp(l)<0)t=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2===++g)break;u=c,d=h,h=c,y=p,p=f,b=v,v=w}a=c.neg(),s=f;var k=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(k)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return c},o(c,a.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"===typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var f=o.redSqr(),l=c.redSqr(),h=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),p=o.redMul(l),v=d.redSqr().redISub(p.redAdd(p)),y=p.redISub(v),b=d.redMul(y);b=b.redIAdd(b).redISub(h);var g=c.redMul(s);t+1<e&&(u=u.redMul(h)),o=v,s=g,c=b}return this.curve.jpoint(o,c.redMul(i),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(h);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),v=p.redSqr(),y=h.redIAdd(h);y=(y=y.redIAdd(y)).redIAdd(y),e=v.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},f.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),v=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(v),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var y=l.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=d.redMul(p.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,r)},f.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),l=c.redISub(f),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=s.redMul(l).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),f=t.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(l,h,d)},f.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},f.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(14),i=r(23),o=r(190),a=r(65);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(65),i=r(14),o=r(23),a=r(190),s=n.assert;function u(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&-1===(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}function c(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,f)},c.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),l=o.redMul(u),h=a.redMul(s);return this.curve.point(c,f,h,l)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";t.sha1=r(582),t.sha224=r(583),t.sha256=r(353),t.sha384=r(584),t.sha512=r(354)},function(e,t,r){"use strict";var n=r(75),i=r(157),o=r(352),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,f=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,f),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],h=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),v=u(a(i,5),c(p,o,f,h),d,r[n],l[p]);d=h,h=f,f=a(o,30),o=i,i=v}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],h),this.h[4]=s(this.h[4],d)},h.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(75),i=r(353);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(e,t,r){"use strict";var n=r(75),i=r(354);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(e,t,r){"use strict";var n=r(75),i=r(157),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(f,c),t.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],f=this.h[4],g=r,m=n,w=i,k=c,S=f,E=0;E<80;E++){var _=a(o(u(r,l(E,n,i,c),e[p[E]+t],h(E)),y[E]),f);r=f,f=c,c=o(i,10),i=n,n=_,_=a(o(u(g,l(79-E,m,w,k),e[v[E]+t],d(E)),b[E]),S),g=S,S=k,k=o(w,10),w=m,m=_}_=s(this.h[1],i,k),this.h[1]=s(this.h[2],c,S),this.h[2]=s(this.h[3],f,g),this.h[3]=s(this.h[4],r,m),this.h[4]=s(this.h[0],n,w),this.h[0]=_},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],v=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,r){"use strict";var n=r(75),i=r(66);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(14),i=r(589),o=r(65),a=r(248),s=r(247),u=o.assert,c=r(590),f=r(591);function l(e){if(!(this instanceof l))return new l(e);"string"===typeof e&&(u(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function(e){return new c(this,e)},l.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,r,o){"object"===typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new n(1)),h=0;;h++){var d=o.k?o.k(h):new n(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var v=p.getX(),y=v.umod(this.n);if(0!==y.cmpn(0)){var b=d.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==v.cmp(y)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),g^=1),new f({r:y,s:b,recoveryParam:g})}}}}}},l.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new f(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var o=this.n,a=new n(e),s=t.r,c=t.s,l=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=t.r.invm(o),p=o.sub(a).mul(d).umod(o),v=c.mul(d).umod(o);return this.g.mulAdd(p,s,v)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(52),i=r(350),o=r(66);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!==typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},function(e,t,r){"use strict";var n=r(14),i=r(65).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,r){"use strict";var n=r(14),i=r(65),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=u(e,r);if(!1===f)return!1;if(e.length!==f+r.place)return!1;var l=e.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(c),this.s=new n(l),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];f(n,t.length),(n=n.concat(t)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,e)}},function(e,t,r){"use strict";var n=r(52),i=r(248),o=r(65),a=o.assert,s=o.parseBytes,u=r(593),c=r(594);function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},f.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},f.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},f.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},f.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!==(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(e){return o.intFromLE(e)},f.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,r){"use strict";var n=r(65),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var n=r(14),i=r(65),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function u(e,t){this.eddsa=e,"object"!==typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(106);t.getRandomBytes=function(e){return new Promise((function(t,r){n(e,(function(e,n){e?r(e):t(n)}))}))},t.getRandomBytesSync=function(e){return n(e)}},function(e,t,r){"use strict";(function(e){var n=r(14),i=new(0,r(130).ec)("secp256k1"),o=i.curve;t.privateKeyExport=function(e,t){var r=new n(e);if(r.ucmp(o.n)>=0)throw new Error("couldn't export to DER format");var s=i.g.mul(r);return a(s.getX(),s.getY(),t)},t.privateKeyModInverse=function(t){var r=new n(t);if(r.ucmp(o.n)>=0||r.isZero())throw new Error("private key range is invalid");return r.invm(o.n).toArrayLike(e,"be",32)},t.signatureImport=function(t){var r=new n(t.r);r.ucmp(o.n)>=0&&(r=new n(0));var i=new n(t.s);return i.ucmp(o.n)>=0&&(i=new n(0)),e.concat([r.toArrayLike(e,"be",32),i.toArrayLike(e,"be",32)])},t.ecdhUnsafe=function(e,t,r){var s=i.keyFromPublic(e),u=new n(t);if(u.ucmp(o.n)>=0||u.isZero())throw new Error("scalar was invalid (zero or overflow)");var c=s.pub.mul(u);return a(c.getX(),c.getY(),r)};var a=function(t,r,n){var i=void 0;return n?((i=e.alloc(33))[0]=r.isOdd()?3:2,t.toArrayLike(e,"be",32).copy(i,1)):((i=e.alloc(65))[0]=4,t.toArrayLike(e,"be",32).copy(i,1),r.toArrayLike(e,"be",32).copy(i,33)),i}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){var r=e.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n=e.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(t,i,o){var a=e.from(o?r:n);return t.copy(a,o?8:9),i.copy(a,o?181:214),a},t.privateKeyImport=function(e){var t=e.length,r=0;if(t<r+1||48!==e[r])return null;if(t<(r+=1)+1||!(128&e[r]))return null;var n=127&e[r];if(n<1||n>2)return null;if(t<(r+=1)+n)return null;var i=e[r+n-1]|(n>1?e[r+n-2]<<8:0);return t<(r+=n)+i||t<r+3||2!==e[r]||1!==e[r+1]||1!==e[r+2]||t<(r+=3)+2||4!==e[r]||e[r+1]>32||t<r+2+e[r+1]?null:e.slice(r+2,r+2+e[r+1])},t.signatureImportLax=function(t){var r=e.alloc(32,0),n=e.alloc(32,0),i=t.length,o=0;if(48!==t[o++])return null;var a=t[o++];if(128&a&&(o+=a-128)>i)return null;if(2!==t[o++])return null;var s=t[o++];if(128&s){if(o+(a=s-128)>i)return null;for(;a>0&&0===t[o];o+=1,a-=1);for(s=0;a>0;o+=1,a-=1)s=(s<<8)+t[o]}if(s>i-o)return null;var u=o;if(o+=s,2!==t[o++])return null;var c=t[o++];if(128&c){if(o+(a=c-128)>i)return null;for(;a>0&&0===t[o];o+=1,a-=1);for(c=0;a>0;o+=1,a-=1)c=(c<<8)+t[o]}if(c>i-o)return null;var f=o;for(o+=c;s>0&&0===t[u];s-=1,u+=1);if(s>32)return null;var l=t.slice(u,u+s);for(l.copy(r,32-l.length);c>0&&0===t[f];c-=1,f+=1);if(c>32)return null;var h=t.slice(f,f+c);return h.copy(n,32-h.length),{r:r,s:n}}}).call(this,r(13).Buffer)},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){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 e}})),u=n[r];r<o;u=n[++r])v(u)||!w(u)?a+=" "+u:a+=" "+s(u);return a},t.deprecate=function(r,n){if("undefined"!==typeof e&&!0===e.noDeprecation)return r;if("undefined"===typeof e)return function(){return t.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o,a={};function s(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=s.styles[t];return r?"\x1b["+s.colors[r][0]+"m"+e+"\x1b["+s.colors[r][1]+"m":e}function c(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=f(e,i,n)),i}var o=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),S(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(E(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var c,w="",_=!1,A=["{","}"];(d(r)&&(_=!0,A=["[","]"]),E(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(w=" "+RegExp.prototype.toString.call(r)),k(r)&&(w=" "+Date.prototype.toUTCString.call(r)),S(r)&&(w=" "+l(r)),0!==a.length||_&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=_?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)M(t,String(a))?o.push(h(e,t,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))})),o}(e,r,n,s,a):a.map((function(t){return h(e,r,n,s,t,_)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,w,A)):A[0]+w+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),M(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"===typeof e}function v(e){return null===e}function y(e){return"number"===typeof e}function b(e){return"string"===typeof e}function g(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"===typeof e&&null!==e}function k(e){return w(e)&&"[object Date]"===_(e)}function S(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function E(e){return"function"===typeof e}function _(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(g(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"/js-waku/eth-pm-wallet",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=e.pid;a[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else a[r]=function(){};return a[r]},t.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=p,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=b,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=g,t.isRegExp=m,t.isObject=w,t.isDate=k,t.isError=S,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=r(599);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),x[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",T(),t.format.apply(t,arguments))},t.inherits=r(600),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var C="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(C&&e[C]){var t;if("function"!==typeof(t=e[C]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,C,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(a){r(a)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),C&&Object.defineProperty(t,C,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=C,t.callbackify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!==typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};t.apply(this,r).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(O,t,a)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,n(t)),r}}).call(this,r(39))},function(e,t){e.exports=function(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},,function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=r(13).Buffer,s=r(603).inspect,u=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,c;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),c&&o(t,c),e}()},,function(e,t,r){"use strict";(function(t){var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(250),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[h].read();null!==r&&(e[f]=null,e[a]=null,e[s]=null,t(d(r,!1)))}}function v(e){t.nextTick(p,e)}var y=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(r,n){t.nextTick((function(){e[u]?n(e[u]):r(d(void 0,!0))}))}));var n,i=this[f];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(d(void 0,!0)):t[l](r,n)}),n)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[l])}return this[f]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(b,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,l,{value:function(e,t){var n=r[h].read();n?(r[f]=null,r[a]=null,r[s]=null,e(d(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[f]=null,r[a]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[s]=null,n(d(void 0,!0))),r[c]=!0})),e.on("readable",v.bind(null,r)),r}}).call(this,r(39))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,r){"use strict";e.exports=i;var n=r(362);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(23)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";var n;var i=r(131).codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===n&&(n=r(250)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"===typeof e.abort}(e)?e.abort():"function"===typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}function c(e){e()}function f(e,t){return e.pipe(t)}function l(e){return e.length?"function"!==typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=l(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,r){var o=r<t.length-1;return u(e,o,r>0,(function(e){n||(n=e),e&&a.forEach(c),o||(a.forEach(c),i(n))}))}));return t.reduce(f)}},function(e,t,r){var n=r(23),i=r(133),o=r(28).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^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(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var h=0;h<80;++h){var d=~~(h/20),p=0|((t=n)<<5|t>>>27)+f(d,i,o,s)+u+r[h]+a[d];u=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var n=r(23),i=r(133),o=r(28).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^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(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),v=c(n)+l(p,i,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(i),i=n,n=v}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var n=r(23),i=r(363),o=r(133),a=r(28).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},function(e,t,r){var n=r(23),i=r(364),o=r(133),a=r(28).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},function(e,t,r){var n=r(365);e.exports=function(e){return"string"!==typeof e?e:n(e)?e.slice(2):e}},function(e,t,r){e.exports=r(614)},function(e,t,r){(function(t){var n=r(615),i=r(14),o=function(){};function a(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function s(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function u(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function c(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function f(e){var t=typeof e;if("string"===t)return n.isHexPrefixed(e)?new i(n.stripHexPrefix(e),16):new i(e,10);if("number"===t)return new i(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function l(e){var t=/^(\w+)\((.*)\)$/.exec(e);if(3!==t.length)throw new Error("Invalid method signature");var r=/^(.+)\):\((.+)$/.exec(t[2]);if(null!==r&&3===r.length)return{method:t[1],args:r[1].split(","),retargs:r[2].split(",")};var n=t[2].split(",");return 1===n.length&&""===n[0]&&(n=[]),{method:t[1],args:n}}function h(e,r){var o,a,l,d;if("address"===e)return h("uint160",f(r));if("bool"===e)return h("uint8",r?1:0);if("string"===e)return h("bytes",t.from(r,"utf8"));if(y(e)){if("undefined"===typeof r.length)throw new Error("Not an array?");if("dynamic"!==(o=c(e))&&0!==o&&r.length>o)throw new Error("Elements exceed array size: "+o);for(d in l=[],e=e.slice(0,e.lastIndexOf("[")),"string"===typeof r&&(r=JSON.parse(r)),r)l.push(h(e,r[d]));if("dynamic"===o){var p=h("uint256",r.length);l.unshift(p)}return t.concat(l)}if("bytes"===e)return r=t.from(r),l=t.concat([h("uint256",r.length),r]),r.length%32!==0&&(l=t.concat([l,n.zeros(32-r.length%32)])),l;if(e.startsWith("bytes")){if((o=s(e))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return n.setLengthRight(r,32)}if(e.startsWith("uint")){if((o=s(e))%8||o<8||o>256)throw new Error("Invalid uint<N> width: "+o);if((a=f(r)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+a.bitLength());if(a<0)throw new Error("Supplied uint is negative");return a.toArrayLike(t,"be",32)}if(e.startsWith("int")){if((o=s(e))%8||o<8||o>256)throw new Error("Invalid int<N> width: "+o);if((a=f(r)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+a.bitLength());return a.toTwos(256).toArrayLike(t,"be",32)}if(e.startsWith("ufixed")){if(o=u(e),(a=f(r))<0)throw new Error("Supplied ufixed is negative");return h("uint256",a.mul(new i(2).pow(new i(o[1]))))}if(e.startsWith("fixed"))return o=u(e),h("int256",f(r).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+e)}function d(e,r,n){var o,a,s,u;if("string"===typeof e&&(e=p(e)),"address"===e.name)return d(e.rawType,r,n).toArrayLike(t,"be",20).toString("hex");if("bool"===e.name)return d(e.rawType,r,n).toString()===new i(1).toString();if("string"===e.name){var c=d(e.rawType,r,n);return t.from(c,"utf8").toString()}if(e.isArray){for(s=[],o=e.size,"dynamic"===e.size&&(n=d("uint256",r,n).toNumber(),o=d("uint256",r,n).toNumber(),n+=32),u=0;u<o;u++){var f=d(e.subArray,r,n);s.push(f),n+=e.subArray.memoryUsage}return s}if("bytes"===e.name)return n=d("uint256",r,n).toNumber(),o=d("uint256",r,n).toNumber(),r.slice(n+32,n+32+o);if(e.name.startsWith("bytes"))return r.slice(n,n+e.size);if(e.name.startsWith("uint")){if((a=new i(r.slice(n,n+32),16,"be")).bitLength()>e.size)throw new Error("Decoded int exceeds width: "+e.size+" vs "+a.bitLength());return a}if(e.name.startsWith("int")){if((a=new i(r.slice(n,n+32),16,"be").fromTwos(256)).bitLength()>e.size)throw new Error("Decoded uint exceeds width: "+e.size+" vs "+a.bitLength());return a}if(e.name.startsWith("ufixed")){if(o=new i(2).pow(new i(e.size[1])),!(a=d("uint256",r,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return a.div(o)}if(e.name.startsWith("fixed")){if(o=new i(2).pow(new i(e.size[1])),!(a=d("int256",r,n)).mod(o).isZero())throw new Error("Decimals not supported yet");return a.div(o)}throw new Error("Unsupported or invalid type: "+e.name)}function p(e){var t,r,n;if(y(e)){t=c(e);var i=e.slice(0,e.lastIndexOf("["));return i=p(i),r={isArray:!0,name:e,size:t,memoryUsage:"dynamic"===t?32:i.memoryUsage*t,subArray:i}}switch(e){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes"}if(r={rawType:n,name:e,memoryUsage:32},e.startsWith("bytes")&&"bytes"!==e||e.startsWith("uint")||e.startsWith("int")?r.size=s(e):(e.startsWith("ufixed")||e.startsWith("fixed"))&&(r.size=u(e)),e.startsWith("bytes")&&"bytes"!==e&&(r.size<1||r.size>32))throw new Error("Invalid bytes<N> width: "+r.size);if((e.startsWith("uint")||e.startsWith("int"))&&(r.size%8||r.size<8||r.size>256))throw new Error("Invalid int/uint<N> width: "+r.size);return r}function v(e){return"string"===e||"bytes"===e||"dynamic"===c(e)}function y(e){return e.lastIndexOf("]")===e.length-1}function b(e,t){return e.startsWith("address")||e.startsWith("bytes")?"0x"+t.toString("hex"):t.toString()}o.eventID=function(e,r){var i=e+"("+r.map(a).join(",")+")";return n.keccak256(t.from(i))},o.methodID=function(e,t){return o.eventID(e,t).slice(0,4)},o.rawEncode=function(e,r){var n=[],i=[],o=0;e.forEach((function(e){if(y(e)){var t=c(e);o+="dynamic"!==t?32*t:32}else o+=32}));for(var s=0;s<e.length;s++){var u=a(e[s]),f=h(u,r[s]);v(u)?(n.push(h("uint256",o)),i.push(f),o+=f.length):n.push(f)}return t.concat(n.concat(i))},o.rawDecode=function(e,r){var n=[];r=t.from(r);for(var i=0,o=0;o<e.length;o++){var s=p(a(e[o])),u=d(s,r,i);i+=s.memoryUsage,n.push(u)}return n},o.simpleEncode=function(e){var r=Array.prototype.slice.call(arguments).slice(1),n=l(e);if(r.length!==n.args.length)throw new Error("Argument count mismatch");return t.concat([o.methodID(n.method,n.args),o.rawEncode(n.args,r)])},o.simpleDecode=function(e,t){var r=l(e);if(!r.retargs)throw new Error("No return values in method");return o.rawDecode(r.retargs,t)},o.stringify=function(e,t){var r=[];for(var n in e){var i=e[n],o=t[n];o=/^[^\[]+\[.*\]$/.test(i)?o.map((function(e){return b(i,e)})).join(", "):b(i,o),r.push(o)}return r},o.solidityHexValue=function(e,r,i){var a,u;if(y(e)){var l=e.replace(/\[.*?\]/,"");if(!y(l)){var h=c(e);if("dynamic"!==h&&0!==h&&r.length>h)throw new Error("Elements exceed array size: "+h)}var d=r.map((function(e){return o.solidityHexValue(l,e,256)}));return t.concat(d)}if("bytes"===e)return r;if("string"===e)return t.from(r,"utf8");if("bool"===e){i=i||8;var p=Array(i/4).join("0");return t.from(r?p+"1":p+"0","hex")}if("address"===e){var v=20;return i&&(v=i/8),n.setLengthLeft(r,v)}if(e.startsWith("bytes")){if((a=s(e))<1||a>32)throw new Error("Invalid bytes<N> width: "+a);return n.setLengthRight(r,a)}if(e.startsWith("uint")){if((a=s(e))%8||a<8||a>256)throw new Error("Invalid uint<N> width: "+a);if((u=f(r)).bitLength()>a)throw new Error("Supplied uint exceeds width: "+a+" vs "+u.bitLength());return i=i||a,u.toArrayLike(t,"be",i/8)}if(e.startsWith("int")){if((a=s(e))%8||a<8||a>256)throw new Error("Invalid int<N> width: "+a);if((u=f(r)).bitLength()>a)throw new Error("Supplied int exceeds width: "+a+" vs "+u.bitLength());return i=i||a,u.toTwos(a).toArrayLike(t,"be",i/8)}throw new Error("Unsupported or invalid type: "+e)},o.solidityPack=function(e,r){if(e.length!==r.length)throw new Error("Number of types are not matching the values");for(var n=[],i=0;i<e.length;i++){var s=a(e[i]),u=r[i];n.push(o.solidityHexValue(s,u,null))}return t.concat(n)},o.soliditySHA3=function(e,t){return n.keccak256(o.solidityPack(e,t))},o.soliditySHA256=function(e,t){return n.sha256(o.solidityPack(e,t))},o.solidityRIPEMD160=function(e,t){return n.ripemd160(o.solidityPack(e,t),!0)},o.fromSerpent=function(e){for(var t,r=[],n=0;n<e.length;n++){var i=e[n];if("s"===i)r.push("bytes");else if("b"===i){for(var o="bytes",a=n+1;a<e.length&&((t=e[a])>="0"&&t<="9");)o+=e[a]-"0",a++;n=a-1,r.push(o)}else if("i"===i)r.push("int256");else{if("a"!==i)throw new Error("Unsupported or invalid type: "+i);r.push("int256[]")}}return r},o.toSerpent=function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if("bytes"===n)t.push("s");else if(n.startsWith("bytes"))t.push("b"+s(n));else if("int256"===n)t.push("i");else{if("int256[]"!==n)throw new Error("Unsupported or invalid type: "+n);t.push("a")}}return t.join("")},e.exports=o}).call(this,r(13).Buffer)},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=t.rlp=t.BN=void 0;var o=r(253);t.secp256k1=o;var a=r(134),s=r(14);t.BN=s;var u=r(191);t.rlp=u,Object.assign(t,a),i(r(618),t),i(r(619),t),i(r(254),t),i(r(620),t),i(r(159),t),i(r(621),t)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r(14),i=new(0,r(130).ec)("secp256k1"),o=i.curve;t.privateKeyExport=function(e,t){void 0===t&&(t=!0);var r=new n(e);if(r.ucmp(o.n)>=0)throw new Error("couldn't export to DER format");var s=i.g.mul(r);return a(s.getX(),s.getY(),t)},t.privateKeyModInverse=function(t){var r=new n(t);if(r.ucmp(o.n)>=0||r.isZero())throw new Error("private key range is invalid");return r.invm(o.n).toArrayLike(e,"be",32)},t.signatureImport=function(t){var r=new n(t.r);r.ucmp(o.n)>=0&&(r=new n(0));var i=new n(t.s);return i.ucmp(o.n)>=0&&(i=new n(0)),e.concat([r.toArrayLike(e,"be",32),i.toArrayLike(e,"be",32)])},t.ecdhUnsafe=function(e,t,r){void 0===r&&(r=!0);var s=i.keyFromPublic(e),u=new n(t);if(u.ucmp(o.n)>=0||u.isZero())throw new Error("scalar was invalid (zero or overflow)");var c=s.pub.mul(u);return a(c.getX(),c.getY(),r)};var a=function(t,r,n){var i;return n?((i=e.alloc(33))[0]=r.isOdd()?3:2,t.toArrayLike(e,"be",32).copy(i,1)):((i=e.alloc(65))[0]=4,t.toArrayLike(e,"be",32).copy(i,1),r.toArrayLike(e,"be",32).copy(i,33)),i}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=e.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n=e.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(t,i,o){void 0===o&&(o=!0);var a=e.from(o?r:n);return t.copy(a,o?8:9),i.copy(a,o?181:214),a},t.privateKeyImport=function(e){var t=e.length,r=0;if(t<r+1||48!==e[r])return null;if(t<(r+=1)+1||!(128&e[r]))return null;var n=127&e[r];if(n<1||n>2)return null;if(t<(r+=1)+n)return null;var i=e[r+n-1]|(n>1?e[r+n-2]<<8:0);return t<(r+=n)+i||t<r+3||2!==e[r]||1!==e[r+1]||1!==e[r+2]||t<(r+=3)+2||4!==e[r]||e[r+1]>32||t<r+2+e[r+1]?null:e.slice(r+2,r+2+e[r+1])},t.signatureImportLax=function(t){var r=e.alloc(32,0),n=e.alloc(32,0),i=t.length,o=0;if(48!==t[o++])return null;var a=t[o++];if(128&a&&(o+=a-128)>i)return null;if(2!==t[o++])return null;var s=t[o++];if(128&s){if(o+(a=s-128)>i)return null;for(;a>0&&0===t[o];o+=1,a-=1);for(s=0;a>0;o+=1,a-=1)s=(s<<8)+t[o]}if(s>i-o)return null;var u=o;if(o+=s,2!==t[o++])return null;var c=t[o++];if(128&c){if(o+(a=c-128)>i)return null;for(;a>0&&0===t[o];o+=1,a-=1);for(c=0;a>0;o+=1,a-=1)c=(c<<8)+t[o]}if(c>i-o)return null;var f=o;for(o+=c;s>0&&0===t[u];s-=1,u+=1);if(s>32)return null;var l=t.slice(u,u+s);for(l.copy(r,32-l.length);c>0&&0===t[f];c-=1,f+=1);if(c>32)return null;var h=t.slice(f,f+c);return h.copy(n,32-h.length),{r:r,s:n}}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=void 0;var n=r(14);t.MAX_INTEGER=new n("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new n("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=e.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=e.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=e.from(t.KECCAK256_RLP_S,"hex")}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.importPublic=t.privateToPublic=t.privateToAddress=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.isPrecompiled=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isZeroAddress=t.isValidAddress=t.zeroAddress=void 0;var n=r(158),i=r(134),o=r(253),a=r(14),s=r(159),u=r(254);t.zeroAddress=function(){var e=s.zeros(20);return s.bufferToHex(e)},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===s.addHexPrefix(e)},t.toChecksumAddress=function(e,t){e=i.stripHexPrefix(e).toLowerCase();for(var r=void 0!==t?t.toString()+"0x":"",n=u.keccak(r+e).toString("hex"),o="0x",a=0;a<e.length;a++)parseInt(n[a],16)>=8?o+=e[a].toUpperCase():o+=e[a];return o},t.isValidChecksumAddress=function(e,r){return t.isValidAddress(e)&&t.toChecksumAddress(e,r)===e},t.generateAddress=function(t,r){t=s.toBuffer(t);var n=new a(r);return n.isZero()?u.rlphash([t,null]).slice(-20):u.rlphash([t,e.from(n.toArray())]).slice(-20)},t.generateAddress2=function(t,r,i){var o=s.toBuffer(t),a=s.toBuffer(r),c=s.toBuffer(i);return n(20===o.length),n(32===a.length),u.keccak256(e.concat([e.from("ff","hex"),o,a,u.keccak256(c)])).slice(-20)},t.isPrecompiled=function(e){var t=s.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},t.isValidPrivate=function(e){return o.privateKeyVerify(e)},t.isValidPublic=function(t,r){return void 0===r&&(r=!1),64===t.length?o.publicKeyVerify(e.concat([e.from([4]),t])):!!r&&o.publicKeyVerify(t)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),e=s.toBuffer(e),t&&64!==e.length&&(e=o.publicKeyConvert(e,!1).slice(1)),n(64===e.length),u.keccak(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToAddress=function(e){return t.publicToAddress(t.privateToPublic(e))},t.privateToPublic=function(e){return e=s.toBuffer(e),o.publicKeyCreate(e,!1).slice(1)},t.importPublic=function(e){return 64!==(e=s.toBuffer(e)).length&&(e=o.publicKeyConvert(e,!1).slice(1)),e}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var n=r(253),i=r(14),o=r(159),a=r(254);function s(e,t){return t?e-(2*t+35):e-27}function u(e){return 0===e||1===e}t.ecsign=function(e,t,r){var i=n.sign(e,t),o=i.recovery;return{r:i.signature.slice(0,32),s:i.signature.slice(32,64),v:r?o+(2*r+35):o+27}},t.ecrecover=function(t,r,i,a,c){var f=e.concat([o.setLength(i,32),o.setLength(a,32)],64),l=s(r,c);if(!u(l))throw new Error("Invalid signature v value");var h=n.recover(t,f,l);return n.publicKeyConvert(h,!1).slice(1)},t.toRpcSig=function(t,r,n,i){if(!u(s(t,i)))throw new Error("Invalid signature v value");return o.bufferToHex(e.concat([o.setLengthLeft(r,32),o.setLengthLeft(n,32),o.toBuffer(t)]))},t.fromRpcSig=function(e){var t=o.toBuffer(e);if(65!==t.length)throw new Error("Invalid signature length");var r=t[64];return r<27&&(r+=27),{v:r,r:t.slice(0,32),s:t.slice(32,64)}},t.isValidSignature=function(e,t,r,n,o){void 0===n&&(n=!0);var a=new i("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),c=new i("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!u(s(e,o)))return!1;var f=new i(t),l=new i(r);return!(f.isZero()||f.gt(c)||l.isZero()||l.gt(c))&&(!n||1!==l.cmp(a))},t.hashPersonalMessage=function(t){var r=e.from("\x19Ethereum Signed Message:\n"+t.length.toString(),"utf-8");return a.keccak(e.concat([r,t]))}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var n=r(158),i=r(134),o=r(191),a=r(159);t.defineProperties=function(t,r,s){if(t.raw=[],t._fields=[],t.toJSON=function(e){if(void 0===e&&(e=!1),e){var r={};return t._fields.forEach((function(e){r[e]="0x"+t[e].toString("hex")})),r}return a.baToJSON(t.raw)},t.serialize=function(){return o.encode(t.raw)},r.forEach((function(r,i){function o(){return t.raw[i]}function s(o){"00"!==(o=a.toBuffer(o)).toString("hex")||r.allowZero||(o=e.allocUnsafe(0)),r.allowLess&&r.length?(o=a.stripZeros(o),n(r.length>=o.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===o.length||!r.length||n(r.length===o.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[i]=o}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:o,set:s}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:s,get:o})})),s)if("string"===typeof s&&(s=e.from(i.stripHexPrefix(s),"hex")),e.isBuffer(s)&&(s=o.decode(s)),Array.isArray(s)){if(s.length>t._fields.length)throw new Error("wrong number of fields in data");s.forEach((function(e,r){t[t._fields[r]]=a.toBuffer(e)}))}else{if("object"!==typeof s)throw new Error("invalid data");var u=Object.keys(s);r.forEach((function(e){-1!==u.indexOf(e.name)&&(t[e.name]=s[e.name]),-1!==u.indexOf(e.alias)&&(t[e.alias]=s[e.alias])}))}}}).call(this,r(13).Buffer)},function(e,t,r){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var a=t(),s=t([1]),u=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),f=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function v(e,t,r,n,i){var o,a=0;for(o=0;o<i;o++)a|=e[t+o]^r[n+o];return(1&a-1>>>8)-1}function y(e,t,r,n){return v(e,t,r,n,16)}function b(e,t,r,n){return v(e,t,r,n,32)}function g(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,v=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,k=o,S=a,E=s,_=u,A=c,x=f,T=l,M=h,C=d,O=p,I=v,P=y,R=b,B=g,D=m,N=w,L=0;L<20;L+=2)k^=(i=(R^=(i=(C^=(i=(A^=(i=k+R|0)<<7|i>>>25)+k|0)<<9|i>>>23)+A|0)<<13|i>>>19)+C|0)<<18|i>>>14,x^=(i=(S^=(i=(B^=(i=(O^=(i=x+S|0)<<7|i>>>25)+x|0)<<9|i>>>23)+O|0)<<13|i>>>19)+B|0)<<18|i>>>14,I^=(i=(T^=(i=(E^=(i=(D^=(i=I+T|0)<<7|i>>>25)+I|0)<<9|i>>>23)+D|0)<<13|i>>>19)+E|0)<<18|i>>>14,N^=(i=(P^=(i=(M^=(i=(_^=(i=N+P|0)<<7|i>>>25)+N|0)<<9|i>>>23)+_|0)<<13|i>>>19)+M|0)<<18|i>>>14,k^=(i=(_^=(i=(E^=(i=(S^=(i=k+_|0)<<7|i>>>25)+k|0)<<9|i>>>23)+S|0)<<13|i>>>19)+E|0)<<18|i>>>14,x^=(i=(A^=(i=(M^=(i=(T^=(i=x+A|0)<<7|i>>>25)+x|0)<<9|i>>>23)+T|0)<<13|i>>>19)+M|0)<<18|i>>>14,I^=(i=(O^=(i=(C^=(i=(P^=(i=I+O|0)<<7|i>>>25)+I|0)<<9|i>>>23)+P|0)<<13|i>>>19)+C|0)<<18|i>>>14,N^=(i=(D^=(i=(B^=(i=(R^=(i=N+D|0)<<7|i>>>25)+N|0)<<9|i>>>23)+R|0)<<13|i>>>19)+B|0)<<18|i>>>14;k=k+o|0,S=S+a|0,E=E+s|0,_=_+u|0,A=A+c|0,x=x+f|0,T=T+l|0,M=M+h|0,C=C+d|0,O=O+p|0,I=I+v|0,P=P+y|0,R=R+b|0,B=B+g|0,D=D+m|0,N=N+w|0,e[0]=k>>>0&255,e[1]=k>>>8&255,e[2]=k>>>16&255,e[3]=k>>>24&255,e[4]=S>>>0&255,e[5]=S>>>8&255,e[6]=S>>>16&255,e[7]=S>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=_>>>0&255,e[13]=_>>>8&255,e[14]=_>>>16&255,e[15]=_>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=x>>>0&255,e[21]=x>>>8&255,e[22]=x>>>16&255,e[23]=x>>>24&255,e[24]=T>>>0&255,e[25]=T>>>8&255,e[26]=T>>>16&255,e[27]=T>>>24&255,e[28]=M>>>0&255,e[29]=M>>>8&255,e[30]=M>>>16&255,e[31]=M>>>24&255,e[32]=C>>>0&255,e[33]=C>>>8&255,e[34]=C>>>16&255,e[35]=C>>>24&255,e[36]=O>>>0&255,e[37]=O>>>8&255,e[38]=O>>>16&255,e[39]=O>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=P>>>0&255,e[45]=P>>>8&255,e[46]=P>>>16&255,e[47]=P>>>24&255,e[48]=R>>>0&255,e[49]=R>>>8&255,e[50]=R>>>16&255,e[51]=R>>>24&255,e[52]=B>>>0&255,e[53]=B>>>8&255,e[54]=B>>>16&255,e[55]=B>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=N>>>0&255,e[61]=N>>>8&255,e[62]=N>>>16&255,e[63]=N>>>24&255}(e,t,r,n)}function m(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,v=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,k=0;k<20;k+=2)o^=(i=(b^=(i=(d^=(i=(c^=(i=o+b|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,f^=(i=(a^=(i=(g^=(i=(p^=(i=f+a|0)<<7|i>>>25)+f|0)<<9|i>>>23)+p|0)<<13|i>>>19)+g|0)<<18|i>>>14,v^=(i=(l^=(i=(s^=(i=(m^=(i=v+l|0)<<7|i>>>25)+v|0)<<9|i>>>23)+m|0)<<13|i>>>19)+s|0)<<18|i>>>14,w^=(i=(y^=(i=(h^=(i=(u^=(i=w+y|0)<<7|i>>>25)+w|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(u^=(i=(s^=(i=(a^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,f^=(i=(c^=(i=(h^=(i=(l^=(i=f+c|0)<<7|i>>>25)+f|0)<<9|i>>>23)+l|0)<<13|i>>>19)+h|0)<<18|i>>>14,v^=(i=(p^=(i=(d^=(i=(y^=(i=v+p|0)<<7|i>>>25)+v|0)<<9|i>>>23)+y|0)<<13|i>>>19)+d|0)<<18|i>>>14,w^=(i=(m^=(i=(g^=(i=(b^=(i=w+m|0)<<7|i>>>25)+w|0)<<9|i>>>23)+b|0)<<13|i>>>19)+g|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=f>>>0&255,e[5]=f>>>8&255,e[6]=f>>>16&255,e[7]=f>>>24&255,e[8]=v>>>0&255,e[9]=v>>>8&255,e[10]=v>>>16&255,e[11]=v>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(e,t,r,n,i,o,a){var s,u,c=new Uint8Array(16),f=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(g(f,c,a,w),u=0;u<64;u++)e[t+u]=r[n+u]^f[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;i-=64,t+=64,n+=64}if(i>0)for(g(f,c,a,w),u=0;u<i;u++)e[t+u]=r[n+u]^f[u];return 0}function S(e,t,r,n,i){var o,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(g(u,s,i,w),a=0;a<64;a++)e[t+a]=u[a];for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(g(u,s,i,w),a=0;a<r;a++)e[t+a]=u[a];return 0}function E(e,t,r,n,i){var o=new Uint8Array(32);m(o,n,i,w);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return S(e,t,r,a,o)}function _(e,t,r,n,i,o,a){var s=new Uint8Array(32);m(s,o,a,w);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=o[c+16];return k(e,t,r,n,i,u,s)}var A=function(e){var t,r,n,i,o,a,s,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function x(e,t,r,n,i,o){var a=new A(o);return a.update(r,n,i),a.finish(e,t),0}function T(e,t,r,n,i,o){var a=new Uint8Array(16);return x(a,0,r,n,i,o),y(e,t,a,0)}function M(e,t,r,n,i){var o;if(r<32)return-1;for(_(e,0,t,0,r,n,i),x(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function C(e,t,r,n,i){var o,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,i),0!==T(t,16,t,32,r-32,a))return-1;for(_(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function O(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function I(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function P(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function R(e,r){var n,i,o,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(I(s),I(s),I(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,P(s,a,1-o)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function B(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return R(r,e),R(n,t),b(r,0,n,0)}function D(e){var t=new Uint8Array(32);return R(t,e),1&t[0]}function N(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function j(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,i,o=0,a=0,s=0,u=0,c=0,f=0,l=0,h=0,d=0,p=0,v=0,y=0,b=0,g=0,m=0,w=0,k=0,S=0,E=0,_=0,A=0,x=0,T=0,M=0,C=0,O=0,I=0,P=0,R=0,B=0,D=0,N=r[0],L=r[1],j=r[2],U=r[3],F=r[4],K=r[5],z=r[6],V=r[7],H=r[8],J=r[9],q=r[10],G=r[11],X=r[12],W=r[13],Z=r[14],Y=r[15];o+=(n=t[0])*N,a+=n*L,s+=n*j,u+=n*U,c+=n*F,f+=n*K,l+=n*z,h+=n*V,d+=n*H,p+=n*J,v+=n*q,y+=n*G,b+=n*X,g+=n*W,m+=n*Z,w+=n*Y,a+=(n=t[1])*N,s+=n*L,u+=n*j,c+=n*U,f+=n*F,l+=n*K,h+=n*z,d+=n*V,p+=n*H,v+=n*J,y+=n*q,b+=n*G,g+=n*X,m+=n*W,w+=n*Z,k+=n*Y,s+=(n=t[2])*N,u+=n*L,c+=n*j,f+=n*U,l+=n*F,h+=n*K,d+=n*z,p+=n*V,v+=n*H,y+=n*J,b+=n*q,g+=n*G,m+=n*X,w+=n*W,k+=n*Z,S+=n*Y,u+=(n=t[3])*N,c+=n*L,f+=n*j,l+=n*U,h+=n*F,d+=n*K,p+=n*z,v+=n*V,y+=n*H,b+=n*J,g+=n*q,m+=n*G,w+=n*X,k+=n*W,S+=n*Z,E+=n*Y,c+=(n=t[4])*N,f+=n*L,l+=n*j,h+=n*U,d+=n*F,p+=n*K,v+=n*z,y+=n*V,b+=n*H,g+=n*J,m+=n*q,w+=n*G,k+=n*X,S+=n*W,E+=n*Z,_+=n*Y,f+=(n=t[5])*N,l+=n*L,h+=n*j,d+=n*U,p+=n*F,v+=n*K,y+=n*z,b+=n*V,g+=n*H,m+=n*J,w+=n*q,k+=n*G,S+=n*X,E+=n*W,_+=n*Z,A+=n*Y,l+=(n=t[6])*N,h+=n*L,d+=n*j,p+=n*U,v+=n*F,y+=n*K,b+=n*z,g+=n*V,m+=n*H,w+=n*J,k+=n*q,S+=n*G,E+=n*X,_+=n*W,A+=n*Z,x+=n*Y,h+=(n=t[7])*N,d+=n*L,p+=n*j,v+=n*U,y+=n*F,b+=n*K,g+=n*z,m+=n*V,w+=n*H,k+=n*J,S+=n*q,E+=n*G,_+=n*X,A+=n*W,x+=n*Z,T+=n*Y,d+=(n=t[8])*N,p+=n*L,v+=n*j,y+=n*U,b+=n*F,g+=n*K,m+=n*z,w+=n*V,k+=n*H,S+=n*J,E+=n*q,_+=n*G,A+=n*X,x+=n*W,T+=n*Z,M+=n*Y,p+=(n=t[9])*N,v+=n*L,y+=n*j,b+=n*U,g+=n*F,m+=n*K,w+=n*z,k+=n*V,S+=n*H,E+=n*J,_+=n*q,A+=n*G,x+=n*X,T+=n*W,M+=n*Z,C+=n*Y,v+=(n=t[10])*N,y+=n*L,b+=n*j,g+=n*U,m+=n*F,w+=n*K,k+=n*z,S+=n*V,E+=n*H,_+=n*J,A+=n*q,x+=n*G,T+=n*X,M+=n*W,C+=n*Z,O+=n*Y,y+=(n=t[11])*N,b+=n*L,g+=n*j,m+=n*U,w+=n*F,k+=n*K,S+=n*z,E+=n*V,_+=n*H,A+=n*J,x+=n*q,T+=n*G,M+=n*X,C+=n*W,O+=n*Z,I+=n*Y,b+=(n=t[12])*N,g+=n*L,m+=n*j,w+=n*U,k+=n*F,S+=n*K,E+=n*z,_+=n*V,A+=n*H,x+=n*J,T+=n*q,M+=n*G,C+=n*X,O+=n*W,I+=n*Z,P+=n*Y,g+=(n=t[13])*N,m+=n*L,w+=n*j,k+=n*U,S+=n*F,E+=n*K,_+=n*z,A+=n*V,x+=n*H,T+=n*J,M+=n*q,C+=n*G,O+=n*X,I+=n*W,P+=n*Z,R+=n*Y,m+=(n=t[14])*N,w+=n*L,k+=n*j,S+=n*U,E+=n*F,_+=n*K,A+=n*z,x+=n*V,T+=n*H,M+=n*J,C+=n*q,O+=n*G,I+=n*X,P+=n*W,R+=n*Z,B+=n*Y,w+=(n=t[15])*N,a+=38*(S+=n*j),s+=38*(E+=n*U),u+=38*(_+=n*F),c+=38*(A+=n*K),f+=38*(x+=n*z),l+=38*(T+=n*V),h+=38*(M+=n*H),d+=38*(C+=n*J),p+=38*(O+=n*q),v+=38*(I+=n*G),y+=38*(P+=n*X),b+=38*(R+=n*W),g+=38*(B+=n*Z),m+=38*(D+=n*Y),o=(n=(o+=38*(k+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=f,e[6]=l,e[7]=h,e[8]=d,e[9]=p,e[10]=v,e[11]=y,e[12]=b,e[13]=g,e[14]=m,e[15]=w}function F(e,t){U(e,t,t)}function K(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&U(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)F(i,i),1!==n&&U(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function V(e,r,n){var i,o,a=new Uint8Array(32),s=new Float64Array(80),c=t(),f=t(),l=t(),h=t(),d=t(),p=t();for(o=0;o<31;o++)a[o]=r[o];for(a[31]=127&r[31]|64,a[0]&=248,N(s,n),o=0;o<16;o++)f[o]=s[o],h[o]=c[o]=l[o]=0;for(c[0]=h[0]=1,o=254;o>=0;--o)P(c,f,i=a[o>>>3]>>>(7&o)&1),P(l,h,i),L(d,c,l),j(c,c,l),L(l,f,h),j(f,f,h),F(h,d),F(p,c),U(c,l,c),U(l,f,d),L(d,c,l),j(c,c,l),F(f,c),j(l,h,p),U(c,l,u),L(c,c,h),U(l,l,c),U(c,h,p),U(h,f,s),F(f,d),P(c,f,i),P(l,h,i);for(o=0;o<16;o++)s[o+16]=c[o],s[o+32]=l[o],s[o+48]=f[o],s[o+64]=h[o];var v=s.subarray(32),y=s.subarray(16);return K(v,v),U(y,y,v),R(e,y),0}function H(e,t){return V(e,t,o)}function J(e,t){return n(t,32),H(e,t)}function q(e,t,r){var n=new Uint8Array(32);return V(n,r,t),m(e,i,n,w)}A.prototype.blocks=function(e,t,r){for(var n,i,o,a,s,u,c,f,l,h,d,p,v,y,b,g,m,w,k,S=this.fin?0:2048,E=this.h[0],_=this.h[1],A=this.h[2],x=this.h[3],T=this.h[4],M=this.h[5],C=this.h[6],O=this.h[7],I=this.h[8],P=this.h[9],R=this.r[0],B=this.r[1],D=this.r[2],N=this.r[3],L=this.r[4],j=this.r[5],U=this.r[6],F=this.r[7],K=this.r[8],z=this.r[9];r>=16;)h=l=0,h+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*R,h+=(_+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*z),h+=(A+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*K),h+=(x+=8191&(o>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),l=(h+=(T+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,h&=8191,h+=(M+=s>>>1&8191)*(5*j),h+=(C+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*L),h+=(O+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*N),h+=(I+=8191&(c>>>8|(f=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*D),d=l+=(h+=(P+=f>>>5|S)*(5*B))>>>13,d+=E*B,d+=_*R,d+=A*(5*z),d+=x*(5*K),l=(d+=T*(5*F))>>>13,d&=8191,d+=M*(5*U),d+=C*(5*j),d+=O*(5*L),d+=I*(5*N),l+=(d+=P*(5*D))>>>13,d&=8191,p=l,p+=E*D,p+=_*B,p+=A*R,p+=x*(5*z),l=(p+=T*(5*K))>>>13,p&=8191,p+=M*(5*F),p+=C*(5*U),p+=O*(5*j),p+=I*(5*L),v=l+=(p+=P*(5*N))>>>13,v+=E*N,v+=_*D,v+=A*B,v+=x*R,l=(v+=T*(5*z))>>>13,v&=8191,v+=M*(5*K),v+=C*(5*F),v+=O*(5*U),v+=I*(5*j),y=l+=(v+=P*(5*L))>>>13,y+=E*L,y+=_*N,y+=A*D,y+=x*B,l=(y+=T*R)>>>13,y&=8191,y+=M*(5*z),y+=C*(5*K),y+=O*(5*F),y+=I*(5*U),b=l+=(y+=P*(5*j))>>>13,b+=E*j,b+=_*L,b+=A*N,b+=x*D,l=(b+=T*B)>>>13,b&=8191,b+=M*R,b+=C*(5*z),b+=O*(5*K),b+=I*(5*F),g=l+=(b+=P*(5*U))>>>13,g+=E*U,g+=_*j,g+=A*L,g+=x*N,l=(g+=T*D)>>>13,g&=8191,g+=M*B,g+=C*R,g+=O*(5*z),g+=I*(5*K),m=l+=(g+=P*(5*F))>>>13,m+=E*F,m+=_*U,m+=A*j,m+=x*L,l=(m+=T*N)>>>13,m&=8191,m+=M*D,m+=C*B,m+=O*R,m+=I*(5*z),w=l+=(m+=P*(5*K))>>>13,w+=E*K,w+=_*F,w+=A*U,w+=x*j,l=(w+=T*L)>>>13,w&=8191,w+=M*N,w+=C*D,w+=O*B,w+=I*R,k=l+=(w+=P*(5*z))>>>13,k+=E*z,k+=_*K,k+=A*F,k+=x*U,l=(k+=T*j)>>>13,k&=8191,k+=M*L,k+=C*N,k+=O*D,k+=I*B,E=h=8191&(l=(l=((l+=(k+=P*R)>>>13)<<2)+l|0)+(h&=8191)|0),_=d+=l>>>=13,A=p&=8191,x=v&=8191,T=y&=8191,M=b&=8191,C=g&=8191,O=m&=8191,I=w&=8191,P=k&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=_,this.h[2]=A,this.h[3]=x,this.h[4]=T,this.h[5]=M,this.h[6]=C,this.h[7]=O,this.h[8]=I,this.h[9]=P},A.prototype.finish=function(e,t){var r,n,i,o,a=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},A.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var G=M,X=C;var W=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Z(e,t,r,n){for(var i,o,a,s,u,c,f,l,h,d,p,v,y,b,g,m,w,k,S,E,_,A,x,T,M,C,O=new Int32Array(16),I=new Int32Array(16),P=e[0],R=e[1],B=e[2],D=e[3],N=e[4],L=e[5],j=e[6],U=e[7],F=t[0],K=t[1],z=t[2],V=t[3],H=t[4],J=t[5],q=t[6],G=t[7],X=0;n>=128;){for(S=0;S<16;S++)E=8*S+X,O[S]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],I[S]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(S=0;S<80;S++)if(i=P,o=R,a=B,s=D,u=N,c=L,f=j,U,h=F,d=K,p=z,v=V,y=H,b=J,g=q,G,x=65535&(A=G),T=A>>>16,M=65535&(_=U),C=_>>>16,x+=65535&(A=(H>>>14|N<<18)^(H>>>18|N<<14)^(N>>>9|H<<23)),T+=A>>>16,M+=65535&(_=(N>>>14|H<<18)^(N>>>18|H<<14)^(H>>>9|N<<23)),C+=_>>>16,x+=65535&(A=H&J^~H&q),T+=A>>>16,M+=65535&(_=N&L^~N&j),C+=_>>>16,x+=65535&(A=W[2*S+1]),T+=A>>>16,M+=65535&(_=W[2*S]),C+=_>>>16,_=O[S%16],T+=(A=I[S%16])>>>16,M+=65535&_,C+=_>>>16,M+=(T+=(x+=65535&A)>>>16)>>>16,x=65535&(A=k=65535&x|T<<16),T=A>>>16,M=65535&(_=w=65535&M|(C+=M>>>16)<<16),C=_>>>16,x+=65535&(A=(F>>>28|P<<4)^(P>>>2|F<<30)^(P>>>7|F<<25)),T+=A>>>16,M+=65535&(_=(P>>>28|F<<4)^(F>>>2|P<<30)^(F>>>7|P<<25)),C+=_>>>16,T+=(A=F&K^F&z^K&z)>>>16,M+=65535&(_=P&R^P&B^R&B),C+=_>>>16,l=65535&(M+=(T+=(x+=65535&A)>>>16)>>>16)|(C+=M>>>16)<<16,m=65535&x|T<<16,x=65535&(A=v),T=A>>>16,M=65535&(_=s),C=_>>>16,T+=(A=k)>>>16,M+=65535&(_=w),C+=_>>>16,R=i,B=o,D=a,N=s=65535&(M+=(T+=(x+=65535&A)>>>16)>>>16)|(C+=M>>>16)<<16,L=u,j=c,U=f,P=l,K=h,z=d,V=p,H=v=65535&x|T<<16,J=y,q=b,G=g,F=m,S%16===15)for(E=0;E<16;E++)_=O[E],x=65535&(A=I[E]),T=A>>>16,M=65535&_,C=_>>>16,_=O[(E+9)%16],x+=65535&(A=I[(E+9)%16]),T+=A>>>16,M+=65535&_,C+=_>>>16,w=O[(E+1)%16],x+=65535&(A=((k=I[(E+1)%16])>>>1|w<<31)^(k>>>8|w<<24)^(k>>>7|w<<25)),T+=A>>>16,M+=65535&(_=(w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7),C+=_>>>16,w=O[(E+14)%16],T+=(A=((k=I[(E+14)%16])>>>19|w<<13)^(w>>>29|k<<3)^(k>>>6|w<<26))>>>16,M+=65535&(_=(w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6),C+=_>>>16,C+=(M+=(T+=(x+=65535&A)>>>16)>>>16)>>>16,O[E]=65535&M|C<<16,I[E]=65535&x|T<<16;x=65535&(A=F),T=A>>>16,M=65535&(_=P),C=_>>>16,_=e[0],T+=(A=t[0])>>>16,M+=65535&_,C+=_>>>16,C+=(M+=(T+=(x+=65535&A)>>>16)>>>16)>>>16,e[0]=P=65535&M|C<<16,t[0]=F=65535&x|T<<16,x=65535&(A=K),T=A>>>16,M=65535&(_=R),C=_>>>16,_=e[1],T+=(A=t[1])>>>16,M+=65535&_,C+=_>>>16,C+=(M+=(T+=(x+=65535&A)>>>16)>>>16)>>>16,e[1]=R=65535&M|C<<16,t[1]=K=65535&x|T<<16,x=65535&(A=z),T=A>>>16,M=65535&(_=B),C=_>>>16,_=e[2],T+=(A=t[2])>>>16,M+=65535&_,C+=_>>>16,C+=(M+=(T+=(x+=65535&A)>>>16)>>>16)>>>16,e[2]=B=65535&M|C<<16,t[2]=z=65535&x|T<<16,x=65535&(A=V),T=A>>>16,M=65535&(_=D),C=_>>>16,_=e[3],T+=(A=t[3])>>>16,M+=65535&_,C+=_>>>16,C+=(M+=(T+=(x+=65535&A)>>>16)>>>16)>>>16,e[3]=D=65535&M|C<<16,t[3]=V=65535&x|T<<16,x=65535&(A=H),T=A>>>16,M=65535&(_=N),C=_>>>16,_=e[4],T+=(A=t[4])>>>16,M+=65535&_,C+=_>>>16,C+=(M+=(T+=(x+=65535&A)>>>16)>>>16)>>>16,e[4]=N=65535&M|C<<16,t[4]=H=65535&x|T<<16,x=65535&(A=J),T=A>>>16,M=65535&(_=L),C=_>>>16,_=e[5],T+=(A=t[5])>>>16,M+=65535&_,C+=_>>>16,C+=(M+=(T+=(x+=65535&A)>>>16)>>>16)>>>16,e[5]=L=65535&M|C<<16,t[5]=J=65535&x|T<<16,x=65535&(A=q),T=A>>>16,M=65535&(_=j),C=_>>>16,_=e[6],T+=(A=t[6])>>>16,M+=65535&_,C+=_>>>16,C+=(M+=(T+=(x+=65535&A)>>>16)>>>16)>>>16,e[6]=j=65535&M|C<<16,t[6]=q=65535&x|T<<16,x=65535&(A=G),T=A>>>16,M=65535&(_=U),C=_>>>16,_=e[7],T+=(A=t[7])>>>16,M+=65535&_,C+=_>>>16,C+=(M+=(T+=(x+=65535&A)>>>16)>>>16)>>>16,e[7]=U=65535&M|C<<16,t[7]=G=65535&x|T<<16,X+=128,n-=128}return n}function Y(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Z(i,o,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,p(a,r-8,s/536870912|0,s<<3),Z(i,o,a,r),n=0;n<8;n++)p(e,8*n,i[n],o[n]);return 0}function Q(e,r){var n=t(),i=t(),o=t(),a=t(),s=t(),u=t(),c=t(),l=t(),h=t();j(n,e[1],e[0]),j(h,r[1],r[0]),U(n,n,h),L(i,e[0],e[1]),L(h,r[0],r[1]),U(i,i,h),U(o,e[3],r[3]),U(o,o,f),U(a,e[2],r[2]),L(a,a,a),j(s,i,n),j(u,a,o),L(c,a,o),L(l,i,n),U(e[0],s,u),U(e[1],l,c),U(e[2],c,u),U(e[3],s,l)}function $(e,t,r){var n;for(n=0;n<4;n++)P(e[n],t[n],r)}function ee(e,r){var n=t(),i=t(),o=t();K(o,r[2]),U(n,r[0],o),U(i,r[1],o),R(e,i),e[31]^=D(n)<<7}function te(e,t,r){var n,i;for(O(e[0],a),O(e[1],s),O(e[2],s),O(e[3],a),i=255;i>=0;--i)$(e,t,n=r[i/8|0]>>(7&i)&1),Q(t,e),Q(e,e),$(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];O(n[0],l),O(n[1],h),O(n[2],s),U(n[3],l,h),te(e,n,r)}function ne(e,r,i){var o,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(i||n(r,32),Y(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),o=0;o<32;o++)r[o+32]=e[o];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*ie[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ae(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function se(e,r,n,i){var o,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),f=new Float64Array(64),l=[t(),t(),t(),t()];Y(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;var h=n+64;for(o=0;o<n;o++)e[64+o]=r[o];for(o=0;o<32;o++)e[32+o]=s[32+o];for(Y(c,e.subarray(32),n+32),ae(c),re(l,c),ee(e,l),o=32;o<64;o++)e[o]=i[o];for(Y(u,e,n+64),ae(u),o=0;o<64;o++)f[o]=0;for(o=0;o<32;o++)f[o]=c[o];for(o=0;o<32;o++)for(a=0;a<32;a++)f[o+a]+=u[o]*s[a];return oe(e.subarray(32),f),h}function ue(e,r,n,i){var o,u=new Uint8Array(32),f=new Uint8Array(64),l=[t(),t(),t(),t()],h=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),i=t(),o=t(),u=t(),f=t(),l=t(),h=t();return O(e[2],s),N(e[1],r),F(o,e[1]),U(u,o,c),j(o,o,e[2]),L(u,e[2],u),F(f,u),F(l,f),U(h,l,f),U(n,h,o),U(n,n,u),z(n,n),U(n,n,o),U(n,n,u),U(n,n,u),U(e[0],n,u),F(i,e[0]),U(i,i,u),B(i,o)&&U(e[0],e[0],d),F(i,e[0]),U(i,i,u),B(i,o)?-1:(D(e[0])===r[31]>>7&&j(e[0],a,e[0]),U(e[3],e[0],e[1]),0)}(h,i))return-1;for(o=0;o<n;o++)e[o]=r[o];for(o=0;o<32;o++)e[o+32]=i[o];if(Y(f,e,n),ae(f),te(l,h,f),re(h,r.subarray(32)),Q(l,h),ee(u,l),n-=64,b(r,0,u,0)){for(o=0;o<n;o++)e[o]=0;return-1}for(o=0;o<n;o++)e[o]=r[o+64];return n}var ce=16,fe=64,le=32,he=64;function de(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function pe(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function ve(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:m,crypto_stream_xor:_,crypto_stream:E,crypto_stream_salsa20_xor:k,crypto_stream_salsa20:S,crypto_onetimeauth:x,crypto_onetimeauth_verify:T,crypto_verify_16:y,crypto_verify_32:b,crypto_secretbox:M,crypto_secretbox_open:C,crypto_scalarmult:V,crypto_scalarmult_base:H,crypto_box_beforenm:q,crypto_box_afternm:G,crypto_box:function(e,t,r,n,i,o){var a=new Uint8Array(32);return q(a,i,o),G(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,i,o){var a=new Uint8Array(32);return q(a,i,o),X(e,t,r,n,a)},crypto_box_keypair:J,crypto_hash:Y,crypto_sign:se,crypto_sign_keypair:ne,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:ce,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:fe,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:he,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:ie,pack25519:R,unpack25519:N,M:U,A:L,S:F,Z:j,pow2523:z,add:Q,set25519:O,modL:oe,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){pe(e,t,r),de(r,t);for(var n=new Uint8Array(32+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o];return M(i,n,n.length,t,r),i.subarray(ce)},e.secretbox.open=function(e,t,r){pe(e,t,r),de(r,t);for(var n=new Uint8Array(ce+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+ce]=e[o];return n.length<32||0!==C(i,n,n.length,t,r)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=ce,e.scalarMult=function(e,t){if(pe(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return V(r,e,t),r},e.scalarMult.base=function(e){if(pe(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox(t,r,o)},e.box.before=function(e,t){pe(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return q(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return J(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(pe(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(pe(e,t),t.length!==he)throw new Error("bad secret key size");var r=new Uint8Array(fe+e.length);return se(r,e,e.length,t),r},e.sign.open=function(e,t){if(pe(e,t),t.length!==le)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ue(r,e,e.length,t);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},e.sign.detached=function(t,r){for(var n=e.sign(t,r),i=new Uint8Array(fe),o=0;o<i.length;o++)i[o]=n[o];return i},e.sign.detached.verify=function(e,t,r){if(pe(e,t,r),t.length!==fe)throw new Error("bad signature size");if(r.length!==le)throw new Error("bad public key size");var n,i=new Uint8Array(fe+e.length),o=new Uint8Array(fe+e.length);for(n=0;n<fe;n++)i[n]=t[n];for(n=0;n<e.length;n++)i[n+fe]=e[n];return ue(o,i,i.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(he);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==he)throw new Error("bad secret key size");for(var t=new Uint8Array(le),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(pe(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),r=new Uint8Array(he),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=he,e.sign.seedLength=32,e.sign.signatureLength=fe,e.hash=function(e){pe(e);var t=new Uint8Array(64);return Y(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return pe(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===v(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!==typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=i[n];ve(i)}))}else(t=r(623))&&t.randomBytes&&e.setPRNG((function(e,r){var n,i=t.randomBytes(r);for(n=0;n<r;n++)e[n]=i[n];ve(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},,function(e,t,r){(function(t){!function(t,r){"use strict";e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())}(this,(function(){"use strict";var e={};function r(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!==typeof e)throw new TypeError("expected string");var t,r=unescape(encodeURIComponent(e)),n=new Uint8Array(r.length);for(t=0;t<r.length;t++)n[t]=r.charCodeAt(t);return n},e.encodeUTF8=function(e){var t,r=[];for(t=0;t<e.length;t++)r.push(String.fromCharCode(e[t]));return decodeURIComponent(escape(r.join("")))},"undefined"===typeof atob?"undefined"!==typeof t.from?(e.encodeBase64=function(e){return t.from(e).toString("base64")},e.decodeBase64=function(e){return r(e),new Uint8Array(Array.prototype.slice.call(t.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new t(e).toString("base64")},e.decodeBase64=function(e){return r(e),new Uint8Array(Array.prototype.slice.call(new t(e,"base64"),0))}):(e.encodeBase64=function(e){var t,r=[],n=e.length;for(t=0;t<n;t++)r.push(String.fromCharCode(e[t]));return btoa(r.join(""))},e.decodeBase64=function(e){r(e);var t,n=atob(e),i=new Uint8Array(n.length);for(t=0;t<n.length;t++)i[t]=n.charCodeAt(t);return i}),e}))}).call(this,r(13).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGossipRpc=void 0,t.createGossipRpc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{subscriptions:[],msgs:e,control:Object.assign({ihave:[],iwant:[],graft:[],prune:[]},t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shuffle=void 0,t.shuffle=function(e){if(e.length<=1)return e;for(var t=0;t<e.length;t++){var r=Math.floor(Math.random()*Math.floor(e.length)),n=e[t];e[t]=e[r],e[r]=n}return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasGossipProtocol=void 0;var n=r(135);t.hasGossipProtocol=function(e){return e===n.GossipsubIDv10||e===n.GossipsubIDv11}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.messageIdToString=void 0;var n=r(85);t.messageIdToString=function(e){return n.toString(e,"base64")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87),i=r(99),o=n.from({prefix:"\0",name:"identity",encode:function(e){return i.toString(e)},decode:function(e){return i.fromString(e)}});t.identity=o},function(e,t,r){"use strict";var n=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),a=o.charCodeAt(0);if(255!==r[a])throw new TypeError(o+" is ambiguous");r[a]=i}var s=e.length,u=e.charAt(0),c=Math.log(s)/Math.log(256),f=Math.log(256)/Math.log(s);function l(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===u;)n++,t++;for(var o=(e.length-t)*c+1>>>0,a=new Uint8Array(o);e[t];){var f=r[e.charCodeAt(t)];if(255===f)return;for(var l=0,h=o-1;(0!==f||l<i)&&-1!==h;h--,l++)f+=s*a[h]>>>0,a[h]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");i=l,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===a[d];)d++;for(var p=new Uint8Array(n+(o-d)),v=n;d!==o;)p[v++]=a[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var a=(o-i)*f+1>>>0,c=new Uint8Array(a);i!==o;){for(var l=t[i],h=0,d=a-1;(0!==l||h<n)&&-1!==d;d--,h++)l+=256*c[d]>>>0,c[d]=l%s>>>0,l=l/s>>>0;if(0!==l)throw new Error("Non-zero carry");n=h,i++}for(var p=a-n;p!==a&&0===c[p];)p++;for(var v=u.repeat(r);p<a;++p)v+=e.charAt(c[p]);return v},decodeUnsafe:l,decode:function(e){var r=l(e);if(r)return r;throw new Error("Non-".concat(t," character"))}}};e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87).rfc4648({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});t.base2=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87).rfc4648({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});t.base8=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87).baseX({prefix:"9",name:"base10",alphabet:"0123456789"});t.base10=n},function(e,t,r){"use strict";var n=function e(t,r,n){r=r||[];var o=n=n||0;for(;t>=i;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-o+1,r},i=Math.pow(2,31);var o=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=a-r,i};var a=Math.pow(2,7),s=Math.pow(2,14),u=Math.pow(2,21),c=Math.pow(2,28),f=Math.pow(2,35),l=Math.pow(2,42),h=Math.pow(2,49),d=Math.pow(2,56),p=Math.pow(2,63),v={encode:n,decode:o,encodingLength:function(e){return e<a?1:e<s?2:e<u?3:e<c?4:e<f?5:e<l?6:e<h?7:e<d?8:e<p?9:10}};e.exports=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(99),i=function(e){return n.coerce(e)},o="raw",a=85,s=i,u=i;t.code=a,t.decode=u,t.encode=s,t.name=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="json",i=512,o=function(e){return(new TextEncoder).encode(JSON.stringify(e))},a=function(e){return JSON.parse((new TextDecoder).decode(e))};t.code=i,t.decode=a,t.encode=o,t.name=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(90),i=r(193),o=r(99),a=r(192),s=r(88);t.CID=n.CID,t.varint=i,t.bytes=o,t.hasher=a,t.digest=s},,function(e,t,r){e.exports=r(640)},function(e,t,r){"use strict";var n=r(64),i=r(367),o=r(641),a=r(373);function s(e){var t=new o(e),r=i(o.prototype.request,t);return n.extend(r,o.prototype,t),n.extend(r,t),r}var u=s(r(255));u.Axios=o,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=r(374),u.CancelToken=r(655),u.isCancel=r(372),u.all=function(e){return Promise.all(e)},u.spread=r(656),u.isAxiosError=r(657),e.exports=u,e.exports.default=u},function(e,t,r){"use strict";var n=r(64),i=r(368),o=r(642),a=r(643),s=r(373),u=r(653),c=u.validators;function f(e){this.defaults=e,this.interceptors={request:new o,response:new o}}f.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!n){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f.concat(o),i=Promise.resolve(e);f.length;)i=i.then(f.shift(),f.shift());return i}for(var l=e;r.length;){var h=r.shift(),d=r.shift();try{l=h(l)}catch(p){d(p);break}}try{i=a(l)}catch(p){return Promise.reject(p)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},f.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){f.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=f},function(e,t,r){"use strict";var n=r(64);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,r){"use strict";var n=r(64),i=r(644),o=r(372),a=r(255);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(64),i=r(255);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},function(e,t,r){"use strict";var n=r(64);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},function(e,t,r){"use strict";var n=r(371);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";var n=r(64);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(649),i=r(650);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(64),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},function(e,t,r){"use strict";var n=r(64);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(654),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var o={},a=n.version.split(".");function s(e,t){for(var r=t?t.split("."):a,n=e.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}i.transitional=function(e,t,r){var i=t&&s(t);function a(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new Error(a(n," has been removed in "+t));return i&&!o[n]&&(o[n]=!0,console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,r){if("object"!==typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},function(e){e.exports=JSON.parse('{"name":"axios","version":"0.21.2","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},function(e,t,r){"use strict";var n=r(374);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},function(e,t,r){var n=r(48);e.exports=function(e){function t(e){var r,n,o,a=null;function s(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(s.enabled){var o=s,a=Number(new Date),u=a-(r||a);o.diff=u,o.prev=r,o.curr=a,r=a,n[0]=t.coerce(n[0]),"string"!==typeof n[0]&&n.unshift("%O");var c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";c++;var i=t.formatters[r];if("function"===typeof i){var a=n[c];e=i.call(o,a),n.splice(c,1),c--}return e})),t.formatArgs.call(o,n);var f=o.log||t.log;f.apply(o,n)}}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(n!==t.namespaces&&(n=t.namespaces,o=t.enabled(e)),o)},set:function(e){a=e}}),"function"===typeof t.init&&t.init(s),s}function i(e,r){var n=t(this.namespace+("undefined"===typeof r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(n(t.names.map(o)),n(t.skips.map(o).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var n=("string"===typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(376),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(r){t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},function(e,t,r){var n=r(337);e.exports=function(e){if(Array.isArray(e))return n(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){"use strict";var n=r(377),i=r(195),o=r(91),a=r(380).concat,s=r(194).toString;function u(e){var t=[],r=e.split("/").slice(1);if(1===r.length&&""===r[0])return[];for(var n=0;n<r.length;n++){var o=r[n],a=i(o);if(0!==a.size){if(++n>=r.length)throw m("invalid address: "+e);if(a.path){t.push([o,g(r.slice(n).join("/"))]);break}t.push([o,r[n]])}else t.push([o])}return t}function c(e){var t=[];return e.map((function(e){var r=w(e);return t.push(r.name),e.length>1&&t.push(e[1]),null})),g(t.join("/"))}function f(e){return e.map((function(e){Array.isArray(e)||(e=[e]);var t=w(e);return e.length>1?[t.code,n.toBytes(t.code,e[1])]:[t.code]}))}function l(e){return e.map((function(e){var t=w(e);return e[1]?[t.code,n.toString(t.code,e[1])]:[t.code]}))}function h(e){return y(a(e.map((function(e){var t=w(e),r=Uint8Array.from(o.encode(t.code));return e.length>1&&(r=a([r,e[1]])),r}))))}function d(e,t){return e.size>0?e.size/8:0===e.size?0:o.decode(t)+o.decode.bytes}function p(e){for(var t=[],r=0;r<e.length;){var n=o.decode(e,r),a=o.decode.bytes,u=d(i(n),e.slice(r+a));if(0!==u){var c=e.slice(r+a,r+a+u);if((r+=u+a)>e.length)throw m("Invalid address Uint8Array: "+s(e,"base16"));t.push([n,c])}else t.push([n]),r+=a}return t}function v(e){return h(f(u(e=g(e))))}function y(e){var t=b(e);if(t)throw t;return Uint8Array.from(e)}function b(e){try{p(e)}catch(t){return t}}function g(e){return"/"+e.trim().split("/").filter((function(e){return e})).join("/")}function m(e){return new Error("Error parsing address: "+e)}function w(e){return i(e[0])}e.exports={stringToStringTuples:u,stringTuplesToString:c,tuplesToStringTuples:l,stringTuplesToTuples:f,bytesToTuples:p,tuplesToBytes:h,bytesToString:function(e){return c(l(p(e)))},stringToBytes:v,fromString:function(e){return v(e)},fromBytes:y,validateBytes:b,isValidBytes:function(e){return void 0===b(e)},cleanPath:g,ParseError:m,protoFromTuple:w,sizeForAddr:d}},function(e,t,r){"use strict";var n=r(663),i=r(194).toString,o=n,a=n.v4,s=n.v6;e.exports={isIP:o,isV4:a,isV6:s,toBytes:function e(t,r,n){var o;if(n=~~n,a(t))o=r||new Uint8Array(n+4),t.split(/\./g).map((function(e){o[n++]=255&parseInt(e,10)}));else if(s(t)){var u,c=t.split(":",8);for(u=0;u<c.length;u++){var f=void 0;a(c[u])&&(f=e(c[u]),c[u]=i(f.slice(0,2),"base16")),f&&++u<8&&c.splice(u,0,i(f.slice(2,4),"base16"))}if(""===c[0])for(;c.length<8;)c.unshift("0");else if(""===c[c.length-1])for(;c.length<8;)c.push("0");else if(c.length<8){for(u=0;u<c.length&&""!==c[u];u++);var l=[u,"1"];for(u=9-c.length;u>0;u--)l.push("0");c.splice.apply(c,l)}for(o=r||new Uint8Array(n+16),u=0;u<c.length;u++){var h=parseInt(c[u],16);o[n++]=h>>8&255,o[n++]=255&h}}if(!o)throw Error("Invalid ip address: "+t);return o},toString:function(e,t,r){t=~~t,r=r||e.length-t;var n,i=[],o=new DataView(e.buffer);if(4===r){for(var a=0;a<r;a++)i.push(e[t+a]);n=i.join(".")}else if(16===r){for(var s=0;s<r;s+=2)i.push(o.getUint16(t+s).toString(16));n=(n=(n=i.join(":")).replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3")).replace(/:{3,4}/,"::")}return n}}},function(e,t,r){"use strict";var n=r(378),i=function(e){return n({exact:!0}).test(e)};i.v4=function(e){return n.v4({exact:!0}).test(e)},i.v6=function(e){return n.v6({exact:!0}).test(e)},i.version=function(e){return i(e)?i.v4(e)?4:6:void 0},e.exports=i},function(e,t){e.exports=function e(t,n,i){if(Number.MAX_SAFE_INTEGER&&t>Number.MAX_SAFE_INTEGER)throw e.bytes=0,new RangeError("Could not encode varint");n=n||[];var o=i=i||0;for(;t>=r;)n[i++]=255&t|128,t/=128;for(;-128&t;)n[i++]=255&t|128,t>>>=7;return n[i]=0|t,e.bytes=i-o+1,n};var r=Math.pow(2,31)},function(e,t){e.exports=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s||o>49)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=a-r,i}},function(e,t){var r=Math.pow(2,7),n=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),a=Math.pow(2,35),s=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),f=Math.pow(2,63);e.exports=function(e){return e<r?1:e<n?2:e<i?3:e<o?4:e<a?5:e<s?6:e<u?7:e<c?8:e<f?9:10}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(379);t.fromString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.decoder.decode("".concat(r.prefix).concat(e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.equals=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}},,function(e,t,r){"use strict";var n=r(23),i=r(28).Buffer,o=r(97),a=i.alloc(128),s=64;function u(e,t){o.call(this,"digest"),"string"===typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=i.concat([t,a],s));for(var r=this._ipad=i.allocUnsafe(s),n=this._opad=i.allocUnsafe(s),u=0;u<s;u++)r[u]=54^t[u],n[u]=92^t[u];this._hash=[r]}n(u,o),u.prototype._update=function(e){this._hash.push(e)},u.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=u},function(e,t,r){e.exports=r(385)},function(e,t,r){(function(t){var n,i,o=r(28).Buffer,a=r(387),s=r(388),u=r(389),c=r(390),f=t.crypto&&t.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function d(){return i||(i=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function p(e,t,r,n,i){return f.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return f.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,r,i,v,y,b){"function"===typeof y&&(b=y,y=void 0);var g=l[(y=y||"sha1").toLowerCase()];if(g&&"function"===typeof t.Promise){if(a(i,v),e=c(e,s,"Password"),r=c(r,s,"Salt"),"function"!==typeof b)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){d()((function(){t(null,e)}))}),(function(e){d()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var r=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return h[e]=r,r}(g).then((function(t){return t?p(e,r,i,v,g):u(e,r,i,v,y)})),b)}else d()((function(){var t;try{t=u(e,r,i,v,y)}catch(n){return b(n)}b(null,t)}))}}).call(this,r(36))},function(e,t,r){var n=r(674),i=r(258),o=r(259),a=r(687),s=r(198);function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return u(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return c(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},function(e,t,r){var n=r(97),i=r(675),o=r(23),a=r(28).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var u=e.iv;a.isBuffer(u)||(u=a.from(u)),this._des=i.create({key:o,iv:u,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=u,o(u,n),u.prototype._update=function(e){return a.from(this._des.update(e))},u.prototype._final=function(){return a.from(this._des.final())}},function(e,t,r){"use strict";t.utils=r(391),t.Cipher=r(257),t.DES=r(392),t.CBC=r(676),t.EDE=r(677)},function(e,t,r){"use strict";var n=r(66),i=r(23),o={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(o),n=0;n<r.length;n++){var a=r[n];t.prototype[a]=o[a]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new a(this.options.iv);this._cbcState=e},o._update=function(e,t,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];o._update.call(this,a,0,r,n);for(s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{o._update.call(this,e,t,r,n);for(s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},function(e,t,r){"use strict";var n=r(66),i=r(23),o=r(257),a=r(392);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},function(e,t,r){var n=r(259),i=r(396),o=r(28).Buffer,a=r(397),s=r(97),u=r(197),c=r(198);function f(e,t,r){s.call(this),this._cache=new h,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(23)(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function d(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"===typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new f(s.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=o.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},t.createCipheriv=d,t.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return d(e,i.key,i.iv)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,r){var n=r(163);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},function(e,t,r){var n=r(28).Buffer,i=r(163);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},function(e,t,r){var n=r(28).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],r);return a}},function(e,t,r){var n=r(28).Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],r);return a}},function(e,t,r){(function(e){var n=r(163);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,r){for(;t._cache.length<r.length;)t._cache=e.concat([t._cache,i(t)]);var o=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),n(r,o)}}).call(this,r(13).Buffer)},function(e,t,r){var n=r(28).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!==(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!==(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},function(e,t,r){var n=r(396),i=r(28).Buffer,o=r(259),a=r(397),s=r(97),u=r(197),c=r(198);function f(e,t,r){s.call(this),this._cache=new l,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function h(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"===typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new f(s.module,t,r)}r(23)(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=i.concat([this.cache,e])},l.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return h(e,n.key,n.iv)},t.createDecipheriv=h},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,r){(function(e){var n=r(398),i=r(689),o=r(690);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new o(r,n)},t.createDiffieHellman=t.DiffieHellman=function t(r,i,s,u){return e.isBuffer(i)||void 0===a[i]?t(r,"binary",i,s):(i=i||"binary",u=u||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,u)),"number"===typeof r?new o(n(r,s),s,!0):(e.isBuffer(r)||(r=new e(r,i)),new o(r,s,!0)))}}).call(this,r(13).Buffer)},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,r){(function(t){var n=r(14),i=new(r(399)),o=new n(24),a=new n(11),s=new n(10),u=new n(3),c=new n(7),f=r(398),l=r(106);function h(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this}function d(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this}e.exports=v;var p={};function v(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=h,this.setPrivateKey=d):this._primeCode=8}function y(e,r){var n=new t(e.toArray());return r?n.toString(r):n}Object.defineProperty(v.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!==typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in p)return p[n];var l,h=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!i.test(e))return h+=1,h+="02"===r||"05"===r?8:4,p[n]=h,h;switch(i.test(e.shrn(1))||(h+=2),r){case"02":e.mod(o).cmp(a)&&(h+=8);break;case"05":(l=e.mod(s)).cmp(u)&&l.cmp(c)&&(h+=8);break;default:h+=4}return p[n]=h,h}(this.__prime,this.__gen)),this._primeCode}}),v.prototype.generateKeys=function(){return this._priv||(this._priv=new n(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},v.prototype.computeSecret=function(e){var r=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(r.toArray()),o=this.getPrime();if(i.length<o.length){var a=new t(o.length-i.length);a.fill(0),i=t.concat([a,i])}return i},v.prototype.getPublicKey=function(e){return y(this._pub,e)},v.prototype.getPrivateKey=function(e){return y(this._priv,e)},v.prototype.getPrime=function(e){return y(this.__prime,e)},v.prototype.getGenerator=function(e){return y(this._gen,e)},v.prototype.setGenerator=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.__gen=e,this._gen=new n(e),this}}).call(this,r(13).Buffer)},function(e,t,r){var n=r(28).Buffer,i=r(107),o=r(356),a=r(23),s=r(692),u=r(705),c=r(385);function f(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new f(e)}function d(e){return new l(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},l.prototype.verify=function(e,t,r){"string"===typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return u(t,i,e,this._signType,this._tag)},e.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},function(e,t,r){var n=r(28).Buffer,i=r(383),o=r(260),a=r(130).ec,s=r(400),u=r(199),c=r(406);function f(e,t,r,o){if((e=n.from(e.toArray())).length<t.byteLength()){var a=n.alloc(t.byteLength()-e.length);e=n.concat([a,e])}var s=r.length,u=function(e,t){e=(e=l(e,t)).mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(r,t),c=n.alloc(s);c.fill(1);var f=n.alloc(s);return f=i(o,f).update(c).update(n.from([0])).update(e).update(u).digest(),c=i(o,f).update(c).digest(),{k:f=i(o,f).update(c).update(n.from([1])).update(e).update(u).digest(),v:c=i(o,f).update(c).digest()}}function l(e,t){var r=new s(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function h(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length<e.bitLength();)t.v=i(r,t.k).update(t.v).digest(),o=n.concat([o,t.v]);a=l(o,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==a.cmp(e));return a}function d(e,t,r,n){return e.toRed(s.mont(r)).redPow(t).fromRed().mod(n)}e.exports=function(e,t,r,i,p){var v=u(t);if(v.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new a(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}(e,v)}if("dsa"===v.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){var i,o=t.params.priv_key,a=t.params.p,u=t.params.q,c=t.params.g,p=new s(0),v=l(e,u).mod(u),y=!1,b=f(o,u,e,r);for(;!1===y;)p=d(c,i=h(u,b,r),a,u),0===(y=i.invm(u).imul(v.add(o.mul(p))).mod(u)).cmpn(0)&&(y=!1,p=new s(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(p,y)}(e,v,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=n.concat([p,e]);for(var y=v.modulus.byteLength(),b=[0,1];e.length+b.length+1<y;)b.push(255);b.push(0);for(var g=-1;++g<e.length;)b.push(e[g]);return o(b,v)},e.exports.getKey=f,e.exports.makeKey=h},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(694).Buffer}catch(M){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u<s;u++){var c=e.charCodeAt(u)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),o+=a}return o}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){f(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(M){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=p[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var v=l.modrn(f).toString(e);r=(l=l.idivn(f)).isZero()?v+r:h[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function v(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var y=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,v=d>>>13,y=0|a[2],b=8191&y,g=y>>>13,m=0|a[3],w=8191&m,k=m>>>13,S=0|a[4],E=8191&S,_=S>>>13,A=0|a[5],x=8191&A,T=A>>>13,M=0|a[6],C=8191&M,O=M>>>13,I=0|a[7],P=8191&I,R=I>>>13,B=0|a[8],D=8191&B,N=B>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],K=8191&F,z=F>>>13,V=0|s[1],H=8191&V,J=V>>>13,q=0|s[2],G=8191&q,X=q>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,K)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(v,K)|0,o=Math.imul(v,z);var be=(c+(n=n+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,K),i=(i=Math.imul(b,z))+Math.imul(g,K)|0,o=Math.imul(g,z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,J)|0;var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(k,K)|0,o=Math.imul(k,z),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,X)|0;var me=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(E,K),i=(i=Math.imul(E,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var ke=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(C,K),i=(i=Math.imul(C,z))+Math.imul(O,K)|0,o=Math.imul(O,z),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var Se=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,K),i=(i=Math.imul(P,z))+Math.imul(R,K)|0,o=Math.imul(R,z),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var Ee=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(N,K)|0,o=Math.imul(N,z),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var _e=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ae=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,J))+Math.imul(U,H)|0,o=Math.imul(U,J),n=n+Math.imul(D,G)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0;var xe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,X))+Math.imul(U,G)|0,o=Math.imul(U,X),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Te=(c+(n=n+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ve)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,Y))+Math.imul(U,Z)|0,o=Math.imul(U,Y),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,he)|0;var Me=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,he)|0;var Ce=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Oe=(c+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ve)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Ie=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,he)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,le),i=(i=Math.imul(j,he))+Math.imul(U,le)|0,o=Math.imul(U,he);var Re=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ve)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ve))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ve))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=be,u[2]=ge,u[3]=me,u[4]=we,u[5]=ke,u[6]=Se,u[7]=Ee,u[8]=_e,u[9]=Ae,u[10]=xe,u[11]=Te,u[12]=Me,u[13]=Ce,u[14]=Oe,u[15]=Ie,u[16]=Pe,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,l=(0|e.words[f])*(0|t.words[c]),h=67108863&l;s=67108863&(h=h+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(e,t,r){return b(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(y=v),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?y(this,e,t):r<63?v(this,e,t):r<1024?b(this,e,t):g(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},m.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=u,h=c,d=0;d<a;d++){var p=r[f+d],v=n[f+d],y=r[f+d+a],b=n[f+d+a],g=l*y-h*b;b=l*b+h*y,y=g,r[f+d]=p+y,n[f+d]=v+b,r[f+d+a]=p-y,n[f+d+a]=v-b,d!==s&&(g=u*l-c*h,h=u*h+c*l,l=g)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},m.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0===(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,l,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*l[d];u[d]=s[d]*l[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"===typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new x(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function k(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}k.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},k.prototype.split=function(e,t){e.iushrn(this.n,0,t)},k.prototype.imulK=function(e){return e.imul(this.k)},i(S,k),S.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,k),i(_,k),i(A,k),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,y=0;0!==v.cmp(s);y++)v=v.redSqr();n(y<p);var b=this.pow(l,new o(1).iushln(p-y-1));h=h.redMul(b),l=b.redSqr(),d=d.redMul(l),p=y}return h},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new T(e)},i(T,x),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(156)(e))},,,function(e,t,r){"use strict";var n=r(401);t.certificate=r(702);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=f,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var l=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=l;var h=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(e,t,r){"use strict";var n=r(402),i=r(404),o=r(23);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){var t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},function(e,t,r){"use strict";var n=r(23),i=r(403);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],o=0;o<r.length;o+=64)n.push(r.slice(o,o+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},function(e,t,r){"use strict";var n=r(23),i=r(261).Buffer,o=r(405);function a(e){o.call(this,e),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,u=-1,c=0;c<r.length;c++){var f=r[c].match(a);if(null!==f&&f[2]===n){if(-1!==s){if("END"!==f[1])break;u=c;break}if("BEGIN"!==f[1])break;s=c}}if(-1===s||-1===u)throw new Error("PEM section not found for: "+n);var l=r.slice(s+1,u).join("");l.replace(/[^a-z0-9+/=]+/gi,"");var h=i.from(l,"base64");return o.prototype.decode.call(this,h,t)}},function(e,t,r){"use strict";var n=t;n.Reporter=r(263).Reporter,n.DecoderBuffer=r(164).DecoderBuffer,n.EncoderBuffer=r(164).EncoderBuffer,n.Node=r(262)},function(e,t,r){"use strict";var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(264)},function(e,t,r){"use strict";var n=r(401),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),l=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(e,t,r){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(198),s=r(258),u=r(28).Buffer;e.exports=function(e,t){var r,c=e.toString(),f=c.match(n);if(f){var l="aes"+f[1],h=u.from(f[2],"hex"),d=u.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(t,h.slice(0,8),parseInt(f[1],10)).key,v=[],y=s.createDecipheriv(l,p,h);v.push(y.update(d)),v.push(y.final()),r=u.concat(v)}else{var b=c.match(o);r=u.from(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},function(e,t,r){var n=r(28).Buffer,i=r(400),o=r(130).ec,a=r(199),s=r(406);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,r,c,f){var l=a(r);if("ec"===l.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,l)}if("dsa"===l.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,f=a.signature.decode(e,"der"),l=f.s,h=f.r;u(l,o),u(h,o);var d=i.mont(n),p=l.invm(o);return 0===s.toRed(d).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(d).redPow(h.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(h)}(e,t,l)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([f,t]);for(var h=l.modulus.byteLength(),d=[1],p=0;t.length+d.length+2<h;)d.push(255),p++;d.push(0);for(var v=-1;++v<t.length;)d.push(t[v]);d=n.from(d);var y=i.mont(l.modulus);e=(e=new i(e).toRed(y)).redPow(new i(l.publicExponent)),e=n.from(e.fromRed().toArray());var b=p<8?1:0;for(h=Math.min(e.length,d.length),e.length!==d.length&&(b=1),v=-1;++v<h;)b|=e[v]^d[v];return 0===b}},function(e,t,r){(function(t){var n=r(130),i=r(14);e.exports=function(e){return new a(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function s(e,r,n){Array.isArray(e)||(e=e.toArray());var i=new t(e);if(n&&i.length<n){var o=new t(n-i.length);o.fill(0),i=t.concat([o,i])}return r?i.toString(r):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,r,n){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),s(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),s(r,e)},a.prototype.getPrivateKey=function(e){return s(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,r){r=r||"utf8",t.isBuffer(e)||(e=new t(e,r));var n=new i(e);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}}).call(this,r(13).Buffer)},function(e,t,r){t.publicEncrypt=r(708),t.privateDecrypt=r(709),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},function(e,t,r){var n=r(199),i=r(106),o=r(107),a=r(407),s=r(408),u=r(14),c=r(409),f=r(260),l=r(28).Buffer;e.exports=function(e,t,r){var h;h=e.padding?e.padding:r?1:4;var d,p=n(e);if(4===h)d=function(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(l.alloc(0)).digest(),f=c.length,h=2*f;if(n>r-h-2)throw new Error("message too long");var d=l.alloc(r-n-h-2),p=r-f-1,v=i(f),y=s(l.concat([c,d,l.alloc(1,1),t],p),a(v,p)),b=s(v,a(y,f));return new u(l.concat([l.alloc(1),b,y],r))}(p,t);else if(1===h)d=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");n=r?l.alloc(a-o-3,255):function(e){var t,r=l.allocUnsafe(e),n=0,o=i(2*e),a=0;for(;n<e;)a===o.length&&(o=i(2*e),a=0),(t=o[a++])&&(r[n++]=t);return r}(a-o-3);return new u(l.concat([l.from([0,r?1:2]),n,l.alloc(1),t],a))}(p,t,r);else{if(3!==h)throw new Error("unknown padding");if((d=new u(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?f(d,p):c(d,p)}},function(e,t,r){var n=r(199),i=r(407),o=r(408),a=r(14),s=r(260),u=r(107),c=r(409),f=r(28).Buffer;e.exports=function(e,t,r){var l;l=e.padding?e.padding:r?1:4;var h,d=n(e),p=d.modulus.byteLength();if(t.length>p||new a(t).cmp(d.modulus)>=0)throw new Error("decryption error");h=r?c(new a(t),d):s(t,d);var v=f.alloc(p-h.length);if(h=f.concat([v,h],p),4===l)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(f.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),c=t.slice(a+1),l=o(s,i(c,a)),h=o(c,i(l,r-a-1));if(function(e,t){e=f.from(e),t=f.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;for(;++i<n;)r+=e[i]^t[i];return r}(n,h.slice(0,a)))throw new Error("decryption error");var d=a;for(;0===h[d];)d++;if(1!==h[d++])throw new Error("decryption error");return h.slice(d)}(d,h);if(1===l)return function(e,t,r){var n=t.slice(0,2),i=2,o=0;for(;0!==t[i++];)if(i>=t.length){o++;break}var a=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,h,r);if(3===l)return h;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(28),a=r(106),s=o.Buffer,u=o.kMaxLength,c=e.crypto||e.msCrypto,f=Math.pow(2,32)-1;function l(e,t){if("number"!==typeof e||e!==e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function h(e,t,r){if("number"!==typeof e||e!==e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function d(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return c.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}c&&c.getRandomValues||!n.browser?(t.randomFill=function(t,r,n,i){if(!s.isBuffer(t)&&!(t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof r)i=r,r=0,n=t.length;else if("function"===typeof n)i=n,n=t.length-r;else if("function"!==typeof i)throw new TypeError('"cb" argument must be a function');return l(r,t.length),h(n,r,t.length),d(t,r,n,i)},t.randomFillSync=function(t,r,n){"undefined"===typeof r&&(r=0);if(!s.isBuffer(t)&&!(t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(r,t.length),void 0===n&&(n=t.length-r);return h(n,r,t.length),d(t,r,n)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,r(36),r(39))},function(e,t,r){var n=r(21),i="Impossible case. Please create issue.",o="The tweak was out of range or the resulted private key is invalid",a="The tweak was out of range or equal to zero",s="Unknow error on context randomization",u="Private Key is invalid",c="Public Key could not be parsed",f="Public Key serialization error",l="The sum of the public keys is not valid",h="Signature could not be parsed",d="The nonce generation function failed, or the private key was invalid",p="Public key could not be recover",v="Scalar was invalid (zero or overflow)";function y(e,t){if(!e)throw new Error(t)}function b(e,t,r){if(y(t instanceof Uint8Array,"Expected ".concat(e," to be an Uint8Array")),void 0!==r)if(Array.isArray(r)){var n=r.join(", "),i="Expected ".concat(e," to be an Uint8Array with length [").concat(n,"]");y(r.includes(t.length),i)}else{var o="Expected ".concat(e," to be an Uint8Array with length ").concat(r);y(t.length===r,o)}}function g(e){y("Boolean"===w(e),"Expected compressed to be a Boolean")}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"===typeof e&&(e=e(t)),b("output",e,t),e}function w(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){switch(y(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&b("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(s)}},privateKeyVerify:function(t){return b("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(b("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(i)}},privateKeyTweakAdd:function(t,r){switch(b("private key",t,32),b("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(o)}},privateKeyTweakMul:function(t,r){switch(b("private key",t,32),b("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(a)}},publicKeyVerify:function(t){return b("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(b("private key",t,32),g(r),n=m(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(u);case 2:throw new Error(f)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(b("public key",t,[33,65]),g(r),n=m(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(f)}},publicKeyNegate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(b("public key",t,[33,65]),g(r),n=m(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(i);case 3:throw new Error(f)}},publicKeyCombine:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;y(Array.isArray(t),"Expected public keys to be an Array"),y(t.length>0,"Expected public keys array will have more than zero items");var o,a=n(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;b("public key",s,[33,65])}}catch(u){a.e(u)}finally{a.f()}switch(g(r),i=m(i,r?33:65),e.publicKeyCombine(i,t)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(f)}},publicKeyTweakAdd:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(b("public key",t,[33,65]),b("tweak",r,32),g(n),i=m(i,n?33:65),e.publicKeyTweakAdd(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(o)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(b("public key",t,[33,65]),b("tweak",r,32),g(n),i=m(i,n?33:65),e.publicKeyTweakMul(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(a)}},signatureNormalize:function(t){switch(b("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(h)}},signatureExport:function(t,r){b("signature",t,64);var n={output:r=m(r,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(h);case 2:throw new Error(i)}},signatureImport:function(t,r){switch(b("signature",t),r=m(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(h);case 2:throw new Error(i)}},ecdsaSign:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;b("message",t,32),b("private key",r,32),y("Object"===w(n),"Expected options to be an Object"),void 0!==n.data&&b("options.data",n.data),void 0!==n.noncefn&&y("Function"===w(n.noncefn),"Expected options.noncefn to be a Function");var a={signature:o=m(o,64),recid:null};switch(e.ecdsaSign(a,t,r,n.data,n.noncefn)){case 0:return a;case 1:throw new Error(d);case 2:throw new Error(i)}},ecdsaVerify:function(t,r,n){switch(b("signature",t,64),b("message",r,32),b("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(h);case 2:throw new Error(c)}},ecdsaRecover:function(t,r,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(b("signature",t,64),y("Number"===w(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),b("message",n,32),g(o),a=m(a,o?33:65),e.ecdsaRecover(a,t,r,n)){case 0:return a;case 1:throw new Error(h);case 2:throw new Error(p);case 3:throw new Error(i)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(b("public key",t,[33,65]),b("private key",r,32),y("Object"===w(n),"Expected options to be an Object"),void 0!==n.data&&b("options.data",n.data),void 0!==n.hashfn?(y("Function"===w(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&b("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&b("options.ybuf",n.ybuf,32),b("output",i)):i=m(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(v)}}}}},function(e,t,r){var n=new(0,r(410).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var u=a.redSqr().redIMul(a);return s.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n<e.length;++n)e[n]=r[n]}e.exports={contextRandomize:function(){return 0},privateKeyVerify:function(e){var t=new o(e);return t.cmp(i.n)<0&&!t.isZero()?0:1},privateKeyNegate:function(e){var t=new o(e),r=i.n.sub(t).umod(i.n).toArrayLike(Uint8Array,"be",32);return e.set(r),0},privateKeyTweakAdd:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n<t.length;++n)if(r[n]=a(t[n]),null===r[n])return 1;for(var i=r[0].getPublic(),o=1;o<r.length;++o)i=i.add(r[o].pub);return i.isInfinity()?2:(s(e,i),0)},publicKeyTweakAdd:function(e,t,r){var n=a(t);if(null===n)return 1;if((r=new o(r)).cmp(i.n)>=0)return 2;var u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(s(e,u),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var u=33,c=0;u>1&&0===s[c]&&!(128&s[c+1]);--u,++c);if(128&(s=s.subarray(c))[0])return 1;if(u>1&&0===s[0]&&!(128&s[1]))return 1;var f=a.subarray(39,72);f[0]=0,f.set(n,1);for(var l=33,h=0;l>1&&0===f[h]&&!(128&f[h+1]);--l,++h);return 128&(f=f.subarray(h))[0]||l>1&&0===f[0]&&!(128&f[1])?1:(e.outputlen=6+u+l,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+u]=2,a[5+u]=f.length,a.set(f,6+u),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var u=new o(a);u.cmp(i.n)>=0&&(u=new o(0));var c=new o(t.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),e.set(u.toArrayLike(Uint8Array,"be",32),0),e.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var u=s;s=function(e){var n=u(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var c,f=new o(r);if(f.cmp(i.n)>=0||f.isZero())return 1;try{c=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(l){return 1}return e.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),e.recid=c.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},u=new o(s.r),c=new o(s.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;var f=a(r);if(null===f)return 2;var l=f.getPublic();return n.verify(t,s,l)?0:3},ecdsaRecover:function(e,t,r,a){var u,c={r:t.slice(0,32),s:t.slice(32,64)},f=new o(c.r),l=new o(c.s);if(f.cmp(i.n)>=0||l.cmp(i.n)>=0)return 1;if(f.isZero()||l.isZero())return 2;try{u=n.recoverPubKey(a,c,r)}catch(h){return 2}return s(e,u),0},ecdh:function(e,t,r,s,u,c,f){var l=a(t);if(null===l)return 1;var h=new o(r);if(h.cmp(i.n)>=0||h.isZero())return 2;var d=l.getPublic().mul(h);if(void 0===u)for(var p=d.encode(null,!0),v=n.hash().update(p).digest(),y=0;y<32;++y)e[y]=v[y];else{c||(c=new Uint8Array(32));for(var b=d.getX().toArray("be",32),g=0;g<32;++g)c[g]=b[g];f||(f=new Uint8Array(32));for(var m=d.getY().toArray("be",32),w=0;w<32;++w)f[w]=m[w];var k=u(c,f,s);if(!(k instanceof Uint8Array&&k.length===e.length))return 2;e.set(k)}return 0}}},function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},,,function(e,t,r){"use strict";var n=r(68),i=r(92),o=r(201),a=r(200),s=n.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new i(1),v=new i(0),y=new i(0),b=new i(1),g=0;0!==h.cmpn(0);){var m=d.div(h);c=d.sub(m.mul(h)),f=y.sub(m.mul(p));var w=b.sub(m.mul(v));if(!n&&c.cmp(l)<0)t=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2===++g)break;u=c,d=h,h=c,y=p,p=f,b=v,v=w}a=c.neg(),s=f;var k=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(k)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return c},o(c,a.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"===typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var f=o.redSqr(),l=c.redSqr(),h=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),p=o.redMul(l),v=d.redSqr().redISub(p.redAdd(p)),y=p.redISub(v),b=d.redMul(y);b=b.redIAdd(b).redISub(h);var g=c.redMul(s);t+1<e&&(u=u.redMul(h)),o=v,s=g,c=b}return this.curve.jpoint(o,c.redMul(i),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(h);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),v=p.redSqr(),y=h.redIAdd(h);y=(y=y.redIAdd(y)).redIAdd(y),e=v.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},f.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),v=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(v),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var y=l.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=d.redMul(p.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,r)},f.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),l=c.redISub(f),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=s.redMul(l).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),f=t.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(l,h,d)},f.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},f.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(92),i=r(201),o=r(200),a=r(68);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(68),i=r(92),o=r(201),a=r(200),s=n.assert;function u(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&-1===(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}function c(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,f)},c.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),l=o.redMul(u),h=a.redMul(s);return this.curve.point(c,f,h,l)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";t.sha1=r(720),t.sha224=r(721),t.sha256=r(415),t.sha384=r(722),t.sha512=r(416)},function(e,t,r){"use strict";var n=r(77),i=r(166),o=r(414),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,f=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,f),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],h=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),v=u(a(i,5),c(p,o,f,h),d,r[n],l[p]);d=h,h=f,f=a(o,30),o=i,i=v}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],h),this.h[4]=s(this.h[4],d)},h.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(77),i=r(415);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(e,t,r){"use strict";var n=r(77),i=r(416);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(e,t,r){"use strict";var n=r(77),i=r(166),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(f,c),t.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],f=this.h[4],g=r,m=n,w=i,k=c,S=f,E=0;E<80;E++){var _=a(o(u(r,l(E,n,i,c),e[p[E]+t],h(E)),y[E]),f);r=f,f=c,c=o(i,10),i=n,n=_,_=a(o(u(g,l(79-E,m,w,k),e[v[E]+t],d(E)),b[E]),S),g=S,S=k,k=o(w,10),w=m,m=_}_=s(this.h[1],i,k),this.h[1]=s(this.h[2],c,S),this.h[2]=s(this.h[3],f,g),this.h[3]=s(this.h[4],r,m),this.h[4]=s(this.h[0],n,w),this.h[0]=_},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],v=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,r){"use strict";var n=r(77),i=r(108);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(92),i=r(727),o=r(68),a=r(265),s=r(412),u=o.assert,c=r(728),f=r(729);function l(e){if(!(this instanceof l))return new l(e);"string"===typeof e&&(u(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function(e){return new c(this,e)},l.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,r,o){"object"===typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new n(1)),h=0;;h++){var d=o.k?o.k(h):new n(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var v=p.getX(),y=v.umod(this.n);if(0!==y.cmpn(0)){var b=d.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==v.cmp(y)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),g^=1),new f({r:y,s:b,recoveryParam:g})}}}}}},l.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new f(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var o=this.n,a=new n(e),s=t.r,c=t.s,l=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var d=t.r.invm(o),p=o.sub(a).mul(d).umod(o),v=c.mul(d).umod(o);return this.g.mulAdd(p,s,v)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(266),i=r(411),o=r(108);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!==typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},function(e,t,r){"use strict";var n=r(92),i=r(68).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,r){"use strict";var n=r(92),i=r(68),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=u(e,r);if(!1===f)return!1;if(e.length!==f+r.place)return!1;var l=e.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(c),this.s=new n(l),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];f(n,t.length),(n=n.concat(t)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,e)}},function(e,t,r){"use strict";var n=r(266),i=r(265),o=r(68),a=o.assert,s=o.parseBytes,u=r(731),c=r(732);function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},f.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},f.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},f.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},f.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!==(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(e){return o.intFromLE(e)},f.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,r){"use strict";var n=r(68),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var n=r(92),i=r(68),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function u(e,t){this.eddsa=e,"object"!==typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},,function(e,t,r){var n=r(338),i=r(375),o=r(188),a=r(339);e.exports=function(e){return n(e)||i(e)||o(e)||a()}},function(e,t,r){var n=r(84);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r(738);function i(t,r){return void 0===r&&(r="utf8"),e.isBuffer(t)?a(t.toString("base64")):a(e.from(t,r).toString("base64"))}function o(e){return e=e.toString(),n.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function a(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var s=i;s.encode=i,s.decode=function(t,r){return void 0===r&&(r="utf8"),e.from(o(t),"base64").toString(r)},s.toBase64=o,s.fromBase64=a,s.toBuffer=function(t){return e.from(o(t),"base64")},t.default=s}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var r=t.length,n=r%4;if(!n)return t;var i=r,o=4-n,a=r+o,s=e.alloc(a);for(s.write(t);o--;)s.write("=",i++);return s.toString()}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.toBigIntLE=function(t){var r=e.from(t);r.reverse();var n=r.toString("hex");return 0===n.length?BigInt(0):BigInt("0x".concat(n))},t.toBigIntBE=function(e){var t=e.toString("hex");return 0===t.length?BigInt(0):BigInt("0x".concat(t))},t.toBufferLE=function(t,r){var n=t.toString(16),i=e.from(n.padStart(2*r,"0").slice(0,2*r),"hex");return i.reverse(),i},t.toBufferBE=function(t,r){var n=t.toString(16);return e.from(n.padStart(2*r,"0").slice(0,2*r),"hex")}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";(function(e){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var i=n(r(741));function o(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function a(t,r){if(t<56)return e.from([t+r]);var n=c(t),i=c(r+55+n.length/2);return e.from(i+n,"hex")}function s(t){var r,n,i,a,u,c=[],f=t[0];if(f<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(f<=183){if(r=f-127,i=128===f?e.from([]):t.slice(1,r),2===r&&i[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:i,remainder:t.slice(r)}}if(f<=191){if(n=f-182,t.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if((r=o(t.slice(1,n).toString("hex"),16))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if((i=t.slice(n,r+n)).length<r)throw new Error("invalid RLP: not enough bytes for string");return{data:i,remainder:t.slice(r+n)}}if(f<=247){for(r=f-191,a=t.slice(1,r);a.length;)u=s(a),c.push(u.data),a=u.remainder;return{data:c,remainder:t.slice(r)}}var l=(n=f-246)+(r=o(t.slice(1,n).toString("hex"),16));if(l>t.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(a=t.slice(n,l)).length)throw new Error("invalid rlp, List has a invalid length");for(;a.length;)u=s(a),c.push(u.data),a=u.remainder;return{data:c,remainder:t.slice(l)}}function u(e){return"0x"===e.slice(0,2)}function c(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function f(t){if(!e.isBuffer(t)){if("string"===typeof t)return u(t)?e.from((r="string"!==typeof(n=t)?n:u(n)?n.slice(2):n).length%2?"0"+r:r,"hex"):e.from(t);if("number"===typeof t||"bigint"===typeof t)return t?function(t){var r=c(t);return e.from(r,"hex")}(t):e.from([]);if(null===t||void 0===t)return e.from([]);if(t instanceof Uint8Array)return e.from(t);if(i.default.isBN(t))return e.from(t.toArray());throw new Error("invalid type")}var r,n;return t}t.encode=function t(r){if(Array.isArray(r)){for(var n=[],i=0;i<r.length;i++)n.push(t(r[i]));var o=e.concat(n);return e.concat([a(o.length,192),o])}var s=f(r);return 1===s.length&&s[0]<128?s:e.concat([a(s.length,128),s])},t.decode=function(t,r){if(void 0===r&&(r=!1),!t||0===t.length)return e.from([]);var n=s(f(t));if(r)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var r=f(t),n=r[0];if(n<=127)return r.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var i=n-246;return i+o(r.slice(1,i).toString("hex"),16)}}).call(this,r(13).Buffer)},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(742).Buffer}catch(M){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u<s;u++){var c=e.charCodeAt(u)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),o+=a}return o}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){f(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(M){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=p[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var v=l.modrn(f).toString(e);r=(l=l.idivn(f)).isZero()?v+r:h[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function v(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,l=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var y=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,v=d>>>13,y=0|a[2],b=8191&y,g=y>>>13,m=0|a[3],w=8191&m,k=m>>>13,S=0|a[4],E=8191&S,_=S>>>13,A=0|a[5],x=8191&A,T=A>>>13,M=0|a[6],C=8191&M,O=M>>>13,I=0|a[7],P=8191&I,R=I>>>13,B=0|a[8],D=8191&B,N=B>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],K=8191&F,z=F>>>13,V=0|s[1],H=8191&V,J=V>>>13,q=0|s[2],G=8191&q,X=q>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],$=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,he=fe>>>13,de=0|s[9],pe=8191&de,ve=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,K)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,K),i=(i=Math.imul(p,z))+Math.imul(v,K)|0,o=Math.imul(v,z);var be=(c+(n=n+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,K),i=(i=Math.imul(b,z))+Math.imul(g,K)|0,o=Math.imul(g,z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,J)|0;var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,K),i=(i=Math.imul(w,z))+Math.imul(k,K)|0,o=Math.imul(k,z),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,X)|0;var me=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(E,K),i=(i=Math.imul(E,z))+Math.imul(_,K)|0,o=Math.imul(_,z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,z))+Math.imul(T,K)|0,o=Math.imul(T,z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0;var ke=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(C,K),i=(i=Math.imul(C,z))+Math.imul(O,K)|0,o=Math.imul(O,z),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0;var Se=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,K),i=(i=Math.imul(P,z))+Math.imul(R,K)|0,o=Math.imul(R,z),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0;var Ee=(c+(n=n+Math.imul(l,ue)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,z))+Math.imul(N,K)|0,o=Math.imul(N,z),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,ce)|0;var _e=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,z))+Math.imul(U,K)|0,o=Math.imul(U,z),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,he)|0;var Ae=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ve)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,J))+Math.imul(U,H)|0,o=Math.imul(U,J),n=n+Math.imul(D,G)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0;var xe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((o=o+Math.imul(v,ve)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,G),i=(i=Math.imul(j,X))+Math.imul(U,G)|0,o=Math.imul(U,X),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,he)|0;var Te=(c+(n=n+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ve)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,Y))+Math.imul(U,Z)|0,o=Math.imul(U,Y),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,he)|0;var Me=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,he)|0;var Ce=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Oe=(c+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,ve)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,he)|0;var Ie=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,he)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,le),i=(i=Math.imul(j,he))+Math.imul(U,le)|0,o=Math.imul(U,he);var Re=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ve)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Be=(c+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ve))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ve))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=be,u[2]=ge,u[3]=me,u[4]=we,u[5]=ke,u[6]=Se,u[7]=Ee,u[8]=_e,u[9]=Ae,u[10]=xe,u[11]=Te,u[12]=Me,u[13]=Ce,u[14]=Oe,u[15]=Ie,u[16]=Pe,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,l=(0|e.words[f])*(0|t.words[c]),h=67108863&l;s=67108863&(h=h+s|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(e,t,r){return b(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(y=v),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?y(this,e,t):r<63?v(this,e,t):r<1024?b(this,e,t):g(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},m.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var l=u,h=c,d=0;d<a;d++){var p=r[f+d],v=n[f+d],y=r[f+d+a],b=n[f+d+a],g=l*y-h*b;b=l*b+h*y,y=g,r[f+d]=p+y,n[f+d]=v+b,r[f+d+a]=p-y,n[f+d+a]=v-b,d!==s&&(g=u*l-c*h,h=u*h+c*l,l=g)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},m.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0===(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),l=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,l,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*l[d];u[d]=s[d]*l[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"===typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,v=1;0===(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new x(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function k(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}k.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},k.prototype.split=function(e,t){e.iushrn(this.n,0,t)},k.prototype.imulK=function(e){return e.imul(this.k)},i(S,k),S.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,k),i(_,k),i(A,k),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new E;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return w[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var v=d,y=0;0!==v.cmp(s);y++)v=v.redSqr();n(y<p);var b=this.pow(l,new o(1).iushln(p-y-1));h=h.redMul(b),l=b.redSqr(),d=d.redMul(l),p=y}return h},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new T(e)},i(T,x),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(156)(e))},,function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(745),a=r(747);t.create=function(){var e=i(n.mark((function e(t,r){var s,u,c,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=a(t),u=o.createCipheriv(s,t,r),c=o.createDecipheriv(s,t,r),f={encrypt:function(e){return i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u.update(e));case 1:case"end":return t.stop()}}),t)})))()},decrypt:function(e){return i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",c.update(e));case 1:case"end":return t.stop()}}),t)})))()}},e.abrupt("return",f);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";r(167);var n=r(18),i=r(109).toString,o=r(110).fromString;e.exports={createCipheriv:function(e,t,r){var a=n.cipher.createCipher("AES-CTR",i(t,"ascii"));return a.start({iv:i(r,"ascii")}),{update:function(e){return a.update(n.util.createBuffer(i(e,"ascii"))),o(a.output.getBytes(),"ascii")}}},createDecipheriv:function(e,t,r){var a=n.cipher.createDecipher("AES-CTR",i(t,"ascii"));return a.start({iv:i(r,"ascii")}),{update:function(e){return a.update(n.util.createBuffer(i(e,"ascii"))),o(a.output.getBytes(),"ascii")}}}}},function(e,t,r){(function(t){var r={};e.exports=r;var n={};r.encode=function(e,t,r){if("string"!==typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!==typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,o=t.length,a=t.charAt(0),s=[0];for(i=0;i<e.length;++i){for(var u=0,c=e[i];u<s.length;++u)c+=s[u]<<8,s[u]=c%o,c=c/o|0;for(;c>0;)s.push(c%o),c=c/o|0}for(i=0;0===e[i]&&i<e.length-1;++i)n+=a;for(i=s.length-1;i>=0;--i)n+=t[s[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0];for(r=0;r<e.length();++r){for(var a=0,s=e.at(r);a<o.length;++a)s+=o[a]<<8,o[a]=s%n,s=s/n|0;for(;s>0;)o.push(s%n),s=s/n|0}var u="";for(r=0;0===e.at(r)&&r<e.length()-1;++r)u+=i;for(r=o.length-1;r>=0;--r)u+=t[o[r]];return u}(e,t);if(r){var f=new RegExp(".{1,"+r+"}","g");n=n.match(f).join("\r\n")}return n},r.decode=function(e,r){if("string"!==typeof e)throw new TypeError('"input" must be a string.');if("string"!==typeof r)throw new TypeError('"alphabet" must be a string.');var i=n[r];if(!i){i=n[r]=[];for(var o=0;o<r.length;++o)i[r.charCodeAt(o)]=o}e=e.replace(/\s/g,"");var a=r.length,s=r.charAt(0),u=[0];for(o=0;o<e.length;o++){var c=i[e.charCodeAt(o)];if(void 0===c)return;for(var f=0,l=c;f<u.length;++f)l+=u[f]*a,u[f]=255&l,l>>=8;for(;l>0;)u.push(255&l),l>>=8}for(var h=0;e[h]===s&&h<e.length-1;++h)u.push(0);return"undefined"!==typeof t?t.from(u.reverse()):new Uint8Array(u.reverse())}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";var n=r(40),i=r(15),o={16:"aes-128-ctr",32:"aes-256-ctr"};e.exports=function(e){var t=o[e.length];if(!t){var r=Object.entries(o).map((function(e){var t=n(e,2),r=t[0],i=t[1];return"".concat(r," (").concat(i,")")})).join(" / ");throw i(new Error("Invalid key length ".concat(e.length," bytes. Must be ").concat(r)),"ERR_INVALID_KEY_LENGTH")}return t}},function(e,t,r){"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(426),n.BufferWriter=r(757),n.Reader=r(427),n.BufferReader=r(758),n.util=r(111),n.rpc=r(759),n.roots=r(761),n.configure=i,i()},function(e,t,r){"use strict";e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,i=2,o=!0;for(;i<arguments.length;)r[n++]=arguments[i++];return new Promise((function(i,a){r[n]=function(e){if(o)if(o=!1,e)a(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];i.apply(null,t)}};try{e.apply(t||null,r)}catch(s){o&&(o=!1,a(s))}}))}},function(e,t,r){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var i=new Array(64),o=new Array(123),a=0;a<64;)o[i[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,r){for(var n,o=null,a=[],s=0,u=0;t<r;){var c=e[t++];switch(u){case 0:a[s++]=i[c>>2],n=(3&c)<<4,u=1;break;case 1:a[s++]=i[n|c>>4],n=(15&c)<<2,u=2;break;case 2:a[s++]=i[n|c>>6],a[s++]=i[63&c],u=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return u&&(a[s++]=i[n],a[s++]=61,1===u&&(a[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var s="invalid encoding";n.decode=function(e,t,r){for(var n,i=r,a=0,u=0;u<e.length;){var c=e.charCodeAt(u++);if(61===c&&a>1)break;if(void 0===(c=o[c]))throw Error(s);switch(a){case 0:n=c,a=1;break;case 1:t[r++]=n<<2|(48&c)>>4,n=c,a=2;break;case 2:t[r++]=(15&n)<<4|(60&c)>>2,n=c,a=3;break;case 3:t[r++]=(3&n)<<6|c,a=0}}if(1===a)throw Error(s);return r-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},function(e,t,r){"use strict";function n(){this._listeners={}}e.exports=n,n.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},n.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},n.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},function(e,t,r){"use strict";function n(e){return"undefined"!==typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function o(e,n,i){t[0]=e,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function s(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?i:o,e.writeFloatBE=n?o:i,e.readFloatLE=n?a:s,e.readFloatBE=n?s:a}():function(){function t(e,t,r,n){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,n)}}function r(e,t,r){var n=e(t,r),i=2*(n>>31)+1,o=n>>>23&255,a=8388607&n;return 255===o?a?NaN:i*(1/0):0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,i),e.writeFloatBE=t.bind(null,o),e.readFloatLE=r.bind(null,a),e.readFloatBE=r.bind(null,s)}(),"undefined"!==typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,i,o){var a=n<0?1:0;if(a&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((a<<31|2146435072)>>>0,i,o+r);else{var s;if(n<22250738585072014e-324)e((s=n/5e-324)>>>0,i,o+t),e((a<<31|s/4294967296)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(s=n*Math.pow(2,-u))>>>0,i,o+t),e((a<<31|u+1023<<20|1048576*s&1048575)>>>0,i,o+r)}}}function r(e,t,r,n,i){var o=e(n,i+t),a=e(n,i+r),s=2*(a>>31)+1,u=a>>>20&2047,c=4294967296*(1048575&a)+o;return 2047===u?c?NaN:s*(1/0):0===u?5e-324*s*c:s*Math.pow(2,u-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,i,0,4),e.writeDoubleBE=t.bind(null,o,4,0),e.readDoubleLE=r.bind(null,a,0,4),e.readDoubleBE=r.bind(null,s,4,0)}(),e}function i(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function o(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function a(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=n(n)},function(module,exports,__webpack_require__){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},function(e,t,r){"use strict";var n=t;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){if(r-t<1)return"";for(var n,i=null,o=[],a=0;t<r;)(n=e[t++])<128?o[a++]=n:n>191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},n.write=function(e,t,r){for(var n,i,o=r,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&i),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-o}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n=r||8192,i=n>>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);var s=t.call(o,a,a+=r);return 7&a&&(a=1+(7|a)),s}}},function(e,t,r){"use strict";e.exports=i;var n=r(111);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){if("number"===typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;i.fromHash=function(e){return e===a?o:new i((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},function(e,t,r){"use strict";e.exports=o;var n=r(426);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(111);function o(){n.call(this)}function a(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},o.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},o._configure()},function(e,t,r){"use strict";e.exports=o;var n=r(427);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(111);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},function(e,t,r){"use strict";t.Service=r(760)},function(e,t,r){"use strict";e.exports=i;var n=r(111);function i(e,t,r){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,r,i,o);if(s.rpcImpl)try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,r){if(e)return s.emit("error",e,t),a(e);if(null!==r){if(!(r instanceof i))try{r=i[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)}s.end(!0)}))}catch(u){return s.emit("error",u,t),void setTimeout((function(){a(u)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},function(e,t,r){"use strict";e.exports={}},function(e,t,r){var n=r(18);r(112),r(34),(e.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,i=null,o={start:function(o,a){if(null!==o)if("string"===typeof o){if(!((o=o.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+o+'"');t=n.md.algorithms[o].create()}else t=o;if(null===a)a=e;else{if("string"===typeof a)a=n.util.createBuffer(a);else if(n.util.isArray(a)){var s=a;a=n.util.createBuffer();for(var u=0;u<s.length;++u)a.putByte(s[u])}var c=a.length();c>t.blockLength&&(t.start(),t.update(a.bytes()),a=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),c=a.length();for(u=0;u<c;++u){s=a.at(u);r.putByte(54^s),i.putByte(92^s)}if(c<t.blockLength)for(s=t.blockLength-c,u=0;u<s;++u)r.putByte(54),i.putByte(92);e=a,r=r.bytes(),i=i.bytes()}t.start(),t.update(r)},update:function(e){t.update(e)},getMac:function(){var e=t.digest().bytes();return t.start(),t.update(i),t.update(e),t.digest()}};return o.digest=o.getMac,o}},function(e,t,r){var n=r(18);r(112),r(34);var i=e.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){a||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),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=!0);var e=null,t=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o<r;++o)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},i}};return i.start(),i.update=function(o,a){"utf8"===a&&(o=n.util.encodeUtf8(o));var s=o.length;i.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=s[1],s[1]=s[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(o),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=n.util.createBuffer();a.putBytes(t.bytes());var s,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;a.putBytes(o.substr(0,i.blockLength-c));for(var f=8*i.fullMessageLength[0],l=0;l<i.fullMessageLength.length-1;++l)f+=(s=8*i.fullMessageLength[l+1])/4294967296>>>0,a.putInt32(f>>>0),f=s>>>0;a.putInt32(f);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};u(h,r,a);var d=n.util.createBuffer();return d.putInt32(h.h0),d.putInt32(h.h1),d.putInt32(h.h2),d.putInt32(h.h3),d.putInt32(h.h4),d.putInt32(h.h5),d.putInt32(h.h6),d.putInt32(h.h7),d},i};var o=null,a=!1,s=null;function u(e,t,r){for(var n,i,o,a,u,c,f,l,h,d,p,v,y,b=r.length();b>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=((n=t[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=n+t[u-7]+i+t[u-16]|0;for(c=e.h0,f=e.h1,l=e.h2,h=e.h3,d=e.h4,p=e.h5,v=e.h6,y=e.h7,u=0;u<64;++u)o=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),a=c&f|l&(c^f),n=y+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(v^d&(p^v))+s[u]+t[u],y=v,v=p,p=d,d=h+n>>>0,h=l,l=f,f=c,c=n+(i=o+a)>>>0;e.h0=e.h0+c|0,e.h1=e.h1+f|0,e.h2=e.h2+l|0,e.h3=e.h3+h|0,e.h4=e.h4+d|0,e.h5=e.h5+p|0,e.h6=e.h6+v|0,e.h7=e.h7+y|0,b-=64}}},function(e,t,r){(function(t){var n=r(18);r(34);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||t.versions["node-webkit"]||(i=r(271)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,o=new Array(32),a=0;a<32;++a)o[a]=r.create();function s(){if(t.pools[0].messageLength>=32)return u();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),u()}function u(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r===0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function c(e){var t=null,r=n.util.globalScope,i=r.crypto||r.msCrypto;i&&i.getRandomValues&&(t=function(e){return i.getRandomValues(e)});var o=n.util.createBuffer();if(t)for(;o.length()<e;){var a=Math.max(1,Math.min(e-o.length(),65536)/4),s=new Uint32Array(Math.floor(a));try{t(s);for(var u=0;u<s.length;++u)o.putInt32(s[u])}catch(d){if(!("undefined"!==typeof QuotaExceededError&&d instanceof QuotaExceededError))throw d}}if(o.length()<e)for(var c,f,l,h=Math.floor(65536*Math.random());o.length()<e;){f=16807*(65535&h),f+=(32767&(c=16807*(h>>16)))<<16,h=4294967295&(f=(2147483647&(f+=c>>15))+(f>>31));for(u=0;u<3;++u)l=h>>>(u<<3),l^=Math.floor(256*Math.random()),o.putByte(String.fromCharCode(255&l))}return o.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var i=t.plugin.cipher,o=t.plugin.increment,a=t.plugin.formatKey,s=t.plugin.formatSeed,c=n.util.createBuffer();t.key=null,function f(l){if(l)return r(l);if(c.length()>=e)return r(null,c.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return n.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return u(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,(function(r,n){if(r)return e(r);t.collect(n),u(),e()}))}(f)}));var h=i(t.key,t.seed);t.generated+=h.length,c.putBytes(h),t.key=a(i(t.key,o(t.seed))),t.seed=s(i(t.key,t.seed)),n.util.setImmediate(f)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,a=t.plugin.formatSeed;t.key=null;for(var u=n.util.createBuffer();u.length()<e;){t.generated>1048575&&(t.key=null),null===t.key&&s();var c=r(t.key,t.seed);t.generated+=c.length,u.putBytes(c),t.key=o(r(t.key,i(t.seed))),t.seed=a(r(t.key,t.seed))}return u.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,(function(e,r){if(e)return t(e);t(null,r.toString())}))},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,c(e))}catch(r){t(r)}},t.seedFileSync=c),t.collect=function(e){for(var r=e.length,n=0;n<r;++n)t.pools[t.pool].update(e.substr(n,1)),t.pool=31===t.pool?0:t.pool+1},t.collectInt=function(e,r){for(var n="",i=0;i<r;i+=8)n+=String.fromCharCode(e>>i&255);t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",(function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,(function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})}))}))}},t}}).call(this,r(39))},function(e,t,r){var n=r(18);r(34);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5],a=function(e,t){return e<<t&65535|(65535&e)>>16-t},s=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"===typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,o=e,a=e.length(),s=t,u=Math.ceil(s/8),c=255>>(7&s);for(r=a;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-a)&255]);for(o.setAt(128-u,i[o.at(128-u)&c]),r=127-u;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+u)]);return o};var u=function(e,t,r){var i,u,c,f,l=!1,h=null,d=null,p=null,v=[];for(e=n.rc2.expandKey(e,t),c=0;c<64;c++)v.push(e.getInt16Le());r?(i=function(e){for(c=0;c<4;c++)e[c]+=v[f]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),e[c]=a(e[c],o[c]),f++},u=function(e){for(c=0;c<4;c++)e[c]+=v[63&e[(c+3)%4]]}):(i=function(e){for(c=3;c>=0;c--)e[c]=s(e[c],o[c]),e[c]-=v[f]+(e[(c+3)%4]&e[(c+2)%4])+(~e[(c+3)%4]&e[(c+1)%4]),f--},u=function(e){for(c=3;c>=0;c--)e[c]-=v[63&e[(c+3)%4]]});var y=function(e){var t=[];for(c=0;c<4;c++){var n=h.getInt16Le();null!==p&&(r?n^=p.getInt16Le():p.putInt16Le(n)),t.push(65535&n)}f=r?0:63;for(var i=0;i<e.length;i++)for(var o=0;o<e[i][0];o++)e[i][1](t);for(c=0;c<4;c++)null!==p&&(r?p.putInt16Le(t[c]):t[c]^=p.getInt16Le()),d.putInt16Le(t[c])},b=null;return b={start:function(e,t){e&&"string"===typeof e&&(e=n.util.createBuffer(e)),l=!1,h=n.util.createBuffer(),d=t||new n.util.createBuffer,p=e,b.output=d},update:function(e){for(l||h.putBuffer(e);h.length()>=8;)y([[5,i],[1,u],[6,i],[1,u],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,h,!r);else{var n=8===h.length()?8:8-h.length();h.fillWithByte(n,n)}if(t&&(l=!0,b.update()),!r&&(t=0===h.length()))if(e)t=e(8,d,!r);else{var i=d.length(),o=d.at(i-1);o>i?t=!1:d.truncate(o)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return u(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return u(e,t,!1)}},function(e,t,r){var n=r(18);r(34),r(113),r(767);var i=e.exports=n.pkcs1=n.pkcs1||{};function o(e,t,r){r||(r=n.md.sha1.create());for(var i="",o=Math.ceil(t/r.digestLength),a=0;a<o;++a){var s=String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a);r.start(),r.update(e+s),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,a,s,u;"string"===typeof r?(i=r,a=arguments[3]||void 0,s=arguments[4]||void 0):r&&(i=r.label||void 0,a=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),s?s.start():s=n.md.sha1.create(),u||(u=s);var c=Math.ceil(e.n.bitLength()/8),f=c-2*s.digestLength-2;if(t.length>f)throw(y=new Error("RSAES-OAEP input message length is too long.")).length=t.length,y.maxLength=f,y;i||(i=""),s.update(i,"raw");for(var l=s.digest(),h="",d=f-t.length,p=0;p<d;p++)h+="\0";var v=l.getBytes()+h+"\x01"+t;if(a){if(a.length!==s.digestLength){var y;throw(y=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=a.length,y.digestLength=s.digestLength,y}}else a=n.random.getBytes(s.digestLength);var b=o(a,c-s.digestLength-1,u),g=n.util.xorBytes(v,b,v.length),m=o(g,s.digestLength,u),w=n.util.xorBytes(a,m,a.length);return"\0"+w+g},i.decode_rsa_oaep=function(e,t,r){var i,a,s;"string"===typeof r?(i=r,a=arguments[3]||void 0):r&&(i=r.label||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md));var u=Math.ceil(e.n.bitLength()/8);if(t.length!==u)throw(g=new Error("RSAES-OAEP encoded message length is invalid.")).length=t.length,g.expectedLength=u,g;if(void 0===a?a=n.md.sha1.create():a.start(),s||(s=a),u<2*a.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");i||(i=""),a.update(i,"raw");for(var c=a.digest().getBytes(),f=t.charAt(0),l=t.substring(1,a.digestLength+1),h=t.substring(1+a.digestLength),d=o(h,a.digestLength,s),p=n.util.xorBytes(l,d,l.length),v=o(p,u-a.digestLength-1,s),y=n.util.xorBytes(h,v,h.length),b=y.substring(0,a.digestLength),g="\0"!==f,m=0;m<a.digestLength;++m)g|=c.charAt(m)!==b.charAt(m);for(var w=1,k=a.digestLength,S=a.digestLength;S<y.length;S++){var E=y.charCodeAt(S),_=1&E^1,A=w?65534:0;g|=E&A,k+=w&=_}if(g||1!==y.charCodeAt(k))throw new Error("Invalid RSAES-OAEP padding.");return y.substring(k+1)}},function(e,t,r){var n=r(18);r(112),r(34);var i=e.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){a||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),a=!0);var e=null,t=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o<r;++o)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},i}};return i.start(),i.update=function(o,a){"utf8"===a&&(o=n.util.encodeUtf8(o));var u=o.length;i.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=u[1],u[1]=u[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,u[0]=u[1]/4294967296>>>0;return t.putBytes(o),s(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=n.util.createBuffer();a.putBytes(t.bytes());var u,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;a.putBytes(o.substr(0,i.blockLength-c));for(var f=8*i.fullMessageLength[0],l=0;l<i.fullMessageLength.length-1;++l)f+=(u=8*i.fullMessageLength[l+1])/4294967296>>>0,a.putInt32(f>>>0),f=u>>>0;a.putInt32(f);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};s(h,r,a);var d=n.util.createBuffer();return d.putInt32(h.h0),d.putInt32(h.h1),d.putInt32(h.h2),d.putInt32(h.h3),d.putInt32(h.h4),d},i};var o=null,a=!1;function s(e,t,r){for(var n,i,o,a,s,u,c,f=r.length();f>=64;){for(i=e.h0,o=e.h1,a=e.h2,s=e.h3,u=e.h4,c=0;c<16;++c)n=r.getInt32(),t[c]=n,n=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<20;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<32;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(i<<5|i>>>27)+(o^a^s)+u+1859775393+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<40;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(o^a^s)+u+1859775393+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<60;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(o&a|s&(o^a))+u+2400959708+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;for(;c<80;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(o^a^s)+u+3395469782+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+a|0,e.h3=e.h3+s|0,e.h4=e.h4+u|0,f-=64}}},function(e,t,r){var n=r(18);r(34),r(114),r(113),function(){if(n.prime)e.exports=n.prime;else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],o=new r(null);o.fromInt(30);var a=function(e,t){return e|t};t.generateProbablePrime=function(e,t,i){"function"===typeof t&&(i=t,t={});var o=(t=t||{}).algorithm||"PRIMEINC";"string"===typeof o&&(o={name:o}),o.options=o.options||{};var a=t.prng||n.random,u={nextBytes:function(e){for(var t=a.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}};if("PRIMEINC"===o.name)return function(e,t,i,o){if("workers"in i)return function(e,t,i,o){if("undefined"===typeof Worker)return s(e,t,i,o);var a=c(e,t),u=i.workers,f=i.workLoad||100,l=30*f/8,h=i.workerScript||"forge/prime.worker.js";if(-1===u)return n.util.estimateCores((function(e,t){e&&(t=2),u=t-1,d()}));function d(){u=Math.max(1,u);for(var n=[],i=0;i<u;++i)n[i]=new Worker(h);for(i=0;i<u;++i)n[i].addEventListener("message",d);var s=!1;function d(i){if(!s){0;var u=i.data;if(u.found){for(var h=0;h<n.length;++h)n[h].terminate();return s=!0,o(null,new r(u.prime,16))}a.bitLength()>e&&(a=c(e,t));var d=a.toString(16);i.target.postMessage({hex:d,workLoad:f}),a.dAddOffset(l,0)}}}d()}(e,t,i,o);return s(e,t,i,o)}(e,u,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function s(e,t,r,n){var i=c(e,t),o=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(i.bitLength());"millerRabinTests"in r&&(o=r.millerRabinTests);var a=10;"maxBlockTime"in r&&(a=r.maxBlockTime),u(i,e,t,0,o,a,n)}function u(e,t,r,o,a,s,f){var l=+new Date;do{if(e.bitLength()>t&&(e=c(t,r)),e.isProbablePrime(a))return f(null,e);e.dAddOffset(i[o++%8],0)}while(s<0||+new Date-l<s);n.util.setImmediate((function(){u(e,t,r,o,a,s,f)}))}function c(e,t){var n=new r(e,t),i=e-1;return n.testBit(i)||n.bitwiseTo(r.ONE.shiftLeft(i),a,n),n.dAddOffset(31-n.mod(o).byteValue(),0),n}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(63).base64,a=r(429);e.exports={import:function(){var e=i(n.mark((function e(t,r){var i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.decode(t),s=a.create(),e.next=4,s.decrypt(i,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(49).sha256,u=r(15),c=r(204).equals,f=r(109).toString;r(137),r(430);var l=r(18),h=r(772),d=r(269),p=r(275),v=function(){function e(t){o(this,e),this._key=t}return a(e,[{key:"verify",value:function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndVerify(this._key,r,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"marshal",value:function(){return h.utils.jwkToPkix(this._key)}},{key:"bytes",get:function(){return d.PublicKey.encode({Type:d.KeyType.RSA,Data:this.marshal()}).finish()}},{key:"encrypt",value:function(e){return h.encrypt(this._key,e)}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),y=function(){function e(t,r){o(this,e),this._key=t,this._publicKey=r}return a(e,[{key:"genSecret",value:function(){return h.getRandomValues(16)}},{key:"sign",value:function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndSign(this._key,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"public",get:function(){if(!this._publicKey)throw u(new Error("public key not provided"),"ERR_PUBKEY_NOT_PROVIDED");return new v(this._publicKey)}},{key:"decrypt",value:function(e){return h.decrypt(this._key,e)}},{key:"marshal",value:function(){return h.utils.jwkToPkcs1(this._key)}},{key:"bytes",get:function(){return d.PrivateKey.encode({Type:d.KeyType.RSA,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.public.hash();case 2:return t=e.sent,e.abrupt("return",f(t,"base58btc"));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i,o,a,s,c=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("pkcs-8"!==(r=c.length>1&&void 0!==c[1]?c[1]:"pkcs-8")){e.next=9;break}return i=new l.util.ByteBuffer(this.marshal()),o=l.asn1.fromDer(i),a=l.pki.privateKeyFromAsn1(o),s={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"},e.abrupt("return",l.pki.encryptRsaPrivateKey(a,t,s));case 9:if("libp2p-key"!==r){e.next=13;break}return e.abrupt("return",p.export(this.bytes,t));case 13:throw u(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function b(){return(b=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=h.utils.pkcs1ToJwk(t),e.next=3,h.unmarshalPrivateKey(r);case 3:return i=e.sent,e.abrupt("return",new y(i.privateKey,i.publicKey));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.unmarshalPrivateKey(t);case 2:return r=e.sent,e.abrupt("return",new y(r.privateKey,r.publicKey));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey(t);case 2:return r=e.sent,e.abrupt("return",new y(r.privateKey,r.publicKey));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports={RsaPublicKey:v,RsaPrivateKey:y,unmarshalRsaPublicKey:function(e){var t=h.utils.pkixToJwk(e);return new v(t)},unmarshalRsaPrivateKey:function(e){return b.apply(this,arguments)},generateKeyPair:function(e){return m.apply(this,arguments)},fromJwk:function(e){return g.apply(this,arguments)}}},function(e,t,r){var n=r(18);r(62);var i=n.asn1;t.privateKeyValidator={name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},t.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(202),a=r(273),s=r(109).toString,u=r(110).fromString;function c(e){return Promise.all([o.get().subtle.exportKey("jwk",e.privateKey),o.get().subtle.exportKey("jwk",e.publicKey)])}t.utils=r(773),t.generateKey=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]);case 2:return r=e.sent,e.next=5,c(r);case 5:return i=e.sent,e.abrupt("return",{privateKey:i[0],publicKey:i[1]});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.unmarshalPrivateKey=function(){var e=i(n.mark((function e(t){var r,i,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);case 2:return r=e.sent,e.t0=r,e.next=6,n=t,o.get().subtle.importKey("jwk",{kty:n.kty,n:n.n,e:n.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]);case 6:return e.t1=e.sent,i=[e.t0,e.t1],e.next=10,c({privateKey:i[0],publicKey:i[1]});case 10:return a=e.sent,e.abrupt("return",{privateKey:a[0],publicKey:a[1]});case 12:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),t.getRandomValues=a,t.hashAndSign=function(){var e=i(n.mark((function e(t,r){var i,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]);case 2:return i=e.sent,e.next=5,o.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},i,Uint8Array.from(r));case 5:return a=e.sent,e.abrupt("return",new Uint8Array(a,a.byteOffset,a.byteLength));case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),t.hashAndVerify=function(){var e=i(n.mark((function e(t,r,i){var a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);case 2:return a=e.sent,e.abrupt("return",o.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},a,r,i));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();var f=r(774),l=f.jwk2pub,h=f.jwk2priv;function d(e,t,r,n){var i=t?l(e):h(e),o=n(s(Uint8Array.from(r),"ascii"),i);return u(o,"ascii")}t.encrypt=function(e,t){return d(e,!0,t,(function(e,t){return t.encrypt(e)}))},t.decrypt=function(e,t){return d(e,!1,t,(function(e,t){return t.decrypt(e)}))}},function(e,t,r){"use strict";r(62),r(78);var n=r(18),i=r(274),o=i.bigIntegerToUintBase64url,a=i.base64urlToBigInteger,s=r(110).fromString,u=r(109).toString;t.pkcs1ToJwk=function(e){var t=n.asn1.fromDer(u(e,"ascii")),r=n.pki.privateKeyFromAsn1(t);return{kty:"RSA",n:o(r.n),e:o(r.e),d:o(r.d),p:o(r.p),q:o(r.q),dp:o(r.dP),dq:o(r.dQ),qi:o(r.qInv),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){var t=n.pki.privateKeyToAsn1({n:a(e.n),e:a(e.e),d:a(e.d),p:a(e.p),q:a(e.q),dP:a(e.dp),dQ:a(e.dq),qInv:a(e.qi)});return s(n.asn1.toDer(t).getBytes(),"ascii")},t.pkixToJwk=function(e){var t=n.asn1.fromDer(u(e,"ascii")),r=n.pki.publicKeyFromAsn1(t);return{kty:"RSA",n:o(r.n),e:o(r.e),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){var t=n.pki.publicKeyToAsn1({n:a(e.n),e:a(e.e)});return s(n.asn1.toDer(t).getBytes(),"ascii")}},function(e,t,r){"use strict";var n=r(48);r(78);var i=r(18),o=r(274).base64urlToBigInteger;function a(e,t){return t.map((function(t){return o(e[t])}))}e.exports={jwk2pub:function(e){var t;return(t=i.pki).setRsaPublicKey.apply(t,n(a(e,["n","e"])))},jwk2priv:function(e){var t;return(t=i.pki).setRsaPrivateKey.apply(t,n(a(e,["n","e","d","p","q","dp","dq","qi"])))}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(15),u=r(204).equals,c=r(49).sha256,f=r(58).base58btc,l=r(89).identity,h=r(776),d=r(269),p=r(275),v=function(){function e(t){o(this,e),this._key=m(t,h.publicKeyLength)}return a(e,[{key:"verify",value:function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndVerify(this._key,r,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return d.PublicKey.encode({Type:d.KeyType.Ed25519,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return u(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),y=function(){function e(t,r){o(this,e),this._key=m(t,h.privateKeyLength),this._publicKey=m(r,h.publicKeyLength)}return a(e,[{key:"sign",value:function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndSign(this._key,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"public",get:function(){return new v(this._publicKey)}},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return d.PrivateKey.encode({Type:d.KeyType.Ed25519,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return u(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.digest(this.public.bytes);case 2:return t=e.sent,e.abrupt("return",f.encode(t.bytes).substring(1));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("libp2p-key"!==(r=i.length>1&&void 0!==i[1]?i[1]:"libp2p-key")){e.next=5;break}return e.abrupt("return",p.export(this.bytes,t));case 5:throw s(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function b(){return(b=i(n.mark((function e(){var t,r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey();case 2:return t=e.sent,r=t.privateKey,i=t.publicKey,e.abrupt("return",new y(r,i));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=i(n.mark((function e(t){var r,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKeyFromSeed(t);case 2:return r=e.sent,i=r.privateKey,o=r.publicKey,e.abrupt("return",new y(i,o));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){if((e=Uint8Array.from(e||[])).length!==t)throw s(new Error("Key must be a Uint8Array of length ".concat(t,", got ").concat(e.length)),"ERR_INVALID_KEY_TYPE");return e}e.exports={Ed25519PublicKey:v,Ed25519PrivateKey:y,unmarshalEd25519PrivateKey:function(e){if(e.length>h.privateKeyLength){var t=(e=m(e,h.privateKeyLength+h.publicKeyLength)).slice(0,h.privateKeyLength),r=e.slice(h.privateKeyLength,e.length);return new y(t,r)}var n=(e=m(e,h.privateKeyLength)).slice(0,h.privateKeyLength),i=e.slice(h.publicKeyLength);return new y(n,i)},unmarshalEd25519PublicKey:function(e){return e=m(e,h.publicKeyLength),new v(e)},generateKeyPair:function(){return b.apply(this,arguments)},generateKeyPairFromSeed:function(e){return g.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(0),i=r(6);r(430);var o=r(18);t.publicKeyLength=o.pki.ed25519.constants.PUBLIC_KEY_BYTE_LENGTH,t.privateKeyLength=o.pki.ed25519.constants.PRIVATE_KEY_BYTE_LENGTH,t.generateKey=i(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.pki.ed25519.generateKeyPair());case 1:case"end":return e.stop()}}),e)}))),t.generateKeyFromSeed=function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.pki.ed25519.generateKeyPair({seed:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.hashAndSign=function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.pki.ed25519.sign({message:r,privateKey:t}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),t.hashAndVerify=function(){var e=i(n.mark((function e(t,r,i){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.pki.ed25519.verify({signature:r,message:i,publicKey:t}));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(49).sha256,u=r(15),c=r(204).equals,f=r(109).toString,l=r(275);e.exports=function(e,t,h){h=h||r(778)(t);var d=function(){function t(e){o(this,t),h.validatePublicKey(e),this._key=e}return a(t,[{key:"verify",value:function(e,t){return h.hashAndVerify(this._key,t,e)}},{key:"marshal",value:function(){return h.compressPublicKey(this._key)}},{key:"bytes",get:function(){return e.PublicKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),t}(),p=function(){function t(e,r){o(this,t),this._key=e,this._publicKey=r||h.computePublicKey(e),h.validatePrivateKey(this._key),h.validatePublicKey(this._publicKey)}return a(t,[{key:"sign",value:function(e){return h.hashAndSign(this._key,e)}},{key:"public",get:function(){return new d(this._publicKey)}},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return e.PrivateKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.public.hash();case 2:return t=e.sent,e.abrupt("return",f(t,"base58btc"));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("libp2p-key"!==(r=i.length>1&&void 0!==i[1]?i[1]:"libp2p-key")){e.next=5;break}return e.abrupt("return",l.export(this.bytes,t));case 5:throw u(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),t}();function v(){return(v=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey();case 2:return t=e.sent,e.abrupt("return",new p(t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return{Secp256k1PublicKey:d,Secp256k1PrivateKey:p,unmarshalSecp256k1PrivateKey:function(e){return new p(e)},unmarshalSecp256k1PublicKey:function(e){return new d(e)},generateKeyPair:function(){return v.apply(this,arguments)}}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(165),a=r(49).sha256;e.exports=function(e){function t(){return(t=i(n.mark((function e(t,r){var i,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.digest(r);case 2:return i=e.sent,s=i.digest,u=o.ecdsaSign(s,t),e.abrupt("return",o.signatureExport(u.signature));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function r(){return(r=i(n.mark((function e(t,r,i){var s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.digest(i);case 2:return s=e.sent,u=s.digest,r=o.signatureImport(r),e.abrupt("return",o.ecdsaVerify(r,u,t));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function s(e){if(!o.privateKeyVerify(e))throw new Error("Invalid private key")}return{generateKey:function(){var t;do{t=e(32)}while(!o.privateKeyVerify(t));return t},privateKeyLength:32,hashAndSign:function(e,r){return t.apply(this,arguments)},hashAndVerify:function(e,t,n){return r.apply(this,arguments)},compressPublicKey:function(e){if(!o.publicKeyVerify(e))throw new Error("Invalid public key");return o.publicKeyConvert(e,!0)},decompressPublicKey:function(e){return o.publicKeyConvert(e,!1)},validatePrivateKey:s,validatePublicKey:function(e){if(!o.publicKeyVerify(e))throw new Error("Invalid public key")},computePublicKey:function(e){return s(e),o.publicKeyCreate(e)}}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(15),a=r(203).concat,s=r(110).fromString,u=r(422),c={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=function(){var e=i(n.mark((function e(t,r,i){var f,l,h,d,p,v,y,b,g,m,w,k,S,E,_,A,x;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=c[t]){e.next=4;break}throw l=Object.keys(c).join(" / "),o(new Error("unknown cipher type '".concat(t,"'. Must be ").concat(l)),"ERR_INVALID_CIPHER_TYPE");case 4:if(r){e.next=6;break}throw o(new Error("missing hash type"),"ERR_MISSING_HASH_TYPE");case 6:return h=f.keySize,d=f.ivSize,20,p=s("key expansion"),v=2*(d+h+20),e.next=13,u.create(r,i);case 13:return y=e.sent,e.next=16,y.digest(p);case 16:b=e.sent,g=[],m=0;case 19:if(!(m<v)){e.next=32;break}return e.next=22,y.digest(a([b,p]));case 22:return w=e.sent,k=w.length,m+k>v&&(k=v-m),g.push(w),m+=k,e.next=29,y.digest(b);case 29:b=e.sent,e.next=19;break;case 32:return S=v/2,E=a(g),_=E.slice(0,S),A=E.slice(S,v),x=function(e){return{iv:e.slice(0,d),cipherKey:e.slice(d,d+h),macKey:e.slice(d+h)}},e.abrupt("return",{k1:x(_),k2:x(A)});case 38:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(781);e.exports=function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.generateEphmeralKeyPair(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(29),i=r(0),o=r(6),a=r(15),s=r(202),u=r(274).base64urlToBuffer,c=r(782),f=r(109).toString,l=r(203).concat,h=r(204).equals,d={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(){var e=o(i.mark((function e(t){var r,n,a;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(Object.keys(d),t),e.next=3,s.get().subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]);case 3:return r=e.sent,n=function(){var e=o(i.mark((function e(n,o){var a,u,c;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=6;break}return e.next=3,s.get().subtle.importKey("jwk",b(t,o),{name:"ECDH",namedCurve:t},!1,["deriveBits"]);case 3:a=e.sent,e.next=7;break;case 6:a=r.privateKey;case 7:return e.next=9,s.get().subtle.importKey("jwk",y(t,n),{name:"ECDH",namedCurve:t},!1,[]);case 9:return e.t0=e.sent,e.t1=a,u=[e.t0,e.t1],e.next=14,s.get().subtle.deriveBits({name:"ECDH",namedCurve:t,public:u[0]},u[1],d[t]);case 14:return c=e.sent,e.abrupt("return",new Uint8Array(c,c.byteOffset,c.byteLength));case 16:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),e.next=7,s.get().subtle.exportKey("jwk",r.publicKey);case 7:return a=e.sent,e.abrupt("return",{key:v(a),genSharedKey:n});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var p={"P-256":32,"P-384":48,"P-521":66};function v(e){var t=p[e.crv];return l([Uint8Array.from([4]),u(e.x,t),u(e.y,t)],1+2*t)}function y(e,t){var r=p[e];if(h(!t.slice(0,1),Uint8Array.from([4])))throw a(new Error("Cannot unmarshal public key - invalid key format"),"ERR_INVALID_KEY_FORMAT");return{kty:"EC",crv:e,x:f(t.slice(1,r+1),"base64url"),y:f(t.slice(1+r),"base64url"),ext:!0}}var b=function(e,t){return n(n({},y(e,t.public)),{},{d:f(t.private,"base64url")})}},function(e,t,r){"use strict";var n=r(15);e.exports=function(e,t){if(!e.includes(t)){var r=e.join(" / ");throw n(new Error("Unknown curve: ".concat(t,". Must be ").concat(r)),"ERR_INVALID_CURVE")}}},function(e,t,r){"use strict";var n=r(428),i=r(34),o=r(15),a={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};e.exports=function(e,t,r,s,u){var c=a[u];if(!c){var f=Object.keys(a).join(" / ");throw o(new Error("Hash '".concat(u,"' is unknown or not supported. Must be ").concat(f)),"ERR_UNSUPPORTED_HASH_TYPE")}var l=n(e,t,r,s,c);return i.encode64(l)}},function(e,t,r){"use strict";var n=r(276),i=r(789),o=r(793).names,a=r(794).toString,s=r(795).fromString,u=r(796).concat,c={};for(var f in o){var l=f;c[o[l]]=l}function h(e){if(!(e instanceof Uint8Array))throw new Error("multihash must be a Uint8Array");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");var t=i.decode(e);if(!v(t))throw new Error("multihash unknown function code: 0x".concat(t.toString(16)));e=e.slice(i.decode.bytes);var r=i.decode(e);if(r<0)throw new Error("multihash invalid length: ".concat(r));if((e=e.slice(i.decode.bytes)).length!==r)throw new Error("multihash length inconsistent: 0x".concat(a(e,"base16")));return{code:t,name:c[t],length:r,digest:e}}function d(e){var t=e;if("string"===typeof e){if(void 0===o[e])throw new Error("Unrecognized hash function named: ".concat(e));t=o[e]}if("number"!==typeof t)throw new Error("Hash function code should be a number. Got: ".concat(t));if(void 0===c[t]&&!p(t))throw new Error("Unrecognized function code: ".concat(t));return t}function p(e){return e>0&&e<16}function v(e){return!!p(e)||!!c[e]}function y(e){h(e)}Object.freeze(c),e.exports={names:o,codes:c,toHexString:function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return a(e,"base16")},fromHexString:function(e){return s(e,"base16")},toB58String:function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return a(n.encode("base58btc",e)).slice(1)},fromB58String:function(e){var t=e instanceof Uint8Array?a(e):e;return n.decode("z"+t)},decode:h,encode:function(e,t,r){if(!e||void 0===t)throw new Error("multihash encode requires at least two args: digest, code");var n=d(t);if(!(e instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(null==r&&(r=e.length),r&&e.length!==r)throw new Error("digest length should be equal to specified length.");var o=i.encode(n),a=i.encode(r);return u([o,a,e],o.length+a.length+e.length)},coerceCode:d,isAppCode:p,validate:y,prefix:function(e){return y(e),e.subarray(0,2)},isValidCode:v}},function(e,t,r){"use strict";var n=r(786),i=r(787),o=r(788).rfc4648,a=r(277),s=a.decodeText,u=a.encodeText,c=[["identity","\0",function(){return{encode:s,decode:u}},""],["base2","0",o(1),"01"],["base8","7",o(3),"01234567"],["base10","9",n,"0123456789"],["base16","f",o(4),"0123456789abcdef"],["base16upper","F",o(4),"0123456789ABCDEF"],["base32hex","v",o(5),"0123456789abcdefghijklmnopqrstuv"],["base32hexupper","V",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV"],["base32hexpad","t",o(5),"0123456789abcdefghijklmnopqrstuv="],["base32hexpadupper","T",o(5),"0123456789ABCDEFGHIJKLMNOPQRSTUV="],["base32","b",o(5),"abcdefghijklmnopqrstuvwxyz234567"],["base32upper","B",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"],["base32pad","c",o(5),"abcdefghijklmnopqrstuvwxyz234567="],["base32padupper","C",o(5),"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="],["base32z","h",o(5),"ybndrfg8ejkmcpqxot1uwisza345h769"],["base36","k",n,"0123456789abcdefghijklmnopqrstuvwxyz"],["base36upper","K",n,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["base58btc","z",n,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base58flickr","Z",n,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base64","m",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",o(6),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],f=c.reduce((function(e,t){return e[t[0]]=new i(t[0],t[1],t[2],t[3]),e}),{}),l=c.reduce((function(e,t){return e[t[1]]=f[t[0]],e}),{});e.exports={names:f,codes:l}},function(e,t,r){"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),o=i.charCodeAt(0);if(255!==t[o])throw new TypeError(i+" is ambiguous");t[o]=n}var a=e.length,s=e.charAt(0),u=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function f(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var r=0;if(" "!==e[r]){for(var n=0,i=0;e[r]===s;)n++,r++;for(var o=(e.length-r)*u+1>>>0,c=new Uint8Array(o);e[r];){var f=t[e.charCodeAt(r)];if(255===f)return;for(var l=0,h=o-1;(0!==f||l<i)&&-1!==h;h--,l++)f+=a*c[h]>>>0,c[h]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");i=l,r++}if(" "!==e[r]){for(var d=o-i;d!==o&&0===c[d];)d++;for(var p=new Uint8Array(n+(o-d)),v=n;d!==o;)p[v++]=c[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var u=(o-i)*c+1>>>0,f=new Uint8Array(u);i!==o;){for(var l=t[i],h=0,d=u-1;(0!==l||h<n)&&-1!==d;d--,h++)l+=256*f[d]>>>0,f[d]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=h,i++}for(var p=u-n;p!==u&&0===f[p];)p++;for(var v=s.repeat(r);p<u;++p)v+=e.charAt(f[p]);return v},decodeUnsafe:f,decode:function(e){var t=f(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},function(e,t,r){"use strict";var n=r(21),i=r(8),o=r(9),a=r(277).encodeText,s=function(){function e(t,r,n,o){i(this,e),this.name=t,this.code=r,this.codeBuf=a(this.code),this.alphabet=o,this.codec=n(o)}return o(e,[{key:"encode",value:function(e){return this.codec.encode(e)}},{key:"decode",value:function(e){var t,r=n(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(this.alphabet&&this.alphabet.indexOf(i)<0)throw new Error("invalid character '".concat(i,"' in '").concat(e,"'"))}}catch(o){r.e(o)}finally{r.f()}return this.codec.decode(e)}}]),e}();e.exports=s},function(e,t,r){"use strict";e.exports={rfc4648:function(e){return function(t){return{encode:function(r){return function(e,t,r){for(var n="="===t[t.length-1],i=(1<<r)-1,o="",a=0,s=0,u=0;u<e.length;++u)for(s=s<<8|e[u],a+=8;a>r;)o+=t[i&s>>(a-=r)];if(a&&(o+=t[i&s<<r-a]),n)for(;o.length*r&7;)o+="=";return o}(r,t,e)},decode:function(r){return function(e,t,r){for(var n={},i=0;i<t.length;++i)n[t[i]]=i;for(var o=e.length;"="===e[o-1];)--o;for(var a=new Uint8Array(o*r/8|0),s=0,u=0,c=0,f=0;f<o;++f){var l=n[e[f]];if(void 0===l)throw new SyntaxError("Invalid character "+e[f]);u=u<<r|l,(s+=r)>=8&&(s-=8,a[c++]=255&u>>s)}if(s>=r||255&u<<8-s)throw new SyntaxError("Unexpected end of data");return a}(r,t,e)}}}}}},function(e,t,r){e.exports={encode:r(790),decode:r(791),encodingLength:r(792)}},function(e,t){e.exports=function e(t,n,i){n=n||[];var o=i=i||0;for(;t>=r;)n[i++]=255&t|128,t/=128;for(;-128&t;)n[i++]=255&t|128,t>>>=7;return n[i]=0|t,e.bytes=i-o+1,n};var r=Math.pow(2,31)},function(e,t){e.exports=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=a-r,i}},function(e,t){var r=Math.pow(2,7),n=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),a=Math.pow(2,35),s=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),f=Math.pow(2,63);e.exports=function(e){return e<r?1:e<n?2:e<i?3:e<o?4:e<a?5:e<s?6:e<u?7:e<c?8:e<f?9:10}},function(e,t,r){"use strict";var n=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,"murmur3-128":34,"murmur3-32":35,"dbl-sha2-256":86,md4:212,md5:213,bmt:214,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082});e.exports={names:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(431);t.toString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.encoder.encode(e).substring(1)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(431);t.fromString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.decoder.decode("".concat(r.prefix).concat(e))}},function(e,t,r){"use strict";var n=r(21);Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e,t){t||(t=e.reduce((function(e,t){return e+t.length}),0));var r,i=new Uint8Array(t),o=0,a=n(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-peer-id"]||(n.roots["libp2p-peer-id"]={});s.PeerIdProto=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.id=a.newBuffer([]),e.prototype.pubKey=a.newBuffer([]),e.prototype.privKey=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(10).bytes(e.id),null!=e.pubKey&&Object.hasOwnProperty.call(e,"pubKey")&&t.uint32(18).bytes(e.pubKey),null!=e.privKey&&Object.hasOwnProperty.call(e,"privKey")&&t.uint32(26).bytes(e.privKey),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PeerIdProto;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.id=e.bytes();break;case 2:n.pubKey=e.bytes();break;case 3:n.privKey=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("id"))throw a.ProtocolError("missing required 'id'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PeerIdProto)return e;var t=new s.PeerIdProto;return null!=e.id&&("string"===typeof e.id?a.base64.decode(e.id,t.id=a.newBuffer(a.base64.length(e.id)),0):e.id.length&&(t.id=e.id)),null!=e.pubKey&&("string"===typeof e.pubKey?a.base64.decode(e.pubKey,t.pubKey=a.newBuffer(a.base64.length(e.pubKey)),0):e.pubKey.length&&(t.pubKey=e.pubKey)),null!=e.privKey&&("string"===typeof e.privKey?a.base64.decode(e.privKey,t.privKey=a.newBuffer(a.base64.length(e.privKey)),0):e.privKey.length&&(t.privKey=e.privKey)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.id="":(r.id=[],t.bytes!==Array&&(r.id=a.newBuffer(r.id))),t.bytes===String?r.pubKey="":(r.pubKey=[],t.bytes!==Array&&(r.pubKey=a.newBuffer(r.pubKey))),t.bytes===String?r.privKey="":(r.privKey=[],t.bytes!==Array&&(r.privKey=a.newBuffer(r.privKey)))),null!=e.id&&e.hasOwnProperty("id")&&(r.id=t.bytes===String?a.base64.encode(e.id,0,e.id.length):t.bytes===Array?Array.prototype.slice.call(e.id):e.id),null!=e.pubKey&&e.hasOwnProperty("pubKey")&&(r.pubKey=t.bytes===String?a.base64.encode(e.pubKey,0,e.pubKey.length):t.bytes===Array?Array.prototype.slice.call(e.pubKey):e.pubKey),null!=e.privKey&&e.hasOwnProperty("privKey")&&(r.privKey=t.bytes===String?a.base64.encode(e.privKey,0,e.privKey.length):t.bytes===Array?Array.prototype.slice.call(e.privKey):e.privKey),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.equals=function(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(432);t.fromString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.decoder.decode("".concat(r.prefix).concat(e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(432);t.toString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=n[t];if(!r)throw new Error('Unsupported encoding "'.concat(t,'"'));return r.encoder.encode(e).substring(1)}},,,function(e,t,r){"use strict";var n=r(21),i=r(804),o=r(811),a=r(435),s=a.AbortError,u=a.ResponseError,c=a.Endpoint,f=a.endpoints,l=/^((\d{1,3}\.){3,3}\d{1,3})(:(\d{2,5}))?$/,h=/^((::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?)(:(\d{2,5}))?$/i;function d(e,t,r,n){return n&&n.aborted?Promise.reject(new s):"udp4:"===e.protocol||"udp6:"===e.protocol?o.queryDns(e,t,r,n):function(e,t,r,n){var a=e.protocol||"https:";return new Promise((function(s,c){o.request(a,e.host,e.port?parseInt(e.port,10):"https:"===a?443:80,e.path||"/dns-query",/^post$/i.test(e.method)?"POST":"GET",i.encode(Object.assign({flags:i.RECURSION_DESIRED,type:"query"},t)),r,n,(function(t,r,n){var o;if(null===t)if(0===r.length)t=new u("Empty.");else try{o=i.decode(r)}catch(a){t=new u("Invalid packet (cause="+a.message+")",a)}null!==t?c(Object.assign(t,{response:n,endpoint:e})):(o.endpoint=e,o.response=n,s(o))}))}))}(e,t,r,n)}function p(e,t){var r;t=Object.assign({retries:5,timeout:3e4},t);try{if(!(r="doh"===t.endpoints?o.endpoints({doh:!0,dns:!1}):"dns"===t.endpoints?o.endpoints({doh:!1,dns:!0}):v(t.endpoints)||o.endpoints({doh:!0,dns:!0}))||0===r.length)throw new Error("No endpoints defined.")}catch(n){return Promise.reject(n)}return function(e,t,r){var n=1===e.length?e[0]:e[Math.floor(Math.random()*e.length)%e.length];return d(n,t,r.timeout,r.signal).then((function(e){return e.endpoint=n,e}),(function(e){if("AbortError"===e.name||0===r.retries)throw e;return r.retries>0&&(r.retries-=1),p(t,r)}))}(r,e,t)}function v(e){if(e){if("function"!==typeof e[Symbol.iterator]||"string"===typeof e)throw new Error("Endpoints needs to be iterable.");var t,r=[],i=n(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;"object"===typeof o?(o instanceof c||(o=new c(o)),r.push(o)):"string"===typeof o&&r.push(f[o]||y(o))}}catch(a){i.e(a)}finally{i.f()}return r}}function y(e){var t,r,n=/^(([^:]+?:)\/\/)?([^/]*?)(\/.*?)?(\s\[(post|get)\])?$/i.exec(e),i=n[2]||"https:",o=1,a=h.exec(n[3]);if(a){var s=l.exec(n[3]);s?(t=s[1],s[4]&&(r=parseInt(s[4]))):(o=2,t=a[1],a[9]&&(r=parseInt(a[10])))}else{var u=/^([^:]*)(:(.*))?$/.exec(n[3]);t=u[1],u[3]&&(r=parseInt(u[3]))}return"udp:"===i&&(i=2===o?"udp6:":"udp4:"),new c({protocol:i,host:t,port:r,path:n[4],method:n[6]})}e.exports={query:p,endpoints:f,parseEndpoints:v,AbortError:s,ResponseError:u,TimeoutError:a.TimeoutError,HTTPStatusError:a.HTTPStatusError,Endpoint:c}},function(e,t,r){"use strict";var n=r(21),i=r(13).Buffer,o=r(805),a=r(806),s=r(807),u=r(808),c=r(809),f=r(810),l=32768,h=t.name={};h.encode=function(e,t,r){t||(t=i.alloc(h.encodingLength(e))),r||(r=0);var n=r,o=e.replace(/^\.|\.$/gm,"");if(o.length)for(var a=o.split("."),s=0;s<a.length;s++){var u=t.write(a[s],r+1);t[r]=u,r+=u+1}return t[r++]=0,h.encode.bytes=r-n,t},h.encode.bytes=0,h.decode=function(e,t){t||(t=0);for(var r=[],n=t,i=0,o=0,a=!1;;){if(t>=e.length)throw new Error("Cannot decode name (buffer overflow)");var s=e[t++];if(o+=a?0:1,0===s)break;if(0===(192&s)){if(t+s>e.length)throw new Error("Cannot decode name (buffer overflow)");if((i+=s+1)>254)throw new Error("Cannot decode name (name too long)");r.push(e.toString("utf-8",t,t+s)),t+=s,o+=a?0:s}else{if(192!==(192&s))throw new Error("Cannot decode name (bad label)");if(t+1>e.length)throw new Error("Cannot decode name (buffer overflow)");var u=e.readUInt16BE(t-1)-49152;if(u>=n)throw new Error("Cannot decode name (bad pointer)");t=u,n=u,o+=a?0:1,a=!0}}return h.decode.bytes=o,0===r.length?".":r.join(".")},h.decode.bytes=0,h.encodingLength=function(e){return"."===e||".."===e?1:i.byteLength(e.replace(/^\.|\.$/gm,""))+2};var d={encode:function(e,t,r){t||(t=i.alloc(d.encodingLength(e))),r||(r=0);var n=t.write(e,r+1);return t[r]=n,d.encode.bytes=n+1,t}};d.encode.bytes=0,d.decode=function(e,t){t||(t=0);var r=e[t],n=e.toString("utf-8",t+1,t+1+r);return d.decode.bytes=r+1,n},d.decode.bytes=0,d.encodingLength=function(e){return i.byteLength(e)+1};var p={encode:function(e,t,r){t||(t=p.encodingLength(e)),r||(r=0);var n=32767&(e.flags||0),i="response"===e.type?32768:0;return t.writeUInt16BE(e.id||0,r),t.writeUInt16BE(n|i,r+2),t.writeUInt16BE(e.questions.length,r+4),t.writeUInt16BE(e.answers.length,r+6),t.writeUInt16BE(e.authorities.length,r+8),t.writeUInt16BE(e.additionals.length,r+10),t}};p.encode.bytes=12,p.decode=function(e,t){if(t||(t=0),e.length<12)throw new Error("Header must be 12 bytes");var r=e.readUInt16BE(t+2);return{id:e.readUInt16BE(t),type:32768&r?"response":"query",flags:32767&r,flag_qr:1===(r>>15&1),opcode:s.toString(r>>11&15),flag_aa:1===(r>>10&1),flag_tc:1===(r>>9&1),flag_rd:1===(r>>8&1),flag_ra:1===(r>>7&1),flag_z:1===(r>>6&1),flag_ad:1===(r>>5&1),flag_cd:1===(r>>4&1),rcode:a.toString(15&r),questions:new Array(e.readUInt16BE(t+4)),answers:new Array(e.readUInt16BE(t+6)),authorities:new Array(e.readUInt16BE(t+8)),additionals:new Array(e.readUInt16BE(t+10))}},p.decode.bytes=12,p.encodingLength=function(){return 12};var v=t.unknown={};v.encode=function(e,t,r){return t||(t=i.alloc(v.encodingLength(e))),r||(r=0),t.writeUInt16BE(e.length,r),e.copy(t,r+2),v.encode.bytes=e.length+2,t},v.encode.bytes=0,v.decode=function(e,t){t||(t=0);var r=e.readUInt16BE(t),n=e.slice(t+2,t+2+r);return v.decode.bytes=r+2,n},v.decode.bytes=0,v.encodingLength=function(e){return e.length+2};var y=t.ns={};y.encode=function(e,t,r){return t||(t=i.alloc(y.encodingLength(e))),r||(r=0),h.encode(e,t,r+2),t.writeUInt16BE(h.encode.bytes,r),y.encode.bytes=h.encode.bytes+2,t},y.encode.bytes=0,y.decode=function(e,t){t||(t=0);var r=e.readUInt16BE(t),n=h.decode(e,t+2);return y.decode.bytes=r+2,n},y.decode.bytes=0,y.encodingLength=function(e){return h.encodingLength(e)+2};var b=t.soa={};b.encode=function(e,t,r){t||(t=i.alloc(b.encodingLength(e))),r||(r=0);var n=r;return r+=2,h.encode(e.mname,t,r),r+=h.encode.bytes,h.encode(e.rname,t,r),r+=h.encode.bytes,t.writeUInt32BE(e.serial||0,r),r+=4,t.writeUInt32BE(e.refresh||0,r),r+=4,t.writeUInt32BE(e.retry||0,r),r+=4,t.writeUInt32BE(e.expire||0,r),r+=4,t.writeUInt32BE(e.minimum||0,r),r+=4,t.writeUInt16BE(r-n-2,n),b.encode.bytes=r-n,t},b.encode.bytes=0,b.decode=function(e,t){t||(t=0);var r=t,n={};return t+=2,n.mname=h.decode(e,t),t+=h.decode.bytes,n.rname=h.decode(e,t),t+=h.decode.bytes,n.serial=e.readUInt32BE(t),t+=4,n.refresh=e.readUInt32BE(t),t+=4,n.retry=e.readUInt32BE(t),t+=4,n.expire=e.readUInt32BE(t),t+=4,n.minimum=e.readUInt32BE(t),t+=4,b.decode.bytes=t-r,n},b.decode.bytes=0,b.encodingLength=function(e){return 22+h.encodingLength(e.mname)+h.encodingLength(e.rname)};var g=t.txt={};g.encode=function(e,t,r){Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)if("string"===typeof e[n]&&(e[n]=i.from(e[n])),!i.isBuffer(e[n]))throw new Error("Must be a Buffer");t||(t=i.alloc(g.encodingLength(e))),r||(r=0);var o=r;return r+=2,e.forEach((function(e){t[r++]=e.length,e.copy(t,r,0,e.length),r+=e.length})),t.writeUInt16BE(r-o-2,o),g.encode.bytes=r-o,t},g.encode.bytes=0,g.decode=function(e,t){t||(t=0);var r=t,n=e.readUInt16BE(t);t+=2;for(var i=[];n>0;){var o=e[t++];if(--n<o)throw new Error("Buffer overflow");i.push(e.slice(t,t+o)),t+=o,n-=o}return g.decode.bytes=t-r,i},g.decode.bytes=0,g.encodingLength=function(e){Array.isArray(e)||(e=[e]);var t=2;return e.forEach((function(e){t+="string"===typeof e?i.byteLength(e)+1:e.length+1})),t};var m=t.null={};m.encode=function(e,t,r){t||(t=i.alloc(m.encodingLength(e))),r||(r=0),"string"===typeof e&&(e=i.from(e)),e||(e=i.alloc(0));var n=r;r+=2;var o=e.length;return e.copy(t,r,0,o),r+=o,t.writeUInt16BE(r-n-2,n),m.encode.bytes=r-n,t},m.encode.bytes=0,m.decode=function(e,t){t||(t=0);var r=t,n=e.readUInt16BE(t);t+=2;var i=e.slice(t,t+n);return t+=n,m.decode.bytes=t-r,i},m.decode.bytes=0,m.encodingLength=function(e){return e?(i.isBuffer(e)?e.length:i.byteLength(e))+2:2};var w=t.hinfo={};w.encode=function(e,t,r){t||(t=i.alloc(w.encodingLength(e))),r||(r=0);var n=r;return r+=2,d.encode(e.cpu,t,r),r+=d.encode.bytes,d.encode(e.os,t,r),r+=d.encode.bytes,t.writeUInt16BE(r-n-2,n),w.encode.bytes=r-n,t},w.encode.bytes=0,w.decode=function(e,t){t||(t=0);var r=t,n={};return t+=2,n.cpu=d.decode(e,t),t+=d.decode.bytes,n.os=d.decode(e,t),t+=d.decode.bytes,w.decode.bytes=t-r,n},w.decode.bytes=0,w.encodingLength=function(e){return d.encodingLength(e.cpu)+d.encodingLength(e.os)+2};var k=t.ptr={},S=t.cname=k,E=t.dname=k;k.encode=function(e,t,r){return t||(t=i.alloc(k.encodingLength(e))),r||(r=0),h.encode(e,t,r+2),t.writeUInt16BE(h.encode.bytes,r),k.encode.bytes=h.encode.bytes+2,t},k.encode.bytes=0,k.decode=function(e,t){t||(t=0);var r=h.decode(e,t+2);return k.decode.bytes=h.decode.bytes+2,r},k.decode.bytes=0,k.encodingLength=function(e){return h.encodingLength(e)+2};var _=t.srv={};_.encode=function(e,t,r){t||(t=i.alloc(_.encodingLength(e))),r||(r=0),t.writeUInt16BE(e.priority||0,r+2),t.writeUInt16BE(e.weight||0,r+4),t.writeUInt16BE(e.port||0,r+6),h.encode(e.target,t,r+8);var n=h.encode.bytes+6;return t.writeUInt16BE(n,r),_.encode.bytes=n+2,t},_.encode.bytes=0,_.decode=function(e,t){t||(t=0);var r=e.readUInt16BE(t),n={};return n.priority=e.readUInt16BE(t+2),n.weight=e.readUInt16BE(t+4),n.port=e.readUInt16BE(t+6),n.target=h.decode(e,t+8),_.decode.bytes=r+2,n},_.decode.bytes=0,_.encodingLength=function(e){return 8+h.encodingLength(e.target)};var A=t.caa={};A.ISSUER_CRITICAL=128,A.encode=function(e,t,r){var n=A.encodingLength(e);return t||(t=i.alloc(A.encodingLength(e))),r||(r=0),e.issuerCritical&&(e.flags=A.ISSUER_CRITICAL),t.writeUInt16BE(n-2,r),r+=2,t.writeUInt8(e.flags||0,r),r+=1,d.encode(e.tag,t,r),r+=d.encode.bytes,t.write(e.value,r),r+=i.byteLength(e.value),A.encode.bytes=n,t},A.encode.bytes=0,A.decode=function(e,t){t||(t=0);var r=e.readUInt16BE(t),n=t+=2,i={};return i.flags=e.readUInt8(t),t+=1,i.tag=d.decode(e,t),t+=d.decode.bytes,i.value=e.toString("utf-8",t,n+r),i.issuerCritical=!!(i.flags&A.ISSUER_CRITICAL),A.decode.bytes=r+2,i},A.decode.bytes=0,A.encodingLength=function(e){return d.encodingLength(e.tag)+d.encodingLength(e.value)+2};var x=t.mx={};x.encode=function(e,t,r){t||(t=i.alloc(x.encodingLength(e))),r||(r=0);var n=r;return r+=2,t.writeUInt16BE(e.preference||0,r),r+=2,h.encode(e.exchange,t,r),r+=h.encode.bytes,t.writeUInt16BE(r-n-2,n),x.encode.bytes=r-n,t},x.encode.bytes=0,x.decode=function(e,t){t||(t=0);var r=t,n={};return t+=2,n.preference=e.readUInt16BE(t),t+=2,n.exchange=h.decode(e,t),t+=h.decode.bytes,x.decode.bytes=t-r,n},x.encodingLength=function(e){return 4+h.encodingLength(e.exchange)};var T=t.a={};T.encode=function(e,t,r){return t||(t=i.alloc(T.encodingLength(e))),r||(r=0),t.writeUInt16BE(4,r),r+=2,f.v4.encode(e,t,r),T.encode.bytes=6,t},T.encode.bytes=0,T.decode=function(e,t){t||(t=0),t+=2;var r=f.v4.decode(e,t);return T.decode.bytes=6,r},T.decode.bytes=0,T.encodingLength=function(){return 6};var M=t.aaaa={};M.encode=function(e,t,r){return t||(t=i.alloc(M.encodingLength(e))),r||(r=0),t.writeUInt16BE(16,r),r+=2,f.v6.encode(e,t,r),M.encode.bytes=18,t},M.encode.bytes=0,M.decode=function(e,t){t||(t=0),t+=2;var r=f.v6.decode(e,t);return M.decode.bytes=18,r},M.decode.bytes=0,M.encodingLength=function(){return 18};var C=t.option={};C.encode=function(e,t,r){t||(t=i.alloc(C.encodingLength(e))),r||(r=0);var o=r,a=c.toCode(e.code);if(t.writeUInt16BE(a,r),r+=2,e.data)t.writeUInt16BE(e.data.length,r),r+=2,e.data.copy(t,r),r+=e.data.length;else switch(a){case 8:var s=e.sourcePrefixLength||0,u=e.family||f.familyOf(e.ip),l=f.encode(e.ip,i.alloc),h=Math.ceil(s/8);t.writeUInt16BE(h+4,r),r+=2,t.writeUInt16BE(u,r),r+=2,t.writeUInt8(s,r++),t.writeUInt8(e.scopePrefixLength||0,r++),l.copy(t,r,0,h),r+=h;break;case 11:e.timeout?(t.writeUInt16BE(2,r),r+=2,t.writeUInt16BE(e.timeout,r),r+=2):(t.writeUInt16BE(0,r),r+=2);break;case 12:var d=e.length||0;t.writeUInt16BE(d,r),r+=2,t.fill(0,r,r+d),r+=d;break;case 14:var p=2*e.tags.length;t.writeUInt16BE(p,r),r+=2;var v,y=n(e.tags);try{for(y.s();!(v=y.n()).done;){var b=v.value;t.writeUInt16BE(b,r),r+=2}}catch(g){y.e(g)}finally{y.f()}break;default:throw new Error("Unknown roption code: ".concat(e.code))}return C.encode.bytes=r-o,t},C.encode.bytes=0,C.decode=function(e,t){t||(t=0);var r={};r.code=e.readUInt16BE(t),r.type=c.toString(r.code),t+=2;var n=e.readUInt16BE(t);switch(t+=2,r.data=e.slice(t,t+n),r.code){case 8:r.family=e.readUInt16BE(t),t+=2,r.sourcePrefixLength=e.readUInt8(t++),r.scopePrefixLength=e.readUInt8(t++);var o=i.alloc(1===r.family?4:16);e.copy(o,0,t,t+n-4),r.ip=f.decode(o);break;case 11:n>0&&(r.timeout=e.readUInt16BE(t),t+=2);break;case 14:r.tags=[];for(var a=0;a<n;a+=2)r.tags.push(e.readUInt16BE(t)),t+=2}return C.decode.bytes=n+4,r},C.decode.bytes=0,C.encodingLength=function(e){if(e.data)return e.data.length+4;switch(c.toCode(e.code)){case 8:var t=e.sourcePrefixLength||0;return Math.ceil(t/8)+8;case 11:return"number"===typeof e.timeout?6:4;case 12:return e.length+4;case 14:return 4+2*e.tags.length}throw new Error("Unknown roption code: ".concat(e.code))};var O=t.opt={};O.encode=function(e,t,r){t||(t=i.alloc(O.encodingLength(e))),r||(r=0);var n=r,o=K(e,C);return t.writeUInt16BE(o,r),r=z(e,C,t,r+2),O.encode.bytes=r-n,t},O.encode.bytes=0,O.decode=function(e,t){t||(t=0);var r=t,n=[],i=e.readUInt16BE(t);t+=2;for(var o=0;i>0;)n[o++]=C.decode(e,t),t+=C.decode.bytes,i-=C.decode.bytes;return O.decode.bytes=t-r,n},O.decode.bytes=0,O.encodingLength=function(e){return 2+K(e||[],C)};var I=t.dnskey={};I.PROTOCOL_DNSSEC=3,I.ZONE_KEY=128,I.SECURE_ENTRYPOINT=32768,I.encode=function(e,t,r){t||(t=i.alloc(I.encodingLength(e))),r||(r=0);var n=r,o=e.key;if(!i.isBuffer(o))throw new Error("Key must be a Buffer");return r+=2,t.writeUInt16BE(e.flags,r),r+=2,t.writeUInt8(I.PROTOCOL_DNSSEC,r),r+=1,t.writeUInt8(e.algorithm,r),r+=1,o.copy(t,r,0,o.length),r+=o.length,I.encode.bytes=r-n,t.writeUInt16BE(I.encode.bytes-2,n),t},I.encode.bytes=0,I.decode=function(e,t){t||(t=0);var r=t,n={},i=e.readUInt16BE(t);if(t+=2,n.flags=e.readUInt16BE(t),t+=2,e.readUInt8(t)!==I.PROTOCOL_DNSSEC)throw new Error("Protocol must be 3");return t+=1,n.algorithm=e.readUInt8(t),t+=1,n.key=e.slice(t,r+i+2),t+=n.key.length,I.decode.bytes=t-r,n},I.decode.bytes=0,I.encodingLength=function(e){return 6+i.byteLength(e.key)};var P=t.rrsig={};P.encode=function(e,t,r){t||(t=i.alloc(P.encodingLength(e))),r||(r=0);var n=r,a=e.signature;if(!i.isBuffer(a))throw new Error("Signature must be a Buffer");return r+=2,t.writeUInt16BE(o.toType(e.typeCovered),r),r+=2,t.writeUInt8(e.algorithm,r),r+=1,t.writeUInt8(e.labels,r),r+=1,t.writeUInt32BE(e.originalTTL,r),r+=4,t.writeUInt32BE(e.expiration,r),r+=4,t.writeUInt32BE(e.inception,r),r+=4,t.writeUInt16BE(e.keyTag,r),r+=2,h.encode(e.signersName,t,r),r+=h.encode.bytes,a.copy(t,r,0,a.length),r+=a.length,P.encode.bytes=r-n,t.writeUInt16BE(P.encode.bytes-2,n),t},P.encode.bytes=0,P.decode=function(e,t){t||(t=0);var r=t,n={},i=e.readUInt16BE(t);return t+=2,n.typeCovered=o.toString(e.readUInt16BE(t)),t+=2,n.algorithm=e.readUInt8(t),t+=1,n.labels=e.readUInt8(t),t+=1,n.originalTTL=e.readUInt32BE(t),t+=4,n.expiration=e.readUInt32BE(t),t+=4,n.inception=e.readUInt32BE(t),t+=4,n.keyTag=e.readUInt16BE(t),t+=2,n.signersName=h.decode(e,t),t+=h.decode.bytes,n.signature=e.slice(t,r+i+2),t+=n.signature.length,P.decode.bytes=t-r,n},P.decode.bytes=0,P.encodingLength=function(e){return 20+h.encodingLength(e.signersName)+i.byteLength(e.signature)};var R=t.rp={};R.encode=function(e,t,r){t||(t=i.alloc(R.encodingLength(e))),r||(r=0);var n=r;return r+=2,h.encode(e.mbox||".",t,r),r+=h.encode.bytes,h.encode(e.txt||".",t,r),r+=h.encode.bytes,R.encode.bytes=r-n,t.writeUInt16BE(R.encode.bytes-2,n),t},R.encode.bytes=0,R.decode=function(e,t){t||(t=0);var r=t,n={};return t+=2,n.mbox=h.decode(e,t)||".",t+=h.decode.bytes,n.txt=h.decode(e,t)||".",t+=h.decode.bytes,R.decode.bytes=t-r,n},R.decode.bytes=0,R.encodingLength=function(e){return 2+h.encodingLength(e.mbox||".")+h.encodingLength(e.txt||".")};var B={encode:function(e,t,r){t||(t=i.alloc(B.encodingLength(e))),r||(r=0);for(var n=r,a=[],s=0;s<e.length;s++){var u=o.toType(e[s]);void 0===a[u>>8]&&(a[u>>8]=[]),a[u>>8][u>>3&31]|=1<<7-(7&u)}for(s=0;s<a.length;s++)if(void 0!==a[s]){var c=i.from(a[s]);t.writeUInt8(s,r),r+=1,t.writeUInt8(c.length,r),r+=1,c.copy(t,r),r+=c.length}return B.encode.bytes=r-n,t}};B.encode.bytes=0,B.decode=function(e,t,r){t||(t=0);for(var n=t,i=[];t-n<r;){var a=e.readUInt8(t);t+=1;var s=e.readUInt8(t);t+=1;for(var u=0;u<s;u++)for(var c=e.readUInt8(t+u),f=0;f<8;f++)if(c&1<<7-f){var l=o.toString(a<<8|u<<3|f);i.push(l)}t+=s}return B.decode.bytes=t-n,i},B.decode.bytes=0,B.encodingLength=function(e){for(var t=[],r=0;r<e.length;r++){var n=o.toType(e[r]);t[n>>8]=Math.max(t[n>>8]||0,255&n)}var i=0;for(r=0;r<t.length;r++)void 0!==t[r]&&(i+=2+Math.ceil((t[r]+1)/8));return i};var D=t.nsec={};D.encode=function(e,t,r){t||(t=i.alloc(D.encodingLength(e))),r||(r=0);var n=r;return r+=2,h.encode(e.nextDomain,t,r),r+=h.encode.bytes,B.encode(e.rrtypes,t,r),r+=B.encode.bytes,D.encode.bytes=r-n,t.writeUInt16BE(D.encode.bytes-2,n),t},D.encode.bytes=0,D.decode=function(e,t){t||(t=0);var r=t,n={},i=e.readUInt16BE(t);return t+=2,n.nextDomain=h.decode(e,t),t+=h.decode.bytes,n.rrtypes=B.decode(e,t,i-(t-r)),t+=B.decode.bytes,D.decode.bytes=t-r,n},D.decode.bytes=0,D.encodingLength=function(e){return 2+h.encodingLength(e.nextDomain)+B.encodingLength(e.rrtypes)};var N=t.nsec3={};N.encode=function(e,t,r){t||(t=i.alloc(N.encodingLength(e))),r||(r=0);var n=r,o=e.salt;if(!i.isBuffer(o))throw new Error("salt must be a Buffer");var a=e.nextDomain;if(!i.isBuffer(a))throw new Error("nextDomain must be a Buffer");return r+=2,t.writeUInt8(e.algorithm,r),r+=1,t.writeUInt8(e.flags,r),r+=1,t.writeUInt16BE(e.iterations,r),r+=2,t.writeUInt8(o.length,r),r+=1,o.copy(t,r,0,o.length),r+=o.length,t.writeUInt8(a.length,r),r+=1,a.copy(t,r,0,a.length),r+=a.length,B.encode(e.rrtypes,t,r),r+=B.encode.bytes,N.encode.bytes=r-n,t.writeUInt16BE(N.encode.bytes-2,n),t},N.encode.bytes=0,N.decode=function(e,t){t||(t=0);var r=t,n={},i=e.readUInt16BE(t);t+=2,n.algorithm=e.readUInt8(t),t+=1,n.flags=e.readUInt8(t),t+=1,n.iterations=e.readUInt16BE(t),t+=2;var o=e.readUInt8(t);t+=1,n.salt=e.slice(t,t+o),t+=o;var a=e.readUInt8(t);return t+=1,n.nextDomain=e.slice(t,t+a),t+=a,n.rrtypes=B.decode(e,t,i-(t-r)),t+=B.decode.bytes,N.decode.bytes=t-r,n},N.decode.bytes=0,N.encodingLength=function(e){return 8+e.salt.length+e.nextDomain.length+B.encodingLength(e.rrtypes)};var L=t.ds={};L.encode=function(e,t,r){t||(t=i.alloc(L.encodingLength(e))),r||(r=0);var n=r,o=e.digest;if(!i.isBuffer(o))throw new Error("Digest must be a Buffer");return r+=2,t.writeUInt16BE(e.keyTag,r),r+=2,t.writeUInt8(e.algorithm,r),r+=1,t.writeUInt8(e.digestType,r),r+=1,o.copy(t,r,0,o.length),r+=o.length,L.encode.bytes=r-n,t.writeUInt16BE(L.encode.bytes-2,n),t},L.encode.bytes=0,L.decode=function(e,t){t||(t=0);var r=t,n={},i=e.readUInt16BE(t);return t+=2,n.keyTag=e.readUInt16BE(t),t+=2,n.algorithm=e.readUInt8(t),t+=1,n.digestType=e.readUInt8(t),t+=1,n.digest=e.slice(t,r+i+2),t+=n.digest.length,L.decode.bytes=t-r,n},L.decode.bytes=0,L.encodingLength=function(e){return 6+i.byteLength(e.digest)};var j=t.record=function(e){switch(e.toUpperCase()){case"A":return T;case"PTR":return k;case"CNAME":return S;case"DNAME":return E;case"TXT":return g;case"NULL":return m;case"AAAA":return M;case"SRV":return _;case"HINFO":return w;case"CAA":return A;case"NS":return y;case"SOA":return b;case"MX":return x;case"OPT":return O;case"DNSKEY":return I;case"RRSIG":return P;case"RP":return R;case"NSEC":return D;case"NSEC3":return N;case"DS":return L}return v},U=t.answer={};U.encode=function(e,t,r){t||(t=i.alloc(U.encodingLength(e))),r||(r=0);var n=r;if(h.encode(e.name,t,r),r+=h.encode.bytes,t.writeUInt16BE(o.toType(e.type),r),"OPT"===e.type.toUpperCase()){if("."!==e.name)throw new Error("OPT name must be root.");t.writeUInt16BE(e.udpPayloadSize||4096,r+2),t.writeUInt8(e.extendedRcode||0,r+4),t.writeUInt8(e.ednsVersion||0,r+5),t.writeUInt16BE(e.flags||0,r+6),r+=8,O.encode(e.options||[],t,r),r+=O.encode.bytes}else{var a=u.toClass(void 0===e.class?"IN":e.class);e.flush&&(a|=l),t.writeUInt16BE(a,r+2),t.writeUInt32BE(e.ttl||0,r+4),r+=8;var s=j(e.type);s.encode(e.data,t,r),r+=s.encode.bytes}return U.encode.bytes=r-n,t},U.encode.bytes=0,U.decode=function(e,t){t||(t=0);var r={},n=t;if(r.name=h.decode(e,t),t+=h.decode.bytes,r.type=o.toString(e.readUInt16BE(t)),"OPT"===r.type)r.udpPayloadSize=e.readUInt16BE(t+2),r.extendedRcode=e.readUInt8(t+4),r.ednsVersion=e.readUInt8(t+5),r.flags=e.readUInt16BE(t+6),r.flag_do=1===(r.flags>>15&1),r.options=O.decode(e,t+8),t+=8+O.decode.bytes;else{var i=e.readUInt16BE(t+2);r.ttl=e.readUInt32BE(t+4),r.class=u.toString(-32769&i),r.flush=!!(i&l);var a=j(r.type);r.data=a.decode(e,t+8),t+=8+a.decode.bytes}return U.decode.bytes=t-n,r},U.decode.bytes=0,U.encodingLength=function(e){var t=null!==e.data&&void 0!==e.data?e.data:e.options;return h.encodingLength(e.name)+8+j(e.type).encodingLength(t)};var F=t.question={};function K(e,t){for(var r=0,n=0;n<e.length;n++)r+=t.encodingLength(e[n]);return r}function z(e,t,r,n){for(var i=0;i<e.length;i++)t.encode(e[i],r,n),n+=t.encode.bytes;return n}function V(e,t,r,n){for(var i=0;i<e.length;i++)e[i]=t.decode(r,n),n+=t.decode.bytes;return n}F.encode=function(e,t,r){t||(t=i.alloc(F.encodingLength(e))),r||(r=0);var n=r;return h.encode(e.name,t,r),r+=h.encode.bytes,t.writeUInt16BE(o.toType(e.type),r),r+=2,t.writeUInt16BE(u.toClass(void 0===e.class?"IN":e.class),r),r+=2,F.encode.bytes=r-n,e},F.encode.bytes=0,F.decode=function(e,t){t||(t=0);var r=t,n={};return n.name=h.decode(e,t),t+=h.decode.bytes,n.type=o.toString(e.readUInt16BE(t)),t+=2,n.class=u.toString(e.readUInt16BE(t)),t+=2,!!(32768&n.class)&&(n.class&=-32769),F.decode.bytes=t-r,n},F.decode.bytes=0,F.encodingLength=function(e){return h.encodingLength(e.name)+4},t.AUTHORITATIVE_ANSWER=1024,t.TRUNCATED_RESPONSE=512,t.RECURSION_DESIRED=256,t.RECURSION_AVAILABLE=128,t.AUTHENTIC_DATA=32,t.CHECKING_DISABLED=16,t.DNSSEC_OK=32768,t.encode=function(e,r,n){var o=!r;o&&(r=i.alloc(t.encodingLength(e))),n||(n=0);var a=n;return e.questions||(e.questions=[]),e.answers||(e.answers=[]),e.authorities||(e.authorities=[]),e.additionals||(e.additionals=[]),p.encode(e,r,n),n+=p.encode.bytes,n=z(e.questions,F,r,n),n=z(e.answers,U,r,n),n=z(e.authorities,U,r,n),n=z(e.additionals,U,r,n),t.encode.bytes=n-a,o&&t.encode.bytes!==r.length?r.slice(0,t.encode.bytes):r},t.encode.bytes=0,t.decode=function(e,r){r||(r=0);var n=r,i=p.decode(e,r);return r+=p.decode.bytes,r=V(i.questions,F,e,r),r=V(i.answers,U,e,r),r=V(i.authorities,U,e,r),r=V(i.additionals,U,e,r),t.decode.bytes=r-n,i},t.decode.bytes=0,t.encodingLength=function(e){return p.encodingLength(e)+K(e.questions||[],F)+K(e.answers||[],U)+K(e.authorities||[],U)+K(e.additionals||[],U)},t.streamEncode=function(e){var r=t.encode(e),n=i.alloc(2);n.writeUInt16BE(r.byteLength);var o=i.concat([n,r]);return t.streamEncode.bytes=o.byteLength,o},t.streamEncode.bytes=0,t.streamDecode=function(e){var r=e.readUInt16BE(0);if(e.byteLength<r+2)return null;var n=t.decode(e.slice(2));return t.streamDecode.bytes=t.decode.bytes,n},t.streamDecode.bytes=0},function(e,t,r){"use strict";t.toString=function(e){switch(e){case 1:return"A";case 10:return"NULL";case 28:return"AAAA";case 18:return"AFSDB";case 42:return"APL";case 257:return"CAA";case 60:return"CDNSKEY";case 59:return"CDS";case 37:return"CERT";case 5:return"CNAME";case 49:return"DHCID";case 32769:return"DLV";case 39:return"DNAME";case 48:return"DNSKEY";case 43:return"DS";case 55:return"HIP";case 13:return"HINFO";case 45:return"IPSECKEY";case 25:return"KEY";case 36:return"KX";case 29:return"LOC";case 15:return"MX";case 35:return"NAPTR";case 2:return"NS";case 47:return"NSEC";case 50:return"NSEC3";case 51:return"NSEC3PARAM";case 12:return"PTR";case 46:return"RRSIG";case 17:return"RP";case 24:return"SIG";case 6:return"SOA";case 99:return"SPF";case 33:return"SRV";case 44:return"SSHFP";case 32768:return"TA";case 249:return"TKEY";case 52:return"TLSA";case 250:return"TSIG";case 16:return"TXT";case 252:return"AXFR";case 251:return"IXFR";case 41:return"OPT";case 255:return"ANY"}return"UNKNOWN_"+e},t.toType=function(e){switch(e.toUpperCase()){case"A":return 1;case"NULL":return 10;case"AAAA":return 28;case"AFSDB":return 18;case"APL":return 42;case"CAA":return 257;case"CDNSKEY":return 60;case"CDS":return 59;case"CERT":return 37;case"CNAME":return 5;case"DHCID":return 49;case"DLV":return 32769;case"DNAME":return 39;case"DNSKEY":return 48;case"DS":return 43;case"HIP":return 55;case"HINFO":return 13;case"IPSECKEY":return 45;case"KEY":return 25;case"KX":return 36;case"LOC":return 29;case"MX":return 15;case"NAPTR":return 35;case"NS":return 2;case"NSEC":return 47;case"NSEC3":return 50;case"NSEC3PARAM":return 51;case"PTR":return 12;case"RRSIG":return 46;case"RP":return 17;case"SIG":return 24;case"SOA":return 6;case"SPF":return 99;case"SRV":return 33;case"SSHFP":return 44;case"TA":return 32768;case"TKEY":return 249;case"TLSA":return 52;case"TSIG":return 250;case"TXT":return 16;case"AXFR":return 252;case"IXFR":return 251;case"OPT":return 41;case"ANY":case"*":return 255}return e.toUpperCase().startsWith("UNKNOWN_")?parseInt(e.slice(8)):0}},function(e,t,r){"use strict";t.toString=function(e){switch(e){case 0:return"NOERROR";case 1:return"FORMERR";case 2:return"SERVFAIL";case 3:return"NXDOMAIN";case 4:return"NOTIMP";case 5:return"REFUSED";case 6:return"YXDOMAIN";case 7:return"YXRRSET";case 8:return"NXRRSET";case 9:return"NOTAUTH";case 10:return"NOTZONE";case 11:return"RCODE_11";case 12:return"RCODE_12";case 13:return"RCODE_13";case 14:return"RCODE_14";case 15:return"RCODE_15"}return"RCODE_"+e},t.toRcode=function(e){switch(e.toUpperCase()){case"NOERROR":return 0;case"FORMERR":return 1;case"SERVFAIL":return 2;case"NXDOMAIN":return 3;case"NOTIMP":return 4;case"REFUSED":return 5;case"YXDOMAIN":return 6;case"YXRRSET":return 7;case"NXRRSET":return 8;case"NOTAUTH":return 9;case"NOTZONE":return 10;case"RCODE_11":return 11;case"RCODE_12":return 12;case"RCODE_13":return 13;case"RCODE_14":return 14;case"RCODE_15":return 15}return 0}},function(e,t,r){"use strict";t.toString=function(e){switch(e){case 0:return"QUERY";case 1:return"IQUERY";case 2:return"STATUS";case 3:return"OPCODE_3";case 4:return"NOTIFY";case 5:return"UPDATE";case 6:return"OPCODE_6";case 7:return"OPCODE_7";case 8:return"OPCODE_8";case 9:return"OPCODE_9";case 10:return"OPCODE_10";case 11:return"OPCODE_11";case 12:return"OPCODE_12";case 13:return"OPCODE_13";case 14:return"OPCODE_14";case 15:return"OPCODE_15"}return"OPCODE_"+e},t.toOpcode=function(e){switch(e.toUpperCase()){case"QUERY":return 0;case"IQUERY":return 1;case"STATUS":return 2;case"OPCODE_3":return 3;case"NOTIFY":return 4;case"UPDATE":return 5;case"OPCODE_6":return 6;case"OPCODE_7":return 7;case"OPCODE_8":return 8;case"OPCODE_9":return 9;case"OPCODE_10":return 10;case"OPCODE_11":return 11;case"OPCODE_12":return 12;case"OPCODE_13":return 13;case"OPCODE_14":return 14;case"OPCODE_15":return 15}return 0}},function(e,t,r){"use strict";t.toString=function(e){switch(e){case 1:return"IN";case 2:return"CS";case 3:return"CH";case 4:return"HS";case 255:return"ANY"}return"UNKNOWN_"+e},t.toClass=function(e){switch(e.toUpperCase()){case"IN":return 1;case"CS":return 2;case"CH":return 3;case"HS":return 4;case"ANY":return 255}return 0}},function(e,t,r){"use strict";t.toString=function(e){switch(e){case 1:return"LLQ";case 2:return"UL";case 3:return"NSID";case 5:return"DAU";case 6:return"DHU";case 7:return"N3U";case 8:return"CLIENT_SUBNET";case 9:return"EXPIRE";case 10:return"COOKIE";case 11:return"TCP_KEEPALIVE";case 12:return"PADDING";case 13:return"CHAIN";case 14:return"KEY_TAG";case 26946:return"DEVICEID"}return e<0?null:"OPTION_".concat(e)},t.toCode=function(e){if("number"===typeof e)return e;if(!e)return-1;switch(e.toUpperCase()){case"OPTION_0":return 0;case"LLQ":return 1;case"UL":return 2;case"NSID":return 3;case"OPTION_4":return 4;case"DAU":return 5;case"DHU":return 6;case"N3U":return 7;case"CLIENT_SUBNET":return 8;case"EXPIRE":return 9;case"COOKIE":return 10;case"TCP_KEEPALIVE":return 11;case"PADDING":return 12;case"CHAIN":return 13;case"KEY_TAG":return 14;case"DEVICEID":return 26946;case"OPTION_65535":return 65535}var t=e.match(/_(\d+)$/);return t?parseInt(t[1],10):-1}},function(e,t){var r=/^(\d{1,3}\.){3,3}\d{1,3}$/,n=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i,i={name:"v4",size:4,isFormat:function(e){return r.test(e)},encode:function(e,t,r){r=~~r,t=t||new Uint8Array(r+4);for(var n=e.length,i=0,o=0;o<n;){var a=e.charCodeAt(o++);46===a?(t[r++]=i,i=0):i=10*i+(a-48)}return t[r]=i,t},decode:function(e,t){return t=~~t,"".concat(e[t++],".").concat(e[t++],".").concat(e[t++],".").concat(e[t])}},o={name:"v6",size:16,isFormat:function(e){return e.length>0&&n.test(e)},encode:function(e,t,r){var n=(r=~~r)+16,i=-1,o=0,a=0,s=!0,u=!1;t=t||new Uint8Array(r+16);for(var c=0;c<e.length;c++){var f=e.charCodeAt(c);58===f?(s?-1!==i?(r<n&&(t[r]=0),r<n-1&&(t[r+1]=0),r+=2):r<n&&(i=r):(!0===u?(r<n&&(t[r]=a),r++):(r<n&&(t[r]=o>>8),r<n-1&&(t[r+1]=255&o),r+=2),o=0,a=0),s=!0,u=!1):46===f?(r<n&&(t[r]=a),r++,a=0,o=0,s=!1,u=!0):(s=!1,f>=97?f-=87:f>=65?f-=55:a=10*a+(f-=48),o=(o<<4)+f)}if(!1===s)!0===u?(r<n&&(t[r]=a),r++):(r<n&&(t[r]=o>>8),r<n-1&&(t[r+1]=255&o),r+=2);else if(0===i)r<n&&(t[r]=0),r<n-1&&(t[r+1]=0),r+=2;else if(-1!==i){r+=2;for(var l=Math.min(r-1,n-1);l>=i+2;l--)t[l]=t[l-2];t[i]=0,t[i+1]=0,i=r}if(i!==r&&-1!==i)for(r>n-2&&(r=n-2);n>i;)t[--n]=r<n&&r>i?t[--r]:0;else for(;r<n;)t[r++]=0;return t},decode:function(e,t){t=~~t;for(var r="",n=0;n<16;n+=2)0!==n&&(r+=":"),r+=(e[t+n]<<8|e[t+n+1]).toString(16);return r.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}};function a(e){if(i.isFormat(e))return i.size;if(o.isFormat(e))return o.size;throw Error("Invalid ip address: ".concat(e))}e.exports=Object.freeze({name:"ip",sizeOf:a,familyOf:function(e){return a(e)===i.size?1:2},v4:i,v6:o,encode:function(e,t,r){r=~~r;var n=a(e);return"function"===typeof t&&(t=t(r+n)),n===i.size?i.encode(e,t,r):o.encode(e,t,r)},decode:function(e,t,r){if(t=~~t,(r=r||e.length-t)===i.size)return i.decode(e,t,r);if(r===o.size)return o.decode(e,t,r);throw Error("Invalid buffer size needs to be ".concat(i.size," for v4 or ").concat(o.size," for v6."))}})},function(e,t,r){"use strict";var n=r(13).Buffer,i=r(435),o=i.AbortError,a=i.HTTPStatusError,s=i.TimeoutError,u="application/dns-message",c=Object.values(i.endpoints).filter((function(e){return!e.filter&&!e.logging&&e.cors}));function f(){}e.exports={request:function(e,t,r,i,c,l,h,d,p){var v=e+"//"+t+":"+r+i+("GET"===c?"?dns="+l.toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"):""),y=new XMLHttpRequest;y.open(c,v,!0),y.setRequestHeader("Accept",u),"POST"===c&&y.setRequestHeader("Content-Type",u),y.responseType="arraybuffer",y.timeout=h,y.ontimeout=function(){b(new s(h));try{y.abort()}catch(e){}},y.onreadystatechange=function(){if(y.readyState>1&&200!==y.status&&0!==y.status){b(new a(v,y.status,c));try{y.abort()}catch(e){}}},y.onerror=function(){b(200===y.status?new Error("Inexplicable XHR Error"):new a(v,y.status,c))},y.onload=function(){200!==y.status?b(new a(v,y.status,c)):b(null,n.from(y.response))},"GET"===c?y.send():y.send(l),d&&d.addEventListener("abort",g);var b=function(e,t){b=f,d&&d.removeEventListener("abort",g),p(e,t,y)};function g(){b(new o);try{y.abort()}catch(e){}}},queryDns:function(){throw new Error('Only "doh" endpoints are supported in the browser')},endpoints:function(e){if(e.doh)return c;if(e.dns)throw new Error('Only "doh" is supported in the browser')}}},function(e){e.exports=JSON.parse('{"cloudflare":{"host":"cloudflare-dns.com","docs":"https://developers.cloudflare.com/1.1.1.1/dns-over-https","cors":true},"cloudflareFamily":{"host":"family.cloudflare-dns.com","docs":"https://developers.cloudflare.com/1.1.1.1/1.1.1.1-for-families/setup-instructions/dns-over-https","cors":true,"filter":true},"cloudflareSecurity":{"host":"security.cloudflare-dns.com","docs":"https://developers.cloudflare.com/1.1.1.1/1.1.1.1-for-families/setup-instructions/dns-over-https","cors":true,"filter":true},"cloudflareEth":{"host":"eth.resolver.cloudflare-eth.com","docs":"https://www.cloudflare.com/distributed-web-gateway/#ethereum-gateway","cors":true,"filter":true},"aAndA":{"host":"dns.aa.net.uk","docs":"https://www.aa.net.uk/legal/dohdot-disclaimer/","filter":true},"usablePrivacy":{"host":"adfree.usableprivacy.net","docs":"https://docs.usableprivacy.com","filter":true},"adguard":{"host":"dns.adguard.com","docs":"https://adguard.com/en/adguard-dns/overview.html","filter":true},"adguardFamily":{"host":"dns-family.adguard.com","docs":"https://adguard.com/en/adguard-dns/overview.html","filter":true},"adguardUnfiltered":{"host":"dns-unfiltered.adguard.com","docs":"https://adguard.com/en/adguard-dns/overview.html"},"ahadnsIn":{"host":"doh.in.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"India"},"ahadnsIt":{"host":"doh.it.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"Italy"},"ahadnsEs":{"host":"doh.es.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"Spain"},"ahadnsNo":{"host":"doh.no.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"Norway"},"ahadnsNl":{"host":"doh.nl.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"Netherlands"},"ahadnsPl":{"host":"doh.pl.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"Poland"},"ahadnsNy":{"host":"doh.ny.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"New York"},"ahadnsChi":{"host":"doh.chi.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"Chicago"},"ahadnsAu":{"host":"doh.au.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"Australia"},"ahadnsLa":{"host":"doh.la.ahadns.net","docs":"https://ahadns.com/dns-over-https/","cors":true,"filter":true,"location":"Los Angeles"},"alidns":{"host":"dns.alidns.com","docs":"https://alidns.com/knowledge?type=SETTING_DOCS#umpt6","cors":true,"filter":true,"location":"China"},"amsNl":{"host":"dnsnl.alekberg.net","docs":"https://alekberg.net/doh","location":"Amsterdam"},"amsSe":{"host":"dnsse.alekberg.net","docs":"https://alekberg.net/doh","location":"Sweden"},"amsEs":{"host":"dnses.alekberg.net","docs":"https://alekberg.net/doh","location":"Spain"},"arapurayil":{"host":"dns.arapurayil.com","docs":"https://www.dns.arapurayil.com/","filter":true},"digitaleGesellschaft":{"host":"dns.digitale-gesellschaft.ch","docs":"https://www.digitale-gesellschaft.ch/dns","cors":true,"location":"Switzerland"},"dnsForFamily":{"host":"dns-doh.dnsforfamily.com","docs":"https://dnsforfamily.com/","filter":true},"dnsHome":{"host":"dns.dnshome.de","docs":"https://www.dnshome.de/doh-dot-public-resolver.php","location":"Germany"},"blahDnsCh":{"host":"doh-ch.blahdns.com","docs":"https://blahdns.com/","cors":true,"filter":true,"location":"Switzerland"},"blahDnsJp":{"host":"doh-jp.blahdns.com","docs":"https://blahdns.com/","cors":true,"filter":true,"location":"Japan"},"blahDnsDe":{"host":"doh-de.blahdns.com","docs":"https://blahdns.com/","cors":true,"filter":true,"location":"Germany"},"blahDnsFi":{"host":"doh-fi.blahdns.com","docs":"https://blahdns.com/","cors":true,"filter":true,"location":"Finland"},"cleanBrowsingSecurity":{"host":"doh.cleanbrowsing.org","docs":"https://cleanbrowsing.org/guides/dnsoverhttps","path":"/doh/security-filter/","cors":true,"filter":true},"cleanBrowsingFamily":{"host":"doh.cleanbrowsing.org","docs":"https://cleanbrowsing.org/guides/dnsoverhttps","path":"/doh/family-filter/","cors":true,"filter":true},"cleanBrowsingAdult":{"host":"doh.cleanbrowsing.org","docs":"https://cleanbrowsing.org/guides/dnsoverhttps","path":"/doh/adult-filter/","cors":true,"filter":true},"appliedPrivacy":{"host":"doh.applied-privacy.net","docs":"https://applied-privacy.net/services/dns/","path":"/query","location":"Austria"},"ffmuc":{"host":"doh.ffmuc.net","docs":"https://ffmuc.net/wiki/doku.php?id=knb:dohdot","location":"Germany"},"tiarap":{"host":"doh.tiar.app","docs":"https://tiarap.org/","filter":true},"tiarapJp":{"host":"jp.tiar.app","docs":"https://jp.tiar.app/","filter":true,"location":"Japan"},"google":{"host":"dns.google","docs":"https://developers.google.com/speed/public-dns/docs/doh/","cors":true},"he":{"host":"ordns.he.net","docs":"https://dns.he.net/","log":true},"iij":{"host":"public.dns.iij.jp","docs":"https://public.dns.iij.jp/","filter":true,"log":true,"location":"Japan"},"libredns":{"host":"doh.libredns.gr","docs":"https://libredns.gr/","location":"Germany"},"librednsAds":{"host":"doh.libredns.gr","docs":"https://libredns.gr/","path":"/ads","filter":true,"location":"Germany"},"njalla":{"host":"dns.njal.la","docs":"https://dns.njal.la/","location":"Sweden"},"opendns":{"host":"doh.opendns.com","docs":"https://support.opendns.com/hc/en-us/articles/360038086532-Using-DNS-over-HTTPS-DoH-with-OpenDNS"},"opendnsFamily":{"host":"doh.familyshield.opendns.com","docs":"https://support.opendns.com/hc/en-us/articles/360038086532-Using-DNS-over-HTTPS-DoH-with-OpenDNS","filter":true},"sebyVultr":{"host":"doh.seby.io","docs":"https://dns.seby.io/","port":8443,"cors":true,"filter":true,"location":"Sydney"},"sebyOVH":{"host":"doh-2.seby.io","docs":"https://dns.seby.io/","cors":true,"filter":true,"location":"Sydney"},"quad9":{"host":"dns10.quad9.net","docs":"https://quad9.net/service/service-addresses-and-features"},"quad9Ads":{"host":"dns.quad9.net","docs":"https://quad9.net/service/service-addresses-and-features","filter":true},"switchCh":{"host":"dns.switch.ch","docs":"https://www.switch.ch/security/info/public-dns/","filter":true,"location":"Switzerland"},"yepdns":{"host":"sg.yepdns.com","docs":"https://get.yepdns.com/","filter":true,"location":"Singapore"},"lavaDnsEU1":{"host":"eu1.dns.lavate.ch","docs":"https://dns.lavate.ch/","location":"Helsinki"},"controlId":{"host":"freedns.controld.com","docs":"https://controld.com/","path":"/p0"},"controlIdMw":{"host":"freedns.controld.com","docs":"https://controld.com/","path":"/p1","filter":true},"controlIdAds":{"host":"freedns.controld.com","docs":"https://controld.com/","path":"/p2","filter":true},"controlIdSoc":{"host":"freedns.controld.com","docs":"https://controld.com/","path":"/p3","filter":true},"uncensoredAny":{"host":"anycast.censurfridns.dk","docs":"https://blog.uncensoreddns.org/"},"uncensoredUni":{"host":"unicast.censurfridns.dk","docs":"https://blog.uncensoreddns.org/","location":"Copenhagen"},"dnssbGlobal":{"host":"doh.dns.sb","docs":"https://dns.sb/doh/","cors":true},"dbssbDeDus":{"host":"de-dus.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"D\xfcsseldorf"},"dnssbDeFra":{"host":"de-fra.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Frankfurt"},"dnssbNlAms":{"host":"nl-ams.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Amsterdam"},"dnssbNlAms2":{"host":"nl-ams2.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Amsterdam"},"dnssbEeTll":{"host":"ee-tll.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Tallinn"},"dnssbJpKix":{"host":"jp-kix.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Osaka"},"dnssbHkHkg":{"host":"hk-hkg.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Hong Kong"},"dnssbAuSyd":{"host":"au-syd.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Sydney"},"dnssbUsChi":{"host":"us-chi.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Chicago"},"dnssbInBlr":{"host":"in-blr.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Bengaluru"},"dnssbSgSin":{"host":"sg-sin.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Singapore"},"dnssbKrSel":{"host":"kr-sel.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Seoul"},"dnssbRuMow":{"host":"ru-mow.doh.sb","docs":"https://dns.sb/doh/","cors":true,"location":"Moscow"},"ethlink":{"host":"eth.link","docs":"https://eth.link/","cors":true},"handshake":{"host":"query.hdns.io","docs":"https://docs.namebase.io/guides-1/resolving-handshake-1/hdns.io#dns-over-https-doh","cors":true}}')},function(e,t,r){(function(t,n){var i;!function(){"use strict";var o="object"===typeof window?window:{};!o.HI_BASE32_NO_NODE_JS&&"object"===typeof t&&t.versions&&t.versions.node&&(o=n);var a=!o.HI_BASE32_NO_COMMON_JS&&"object"===typeof e&&e.exports,s=r(336),u="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),c={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},f=[0,0,0,0,0,0,0,0],l=function(e,t){t.length>10&&(t="..."+t.substr(-10));var r=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+e+" bytes: "+t+" <-");throw r.position=e,r},h=function(e){if(""===e)return[];if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");for(var t,r,n,i,o,a,s,u,f=[],l=0,h=(e=e.replace(/=/g,"")).length,d=0,p=h>>3<<3;d<p;)t=c[e.charAt(d++)],r=c[e.charAt(d++)],n=c[e.charAt(d++)],i=c[e.charAt(d++)],o=c[e.charAt(d++)],a=c[e.charAt(d++)],s=c[e.charAt(d++)],u=c[e.charAt(d++)],f[l++]=255&(t<<3|r>>>2),f[l++]=255&(r<<6|n<<1|i>>>4),f[l++]=255&(i<<4|o>>>1),f[l++]=255&(o<<7|a<<2|s>>>3),f[l++]=255&(s<<5|u);var v=h-p;return 2===v?(t=c[e.charAt(d++)],r=c[e.charAt(d++)],f[l++]=255&(t<<3|r>>>2)):4===v?(t=c[e.charAt(d++)],r=c[e.charAt(d++)],n=c[e.charAt(d++)],i=c[e.charAt(d++)],f[l++]=255&(t<<3|r>>>2),f[l++]=255&(r<<6|n<<1|i>>>4)):5===v?(t=c[e.charAt(d++)],r=c[e.charAt(d++)],n=c[e.charAt(d++)],i=c[e.charAt(d++)],o=c[e.charAt(d++)],f[l++]=255&(t<<3|r>>>2),f[l++]=255&(r<<6|n<<1|i>>>4),f[l++]=255&(i<<4|o>>>1)):7===v&&(t=c[e.charAt(d++)],r=c[e.charAt(d++)],n=c[e.charAt(d++)],i=c[e.charAt(d++)],o=c[e.charAt(d++)],a=c[e.charAt(d++)],s=c[e.charAt(d++)],f[l++]=255&(t<<3|r>>>2),f[l++]=255&(r<<6|n<<1|i>>>4),f[l++]=255&(i<<4|o>>>1),f[l++]=255&(o<<7|a<<2|s>>>3)),f},d=function(e,t){if(!t)return function(e){for(var t,r,n="",i=e.length,o=0,a=0;o<i;)if((t=e[o++])<=127)n+=String.fromCharCode(t);else{t>191&&t<=223?(r=31&t,a=1):t<=239?(r=15&t,a=2):t<=247?(r=7&t,a=3):l(o,n);for(var s=0;s<a;++s)((t=e[o++])<128||t>191)&&l(o,n),r<<=6,r+=63&t;r>=55296&&r<=57343&&l(o,n),r>1114111&&l(o,n),r<=65535?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+(1023&r)))}return n}(h(e));if(""===e)return"";if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var r,n,i,o,a,s,u,f,d="",p=e.indexOf("=");-1===p&&(p=e.length);for(var v=0,y=p>>3<<3;v<y;)r=c[e.charAt(v++)],n=c[e.charAt(v++)],i=c[e.charAt(v++)],o=c[e.charAt(v++)],a=c[e.charAt(v++)],s=c[e.charAt(v++)],u=c[e.charAt(v++)],f=c[e.charAt(v++)],d+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|a>>>1))+String.fromCharCode(255&(a<<7|s<<2|u>>>3))+String.fromCharCode(255&(u<<5|f));var b=p-y;return 2===b?(r=c[e.charAt(v++)],n=c[e.charAt(v++)],d+=String.fromCharCode(255&(r<<3|n>>>2))):4===b?(r=c[e.charAt(v++)],n=c[e.charAt(v++)],i=c[e.charAt(v++)],o=c[e.charAt(v++)],d+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))):5===b?(r=c[e.charAt(v++)],n=c[e.charAt(v++)],i=c[e.charAt(v++)],o=c[e.charAt(v++)],a=c[e.charAt(v++)],d+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|a>>>1))):7===b&&(r=c[e.charAt(v++)],n=c[e.charAt(v++)],i=c[e.charAt(v++)],o=c[e.charAt(v++)],a=c[e.charAt(v++)],s=c[e.charAt(v++)],u=c[e.charAt(v++)],d+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|a>>>1))+String.fromCharCode(255&(a<<7|s<<2|u>>>3))),d},p={encode:function(e,t){var r="string"!==typeof e;return r&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),r?function(e){for(var t,r,n,i,o,a="",s=e.length,c=0,f=5*parseInt(s/5);c<f;)t=e[c++],r=e[c++],n=e[c++],i=e[c++],o=e[c++],a+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|n>>>4)]+u[31&(n<<1|i>>>7)]+u[i>>>2&31]+u[31&(i<<3|o>>>5)]+u[31&o];var l=s-f;return 1===l?(t=e[c],a+=u[t>>>3]+u[t<<2&31]+"======"):2===l?(t=e[c++],r=e[c],a+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[r<<4&31]+"===="):3===l?(t=e[c++],r=e[c++],n=e[c],a+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|n>>>4)]+u[n<<1&31]+"==="):4===l&&(t=e[c++],r=e[c++],n=e[c++],i=e[c],a+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|n>>>4)]+u[31&(n<<1|i>>>7)]+u[i>>>2&31]+u[i<<3&31]+"="),a}(e):t?function(e){for(var t,r,n,i,o,a="",s=e.length,c=0,f=5*parseInt(s/5);c<f;)t=e.charCodeAt(c++),r=e.charCodeAt(c++),n=e.charCodeAt(c++),i=e.charCodeAt(c++),o=e.charCodeAt(c++),a+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|n>>>4)]+u[31&(n<<1|i>>>7)]+u[i>>>2&31]+u[31&(i<<3|o>>>5)]+u[31&o];var l=s-f;return 1===l?(t=e.charCodeAt(c),a+=u[t>>>3]+u[t<<2&31]+"======"):2===l?(t=e.charCodeAt(c++),r=e.charCodeAt(c),a+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[r<<4&31]+"===="):3===l?(t=e.charCodeAt(c++),r=e.charCodeAt(c++),n=e.charCodeAt(c),a+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|n>>>4)]+u[n<<1&31]+"==="):4===l&&(t=e.charCodeAt(c++),r=e.charCodeAt(c++),n=e.charCodeAt(c++),i=e.charCodeAt(c),a+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|n>>>4)]+u[31&(n<<1|i>>>7)]+u[i>>>2&31]+u[i<<3&31]+"="),a}(e):function(e){var t,r,n,i,o,a,s,c=!1,l="",h=0,d=0,p=e.length;if(""===e)return l;do{for(f[0]=f[5],f[1]=f[6],f[2]=f[7],s=d;h<p&&s<5;++h)(a=e.charCodeAt(h))<128?f[s++]=a:a<2048?(f[s++]=192|a>>6,f[s++]=128|63&a):a<55296||a>=57344?(f[s++]=224|a>>12,f[s++]=128|a>>6&63,f[s++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++h)),f[s++]=240|a>>18,f[s++]=128|a>>12&63,f[s++]=128|a>>6&63,f[s++]=128|63&a);d=s-5,h===p&&++h,h>p&&s<6&&(c=!0),t=f[0],s>4?(r=f[1],n=f[2],i=f[3],o=f[4],l+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|n>>>4)]+u[31&(n<<1|i>>>7)]+u[i>>>2&31]+u[31&(i<<3|o>>>5)]+u[31&o]):1===s?l+=u[t>>>3]+u[t<<2&31]+"======":2===s?(r=f[1],l+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[r<<4&31]+"===="):3===s?(r=f[1],n=f[2],l+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|n>>>4)]+u[n<<1&31]+"==="):(r=f[1],n=f[2],i=f[3],l+=u[t>>>3]+u[31&(t<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|n>>>4)]+u[31&(n<<1|i>>>7)]+u[i>>>2&31]+u[i<<3&31]+"=")}while(!c);return l}(e)},decode:d};d.asBytes=h,a?e.exports=p:(o.base32=p,s&&(void 0===(i=function(){return p}.call(p,r,p,e))||(e.exports=i)))}()}).call(this,r(39),r(36))},function(e,t,r){"use strict";var n=r(40),i=r(0),o=r(6),a=r(8),s=r(9),u=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&u(t,e,r);return c(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Noise=void 0;var h=f(r(279)),d=r(13),p=l(r(821)),v=l(r(829)),y=l(r(281)),b=l(r(60)),g=r(95),m=r(443),w=r(857),k=r(860),S=r(115),E=r(209),_=r(861),A=r(862),x=r(174),T=r(288),M=function(){function e(t,r){if(a(this,e),this.protocol="/noise",this.prologue=d.Buffer.alloc(0),this.earlyData=null!==r&&void 0!==r?r:d.Buffer.alloc(0),this.useNoisePipes=!1,t){var n=h.generateKeyPairFromSeed(t);this.staticKeys={privateKey:d.Buffer.from(n.secretKey.buffer,n.secretKey.byteOffset,n.secretKey.length),publicKey:d.Buffer.from(n.publicKey.buffer,n.publicKey.byteOffset,n.publicKey.length)}}else this.staticKeys=S.generateKeypair()}return s(e,[{key:"secureOutbound",value:function(){var e=o(i.mark((function e(t,r,n){var o,a,s;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=p.default(r,{lengthEncoder:E.uint16BEEncode,lengthDecoder:E.uint16BEDecode,maxDataLength:T.NOISE_MSG_MAX_LENGTH_BYTES}),e.next=3,this.performHandshake({connection:o,isInitiator:!0,localPeer:t,remotePeer:n});case 3:return a=e.sent,e.next=6,this.createSecureConnection(o,a);case 6:return s=e.sent,e.abrupt("return",{conn:s,remoteEarlyData:a.remoteEarlyData,remotePeer:a.remotePeer});case 8:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"secureInbound",value:function(){var e=o(i.mark((function e(t,r,n){var o,a,s;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=p.default(r,{lengthEncoder:E.uint16BEEncode,lengthDecoder:E.uint16BEDecode,maxDataLength:T.NOISE_MSG_MAX_LENGTH_BYTES}),e.next=3,this.performHandshake({connection:o,isInitiator:!1,localPeer:t,remotePeer:n});case 3:return a=e.sent,e.next=6,this.createSecureConnection(o,a);case 6:return s=e.sent,e.abrupt("return",{conn:s,remoteEarlyData:a.remoteEarlyData,remotePeer:a.remotePeer});case 8:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"performHandshake",value:function(){var e=o(i.mark((function e(t){var r,n,o,a,s,u,c,f;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S.getPayload(t.localPeer,this.staticKeys.publicKey,this.earlyData);case 2:if(n=e.sent,o=this.useNoisePipes,t.isInitiator&&null===A.KeyCache.load(t.remotePeer)&&(o=!1),!o){e.next=22;break}return a=t.remotePeer,s=t.connection,u=t.isInitiator,c=new w.IKHandshake(u,n,this.prologue,this.staticKeys,s,null!==(r=A.KeyCache.load(t.remotePeer))&&void 0!==r?r:d.Buffer.alloc(32),a),e.prev=8,e.next=11,this.performIKHandshake(c);case 11:return e.abrupt("return",e.sent);case 14:return e.prev=14,e.t0=e.catch(8),t.isInitiator&&(f=c.getLocalEphemeralKeys()),e.next=19,this.performXXFallbackHandshake(t,n,e.t0.initialMsg,f);case 19:return e.abrupt("return",e.sent);case 20:e.next=25;break;case 22:return e.next=24,this.performXXHandshake(t,n);case 24:return e.abrupt("return",e.sent);case 25:case"end":return e.stop()}}),e,this,[[8,14]])})));return function(t){return e.apply(this,arguments)}}()},{key:"performXXFallbackHandshake",value:function(){var e=o(i.mark((function e(t,r,n,o){var a,s,u,c,f;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.isInitiator,s=t.remotePeer,u=t.connection,c=new k.XXFallbackHandshake(a,r,this.prologue,this.staticKeys,u,n,s,o),e.prev=2,e.next=5,c.propose();case 5:return e.next=7,c.exchange();case 7:return e.next=9,c.finish();case 9:e.next=16;break;case 11:throw e.prev=11,e.t0=e.catch(2),x.logger(e.t0),f=e.t0,new Error("Error occurred during XX Fallback handshake: ".concat(f.message));case 16:return e.abrupt("return",c);case 17:case"end":return e.stop()}}),e,this,[[2,11]])})));return function(t,r,n,i){return e.apply(this,arguments)}}()},{key:"performXXHandshake",value:function(){var e=o(i.mark((function e(t,r){var n,o,a,s,u;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.isInitiator,o=t.remotePeer,a=t.connection,s=new m.XXHandshake(n,r,this.prologue,this.staticKeys,a,o),e.prev=2,e.next=5,s.propose();case 5:return e.next=7,s.exchange();case 7:return e.next=9,s.finish();case 9:this.useNoisePipes&&s.remotePeer&&A.KeyCache.store(s.remotePeer,s.getRemoteStaticKey()),e.next=16;break;case 12:throw e.prev=12,e.t0=e.catch(2),u=e.t0,new Error("Error occurred during XX handshake: ".concat(u.message));case 16:return e.abrupt("return",s);case 17:case"end":return e.stop()}}),e,this,[[2,12]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"performIKHandshake",value:function(){var e=o(i.mark((function e(t){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.stage0();case 2:return e.next=4,t.stage1();case 4:return e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"createSecureConnection",value:function(){var e=o(i.mark((function e(t,r){var o,a,s,u,c;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=v.default(),a=n(o,2),s=a[0],u=a[1],c=t.unwrap(),e.next=4,b.default(s,y.default,_.encryptStream(r),g.encode({lengthEncoder:E.uint16BEEncode}),c,g.decode({lengthDecoder:E.uint16BEDecode}),y.default,_.decryptStream(r),s);case 4:return e.abrupt("return",u);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}]),e}();t.Noise=M},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(816),i=r(206),o=r(94);function a(e,r){return void 0===r&&(r=t.defaultRandomSource),r.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=a,t.randomUint32=function(e){void 0===e&&(e=t.defaultRandomSource);var r=a(4,e),n=i.readUint32LE(r);return o.wipe(r),n};var s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(e,r,n){if(void 0===r&&(r=s),void 0===n&&(n=t.defaultRandomSource),r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");for(var i="",u=r.length,c=256-256%u;e>0;){for(var f=a(Math.ceil(256*e/c),n),l=0;l<f.length&&e>0;l++){var h=f[l];h<c&&(i+=r.charAt(h%u),e--)}o.wipe(f)}return i}t.randomString=u,t.randomStringForEntropy=function(e,r,n){return void 0===r&&(r=s),void 0===n&&(n=t.defaultRandomSource),u(Math.ceil(e/(Math.log(r.length)/Math.LN2)),r,n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(817),i=r(818),o=function(){function e(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}return e.prototype.randomBytes=function(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)},e}();t.SystemRandomSource=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.isAvailable=!1,this.isInstantiated=!1;var e="undefined"!==typeof self?self.crypto||self.msCrypto:null;e&&e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}return e.prototype.randomBytes=function(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");for(var t=new Uint8Array(e),r=0;r<t.length;r+=65536)this._crypto.getRandomValues(t.subarray(r,r+Math.min(t.length-r,65536)));return t},e}();t.BrowserRandomSource=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(94),i=function(){function e(){this.isAvailable=!1,this.isInstantiated=!1;var e=r(819);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}return e.prototype.randomBytes=function(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");var t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");for(var r=new Uint8Array(e),i=0;i<r.length;i++)r[i]=t[i];return n.wipe(t),r},e}();t.NodeRandomSource=i},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(822),a=r(172),s=r(95);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a(e),u=s.decode.fromReader(r.reader,t),c={read:function(){var e=i(n.mark((function e(t){var i,o,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.reader.next(t);case 2:if(i=e.sent,o=i.value,!((a=i.done)&&o.length<t)){e.next=7;break}throw new Error("Couldn't read enough bytes");case 7:if(a,o){e.next=10;break}throw new Error("Value is null");case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),readLP:function(){var e=i(n.mark((function e(){var t,r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.next();case 2:if(t=e.sent,r=t.value,i=t.done,i,r){e.next=8;break}throw new Error("Value is null");case 8:return e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),readPB:function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.readLP();case 2:if(r=e.sent){e.next=5;break}throw new Error("Value is null");case 5:return i=o(r)?r:r.slice(),e.abrupt("return",t.decode(i));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),write:function(e){r.writer.push(e)},writeLP:function(e){c.write(s.encode.single(e,t))},writePB:function(e,t){c.writeLP(t.encode(e))},pb:function(e){return{read:function(){return c.readPB(e)},write:function(t){return c.writePB(t,e)}}},unwrap:function(){return r.rest(),r.stream}};return c}},function(e,t){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){var n=r(437);function i(e){var t,r;function i(t,r){try{var a=e[t](r),s=a.value,u=s instanceof n;Promise.resolve(u?s.wrapped:s).then((function(e){u?i("return"===t?"return":"next",e):o(a.done?"return":"normal",e)}),(function(e){i("throw",e)}))}catch(c){o("throw",c)}}function o(e,n){switch(e){case"return":t.resolve({value:n,done:!0});break;case"throw":t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise((function(o,a){var s={key:e,arg:n,resolve:o,reject:a,next:null};r?r=r.next=s:(t=r=s,i(e,n))}))},"function"!==typeof e.return&&(this.return=void 0)}"function"===typeof Symbol&&Symbol.asyncIterator&&(i.prototype[Symbol.asyncIterator]=function(){return this}),i.prototype.next=function(e){return this._invoke("next",e)},i.prototype.throw=function(e){return this._invoke("throw",e)},i.prototype.return=function(e){return this._invoke("return",e)},e.exports=i},function(e,t,r){var n=r(8),i=r(9);e.exports=function(){"use strict";function e(t){if(n(this,e),!(t>0)||0!==(t-1&t))throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}return i(e,[{key:"push",value:function(e){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}},{key:"shift",value:function(){var e=this.buffer[this.btm];if(void 0!==e)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}},{key:"isEmpty",value:function(){return void 0===this.buffer[this.btm]}}]),e}()},function(e,t,r){"use strict";var n=r(0),i=r(45),o=r(44),a=r(30),s=r(13).Buffer,u=r(79),c=r(440);function f(e){e=e||{};var t=Math.max(e.poolSize||10240,e.minPoolSize||8),r=e.lengthEncoder||c;return function(){var e=o(n.mark((function e(o){var c,f,l,h,d,p,v,y,b,g;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=s.alloc(t),f=0,l=!0,h=!1,e.prev=4,p=a(o);case 6:return e.next=8,i(p.next());case 8:return v=e.sent,l=v.done,e.next=12,i(v.value);case 12:if(y=e.sent,l){e.next=24;break}return r((b=y).length,c,f),g=c.slice(f,f+r.bytes),f+=r.bytes,c.length-f<8&&(c=s.alloc(t),f=0),e.next=21,(new u).append(g).append(b);case 21:l=!0,e.next=6;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(4),h=!0,d=e.t0;case 30:if(e.prev=30,e.prev=31,l||null==p.return){e.next=35;break}return e.next=35,i(p.return());case 35:if(e.prev=35,!h){e.next=38;break}throw d;case 38:return e.finish(35);case 39:return e.finish(30);case 40:case"end":return e.stop()}}),e,null,[[4,26,30,40],[31,,35,39]])})));return function(t){return e.apply(this,arguments)}}()}f.single=function(e,t){var r=(t=t||{}).lengthEncoder||c;return new u([r(e.length),e.slice()])},e.exports=f,e.exports.MIN_POOL_SIZE=8,e.exports.DEFAULT_POOL_SIZE=10240},function(e,t,r){"use strict";var n,i=r(29),o=r(6),a=r(0),s=r(86),u=r(45),c=r(44),f=r(30),l=r(13).Buffer,h=r(79),d=r(441),p=4194304,v=l.alloc(0),y="readLength",b="readData",g=(s(n={},y,(function(e,t,r,n){var i;t=t.append(e);try{i=n.lengthDecoder(t)}catch(o){if(t.length>n.maxLengthLength)throw Object.assign(o,{message:"message length too long",code:"ERR_MSG_LENGTH_TOO_LONG"});if(o instanceof RangeError)return{mode:y,buffer:t,chunk:void 0,state:void 0,data:void 0};throw o}if(i>n.maxDataLength)throw Object.assign(new Error("message data too long"),{code:"ERR_MSG_DATA_TOO_LONG"});return e=t.shallowSlice(n.lengthDecoder.bytes),t=new h,n.onLength&&n.onLength(i),i<=0?(n.onData&&n.onData(v),{mode:y,chunk:e,buffer:t,data:v}):{mode:b,chunk:e,buffer:t,state:{dataLength:i},data:void 0}})),s(n,b,(function(e,t,r,n){if(t=t.append(e),!r)throw new Error("state is required");if(t.length<r.dataLength)return{mode:b,buffer:t,state:r,chunk:void 0,data:void 0};var i=r.dataLength,o=t.shallowSlice(0,i),a=t.length>i?t.shallowSlice(i):void 0;return t=new h,n.onData&&n.onData(o),{mode:y,chunk:a,buffer:t,state:void 0,data:o}})),n);function m(e){var t={lengthDecoder:(e=e||{}).lengthDecoder||d,maxLengthLength:e.maxLengthLength||8,maxDataLength:e.maxDataLength||p,onLength:e.onLength,onData:e.onData};return function(){var e=c(a.mark((function e(r){var n,i,o,s,c,l,d,p,v,b,m;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=new h,i=y,s=!0,c=!1,e.prev=4,d=f(r);case 6:return e.next=8,u(d.next());case 8:return p=e.sent,s=p.done,e.next=12,u(p.value);case 12:if(v=e.sent,s){e.next=30;break}b=v;case 16:if(!b){e.next=27;break}if(m=g[i](b,n,o,t),i=m.mode,b=m.chunk,n=m.buffer,o=m.state,!m.data){e.next=25;break}return e.next=25,m.data;case 25:e.next=16;break;case 27:s=!0,e.next=6;break;case 30:e.next=36;break;case 32:e.prev=32,e.t0=e.catch(4),c=!0,l=e.t0;case 36:if(e.prev=36,e.prev=37,s||null==d.return){e.next=41;break}return e.next=41,u(d.return());case 41:if(e.prev=41,!c){e.next=44;break}throw l;case 44:return e.finish(41);case 45:return e.finish(36);case 46:if(!n.length){e.next=48;break}throw Object.assign(new Error("unexpected end of input"),{code:"ERR_UNEXPECTED_EOF"});case 48:case"end":return e.stop()}}),e,null,[[4,32,36,46],[37,,41,45]])})));return function(t){return e.apply(this,arguments)}}()}m.fromReader=function(e,t){var r,n=1,u=(s(r={},Symbol.asyncIterator,(function(){return this})),s(r,"next",function(){var t=o(a.mark((function t(){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.next(n);case 3:return t.abrupt("return",t.sent);case 6:if(t.prev=6,t.t0=t.catch(0),"ERR_UNDER_READ"!==t.t0.code){t.next=10;break}return t.abrupt("return",{done:!0,value:null});case 10:throw t.t0;case 11:return t.prev=11,n=1,t.finish(11);case 14:case"end":return t.stop()}}),t,null,[[0,6,11,14]])})));return function(){return t.apply(this,arguments)}}()),r);return m(i(i({},t||{}),{},{onLength:function(e){n=e}}))(u)},e.exports=m,e.exports.MAX_LENGTH_LENGTH=8,e.exports.MAX_DATA_LENGTH=p},function(e,t,r){"use strict";var n=r(13).Buffer,i=function(e,t,r){return(t=t||n.allocUnsafe(4)).writeInt32BE(e,r),t};i.bytes=4,e.exports=i},function(e,t,r){"use strict";var n=function(e){if(e.length<4)throw RangeError("Could not decode int32BE");return e.readInt32BE(0)};n.bytes=4,e.exports=n},function(e,t,r){var n=r(830);e.exports=function(){var e=n(),t=n();return[{source:e.source,sink:t.sink},{source:t.source,sink:e.sink}]}},function(e,t,r){"use strict";var n=r(86),i=r(0),o=r(6),a=r(442);e.exports=function(){var e,t,r;return{sink:function(){var e=o(i.mark((function e(n){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=2;break}throw new Error("already piped");case 2:t=a(n),r&&r(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),source:(n(e={},Symbol.asyncIterator,(function(){return this})),n(e,"next",(function(){return t?t.next():new Promise((function(e){r=function(t){r=null,e(t.next())}}))})),e)}}},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(26),a=r(27);Object.defineProperty(t,"__esModule",{value:!0}),t.XX=void 0;var s=r(13),u=r(115),c=function(e){o(r,e);var t=a(r);function r(){return n(this,r),t.apply(this,arguments)}return i(r,[{key:"initializeInitiator",value:function(e,t,r,n){var i=this.initializeSymmetric("Noise_XX_25519_ChaChaPoly_SHA256");return this.mixHash(i,e),{ss:i,s:t,rs:r,psk:n,re:s.Buffer.alloc(32)}}},{key:"initializeResponder",value:function(e,t,r,n){var i=this.initializeSymmetric("Noise_XX_25519_ChaChaPoly_SHA256");return this.mixHash(i,e),{ss:i,s:t,rs:r,psk:n,re:s.Buffer.alloc(32)}}},{key:"writeMessageA",value:function(e,t,r){var n=s.Buffer.alloc(0);e.e=void 0!==r?r:u.generateKeypair();var i=e.e.publicKey;return this.mixHash(e.ss,i),{ne:i,ns:n,ciphertext:this.encryptAndHash(e.ss,t)}}},{key:"writeMessageB",value:function(e,t){e.e=u.generateKeypair();var r=e.e.publicKey;this.mixHash(e.ss,r),this.mixKey(e.ss,this.dh(e.e.privateKey,e.re));var n=s.Buffer.from(e.s.publicKey),i=this.encryptAndHash(e.ss,n);return this.mixKey(e.ss,this.dh(e.s.privateKey,e.re)),{ne:r,ns:i,ciphertext:this.encryptAndHash(e.ss,t)}}},{key:"writeMessageC",value:function(e,t){var r=s.Buffer.from(e.s.publicKey),n=this.encryptAndHash(e.ss,r);this.mixKey(e.ss,this.dh(e.s.privateKey,e.re));var i=this.encryptAndHash(e.ss,t),o={ne:this.createEmptyKey(),ns:n,ciphertext:i},a=this.split(e.ss),u=a.cs1,c=a.cs2;return{h:e.ss.h,messageBuffer:o,cs1:u,cs2:c}}},{key:"readMessageA",value:function(e,t){return u.isValidPublicKey(t.ne)&&(e.re=t.ne),this.mixHash(e.ss,e.re),this.decryptAndHash(e.ss,t.ciphertext)}},{key:"readMessageB",value:function(e,t){if(u.isValidPublicKey(t.ne)&&(e.re=t.ne),this.mixHash(e.ss,e.re),!e.e)throw new Error("Handshake state `e` param is missing.");this.mixKey(e.ss,this.dh(e.e.privateKey,e.re));var r=this.decryptAndHash(e.ss,t.ns),n=r.plaintext,i=r.valid;i&&32===n.length&&u.isValidPublicKey(n)&&(e.rs=n),this.mixKey(e.ss,this.dh(e.e.privateKey,e.rs));var o=this.decryptAndHash(e.ss,t.ciphertext),a=o.plaintext,s=o.valid;return{plaintext:a,valid:i&&s}}},{key:"readMessageC",value:function(e,t){var r=this.decryptAndHash(e.ss,t.ns),n=r.plaintext,i=r.valid;if(i&&32===n.length&&u.isValidPublicKey(n)&&(e.rs=n),!e.e)throw new Error("Handshake state `e` param is missing.");this.mixKey(e.ss,this.dh(e.e.privateKey,e.rs));var o=this.decryptAndHash(e.ss,t.ciphertext),a=o.plaintext,s=o.valid,c=this.split(e.ss),f=c.cs1,l=c.cs2;return{h:e.ss.h,plaintext:a,valid:i&&s,cs1:f,cs2:l}}},{key:"initSession",value:function(e,t,r){var n=this.createEmptyKey(),i=s.Buffer.alloc(32);return{hs:e?this.initializeInitiator(t,r,i,n):this.initializeResponder(t,r,i,n),i:e,mc:0}}},{key:"sendMessage",value:function(e,t,r){var n;if(0===e.mc)n=this.writeMessageA(e.hs,t,r);else if(1===e.mc)n=this.writeMessageB(e.hs,t);else if(2===e.mc){var i=this.writeMessageC(e.hs,t),o=i.h,a=i.messageBuffer,s=i.cs1,u=i.cs2;n=a,e.h=o,e.cs1=s,e.cs2=u}else{if(!(e.mc>2))throw new Error("Session invalid.");if(e.i){if(!e.cs1)throw new Error("CS1 (cipher state) is not defined");n=this.writeMessageRegular(e.cs1,t)}else{if(!e.cs2)throw new Error("CS2 (cipher state) is not defined");n=this.writeMessageRegular(e.cs2,t)}}return e.mc++,n}},{key:"recvMessage",value:function(e,t){var r=s.Buffer.alloc(0),n=!1;if(0===e.mc){var i=this.readMessageA(e.hs,t);r=i.plaintext,n=i.valid}else if(1===e.mc){var o=this.readMessageB(e.hs,t);r=o.plaintext,n=o.valid}else if(2===e.mc){var a=this.readMessageC(e.hs,t),u=a.h,c=a.plaintext,f=a.valid,l=a.cs1,h=a.cs2;r=c,n=f,e.h=u,e.cs1=l,e.cs2=h}return e.mc++,{plaintext:r,valid:n}}}]),r}(r(448).AbstractHandshake);t.XX=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(833),i=r(94),o=function(){function e(e,t,r,i){void 0===r&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=n.hmac(this._hash,r,t);this._hmac=new n.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),r=0;r<t.length;r++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[r]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),i.wipe(this._buffer),i.wipe(this._counter),this._bufpos=0},e}();t.HKDF=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(834),i=r(282),o=r(94),a=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(r).clean():r.set(t);for(var i=0;i<r.length;i++)r[i]^=54;this._inner.update(r);for(i=0;i<r.length;i++)r[i]^=106;this._outer.update(r),n.isSerializableHash(this._inner)&&n.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),o.wipe(r)}return e.prototype.reset=function(){if(!n.isSerializableHash(this._inner)||!n.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){n.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),n.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!n.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!n.isSerializableHash(this._inner)||!n.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!n.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();t.HMAC=a,t.hmac=function(e,t,r){var n=new a(e,t);n.update(r);var i=n.digest();return n.clean(),i},t.equal=i.equal},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return"undefined"!==typeof e.saveState&&"undefined"!==typeof e.restoreState&&"undefined"!==typeof e.cleanSavedState}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(29),u=r(90).CID,c=r(67),f=r(162),l=r(58),h=r(63),d=r(58).base58btc,p=r(67).base32,v=r(161).base16,y=r(88),b=r(836),g=r(170),m=r(852).PeerIdProto,w=r(139).equals,k=r(116).fromString,S=r(117).toString,E=r(89).identity,_=s(s(s(s({},c),f),l),h),A=Object.keys(_).reduce((function(e,t){return e.or(_[t])}),p.decoder),x=g(function(){function e(t,r,n){if(o(this,e),!(t instanceof Uint8Array))throw new Error("invalid id provided");if(r&&n&&!w(r.public.bytes,n.bytes))throw new Error("inconsistent arguments");this._id=t,this._idB58String=d.encode(this.id).substring(1),this._privKey=r,this._pubKey=n}return a(e,[{key:"id",get:function(){return this._id},set:function(e){throw new Error("Id is immutable")}},{key:"privKey",get:function(){return this._privKey},set:function(e){this._privKey=e}},{key:"pubKey",get:function(){if(this._pubKey)return this._pubKey;if(this._privKey)return this._privKey.public;try{var e=y.decode(this.id);e.code===E.code&&(this._pubKey=b.unmarshalPublicKey(e.digest))}catch(t){}return this._pubKey},set:function(e){this._pubKey=e}},{key:"marshalPubKey",value:function(){if(this.pubKey)return b.marshalPublicKey(this.pubKey)}},{key:"marshalPrivKey",value:function(){if(this.privKey)return b.marshalPrivateKey(this.privKey)}},{key:"marshal",value:function(e){return m.encode({id:this.toBytes(),pubKey:this.marshalPubKey(),privKey:e?null:this.marshalPrivKey()}).finish()}},{key:"toPrint",value:function(){var e=this.toB58String();e.startsWith("Qm")&&(e=e.slice(2));var t=6;return e.length<t&&(t=e.length),"<peer.ID "+e.substr(0,t)+">"}},{key:"toJSON",value:function(){return{id:this.toB58String(),privKey:O(this.marshalPrivKey()),pubKey:O(this.marshalPubKey())}}},{key:"toHexString",value:function(){return v.encode(this.id).substring(1)}},{key:"toBytes",value:function(){return this.id}},{key:"toB58String",value:function(){return this._idB58String}},{key:"toString",value:function(){if(!this._idCIDString){var e=u.createV1(114,y.decode(this.id));Object.defineProperty(this,"_idCIDString",{value:e.toString(),enumerable:!1})}return this._idCIDString}},{key:"equals",value:function(e){if(e instanceof Uint8Array)return w(this.id,e);if(e.id)return w(this.id,e.id);throw new Error("not valid Id")}},{key:"isEqual",value:function(e){return this.equals(e)}},{key:"isValid",value:function(){return Boolean(this.privKey&&this.privKey.public&&this.privKey.public.bytes&&this.pubKey.bytes instanceof Uint8Array&&w(this.privKey.public.bytes,this.pubKey.bytes))}},{key:"hasInlinePublicKey",value:function(){try{if(y.decode(this.id).code===E.code)return!0}catch(e){}return!1}}]),e}(),{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"});t=e.exports=x;var T=function(e){return e.bytes.length<=42?y.create(E.code,e.bytes).bytes:e.hash()},M=function(){var e=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T(r);case 2:return i=e.sent,e.abrupt("return",new x(i,t,r));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.create=function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=t||{}).bits=t.bits||2048,t.keyType=t.keyType||"RSA",e.next=5,b.generateKeyPair(t.keyType,t.bits);case 5:return r=e.sent,e.abrupt("return",M(r,r.public));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromHexString=function(e){return new x(v.decode("f"+e))},t.createFromBytes=function(e){try{var r=u.decode(e);if(!C(r))throw new Error("Supplied PeerID CID is invalid");return t.createFromCID(r)}catch(n){if(y.decode(e).code!==E.code)throw new Error("Supplied PeerID CID is invalid");return new x(e)}},t.createFromB58String=function(e){return t.createFromBytes(d.decode("z"+e))};var C=function(e){return 114===e.code||112===e.code};function O(e){if(e)return S(e,"base64pad")}t.createFromCID=function(e){if(!(e=u.asCID(e))||!C(e))throw new Error("Supplied PeerID CID is invalid");return new x(e.multihash.bytes)},t.createFromPubKey=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof(r=t)&&(r=k(t,"base64pad")),r instanceof Uint8Array){e.next=4;break}throw new Error("Supplied key is neither a base64 string nor a Uint8Array");case 4:return e.next=6,b.unmarshalPublicKey(r);case 6:return i=e.sent,e.abrupt("return",M(void 0,i));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromPrivKey=function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t&&(t=k(t,"base64pad")),t instanceof Uint8Array){e.next=3;break}throw new Error("Supplied key is neither a base64 string nor a Uint8Array");case 3:return e.next=5,b.unmarshalPrivateKey(t);case 5:return r=e.sent,e.abrupt("return",M(r,r.public));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromJSON=function(){var e=i(n.mark((function e(t){var r,i,o,a,s,u,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=d.decode("z"+t.id),i=t.privKey&&k(t.privKey,"base64pad"),o=t.pubKey&&k(t.pubKey,"base64pad"),e.t0=o,!e.t0){e.next=8;break}return e.next=7,b.unmarshalPublicKey(o);case 7:e.t0=e.sent;case 8:if(a=e.t0,i){e.next=11;break}return e.abrupt("return",new x(r,void 0,a));case 11:return e.next=13,b.unmarshalPrivateKey(i);case 13:return s=e.sent,e.next=16,T(s.public);case 16:if(u=e.sent,!a){e.next=21;break}return e.next=20,T(a);case 20:c=e.sent;case 21:if(!a||w(u,c)){e.next=23;break}throw new Error("Public and private key do not match");case 23:if(!r||w(u,r)){e.next=25;break}throw new Error("Id and private key do not match");case 25:return e.abrupt("return",new x(r,s,a));case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromProtobuf=function(){var e=i(n.mark((function e(t){var r,i,o,a,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t&&(t=k(t,"base16")),r=m.decode(t),i=r.id,o=r.privKey,a=r.pubKey,!o){e.next=8;break}return e.next=5,b.unmarshalPrivateKey(o);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=!1;case 9:if(o=e.t0,!a){e.next=16;break}return e.next=13,b.unmarshalPublicKey(a);case 13:e.t1=e.sent,e.next=17;break;case 16:e.t1=!1;case 17:if(a=e.t1,!o){e.next=22;break}return e.next=21,T(o.public);case 21:u=e.sent;case 22:if(!a){e.next=26;break}return e.next=25,T(a);case 25:s=e.sent;case 26:if(!o){e.next=31;break}if(!a){e.next=30;break}if(w(u,s)){e.next=30;break}throw new Error("Public and private key do not match");case 30:return e.abrupt("return",new x(u,o,o.public));case 31:if(!a){e.next=33;break}return e.abrupt("return",new x(s,void 0,a));case 33:if(!i){e.next=35;break}return e.abrupt("return",new x(i));case 35:throw new Error("Protobuf did not contain any usable key material");case 36:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.parse=function(e){return"1"!==e.charAt(0)&&"Q"!==e.charAt(0)||(e="z".concat(e)),t.createFromBytes(A.decode(e))},t.isPeerId=function(e){return Boolean("object"===typeof e&&e._id&&e._idB58String)}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(283);r(62),r(169);var a=r(18),s=r(15),u=r(116).fromString,c=r(837),f={rsa:r(838),ed25519:r(842),secp256k1:r(844)(o,r(447))},l="secp256k1 support requires libp2p-crypto-secp256k1 package",h="ERR_MISSING_PACKAGE";function d(e){var t=f[e.toLowerCase()];if(!t){var r=Object.keys(f).join(" / ");throw s(new Error("invalid or unsupported key type ".concat(e,". Must be ").concat(r)),"ERR_UNSUPPORTED_KEY_TYPE")}return t}var p=function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(t).generateKeyPair(r));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),v=function(){var e=i(n.mark((function e(t,r,i){var o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=d(t),"ed25519"===t.toLowerCase()){e.next=3;break}throw s(new Error("Seed key derivation is unimplemented for RSA or secp256k1"),"ERR_UNSUPPORTED_KEY_DERIVATION_TYPE");case 3:return e.abrupt("return",o.generateKeyPairFromSeed(r,i));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),y=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=o.PrivateKey.decode(t),i=r.Data,e.t0=r.Type,e.next=e.t0===o.KeyType.RSA?5:e.t0===o.KeyType.Ed25519?6:e.t0===o.KeyType.Secp256k1?7:12;break;case 5:return e.abrupt("return",f.rsa.unmarshalRsaPrivateKey(i));case 6:return e.abrupt("return",f.ed25519.unmarshalEd25519PrivateKey(i));case 7:if(!f.secp256k1){e.next=11;break}return e.abrupt("return",f.secp256k1.unmarshalSecp256k1PrivateKey(i));case 11:throw s(new Error(l),h);case 12:d(r.Type);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=i(n.mark((function e(t,r){var i,o,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.import(t,r);case 3:return i=e.sent,e.abrupt("return",y(i));case 7:e.prev=7,e.t0=e.catch(0);case 9:if(null!==(o=a.pki.decryptRsaPrivateKey(t,r))){e.next=12;break}throw s(new Error("Cannot read the key, most likely the password is wrong or not a RSA key"),"ERR_CANNOT_DECRYPT_PEM");case 12:return l=a.asn1.toDer(a.pki.privateKeyToAsn1(o)),l=u(l.getBytes(),"ascii"),e.abrupt("return",f.rsa.unmarshalRsaPrivateKey(l));case 15:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}();e.exports={supportedKeys:f,keysPBM:o,keyStretcher:r(846),generateEphemeralKeyPair:r(849),generateKeyPair:p,generateKeyPairFromSeed:v,unmarshalPublicKey:function(e){var t=o.PublicKey.decode(e),r=t.Data;switch(t.Type){case o.KeyType.RSA:return f.rsa.unmarshalRsaPublicKey(r);case o.KeyType.Ed25519:return f.ed25519.unmarshalEd25519PublicKey(r);case o.KeyType.Secp256k1:if(f.secp256k1)return f.secp256k1.unmarshalSecp256k1PublicKey(r);throw s(new Error(l),h);default:d(t.Type)}},marshalPublicKey:function(e,t){return d(t=(t||"rsa").toLowerCase()),e.bytes},unmarshalPrivateKey:y,marshalPrivateKey:function(e,t){return d(t=(t||"rsa").toLowerCase()),e.bytes},import:b}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(63).base64,a=r(446);e.exports={import:function(){var e=i(n.mark((function e(t,r){var i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.decode(t),s=a.create(),e.next=4,s.decrypt(i,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(49).sha256,u=r(15),c=r(139).equals,f=r(117).toString;r(137);var l=r(18),h=r(839),d=r(283),p=r(285),v=function(){function e(t){o(this,e),this._key=t}return a(e,[{key:"verify",value:function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndVerify(this._key,r,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"marshal",value:function(){return h.utils.jwkToPkix(this._key)}},{key:"bytes",get:function(){return d.PublicKey.encode({Type:d.KeyType.RSA,Data:this.marshal()}).finish()}},{key:"encrypt",value:function(e){return h.encrypt(this._key,e)}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),y=function(){function e(t,r){o(this,e),this._key=t,this._publicKey=r}return a(e,[{key:"genSecret",value:function(){return h.getRandomValues(16)}},{key:"sign",value:function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndSign(this._key,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"public",get:function(){if(!this._publicKey)throw u(new Error("public key not provided"),"ERR_PUBKEY_NOT_PROVIDED");return new v(this._publicKey)}},{key:"decrypt",value:function(e){return h.decrypt(this._key,e)}},{key:"marshal",value:function(){return h.utils.jwkToPkcs1(this._key)}},{key:"bytes",get:function(){return d.PrivateKey.encode({Type:d.KeyType.RSA,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.public.hash();case 2:return t=e.sent,e.abrupt("return",f(t,"base58btc"));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i,o,a,s,c=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("pkcs-8"!==(r=c.length>1&&void 0!==c[1]?c[1]:"pkcs-8")){e.next=9;break}return i=new l.util.ByteBuffer(this.marshal()),o=l.asn1.fromDer(i),a=l.pki.privateKeyFromAsn1(o),s={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"},e.abrupt("return",l.pki.encryptRsaPrivateKey(a,t,s));case 9:if("libp2p-key"!==r){e.next=13;break}return e.abrupt("return",p.export(this.bytes,t));case 13:throw u(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function b(){return(b=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=h.utils.pkcs1ToJwk(t),e.next=3,h.unmarshalPrivateKey(r);case 3:return i=e.sent,e.abrupt("return",new y(i.privateKey,i.publicKey));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.unmarshalPrivateKey(t);case 2:return r=e.sent,e.abrupt("return",new y(r.privateKey,r.publicKey));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey(t);case 2:return r=e.sent,e.abrupt("return",new y(r.privateKey,r.publicKey));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports={RsaPublicKey:v,RsaPrivateKey:y,unmarshalRsaPublicKey:function(e){var t=h.utils.pkixToJwk(e);return new v(t)},unmarshalRsaPrivateKey:function(e){return b.apply(this,arguments)},generateKeyPair:function(e){return m.apply(this,arguments)},fromJwk:function(e){return g.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(208),a=r(447),s=r(117).toString,u=r(116).fromString;function c(e){return Promise.all([o.get().subtle.exportKey("jwk",e.privateKey),o.get().subtle.exportKey("jwk",e.publicKey)])}t.utils=r(840),t.generateKey=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]);case 2:return r=e.sent,e.next=5,c(r);case 5:return i=e.sent,e.abrupt("return",{privateKey:i[0],publicKey:i[1]});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.unmarshalPrivateKey=function(){var e=i(n.mark((function e(t){var r,i,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);case 2:return r=e.sent,e.t0=r,e.next=6,n=t,o.get().subtle.importKey("jwk",{kty:n.kty,n:n.n,e:n.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]);case 6:return e.t1=e.sent,i=[e.t0,e.t1],e.next=10,c({privateKey:i[0],publicKey:i[1]});case 10:return a=e.sent,e.abrupt("return",{privateKey:a[0],publicKey:a[1]});case 12:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),t.getRandomValues=a,t.hashAndSign=function(){var e=i(n.mark((function e(t,r){var i,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]);case 2:return i=e.sent,e.next=5,o.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},i,Uint8Array.from(r));case 5:return a=e.sent,e.abrupt("return",new Uint8Array(a,a.byteOffset,a.byteLength));case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),t.hashAndVerify=function(){var e=i(n.mark((function e(t,r,i){var a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);case 2:return a=e.sent,e.abrupt("return",o.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},a,r,i));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();var f=r(841),l=f.jwk2pub,h=f.jwk2priv;function d(e,t,r,n){var i=t?l(e):h(e),o=n(s(Uint8Array.from(r),"ascii"),i);return u(o,"ascii")}t.encrypt=function(e,t){return d(e,!0,t,(function(e,t){return t.encrypt(e)}))},t.decrypt=function(e,t){return d(e,!1,t,(function(e,t){return t.decrypt(e)}))}},function(e,t,r){"use strict";r(62),r(78);var n=r(18),i=r(284),o=i.bigIntegerToUintBase64url,a=i.base64urlToBigInteger,s=r(116).fromString,u=r(117).toString;t.pkcs1ToJwk=function(e){var t=n.asn1.fromDer(u(e,"ascii")),r=n.pki.privateKeyFromAsn1(t);return{kty:"RSA",n:o(r.n),e:o(r.e),d:o(r.d),p:o(r.p),q:o(r.q),dp:o(r.dP),dq:o(r.dQ),qi:o(r.qInv),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){var t=n.pki.privateKeyToAsn1({n:a(e.n),e:a(e.e),d:a(e.d),p:a(e.p),q:a(e.q),dP:a(e.dp),dQ:a(e.dq),qInv:a(e.qi)});return s(n.asn1.toDer(t).getBytes(),"ascii")},t.pkixToJwk=function(e){var t=n.asn1.fromDer(u(e,"ascii")),r=n.pki.publicKeyFromAsn1(t);return{kty:"RSA",n:o(r.n),e:o(r.e),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){var t=n.pki.publicKeyToAsn1({n:a(e.n),e:a(e.e)});return s(n.asn1.toDer(t).getBytes(),"ascii")}},function(e,t,r){"use strict";var n=r(48);r(78);var i=r(18),o=r(284).base64urlToBigInteger;function a(e,t){return t.map((function(t){return o(e[t])}))}e.exports={jwk2pub:function(e){var t;return(t=i.pki).setRsaPublicKey.apply(t,n(a(e,["n","e"])))},jwk2priv:function(e){var t;return(t=i.pki).setRsaPrivateKey.apply(t,n(a(e,["n","e","d","p","q","dp","dq","qi"])))}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(15),u=r(139).equals,c=r(49).sha256,f=r(58).base58btc,l=r(89).identity,h=r(843),d=r(283),p=r(285),v=function(){function e(t){o(this,e),this._key=m(t,h.publicKeyLength)}return a(e,[{key:"verify",value:function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndVerify(this._key,r,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return d.PublicKey.encode({Type:d.KeyType.Ed25519,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return u(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),y=function(){function e(t,r){o(this,e),this._key=m(t,h.privateKeyLength),this._publicKey=m(r,h.publicKeyLength)}return a(e,[{key:"sign",value:function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndSign(this._key,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"public",get:function(){return new v(this._publicKey)}},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return d.PrivateKey.encode({Type:d.KeyType.Ed25519,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return u(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.digest(this.public.bytes);case 2:return t=e.sent,e.abrupt("return",f.encode(t.bytes).substring(1));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("libp2p-key"!==(r=i.length>1&&void 0!==i[1]?i[1]:"libp2p-key")){e.next=5;break}return e.abrupt("return",p.export(this.bytes,t));case 5:throw s(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function b(){return(b=i(n.mark((function e(){var t,r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey();case 2:return t=e.sent,r=t.privateKey,i=t.publicKey,e.abrupt("return",new y(r,i));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=i(n.mark((function e(t){var r,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKeyFromSeed(t);case 2:return r=e.sent,i=r.privateKey,o=r.publicKey,e.abrupt("return",new y(i,o));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){if((e=Uint8Array.from(e||[])).length!==t)throw s(new Error("Key must be a Uint8Array of length ".concat(t,", got ").concat(e.length)),"ERR_INVALID_KEY_TYPE");return e}e.exports={Ed25519PublicKey:v,Ed25519PrivateKey:y,unmarshalEd25519PrivateKey:function(e){if(e.length>h.privateKeyLength){var t=(e=m(e,h.privateKeyLength+h.publicKeyLength)).slice(0,h.privateKeyLength),r=e.slice(h.privateKeyLength,e.length);return new y(t,r)}var n=(e=m(e,h.privateKeyLength)).slice(0,h.privateKeyLength),i=e.slice(h.publicKeyLength);return new y(n,i)},unmarshalEd25519PublicKey:function(e){return e=m(e,h.publicKeyLength),new v(e)},generateKeyPair:function(){return b.apply(this,arguments)},generateKeyPairFromSeed:function(e){return g.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(286);function a(e,r){for(var n=new Uint8Array(t.privateKeyLength),i=0;i<32;i++)n[i]=e[i],n[32+i]=r[i];return n}t.publicKeyLength=32,t.privateKeyLength=64,t.generateKey=i(n.mark((function e(){var t,r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.utils.randomPrivateKey(),e.next=3,o.getPublicKey(t);case 3:return r=e.sent,i=a(t,r),e.abrupt("return",{privateKey:i,publicKey:r});case 6:case"end":return e.stop()}}),e)}))),t.generateKeyFromSeed=function(){var e=i(n.mark((function e(t){var r,i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(32===t.length){e.next=4;break}throw new TypeError('"seed" must be 32 bytes in length.');case 4:if(t instanceof Uint8Array){e.next=6;break}throw new TypeError('"seed" must be a node.js Buffer, or Uint8Array.');case 6:return r=t,e.next=9,o.getPublicKey(r);case 9:return i=e.sent,s=a(r,i),e.abrupt("return",{privateKey:s,publicKey:i});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.hashAndSign=function(e,t){var r=e.slice(0,32);return o.sign(t,r)},t.hashAndVerify=function(e,t,r){return o.verify(t,r,e)}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(49).sha256,u=r(15),c=r(139).equals,f=r(117).toString,l=r(285);e.exports=function(e,t,h){h=h||r(845)();var d=function(){function t(e){o(this,t),h.validatePublicKey(e),this._key=e}return a(t,[{key:"verify",value:function(e,t){return h.hashAndVerify(this._key,t,e)}},{key:"marshal",value:function(){return h.compressPublicKey(this._key)}},{key:"bytes",get:function(){return e.PublicKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),t}(),p=function(){function t(e,r){o(this,t),this._key=e,this._publicKey=r||h.computePublicKey(e),h.validatePrivateKey(this._key),h.validatePublicKey(this._publicKey)}return a(t,[{key:"sign",value:function(e){return h.hashAndSign(this._key,e)}},{key:"public",get:function(){return new d(this._publicKey)}},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return e.PrivateKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.public.hash();case 2:return t=e.sent,e.abrupt("return",f(t,"base58btc"));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("libp2p-key"!==(r=i.length>1&&void 0!==i[1]?i[1]:"libp2p-key")){e.next=5;break}return e.abrupt("return",l.export(this.bytes,t));case 5:throw u(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),t}();function v(){return(v=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey();case 2:return t=e.sent,e.abrupt("return",new p(t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return{Secp256k1PublicKey:d,Secp256k1PrivateKey:p,unmarshalSecp256k1PrivateKey:function(e){return new p(e)},unmarshalSecp256k1PublicKey:function(e){return new d(e)},generateKeyPair:function(){return v.apply(this,arguments)}}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(15),a=r(287),s=r(49).sha256;e.exports=function(){function e(){return(e=i(n.mark((function e(t,r){var i,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(r);case 2:return i=e.sent,u=i.digest,e.prev=4,e.next=7,a.sign(u,t);case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(4),o(e.t0,"ERR_INVALID_INPUT");case 13:case"end":return e.stop()}}),e,null,[[4,10]])})))).apply(this,arguments)}function t(){return(t=i(n.mark((function e(t,r,i){var u,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.digest(i);case 3:return u=e.sent,c=u.digest,e.abrupt("return",a.verify(r,c,t));case 8:throw e.prev=8,e.t0=e.catch(0),o(e.t0,"ERR_INVALID_INPUT");case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}return{generateKey:function(){return a.utils.randomPrivateKey()},privateKeyLength:32,hashAndSign:function(t,r){return e.apply(this,arguments)},hashAndVerify:function(e,r,n){return t.apply(this,arguments)},compressPublicKey:function(e){return a.Point.fromHex(e).toRawBytes(!0)},decompressPublicKey:function(e){return a.Point.fromHex(e).toRawBytes(!1)},validatePrivateKey:function(e){try{a.getPublicKey(e,!0)}catch(t){throw o(t,"ERR_INVALID_PRIVATE_KEY")}},validatePublicKey:function(e){try{a.Point.fromHex(e)}catch(t){throw o(t,"ERR_INVALID_PUBLIC_KEY")}},computePublicKey:function(e){try{return a.getPublicKey(e,!0)}catch(t){throw o(t,"ERR_INVALID_PRIVATE_KEY")}}}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(15),a=r(207).concat,s=r(116).fromString,u=r(847),c={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=function(){var e=i(n.mark((function e(t,r,i){var f,l,h,d,p,v,y,b,g,m,w,k,S,E,_,A,x;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=c[t]){e.next=4;break}throw l=Object.keys(c).join(" / "),o(new Error("unknown cipher type '".concat(t,"'. Must be ").concat(l)),"ERR_INVALID_CIPHER_TYPE");case 4:if(r){e.next=6;break}throw o(new Error("missing hash type"),"ERR_MISSING_HASH_TYPE");case 6:return h=f.keySize,d=f.ivSize,20,p=s("key expansion"),v=2*(d+h+20),e.next=13,u.create(r,i);case 13:return y=e.sent,e.next=16,y.digest(p);case 16:b=e.sent,g=[],m=0;case 19:if(!(m<v)){e.next=32;break}return e.next=22,y.digest(a([b,p]));case 22:return w=e.sent,k=w.length,m+k>v&&(k=v-m),g.push(w),m+=k,e.next=29,y.digest(b);case 29:b=e.sent,e.next=19;break;case 32:return S=v/2,E=a(g),_=E.slice(0,S),A=E.slice(S,v),x=function(e){return{iv:e.slice(0,d),cipherKey:e.slice(d,d+h),macKey:e.slice(d+h)}},e.abrupt("return",{k1:x(_),k2:x(A)});case 38:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(208),a=r(848),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"},u=function(){var e=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.sign({name:"HMAC"},t,r);case 2:return i=e.sent,e.abrupt("return",new Uint8Array(i,i.byteOffset,i.byteLength));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.create=function(){var e=i(n.mark((function e(t,r){var c,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=s[t],e.next=3,o.get().subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]);case 3:return f=e.sent,e.abrupt("return",{digest:function(e){return i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u(f,e));case 1:case"end":return t.stop()}}),t)})))()},length:a[t]});case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(850);e.exports=function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.generateEphmeralKeyPair(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(29),i=r(0),o=r(6),a=r(15),s=r(208),u=r(284).base64urlToBuffer,c=r(851),f=r(117).toString,l=r(207).concat,h=r(139).equals,d={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(){var e=o(i.mark((function e(t){var r,n,a;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(Object.keys(d),t),e.next=3,s.get().subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]);case 3:return r=e.sent,n=function(){var e=o(i.mark((function e(n,o){var a,u,c;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=6;break}return e.next=3,s.get().subtle.importKey("jwk",b(t,o),{name:"ECDH",namedCurve:t},!1,["deriveBits"]);case 3:a=e.sent,e.next=7;break;case 6:a=r.privateKey;case 7:return e.next=9,s.get().subtle.importKey("jwk",y(t,n),{name:"ECDH",namedCurve:t},!1,[]);case 9:return e.t0=e.sent,e.t1=a,u=[e.t0,e.t1],e.next=14,s.get().subtle.deriveBits({name:"ECDH",namedCurve:t,public:u[0]},u[1],d[t]);case 14:return c=e.sent,e.abrupt("return",new Uint8Array(c,c.byteOffset,c.byteLength));case 16:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),e.next=7,s.get().subtle.exportKey("jwk",r.publicKey);case 7:return a=e.sent,e.abrupt("return",{key:v(a),genSharedKey:n});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var p={"P-256":32,"P-384":48,"P-521":66};function v(e){var t=p[e.crv];return l([Uint8Array.from([4]),u(e.x,t),u(e.y,t)],1+2*t)}function y(e,t){var r=p[e];if(h(!t.slice(0,1),Uint8Array.from([4])))throw a(new Error("Cannot unmarshal public key - invalid key format"),"ERR_INVALID_KEY_FORMAT");return{kty:"EC",crv:e,x:f(t.slice(1,r+1),"base64url"),y:f(t.slice(1+r),"base64url"),ext:!0}}var b=function(e,t){return n(n({},y(e,t.public)),{},{d:f(t.private,"base64url")})}},function(e,t,r){"use strict";var n=r(15);e.exports=function(e,t){if(!e.includes(t)){var r=e.join(" / ");throw n(new Error("Unknown curve: ".concat(t,". Must be ").concat(r)),"ERR_INVALID_CURVE")}}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-peer-id"]||(n.roots["libp2p-peer-id"]={});s.PeerIdProto=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.id=a.newBuffer([]),e.prototype.pubKey=a.newBuffer([]),e.prototype.privKey=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(10).bytes(e.id),null!=e.pubKey&&Object.hasOwnProperty.call(e,"pubKey")&&t.uint32(18).bytes(e.pubKey),null!=e.privKey&&Object.hasOwnProperty.call(e,"privKey")&&t.uint32(26).bytes(e.privKey),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PeerIdProto;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.id=e.bytes();break;case 2:n.pubKey=e.bytes();break;case 3:n.privKey=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("id"))throw a.ProtocolError("missing required 'id'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PeerIdProto)return e;var t=new s.PeerIdProto;return null!=e.id&&("string"===typeof e.id?a.base64.decode(e.id,t.id=a.newBuffer(a.base64.length(e.id)),0):e.id.length&&(t.id=e.id)),null!=e.pubKey&&("string"===typeof e.pubKey?a.base64.decode(e.pubKey,t.pubKey=a.newBuffer(a.base64.length(e.pubKey)),0):e.pubKey.length&&(t.pubKey=e.pubKey)),null!=e.privKey&&("string"===typeof e.privKey?a.base64.decode(e.privKey,t.privKey=a.newBuffer(a.base64.length(e.privKey)),0):e.privKey.length&&(t.privKey=e.privKey)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.id="":(r.id=[],t.bytes!==Array&&(r.id=a.newBuffer(r.id))),t.bytes===String?r.pubKey="":(r.pubKey=[],t.bytes!==Array&&(r.pubKey=a.newBuffer(r.pubKey))),t.bytes===String?r.privKey="":(r.privKey=[],t.bytes!==Array&&(r.privKey=a.newBuffer(r.privKey)))),null!=e.id&&e.hasOwnProperty("id")&&(r.id=t.bytes===String?a.base64.encode(e.id,0,e.id.length):t.bytes===Array?Array.prototype.slice.call(e.id):e.id),null!=e.pubKey&&e.hasOwnProperty("pubKey")&&(r.pubKey=t.bytes===String?a.base64.encode(e.pubKey,0,e.pubKey.length):t.bytes===Array?Array.prototype.slice.call(e.pubKey):e.pubKey),null!=e.privKey&&e.hasOwnProperty("privKey")&&(r.privKey=t.bytes===String?a.base64.encode(e.privKey,0,e.privKey.length):t.bytes===Array?Array.prototype.slice.call(e.privKey):e.privKey),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";var n,i,o;i=[r(41)],void 0===(o="function"===typeof(n=function(e){var t=e.Reader,r=e.Writer,n=e.util,i=e.roots["libp2p-noise"]||(e.roots["libp2p-noise"]={});return i.pb=function(){var o={};return o.NoiseHandshakePayload=function(){function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return o.prototype.identityKey=n.newBuffer([]),o.prototype.identitySig=n.newBuffer([]),o.prototype.data=n.newBuffer([]),o.create=function(e){return new o(e)},o.encode=function(e,t){return t||(t=r.create()),null!=e.identityKey&&Object.hasOwnProperty.call(e,"identityKey")&&t.uint32(10).bytes(e.identityKey),null!=e.identitySig&&Object.hasOwnProperty.call(e,"identitySig")&&t.uint32(18).bytes(e.identitySig),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(26).bytes(e.data),t},o.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.pb.NoiseHandshakePayload;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.identityKey=e.bytes();break;case 2:o.identitySig=e.bytes();break;case 3:o.data=e.bytes();break;default:e.skipType(7&a)}}return o},o.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},o.verify=function(e){return"object"!==typeof e||null===e?"object expected":null!=e.identityKey&&e.hasOwnProperty("identityKey")&&!(e.identityKey&&"number"===typeof e.identityKey.length||n.isString(e.identityKey))?"identityKey: buffer expected":null!=e.identitySig&&e.hasOwnProperty("identitySig")&&!(e.identitySig&&"number"===typeof e.identitySig.length||n.isString(e.identitySig))?"identitySig: buffer expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"===typeof e.data.length||n.isString(e.data))?"data: buffer expected":null},o.fromObject=function(e){if(e instanceof i.pb.NoiseHandshakePayload)return e;var t=new i.pb.NoiseHandshakePayload;return null!=e.identityKey&&("string"===typeof e.identityKey?n.base64.decode(e.identityKey,t.identityKey=n.newBuffer(n.base64.length(e.identityKey)),0):e.identityKey.length&&(t.identityKey=e.identityKey)),null!=e.identitySig&&("string"===typeof e.identitySig?n.base64.decode(e.identitySig,t.identitySig=n.newBuffer(n.base64.length(e.identitySig)),0):e.identitySig.length&&(t.identitySig=e.identitySig)),null!=e.data&&("string"===typeof e.data?n.base64.decode(e.data,t.data=n.newBuffer(n.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),t},o.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.identityKey="":(r.identityKey=[],t.bytes!==Array&&(r.identityKey=n.newBuffer(r.identityKey))),t.bytes===String?r.identitySig="":(r.identitySig=[],t.bytes!==Array&&(r.identitySig=n.newBuffer(r.identitySig))),t.bytes===String?r.data="":(r.data=[],t.bytes!==Array&&(r.data=n.newBuffer(r.data)))),null!=e.identityKey&&e.hasOwnProperty("identityKey")&&(r.identityKey=t.bytes===String?n.base64.encode(e.identityKey,0,e.identityKey.length):t.bytes===Array?Array.prototype.slice.call(e.identityKey):e.identityKey),null!=e.identitySig&&e.hasOwnProperty("identitySig")&&(r.identitySig=t.bytes===String?n.base64.encode(e.identitySig,0,e.identitySig.length):t.bytes===Array?Array.prototype.slice.call(e.identitySig):e.identitySig),null!=e.data&&e.hasOwnProperty("data")&&(r.data=t.bytes===String?n.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o}(),i})?n.apply(t,i):n)||(e.exports=o)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(855),i=r(856),o=r(94),a=r(206),s=r(282);t.KEY_LENGTH=32,t.NONCE_LENGTH=12,t.TAG_LENGTH=16;var u=new Uint8Array(16),c=function(){function e(e){if(this.nonceLength=t.NONCE_LENGTH,this.tagLength=t.TAG_LENGTH,e.length!==t.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var a=new Uint8Array(16);a.set(e,a.length-e.length);var s=new Uint8Array(32);n.stream(this._key,a,s,4);var u,c=t.length+this.tagLength;if(i){if(i.length!==c)throw new Error("ChaCha20Poly1305: incorrect destination length");u=i}else u=new Uint8Array(c);return n.streamXOR(this._key,a,t,u,4),this._authenticate(u.subarray(u.length-this.tagLength,u.length),s,u.subarray(0,u.length-this.tagLength),r),o.wipe(a),u},e.prototype.open=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length<this.tagLength)return null;var a=new Uint8Array(16);a.set(e,a.length-e.length);var u=new Uint8Array(32);n.stream(this._key,a,u,4);var c=new Uint8Array(this.tagLength);if(this._authenticate(c,u,t.subarray(0,t.length-this.tagLength),r),!s.equal(c,t.subarray(t.length-this.tagLength,t.length)))return null;var f,l=t.length-this.tagLength;if(i){if(i.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");f=i}else f=new Uint8Array(l);return n.streamXOR(this._key,a,t.subarray(0,t.length-this.tagLength),f,4),o.wipe(a),f},e.prototype.clean=function(){return o.wipe(this._key),this},e.prototype._authenticate=function(e,t,r,n){var s=new i.Poly1305(t);n&&(s.update(n),n.length%16>0&&s.update(u.subarray(n.length%16))),s.update(r),r.length%16>0&&s.update(u.subarray(r.length%16));var c=new Uint8Array(8);n&&a.writeUint64LE(n.length,c),s.update(c),a.writeUint64LE(r.length,c),s.update(c);for(var f=s.digest(),l=0;l<f.length;l++)e[l]=f[l];s.clean(),o.wipe(f),o.wipe(c)},e}();t.ChaCha20Poly1305=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(206),i=r(94);function o(e,t,r){for(var i=1634760805,o=857760878,a=2036477234,s=1797285236,u=r[3]<<24|r[2]<<16|r[1]<<8|r[0],c=r[7]<<24|r[6]<<16|r[5]<<8|r[4],f=r[11]<<24|r[10]<<16|r[9]<<8|r[8],l=r[15]<<24|r[14]<<16|r[13]<<8|r[12],h=r[19]<<24|r[18]<<16|r[17]<<8|r[16],d=r[23]<<24|r[22]<<16|r[21]<<8|r[20],p=r[27]<<24|r[26]<<16|r[25]<<8|r[24],v=r[31]<<24|r[30]<<16|r[29]<<8|r[28],y=t[3]<<24|t[2]<<16|t[1]<<8|t[0],b=t[7]<<24|t[6]<<16|t[5]<<8|t[4],g=t[11]<<24|t[10]<<16|t[9]<<8|t[8],m=t[15]<<24|t[14]<<16|t[13]<<8|t[12],w=i,k=o,S=a,E=s,_=u,A=c,x=f,T=l,M=h,C=d,O=p,I=v,P=y,R=b,B=g,D=m,N=0;N<20;N+=2)_=(_^=M=M+(P=(P^=w=w+_|0)>>>16|P<<16)|0)>>>20|_<<12,A=(A^=C=C+(R=(R^=k=k+A|0)>>>16|R<<16)|0)>>>20|A<<12,x=(x^=O=O+(B=(B^=S=S+x|0)>>>16|B<<16)|0)>>>20|x<<12,T=(T^=I=I+(D=(D^=E=E+T|0)>>>16|D<<16)|0)>>>20|T<<12,x=(x^=O=O+(B=(B^=S=S+x|0)>>>24|B<<8)|0)>>>25|x<<7,T=(T^=I=I+(D=(D^=E=E+T|0)>>>24|D<<8)|0)>>>25|T<<7,A=(A^=C=C+(R=(R^=k=k+A|0)>>>24|R<<8)|0)>>>25|A<<7,_=(_^=M=M+(P=(P^=w=w+_|0)>>>24|P<<8)|0)>>>25|_<<7,A=(A^=O=O+(D=(D^=w=w+A|0)>>>16|D<<16)|0)>>>20|A<<12,x=(x^=I=I+(P=(P^=k=k+x|0)>>>16|P<<16)|0)>>>20|x<<12,T=(T^=M=M+(R=(R^=S=S+T|0)>>>16|R<<16)|0)>>>20|T<<12,_=(_^=C=C+(B=(B^=E=E+_|0)>>>16|B<<16)|0)>>>20|_<<12,T=(T^=M=M+(R=(R^=S=S+T|0)>>>24|R<<8)|0)>>>25|T<<7,_=(_^=C=C+(B=(B^=E=E+_|0)>>>24|B<<8)|0)>>>25|_<<7,x=(x^=I=I+(P=(P^=k=k+x|0)>>>24|P<<8)|0)>>>25|x<<7,A=(A^=O=O+(D=(D^=w=w+A|0)>>>24|D<<8)|0)>>>25|A<<7;n.writeUint32LE(w+i|0,e,0),n.writeUint32LE(k+o|0,e,4),n.writeUint32LE(S+a|0,e,8),n.writeUint32LE(E+s|0,e,12),n.writeUint32LE(_+u|0,e,16),n.writeUint32LE(A+c|0,e,20),n.writeUint32LE(x+f|0,e,24),n.writeUint32LE(T+l|0,e,28),n.writeUint32LE(M+h|0,e,32),n.writeUint32LE(C+d|0,e,36),n.writeUint32LE(O+p|0,e,40),n.writeUint32LE(I+v|0,e,44),n.writeUint32LE(P+y|0,e,48),n.writeUint32LE(R+b|0,e,52),n.writeUint32LE(B+g|0,e,56),n.writeUint32LE(D+m|0,e,60)}function a(e,t,r,n,a){if(void 0===a&&(a=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var u,c;if(0===a){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");c=(u=new Uint8Array(16)).length-t.length,u.set(t,c)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");u=t,c=a}for(var f=new Uint8Array(64),l=0;l<r.length;l+=64){o(f,u,e);for(var h=l;h<l+64&&h<r.length;h++)n[h]=r[h]^f[h-l];s(u,0,c)}return i.wipe(f),0===a&&i.wipe(u),n}function s(e,t,r){for(var n=1;r--;)n=n+(255&e[t])|0,e[t]=255&n,n>>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=a,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),a(e,t,r,r,n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(282),i=r(94);t.DIGEST_LENGTH=16;var o=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=8191&r;var n=e[2]|e[3]<<8;this._r[1]=8191&(r>>>13|n<<3);var i=e[4]|e[5]<<8;this._r[2]=7939&(n>>>10|i<<6);var o=e[6]|e[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var a=e[8]|e[9]<<8;this._r[4]=255&(o>>>4|a<<12),this._r[5]=a>>>1&8190;var s=e[10]|e[11]<<8;this._r[6]=8191&(a>>>14|s<<2);var u=e[12]|e[13]<<8;this._r[7]=8065&(s>>>11|u<<5);var c=e[14]|e[15]<<8;this._r[8]=8191&(u>>>8|c<<8),this._r[9]=c>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,r){for(var n=this._fin?0:2048,i=this._h[0],o=this._h[1],a=this._h[2],s=this._h[3],u=this._h[4],c=this._h[5],f=this._h[6],l=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],v=this._r[1],y=this._r[2],b=this._r[3],g=this._r[4],m=this._r[5],w=this._r[6],k=this._r[7],S=this._r[8],E=this._r[9];r>=16;){var _=e[t+0]|e[t+1]<<8;i+=8191&_;var A=e[t+2]|e[t+3]<<8;o+=8191&(_>>>13|A<<3);var x=e[t+4]|e[t+5]<<8;a+=8191&(A>>>10|x<<6);var T=e[t+6]|e[t+7]<<8;s+=8191&(x>>>7|T<<9);var M=e[t+8]|e[t+9]<<8;u+=8191&(T>>>4|M<<12),c+=M>>>1&8191;var C=e[t+10]|e[t+11]<<8;f+=8191&(M>>>14|C<<2);var O=e[t+12]|e[t+13]<<8;l+=8191&(C>>>11|O<<5);var I=e[t+14]|e[t+15]<<8,P=0,R=P;R+=i*p,R+=o*(5*E),R+=a*(5*S),R+=s*(5*k),P=(R+=u*(5*w))>>>13,R&=8191,R+=c*(5*m),R+=f*(5*g),R+=l*(5*b),R+=(h+=8191&(O>>>8|I<<8))*(5*y);var B=P+=(R+=(d+=I>>>5|n)*(5*v))>>>13;B+=i*v,B+=o*p,B+=a*(5*E),B+=s*(5*S),P=(B+=u*(5*k))>>>13,B&=8191,B+=c*(5*w),B+=f*(5*m),B+=l*(5*g),B+=h*(5*b),P+=(B+=d*(5*y))>>>13,B&=8191;var D=P;D+=i*y,D+=o*v,D+=a*p,D+=s*(5*E),P=(D+=u*(5*S))>>>13,D&=8191,D+=c*(5*k),D+=f*(5*w),D+=l*(5*m),D+=h*(5*g);var N=P+=(D+=d*(5*b))>>>13;N+=i*b,N+=o*y,N+=a*v,N+=s*p,P=(N+=u*(5*E))>>>13,N&=8191,N+=c*(5*S),N+=f*(5*k),N+=l*(5*w),N+=h*(5*m);var L=P+=(N+=d*(5*g))>>>13;L+=i*g,L+=o*b,L+=a*y,L+=s*v,P=(L+=u*p)>>>13,L&=8191,L+=c*(5*E),L+=f*(5*S),L+=l*(5*k),L+=h*(5*w);var j=P+=(L+=d*(5*m))>>>13;j+=i*m,j+=o*g,j+=a*b,j+=s*y,P=(j+=u*v)>>>13,j&=8191,j+=c*p,j+=f*(5*E),j+=l*(5*S),j+=h*(5*k);var U=P+=(j+=d*(5*w))>>>13;U+=i*w,U+=o*m,U+=a*g,U+=s*b,P=(U+=u*y)>>>13,U&=8191,U+=c*v,U+=f*p,U+=l*(5*E),U+=h*(5*S);var F=P+=(U+=d*(5*k))>>>13;F+=i*k,F+=o*w,F+=a*m,F+=s*g,P=(F+=u*b)>>>13,F&=8191,F+=c*y,F+=f*v,F+=l*p,F+=h*(5*E);var K=P+=(F+=d*(5*S))>>>13;K+=i*S,K+=o*k,K+=a*w,K+=s*m,P=(K+=u*g)>>>13,K&=8191,K+=c*b,K+=f*y,K+=l*v,K+=h*p;var z=P+=(K+=d*(5*E))>>>13;z+=i*E,z+=o*S,z+=a*k,z+=s*w,P=(z+=u*m)>>>13,z&=8191,z+=c*g,z+=f*b,z+=l*y,z+=h*v,i=R=8191&(P=(P=((P+=(z+=d*p)>>>13)<<2)+P|0)+(R&=8191)|0),o=B+=P>>>=13,a=D&=8191,s=N&=8191,u=L&=8191,c=j&=8191,f=U&=8191,l=F&=8191,h=K&=8191,d=z&=8191,t+=16,r-=16}this._h[0]=i,this._h[1]=o,this._h[2]=a,this._h[3]=s,this._h[4]=u,this._h[5]=c,this._h[6]=f,this._h[7]=l,this._h[8]=h,this._h[9]=d},e.prototype.finish=function(e,t){void 0===t&&(t=0);var r,n,i,o,a=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=r,r=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,a[0]=this._h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this._h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this._h[o]=this._h[o]&n|a[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,r=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[r+i];if(n-=t,r+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(n>=16&&(t=n-n%16,this._blocks(e,r,t),r+=t,n-=t),n){for(i=0;i<n;i++)this._buffer[this._leftover+i]=e[r+i];this._leftover+=n}return this},e.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},e.prototype.clean=function(){return i.wipe(this._buffer),i.wipe(this._r),i.wipe(this._h),i.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},e}();t.Poly1305=o,t.oneTimeAuth=function(e,t){var r=new o(e);r.update(t);var n=r.digest();return r.clean(),n},t.equal=function(e,r){return e.length===t.DIGEST_LENGTH&&r.length===t.DIGEST_LENGTH&&n.equal(e,r)}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9);Object.defineProperty(t,"__esModule",{value:!0}),t.IKHandshake=void 0;var s=r(858),u=r(13),c=r(209),f=r(115),l=r(859),h=r(174),d=function(){function e(t,r,n,i,a,c,f,l){o(this,e),this.isInitiator=t,this.payload=u.Buffer.from(r),this.prologue=n,this.staticKeypair=i,this.connection=a,f&&(this.remotePeer=f),this.ik=null!==l&&void 0!==l?l:new s.IK,this.session=this.ik.initSession(this.isInitiator,this.prologue,this.staticKeypair,c),this.remoteEarlyData=u.Buffer.alloc(0)}return a(e,[{key:"stage0",value:function(){var e=i(n.mark((function e(){var t,r,i,o,a,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h.logLocalStaticKeys(this.session.hs.s),h.logRemoteStaticKey(this.session.hs.rs),!this.isInitiator){e.next=10;break}h.logger("IK Stage 0 - Initiator sending message..."),t=this.ik.sendMessage(this.session,this.payload),this.connection.writeLP(c.encode1(t)),h.logger("IK Stage 0 - Initiator sent message."),h.logLocalEphemeralKeys(this.session.hs.e),e.next=41;break;case 10:return h.logger("IK Stage 0 - Responder receiving message..."),e.next=13,this.connection.readLP();case 13:if(r=e.sent,e.prev=14,i=c.decode1(r.slice()),o=this.ik.recvMessage(this.session,i),a=o.plaintext,o.valid){e.next=19;break}throw new Error("ik handshake stage 0 decryption validation fail");case 19:return h.logger("IK Stage 0 - Responder got message, going to verify payload."),e.next=22,f.decodePayload(a);case 22:if(s=e.sent,e.t0=this.remotePeer,e.t0){e.next=28;break}return e.next=27,f.getPeerIdFromPayload(s);case 27:e.t0=e.sent;case 28:return this.remotePeer=e.t0,e.next=31,f.verifySignedPayload(this.session.hs.rs,s,this.remotePeer);case 31:this.setRemoteEarlyData(s.data),h.logger("IK Stage 0 - Responder successfully verified payload!"),h.logRemoteEphemeralKey(this.session.hs.re),e.next=41;break;case 36:throw e.prev=36,e.t1=e.catch(14),u=e.t1,h.logger("Responder breaking up with IK handshake in stage 0."),new l.FailedIKError(r,"Error occurred while verifying initiator's signed payload: ".concat(u.message));case 41:case"end":return e.stop()}}),e,this,[[14,36]])})));return function(){return e.apply(this,arguments)}}()},{key:"stage1",value:function(){var e=i(n.mark((function e(){var t,r,i,o,a,s,d,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isInitiator){e.next=34;break}return h.logger("IK Stage 1 - Initiator receiving message..."),e.next=4,this.connection.readLP();case 4:if(t=e.sent.slice(),r=c.decode0(u.Buffer.from(t)),i=this.ik.recvMessage(this.session,r),o=i.plaintext,a=i.valid,h.logger("IK Stage 1 - Initiator got message, going to verify payload."),e.prev=8,a){e.next=11;break}throw new Error("ik stage 1 decryption validation fail");case 11:return e.next=13,f.decodePayload(o);case 13:if(s=e.sent,e.t0=this.remotePeer,e.t0){e.next=19;break}return e.next=18,f.getPeerIdFromPayload(s);case 18:e.t0=e.sent;case 19:return this.remotePeer=e.t0,e.next=22,f.verifySignedPayload(r.ns.slice(0,32),s,this.remotePeer);case 22:this.setRemoteEarlyData(s.data),h.logger("IK Stage 1 - Initiator successfully verified payload!"),h.logRemoteEphemeralKey(this.session.hs.re),e.next=32;break;case 27:throw e.prev=27,e.t1=e.catch(8),d=e.t1,h.logger("Initiator breaking up with IK handshake in stage 1."),new l.FailedIKError(t,"Error occurred while verifying responder's signed payload: ".concat(d.message));case 32:e.next=39;break;case 34:h.logger("IK Stage 1 - Responder sending message..."),p=this.ik.sendMessage(this.session,this.payload),this.connection.writeLP(c.encode0(p)),h.logger("IK Stage 1 - Responder sent message..."),h.logLocalEphemeralKeys(this.session.hs.e);case 39:h.logCipherState(this.session);case 40:case"end":return e.stop()}}),e,this,[[8,27]])})));return function(){return e.apply(this,arguments)}}()},{key:"decrypt",value:function(e,t){var r=this.getCS(t,!1);return this.ik.decryptWithAd(r,u.Buffer.alloc(0),e)}},{key:"encrypt",value:function(e,t){var r=this.getCS(t);return this.ik.encryptWithAd(r,u.Buffer.alloc(0),e)}},{key:"getLocalEphemeralKeys",value:function(){if(!this.session.hs.e)throw new Error("Ephemeral keys do not exist.");return this.session.hs.e}},{key:"getCS",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e.cs1||!e.cs2)throw new Error("Handshake not completed properly, cipher state does not exist.");return this.isInitiator?t?e.cs1:e.cs2:t?e.cs2:e.cs1}},{key:"setRemoteEarlyData",value:function(e){e&&(this.remoteEarlyData=u.Buffer.from(e.buffer,e.byteOffset,e.length))}}]),e}();t.IKHandshake=d},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(26),a=r(27);Object.defineProperty(t,"__esModule",{value:!0}),t.IK=void 0;var s=r(13),u=r(115),c=function(e){o(r,e);var t=a(r);function r(){return n(this,r),t.apply(this,arguments)}return i(r,[{key:"initSession",value:function(e,t,r,n){var i=this.createEmptyKey();return{hs:e?this.initializeInitiator(t,r,n,i):this.initializeResponder(t,r,n,i),i:e,mc:0}}},{key:"sendMessage",value:function(e,t){var r;if(0===e.mc)r=this.writeMessageA(e.hs,t);else if(1===e.mc){var n=this.writeMessageB(e.hs,t),i=n.messageBuffer,o=n.h,a=n.cs1,s=n.cs2;r=i,e.h=o,e.cs1=a,e.cs2=s}else{if(!(e.mc>1))throw new Error("Session invalid.");if(e.i){if(!e.cs1)throw new Error("CS1 (cipher state) is not defined");r=this.writeMessageRegular(e.cs1,t)}else{if(!e.cs2)throw new Error("CS2 (cipher state) is not defined");r=this.writeMessageRegular(e.cs2,t)}}return e.mc++,r}},{key:"recvMessage",value:function(e,t){var r=s.Buffer.alloc(0),n=!1;if(0===e.mc){var i=this.readMessageA(e.hs,t);r=i.plaintext,n=i.valid}if(1===e.mc){var o=this.readMessageB(e.hs,t),a=o.plaintext,u=o.valid,c=o.h,f=o.cs1,l=o.cs2;r=a,n=u,e.h=c,e.cs1=f,e.cs2=l}return e.mc++,{plaintext:r,valid:n}}},{key:"writeMessageA",value:function(e,t){e.e=u.generateKeypair();var r=e.e.publicKey;this.mixHash(e.ss,r),this.mixKey(e.ss,this.dh(e.e.privateKey,e.rs));var n=s.Buffer.from(e.s.publicKey),i=this.encryptAndHash(e.ss,n);return this.mixKey(e.ss,this.dh(e.s.privateKey,e.rs)),{ne:r,ns:i,ciphertext:this.encryptAndHash(e.ss,t)}}},{key:"writeMessageB",value:function(e,t){e.e=u.generateKeypair();var r=e.e.publicKey;this.mixHash(e.ss,r),this.mixKey(e.ss,this.dh(e.e.privateKey,e.re)),this.mixKey(e.ss,this.dh(e.e.privateKey,e.rs));var n=this.encryptAndHash(e.ss,t),i={ne:r,ns:this.createEmptyKey(),ciphertext:n},o=this.split(e.ss);return{messageBuffer:i,cs1:o.cs1,cs2:o.cs2,h:e.ss.h}}},{key:"readMessageA",value:function(e,t){u.isValidPublicKey(t.ne)&&(e.re=t.ne),this.mixHash(e.ss,e.re),this.mixKey(e.ss,this.dh(e.s.privateKey,e.re));var r=this.decryptAndHash(e.ss,t.ns),n=r.plaintext,i=r.valid;i&&32===n.length&&u.isValidPublicKey(n)&&(e.rs=n),this.mixKey(e.ss,this.dh(e.s.privateKey,e.rs));var o=this.decryptAndHash(e.ss,t.ciphertext),a=o.plaintext,s=o.valid;return{plaintext:a,valid:i&&s}}},{key:"readMessageB",value:function(e,t){if(u.isValidPublicKey(t.ne)&&(e.re=t.ne),this.mixHash(e.ss,e.re),!e.e)throw new Error("Handshake state should contain ephemeral key by now.");this.mixKey(e.ss,this.dh(e.e.privateKey,e.re)),this.mixKey(e.ss,this.dh(e.s.privateKey,e.re));var r=this.decryptAndHash(e.ss,t.ciphertext),n=r.plaintext,i=r.valid,o=this.split(e.ss),a=o.cs1,s=o.cs2;return{h:e.ss.h,valid:i,plaintext:n,cs1:a,cs2:s}}},{key:"initializeInitiator",value:function(e,t,r,n){var i=this.initializeSymmetric("Noise_IK_25519_ChaChaPoly_SHA256");return this.mixHash(i,e),this.mixHash(i,r),{ss:i,s:t,rs:r,re:s.Buffer.alloc(32),psk:n}}},{key:"initializeResponder",value:function(e,t,r,n){var i=this.initializeSymmetric("Noise_IK_25519_ChaChaPoly_SHA256");return this.mixHash(i,e),this.mixHash(i,t.publicKey),{ss:i,s:t,rs:r,re:s.Buffer.alloc(32),psk:n}}}]),r}(r(448).AbstractHandshake);t.IK=c},function(e,t,r){"use strict";var n=r(8),i=r(26),o=r(27),a=r(93);Object.defineProperty(t,"__esModule",{value:!0}),t.FailedIKError=void 0;var s=function(e){i(r,e);var t=o(r);function r(e,i){var o;return n(this,r),(o=t.call(this,i)).initialMsg=e,o.name="FailedIKhandshake",o}return r}(a(Error));t.FailedIKError=s},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(136),u=r(84),c=r(26),f=r(27);Object.defineProperty(t,"__esModule",{value:!0}),t.XXFallbackHandshake=void 0;var l=r(13),h=r(443),d=r(115),p=r(174),v=r(209),y=function(e){c(r,e);var t=f(r);function r(e,n,i,a,s,u,c,f,l){var h;return o(this,r),h=t.call(this,e,n,i,a,s,c,l),f&&(h.ephemeralKeys=f),h.initialMsg=u,h}return a(r,[{key:"propose",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isInitiator){e.next=6;break}this.xx.sendMessage(this.session,l.Buffer.alloc(0),this.ephemeralKeys),p.logger("XX Fallback Stage 0 - Initialized state as the first message was sent by initiator."),p.logLocalEphemeralKeys(this.session.hs.e),e.next=13;break;case 6:if(p.logger("XX Fallback Stage 0 - Responder decoding initial msg from IK."),t=v.decode0(this.initialMsg),r=this.xx.recvMessage(this.session,{ne:t.ne,ns:l.Buffer.alloc(0),ciphertext:l.Buffer.alloc(0)}),r.valid){e.next=11;break}throw new Error("xx fallback stage 0 decryption validation fail");case 11:p.logger("XX Fallback Stage 0 - Responder used received message from IK."),p.logRemoteEphemeralKey(this.session.hs.re);case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"exchange",value:function(){var e=i(n.mark((function e(){var t,i,o,a,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isInitiator){e.next=31;break}if(t=v.decode1(this.initialMsg),i=this.xx.recvMessage(this.session,t),o=i.plaintext,i.valid){e.next=5;break}throw new Error("xx fallback stage 1 decryption validation fail");case 5:return p.logger("XX Fallback Stage 1 - Initiator used received message from IK."),p.logRemoteEphemeralKey(this.session.hs.re),p.logRemoteStaticKey(this.session.hs.rs),p.logger("Initiator going to check remote's signature..."),e.prev=9,e.next=12,d.decodePayload(o);case 12:if(a=e.sent,e.t0=this.remotePeer,e.t0){e.next=18;break}return e.next=17,d.getPeerIdFromPayload(a);case 17:e.t0=e.sent;case 18:return this.remotePeer=e.t0,e.next=21,d.verifySignedPayload(this.session.hs.rs,a,this.remotePeer);case 21:this.setRemoteEarlyData(a.data),e.next=28;break;case 24:throw e.prev=24,e.t1=e.catch(9),c=e.t1,new Error("Error occurred while verifying signed payload from responder: ".concat(c.message));case 28:p.logger("All good with the signature!"),e.next=35;break;case 31:return p.logger("XX Fallback Stage 1 - Responder start"),e.next=34,s(u(r.prototype),"exchange",this).call(this);case 34:p.logger("XX Fallback Stage 1 - Responder end");case 35:case"end":return e.stop()}}),e,this,[[9,24]])})));return function(){return e.apply(this,arguments)}}()}]),r}(h.XXHandshake);t.XXFallbackHandshake=y},function(e,t,r){"use strict";var n=r(0),i=r(45),o=r(44),a=r(30);Object.defineProperty(t,"__esModule",{value:!0}),t.decryptStream=t.encryptStream=void 0;var s=r(13),u=r(288);t.encryptStream=function(e){return function(){var t=o(n.mark((function t(r){var o,c,f,l,h,d,p,v,y,b,g;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=!0,c=!1,t.prev=2,l=a(r);case 4:return t.next=6,i(l.next());case 6:return h=t.sent,o=h.done,t.next=10,i(h.value);case 10:if(d=t.sent,o){t.next=27;break}p=d,v=s.Buffer.from(p.buffer,p.byteOffset,p.length),y=0;case 15:if(!(y<v.length)){t.next=24;break}return(b=y+u.NOISE_MSG_MAX_LENGTH_BYTES_WITHOUT_TAG)>v.length&&(b=v.length),g=e.encrypt(v.slice(y,b),e.session),t.next=21,g;case 21:y+=u.NOISE_MSG_MAX_LENGTH_BYTES_WITHOUT_TAG,t.next=15;break;case 24:o=!0,t.next=4;break;case 27:t.next=33;break;case 29:t.prev=29,t.t0=t.catch(2),c=!0,f=t.t0;case 33:if(t.prev=33,t.prev=34,o||null==l.return){t.next=38;break}return t.next=38,i(l.return());case 38:if(t.prev=38,!c){t.next=41;break}throw f;case 41:return t.finish(38);case 42:return t.finish(33);case 43:case"end":return t.stop()}}),t,null,[[2,29,33,43],[34,,38,42]])})));return function(e){return t.apply(this,arguments)}}()},t.decryptStream=function(e){return function(){var t=o(n.mark((function t(r){var o,c,f,l,h,d,p,v,y,b,g,m,w;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=!0,c=!1,t.prev=2,l=a(r);case 4:return t.next=6,i(l.next());case 6:return h=t.sent,o=h.done,t.next=10,i(h.value);case 10:if(d=t.sent,o){t.next=34;break}p=d,v=s.Buffer.from(p.buffer,p.byteOffset,p.length),y=0;case 15:if(!(y<v.length)){t.next=31;break}return(b=y+u.NOISE_MSG_MAX_LENGTH_BYTES)>v.length&&(b=v.length),g=v.slice(y,b),t.next=21,i(e.decrypt(g,e.session));case 21:if(m=t.sent,w=m.plaintext,m.valid){t.next=26;break}throw new Error("Failed to validate decrypted chunk");case 26:return t.next=28,w;case 28:y+=u.NOISE_MSG_MAX_LENGTH_BYTES,t.next=15;break;case 31:o=!0,t.next=4;break;case 34:t.next=40;break;case 36:t.prev=36,t.t0=t.catch(2),c=!0,f=t.t0;case 40:if(t.prev=40,t.prev=41,o||null==l.return){t.next=45;break}return t.next=45,i(l.return());case 45:if(t.prev=45,!c){t.next=48;break}throw f;case 48:return t.finish(45);case 49:return t.finish(40);case 50:case"end":return t.stop()}}),t,null,[[2,36,40,50],[41,,45,49]])})));return function(e){return t.apply(this,arguments)}}()}},function(e,t,r){"use strict";var n=r(8),i=r(9);Object.defineProperty(t,"__esModule",{value:!0}),t.KeyCache=void 0;var o=new(function(){function e(){n(this,e),this.storage=new Map}return i(e,[{key:"store",value:function(e,t){this.storage.set(e.id,t)}},{key:"load",value:function(e){var t;return e&&null!==(t=this.storage.get(e.id))&&void 0!==t?t:null}},{key:"resetStorage",value:function(){this.storage.clear()}}]),e}());t.KeyCache=o},function(e,t,r){"use strict";var n=r(21),i=r(0),o=r(6),a=r(29),s=r(8),u=r(9),c=r(61),f=r(136),l=r(84),h=r(26),d=r(27),p=r(22),v=Object.assign(p("libp2p"),{error:p("libp2p:err")}),y=r(57).EventEmitter,b=r(15),g=r(43),m=r(42).Multiaddr,w=r(864),k=r(866),S=r(455),E=r(867).validate,_=r(50),A=_.codes,x=_.messages,T=r(887),M=r(888),C=r(892),O=r(896),I=r(898),P=r(911),R=r(927),B=r(460),D=r(933),N=r(478),L=r(946),j=r(947),U=r(951),F=r(479),K=r(954),z=r(956),V=r(461).updateSelfPeerRecord,H=function(e){h(r,e);var t=d(r);function r(e){var n;if(s(this,r),(n=t.call(this))._options=E(e),n.peerId=n._options.peerId,n.datastore=n._options.datastore,n.peerStore=n.datastore&&n._options.peerStore.persistence?new j(a({peerId:n.peerId,datastore:n.datastore},n._options.peerStore)):new N({peerId:n.peerId}),n.addresses=n._options.addresses,n.addressManager=new T(n.peerId,n._options.addresses),n.addressManager.on("change:addresses",(function(){V(c(n)).catch((function(e){v.error("Error updating self peer record",e)}))})),n._modules=n._options.modules,n._config=n._options.config,n._transport=[],n._discovery=new Map,n.connectionManager=new M(c(n),a({autoDial:n._config.peerDiscovery.autoDial},n._options.connectionManager)),n._options.metrics.enabled&&(n.metrics=new R(a(a({},n._options.metrics),{},{connectionManager:n.connectionManager}))),n._options.keychain&&n._options.keychain.datastore){v("creating keychain");var i=P.generateOptions();n.keychain=new P(n._options.keychain.datastore,a(a({},i),n._options.keychain)),v("keychain constructed")}if(n.upgrader=new D({localPeer:n.peerId,metrics:n.metrics,onConnection:function(e){return n.connectionManager.onConnect(e)},onConnectionEnd:function(e){return n.connectionManager.onDisconnect(e)}}),n.transportManager=new B({libp2p:c(n),upgrader:n.upgrader,faultTolerance:n._options.transportManager.faultTolerance}),n.natManager=new z(a({peerId:n.peerId,addressManager:n.addressManager,transportManager:n.transportManager},n._options.config.nat)),n.registrar=new U({peerStore:n.peerStore,connectionManager:n.connectionManager}),n.handle=n.handle.bind(c(n)),n.registrar.handle=n.handle,!n._modules.connEncryption||!n._modules.connEncryption.length)throw b(new Error(x.CONN_ENCRYPTION_REQUIRED),A.CONN_ENCRYPTION_REQUIRED);(n._modules.connEncryption.forEach((function(e){n.upgrader.cryptos.set(e.protocol,e)})),n.dialer=new I(a({transportManager:n.transportManager,peerStore:n.peerStore},n._options.dialer)),n._modules.transport.forEach((function(e){var t=e.prototype[Symbol.toStringTag],r=n._config.transport[t];n.transportManager.add(t,e,r)})),n._config.relay.enabled&&(n.transportManager.add(C.prototype[Symbol.toStringTag],C),n.relay=new O(c(n))),n._modules.streamMuxer)&&(n._modules.streamMuxer.forEach((function(e){n.upgrader.muxers.set(e.multicodec,e)})),n.identifyService=new K({libp2p:c(n)}),n.handle(Object.values(K.getProtocolStr(c(n))),n.identifyService.handleMessage));if(n._modules.connProtector)n.upgrader.protector=n._modules.connProtector;else if(void 0!==globalThis.process&&globalThis.process.env&&globalThis.process.env.LIBP2P_FORCE_PNET)throw new Error("Private network is enforced, but no protector was provided");if(n._modules.dht){var o=n._modules.dht;n._dht=new o(a({libp2p:c(n),dialer:n.dialer,peerId:n.peerId,peerStore:n.peerStore,registrar:n.registrar,datastore:n.datastore},n._config.dht))}if(n._modules.pubsub){var u=n._modules.pubsub;n.pubsub=L(u,c(n),n._config.pubsub)}return n.peerRouting=new w(c(n)),n.contentRouting=new k(c(n)),F.mount(c(n)),n._onDiscoveryPeer=n._onDiscoveryPeer.bind(c(n)),n}return u(r,[{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var o;return"error"!==e||this._events.error?(o=f(l(r.prototype),"emit",this)).call.apply(o,[this,e].concat(n)):(v.error(n),!1)}},{key:"start",value:function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v("libp2p is starting"),e.prev=1,e.next=4,this._onStarting();case 4:return e.next=6,this._onDidStart();case 6:v("libp2p has started"),e.next=16;break;case 9:return e.prev=9,e.t0=e.catch(1),this.emit("error",e.t0),v.error("An error occurred starting libp2p",e.t0),e.next=15,this.stop();case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,this,[[1,9]])})));return function(){return e.apply(this,arguments)}}()},{key:"stop",value:function(){var e=o(i.mark((function e(){var t,r;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v("libp2p is stopping"),e.prev=1,this._isStarted=!1,this.relay&&this.relay.stop(),this.peerRouting.stop(),t=n(this._discovery.values());try{for(t.s();!(r=t.n()).done;)r.value.removeListener("peer",this._onDiscoveryPeer)}catch(i){t.e(i)}finally{t.f()}return e.next=9,Promise.all(Array.from(this._discovery.values(),(function(e){return e.stop()})));case 9:return this._discovery=new Map,e.next=12,this.peerStore.stop();case 12:return e.next=14,this.connectionManager.stop();case 14:return e.next=16,Promise.all([this.pubsub&&this.pubsub.stop(),this._dht&&this._dht.stop(),this.metrics&&this.metrics.stop()]);case 16:return e.next=18,this.natManager.stop();case 18:return e.next=20,this.transportManager.close();case 20:F.unmount(this),this.dialer.destroy(),e.next=27;break;case 24:e.prev=24,e.t0=e.catch(1),e.t0&&(v.error(e.t0),this.emit("error",e.t0));case 27:v("libp2p has stopped");case 28:case"end":return e.stop()}}),e,this,[[1,24]])})));return function(){return e.apply(this,arguments)}}()},{key:"loadKeychain",value:function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.keychain){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this.keychain.findKeyByName("self");case 5:e.next=11;break;case 7:return e.prev=7,e.t0=e.catch(2),e.next=11,this.keychain.importPeer("self",this.peerId);case 11:case"end":return e.stop()}}),e,this,[[2,7]])})));return function(){return e.apply(this,arguments)}}()},{key:"isStarted",value:function(){return this._isStarted}},{key:"connections",get:function(){return this.connectionManager.connections}},{key:"dial",value:function(e,t){return this._dial(e,t)}},{key:"dialProtocol",value:function(){var e=o(i.mark((function e(t,r,n){var o;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r&&r.length){e.next=2;break}throw b(new Error("no protocols were provided to open a stream"),A.ERR_INVALID_PROTOCOLS_FOR_STREAM);case 2:return e.next=4,this._dial(t,n);case 4:return o=e.sent,e.abrupt("return",o.newStream(r));case 6:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_dial",value:function(){var e=o(i.mark((function e(t,r){var n,o,a,s;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=S(t),o=n.id,a=n.multiaddrs,!o.equals(this.peerId)){e.next=3;break}throw b(new Error("Cannot dial self"),A.ERR_DIALED_SELF);case 3:if(s=this.connectionManager.get(o)){e.next=10;break}return e.next=7,this.dialer.connectToPeer(t,r);case 7:s=e.sent,e.next=11;break;case 10:a&&this.peerStore.addressBook.add(o,a);case 11:return e.abrupt("return",s);case 12:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"multiaddrs",get:function(){var e=this.addressManager.getAnnounceAddrs().map((function(e){return e.toString()}));e.length||(e=this.transportManager.getAddrs().map((function(e){return e.toString()}))),e=e.concat(this.addressManager.getObservedAddrs().map((function(e){return e.toString()})));var t=this._options.addresses.announceFilter,r=new Set(e);return t(Array.from(r).map((function(e){return new m(e)})))}},{key:"hangUp",value:function(){var e=o(i.mark((function e(t){var r,n,o;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=S(t),n=r.id,o=this.connectionManager.connections.get(n.toB58String())){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,Promise.all(o.map((function(e){return e.close()})));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"ping",value:function(e){var t=S(e),r=t.id,n=t.multiaddrs;return F(this,n?n[0]:r)}},{key:"handle",value:function(e,t){var r=this;(e=Array.isArray(e)?e:[e]).forEach((function(e){r.upgrader.protocols.set(e,t)})),this.peerStore.protoBook.add(this.peerId,e)}},{key:"unhandle",value:function(e){var t=this;(e=Array.isArray(e)?e:[e]).forEach((function(e){t.upgrader.protocols.delete(e)})),this.peerStore.protoBook.remove(this.peerId,e)}},{key:"_onStarting",value:function(){var e=o(i.mark((function e(){var t;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.addressManager.getListenAddrs(),e.next=3,this.transportManager.listen(t);case 3:return this.natManager.start(),e.next=6,this.peerStore.start();case 6:this._config.pubsub.enabled&&this.pubsub&&this.pubsub.start(),this._config.dht.enabled&&(this._dht&&this._dht.start(),this._dht.on("peer",this._onDiscoveryPeer)),this.metrics&&this.metrics.start();case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_onDidStart",value:function(){var e=o(i.mark((function e(){var t,r,o,a=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._isStarted=!0,this.peerStore.on("peer",(function(e){a.emit("peer:discovery",e),a._maybeConnect(e)})),t=n(this.peerStore.peers.values());try{for(t.s();!(r=t.n()).done;)o=r.value,this.emit("peer:discovery",o.id)}catch(i){t.e(i)}finally{t.f()}return this.connectionManager.start(),e.next=7,this._setupPeerDiscovery();case 7:this.relay&&this.relay.start(),this.peerRouting.start();case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_onDiscoveryPeer",value:function(e){e.id.toB58String()!==this.peerId.toB58String()?(e.multiaddrs&&this.peerStore.addressBook.add(e.id,e.multiaddrs),e.protocols&&this.peerStore.protoBook.set(e.id,e.protocols)):v.error(new Error(A.ERR_DISCOVERED_SELF))}},{key:"_maybeConnect",value:function(){var e=o(i.mark((function e(t){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!0!==this._config.peerDiscovery.autoDial||this.connectionManager.get(t)){e.next=12;break}if(!((this._options.connectionManager.minConnections||0)>this.connectionManager.size)){e.next=12;break}return v("connecting to discovered peer %s",t.toB58String()),e.prev=4,e.next=7,this.dialer.connectToPeer(t);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),v.error("could not connect to discovered peer ".concat(t.toB58String()," with ").concat(e.t0));case 12:case"end":return e.stop()}}),e,this,[[4,9]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_setupPeerDiscovery",value:function(){var e=o(i.mark((function e(){var t,r,o,s,u,c,f,l=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=function(e){var t,r={enabled:!0};(e.tag&&l._config.peerDiscovery&&l._config.peerDiscovery[e.tag]&&(r=a(a({},r),l._config.peerDiscovery[e.tag])),r.enabled&&!l._discovery.has(e.tag))&&((t="function"===typeof e?new e(Object.assign({},r,{peerId:l.peerId,libp2p:l})):e).on("peer",l._onDiscoveryPeer),l._discovery.set(e.tag,t))},r=n(this._modules.peerDiscovery||[]);try{for(r.s();!(o=r.n()).done;)s=o.value,t(s)}catch(i){r.e(i)}finally{r.f()}u=n(this.transportManager.getTransports());try{for(u.s();!(c=u.n()).done;)(f=c.value).discovery&&t(f.discovery)}catch(i){u.e(i)}finally{u.f()}return e.next=7,Promise.all(Array.from(this._discovery.values(),(function(e){return e.start()})));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}],[{key:"create",value:function(){var e=o(i.mark((function e(t){var n;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.peerId){e.next=2;break}return e.abrupt("return",new r(t));case 2:return e.next=4,g.create();case 4:return n=e.sent,t.peerId=n,e.abrupt("return",new r(t));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),r}(y);e.exports=H},function(e,t,r){"use strict";var n=r(48),i=r(0),o=r(6),a=r(8),s=r(9),u=r(44),c=r(45),f=r(30),l=r(138),h=r(22),d=Object.assign(h("libp2p:peer-routing"),{error:h("libp2p:peer-routing:err")}),p=r(15),v=r(449),y=v.storeAddresses,b=v.uniquePeers,g=v.requirePeers,m=r(451),w=r(60).pipe,k=r(452),S=r(453),E=r(289),_=r(454),A=_.setDelayedInterval,x=_.clearDelayedInterval,T=function(){function e(t){a(this,e),this._peerId=t.peerId,this._peerStore=t.peerStore,this._routers=t._modules.peerRouting||[],t._dht&&t._config.dht.enabled&&this._routers.push(t._dht),this._refreshManagerOptions=t._options.peerRouting.refreshManager,this._findClosestPeersTask=this._findClosestPeersTask.bind(this)}return s(e,[{key:"start",value:function(){this._routers.length&&!this._timeoutId&&this._refreshManagerOptions.enabled&&(this._timeoutId=A(this._findClosestPeersTask,this._refreshManagerOptions.interval,this._refreshManagerOptions.bootDelay))}},{key:"_findClosestPeersTask",value:function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,S(this.getClosestPeers(this._peerId.id));case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),d.error(e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(){return e.apply(this,arguments)}}()},{key:"stop",value:function(){x(this._timeoutId)}},{key:"findPeer",value:function(){var e=o(i.mark((function e(t,r){var o,a=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._routers.length){e.next=2;break}throw p(new Error("No peer routers available"),"NO_ROUTERS_AVAILABLE");case 2:if(t.toB58String()!==this._peerId.toB58String()){e.next=4;break}throw p(new Error("Should not try to find self"),"ERR_FIND_SELF");case 4:return e.next=6,w(m.apply(void 0,n(this._routers.map((function(e){return[e.findPeer(t,r)]})))),(function(e){return E(e,Boolean)}),(function(e){return y(e,a._peerStore)}),(function(e){return k(e)}));case 6:if(!(o=e.sent)){e.next=9;break}return e.abrupt("return",o);case 9:throw p(new Error("not found"),"NOT_FOUND");case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getClosestPeers",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:3e4};return u(i.mark((function o(){return i.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t._routers.length){i.next=2;break}throw p(new Error("No peer routers available"),"NO_ROUTERS_AVAILABLE");case 2:return i.delegateYield(l(f(w(m.apply(void 0,n(t._routers.map((function(t){return t.getClosestPeers(e,r)})))),(function(e){return y(e,t._peerStore)}),(function(e){return b(e)}),(function(e){return g(e)}))),c),"t0",3);case 3:case"end":return i.stop()}}),o)})))()}}]),e}();e.exports=T},function(e,t,r){"use strict";var n=r(0),i=r(45),o=r(44),a=r(30),s=function(){var e=o(n.mark((function e(t,r){var o,s,u,c,f,l,h;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=!0,s=!1,e.prev=2,c=a(t);case 4:return e.next=6,i(c.next());case 6:return f=e.sent,o=f.done,e.next=10,i(f.value);case 10:if(l=e.sent,o){e.next=18;break}return h=l,e.next=15,r(h);case 15:o=!0,e.next=4;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(2),s=!0,u=e.t0;case 24:if(e.prev=24,e.prev=25,o||null==c.return){e.next=29;break}return e.next=29,i(c.return());case 29:if(e.prev=29,!s){e.next=32;break}throw u;case 32:return e.finish(29);case 33:return e.finish(24);case 34:case"end":return e.stop()}}),e,null,[[2,20,24,34],[25,,29,33]])})));return function(t,r){return e.apply(this,arguments)}}();e.exports=s},function(e,t,r){"use strict";var n=r(6),i=r(0),o=r(48),a=r(8),s=r(9),u=r(44),c=r(45),f=r(30),l=r(138),h=r(15),d=r(50),p=d.messages,v=d.codes,y=r(449),b=y.storeAddresses,g=y.uniquePeers,m=y.requirePeers,w=y.maybeLimitSource,k=r(451),S=r(60).pipe,E=function(){function e(t){a(this,e),this.libp2p=t,this.routers=t._modules.contentRouting||[],this.dht=t._dht,this.dht&&t._config.dht.enabled&&this.routers.push(this.dht)}return s(e,[{key:"findProviders",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(i.mark((function n(){return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.routers.length){n.next=2;break}throw h(new Error("No content this.routers available"),"NO_ROUTERS_AVAILABLE");case 2:return n.delegateYield(l(f(S(k.apply(void 0,o(t.routers.map((function(t){return t.findProviders(e,r)})))),(function(e){return b(e,t.libp2p.peerStore)}),(function(e){return g(e)}),(function(e){return w(e,r.maxNumProviders)}),(function(e){return m(e)}))),c),"t0",3);case 3:case"end":return n.stop()}}),n)})))()}},{key:"provide",value:function(){var e=n(i.mark((function e(t){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.routers.length){e.next=2;break}throw h(new Error("No content routers available"),"NO_ROUTERS_AVAILABLE");case 2:return e.next=4,Promise.all(this.routers.map((function(e){return e.provide(t)})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"put",value:function(e,t,r){if(!this.libp2p.isStarted()||!this.dht.isStarted)throw h(new Error(p.NOT_STARTED_YET),v.DHT_NOT_STARTED);return this.dht.put(e,t,r)}},{key:"get",value:function(e,t){if(!this.libp2p.isStarted()||!this.dht.isStarted)throw h(new Error(p.NOT_STARTED_YET),v.DHT_NOT_STARTED);return this.dht.get(e,t)}},{key:"getMany",value:function(){var e=n(i.mark((function e(t,r,n){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.libp2p.isStarted()&&this.dht.isStarted){e.next=2;break}throw h(new Error(p.NOT_STARTED_YET),v.DHT_NOT_STARTED);case 2:return e.abrupt("return",this.dht.getMany(t,r,n));case 3:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()}]),e}();e.exports=E},function(e,t,r){"use strict";var n=r(210),i=r(869).dnsaddrResolver,o=r(290),a=r(456).AGENT_VERSION,s=r(291),u=r(458).publicAddressesFirst,c={addresses:{listen:[],announce:[],noAnnounce:[],announceFilter:function(e){return e}},connectionManager:{minConnections:25},transportManager:{faultTolerance:r(460).FaultTolerance.FATAL_ALL},dialer:{maxParallelDials:o.MAX_PARALLEL_DIALS,maxDialsPerPeer:o.MAX_PER_PEER_DIALS,dialTimeout:o.DIAL_TIMEOUT,resolvers:{dnsaddr:i},addressSorter:u},host:{agentVersion:a},metrics:{enabled:!1},peerStore:{persistence:!1,threshold:5},peerRouting:{refreshManager:{enabled:!0,interval:6e5,bootDelay:1e4}},config:{protocolPrefix:"ipfs",dht:{enabled:!1,kBucketSize:20,randomWalk:{enabled:!1,queriesPerPeriod:1,interval:3e5,timeout:1e4}},nat:{enabled:!0,ttl:7200,keepAlive:!0,gateway:null,externalIp:null,pmp:{enabled:!1}},peerDiscovery:{autoDial:!0},pubsub:{enabled:!0},relay:{enabled:!0,advertise:{bootDelay:s.ADVERTISE_BOOT_DELAY,enabled:!1,ttl:s.ADVERTISE_TTL},hop:{enabled:!1,active:!1},autoRelay:{enabled:!1,maxListeners:2}},transport:{}}};e.exports.validate=function(e){var t=n(c,e);if(t.modules.transport.length<1)throw new Error("'options.modules.transport' must contain at least 1 transport");return t}},function(e,t,r){"use strict";e.exports=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},function(e,t,r){"use strict";var n=r(0),i=r(40),o=r(6),a=r(195)("dnsaddr").code;function s(){return(s=o(n.mark((function e(t){var o,s,u,c,f,l,h,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r(870),s=new o,u=t.getPeerId(),c=t.stringTuples().find((function(e){return i(e,1)[0]===a}))||[],f=i(c,2),l=f[1],e.next=6,s.resolveTxt("_dnsaddr.".concat(l));case 6:return h=e.sent,d=h.flat().map((function(e){return e.split("=")[1]})),u&&(d=d.filter((function(e){return e.includes(u)}))),e.abrupt("return",d);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports={dnsaddrResolver:function(e){return s.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(871);e.exports=n},function(e,t,r){"use strict";var n=r(0),i=r(21),o=r(6),a=r(8),s=r(9),u=r(22),c=u("dns-over-http-resolver");c.error=u("dns-over-http-resolver:error");var f=r(872),l=r(873),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.maxCache,n=void 0===r?100:r;a(this,e),this._cache=new f({max:n}),this._servers=["https://cloudflare-dns.com/dns-query","https://dns.google/resolve"]}return s(e,[{key:"getServers",value:function(){return this._servers}},{key:"_getShuffledServers",value:function(){for(var e=[].concat(this._servers),t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*t),n=e[t];e[t]=e[r],e[r]=n}return e}},{key:"setServers",value:function(e){this._servers=e}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A";switch(t){case"A":return this.resolve4(e);case"AAAA":return this.resolve6(e);case"TXT":return this.resolveTxt(e);default:throw new Error("".concat(t," is not supported"))}}},{key:"resolve4",value:function(){var e=o(n.mark((function e(t){var r,o,a,s,u,f,h,d,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="A",!(o=this._cache.get(l.getCacheKey(t,r)))){e.next=4;break}return e.abrupt("return",o);case 4:a=i(this._getShuffledServers()),e.prev=5,a.s();case 7:if((s=a.n()).done){e.next=27;break}return u=s.value,e.prev=9,e.next=12,l.fetch(l.buildResource({serverResolver:u,hostname:t,recordType:r}));case 12:return f=e.sent,e.next=15,f.json();case 15:return h=e.sent,d=h.Answer.map((function(e){return e.data})),p=Math.min(h.Answer.map((function(e){return e.TTL}))),this._cache.set(l.getCacheKey(t,r),d,{ttl:p}),e.abrupt("return",d);case 22:e.prev=22,e.t0=e.catch(9),c.error("".concat(u," could not resolve ").concat(t," record ").concat(r));case 25:e.next=7;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(5),a.e(e.t1);case 32:return e.prev=32,a.f(),e.finish(32);case 35:throw new Error("Could not resolve ".concat(t," record ").concat(r));case 36:case"end":return e.stop()}}),e,this,[[5,29,32,35],[9,22]])})));return function(t){return e.apply(this,arguments)}}()},{key:"resolve6",value:function(){var e=o(n.mark((function e(t){var r,o,a,s,u,f,h,d,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="AAAA",!(o=this._cache.get(l.getCacheKey(t,r)))){e.next=4;break}return e.abrupt("return",o);case 4:a=i(this._getShuffledServers()),e.prev=5,a.s();case 7:if((s=a.n()).done){e.next=27;break}return u=s.value,e.prev=9,e.next=12,l.fetch(l.buildResource({serverResolver:u,hostname:t,recordType:r}));case 12:return f=e.sent,e.next=15,f.json();case 15:return h=e.sent,d=h.Answer.map((function(e){return e.data})),p=Math.min(h.Answer.map((function(e){return e.TTL}))),this._cache.set(l.getCacheKey(t,r),d,{ttl:p}),e.abrupt("return",d);case 22:e.prev=22,e.t0=e.catch(9),c.error("".concat(u," could not resolve ").concat(t," record ").concat(r));case 25:e.next=7;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(5),a.e(e.t1);case 32:return e.prev=32,a.f(),e.finish(32);case 35:throw new Error("Could not resolve ".concat(t," record ").concat(r));case 36:case"end":return e.stop()}}),e,this,[[5,29,32,35],[9,22]])})));return function(t){return e.apply(this,arguments)}}()},{key:"resolveTxt",value:function(){var e=o(n.mark((function e(t){var r,o,a,s,u,f,h,d,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="TXT",!(o=this._cache.get(l.getCacheKey(t,r)))){e.next=4;break}return e.abrupt("return",o);case 4:a=i(this._getShuffledServers()),e.prev=5,a.s();case 7:if((s=a.n()).done){e.next=27;break}return u=s.value,e.prev=9,e.next=12,l.fetch(l.buildResource({serverResolver:u,hostname:t,recordType:r}));case 12:return f=e.sent,e.next=15,f.json();case 15:return h=e.sent,d=h.Answer.map((function(e){return[e.data.replace(/['"]+/g,"")]})),p=Math.min(h.Answer.map((function(e){return e.TTL}))),this._cache.set(l.getCacheKey(t,r),d,{ttl:p}),e.abrupt("return",d);case 22:e.prev=22,e.t0=e.catch(9),c.error("".concat(u," could not resolve ").concat(t," record ").concat(r));case 25:e.next=7;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(5),a.e(e.t1);case 32:return e.prev=32,a.f(),e.finish(32);case 35:throw new Error("Could not resolve ".concat(t," record ").concat(r));case 36:case"end":return e.stop()}}),e,this,[[5,29,32,35],[9,22]])})));return function(t){return e.apply(this,arguments)}}()}]),e}();h.Resolver=h,e.exports=h},function(e,t,r){"use strict";e.exports=a;var n=r(376),i=a.prototype,o=new Date%1e9;function a(e){e=e||{},this.id=e.id||(1e9*Math.random()>>>0)+o++,this.max=e.max||1/0,this.items=e.items||[],this._lookup={},this.size=this.items.length,this.lastModified=new Date(e.lastModified||new Date);for(var t,r,n=this.items.length;n--;)t=this.items[n],r=new Date(t.expires)-new Date,this._lookup[t.key]=t,r>0?this.expire(t.key,r):r<=0&&this.delete(t.key)}i.has=function(e){return e in this._lookup},i.get=function(e){if(!this.has(e))return null;var t=this._lookup[e];return t.refresh&&this.expire(e,t.refresh),this.items.splice(this.items.indexOf(t),1),this.items.push(t),t.value},i.meta=function(e){if(!this.has(e))return null;var t=this._lookup[e];return"meta"in t?t.meta:null},i.set=function(e,t,r){var n=this._lookup[e],i=this._lookup[e]={key:e,value:t};return this.lastModified=new Date,n?(clearTimeout(n.timeout),this.items.splice(this.items.indexOf(n),1,i)):(this.size>=this.max&&this.delete(this.items[0].key),this.items.push(i),this.size++),r&&("ttl"in r&&this.expire(e,r.ttl),"meta"in r&&(i.meta=r.meta),r.refresh&&(i.refresh=r.ttl)),this},i.delete=function(e){var t=this._lookup[e];return!!t&&(this.lastModified=new Date,this.items.splice(this.items.indexOf(t),1),clearTimeout(t.timeout),delete this._lookup[e],this.size--,this)},i.expire=function(e,t){var r=t||0,i=this._lookup[e];if(!i)return this;if("string"===typeof r&&(r=n(t)),"number"!==typeof r)throw new TypeError("Expiration time must be a string or number.");return clearTimeout(i.timeout),i.timeout=setTimeout(this.delete.bind(this,i.key),r),i.expires=Number(new Date)+r,this},i.clear=function(){for(var e=this.items.length;e--;)this.delete(this.items[e].key);return this},i.toJSON=function(){for(var e,t=new Array(this.items.length),r=t.length;r--;)e=this.items[r],t[r]={key:e.key,meta:e.meta,value:e.value,expires:e.expires,refresh:e.refresh};return{id:this.id,max:isFinite(this.max)?this.max:void 0,lastModified:this.lastModified,items:t}}},function(e,t,r){"use strict";var n=r(874),i=n.default,o=n.Headers;e.exports={buildResource:function(e){var t=e.serverResolver,r=e.hostname,n=e.recordType;return"".concat(t,"?name=").concat(r,"&type=").concat(n)},fetch:function(e){return i(e,{headers:new o({accept:"application/dns-json"})})},getCacheKey:function(e,t){return"".concat(t,"_").concat(e)}}},function(e,t,r){"use strict";globalThis.fetch&&globalThis.Headers&&globalThis.Request&&globalThis.Response?e.exports={default:globalThis.fetch,Headers:globalThis.Headers,Request:globalThis.Request,Response:globalThis.Response}:e.exports={default:r(211).default,Headers:r(211).Headers,Request:r(211).Request,Response:r(211).Response}},function(e,t,r){"use strict";var n=r(459);e.exports=function(e){var t=e.nodeAddress().address;return n(t)}},function(e,t,r){var n=r(21),i=r(877).Netmask,o=r(378),a=["0.0.0.0/8","10.0.0.0/8","100.64.0.0/10","127.0.0.0/8","169.254.0.0/16","172.16.0.0/12","192.0.0.0/24","192.0.0.0/29","192.0.0.8/32","192.0.0.9/32","192.0.0.10/32","192.0.0.170/32","192.0.0.171/32","192.0.2.0/24","192.31.196.0/24","192.52.193.0/24","192.88.99.0/24","192.168.0.0/16","192.175.48.0/24","198.18.0.0/15","198.51.100.0/24","203.0.113.0/24","240.0.0.0/4","255.255.255.255/32"].map((function(e){return new i(e)}));e.exports=function(e){return o.v6().test(e)?function(e){return/^::$/.test(e)||/^::1$/.test(e)||/^::f{4}:([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(e)||/^::f{4}:0.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(e)||/^64:ff9b::([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(e)||/^100::([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^2001::([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^2001:2[0-9a-fA-F]:([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^2001:db8:([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^2002:([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^f[c-d]([0-9a-fA-F]{2,2}):/i.test(e)||/^fe[8-9a-bA-B][0-9a-fA-F]:/i.test(e)||/^ff([0-9a-fA-F]{2,2}):/i.test(e)}(e):!(!o().test(e)&&!e.startsWith("0"))&&function(e){var t,r=n(a);try{for(r.s();!(t=r.n()).done;)if(t.value.contains(e))return!0}catch(i){r.e(i)}finally{r.f()}return!1}(e)}},function(e,t){(function(){var e,r,n,i,o,a,s,u;u=function(e){return[(e&255<<24)>>>24,(e&255<<16)>>>16,(65280&e)>>>8,255&e].join(".")},s=function(e){var t,n,i,o,a,s;for(t=[],i=o=0;o<=3&&0!==e.length;i=++o){if(i>0){if("."!==e[0])throw new Error("Invalid IP");e=e.substring(1)}a=(s=r(e))[0],n=s[1],e=e.substring(n),t.push(a)}if(0!==e.length)throw new Error("Invalid IP");switch(t.length){case 1:if(t[0]>4294967295)throw new Error("Invalid IP");return t[0]>>>0;case 2:if(t[0]>255||t[1]>16777215)throw new Error("Invalid IP");return(t[0]<<24|t[1])>>>0;case 3:if(t[0]>255||t[1]>255||t[2]>65535)throw new Error("Invalid IP");return(t[0]<<24|t[1]<<16|t[2])>>>0;case 4:if(t[0]>255||t[1]>255||t[2]>255||t[3]>255)throw new Error("Invalid IP");return(t[0]<<24|t[1]<<16|t[2]<<8|t[3])>>>0;default:throw new Error("Invalid IP")}},i=(n=function(e){return e.charCodeAt(0)})("0"),a=n("a"),o=n("A"),r=function(e){var t,r,s,u,c;for(u=0,t=10,r="9",s=0,e.length>1&&"0"===e[s]&&("x"===e[s+1]||"X"===e[s+1]?(s+=2,t=16):"0"<=e[s+1]&&e[s+1]<="9"&&(s++,t=8,r="7")),c=s;s<e.length;){if("0"<=e[s]&&e[s]<=r)u=u*t+(n(e[s])-i)>>>0;else{if(16!==t)break;if("a"<=e[s]&&e[s]<="f")u=u*t+(10+n(e[s])-a)>>>0;else{if(!("A"<=e[s]&&e[s]<="F"))break;u=u*t+(10+n(e[s])-o)>>>0}}if(u>4294967295)throw new Error("too large");s++}if(s===c)throw new Error("empty octet");return[u,s]},e=function(){function e(e,t){var r,n,i;if("string"!==typeof e)throw new Error("Missing `net' parameter");if(t||(i=e.split("/",2),e=i[0],t=i[1]),t||(t=32),"string"===typeof t&&t.indexOf(".")>-1){try{this.maskLong=s(t)}catch(o){throw o,new Error("Invalid mask: "+t)}for(r=n=32;n>=0;r=--n)if(this.maskLong===4294967295<<32-r>>>0){this.bitmask=r;break}}else{if(!t&&0!==t)throw new Error("Invalid mask: empty");this.bitmask=parseInt(t,10),this.maskLong=0,this.bitmask>0&&(this.maskLong=4294967295<<32-this.bitmask>>>0)}try{this.netLong=(s(e)&this.maskLong)>>>0}catch(o){throw o,new Error("Invalid net address: "+e)}if(!(this.bitmask<=32))throw new Error("Invalid mask for ip4: "+t);this.size=Math.pow(2,32-this.bitmask),this.base=u(this.netLong),this.mask=u(this.maskLong),this.hostmask=u(~this.maskLong),this.first=this.bitmask<=30?u(this.netLong+1):this.base,this.last=this.bitmask<=30?u(this.netLong+this.size-2):u(this.netLong+this.size-1),this.broadcast=this.bitmask<=30?u(this.netLong+this.size-1):void 0}return e.prototype.contains=function(t){return"string"===typeof t&&(t.indexOf("/")>0||4!==t.split(".").length)&&(t=new e(t)),t instanceof e?this.contains(t.base)&&this.contains(t.broadcast||t.last):(s(t)&this.maskLong)>>>0===(this.netLong&this.maskLong)>>>0},e.prototype.next=function(t){return null==t&&(t=1),new e(u(this.netLong+this.size*t),this.mask)},e.prototype.forEach=function(e){var t,r,n;for(n=s(this.first),r=s(this.last),t=0;n<=r;)e(u(n),n,t),t++,n++},e.prototype.toString=function(){return this.base+"/"+this.bitmask},e}(),t.ip2long=s,t.long2ip=u,t.Netmask=e}).call(this)},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(879),a=r(880);e.exports=function(){var e=i(n.mark((function e(t){var r,i,s,u=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},i=r.concurrency,s=a(void 0===i?1/0:i),e.abrupt("return",Promise.all(t.map((function(e){return e&&"function"===typeof e.then?o(e):o("function"===typeof e?s((function(){return e()})):Promise.resolve(e))}))));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t;case 3:return r=e.sent,e.abrupt("return",{isFulfilled:!0,isRejected:!1,value:r});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{isFulfilled:!1,isRejected:!0,reason:e.t0});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}();e.exports=o,e.exports.default=o},function(e,t,r){"use strict";var n=r(881),i=function(e){if(!Number.isInteger(e)&&e!==1/0||!(e>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));var t=[],r=0,i=function(){r--,t.length>0&&t.shift()()},o=function(e,t){r++;for(var o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];var u=n.apply(void 0,[e].concat(a));t(u),u.then(i,i)},a=function(n,i){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];r<e?o.apply(void 0,[n,i].concat(s)):t.push(o.bind.apply(o,[null,n,i].concat(s)))},s=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new Promise((function(t){return a.apply(void 0,[e,t].concat(r))}))};return Object.defineProperties(s,{activeCount:{get:function(){return r}},pendingCount:{get:function(){return t.length}},clearQueue:{value:function(){t.length=0}}}),s};e.exports=i,e.exports.default=i},function(e,t,r){"use strict";var n=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new Promise((function(t){t(e.apply(void 0,r))}))};e.exports=n,e.exports.default=n},function(e,t,r){"use strict";var n=r(21);Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e,t){t||(t=e.reduce((function(e,t){return e+t.length}),0));var r,i=new Uint8Array(t),o=0,a=n(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-envelope"]||(n.roots["libp2p-envelope"]={});s.Envelope=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.publicKey=a.newBuffer([]),e.prototype.payloadType=a.newBuffer([]),e.prototype.payload=a.newBuffer([]),e.prototype.signature=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.publicKey&&Object.hasOwnProperty.call(e,"publicKey")&&t.uint32(10).bytes(e.publicKey),null!=e.payloadType&&Object.hasOwnProperty.call(e,"payloadType")&&t.uint32(18).bytes(e.payloadType),null!=e.payload&&Object.hasOwnProperty.call(e,"payload")&&t.uint32(26).bytes(e.payload),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(42).bytes(e.signature),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.Envelope;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.publicKey=e.bytes();break;case 2:n.payloadType=e.bytes();break;case 3:n.payload=e.bytes();break;case 5:n.signature=e.bytes();break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.Envelope)return e;var t=new s.Envelope;return null!=e.publicKey&&("string"===typeof e.publicKey?a.base64.decode(e.publicKey,t.publicKey=a.newBuffer(a.base64.length(e.publicKey)),0):e.publicKey.length&&(t.publicKey=e.publicKey)),null!=e.payloadType&&("string"===typeof e.payloadType?a.base64.decode(e.payloadType,t.payloadType=a.newBuffer(a.base64.length(e.payloadType)),0):e.payloadType.length&&(t.payloadType=e.payloadType)),null!=e.payload&&("string"===typeof e.payload?a.base64.decode(e.payload,t.payload=a.newBuffer(a.base64.length(e.payload)),0):e.payload.length&&(t.payload=e.payload)),null!=e.signature&&("string"===typeof e.signature?a.base64.decode(e.signature,t.signature=a.newBuffer(a.base64.length(e.signature)),0):e.signature.length&&(t.signature=e.signature)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.publicKey="":(r.publicKey=[],t.bytes!==Array&&(r.publicKey=a.newBuffer(r.publicKey))),t.bytes===String?r.payloadType="":(r.payloadType=[],t.bytes!==Array&&(r.payloadType=a.newBuffer(r.payloadType))),t.bytes===String?r.payload="":(r.payload=[],t.bytes!==Array&&(r.payload=a.newBuffer(r.payload))),t.bytes===String?r.signature="":(r.signature=[],t.bytes!==Array&&(r.signature=a.newBuffer(r.signature)))),null!=e.publicKey&&e.hasOwnProperty("publicKey")&&(r.publicKey=t.bytes===String?a.base64.encode(e.publicKey,0,e.publicKey.length):t.bytes===Array?Array.prototype.slice.call(e.publicKey):e.publicKey),null!=e.payloadType&&e.hasOwnProperty("payloadType")&&(r.payloadType=t.bytes===String?a.base64.encode(e.payloadType,0,e.payloadType.length):t.bytes===Array?Array.prototype.slice.call(e.payloadType):e.payloadType),null!=e.payload&&e.hasOwnProperty("payload")&&(r.payload=t.bytes===String?a.base64.encode(e.payload,0,e.payload.length):t.bytes===Array?Array.prototype.slice.call(e.payload):e.payload),null!=e.signature&&e.hasOwnProperty("signature")&&(r.signature=t.bytes===String?a.base64.encode(e.signature,0,e.signature.length):t.bytes===Array?Array.prototype.slice.call(e.signature):e.signature),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";e.exports=function(e,t){return e.length===t.length&&t.sort()&&e.sort().every((function(e,r){return t[r].equals(e)}))}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-peer-record"]||(n.roots["libp2p-peer-record"]={});s.PeerRecord=function(){function e(e){if(this.addresses=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.peerId=a.newBuffer([]),e.prototype.seq=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.addresses=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.peerId&&Object.hasOwnProperty.call(e,"peerId")&&t.uint32(10).bytes(e.peerId),null!=e.seq&&Object.hasOwnProperty.call(e,"seq")&&t.uint32(16).uint64(e.seq),null!=e.addresses&&e.addresses.length)for(var r=0;r<e.addresses.length;++r)s.PeerRecord.AddressInfo.encode(e.addresses[r],t.uint32(26).fork()).ldelim();return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PeerRecord;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.peerId=e.bytes();break;case 2:n.seq=e.uint64();break;case 3:n.addresses&&n.addresses.length||(n.addresses=[]),n.addresses.push(s.PeerRecord.AddressInfo.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.PeerRecord)return e;var t=new s.PeerRecord;if(null!=e.peerId&&("string"===typeof e.peerId?a.base64.decode(e.peerId,t.peerId=a.newBuffer(a.base64.length(e.peerId)),0):e.peerId.length&&(t.peerId=e.peerId)),null!=e.seq&&(a.Long?(t.seq=a.Long.fromValue(e.seq)).unsigned=!0:"string"===typeof e.seq?t.seq=parseInt(e.seq,10):"number"===typeof e.seq?t.seq=e.seq:"object"===typeof e.seq&&(t.seq=new a.LongBits(e.seq.low>>>0,e.seq.high>>>0).toNumber(!0))),e.addresses){if(!Array.isArray(e.addresses))throw TypeError(".PeerRecord.addresses: array expected");t.addresses=[];for(var r=0;r<e.addresses.length;++r){if("object"!==typeof e.addresses[r])throw TypeError(".PeerRecord.addresses: object expected");t.addresses[r]=s.PeerRecord.AddressInfo.fromObject(e.addresses[r])}}return t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.addresses=[]),t.defaults)if(t.bytes===String?r.peerId="":(r.peerId=[],t.bytes!==Array&&(r.peerId=a.newBuffer(r.peerId))),a.Long){var n=new a.Long(0,0,!0);r.seq=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.seq=t.longs===String?"0":0;if(null!=e.peerId&&e.hasOwnProperty("peerId")&&(r.peerId=t.bytes===String?a.base64.encode(e.peerId,0,e.peerId.length):t.bytes===Array?Array.prototype.slice.call(e.peerId):e.peerId),null!=e.seq&&e.hasOwnProperty("seq")&&("number"===typeof e.seq?r.seq=t.longs===String?String(e.seq):e.seq:r.seq=t.longs===String?a.Long.prototype.toString.call(e.seq):t.longs===Number?new a.LongBits(e.seq.low>>>0,e.seq.high>>>0).toNumber(!0):e.seq),e.addresses&&e.addresses.length){r.addresses=[];for(var i=0;i<e.addresses.length;++i)r.addresses[i]=s.PeerRecord.AddressInfo.toObject(e.addresses[i],t)}return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e.AddressInfo=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.multiaddr=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.multiaddr&&Object.hasOwnProperty.call(e,"multiaddr")&&t.uint32(10).bytes(e.multiaddr),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PeerRecord.AddressInfo;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.multiaddr=e.bytes();break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.PeerRecord.AddressInfo)return e;var t=new s.PeerRecord.AddressInfo;return null!=e.multiaddr&&("string"===typeof e.multiaddr?a.base64.decode(e.multiaddr,t.multiaddr=a.newBuffer(a.base64.length(e.multiaddr)),0):e.multiaddr.length&&(t.multiaddr=e.multiaddr)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.multiaddr="":(r.multiaddr=[],t.bytes!==Array&&(r.multiaddr=a.newBuffer(r.multiaddr)))),null!=e.multiaddr&&e.hasOwnProperty("multiaddr")&&(r.multiaddr=t.bytes===String?a.base64.encode(e.multiaddr,0,e.multiaddr.length):t.bytes===Array?Array.prototype.slice.call(e.multiaddr):e.multiaddr),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e}(),e.exports=s},function(e,t,r){"use strict";var n=Uint8Array.from([3,1]);e.exports={ENVELOPE_DOMAIN_PEER_RECORD:"libp2p-peer-record",ENVELOPE_PAYLOAD_TYPE_PEER_RECORD:n}},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(26),a=r(27),s=r(57).EventEmitter,u=r(42).Multiaddr,c=r(43),f=function(e){o(r,e);var t=a(r);function r(e){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=o.listen,s=void 0===a?[]:a,u=o.announce,c=void 0===u?[]:u;return n(this,r),(i=t.call(this)).peerId=e,i.listen=new Set(s.map((function(e){return e.toString()}))),i.announce=new Set(c.map((function(e){return e.toString()}))),i.observed=new Set,i}return i(r,[{key:"getListenAddrs",value:function(){return Array.from(this.listen).map((function(e){return new u(e)}))}},{key:"getAnnounceAddrs",value:function(){return Array.from(this.announce).map((function(e){return new u(e)}))}},{key:"getObservedAddrs",value:function(){return Array.from(this.observed).map((function(e){return new u(e)}))}},{key:"addObservedAddr",value:function(e){var t=new u(e),r=t.getPeerId();r&&(c.createFromB58String(r).equals(this.peerId)&&(t=t.decapsulate(new u("/p2p/".concat(this.peerId)))));var n=t.toString();this.observed.has(n)||(this.observed.add(n),this.emit("change:addresses"))}}]),r}(s);e.exports=f},function(e,t,r){"use strict";var n=r(48),i=r(21),o=r(0),a=r(6),s=r(8),u=r(9),c=r(61),f=r(26),l=r(27),h=r(22),d=Object.assign(h("libp2p:connection-manager"),{error:h("libp2p:connection-manager:err")}),p=r(15),v=r(210),y=r(889),b=r(463),g=r(57).EventEmitter,m=r(43),w=r(50).codes.ERR_INVALID_PARAMETERS,k={maxConnections:1/0,minConnections:0,maxData:1/0,maxSentData:1/0,maxReceivedData:1/0,maxEventLoopDelay:1/0,pollInterval:2e3,autoDialInterval:1e4,movingAverageInterval:6e4,defaultPeerValue:1},S=function(e){f(r,e);var t=l(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s(this,r),(n=t.call(this))._libp2p=e,n._peerId=e.peerId.toB58String(),n._options=v.call({ignoreUndefined:!0},k,i),n._options.maxConnections<n._options.minConnections)throw p(new Error("Connection Manager maxConnections must be greater than minConnections"),w);return d("options: %j",n._options),n._peerValues=new Map,n.connections=new Map,n._started=!1,n._timer=null,n._autoDialTimeout=null,n._checkMetrics=n._checkMetrics.bind(c(n)),n._autoDial=n._autoDial.bind(c(n)),n._latencyMonitor=new y({latencyCheckIntervalMs:n._options.pollInterval,dataEmitIntervalMs:n._options.pollInterval}),n}return u(r,[{key:"size",get:function(){return Array.from(this.connections.values()).reduce((function(e,t){return e+t.length}),0)}},{key:"start",value:function(){this._libp2p.metrics&&(this._timer=this._timer||b(this._checkMetrics,this._options.pollInterval)),this._latencyMonitor.start(),this._onLatencyMeasure=this._onLatencyMeasure.bind(this),this._latencyMonitor.on("data",this._onLatencyMeasure),this._started=!0,d("started"),this._options.autoDial&&this._autoDial()}},{key:"stop",value:function(){var e=a(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._autoDialTimeout&&this._autoDialTimeout.clear(),this._timer&&this._timer.clear(),this._latencyMonitor.removeListener("data",this._onLatencyMeasure),this._latencyMonitor.stop(),this._started=!1,e.next=7,this._close();case 7:d("stopped");case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_close",value:function(){var e=a(o.mark((function e(){var t,r,n,a,s,u,c;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],r=i(this.connections.values());try{for(r.s();!(n=r.n()).done;){a=n.value,s=i(a);try{for(s.s();!(u=s.n()).done;)c=u.value,t.push(c.close())}catch(o){s.e(o)}finally{s.f()}}}catch(o){r.e(o)}finally{r.f()}return e.next=5,Promise.all(t);case 5:this.connections.clear();case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setPeerValue",value:function(e,t){if(t<0||t>1)throw new Error("value should be a number between 0 and 1");this._peerValues.set(e.toB58String(),t)}},{key:"_checkMetrics",value:function(){if(this._libp2p.metrics){var e=this._libp2p.metrics.global.movingAverages,t=e.dataReceived[this._options.movingAverageInterval].movingAverage();this._checkMaxLimit("maxReceivedData",t);var r=e.dataSent[this._options.movingAverageInterval].movingAverage();this._checkMaxLimit("maxSentData",r);var n=t+r;this._checkMaxLimit("maxData",n),d("metrics update",n),this._timer=b(this._checkMetrics,this._options.pollInterval)}}},{key:"onConnect",value:function(e){var t=e.remotePeer,r=t.toB58String(),n=this.connections.get(r);this.emit("peer:connect",e),n?n.push(e):this.connections.set(r,[e]),this._libp2p.peerStore.keyBook.set(t,t.pubKey),this._peerValues.has(r)||this._peerValues.set(r,this._options.defaultPeerValue),this._checkMaxLimit("maxConnections",this.size)}},{key:"onDisconnect",value:function(e){var t=e.remotePeer.toB58String(),r=this.connections.get(t);r&&r.length>1?(r=r.filter((function(t){return t.id!==e.id})),this.connections.set(t,r)):r&&(this.connections.delete(t),this._peerValues.delete(e.remotePeer.toB58String()),this.emit("peer:disconnect",e))}},{key:"get",value:function(e){var t=this.getAll(e);return t.length?t[0]:null}},{key:"getAll",value:function(e){if(!m.isPeerId(e))throw p(new Error("peerId must be an instance of peer-id"),w);var t=e.toB58String(),r=this.connections.get(t);return r?r.filter((function(e){return"open"===e.stat.status})):[]}},{key:"_onLatencyMeasure",value:function(e){this._checkMaxLimit("maxEventLoopDelay",e.avgMs)}},{key:"_checkMaxLimit",value:function(e,t){var r=this._options[e];d("checking limit of %s. current value: %d of %d",e,t,r),t>r&&(d("%s: limit exceeded: %s, %d",this._peerId,e,t),this._maybeDisconnectOne())}},{key:"_autoDial",value:function(){var e=a(o.mark((function e(){var t,r,n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._options.minConnections,!(this.size>=t)){e.next=4;break}return this._autoDialTimeout=b(this._autoDial,this._options.autoDialInterval),e.abrupt("return");case 4:r=Array.from(this._libp2p.peerStore.peers.values()).sort((function(e,t){return!t.protocols||!t.protocols.length||e.protocols&&e.protocols.length?t.id.pubKey&&!e.id.pubKey?1:-1:1})),n=0;case 6:if(!(n<r.length&&this.size<t)){e.next=22;break}if(this.get(r[n].id)){e.next=19;break}return d("connecting to a peerStore stored peer %s",r[n].id.toB58String()),e.prev=9,e.next=12,this._libp2p.dialer.connectToPeer(r[n].id);case 12:if(this._started){e.next=14;break}return e.abrupt("return");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(9),d.error("could not connect to peerStore stored peer",e.t0);case 19:n++,e.next=6;break;case 22:this._autoDialTimeout=b(this._autoDial,this._options.autoDialInterval);case 23:case"end":return e.stop()}}),e,this,[[9,16]])})));return function(){return e.apply(this,arguments)}}()},{key:"_maybeDisconnectOne",value:function(){if(this._options.minConnections<this.connections.size){var e=Array.from(new Map(n(this._peerValues.entries()).sort((function(e,t){return e[1]-t[1]}))));d("%s: sorted peer values: %j",this._peerId,e);var t=e[0];if(t){var r=t[0];d("%s: lowest value peer is %s",this._peerId,r),d("%s: closing a connection to %j",this._peerId,r);var o,a=i(this.connections.values());try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s[0].remotePeer.toB58String()===r){s[0].close();break}}}catch(u){a.e(u)}finally{a.f()}}}}}]),r}(g);e.exports=S},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(61),a=r(26),s=r(27),u=r(57).EventEmitter,c=r(890),f=r(22)("latency-monitor:LatencyMonitor"),l=function(e){a(r,e);var t=s(r);function r(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=i.latencyCheckIntervalMs,s=i.dataEmitIntervalMs,u=i.asyncTestFn,c=i.latencyRandomPercentage;n(this,r),e=t.call(this);var l=o(e);return l.latencyCheckIntervalMs=a||500,l.latencyRandomPercentage=c||10,l._latecyCheckMultiply=l.latencyRandomPercentage/100*2*l.latencyCheckIntervalMs,l._latecyCheckSubtract=l._latecyCheckMultiply/2,l.dataEmitIntervalMs=null===s||0===s?void 0:s||5e3,f("latencyCheckIntervalMs: %s dataEmitIntervalMs: %s",l.latencyCheckIntervalMs,l.dataEmitIntervalMs),l.dataEmitIntervalMs?f("Expecting ~%s events per summary",l.latencyCheckIntervalMs/l.dataEmitIntervalMs):f("Not emitting summaries"),l.asyncTestFn=u,e}return i(r,[{key:"start",value:function(){var e=this;globalThis.process&&globalThis.process.hrtime?(f("Using process.hrtime for timing"),this.now=globalThis.process.hrtime,this.getDeltaMS=function(t){var r=e.now(t);return 1e3*r[0]+r[1]/1e6}):"undefined"!==typeof window&&window.performance&&window.performance.now?(f("Using performance.now for timing"),this.now=window.performance.now.bind(window.performance),this.getDeltaMS=function(t){return Math.round(e.now()-t)}):(f("Using Date.now for timing"),this.now=Date.now,this.getDeltaMS=function(t){return e.now()-t}),this._latencyData=this._initLatencyData(),"undefined"!==typeof window&&(this._visibilityChangeEmitter=new c,this._visibilityChangeEmitter.on("visibilityChange",(function(t){t?e._startTimers():(e._emitSummary(),e._stopTimers())}))),this._visibilityChangeEmitter&&!this._visibilityChangeEmitter.isVisible()||this._startTimers()}},{key:"stop",value:function(){this._stopTimers()}},{key:"_startTimers",value:function(){var e=this;this._checkLatencyID||(this._checkLatency(),this.dataEmitIntervalMs&&(this._emitIntervalID=setInterval((function(){return e._emitSummary()}),this.dataEmitIntervalMs),"function"===typeof this._emitIntervalID.unref&&this._emitIntervalID.unref()))}},{key:"_stopTimers",value:function(){this._checkLatencyID&&(clearTimeout(this._checkLatencyID),this._checkLatencyID=void 0),this._emitIntervalID&&(clearInterval(this._emitIntervalID),this._emitIntervalID=void 0)}},{key:"_emitSummary",value:function(){var e=this.getSummary();e.events>0&&this.emit("data",e)}},{key:"getSummary",value:function(){var e={events:this._latencyData.events,minMs:this._latencyData.minMs,maxMs:this._latencyData.maxMs,avgMs:this._latencyData.events?this._latencyData.totalMs/this._latencyData.events:Number.POSITIVE_INFINITY,lengthMs:this.getDeltaMS(this._latencyData.startTime)};return this._latencyData=this._initLatencyData(),f("Summary: %O",e),e}},{key:"_checkLatency",value:function(){var e=this,t=this,r=Math.random()*t._latecyCheckMultiply-t._latecyCheckSubtract,n={deltaOffset:Math.ceil(t.latencyCheckIntervalMs+r),startTime:t.now()},i=function(){if(e._checkLatencyID){var r=t.getDeltaMS(n.startTime)-n.deltaOffset;t._checkLatency(),t._latencyData.events++,t._latencyData.minMs=Math.min(t._latencyData.minMs,r),t._latencyData.maxMs=Math.max(t._latencyData.maxMs,r),t._latencyData.totalMs+=r,f("MS: %s Data: %O",r,t._latencyData)}};f("localData: %O",n),this._checkLatencyID=setTimeout((function(){t.asyncTestFn?(n.deltaOffset=0,n.startTime=t.now(),t.asyncTestFn(i)):(n.deltaOffset-=1,i())}),n.deltaOffset),"function"===typeof this._checkLatencyID.unref&&this._checkLatencyID.unref()}},{key:"_initLatencyData",value:function(){return{startTime:this.now(),minMs:Number.POSITIVE_INFINITY,maxMs:Number.NEGATIVE_INFINITY,events:0,totalMs:0}}}]),r}(u);e.exports=l},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(342),a=r(26),s=r(27),u=r(57).EventEmitter,c=r(22)("latency-monitor:VisibilityChangeEmitter"),f=function(e){a(r,e);var t=s(r);function r(){var e;return n(this,r),e=t.call(this),"undefined"===typeof document?(c('This is not a browser, no "document" found. Stopping.'),o(e)):(e._initializeVisibilityVarNames(),e._addVisibilityChangeListener(),e)}return i(r,[{key:"_initializeVisibilityVarNames",value:function(){var e,t;"undefined"!==typeof document.hidden?(e="hidden",t="visibilitychange"):"undefined"!==typeof document.mozHidden?(e="mozHidden",t="mozvisibilitychange"):"undefined"!==typeof document.msHidden?(e="msHidden",t="msvisibilitychange"):"undefined"!==typeof document.webkitHidden&&(e="webkitHidden",t="webkitvisibilitychange"),this._hidden=e,this._visibilityChange=t}},{key:"_addVisibilityChangeListener",value:function(){"undefined"===typeof document.addEventListener||"undefined"===typeof document[this._hidden]?c("Checking page visibility requires a browser that supports the Page Visibility API."):document.addEventListener(this._visibilityChange,this._handleVisibilityChange.bind(this),!1)}},{key:"isVisible",value:function(){if(void 0!==this._hidden&&void 0!==document[this._hidden])return!document[this._hidden]}},{key:"_handleVisibilityChange",value:function(){var e=!document[this._hidden];c(e?"Page Visible":"Page Hidden"),this.emit("visibilityChange",e)}}]),r}(u);e.exports=f},function(e,t,r){"use strict";e.exports=function(){return Date.now()}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(22),u=Object.assign(s("libp2p:circuit"),{error:s("libp2p:circuit:err")}),c=r(15),f=r(294),l=r(42).Multiaddr,h=r(43),d=r(176).CircuitRelay,p=r(50).codes,v=r(893),y=r(213).relay,b=r(895),g=r(464),m=g.handleCanHop,w=g.handleHop,k=g.hop,S=r(466).handleStop,E=r(295),_=Symbol.for("@libp2p/js-libp2p-circuit/circuit"),A=function(){function e(t){var r=t.libp2p,n=t.upgrader;o(this,e),this._dialer=r.dialer,this._registrar=r.registrar,this._connectionManager=r.connectionManager,this._upgrader=n,this._options=r._config.relay,this._libp2p=r,this.peerId=r.peerId,this._registrar.handle(y,this._onProtocol.bind(this))}return a(e,[{key:"_onProtocol",value:function(){var e=i(n.mark((function e(t){var r,i,o,a,s,c,f,h,p,y,b;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.connection,i=t.stream,o=new E({stream:i}),e.next=4,o.read();case 4:if(a=e.sent){e.next=7;break}return e.abrupt("return");case 7:s=this,e.t0=a.type,e.next=e.t0===d.Type.CAN_HOP?11:e.t0===d.Type.HOP?15:e.t0===d.Type.STOP?20:25;break;case 11:return u("received CAN_HOP request from %s",r.remotePeer.toB58String()),e.next=14,m({circuit:s,connection:r,streamHandler:o});case 14:return e.abrupt("break",26);case 15:return u("received HOP request from %s",r.remotePeer.toB58String()),e.next=18,w({connection:r,request:a,streamHandler:o,circuit:s});case 18:return c=e.sent,e.abrupt("break",26);case 20:return u("received STOP request from %s",r.remotePeer.toB58String()),e.next=23,S({connection:r,request:a,streamHandler:o});case 23:return c=e.sent,e.abrupt("break",26);case 25:u("Request of type %s not supported",a.type);case 26:if(!c){e.next=37;break}return f=new l(a.dstPeer.addrs[0]),h=new l(a.srcPeer.addrs[0]),p=v({stream:c,remoteAddr:f,localAddr:h}),y=a.type===d.Type.HOP?"relay":"inbound",u("new %s connection %s",y,p.remoteAddr),e.next=34,this._upgrader.upgradeInbound(p);case 34:b=e.sent,u("%s connection %s upgraded",y,p.remoteAddr),this.handler&&this.handler(b);case 37:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"dial",value:function(){var e=i(n.mark((function e(t,r){var i,o,a,s,f,y,b,g,m,w,S,E,_;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.toString().split("/p2p-circuit"),o=new l(i[0]),a=new l(i[i.length-1]),s=o.getPeerId(),f=a.getPeerId(),s&&f){e.next=9;break}throw y="Circuit relay dial failed as addresses did not have peer id",u.error(y),c(new Error(y),p.ERR_RELAYED_DIAL);case 9:if(b=h.createFromB58String(s),g=h.createFromB58String(f),m=!1,w=this._connectionManager.get(b)){e.next=18;break}return e.next=16,this._dialer.connectToPeer(o,r);case 16:w=e.sent,m=!0;case 18:return e.prev=18,e.next=21,k({connection:w,request:{type:d.Type.HOP,srcPeer:{id:this.peerId.toBytes(),addrs:this._libp2p.multiaddrs.map((function(e){return e.bytes}))},dstPeer:{id:g.toBytes(),addrs:[new l(a).bytes]}}});case 21:return S=e.sent,E=o.encapsulate("/p2p-circuit/p2p/".concat(this.peerId.toB58String())),_=v({stream:S,remoteAddr:t,localAddr:E}),u("new outbound connection %s",_.remoteAddr),e.abrupt("return",this._upgrader.upgradeOutbound(_));case 28:if(e.prev=28,e.t0=e.catch(18),u.error("Circuit relay dial failed",e.t0),e.t1=m,!e.t1){e.next=35;break}return e.next=35,w.close();case 35:throw e.t0;case 36:case"end":return e.stop()}}),e,this,[[18,28]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"createListener",value:function(e,t){return"function"===typeof e&&(t=e,e={}),this.handler=t,b(this._libp2p)}},{key:"filter",value:function(e){return(e=Array.isArray(e)?e:[e]).filter((function(e){return f.Circuit.matches(e)}))}},{key:Symbol.toStringTag,get:function(){return"Circuit"}}],[{key:"isTransport",value:function(e){return Boolean(e&&e[_])}}]),e}();e.exports=A},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(118).source,a=r(22)("libp2p:stream:converter");e.exports=function(e){var t=e.stream,r=e.remoteAddr,s=e.localAddr,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=t.sink,f=t.source,l={sink:function(e){return i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u.signal&&(e=o(e,u.signal)),t.prev=1,t.next=4,c(e);case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),"aborted"!==t.t0.type&&a(t.t0);case 9:h();case 10:case"end":return t.stop()}}),t,null,[[1,6]])})))()},source:u.signal?o(f,u.signal):f,conn:t,localAddr:s,remoteAddr:r,timeline:{open:Date.now(),close:void 0},close:function(){return c(new Uint8Array(0)),h()}};function h(){return l.timeline.close||(l.timeline.close=Date.now()),Promise.resolve()}return l}},function(e,t,r){var n=r(8),i=r(26),o=r(27),a=r(93);e.exports=function(e){"use strict";i(r,e);var t=o(r);function r(e,i){var o;return n(this,r),(o=t.call(this,e||"The operation was aborted")).type="aborted",o.code=i||"ABORT_ERR",o}return r}(a(Error))},function(e,t,r){"use strict";var n=r(0),i=r(21),o=r(6),a=r(57).EventEmitter,s=r(42).Multiaddr;e.exports=function(e){var t=new Map;function r(){return(r=o(n.mark((function r(i){var o,a,c;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=String(i).split("/p2p-circuit").find((function(e){return""!==e})),r.next=3,e.dial(new s(o));case 3:a=r.sent,c=a.remoteAddr.encapsulate("/p2p-circuit"),t.set(a.remotePeer.toB58String(),c),u.emit("listening");case 7:case"end":return r.stop()}}),r)})))).apply(this,arguments)}var u=Object.assign(new a,{close:function(){return Promise.resolve()},listen:function(e){return r.apply(this,arguments)},getAddrs:function(){var e,r=[],n=i(t.values());try{for(n.s();!(e=n.n()).done;){var o=e.value;r.push(o)}}catch(a){n.e(a)}finally{n.f()}return r}});return e.connectionManager.on("peer:disconnect",(function(e){t.delete(e.remotePeer.toB58String())&&u.emit("close")})),u}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(29),a=r(8),s=r(9),u=r(22),c=Object.assign(u("libp2p:relay"),{error:u("libp2p:relay:err")}),f=r(454),l=f.setDelayedInterval,h=f.clearDelayedInterval,d=r(897),p=r(467).namespaceToCid,v=r(291).RELAY_RENDEZVOUS_NS,y=function(){function e(t){a(this,e),this._libp2p=t,this._options=o({},t._config.relay),this._autoRelay=this._options.autoRelay.enabled&&new d(o({libp2p:t},this._options.autoRelay)),this._advertiseService=this._advertiseService.bind(this)}return s(e,[{key:"start",value:function(){this._options.hop.enabled&&this._options.advertise.enabled&&(this._timeout=l(this._advertiseService,this._options.advertise.ttl,this._options.advertise.bootDelay))}},{key:"stop",value:function(){h(this._timeout)}},{key:"_advertiseService",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p(v);case 3:return t=e.sent,e.next=6,this._libp2p.contentRouting.provide(t);case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),"NO_ROUTERS_AVAILABLE"===e.t0.code?(c.error("a content router, such as a DHT, must be provided in order to advertise the relay service",e.t0),this.stop()):c.error(e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));return function(){return e.apply(this,arguments)}}()}]),e}();e.exports=y},function(e,t,r){"use strict";var n=r(40),i=r(21),o=r(0),a=r(6),s=r(8),u=r(9),c=r(30),f=r(22),l=Object.assign(f("libp2p:auto-relay"),{error:f("libp2p:auto-relay:err")}),h=r(175).fromString,d=r(296).toString,p=r(42).Multiaddr,v=r(43),y=r(213).relay,b=r(464).canHop,g=r(467).namespaceToCid,m=r(291),w=m.CIRCUIT_PROTO_CODE,k=m.HOP_METADATA_KEY,S=m.HOP_METADATA_VALUE,E=m.RELAY_RENDEZVOUS_NS,_=function(){function e(t){var r=t.libp2p,n=t.maxListeners,i=void 0===n?1:n,o=t.onError;s(this,e),this._libp2p=r,this._peerId=r.peerId,this._peerStore=r.peerStore,this._connectionManager=r.connectionManager,this._transportManager=r.transportManager,this._addressSorter=r.dialer.addressSorter,this.maxListeners=i,this._listenRelays=new Set,this._onProtocolChange=this._onProtocolChange.bind(this),this._onPeerDisconnected=this._onPeerDisconnected.bind(this),this._peerStore.on("change:protocols",this._onProtocolChange),this._connectionManager.on("peer:disconnect",this._onPeerDisconnected),this._onError=function(e,t){l.error(t||e),o&&o(e,t)}}return u(e,[{key:"_onProtocolChange",value:function(){var e=a(o.mark((function e(t){var r,n,i,a,s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.peerId,n=t.protocols,i=r.toB58String(),(a=n.find((function(e){return e===y})))||!this._listenRelays.has(i)){e.next=8;break}return this._removeListenRelay(i),e.abrupt("return");case 8:if(a&&!this._listenRelays.has(i)){e.next=10;break}return e.abrupt("return");case 10:if(e.prev=10,s=this._connectionManager.get(r)){e.next=14;break}return e.abrupt("return");case 14:if(!s.remoteAddr.protoCodes().includes(w)){e.next=17;break}return l("relayed connection to ".concat(i," will not be used to hop on")),e.abrupt("return");case 17:return e.next=19,b({connection:s});case 19:if(!e.sent){e.next=24;break}return this._peerStore.metadataBook.set(r,k,h(S)),e.next=24,this._addListenRelay(s,i);case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(10),this._onError(e.t0);case 29:case"end":return e.stop()}}),e,this,[[10,26]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_onPeerDisconnected",value:function(e){var t=e.remotePeer.toB58String();this._listenRelays.has(t)&&this._removeListenRelay(t)}},{key:"_addListenRelay",value:function(){var e=a(o.mark((function e(t,r){var n,i;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._listenRelays.size>=this.maxListeners)){e.next=2;break}return e.abrupt("return");case 2:if((n=this._peerStore.addressBook.getMultiaddrsForPeer(t.remotePeer,this._addressSorter))&&n.length){e.next=5;break}return e.abrupt("return");case 5:return i="".concat(n[0].toString(),"/p2p-circuit"),this._listenRelays.add(r),e.prev=7,e.next=10,this._transportManager.listen([new p(i)]);case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(7),this._onError(e.t0),this._listenRelays.delete(r);case 16:case"end":return e.stop()}}),e,this,[[7,12]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_removeListenRelay",value:function(e){this._listenRelays.delete(e)&&this._listenOnAvailableHopRelays([e])}},{key:"_listenOnAvailableHopRelays",value:function(){var e=a(o.mark((function e(){var t,r,a,s,u,f,l,h,p,y,b,m,w,_,A,x,T,M,C,O,I,P,R=arguments;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=R.length>0&&void 0!==R[0]?R[0]:[],!(this._listenRelays.size>=this.maxListeners)){e.next=3;break}return e.abrupt("return");case 3:r=[],a=i(this._peerStore.metadataBook.data.entries()),e.prev=5,a.s();case 7:if((s=a.n()).done){e.next=25;break}if(u=n(s.value,2),f=u[0],l=u[1],!this._listenRelays.has(f)&&!t.includes(f)){e.next=11;break}return e.abrupt("continue",23);case 11:if((h=l.get(k))&&d(h)===S){e.next=14;break}return e.abrupt("continue",23);case 14:if(p=v.createFromB58String(f),y=this._connectionManager.get(p)){e.next=19;break}return r.push(p),e.abrupt("continue",23);case 19:return e.next=21,this._addListenRelay(y,f);case 21:if(!(this._listenRelays.size>=this.maxListeners)){e.next=23;break}return e.abrupt("return");case 23:e.next=7;break;case 25:e.next=30;break;case 27:e.prev=27,e.t0=e.catch(5),a.e(e.t0);case 30:return e.prev=30,a.f(),e.finish(30);case 33:b=0,m=r;case 34:if(!(b<m.length)){e.next=43;break}return w=m[b],e.next=38,this._tryToListenOnRelay(w);case 38:if(!(this._listenRelays.size>=this.maxListeners)){e.next=40;break}return e.abrupt("return");case 40:b++,e.next=34;break;case 43:return e.prev=43,e.next=46,g(E);case 46:_=e.sent,A=!0,x=!1,e.prev=49,M=c(this._libp2p.contentRouting.findProviders(_));case 51:return e.next=53,M.next();case 53:return C=e.sent,A=C.done,e.next=57,C.value;case 57:if(O=e.sent,A){e.next=71;break}if((I=O).multiaddrs.length){e.next=62;break}return e.abrupt("continue",68);case 62:return P=I.id,this._peerStore.addressBook.add(P,I.multiaddrs),e.next=66,this._tryToListenOnRelay(P);case 66:if(!(this._listenRelays.size>=this.maxListeners)){e.next=68;break}return e.abrupt("return");case 68:A=!0,e.next=51;break;case 71:e.next=77;break;case 73:e.prev=73,e.t1=e.catch(49),x=!0,T=e.t1;case 77:if(e.prev=77,e.prev=78,A||null==M.return){e.next=82;break}return e.next=82,M.return();case 82:if(e.prev=82,!x){e.next=85;break}throw T;case 85:return e.finish(82);case 86:return e.finish(77);case 87:e.next=92;break;case 89:e.prev=89,e.t2=e.catch(43),this._onError(e.t2);case 92:case"end":return e.stop()}}),e,this,[[5,27,30,33],[43,89],[49,73,77,87],[78,,82,86]])})));return function(){return e.apply(this,arguments)}}()},{key:"_tryToListenOnRelay",value:function(){var e=a(o.mark((function e(t){var r;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._libp2p.dial(t);case 3:return r=e.sent,e.next=6,this._addListenRelay(r,t.toB58String());case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),this._onError(e.t0,"could not connect and listen on known hop relay ".concat(t.toB58String()));case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));return function(t){return e.apply(this,arguments)}}()}]),e}();e.exports=_},function(e,t,r){"use strict";var n=r(29),i=r(0),o=r(6),a=r(21),s=r(40),u=r(48),c=r(8),f=r(9),l=r(22),h=Object.assign(l("libp2p:dialer"),{error:l("libp2p:dialer:err")}),d=r(15),p=r(42).Multiaddr,v=r(899),y=r(118).AbortError,b=r(468).anySignal,g=r(903),m=r(458).publicAddressesFirst,w=r(455),k=r(50).codes,S=r(290),E=S.DIAL_TIMEOUT,_=S.MAX_PARALLEL_DIALS,A=S.MAX_PER_PEER_DIALS,x=S.MAX_ADDRS_TO_DIAL,T=function(){function e(t){var r=t.transportManager,n=t.peerStore,i=t.addressSorter,o=void 0===i?m:i,a=t.maxParallelDials,f=void 0===a?_:a,l=t.maxAddrsToDial,h=void 0===l?x:l,d=t.dialTimeout,v=void 0===d?E:d,y=t.maxDialsPerPeer,b=void 0===y?A:y,g=t.resolvers,w=void 0===g?{}:g;c(this,e),this.transportManager=r,this.peerStore=n,this.addressSorter=o,this.maxParallelDials=f,this.maxAddrsToDial=h,this.timeout=v,this.maxDialsPerPeer=b,this.tokens=u(new Array(f)).map((function(e,t){return t})),this._pendingDials=new Map,this._pendingDialTargets=new Map;for(var k=0,S=Object.entries(w);k<S.length;k++){var T=s(S[k],2),M=T[0],C=T[1];p.resolvers.set(M,C)}}return f(e,[{key:"destroy",value:function(){var e,t=a(this._pendingDials.values());try{for(t.s();!(e=t.n()).done;){var r=e.value;try{r.controller.abort()}catch(o){h.error(o)}}}catch(o){t.e(o)}finally{t.f()}this._pendingDials.clear();var n,i=a(this._pendingDialTargets.values());try{for(i.s();!(n=i.n()).done;){n.value.reject(new y("Dialer was destroyed"))}}catch(o){i.e(o)}finally{i.f()}this._pendingDialTargets.clear()}},{key:"connectToPeer",value:function(){var e=o(i.mark((function e(t){var r,n,o,a,s=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>1&&void 0!==s[1]?s[1]:{},e.next=3,this._createCancellableDialTarget(t);case 3:if((n=e.sent).addrs.length){e.next=6;break}throw d(new Error("The dial request has no valid addresses"),k.ERR_NO_VALID_ADDRESSES);case 6:return o=this._pendingDials.get(n.id)||this._createPendingDial(n,r),e.prev=7,e.next=10,o.promise;case 10:return a=e.sent,h("dial succeeded to %s",n.id),e.abrupt("return",a);case 15:throw e.prev=15,e.t0=e.catch(7),o.controller.signal.aborted&&(e.t0.code=k.ERR_TIMEOUT),h.error(e.t0),e.t0;case 20:return e.prev=20,o.destroy(),e.finish(20);case 23:case"end":return e.stop()}}),e,this,[[7,15,20,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_createCancellableDialTarget",value:function(){var e=o(i.mark((function e(t){var r,n,o,a=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(parseInt(String(1e9*Math.random()),10).toString()+Date.now()),n=new Promise((function(e,t){a._pendingDialTargets.set(r,{resolve:e,reject:t})})),e.next=4,Promise.race([this._createDialTarget(t),n]);case 4:return o=e.sent,this._pendingDialTargets.delete(r),e.abrupt("return",o);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_createDialTarget",value:function(){var e=o(i.mark((function e(t){var r,n,o,s,u,c,f,l,h,v=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=w(t),n=r.id,(o=r.multiaddrs)&&this.peerStore.addressBook.add(n,o),s=this.peerStore.addressBook.getMultiaddrsForPeer(n,this.addressSorter)||[],p.isMultiaddr(t)&&(s=s.filter((function(e){return!t.equals(e)}))).unshift(t),u=[],c=a(s),e.prev=6,c.s();case 8:if((f=c.n()).done){e.next=16;break}return l=f.value,e.next=12,this._resolve(l);case 12:e.sent.forEach((function(e){return u.push(e)}));case 14:e.next=8;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(6),c.e(e.t0);case 21:return e.prev=21,c.f(),e.finish(21);case 24:if(!((h=u.filter((function(e){return v.transportManager.transportForMultiaddr(e)}))).length>this.maxAddrsToDial)){e.next=28;break}throw this.peerStore.delete(n),d(new Error("dial with more addresses than allowed"),k.ERR_TOO_MANY_ADDRESSES);case 28:return e.abrupt("return",{id:n.toB58String(),addrs:h});case 29:case"end":return e.stop()}}),e,this,[[6,18,21,24]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_createPendingDial",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=function(e,r){if(r.signal.aborted)throw d(new Error("already aborted"),k.ERR_ALREADY_ABORTED);return t.transportManager.dial(e,r)},o=new g({addrs:e.addrs,dialAction:i,dialer:this}),a=new v(this.timeout),s=[a.signal];r.signal&&s.push(r.signal);var u=b(s),c={dialRequest:o,controller:a,promise:o.run(n(n({},r),{},{signal:u})),destroy:function(){a.clear(),t._pendingDials.delete(e.id)}};return this._pendingDials.set(e.id,c),c}},{key:"getTokens",value:function(e){var t=Math.min(e,this.maxDialsPerPeer,this.tokens.length),r=this.tokens.splice(0,t);return h("%d tokens request, returning %d, %d remaining",e,t,this.tokens.length),r}},{key:"releaseToken",value:function(e){this.tokens.indexOf(e)>-1||(h("token %d released",e),this.tokens.push(e))}},{key:"_resolve",value:function(){var e=o(i.mark((function e(t){var r,n,o,a=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.protoNames().includes("dnsaddr")){e.next=3;break}return e.abrupt("return",[t]);case 3:return e.next=5,this._resolveRecord(t);case 5:return r=e.sent,e.next=8,Promise.all(r.map((function(e){return a._resolve(e)})));case 8:return n=e.sent,o=n.flat(),e.abrupt("return",o.reduce((function(e,t){return e.find((function(e){return e.equals(t)}))||e.push(t),e}),[]));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_resolveRecord",value:function(){var e=o(i.mark((function e(t){var r;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=new p(t.toString()),e.next=4,t.resolve();case 4:return r=e.sent,e.abrupt("return",r);case 8:return e.prev=8,e.t0=e.catch(0),h.error("multiaddr ".concat(t," could not be resolved")),e.abrupt("return",[]);case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}()}]),e}();e.exports=T},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(61),a=r(136),s=r(84),u=r(26),c=r(27),f=("undefined"!==typeof self?self:"undefined"!==typeof window?window:r(177)).AbortController,l=r(900),h=function(e){u(r,e);var t=c(r);function r(e){var i;return n(this,r),(i=t.call(this))._ms=e,i._timer=l((function(){return i.abort()}),e),Object.setPrototypeOf(o(i),r.prototype),i}return i(r,[{key:"abort",value:function(){return this._timer.clear(),a(s(r.prototype),"abort",this).call(this)}},{key:"clear",value:function(){this._timer.clear()}},{key:"reset",value:function(){var e=this;this._timer.clear(),this._timer=l((function(){return e.abort()}),this._ms)}}]),r}(f);e.exports=h,e.exports.TimeoutController=h},function(e,t,r){"use strict";var n=r(901);function i(e,t,r){var i=this;this._started=n(),this._rescheduled=0,this._scheduled=t,this._args=r,this._timer=setTimeout((function t(){i._rescheduled>0?(i._scheduled=i._rescheduled-(n()-i._started),i._timer=setTimeout(t,i._scheduled),i._rescheduled=0):e.apply(null,i._args)}),t)}i.prototype.reschedule=function(e){var t=n();return!(t+e-(this._started+this._scheduled)<0)&&(this._started=t,this._rescheduled=e,!0)},i.prototype.clear=function(){clearTimeout(this._timer)},e.exports=function(){if("function"!==typeof arguments[0])throw new Error("callback needed");if("number"!==typeof arguments[1])throw new Error("timeout needed");var e;if(arguments.length>0){e=new Array(arguments.length-2);for(var t=0;t<e.length;t++)e[t]=arguments[t+2]}return new i(arguments[0],arguments[1],e)}},function(e,t,r){"use strict";e.exports=function(){return Date.now()}},function(e,t,r){"use strict";var n;n=globalThis.AbortController&&globalThis.AbortSignal?globalThis:r(177),e.exports={AbortController:n.AbortController,AbortSignal:n.AbortSignal}},function(e,t,r){"use strict";var n=r(0),i=r(29),o=r(6),a=r(8),s=r(9),u=r(15),c=r(177).default,f=r(468).anySignal,l=r(904),h=r(905),d=function(){function e(t){var r=t.addrs,n=t.dialAction,i=t.dialer;a(this,e),this.addrs=r,this.dialer=i,this.dialAction=n}return s(e,[{key:"run",value:function(){var e=o(n.mark((function e(){var t,r,a,s,d,p=this,v=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=v.length>0&&void 0!==v[0]?v[0]:{},!((r=this.dialer.getTokens(this.addrs.length)).length<1)){e.next=4;break}throw u(new Error("No dial tokens available"),"ERR_NO_DIAL_TOKENS");case 4:return a=new l,r.forEach((function(e){return a.push(e)})),s=this.addrs.map((function(){return new c})),d=0,e.prev=8,e.next=11,h(this.addrs.map(function(){var e=o(n.mark((function e(o,u){var c,l,h;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.shift();case 2:return c=e.sent,e.prev=3,h=s[u].signal,e.next=7,p.dialAction(o,i(i({},t),{},{signal:t.signal?f([h,t.signal]):h}));case 7:l=e.sent,s.splice(u,1);case 9:return e.prev=9,d++,p.addrs.length-d>=r.length?a.push(c):p.dialer.releaseToken(r.splice(r.indexOf(c),1)[0]),e.finish(9);case 13:return e.abrupt("return",l);case 14:case"end":return e.stop()}}),e,null,[[3,,9,13]])})));return function(t,r){return e.apply(this,arguments)}}()));case 11:return e.abrupt("return",e.sent);case 12:return e.prev=12,s.map((function(e){return e.abort()})),r.forEach((function(e){return p.dialer.releaseToken(e)})),e.finish(12);case 16:case"end":return e.stop()}}),e,this,[[8,,12,16]])})));return function(){return e.apply(this,arguments)}}()}]),e}();e.exports=d},function(e,t,r){var n=r(8),i=r(9),o=r(439),a=r(280);e.exports=function(){"use strict";function e(){n(this,e),this._buffer=new o,this._waitingConsumers=new o}return i(e,[{key:"push",value:function(e){var t=a(),r=t.promise,n=t.resolve;return this._buffer.push({chunk:e,resolve:n}),this._consume(),r}},{key:"_consume",value:function(){for(;!this._waitingConsumers.isEmpty()&&!this._buffer.isEmpty();){var e=this._waitingConsumers.shift(),t=this._buffer.shift();e.resolve(t.chunk),t.resolve()}}},{key:"shift",value:function(){var e=a(),t=e.promise,r=e.resolve;return this._waitingConsumers.push({resolve:r}),this._consume(),t}},{key:"isEmpty",value:function(){return this._buffer.isEmpty()}}]),e}()},function(e,t,r){"use strict";var n=r(0),i=r(40),o=r(6),a=r(29),s=r(906),u=r(469);e.exports=function(e,t){var r=s(e,a(a({},t),{},{count:1}));return u.fn(function(){var e=o(n.mark((function e(t){var o,a,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t((function(){r.cancel()})),e.next=3,r;case 3:return o=e.sent,a=i(o,1),s=a[0],e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())()},e.exports.AggregateError=s.AggregateError},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(21),a=r(8),s=r(26),u=r(27),c=r(93),f=r(907),l=r(469),h=function(e){s(r,e);var t=u(r);function r(){return a(this,r),t.apply(this,arguments)}return r}(c(Error));e.exports=function(e,t){return new l((function(r,a,s){var u=t.count,c=t.filter,l=void 0===c?function(){return!0}:c;if(Number.isFinite(u)){var d=[],p=[],v=0,y=!1,b=new Set,g=function(){var t,r=o(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;b.has(n)||"function"!==typeof n.cancel||n.cancel()}}catch(i){r.e(i)}finally{r.f()}};s(g);var m,w=o(e);try{var k=function(){var e=m.value;v++,i(n.mark((function t(){var i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:if(i=t.sent,!y){t.next=6;break}return t.abrupt("return");case 6:if(l(i)){t.next=8;break}throw new h("Value does not satisfy filter");case 8:d.push(i),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),p.push(t.t0);case 14:return t.prev=14,b.add(e),!y&&(d.length===u&&(r(d),y=!0),v-p.length<u&&(a(new f(p)),y=!0),y)&&g(),t.finish(14);case 18:case"end":return t.stop()}}),t,null,[[0,11,14,18]])})))()};for(w.s();!(m=w.n()).done;)k()}catch(S){w.e(S)}finally{w.f()}u>v&&(a(new RangeError("Expected input to contain at least ".concat(t.count," items, but contains ").concat(v," items"))),g())}else a(new TypeError("Expected a finite number, got ".concat(typeof t.count)))}))},e.exports.AggregateError=f,e.exports.FilterError=h},function(e,t,r){"use strict";var n=r(0),i=r(21),o=r(48),a=r(8),s=r(9),u=r(61),c=r(26),f=r(27),l=r(93),h=r(908),d=r(909),p=function(e){c(r,e);var t=f(r);function r(e){var n;if(a(this,r),!Array.isArray(e))throw new TypeError("Expected input to be an Array, got ".concat(typeof e));var i=(e=o(e).map((function(e){return e instanceof Error?e:null!==e&&"object"===typeof e?Object.assign(new Error(e.message),e):new Error(e)}))).map((function(e){return"string"===typeof e.stack?d(e.stack).replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""):String(e)})).join("\n");return i="\n"+h(i,4),(n=t.call(this,i)).name="AggregateError",Object.defineProperty(u(n),"_errors",{value:e}),n}return s(r,[{key:Symbol.iterator,value:n.mark((function e(){var t,r,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i(this._errors),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return o=r.value,e.next=7,o;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))}]),r}(l(Error));e.exports=p},function(e,t,r){"use strict";var n=r(29);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;if(r=n({indent:" ",includeEmptyLines:!1},r),"string"!==typeof e)throw new TypeError("Expected `input` to be a `string`, got `".concat(typeof e,"`"));if("number"!==typeof t)throw new TypeError("Expected `count` to be a `number`, got `".concat(typeof t,"`"));if("string"!==typeof r.indent)throw new TypeError("Expected `options.indent` to be a `string`, got `".concat(typeof r.indent,"`"));if(0===t)return e;var i=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(i,r.indent.repeat(t))}},function(e,t,r){"use strict";var n=r(910),i=/\s+at.*(?:\(|\s)(.*)\)?/,o=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,a="undefined"===typeof n.homedir?"":n.homedir();e.exports=function(e,t){return t=Object.assign({pretty:!1},t),e.replace(/\\/g,"/").split("\n").filter((function(e){var t=e.match(i);if(null===t||!t[1])return!0;var r=t[1];return!r.includes(".app/Contents/Resources/electron.asar")&&!r.includes(".app/Contents/Resources/default_app.asar")&&!o.test(r)})).filter((function(e){return""!==e.trim()})).map((function(e){return t.pretty?e.replace(i,(function(e,t){return e.replace(t,t.replace(a,"~"))})):e})).join("\n")}},,function(e,t,r){"use strict";var n=r(21),i=r(0),o=r(8),a=r(9),s=r(6),u=r(30),c=r(22),f=Object.assign(c("libp2p:keychain"),{error:c("libp2p:keychain:err")}),l=r(912),h=r(210),d=r(267),p=r(470).Key,v=r(920),y=r(15),b=r(296).toString,g=r(175).fromString;r(137);var m="/info/",w=new WeakMap,k=14,S=16,E=1e3,_={dek:{keyLength:64,iterationCount:1e4,salt:"you should override this value with a crypto secure random number",hash:"sha2-512"}};function A(e){return!!e&&("string"===typeof e&&e===l(e.trim()))}function x(e){return T.apply(this,arguments)}function T(){return(T=s(i.mark((function e(t){var r;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 200,1e3,r=800*Math.random()+200,e.next=5,new Promise((function(e){return setTimeout(e,r)}));case 5:throw t;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){return new p("/pkcs8/"+e)}function C(e){return new p(m+e)}var O=function(){function e(t,r){if(o(this,e),!t)throw new Error("store is required");if(this.store=t,this.opts=h(_,r),this.opts.pass&&this.opts.pass.length<20)throw new Error("pass must be least 20 characters");if(this.opts.dek.keyLength<k)throw new Error("dek.keyLength must be least ".concat(k," bytes"));if(this.opts.dek.salt.length<S)throw new Error("dek.saltLength must be least ".concat(S," bytes"));if(this.opts.dek.iterationCount<E)throw new Error("dek.iterationCount must be least ".concat(E));var n=this.opts.pass?d.pbkdf2(this.opts.pass,this.opts.dek.salt,this.opts.dek.iterationCount,this.opts.dek.keyLength,this.opts.dek.hash):"";w.set(this,{dek:n})}return a(e,[{key:"cms",get:function(){return new v(this,w.get(this).dek)}},{key:"createKey",value:function(){var e=s(i.mark((function e(t,r){var n,o,a,s,u,c,f,l,h,p=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=p.length>2&&void 0!==p[2]?p[2]:2048,o=this,A(t)&&"self"!==t){e.next=4;break}return e.abrupt("return",x(y(new Error("Invalid key name '".concat(t,"'")),"ERR_INVALID_KEY_NAME")));case 4:if("string"===typeof r){e.next=6;break}return e.abrupt("return",x(y(new Error("Invalid key type '".concat(r,"'")),"ERR_INVALID_KEY_TYPE")));case 6:return a=M(t),e.next=9,o.store.has(a);case 9:if(!e.sent){e.next=12;break}return e.abrupt("return",x(y(new Error("Key '".concat(t,"' already exists")),"ERR_KEY_ALREADY_EXISTS")));case 12:e.t0=r.toLowerCase(),e.next="rsa"===e.t0?15:18;break;case 15:if(Number.isSafeInteger(n)&&!(n<2048)){e.next=17;break}return e.abrupt("return",x(y(new Error("Invalid RSA key size ".concat(n)),"ERR_INVALID_KEY_SIZE")));case 17:case 18:return e.abrupt("break",19);case 19:return e.prev=19,e.next=22,d.keys.generateKeyPair(r,n);case 22:return u=e.sent,e.next=25,u.id();case 25:return c=e.sent,f=w.get(this).dek,e.next=29,u.export(f);case 29:return l=e.sent,s={name:t,id:c},(h=o.store.batch()).put(a,g(l)),h.put(C(t),g(JSON.stringify(s))),e.next=36,h.commit();case 36:e.next=41;break;case 38:return e.prev=38,e.t1=e.catch(19),e.abrupt("return",x(e.t1));case 41:return e.abrupt("return",s);case 42:case"end":return e.stop()}}),e,this,[[19,38]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"listKeys",value:function(){var e=s(i.mark((function e(){var t,r,n,o,a,s,c,f,l,h;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this,r={prefix:m},n=[],o=!0,a=!1,e.prev=5,c=u(t.store.query(r));case 7:return e.next=9,c.next();case 9:return f=e.sent,o=f.done,e.next=13,f.value;case 13:if(l=e.sent,o){e.next=20;break}h=l,n.push(JSON.parse(b(h.value)));case 17:o=!0,e.next=7;break;case 20:e.next=26;break;case 22:e.prev=22,e.t0=e.catch(5),a=!0,s=e.t0;case 26:if(e.prev=26,e.prev=27,o||null==c.return){e.next=31;break}return e.next=31,c.return();case 31:if(e.prev=31,!a){e.next=34;break}throw s;case 34:return e.finish(31);case 35:return e.finish(26);case 36:return e.abrupt("return",n);case 37:case"end":return e.stop()}}),e,this,[[5,22,26,36],[27,,31,35]])})));return function(){return e.apply(this,arguments)}}()},{key:"findKeyById",value:function(){var e=s(i.mark((function e(t){var r;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.listKeys();case 3:return r=e.sent,e.abrupt("return",r.find((function(e){return e.id===t})));case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",x(e.t0));case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"findKeyByName",value:function(){var e=s(i.mark((function e(t){var r,n;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A(t)){e.next=2;break}return e.abrupt("return",x(y(new Error("Invalid key name '".concat(t,"'")),"ERR_INVALID_KEY_NAME")));case 2:return r=C(t),e.prev=3,e.next=6,this.store.get(r);case 6:return n=e.sent,e.abrupt("return",JSON.parse(b(n)));case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",x(y(new Error("Key '".concat(t,"' does not exist. ").concat(e.t0.message)),"ERR_KEY_NOT_FOUND")));case 13:case"end":return e.stop()}}),e,this,[[3,10]])})));return function(t){return e.apply(this,arguments)}}()},{key:"removeKey",value:function(){var e=s(i.mark((function e(t){var r,n,o,a;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this,A(t)&&"self"!==t){e.next=3;break}return e.abrupt("return",x(y(new Error("Invalid key name '".concat(t,"'")),"ERR_INVALID_KEY_NAME")));case 3:return n=M(t),e.next=6,r.findKeyByName(t);case 6:return o=e.sent,(a=r.store.batch()).delete(n),a.delete(C(t)),e.next=12,a.commit();case 12:return e.abrupt("return",o);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"renameKey",value:function(){var e=s(i.mark((function e(t,r){var n,o,a,s,u,c,f,l,h;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this,A(t)&&"self"!==t){e.next=3;break}return e.abrupt("return",x(y(new Error("Invalid old key name '".concat(t,"'")),"ERR_OLD_KEY_NAME_INVALID")));case 3:if(A(r)&&"self"!==r){e.next=5;break}return e.abrupt("return",x(y(new Error("Invalid new key name '".concat(r,"'")),"ERR_NEW_KEY_NAME_INVALID")));case 5:return o=M(t),a=M(r),s=C(t),u=C(r),e.next=11,n.store.has(a);case 11:if(!e.sent){e.next=14;break}return e.abrupt("return",x(y(new Error("Key '".concat(r,"' already exists")),"ERR_KEY_ALREADY_EXISTS")));case 14:return e.prev=14,e.next=17,n.store.get(o);case 17:return c=e.sent,e.next=20,n.store.get(s);case 20:return f=e.sent,(l=JSON.parse(b(f))).name=r,(h=n.store.batch()).put(a,c),h.put(u,g(JSON.stringify(l))),h.delete(o),h.delete(s),e.next=30,h.commit();case 30:return e.abrupt("return",l);case 33:return e.prev=33,e.t0=e.catch(14),e.abrupt("return",x(e.t0));case 36:case"end":return e.stop()}}),e,this,[[14,33]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"exportKey",value:function(){var e=s(i.mark((function e(t,r){var n,o,a,s,u;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A(t)){e.next=2;break}return e.abrupt("return",x(y(new Error("Invalid key name '".concat(t,"'")),"ERR_INVALID_KEY_NAME")));case 2:if(r){e.next=4;break}return e.abrupt("return",x(y(new Error("Password is required"),"ERR_PASSWORD_REQUIRED")));case 4:return n=M(t),e.prev=5,e.next=8,this.store.get(n);case 8:return o=e.sent,a=b(o),s=w.get(this).dek,e.next=13,d.keys.import(a,s);case 13:return u=e.sent,e.abrupt("return",u.export(r));case 17:return e.prev=17,e.t0=e.catch(5),e.abrupt("return",x(e.t0));case 20:case"end":return e.stop()}}),e,this,[[5,17]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"importKey",value:function(){var e=s(i.mark((function e(t,r,n){var o,a,s,u,c,f,l;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this,A(t)&&"self"!==t){e.next=3;break}return e.abrupt("return",x(y(new Error("Invalid key name '".concat(t,"'")),"ERR_INVALID_KEY_NAME")));case 3:if(r){e.next=5;break}return e.abrupt("return",x(y(new Error("PEM encoded key is required"),"ERR_PEM_REQUIRED")));case 5:return a=M(t),e.next=8,o.store.has(a);case 8:if(!e.sent){e.next=11;break}return e.abrupt("return",x(y(new Error("Key '".concat(t,"' already exists")),"ERR_KEY_ALREADY_EXISTS")));case 11:return e.prev=11,e.next=14,d.keys.import(r,n);case 14:s=e.sent,e.next=20;break;case 17:return e.prev=17,e.t0=e.catch(11),e.abrupt("return",x(y(new Error("Cannot read the key, most likely the password is wrong"),"ERR_CANNOT_READ_KEY")));case 20:return e.prev=20,e.next=23,s.id();case 23:return u=e.sent,c=w.get(this).dek,e.next=27,s.export(c);case 27:r=e.sent,e.next=33;break;case 30:return e.prev=30,e.t1=e.catch(20),e.abrupt("return",x(e.t1));case 33:return f={name:t,id:u},(l=o.store.batch()).put(a,g(r)),l.put(C(t),g(JSON.stringify(f))),e.next=39,l.commit();case 39:return e.abrupt("return",f);case 40:case"end":return e.stop()}}),e,this,[[11,17],[20,30]])})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"importPeer",value:function(){var e=s(i.mark((function e(t,r){var n,o,a,s,u,c,f,l;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this,A(t)){e.next=3;break}return e.abrupt("return",x(y(new Error("Invalid key name '".concat(t,"'")),"ERR_INVALID_KEY_NAME")));case 3:if(r&&r.privKey){e.next=5;break}return e.abrupt("return",x(y(new Error("Peer.privKey is required"),"ERR_MISSING_PRIVATE_KEY")));case 5:return o=r.privKey,a=M(t),e.next=9,n.store.has(a);case 9:if(!e.sent){e.next=12;break}return e.abrupt("return",x(y(new Error("Key '".concat(t,"' already exists")),"ERR_KEY_ALREADY_EXISTS")));case 12:return e.prev=12,e.next=15,o.id();case 15:return s=e.sent,u=w.get(this).dek,e.next=19,o.export(u);case 19:return c=e.sent,f={name:t,id:s},(l=n.store.batch()).put(a,g(c)),l.put(C(t),g(JSON.stringify(f))),e.next=26,l.commit();case 26:return e.abrupt("return",f);case 29:return e.prev=29,e.t0=e.catch(12),e.abrupt("return",x(e.t0));case 32:case"end":return e.stop()}}),e,this,[[12,29]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_getPrivateKey",value:function(){var e=s(i.mark((function e(t){var r,n;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A(t)){e.next=2;break}return e.abrupt("return",x(y(new Error("Invalid key name '".concat(t,"'")),"ERR_INVALID_KEY_NAME")));case 2:return e.prev=2,r=M(t),e.next=6,this.store.get(r);case 6:return n=e.sent,e.abrupt("return",b(n));case 10:return e.prev=10,e.t0=e.catch(2),e.abrupt("return",x(y(new Error("Key '".concat(t,"' does not exist. ").concat(e.t0.message)),"ERR_KEY_NOT_FOUND")));case 13:case"end":return e.stop()}}),e,this,[[2,10]])})));return function(t){return e.apply(this,arguments)}}()},{key:"rotateKeychainPass",value:function(){var e=s(i.mark((function e(t,r){var o,a,s,u,c,l,h,p,v,m,k,S,E;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t){e.next=2;break}return e.abrupt("return",x(y(new Error("Invalid old pass type '".concat(typeof t,"'")),"ERR_INVALID_OLD_PASS_TYPE")));case 2:if("string"===typeof r){e.next=4;break}return e.abrupt("return",x(y(new Error("Invalid new pass type '".concat(typeof r,"'")),"ERR_INVALID_NEW_PASS_TYPE")));case 4:if(!(r.length<20)){e.next=6;break}return e.abrupt("return",x(y(new Error("Invalid pass length ".concat(r.length)),"ERR_INVALID_PASS_LENGTH")));case 6:return f("recreating keychain"),o=w.get(this).dek,this.opts.pass=r,a=r?d.pbkdf2(r,this.opts.dek.salt,this.opts.dek.iterationCount,this.opts.dek.keyLength,this.opts.dek.hash):"",w.set(this,{dek:a}),e.next=13,this.listKeys();case 13:s=e.sent,u=n(s),e.prev=15,u.s();case 17:if((c=u.n()).done){e.next=38;break}return l=c.value,e.next=21,this.store.get(M(l.name));case 21:return h=e.sent,p=b(h),e.next=25,d.keys.import(p,o);case 25:return v=e.sent,m=a.toString(),e.next=29,v.export(m);case 29:return k=e.sent,S=this.store.batch(),E={name:l.name,id:l.id},S.put(M(l.name),g(k)),S.put(C(l.name),g(JSON.stringify(E))),e.next=36,S.commit();case 36:e.next=17;break;case 38:e.next=43;break;case 40:e.prev=40,e.t0=e.catch(15),u.e(e.t0);case 43:return e.prev=43,u.f(),e.finish(43);case 46:f("keychain reconstructed");case 47:case"end":return e.stop()}}),e,this,[[15,40,43,46]])})));return function(t,r){return e.apply(this,arguments)}}()}],[{key:"generateOptions",value:function(){var e=Object.assign({},_),t=3*Math.ceil(S/3);return e.dek.salt=b(d.randomBytes(t),"base64"),e}},{key:"options",get:function(){return _}}]),e}();e.exports=O},function(e,t,r){"use strict";var n=r(913),i=/[\/\?<>\\:\*\|"]/g,o=/[\x00-\x1f\x80-\x9f]/g,a=/^\.+$/,s=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,u=/[\. ]+$/;function c(e,t){if("string"!==typeof e)throw new Error("Input must be string");var r=e.replace(i,t).replace(o,t).replace(a,t).replace(s,t).replace(u,t);return n(r,255)}e.exports=function(e,t){var r=t&&t.replacement||"",n=c(e,r);return""===r?n:c(n,"")}},function(e,t,r){"use strict";var n=r(914),i=r(915);e.exports=n.bind(null,i)},function(e,t,r){"use strict";function n(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function(e,t,r){if("string"!==typeof t)throw new Error("Input must be string");for(var o,a,s=t.length,u=0,c=0;c<s;c+=1){if(o=t.charCodeAt(c),a=t[c],n(o)&&i(t.charCodeAt(c+1))&&(a+=t[c+=1]),(u+=e(a))===r)return t.slice(0,c+1);if(u>r)return t.slice(0,c-a.length+1)}return t}},function(e,t,r){"use strict";function n(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function(e){if("string"!==typeof e)throw new Error("Input must be string");for(var t=e.length,r=0,o=null,a=null,s=0;s<t;s++)i(o=e.charCodeAt(s))?null!=a&&n(a)?r+=1:r+=3:o<=127?r+=1:o>=128&&o<=2047?r+=2:o>=2048&&o<=65535&&(r+=3),a=o;return r}},function(e,t,r){"use strict";var n=r(276).encoding,i=new TextDecoder("utf8");function o(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";return"utf8"===t||"utf-8"===t?i.decode(e):"ascii"===t?o(e):n(t).encode(e)}},function(e,t,r){"use strict";var n=r(40),i=r(0),o=r(6),a=r(8),s=r(9),u=r(26),c=r(27),f=r(44),l=r(45),h=r(30),d=r(138),p=r(471),v=r(473),y=r(475),b=function(e){u(r,e);var t=c(r);function r(){var e;return a(this,r),(e=t.call(this)).data={},e}return s(r,[{key:"open",value:function(){return Promise.resolve()}},{key:"close",value:function(){return Promise.resolve()}},{key:"put",value:function(){var e=o(i.mark((function e(t,r){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.data[t.toString()]=r;case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"get",value:function(){var e=o(i.mark((function e(t){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.has(t);case 2:if(e.sent){e.next=5;break}throw y.notFoundError();case 5:return e.abrupt("return",this.data[t.toString()]);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"has",value:function(){var e=o(i.mark((function e(t){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",void 0!==this.data[t.toString()]);case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=o(i.mark((function e(t){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:delete this.data[t.toString()];case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_all",value:function(){var e=this;return f(i.mark((function t(){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(d(h(Object.entries(e.data).map((function(e){var t=n(e,2),r=t[0],i=t[1];return{key:new p(r),value:i}}))),l),"t0",1);case 1:case"end":return t.stop()}}),t)})))()}},{key:"_allKeys",value:function(){var e=this;return f(i.mark((function t(){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(d(h(Object.entries(e.data).map((function(e){var t=n(e,1)[0];return new p(t)}))),l),"t0",1);case 1:case"end":return t.stop()}}),t)})))()}}]),r}(v);e.exports=b},function(e,t,r){"use strict";var n=r(503).nanoid;e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return e(n())}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(30),a=function(){var e=i(n.mark((function e(t){var r,i,a,s,u,c,f,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],i=!0,a=!1,e.prev=3,u=o(t);case 5:return e.next=7,u.next();case 7:return c=e.sent,i=c.done,e.next=11,c.value;case 11:if(f=e.sent,i){e.next=18;break}l=f,r.push(l);case 15:i=!0,e.next=5;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(3),a=!0,s=e.t0;case 24:if(e.prev=24,e.prev=25,i||null==u.return){e.next=29;break}return e.next=29,u.return();case 29:if(e.prev=29,!a){e.next=32;break}throw s;case 32:return e.finish(29);case 33:return e.finish(24);case 34:return e.abrupt("return",r);case 35:case"end":return e.stop()}}),e,null,[[3,20,24,34],[25,,29,33]])})));return function(t){return e.apply(this,arguments)}}();e.exports=a},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9);r(921),r(169);var s=r(18),u=r(926),c=u.certificateForKey,f=u.findAsync,l=r(15),h=r(175).fromString,d=r(296).toString,p=new WeakMap,v=function(){function e(t,r){if(o(this,e),!t)throw l(new Error("keychain is required"),"ERR_KEYCHAIN_REQUIRED");this.keychain=t,p.set(this,{dek:r})}return a(e,[{key:"encrypt",value:function(){var e=i(n.mark((function e(t,r){var i,o,a,u,f,d,v;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r instanceof Uint8Array){e.next=2;break}throw l(new Error("Plain data must be a Uint8Array"),"ERR_INVALID_PARAMS");case 2:return e.next=4,this.keychain.findKeyByName(t);case 4:return i=e.sent,e.next=7,this.keychain._getPrivateKey(t);case 7:return o=e.sent,a=p.get(this).dek,u=s.pki.decryptRsaPrivateKey(o,a),e.next=12,c(i,u);case 12:return f=e.sent,(d=s.pkcs7.createEnvelopedData()).addRecipient(f),d.content=s.util.createBuffer(r),d.encrypt(),v=s.asn1.toDer(d.toAsn1()).getBytes(),e.abrupt("return",h(v,"ascii"));case 19:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"decrypt",value:function(){var e=i(n.mark((function e(t){var r,o,a,u,c,v,y,b,g,m,w=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t instanceof Uint8Array){e.next=2;break}throw l(new Error("CMS data is required"),"ERR_INVALID_PARAMS");case 2:e.prev=2,o=s.util.createBuffer(d(t,"ascii")),a=s.asn1.fromDer(o),r=s.pkcs7.messageFromAsn1(a),e.next=11;break;case 8:throw e.prev=8,e.t0=e.catch(2),l(new Error("Invalid CMS: "+e.t0.message),"ERR_INVALID_CMS");case 11:return u=r.recipients.filter((function(e){return e.issuer.find((function(e){return"O"===e.shortName&&"ipfs"===e.value}))})).filter((function(e){return e.issuer.find((function(e){return"CN"===e.shortName}))})).map((function(e){return{recipient:e,keyId:e.issuer.find((function(e){return"CN"===e.shortName})).value}})),e.next=14,f(u,function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,w.keychain.findKeyById(t.keyId);case 3:if(!e.sent){e.next=6;break}return e.abrupt("return",!0);case 6:e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:return e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}());case 14:if(c=e.sent){e.next=18;break}throw v=u.map((function(e){return e.keyId})),l(new Error("Decryption needs one of the key(s): "+v.join(", ")),"ERR_MISSING_KEYS",{missingKeys:v});case 18:return e.next=20,this.keychain.findKeyById(c.keyId);case 20:if(y=e.sent){e.next=23;break}throw l(new Error("No key available to decrypto"),"ERR_NO_KEY");case 23:return e.next=25,this.keychain._getPrivateKey(y.name);case 25:return b=e.sent,g=p.get(this).dek,m=s.pki.decryptRsaPrivateKey(b,g),r.decrypt(c.recipient,m),e.abrupt("return",h(r.content.getBytes(),"ascii"));case 30:case"end":return e.stop()}}),e,this,[[2,8]])})));return function(t){return e.apply(this,arguments)}}()}]),e}();e.exports=v},function(e,t,r){var n=r(18);r(167),r(62),r(270),r(168),r(272),r(922),r(113),r(34),r(476);var i=n.asn1,o=e.exports=n.pkcs7=n.pkcs7||{};function a(e){var t={},r=[];if(!i.validate(e,o.asn1.recipientInfoValidator,t,r)){var a=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw a.errors=r,a}return{version:t.version.charCodeAt(0),issuer:n.pki.RDNAttributesAsArray(t.issuer),serialNumber:n.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:i.derToOid(t.encAlgorithm),parameter:t.encParameter.value,content:t.encKey}}}function s(e){for(var t,r=[],o=0;o<e.length;++o)r.push((t=e[o],i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[n.pki.distinguishedNameToAsn1({attributes:t.issuer}),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(t.serialNumber))]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.encryptedContent.algorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.encryptedContent.content)])));return r}function u(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[n.pki.distinguishedNameToAsn1({attributes:e.issuer}),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(e.serialNumber))]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.digestAlgorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureAlgorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),o=0;o<e.unauthenticatedAttributes.length;++o){var a=e.unauthenticatedAttributes[o];r.values.push(c(a))}t.value.push(r)}return t}function c(e){var t;if(e.type===n.pki.oids.contentType)t=i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.value).getBytes());else if(e.type===n.pki.oids.messageDigest)t=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===n.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),o=new Date("2050-01-01T00:00:00Z"),a=e.value;if("string"===typeof a){var s=Date.parse(a);a=isNaN(s)?13===a.length?i.utcTimeToDate(a):i.generalizedTimeToDate(a):new Date(s)}t=a>=r&&a<o?i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(a)):i.create(i.Class.UNIVERSAL,i.Type.GENERALIZEDTIME,!1,i.dateToGeneralizedTime(a))}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[t])])}function f(e,t,r){var o={};if(!i.validate(t,r,o,[])){var a=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw a.errors=a,a}if(i.derToOid(o.contentType)!==n.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(o.encryptedContent){var s="";if(n.util.isArray(o.encryptedContent))for(var u=0;u<o.encryptedContent.length;++u){if(o.encryptedContent[u].type!==i.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");s+=o.encryptedContent[u].value}else s=o.encryptedContent;e.encryptedContent={algorithm:i.derToOid(o.encAlgorithm),parameter:n.util.createBuffer(o.encParameter.value),content:n.util.createBuffer(s)}}if(o.content){s="";if(n.util.isArray(o.content))for(u=0;u<o.content.length;++u){if(o.content[u].type!==i.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");s+=o.content[u].value}else s=o.content;e.content=n.util.createBuffer(s)}return e.version=o.version.charCodeAt(0),e.rawCapture=o,o}function l(e){if(void 0===e.encryptedContent.key)throw new Error("Symmetric key not available.");if(void 0===e.content){var t;switch(e.encryptedContent.algorithm){case n.pki.oids["aes128-CBC"]:case n.pki.oids["aes192-CBC"]:case n.pki.oids["aes256-CBC"]:t=n.aes.createDecryptionCipher(e.encryptedContent.key);break;case n.pki.oids.desCBC:case n.pki.oids["des-EDE3-CBC"]:t=n.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}o.messageFromPem=function(e){var t=n.pem.decode(e)[0];if("PKCS7"!==t.type){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var a=i.fromDer(t.body);return o.messageFromAsn1(a)},o.messageToPem=function(e,t){var r={type:"PKCS7",body:i.toDer(e.toAsn1()).getBytes()};return n.pem.encode(r,{maxline:t})},o.messageFromAsn1=function(e){var t={},r=[];if(!i.validate(e,o.asn1.contentInfoValidator,t,r)){var a=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw a.errors=r,a}var s,u=i.derToOid(t.contentType);switch(u){case n.pki.oids.envelopedData:s=o.createEnvelopedData();break;case n.pki.oids.encryptedData:s=o.createEncryptedData();break;case n.pki.oids.signedData:s=o.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+u+" is not (yet) supported.")}return s.fromAsn1(t.content.value[0]),s},o.createSignedData=function(){var e=null;return e={type:n.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(t){if(f(e,t,o.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var r=e.rawCapture.certificates.value,i=0;i<r.length;++i)e.certificates.push(n.pki.certificateFromAsn1(r[i]))},toAsn1:function(){e.contentInfo||e.sign();for(var t=[],r=0;r<e.certificates.length;++r)t.push(n.pki.certificateToAsn1(e.certificates[r]));var o=[],a=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return t.length>0&&a.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),o.length>0&&a.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,o)),a.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),a])},addSigner:function(t){var r=t.issuer,i=t.serialNumber;if(t.certificate){var o=t.certificate;"string"===typeof o&&(o=n.pki.certificateFromPem(o)),r=o.issuer.attributes,i=o.serialNumber}var a=t.key;if(!a)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof a&&(a=n.pki.privateKeyFromPem(a));var s=t.digestAlgorithm||n.pki.oids.sha1;switch(s){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+s)}var u=t.authenticatedAttributes||[];if(u.length>0){for(var c=!1,f=!1,l=0;l<u.length;++l){var h=u[l];if(c||h.type!==n.pki.oids.contentType){if(f||h.type!==n.pki.oids.messageDigest);else if(f=!0,c)break}else if(c=!0,f)break}if(!c||!f)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:a,version:1,issuer:r,serialNumber:i,digestAlgorithm:s,signatureAlgorithm:n.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(t){var r;(t=t||{},"object"!==typeof e.content||null===e.contentInfo)&&(e.contentInfo=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.pki.oids.data).getBytes())]),"content"in e&&(e.content instanceof n.util.ByteBuffer?r=e.content.bytes():"string"===typeof e.content&&(r=n.util.encodeUtf8(e.content)),t.detached?e.detachedContent=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r):e.contentInfo.value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r)]))));0!==e.signers.length&&function(t){var r;r=e.detachedContent?e.detachedContent:(r=e.contentInfo.value[1]).value[0];if(!r)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var o=i.derToOid(e.contentInfo.value[0].value),a=i.toDer(r);for(var s in a.getByte(),i.getBerValueLength(a),a=a.getBytes(),t)t[s].start().update(a);for(var f=new Date,l=0;l<e.signers.length;++l){var h=e.signers[l];if(0===h.authenticatedAttributes.length){if(o!==n.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{h.authenticatedAttributesAsn1=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var d=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[]),p=0;p<h.authenticatedAttributes.length;++p){var v=h.authenticatedAttributes[p];v.type===n.pki.oids.messageDigest?v.value=t[h.digestAlgorithm].digest():v.type===n.pki.oids.signingTime&&(v.value||(v.value=f)),d.value.push(c(v)),h.authenticatedAttributesAsn1.value.push(c(v))}a=i.toDer(d).getBytes(),h.md.start().update(a)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=function(e){for(var t=[],r=0;r<e.length;++r)t.push(u(e[r]));return t}(e.signers)}(function(){for(var t={},r=0;r<e.signers.length;++r){var o=e.signers[r];(a=o.digestAlgorithm)in t||(t[a]=n.md[n.pki.oids[a]].create()),0===o.authenticatedAttributes.length?o.md=t[a]:o.md=n.md[n.pki.oids[a]].create()}for(var a in e.digestAlgorithmIdentifiers=[],t)e.digestAlgorithmIdentifiers.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]));return t}())},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(t){"string"===typeof t&&(t=n.pki.certificateFromPem(t)),e.certificates.push(t)},addCertificateRevokationList:function(e){throw new Error("PKCS#7 CRL support not yet implemented.")}}},o.createEncryptedData=function(){var e=null;return e={type:n.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:n.pki.oids["aes256-CBC"]},fromAsn1:function(t){f(e,t,o.asn1.encryptedDataValidator)},decrypt:function(t){void 0!==t&&(e.encryptedContent.key=t),l(e)}}},o.createEnvelopedData=function(){var e=null;return e={type:n.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:n.pki.oids["aes256-CBC"]},fromAsn1:function(t){var r=f(e,t,o.asn1.envelopedDataValidator);e.recipients=function(e){for(var t=[],r=0;r<e.length;++r)t.push(a(e[r]));return t}(r.recipientInfos.value)},toAsn1:function(){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,s(e.recipients)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,(t=e.encryptedContent,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.pki.oids.data).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.algorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.parameter.getBytes())]),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.content.getBytes())])]))])])]);var t},findRecipient:function(t){for(var r=t.issuer.attributes,n=0;n<e.recipients.length;++n){var i=e.recipients[n],o=i.issuer;if(i.serialNumber===t.serialNumber&&o.length===r.length){for(var a=!0,s=0;s<r.length;++s)if(o[s].type!==r[s].type||o[s].value!==r[s].value){a=!1;break}if(a)return i}}return null},decrypt:function(t,r){if(void 0===e.encryptedContent.key&&void 0!==t&&void 0!==r)switch(t.encryptedContent.algorithm){case n.pki.oids.rsaEncryption:case n.pki.oids.desCBC:var i=r.decrypt(t.encryptedContent.content);e.encryptedContent.key=n.util.createBuffer(i);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}l(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:n.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,r){if(void 0===e.encryptedContent.content){var i,o,a;switch(r=r||e.encryptedContent.algorithm,t=t||e.encryptedContent.key,r){case n.pki.oids["aes128-CBC"]:i=16,o=16,a=n.aes.createEncryptionCipher;break;case n.pki.oids["aes192-CBC"]:i=24,o=16,a=n.aes.createEncryptionCipher;break;case n.pki.oids["aes256-CBC"]:i=32,o=16,a=n.aes.createEncryptionCipher;break;case n.pki.oids["des-EDE3-CBC"]:i=24,o=8,a=n.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(void 0===t)t=n.util.createBuffer(n.random.getBytes(i));else if(t.length()!=i)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+i+".");e.encryptedContent.algorithm=r,e.encryptedContent.key=t,e.encryptedContent.parameter=n.util.createBuffer(n.random.getBytes(o));var s=a(t);if(s.start(e.encryptedContent.parameter.copy()),s.update(e.content),!s.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=s.output}for(var u=0;u<e.recipients.length;++u){var c=e.recipients[u];if(void 0===c.encryptedContent.content)switch(c.encryptedContent.algorithm){case n.pki.oids.rsaEncryption:c.encryptedContent.content=c.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm)}}}}}},function(e,t,r){var n=r(18);r(62),r(34);var i=n.asn1,o=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=o;var a={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};o.contentInfoValidator=a;var s={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};o.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(s)},o.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(s)};var u={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};o.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},o.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(e,t,r){var n=r(18);r(924),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},function(e,t,r){var n=r(18);r(34),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,o=Math.ceil(r/e.digestLength),a=0;a<o;a++){var s=new n.util.ByteBuffer;s.putInt32(a),e.start(),e.update(t+s.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-r),i.getBytes()}}}},function(e,t,r){var n=r(18);r(113),r(34),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,i=e.mgf,o=r.digestLength,a=e.salt||null;if("string"===typeof a&&(a=n.util.createBuffer(a)),"saltLength"in e)t=e.saltLength;else{if(null===a)throw new Error("Salt length not specified or specific salt not given.");t=a.length()}if(null!==a&&a.length()!==t)throw new Error("Given salt length does not match length of given salt.");var s=e.prng||n.random,u={encode:function(e,u){var c,f,l=u-1,h=Math.ceil(l/8),d=e.digest().getBytes();if(h<o+t+2)throw new Error("Message is too long to encrypt.");f=null===a?s.getBytesSync(t):a.bytes();var p=new n.util.ByteBuffer;p.fillWithByte(0,8),p.putBytes(d),p.putBytes(f),r.start(),r.update(p.getBytes());var v=r.digest().getBytes(),y=new n.util.ByteBuffer;y.fillWithByte(0,h-t-o-2),y.putByte(1),y.putBytes(f);var b=y.getBytes(),g=h-o-1,m=i.generate(v,g),w="";for(c=0;c<g;c++)w+=String.fromCharCode(b.charCodeAt(c)^m.charCodeAt(c));var k=65280>>8*h-l&255;return(w=String.fromCharCode(w.charCodeAt(0)&~k)+w.substr(1))+v+String.fromCharCode(188)},verify:function(e,a,s){var u,c=s-1,f=Math.ceil(c/8);if(a=a.substr(-f),f<o+t+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==a.charCodeAt(f-1))throw new Error("Encoded message does not end in 0xBC.");var l=f-o-1,h=a.substr(0,l),d=a.substr(l,o),p=65280>>8*f-c&255;if(0!==(h.charCodeAt(0)&p))throw new Error("Bits beyond keysize not zero as expected.");var v=i.generate(d,l),y="";for(u=0;u<l;u++)y+=String.fromCharCode(h.charCodeAt(u)^v.charCodeAt(u));y=String.fromCharCode(y.charCodeAt(0)&~p)+y.substr(1);var b=f-o-t-2;for(u=0;u<b;u++)if(0!==y.charCodeAt(u))throw new Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(b))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var g=y.substr(-t),m=new n.util.ByteBuffer;return m.fillWithByte(0,8),m.putBytes(e),m.putBytes(g),r.start(),r.update(m.getBytes()),d===r.digest().getBytes()}};return u}},function(e,t,r){"use strict";var n=r(0),i=r(6);r(476);var o=r(18).pki;function a(){return(a=i(n.mark((function e(t,r){var i,o,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map(r),e.next=3,Promise.all(i);case 3:return o=e.sent,a=o.findIndex((function(e){return e})),e.abrupt("return",t[a]);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports={certificateForKey:function(e,t){var r=o.setRsaPublicKey(t.n,t.e),n=o.createCertificate();n.publicKey=r,n.serialNumber="01",n.validity.notBefore=new Date,n.validity.notAfter=new Date,n.validity.notAfter.setFullYear(n.validity.notBefore.getFullYear()+10);var i=[{name:"organizationName",value:"ipfs"},{shortName:"OU",value:"keystore"},{name:"commonName",value:e.id}];return n.setSubject(i),n.setIssuer(i),n.setExtensions([{name:"basicConstraints",cA:!0},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},{name:"extKeyUsage",serverAuth:!0,clientAuth:!0,codeSigning:!0,emailProtection:!0,timeStamping:!0},{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0,sslCA:!0,emailCA:!0,objCA:!0}]),n.sign(t),n},findAsync:function(e,t){return a.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(48),i=r(21),o=r(8),a=r(9),s=r(210),u=r(60).pipe,c=r(312).tap,f=r(928),l=r(290).METRICS,h=r(930),d=["dataReceived","dataSent"],p={in:"dataReceived",out:"dataSent"},v=function(){function e(t){var r=this;o(this,e),this._options=s(l,t),this._globalStats=new h(d,this._options),this._peerStats=new Map,this._protocolStats=new Map,this._oldPeers=f(this._options.maxOldPeersRetention),this._running=!1,this._onMessage=this._onMessage.bind(this),this._connectionManager=t.connectionManager,this._connectionManager.on("peer:disconnect",(function(e){r.onPeerDisconnected(e.remotePeer)}))}return a(e,[{key:"start",value:function(){this._running=!0}},{key:"stop",value:function(){this._running=!1,this._globalStats.stop();var e,t=i(this._peerStats.values());try{for(t.s();!(e=t.n()).done;){e.value.stop()}}catch(o){t.e(o)}finally{t.f()}var r,n=i(this._protocolStats.values());try{for(n.s();!(r=n.n()).done;){r.value.stop()}}catch(o){n.e(o)}finally{n.f()}}},{key:"global",get:function(){return this._globalStats}},{key:"peers",get:function(){return Array.from(this._peerStats.keys())}},{key:"forPeer",value:function(e){var t=e.toB58String();return this._peerStats.get(t)||this._oldPeers.get(t)}},{key:"protocols",get:function(){return Array.from(this._protocolStats.keys())}},{key:"forProtocol",value:function(e){return this._protocolStats.get(e)}},{key:"onPeerDisconnected",value:function(e){var t=e.toB58String(),r=this._peerStats.get(t);r&&(r.stop(),this._peerStats.delete(t),this._oldPeers.set(t,r))}},{key:"_onMessage",value:function(e){var t=e.remotePeer,r=e.protocol,n=e.direction,i=e.dataLength;if(this._running){var o=p[n],a=this.forPeer(t);if(a||(a=new h(d,this._options),this._peerStats.set(t.toB58String(),a)),a.push(o,i),this._globalStats.push(o,i),r){var s=this.forProtocol(r);s||(s=new h(d,this._options),this._protocolStats.set(r,s)),s.push(o,i)}}}},{key:"updatePlaceholder",value:function(t,r){if(this._running){var n=this.forPeer(t),i=r.toB58String(),o=this.forPeer(r),a=n;o&&(a=e.mergeStats(o,a),this._oldPeers.delete(i)),this._peerStats.delete(t.toB58String()),this._peerStats.set(i,a),a.start()}}},{key:"trackStream",value:function(e){var t=e.stream,r=e.remotePeer,n=e.protocol,i=this,o=t.source;t.source=c((function(e){return i._onMessage({remotePeer:r,protocol:n,direction:"in",dataLength:e.length})}))(o);var a=t.sink;return t.sink=function(e){return u(e,c((function(e){return i._onMessage({remotePeer:r,protocol:n,direction:"out",dataLength:e.length})})),a)},t}}],[{key:"mergeStats",value:function(e,t){return e.stop(),t.stop(),e._queue=[].concat(n(e._queue),n(t._queue)),e}}]),e}();e.exports=v},function(e,t,r){"use strict";var n=r(929);e.exports=function(e){var t=n(e);return t.delete=t.remove,t}},function(e,t){e.exports=function(e){if(!e)throw Error("hashlru must have a max value, of type number, greater than 0");var t=0,r=Object.create(null),n=Object.create(null);function i(i,o){r[i]=o,++t>=e&&(t=0,n=r,r=Object.create(null))}return{has:function(e){return void 0!==r[e]||void 0!==n[e]},remove:function(e){void 0!==r[e]&&(r[e]=void 0),void 0!==n[e]&&(n[e]=void 0)},get:function(e){var t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(i(e,t),t):void 0},set:function(e,t){void 0!==r[e]?r[e]=t:i(e,t)},clear:function(){r=Object.create(null),n=Object.create(null)}}}},function(e,t,r){"use strict";var n=r(21),i=r(8),o=r(9),a=r(61),s=r(26),u=r(27),c=r(57).EventEmitter,f=r(931).BigNumber,l=r(932),h=r(463),d=function(e){s(r,e);var t=u(r);function r(e,n){var o;i(this,r),(o=t.call(this))._options=n,o._queue=[],o._stats={dataReceived:f(0),dataSent:f(0)},o._frequencyLastTime=Date.now(),o._frequencyAccumulators={},o._movingAverages={},o._update=o._update.bind(a(o));for(var s=o._options.movingAverageIntervals,u=0;u<e.length;u++){var c=e[u];o._stats[c]=f(0),o._movingAverages[c]={};for(var h=0;h<s.length;h++){var d=s[h];(o._movingAverages[c][d]=l(d)).push(o._frequencyLastTime,0)}}return o}return o(r,[{key:"start",value:function(){this._queue.length&&this._resetComputeTimeout()}},{key:"stop",value:function(){this._timeout&&(this._timeout.clear(),this._timeout=null)}},{key:"snapshot",get:function(){return Object.assign({},this._stats)}},{key:"movingAverages",get:function(){return Object.assign({},this._movingAverages)}},{key:"toJSON",value:function(){for(var e=this.snapshot,t=this.movingAverages,r={dataReceived:e.dataReceived.toString(),dataSent:e.dataSent.toString(),movingAverages:{}},n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];r.movingAverages[o]={};for(var a=0,s=Object.keys(t[o]);a<s.length;a++){var u=s[a];r.movingAverages[o][u]=t[o][u].movingAverage()}}return r}},{key:"push",value:function(e,t){this._queue.push([e,t,Date.now()]),this._resetComputeTimeout()}},{key:"_resetComputeTimeout",value:function(){this._timeout=h(this._update,this._nextTimeout())}},{key:"_nextTimeout",value:function(){var e=this._queue.length/this._options.computeThrottleMaxQueueSize;return Math.max(this._options.computeThrottleTimeout*(1-e),0)}},{key:"_update",value:function(){if(this._timeout=null,this._queue.length){var e,t,r=n(this._queue);try{for(r.s();!(t=r.n()).done;)e=t.value,this._applyOp(e)}catch(i){r.e(i)}finally{r.f()}this._queue=[],this._updateFrequency(e[2]),this.emit("update",this._stats)}}},{key:"_updateFrequency",value:function(e){var t=this,r=e-this._frequencyLastTime;Object.keys(this._stats).forEach((function(n){t._updateFrequencyFor(n,r,e)})),this._frequencyLastTime=e}},{key:"_updateFrequencyFor",value:function(e,t,r){var n=this._frequencyAccumulators[e]||0;this._frequencyAccumulators[e]=0;var i=n/(t||1)*1e3,o=this._movingAverages[e];o||(o=this._movingAverages[e]={});for(var a=this._options.movingAverageIntervals,s=0;s<a.length;s++){var u=a[s],c=o[u];c||(c=o[u]=l(u)),c.push(r,i)}}},{key:"_applyOp",value:function(e){var t,r=e[0],n=e[1];if("number"!==typeof n)throw new Error("invalid increment number: ".concat(n));t=Object.prototype.hasOwnProperty.call(this._stats,r)?this._stats[r]:this._stats[r]=f(0),this._stats[r]=t.plus(n),this._frequencyAccumulators[r]||(this._frequencyAccumulators[r]=0),this._frequencyAccumulators[r]+=n}}]),r}(c);e.exports=d},function(e,t,r){var n;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",l=1e14,h=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],v=1e7,y=1e9;function b(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=h-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function m(e,t){var r,n,i=e.c,o=t.c,a=e.s,s=t.s,u=e.e,c=t.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function w(e,t,r,n){if(e<t||e>r||e!==u(e))throw Error(c+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function k(e){var t=e.c.length-1;return b(e.e/h)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function E(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(o=function e(t){var r,n,i,o=N.prototype={constructor:N,toString:null,valueOf:null},_=new N(1),A=20,x=4,T=-7,M=21,C=-1e7,O=1e7,I=!1,P=1,R=0,B={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz";function N(e,t){var r,o,s,c,l,p,v,y,b=this;if(!(b instanceof N))return new N(e,t);if(null==t){if(e&&!0===e._isBigNumber)return b.s=e.s,void(!e.c||e.e>O?b.c=b.e=null:e.e<C?b.c=[b.e=0]:(b.e=e.e,b.c=e.c.slice()));if((p="number"==typeof e)&&0*e==0){if(b.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,l=e;l>=10;l/=10,c++);return void(c>O?b.c=b.e=null:(b.e=c,b.c=[e]))}y=String(e)}else{if(!a.test(y=String(e)))return i(b,y,p);b.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(c=y.indexOf("."))>-1&&(y=y.replace(".","")),(l=y.search(/e/i))>0?(c<0&&(c=l),c+=+y.slice(l+1),y=y.substring(0,l)):c<0&&(c=y.length)}else{if(w(t,2,D.length,"Base"),10==t)return F(b=new N(e),A+b.e+1,x);if(y=String(e),p="number"==typeof e){if(0*e!=0)return i(b,y,p,t);if(b.s=1/e<0?(y=y.slice(1),-1):1,N.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else b.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(r=D.slice(0,t),c=l=0,v=y.length;l<v;l++)if(r.indexOf(o=y.charAt(l))<0){if("."==o){if(l>c){c=v;continue}}else if(!s&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){s=!0,l=-1,c=0;continue}return i(b,String(e),p,t)}p=!1,(c=(y=n(y,t,10,b.s)).indexOf("."))>-1?y=y.replace(".",""):c=y.length}for(l=0;48===y.charCodeAt(l);l++);for(v=y.length;48===y.charCodeAt(--v););if(y=y.slice(l,++v)){if(v-=l,p&&N.DEBUG&&v>15&&(e>d||e!==u(e)))throw Error(f+b.s*e);if((c=c-l-1)>O)b.c=b.e=null;else if(c<C)b.c=[b.e=0];else{if(b.e=c,b.c=[],l=(c+1)%h,c<0&&(l+=h),l<v){for(l&&b.c.push(+y.slice(0,l)),v-=h;l<v;)b.c.push(+y.slice(l,l+=h));l=h-(y=y.slice(l)).length}else l-=v;for(;l--;y+="0");b.c.push(+y)}}else b.c=[b.e=0]}function L(e,t,r,n){var i,o,a,s,u;if(null==r?r=x:w(r,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)u=g(e.c),u=1==n||2==n&&(a<=T||a>=M)?S(u,a):E(u,a,"0");else if(o=(e=F(new N(e),t,r)).e,s=(u=g(e.c)).length,1==n||2==n&&(t<=o||o<=T)){for(;s<t;u+="0",s++);u=S(u,o)}else if(t-=a,u=E(u,o,"0"),o+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function j(e,t){for(var r,n=1,i=new N(e[0]);n<e.length;n++){if(!(r=new N(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function U(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*h-1)>O?e.c=e.e=null:r<C?e.c=[e.e=0]:(e.e=r,e.c=t),e}function F(e,t,r,n){var i,o,a,c,f,d,v,y=e.c,b=p;if(y){e:{for(i=1,c=y[0];c>=10;c/=10,i++);if((o=t-i)<0)o+=h,a=t,v=(f=y[d=0])/b[i-a-1]%10|0;else if((d=s((o+1)/h))>=y.length){if(!n)break e;for(;y.length<=d;y.push(0));f=v=0,i=1,a=(o%=h)-h+1}else{for(f=c=y[d],i=1;c>=10;c/=10,i++);v=(a=(o%=h)-h+i)<0?0:f/b[i-a-1]%10|0}if(n=n||t<0||null!=y[d+1]||(a<0?f:f%b[i-a-1]),n=r<4?(v||n)&&(0==r||r==(e.s<0?3:2)):v>5||5==v&&(4==r||n||6==r&&(o>0?a>0?f/b[i-a]:0:y[d-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=b[(h-t%h)%h],e.e=-t||0):y[0]=e.e=0,e;if(0==o?(y.length=d,c=1,d--):(y.length=d+1,c=b[h-o],y[d]=a>0?u(f/b[i-a]%b[a])*c:0),n)for(;;){if(0==d){for(o=1,a=y[0];a>=10;a/=10,o++);for(a=y[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[d]+=c,y[d]!=l)break;y[d--]=0,c=1}for(o=y.length;0===y[--o];y.pop());}e.e>O?e.c=e.e=null:e.e<C&&(e.c=[e.e=0])}return e}function K(e){var t,r=e.e;return null===r?e.toString():(t=g(e.c),t=r<=T||r>=M?S(t,r):E(t,r,"0"),e.s<0?"-"+t:t)}return N.clone=e,N.ROUND_UP=0,N.ROUND_DOWN=1,N.ROUND_CEIL=2,N.ROUND_FLOOR=3,N.ROUND_HALF_UP=4,N.ROUND_HALF_DOWN=5,N.ROUND_HALF_EVEN=6,N.ROUND_HALF_CEIL=7,N.ROUND_HALF_FLOOR=8,N.EUCLID=9,N.config=N.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,y,t),A=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),x=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-y,0,t),w(r[1],0,y,t),T=r[0],M=r[1]):(w(r,-y,y,t),T=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-y,-1,t),w(r[1],1,y,t),C=r[0],O=r[1];else{if(w(r,-y,y,t),!r)throw Error(c+t+" cannot be zero: "+r);C=-(O=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(c+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw I=!r,Error(c+"crypto unavailable");I=r}else I=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),P=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,y,t),R=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(c+t+" not an object: "+r);B=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+t+" invalid: "+r);D=r}}return{DECIMAL_PLACES:A,ROUNDING_MODE:x,EXPONENTIAL_AT:[T,M],RANGE:[C,O],CRYPTO:I,MODULO_MODE:P,POW_PRECISION:R,FORMAT:B,ALPHABET:D}},N.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!N.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-y&&i<=y&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%h)<1&&(t+=h),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=l||r!==u(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},N.maximum=N.max=function(){return j(arguments,o.lt)},N.minimum=N.min=function(){return j(arguments,o.gt)},N.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return u(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var r,n,i,o,a,f=0,l=[],d=new N(_);if(null==e?e=A:w(e,0,y),o=s(e/h),I)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));f<o;)(a=131072*r[f]+(r[f+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[f]=n[0],r[f+1]=n[1]):(l.push(a%1e14),f+=2);f=o/2}else{if(!crypto.randomBytes)throw I=!1,Error(c+"crypto unavailable");for(r=crypto.randomBytes(o*=7);f<o;)(a=281474976710656*(31&r[f])+1099511627776*r[f+1]+4294967296*r[f+2]+16777216*r[f+3]+(r[f+4]<<16)+(r[f+5]<<8)+r[f+6])>=9e15?crypto.randomBytes(7).copy(r,f):(l.push(a%1e14),f+=7);f=o/7}if(!I)for(;f<o;)(a=t())<9e15&&(l[f++]=a%1e14);for(o=l[--f],e%=h,o&&e&&(a=p[h-e],l[f]=u(o/a)*a);0===l[f];l.pop(),f--);if(f<0)l=[i=0];else{for(i=-1;0===l[0];l.splice(0,1),i-=h);for(f=1,a=l[0];a>=10;a/=10,f++);f<h&&(i-=h-f)}return d.e=i,d.c=l,d}}(),N.sum=function(){for(var e=1,t=arguments,r=new N(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,a=[0],s=0,u=e.length;s<u;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,s){var u,c,f,l,h,d,p,v,y=n.indexOf("."),b=A,m=x;for(y>=0&&(l=R,R=0,n=n.replace(".",""),d=(v=new N(i)).pow(n.length-y),R=l,v.c=t(E(g(d.c),d.e,"0"),10,o,e),v.e=v.c.length),f=l=(p=t(n,i,o,s?(u=D,e):(u=e,D))).length;0==p[--l];p.pop());if(!p[0])return u.charAt(0);if(y<0?--f:(d.c=p,d.e=f,d.s=a,p=(d=r(d,v,b,m,o)).c,h=d.r,f=d.e),y=p[c=f+b+1],l=o/2,h=h||c<0||null!=p[c+1],h=m<4?(null!=y||h)&&(0==m||m==(d.s<0?3:2)):y>l||y==l&&(4==m||h||6==m&&1&p[c-1]||m==(d.s<0?8:7)),c<1||!p[0])n=h?E(u.charAt(1),-b,u.charAt(0)):u.charAt(0);else{if(p.length=c,h)for(--o;++p[--c]>o;)p[c]=0,c||(++f,p=[1].concat(p));for(l=p.length;!p[--l];);for(y=0,n="";y<=l;n+=u.charAt(p[y++]));n=E(n,f,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,a,s=0,u=e.length,c=t%v,f=t/v|0;for(e=e.slice();u--;)s=((i=c*(o=e[u]%v)+(n=f*o+(a=e[u]/v|0)*c)%v*v+s)/r|0)+(n/v|0)+f*a,e[u]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,a,s){var c,f,d,p,v,y,g,m,w,k,S,E,_,A,x,T,M,C=n.s==i.s?1:-1,O=n.c,I=i.c;if(!O||!O[0]||!I||!I[0])return new N(n.s&&i.s&&(O?!I||O[0]!=I[0]:I)?O&&0==O[0]||!I?0*C:C/0:NaN);for(w=(m=new N(C)).c=[],C=o+(f=n.e-i.e)+1,s||(s=l,f=b(n.e/h)-b(i.e/h),C=C/h|0),d=0;I[d]==(O[d]||0);d++);if(I[d]>(O[d]||0)&&f--,C<0)w.push(1),p=!0;else{for(A=O.length,T=I.length,d=0,C+=2,(v=u(s/(I[0]+1)))>1&&(I=e(I,v,s),O=e(O,v,s),T=I.length,A=O.length),_=T,S=(k=O.slice(0,T)).length;S<T;k[S++]=0);M=I.slice(),M=[0].concat(M),x=I[0],I[1]>=s/2&&x++;do{if(v=0,(c=t(I,k,T,S))<0){if(E=k[0],T!=S&&(E=E*s+(k[1]||0)),(v=u(E/x))>1)for(v>=s&&(v=s-1),g=(y=e(I,v,s)).length,S=k.length;1==t(y,k,g,S);)v--,r(y,T<g?M:I,g,s),g=y.length,c=1;else 0==v&&(c=v=1),g=(y=I.slice()).length;if(g<S&&(y=[0].concat(y)),r(k,y,S,s),S=k.length,-1==c)for(;t(I,k,T,S)<1;)v++,r(k,T<S?M:I,S,s),S=k.length}else 0===c&&(v++,k=[0]);w[d++]=v,k[0]?k[S++]=O[_]||0:(k=[O[_]],S=1)}while((_++<A||null!=k[0])&&C--);p=null!=k[0],w[0]||w.splice(0,1)}if(s==l){for(d=1,C=w[0];C>=10;C/=10,d++);F(m,o+(m.e=d+f*h-1)+1,a,p)}else m.e=f,m.r=+p;return m}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var f,l=s?a:a.replace(i,"");if(n.test(l))o.s=isNaN(l)?null:l<0?-1:1;else{if(!s&&(l=l.replace(e,(function(e,t,r){return f="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=f?e:t})),u&&(f=u,l=l.replace(t,"$1").replace(r,"0.$1")),a!=l))return new N(l,f);if(N.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var e=new N(this);return e.s<0&&(e.s=1),e},o.comparedTo=function(e,t){return m(this,new N(e,t))},o.decimalPlaces=o.dp=function(e,t){var r,n,i,o=this;if(null!=e)return w(e,0,y),null==t?t=x:w(t,0,8),F(new N(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-b(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},o.dividedBy=o.div=function(e,t){return r(this,new N(e,t),A,x)},o.dividedToIntegerBy=o.idiv=function(e,t){return r(this,new N(e,t),0,1)},o.exponentiatedBy=o.pow=function(e,t){var r,n,i,o,a,f,l,d,p=this;if((e=new N(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+K(e));if(null!=t&&(t=new N(t)),a=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return d=new N(Math.pow(+K(p),a?2-k(e):+K(e))),t?d.mod(t):d;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new N(NaN);(n=!f&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&k(e)?-0:0,p.e>-1&&(o=1/o),new N(f?1/o:o);R&&(o=s(R/h+2))}for(a?(r=new N(.5),f&&(e.s=1),l=k(e)):l=(i=Math.abs(+K(e)))%2,d=new N(_);;){if(l){if(!(d=d.times(p)).c)break;o?d.c.length>o&&(d.c.length=o):n&&(d=d.mod(t))}if(i){if(0===(i=u(i/2)))break;l=i%2}else if(F(e=e.times(r),e.e+1,1),e.e>14)l=k(e);else{if(0===(i=+K(e)))break;l=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(t))}return n?d:(f&&(d=_.div(d)),t?d.mod(t):o?F(d,R,x,undefined):d)},o.integerValue=function(e){var t=new N(this);return null==e?e=x:w(e,0,8),F(t,t.e+1,e)},o.isEqualTo=o.eq=function(e,t){return 0===m(this,new N(e,t))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(e,t){return m(this,new N(e,t))>0},o.isGreaterThanOrEqualTo=o.gte=function(e,t){return 1===(t=m(this,new N(e,t)))||0===t},o.isInteger=function(){return!!this.c&&b(this.e/h)>this.c.length-2},o.isLessThan=o.lt=function(e,t){return m(this,new N(e,t))<0},o.isLessThanOrEqualTo=o.lte=function(e,t){return-1===(t=m(this,new N(e,t)))||0===t},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(e,t){var r,n,i,o,a=this,s=a.s;if(t=(e=new N(e,t)).s,!s||!t)return new N(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/h,c=e.e/h,f=a.c,d=e.c;if(!u||!c){if(!f||!d)return f?(e.s=-t,e):new N(d?a:NaN);if(!f[0]||!d[0])return d[0]?(e.s=-t,e):new N(f[0]?a:3==x?-0:0)}if(u=b(u),c=b(c),f=f.slice(),s=u-c){for((o=s<0)?(s=-s,i=f):(c=u,i=d),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=f.length)<(t=d.length))?s:t,s=t=0;t<n;t++)if(f[t]!=d[t]){o=f[t]<d[t];break}if(o&&(i=f,f=d,d=i,e.s=-e.s),(t=(n=d.length)-(r=f.length))>0)for(;t--;f[r++]=0);for(t=l-1;n>s;){if(f[--n]<d[n]){for(r=n;r&&!f[--r];f[r]=t);--f[r],f[n]+=l}f[n]-=d[n]}for(;0==f[0];f.splice(0,1),--c);return f[0]?U(e,f,c):(e.s=3==x?-1:1,e.c=[e.e=0],e)},o.modulo=o.mod=function(e,t){var n,i,o=this;return e=new N(e,t),!o.c||!e.s||e.c&&!e.c[0]?new N(NaN):!e.c||o.c&&!o.c[0]?new N(o):(9==P?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,P),(e=o.minus(n.times(e))).c[0]||1!=P||(e.s=o.s),e)},o.multipliedBy=o.times=function(e,t){var r,n,i,o,a,s,u,c,f,d,p,y,g,m,w,k=this,S=k.c,E=(e=new N(e,t)).c;if(!S||!E||!S[0]||!E[0])return!k.s||!e.s||S&&!S[0]&&!E||E&&!E[0]&&!S?e.c=e.e=e.s=null:(e.s*=k.s,S&&E?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=b(k.e/h)+b(e.e/h),e.s*=k.s,(u=S.length)<(d=E.length)&&(g=S,S=E,E=g,i=u,u=d,d=i),i=u+d,g=[];i--;g.push(0));for(m=l,w=v,i=d;--i>=0;){for(r=0,p=E[i]%w,y=E[i]/w|0,o=i+(a=u);o>i;)r=((c=p*(c=S[--a]%w)+(s=y*c+(f=S[a]/w|0)*p)%w*w+g[o]+r)/m|0)+(s/w|0)+y*f,g[o--]=c%m;g[o]=r}return r?++n:g.splice(0,1),U(e,g,n)},o.negated=function(){var e=new N(this);return e.s=-e.s||null,e},o.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new N(e,t)).s,!i||!t)return new N(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/h,a=e.e/h,s=n.c,u=e.c;if(!o||!a){if(!s||!u)return new N(i/0);if(!s[0]||!u[0])return u[0]?e:new N(s[0]?n:0*i)}if(o=b(o),a=b(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/l|0,s[t]=l===s[t]?0:s[t]%l;return i&&(s=[i].concat(s),++a),U(e,s,a)},o.precision=o.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return w(e,1,y),null==t?t=x:w(t,0,8),F(new N(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},o.shiftedBy=function(e){return w(e,-9007199254740991,d),this.times("1e"+e)},o.squareRoot=o.sqrt=function(){var e,t,n,i,o,a=this,s=a.c,u=a.s,c=a.e,f=A+4,l=new N("0.5");if(1!==u||!s||!s[0])return new N(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+K(a)))||u==1/0?(((t=g(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=b((c+1)/2)-(c<0||c%2),n=new N(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new N(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(o=n,n=l.times(o.plus(r(a,o,f,1))),g(o.c).slice(0,u)===(t=g(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(F(n,n.e+A+2,1),e=!n.times(n).eq(a));break}if(!i&&(F(o,o.e+A+2,0),o.times(o).eq(a))){n=o;break}f+=4,u+=4,i=1}return F(n,n.e+A+1,x,e)},o.toExponential=function(e,t){return null!=e&&(w(e,0,y),e++),L(this,e,t,1)},o.toFixed=function(e,t){return null!=e&&(w(e,0,y),e=e+this.e+1),L(this,e,t)},o.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=B;else if("object"!=typeof r)throw Error(c+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,a=n.split("."),s=+r.groupSize,u=+r.secondaryGroupSize,f=r.groupSeparator||"",l=a[0],h=a[1],d=i.s<0,p=d?l.slice(1):l,v=p.length;if(u&&(o=s,s=u,u=o,v-=o),s>0&&v>0){for(o=v%s||s,l=p.substr(0,o);o<v;o+=s)l+=f+p.substr(o,s);u>0&&(l+=f+p.slice(o)),d&&(l="-"+l)}n=h?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):l}return(r.prefix||"")+n+(r.suffix||"")},o.toFraction=function(e){var t,n,i,o,a,s,u,f,l,d,v,y,b=this,m=b.c;if(null!=e&&(!(u=new N(e)).isInteger()&&(u.c||1!==u.s)||u.lt(_)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!m)return new N(b);for(t=new N(_),l=n=new N(_),i=f=new N(_),y=g(m),a=t.e=y.length-b.e-1,t.c[0]=p[(s=a%h)<0?h+s:s],e=!e||u.comparedTo(t)>0?a>0?t:l:u,s=O,O=1/0,u=new N(y),f.c[0]=0;d=r(u,t,0,1),1!=(o=n.plus(d.times(i))).comparedTo(e);)n=i,i=o,l=f.plus(d.times(o=l)),f=o,t=u.minus(d.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),f=f.plus(o.times(l)),n=n.plus(o.times(i)),f.s=l.s=b.s,v=r(l,i,a*=2,x).minus(b).abs().comparedTo(r(f,n,a,x).minus(b).abs())<1?[l,i]:[f,n],O=s,v},o.toNumber=function(){return+K(this)},o.toPrecision=function(e,t){return null!=e&&w(e,1,y),L(this,e,t,2)},o.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=T||o>=M?S(g(r.c),o):E(g(r.c),o,"0"):10===e?t=E(g((r=F(new N(r),A+o+1,x)).c),r.e,"0"):(w(e,2,D.length,"Base"),t=n(E(g(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},o.valueOf=o.toJSON=function(){return K(this)},o._isBigNumber=!0,null!=t&&N.set(t),N}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";var n=Math.exp;e.exports=function(e){if("number"!==typeof e)throw new Error("must provide a timespan to the moving average constructor");if(e<=0)throw new Error("must provide a timespan > 0 to the moving average constructor");var t,r,i=0,o=0,a=0,s={};return s.push=function(s,u){if(r){var c=1-n(-(s-r)/e),f=u-t;t=c*u+(1-c)*t,i=(1-c)*(i+f*(c*f)),o=Math.sqrt(i),a=t+c*f}else t=u;r=s},s.movingAverage=function(){return t},s.variance=function(){return i},s.deviation=function(){return o},s.forecast=function(){return a},s}},function(e,t,r){"use strict";var n=r(29),i=r(0),o=r(6),a=r(8),s=r(9),u=r(22),c=Object.assign(u("libp2p:upgrader"),{error:u("libp2p:upgrader:err")}),f=r(15),l=r(934),h=r(938).Connection,d=r(43),p=r(60).pipe,v=r(941),y=r(50).codes,b=function(){function e(t){var r=t.localPeer,n=t.metrics,i=t.cryptos,o=void 0===i?new Map:i,s=t.muxers,u=void 0===s?new Map:s,c=t.onConnectionEnd,f=void 0===c?function(){}:c,l=t.onConnection,h=void 0===l?function(){}:l;a(this,e),this.localPeer=r,this.metrics=n,this.cryptos=o,this.muxers=u,this.protector=null,this.protocols=new Map,this.onConnection=h,this.onConnectionEnd=f}return s(e,[{key:"upgradeInbound",value:function(){var e=o(i.mark((function e(t){var r,n,o,a,s,u,f,l,h,d,p,y;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.metrics&&(l=v(),u=l.setTarget,f=l.proxy,h=(1e9*Math.random()).toString(36)+Date.now(),u({toB58String:function(){return h}}),t=this.metrics.trackStream({stream:t,remotePeer:f})),c("Starting the inbound connection upgrade"),d=t,!this.protector){e.next=7;break}return e.next=6,this.protector.protect(t);case 6:d=e.sent;case 7:return e.prev=7,e.next=10,this._encryptInbound(this.localPeer,d,this.cryptos);case 10:if(p=e.sent,r=p.conn,n=p.remotePeer,s=p.protocol,!this.muxers.size){e.next=22;break}return e.next=17,this._multiplexInbound(r,this.muxers);case 17:y=e.sent,o=y.stream,a=y.Muxer,e.next=23;break;case 22:o=r;case 23:e.next=31;break;case 25:return e.prev=25,e.t0=e.catch(7),c.error("Failed to upgrade inbound connection",e.t0),e.next=30,t.close(e.t0);case 30:throw e.t0;case 31:return this.metrics&&(this.metrics.updatePlaceholder(f,n),u(n)),c("Successfully upgraded inbound connection"),e.abrupt("return",this._createConnection({cryptoProtocol:s,direction:"inbound",maConn:t,upgradedConn:o,Muxer:a,remotePeer:n}));case 34:case"end":return e.stop()}}),e,this,[[7,25]])})));return function(t){return e.apply(this,arguments)}}()},{key:"upgradeOutbound",value:function(){var e=o(i.mark((function e(t){var r,n,o,a,s,u,l,h,p,b,g,m,w,k;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.remoteAddr.getPeerId()){e.next=3;break}throw f(new Error("outbound connection must have a peer id"),y.ERR_INVALID_MULTIADDR);case 3:if(n=d.createFromB58String(r),this.metrics&&(b=v(),h=b.setTarget,p=b.proxy,g=(1e9*Math.random()).toString(36)+Date.now(),h({toB58String:function(){return g}}),t=this.metrics.trackStream({stream:t,remotePeer:p})),c("Starting the outbound connection upgrade"),m=t,!this.protector){e.next=11;break}return e.next=10,this.protector.protect(t);case 10:m=e.sent;case 11:return e.prev=11,e.next=14,this._encryptOutbound(this.localPeer,m,n,this.cryptos);case 14:if(w=e.sent,o=w.conn,a=w.remotePeer,u=w.protocol,!this.muxers.size){e.next=26;break}return e.next=21,this._multiplexOutbound(o,this.muxers);case 21:k=e.sent,s=k.stream,l=k.Muxer,e.next=27;break;case 26:s=o;case 27:e.next=35;break;case 29:return e.prev=29,e.t0=e.catch(11),c.error("Failed to upgrade outbound connection",e.t0),e.next=34,t.close(e.t0);case 34:throw e.t0;case 35:return this.metrics&&(this.metrics.updatePlaceholder(p,a),h(a)),c("Successfully upgraded outbound connection"),e.abrupt("return",this._createConnection({cryptoProtocol:u,direction:"outbound",maConn:t,upgradedConn:s,Muxer:l,remotePeer:a}));case 38:case"end":return e.stop()}}),e,this,[[11,29]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_createConnection",value:function(e){var t,r,a,s=this,u=e.cryptoProtocol,d=e.direction,v=e.maConn,b=e.upgradedConn,g=e.Muxer,m=e.remotePeer;g&&(t=new g({onStream:function(){var e=o(i.mark((function e(t){var r,o,u,f;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a){e.next=2;break}return e.abrupt("return");case 2:return r=new l.Listener(t),e.prev=3,e.next=6,r.handle(Array.from(s.protocols.keys()));case 6:o=e.sent,u=o.stream,f=o.protocol,c("%s: incoming stream opened on %s",d,f),s.metrics&&s.metrics.trackStream({stream:u,remotePeer:m,protocol:f}),a.addStream(t,{protocol:f}),s._onStream({connection:a,stream:n(n({},t),u),protocol:f}),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),c.error(e.t0);case 18:case"end":return e.stop()}}),e,null,[[3,15]])})));return function(t){return e.apply(this,arguments)}}(),onStreamEnd:function(e){a.removeStream(e.id)}}),r=function(){var e=o(i.mark((function e(r){var o,a,u,h,p;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c("%s: starting new stream on %s",d,r),o=t.newStream(),a=new l.Dialer(o),e.prev=3,e.next=6,a.select(r);case 6:return u=e.sent,h=u.stream,p=u.protocol,s.metrics&&s.metrics.trackStream({stream:h,remotePeer:m,protocol:p}),e.abrupt("return",{stream:n(n({},o),h),protocol:p});case 13:throw e.prev=13,e.t0=e.catch(3),c.error("could not create new stream",e.t0),f(e.t0,y.ERR_UNSUPPORTED_PROTOCOL);case 17:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(t){return e.apply(this,arguments)}}(),p(b,t,b).catch(c.error));var w=v.timeline;v.timeline=new Proxy(w,{set:function(){return a&&"close"===(arguments.length<=1?void 0:arguments[1])&&(arguments.length<=2?void 0:arguments[2])&&!w.close&&o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"open"!==a.stat.status){e.next=4;break}return e.next=4,a.close();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),c.error(e.t0);case 9:return e.prev=9,s.onConnectionEnd(a),e.finish(9);case 12:case"end":return e.stop()}}),e,null,[[0,6,9,12]])})))(),Reflect.set.apply(Reflect,arguments)}}),v.timeline.upgraded=Date.now();var k=function(){throw f(new Error("connection is not multiplexed"),"ERR_CONNECTION_NOT_MULTIPLEXED")};return a=new h({localAddr:v.localAddr,remoteAddr:v.remoteAddr,localPeer:this.localPeer,remotePeer:m,stat:{direction:d,timeline:v.timeline,multiplexer:g&&g.multicodec,encryption:u},newStream:r||k,getStreams:function(){return t?t.streams:k()},close:function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.close();case 2:t&&t.streams.map((function(e){return e.abort()}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),this.onConnection(a),a}},{key:"_onStream",value:function(e){var t=e.connection,r=e.stream,n=e.protocol;this.protocols.get(n)({connection:t,stream:r,protocol:n})}},{key:"_encryptInbound",value:function(){var e=o(i.mark((function e(t,r,o){var a,s,u,h,d,p;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new l.Listener(r),s=Array.from(o.keys()),c("handling inbound crypto protocol selection",s),e.prev=3,e.next=6,a.handle(s);case 6:if(u=e.sent,h=u.stream,d=u.protocol,p=o.get(d),c("encrypting inbound connection..."),p){e.next=13;break}throw new Error("no crypto module found for ".concat(d));case 13:return e.t0=n,e.t1=n,e.t2={},e.next=18,p.secureInbound(t,h);case 18:return e.t3=e.sent,e.t4=(0,e.t1)(e.t2,e.t3),e.t5={},e.t6={protocol:d},e.abrupt("return",(0,e.t0)(e.t4,e.t5,e.t6));case 25:throw e.prev=25,e.t7=e.catch(3),f(e.t7,y.ERR_ENCRYPTION_FAILED);case 28:case"end":return e.stop()}}),e,null,[[3,25]])})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_encryptOutbound",value:function(){var e=o(i.mark((function e(t,r,o,a){var s,u,h,d,p,v;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new l.Dialer(r),u=Array.from(a.keys()),c("selecting outbound crypto protocol",u),e.prev=3,e.next=6,s.select(u);case 6:if(h=e.sent,d=h.stream,p=h.protocol,v=a.get(p),c("encrypting outbound connection to %j",o),v){e.next=13;break}throw new Error("no crypto module found for ".concat(p));case 13:return e.t0=n,e.t1=n,e.t2={},e.next=18,v.secureOutbound(t,d,o);case 18:return e.t3=e.sent,e.t4=(0,e.t1)(e.t2,e.t3),e.t5={},e.t6={protocol:p},e.abrupt("return",(0,e.t0)(e.t4,e.t5,e.t6));case 25:throw e.prev=25,e.t7=e.catch(3),f(e.t7,y.ERR_ENCRYPTION_FAILED);case 28:case"end":return e.stop()}}),e,null,[[3,25]])})));return function(t,r,n,i){return e.apply(this,arguments)}}()},{key:"_multiplexOutbound",value:function(){var e=o(i.mark((function e(t,r){var n,o,a,s,u,h;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new l.Dialer(t),o=Array.from(r.keys()),c("outbound selecting muxer %s",o),e.prev=3,e.next=6,n.select(o);case 6:return a=e.sent,s=a.stream,u=a.protocol,c("%s selected as muxer protocol",u),h=r.get(u),e.abrupt("return",{stream:s,Muxer:h});case 14:throw e.prev=14,e.t0=e.catch(3),f(e.t0,y.ERR_MUXER_UNAVAILABLE);case 17:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_multiplexInbound",value:function(){var e=o(i.mark((function e(t,r){var n,o,a,s,u,h;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new l.Listener(t),o=Array.from(r.keys()),c("inbound handling muxers %s",o),e.prev=3,e.next=6,n.handle(o);case 6:return a=e.sent,s=a.stream,u=a.protocol,h=r.get(u),e.abrupt("return",{stream:s,Muxer:h});case 13:throw e.prev=13,e.t0=e.catch(3),f(e.t0,y.ERR_MUXER_UNAVAILABLE);case 16:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(t,r){return e.apply(this,arguments)}}()}]),e}();e.exports=b},function(e,t,r){"use strict";var n=r(26),i=r(27),o=r(0),a=r(6),s=r(8),u=r(9),c=r(935),f=r(936),l=r(937),h=r(477).PROTOCOL_ID;t.PROTOCOL_ID=h;var d=function(){function e(t){s(this,e),this._stream=t,this._shaken=!1}return u(e,[{key:"_handshake",value:function(){var e=a(o.mark((function e(){var t,r;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._shaken){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,c(this._stream,h);case 4:t=e.sent,r=t.stream,this._stream=r,this._shaken=!0;case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),p=function(e){n(r,e);var t=i(r);function r(){return s(this,r),t.apply(this,arguments)}return u(r,[{key:"select",value:function(e){return c(this._stream,e,this._shaken?null:h)}},{key:"ls",value:function(){var e=a(o.mark((function e(){var t,r,n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._handshake();case 2:return e.next=4,l(this._stream);case 4:return t=e.sent,r=t.stream,n=t.protocols,this._stream=r,e.abrupt("return",n);case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),r}(d);t.Dialer=p;var v=function(e){n(r,e);var t=i(r);function r(){return s(this,r),t.apply(this,arguments)}return u(r,[{key:"handle",value:function(e){return f(this._stream,e)}}]),r}(d);t.Listener=v},function(e,t,r){"use strict";var n=r(0),i=r(21),o=r(48),a=r(6),s=r(22)("mss:select"),u=r(15),c=r(297),f=r(172);e.exports=function(){var e=a(n.mark((function e(t,r,a){var l,h,d,p,v,y,b,g,m,w,k;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Array.isArray(r)?o(r):[r],l=f(t),h=l.reader,d=l.writer,p=l.rest,v=l.stream,y=r.shift(),a?(s('select: write ["%s", "%s"]',a,y),c.writeAll(d,[a,y])):(s('select: write "%s"',y),c.write(d,y)),e.next=6,c.read(h);case 6:if(b=e.sent.toString(),s('select: read "%s"',b),b!==a){e.next=13;break}return e.next=11,c.read(h);case 11:b=e.sent.toString(),s('select: read "%s"',b);case 13:if(b!==y){e.next=16;break}return p(),e.abrupt("return",{stream:v,protocol:y});case 16:g=i(r),e.prev=17,g.s();case 19:if((m=g.n()).done){e.next=32;break}return w=m.value,s('select: write "%s"',w),c.write(d,w),e.next=25,c.read(h);case 25:if(k=e.sent.toString(),s('select: read "%s" for "%s"',k,w),k!==w){e.next=30;break}return p(),e.abrupt("return",{stream:v,protocol:w});case 30:e.next=19;break;case 32:e.next=37;break;case 34:e.prev=34,e.t0=e.catch(17),g.e(e.t0);case 37:return e.prev=37,g.f(),e.finish(37);case 40:throw p(),u(new Error("protocol selection failed"),"ERR_UNSUPPORTED_PROTOCOL");case 42:case"end":return e.stop()}}),e,null,[[17,34,37,40]])})));return function(t,r,n){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(22)("mss:handle"),a=r(79),s=r(297),u=r(172),c=r(477).PROTOCOL_ID;e.exports=function(){var e=i(n.mark((function e(t,r){var i,f,l,h,d,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Array.isArray(r)?r:[r],i=u(t),f=i.writer,l=i.reader,h=i.rest,d=i.stream;case 2:return e.next=5,s.read(l);case 5:if(p=e.sent.toString(),o('read "%s"',p),p!==c){e.next=11;break}return o('respond with "%s" for "%s"',c,p),s.write(f,c),e.abrupt("continue",2);case 11:if(!r.includes(p)){e.next=16;break}return s.write(f,p),o('respond with "%s" for "%s"',p,p),h(),e.abrupt("return",{stream:d,protocol:p});case 16:if("ls"!==p){e.next=20;break}return s.write(f,new a(r.map((function(e){return s.encode(e)})))),o('respond with "%s" for %s',r,p),e.abrupt("continue",2);case 20:s.write(f,"na"),o('respond with "na" for "%s"',p),e.next=2;break;case 24:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(30),a=r(438),s=r(22)("it-multistream-select:ls"),u=r(297),c=r(172),f=r(95),l=r(60);e.exports=function(){var e=i(n.mark((function e(t){var r,h,d,p,v,y,b,g;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c(t),h=r.reader,d=r.writer,p=r.rest,v=r.stream,s('write "ls"'),u.write(d,"ls"),p(),e.next=6,u.read(h);case 6:return y=e.sent,b=a([y]),g=[],e.next=11,l(b,f.decode(),function(){var e=i(n.mark((function e(t){var r,i,a,s,u,c,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!0,i=!1,e.prev=2,s=o(t);case 4:return e.next=6,s.next();case 6:return u=e.sent,r=u.done,e.next=10,u.value;case 10:if(c=e.sent,r){e.next=17;break}f=c,g.push(f.shallowSlice(0,-1).toString());case 14:r=!0,e.next=4;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(2),i=!0,a=e.t0;case 23:if(e.prev=23,e.prev=24,r||null==s.return){e.next=28;break}return e.next=28,s.return();case 28:if(e.prev=28,!i){e.next=31;break}throw a;case 31:return e.finish(28);case 32:return e.finish(23);case 33:case"end":return e.stop()}}),e,null,[[2,19,23,33],[24,,28,32]])})));return function(t){return e.apply(this,arguments)}}());case 11:return e.abrupt("return",{stream:v,protocols:g});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";t.Connection=r(939)},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(29),a=r(8),s=r(9),u=r(43),c=r(42).Multiaddr,f=r(15),l=r(940),h=l.OPEN,d=l.CLOSING,p=l.CLOSED,v=Symbol.for("@libp2p/interface-connection/connection"),y=function(){function e(t){var r=t.localAddr,n=t.remoteAddr,i=t.localPeer,s=t.remotePeer,l=t.newStream,d=t.close,p=t.getStreams,v=t.stat;a(this,e),function(e,t,r,n,i,o,a){if(e&&!c.isMultiaddr(e))throw f(new Error("localAddr must be an instance of multiaddr"),"ERR_INVALID_PARAMETERS");if(!u.isPeerId(t))throw f(new Error("localPeer must be an instance of peer-id"),"ERR_INVALID_PARAMETERS");if(!u.isPeerId(r))throw f(new Error("remotePeer must be an instance of peer-id"),"ERR_INVALID_PARAMETERS");if("function"!==typeof n)throw f(new Error("new stream must be a function"),"ERR_INVALID_PARAMETERS");if("function"!==typeof i)throw f(new Error("close must be a function"),"ERR_INVALID_PARAMETERS");if("function"!==typeof o)throw f(new Error("getStreams must be a function"),"ERR_INVALID_PARAMETERS");if(!a)throw f(new Error("connection metadata object must be provided"),"ERR_INVALID_PARAMETERS");if("inbound"!==a.direction&&"outbound"!==a.direction)throw f(new Error('direction must be "inbound" or "outbound"'),"ERR_INVALID_PARAMETERS");if(!a.timeline)throw f(new Error("connection timeline object must be provided in the stat object"),"ERR_INVALID_PARAMETERS");if(!a.timeline.open)throw f(new Error("connection open timestamp must be provided"),"ERR_INVALID_PARAMETERS");if(!a.timeline.upgraded)throw f(new Error("connection upgraded timestamp must be provided"),"ERR_INVALID_PARAMETERS")}(r,i,s,l,d,p,v),this.id=parseInt(String(1e9*Math.random())).toString(36)+Date.now(),this.localAddr=r,this.remoteAddr=n,this.localPeer=i,this.remotePeer=s,this._stat=o(o({},v),{},{status:h}),this._newStream=l,this._close=d,this._getStreams=p,this.registry=new Map,this.tags=[]}return s(e,[{key:Symbol.toStringTag,get:function(){return"Connection"}},{key:v,get:function(){return!0}},{key:"stat",get:function(){return this._stat}},{key:"streams",get:function(){return this._getStreams()}},{key:"newStream",value:function(){var e=i(n.mark((function e(t){var r,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.stat.status!==d){e.next=2;break}throw f(new Error("the connection is being closed"),"ERR_CONNECTION_BEING_CLOSED");case 2:if(this.stat.status!==p){e.next=4;break}throw f(new Error("the connection is closed"),"ERR_CONNECTION_CLOSED");case 4:return Array.isArray(t)||(t=[t]),e.next=7,this._newStream(t);case 7:return r=e.sent,i=r.stream,o=r.protocol,this.addStream(i,{protocol:o}),e.abrupt("return",{stream:i,protocol:o});case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"addStream",value:function(e,t){var r=t.protocol,n=t.metadata,i=void 0===n?{}:n;this.registry.set(e.id,o({protocol:r},i))}},{key:"removeStream",value:function(e){this.registry.delete(e)}},{key:"close",value:function(){var e=i(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.stat.status!==p){e.next=2;break}return e.abrupt("return");case 2:if(!this._closing){e.next=4;break}return e.abrupt("return",this._closing);case 4:return this.stat.status=d,e.next=7,this._close();case 7:this._closing=e.sent,this._stat.timeline.close=Date.now(),this.stat.status=p;case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}],[{key:"isConnection",value:function(e){return Boolean(e&&e[v])}}]),e}();e.exports=y},function(e,t,r){"use strict";e.exports={OPEN:"open",CLOSING:"closing",CLOSED:"closed"}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}e.exports=function(e){var t=void 0,r=void 0;function i(e){if(!(e instanceof Object))throw new Error('Target "'+e+'" is not an object');r=e}function o(e){Object.keys(e).forEach((function(t){var r=e[t];if("function"!==typeof r)throw new Error('Trap "'+t+": "+r+'" is not a function');if(!Reflect[t])throw new Error('Trap "'+t+": "+r+'" is not a valid trap')})),t=e}i((function(){})),e&&i(e),o(Reflect);var a=new Proxy({},{get:function(e,i){return function(){for(var e=arguments.length,o=Array(e),a=0;a<e;a++)o[a]=arguments[a];return t[i].apply(null,[r].concat(n(o.slice(1))))}}});return{setTarget:i,setHandler:o,getTarget:function(){return r},getHandler:function(){return t},proxy:new Proxy(r,a)}}},function(e,t,r){"use strict";var n=r(48),i=r(8),o=r(9),a=r(26),s=r(27),u=r(22),c=Object.assign(u("libp2p:peer-store:address-book"),{error:u("libp2p:peer-store:address-book:err")}),f=r(15),l=r(42).Multiaddr,h=r(43),d=r(214),p=r(293),v=r(50).codes.ERR_INVALID_PARAMETERS,y=r(212),b=function(e){a(r,e);var t=s(r);function r(e){var n;return i(this,r),(n=t.call(this,{peerStore:e,eventName:"change:multiaddrs",eventProperty:"multiaddrs",eventTransformer:function(e){return e.addresses?e.addresses.map((function(e){return e.multiaddr})):[]}})).data=new Map,n}return o(r,[{key:"consumePeerRecord",value:function(e){var t;try{t=p.createFromProtobuf(e.payload)}catch(a){return c.error("invalid peer record received"),!1}if(!t.peerId.equals(e.peerId))return c("signing key does not match PeerId in the PeerRecord"),!1;if(!t.multiaddrs||!t.multiaddrs.length)return!1;var r=t.peerId,n=r.toB58String(),i=(this.data.get(n)||{record:void 0}).record;if(i&&i.seqNumber>=t.seqNumber)return!1;var o=this._toAddresses(t.multiaddrs,!0);return this._setData(r,{addresses:o,record:{raw:e.marshal(),seqNumber:t.seqNumber}}),c("stored provided peer record for ".concat(n)),!0}},{key:"getRawEnvelope",value:function(e){var t=this.data.get(e.toB58String());if(t&&t.record&&t.record.raw)return t.record.raw}},{key:"getPeerRecord",value:function(e){var t=this.getRawEnvelope(e);if(t)return y.createFromProtobuf(t)}},{key:"set",value:function(e,t){if(!h.isPeerId(e))throw c.error("peerId must be an instance of peer-id to store data"),f(new Error("peerId must be an instance of peer-id"),v);var r=this._toAddresses(t);if(!r.length)return this;var n=e.toB58String(),i=this.data.get(n);if(i&&i.addresses&&i.addresses.length===r.length&&i.addresses.filter((function(e){return r.some((function(t){return e.multiaddr.equals(t.multiaddr)}))})).length===i.addresses.length)return c("the addresses provided to store are equal to the already stored for ".concat(n)),this;return this._setData(e,{addresses:r,record:i&&i.record}),c("stored provided multiaddrs for ".concat(n)),i||this._ps.emit("peer",e),this}},{key:"add",value:function(e,t){if(!h.isPeerId(e))throw c.error("peerId must be an instance of peer-id to store data"),f(new Error("peerId must be an instance of peer-id"),v);var r=this._toAddresses(t),n=e.toB58String();if(!r.length)return this;var i=this.data.get(n);return i&&i.addresses&&(i.addresses.forEach((function(e){r.find((function(t){return t.multiaddr.equals(e.multiaddr)}))||r.push(e)})),i.addresses.length===r.length)?(c("the addresses provided to store are already stored for ".concat(n)),this):(this._setData(e,{addresses:r,record:i&&i.record}),c("added provided multiaddrs for ".concat(n)),i&&i.addresses||this._ps.emit("peer",e),this)}},{key:"get",value:function(e){if(!h.isPeerId(e))throw f(new Error("peerId must be an instance of peer-id"),v);var t=this.data.get(e.toB58String());return t&&t.addresses?n(t.addresses):void 0}},{key:"_toAddresses",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)throw c.error("multiaddrs must be provided to store data"),f(new Error("multiaddrs must be provided"),v);var r=[];return e.forEach((function(e){if(!l.isMultiaddr(e))throw c.error("multiaddr ".concat(e," must be an instance of multiaddr")),f(new Error("multiaddr ".concat(e," must be an instance of multiaddr")),v);r.find((function(t){return t.multiaddr.equals(e)}))||r.push({multiaddr:e,isCertified:t})})),r}},{key:"getMultiaddrsForPeer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};if(!h.isPeerId(e))throw f(new Error("peerId must be an instance of peer-id"),v);var r=this.data.get(e.toB58String());if(r&&r.addresses)return t(r.addresses||[]).map((function(t){var r=t.multiaddr,n=r.getPeerId();return n&&n===e.toB58String()?r:r.encapsulate("/p2p/".concat(e.toB58String()))}))}}]),r}(d);e.exports=b},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(26),a=r(27),s=r(22),u=Object.assign(s("libp2p:peer-store:key-book"),{error:s("libp2p:peer-store:key-book:err")}),c=r(15),f=r(43),l=r(214),h=r(50).codes.ERR_INVALID_PARAMETERS,d=function(e){o(r,e);var t=a(r);function r(e){var i;return n(this,r),(i=t.call(this,{peerStore:e,eventName:"change:pubkey",eventProperty:"pubkey",eventTransformer:function(e){return e.pubKey}})).data=new Map,i}return i(r,[{key:"set",value:function(e,t){if(!f.isPeerId(e))throw u.error("peerId must be an instance of peer-id to store data"),c(new Error("peerId must be an instance of peer-id"),h);var r=e.toB58String();return!this.data.get(r)&&t&&(e.pubKey=t,this._setData(e,e),u("stored provided public key for ".concat(r))),this}},{key:"get",value:function(e){if(!f.isPeerId(e))throw c(new Error("peerId must be an instance of peer-id"),h);var t=this.data.get(e.toB58String());return t?t.pubKey:void 0}}]),r}(l);e.exports=d},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(26),a=r(27),s=r(22),u=Object.assign(s("libp2p:peer-store:proto-book"),{error:s("libp2p:peer-store:proto-book:err")}),c=r(15),f=r(292).equals,l=r(43),h=r(214),d=r(50).codes.ERR_INVALID_PARAMETERS,p=function(e){o(r,e);var t=a(r);function r(e){var i;return n(this,r),(i=t.call(this,{peerStore:e,eventName:"change:metadata",eventProperty:"metadata"})).data=new Map,i}return i(r,[{key:"set",value:function(e,t,r){if(!l.isPeerId(e))throw u.error("peerId must be an instance of peer-id to store data"),c(new Error("peerId must be an instance of peer-id"),d);if("string"!==typeof t||!(r instanceof Uint8Array))throw u.error("valid key and value must be provided to store data"),c(new Error("valid key and value must be provided"),d);return this._setValue(e,t,r),this}},{key:"_setValue",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n.emit,o=void 0===i||i,a=e.toB58String(),s=this.data.get(a)||new Map,c=s.get(t);c&&f(r,c)?u("the metadata provided to store is equal to the already stored for ".concat(a," on ").concat(t)):(s.set(t,r),this.data.set(a,s),o&&this._emit(e,t))}},{key:"get",value:function(e){if(!l.isPeerId(e))throw c(new Error("peerId must be an instance of peer-id"),d);return this.data.get(e.toB58String())}},{key:"getValue",value:function(e,t){if(!l.isPeerId(e))throw c(new Error("peerId must be an instance of peer-id"),d);var r=this.data.get(e.toB58String());return r&&r.get(t)}},{key:"delete",value:function(e){if(!l.isPeerId(e))throw c(new Error("peerId must be an instance of peer-id"),d);return!!this.data.delete(e.toB58String())&&(this._emit(e),!0)}},{key:"deleteValue",value:function(e,t){if(!l.isPeerId(e))throw c(new Error("peerId must be an instance of peer-id"),d);var r=this.data.get(e.toB58String());return!(!r||!r.delete(t))&&(this._emit(e,t),!0)}}]),r}(h);e.exports=p},function(e,t,r){"use strict";var n=r(48),i=r(8),o=r(9),a=r(26),s=r(27),u=r(22),c=Object.assign(u("libp2p:peer-store:proto-book"),{error:u("libp2p:peer-store:proto-book:err")}),f=r(15),l=r(43),h=r(214),d=r(50).codes.ERR_INVALID_PARAMETERS,p=function(e){a(r,e);var t=s(r);function r(e){var n;return i(this,r),(n=t.call(this,{peerStore:e,eventName:"change:protocols",eventProperty:"protocols",eventTransformer:function(e){return Array.from(e)}})).data=new Map,n}return o(r,[{key:"set",value:function(e,t){if(!l.isPeerId(e))throw c.error("peerId must be an instance of peer-id to store data"),f(new Error("peerId must be an instance of peer-id"),d);if(!t)throw c.error("protocols must be provided to store data"),f(new Error("protocols must be provided"),d);var r,i,o=e.toB58String(),a=this.data.get(o),s=new Set(t);return a&&(i=s,(r=a).size===i.size&&n(r).every((function(e){return i.has(e)})))?(c("the protocols provided to store are equal to the already stored for ".concat(o)),this):(this._setData(e,s),c("stored provided protocols for ".concat(o)),this)}},{key:"add",value:function(e,t){if(!l.isPeerId(e))throw c.error("peerId must be an instance of peer-id to store data"),f(new Error("peerId must be an instance of peer-id"),d);if(!t)throw c.error("protocols must be provided to store data"),f(new Error("protocols must be provided"),d);var r=e.toB58String(),i=this.data.get(r)||new Set,o=new Set([].concat(n(i),n(t)));return i.size===o.size?(c("the protocols provided to store are already stored for ".concat(r)),this):(this._setData(e,o),c("added provided protocols for ".concat(r)),this)}},{key:"remove",value:function(e,t){if(!l.isPeerId(e))throw c.error("peerId must be an instance of peer-id to store data"),f(new Error("peerId must be an instance of peer-id"),d);if(!t)throw c.error("protocols must be provided to store data"),f(new Error("protocols must be provided"),d);var r=e.toB58String(),i=this.data.get(r);if(i){var o=new Set(n(i).filter((function(e){return!t.includes(e)})));if(i.size===o.size)return this;this._setData(e,o),c("removed provided protocols for ".concat(r))}return this}}]),r}(h);e.exports=p},function(e,t,r){"use strict";e.exports=function(e,t,r){var n=new e(t,r);return n._subscribeAdapter=n.subscribe,n._unsubscribeAdapter=n.unsubscribe,n.subscribe=function(e,t){t&&n.on(e,t),n._subscribeAdapter(e)},n.unsubscribe=function(e,t){t?n.removeListener(e,t):n.removeAllListeners(e),0===n.listenerCount(e)&&n._unsubscribeAdapter(e)},n}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(61),u=r(26),c=r(27),f=r(30),l=r(22),h=Object.assign(l("libp2p:persistent-peer-store"),{error:l("libp2p:persistent-peer-store:err")}),d=r(470).Key,p=r(42).Multiaddr,v=r(43),y=r(67).base32,b=r(478),g=r(948),m=g.NAMESPACE_ADDRESS,w=g.NAMESPACE_COMMON,k=g.NAMESPACE_KEYS,S=g.NAMESPACE_METADATA,E=g.NAMESPACE_PROTOCOL,_=r(949).Addresses,A=r(950).Protocols,x=function(e){u(r,e);var t=c(r);function r(e){var n,i=e.peerId,a=e.datastore,u=e.threshold,c=void 0===u?5:u;return o(this,r),(n=t.call(this,{peerId:i}))._datastore=a,n._dirtyPeers=new Set,n._dirtyMetadata=new Map,n.threshold=c,n._addDirtyPeer=n._addDirtyPeer.bind(s(n)),n}return a(r,[{key:"start",value:function(){var e=i(n.mark((function e(){var t,r,i,o,a,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h("PeerStore is starting"),this.on("change:protocols",this._addDirtyPeer),this.on("change:multiaddrs",this._addDirtyPeer),this.on("change:pubkey",this._addDirtyPeerKey),this.on("change:metadata",this._addDirtyPeerMetadata),t=!0,r=!1,e.prev=7,o=f(this._datastore.query({prefix:w}));case 9:return e.next=11,o.next();case 11:return a=e.sent,t=a.done,e.next=15,a.value;case 15:if(s=e.sent,t){e.next=23;break}return u=s,e.next=20,this._processDatastoreEntry(u);case 20:t=!0,e.next=9;break;case 23:e.next=29;break;case 25:e.prev=25,e.t0=e.catch(7),r=!0,i=e.t0;case 29:if(e.prev=29,e.prev=30,t||null==o.return){e.next=34;break}return e.next=34,o.return();case 34:if(e.prev=34,!r){e.next=37;break}throw i;case 37:return e.finish(34);case 38:return e.finish(29);case 39:h("PeerStore started");case 40:case"end":return e.stop()}}),e,this,[[7,25,29,39],[30,,34,38]])})));return function(){return e.apply(this,arguments)}}()},{key:"stop",value:function(){var e=i(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h("PeerStore is stopping"),this.removeAllListeners(),e.next=4,this._commitData();case 4:h("PeerStore stopped");case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_addDirtyPeer",value:function(e){var t=e.peerId.toB58String();h("add dirty peer",t),this._dirtyPeers.add(t),this._dirtyPeers.size>=this.threshold&&this._commitData().catch((function(e){h.error("error committing data",e)}))}},{key:"_addDirtyPeerKey",value:function(e){var t=e.peerId;if(!t.hasInlinePublicKey()){var r=t.toB58String();h("add dirty peer key",r),this._dirtyPeers.add(r),this._dirtyPeers.size>=this.threshold&&this._commitData().catch((function(e){h.error("error committing data",e)}))}}},{key:"_addDirtyPeerMetadata",value:function(e){var t=e.peerId,r=e.metadata,n=t.toB58String();h("add dirty metadata peer",n),this._dirtyPeers.add(n);var i=this._dirtyMetadata.get(n)||new Set;i.add(r),this._dirtyMetadata.set(n,i),this._dirtyPeers.size>=this.threshold&&this._commitData().catch((function(e){h.error("error committing data",e)}))}},{key:"_commitData",value:function(){var e=i(n.mark((function e(){var t,r,i,o,a,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t=Array.from(this._dirtyPeers)).length){e.next=3;break}return e.abrupt("return");case 3:for(this._dirtyPeers.clear(),h("create batch commit"),r=this._datastore.batch(),i=0,o=t;i<o.length;i++)a=o[i],s=this.keyBook.data.get(a)||v.createFromB58String(a),this._batchAddressBook(s,r),!s.hasInlinePublicKey()&&this._batchKeyBook(s,r),this._batchMetadataBook(s,r),this._batchProtoBook(s,r);return e.next=9,r.commit();case 9:h("batch committed");case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_batchAddressBook",value:function(e,t){var r=e.toString(),n=new d("".concat(m).concat(r)),i=this.addressBook.data.get(e.toB58String());try{if(!i)return void t.delete(n);var o=_.encode({addrs:i.addresses.map((function(e){return{multiaddr:e.multiaddr.bytes,isCertified:e.isCertified}})),certifiedRecord:i.record?{seq:i.record.seqNumber,raw:i.record.raw}:void 0}).finish();t.put(n,o)}catch(a){h.error(a)}}},{key:"_batchKeyBook",value:function(e,t){var r=e.toString(),n=new d("".concat(k).concat(r));try{if(!e.pubKey)return void t.delete(n);var i=e.marshalPubKey();t.put(n,i)}catch(o){h.error(o)}}},{key:"_batchMetadataBook",value:function(e,t){var r=this,n=e.toString(),i=this._dirtyMetadata.get(e.toB58String())||[];try{i.forEach((function(i){var o=new d("".concat(S).concat(n,"/").concat(i)),a=r.metadataBook.getValue(e,i);a?t.put(o,a):t.delete(o)}))}catch(o){h.error(o)}}},{key:"_batchProtoBook",value:function(e,t){var r=e.toString(),n=new d("".concat(E).concat(r)),i=this.protoBook.get(e);try{if(!i)return void t.delete(n);var o=A.encode({protocols:i}).finish();t.put(n,o)}catch(a){h.error(a)}}},{key:"_processDatastoreEntry",value:function(){var e=i(n.mark((function e(t){var r,i,o,a,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.key,i=t.value,e.prev=1,o=r.toString().split("/"),a=v.createFromBytes(y.decode(o[3])),e.t0=o[2],e.next="addrs"===e.t0?7:"keys"===e.t0?10:"metadata"===e.t0?15:"protos"===e.t0?17:20;break;case 7:return s=_.decode(i),this.addressBook._setData(a,{addresses:s.addrs.map((function(e){return{multiaddr:new p(e.multiaddr),isCertified:Boolean(e.isCertified)}})),record:s.certifiedRecord?{raw:s.certifiedRecord.raw,seqNumber:s.certifiedRecord.seq}:void 0},{emit:!1}),e.abrupt("break",21);case 10:return e.next=12,v.createFromPubKey(i);case 12:return s=e.sent,this.keyBook._setData(s,s,{emit:!1}),e.abrupt("break",21);case 15:return this.metadataBook._setValue(a,o[4],i,{emit:!1}),e.abrupt("break",21);case 17:return s=A.decode(i),this.protoBook._setData(a,new Set(s.protocols),{emit:!1}),e.abrupt("break",21);case 20:h("invalid data persisted for: ",r.toString());case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(1),h.error(e.t1);case 26:case"end":return e.stop()}}),e,this,[[1,23]])})));return function(t){return e.apply(this,arguments)}}()}]),r}(b);e.exports=x},function(e,t,r){"use strict";e.exports.NAMESPACE_COMMON="/peers/",e.exports.NAMESPACE_ADDRESS="/peers/addrs/",e.exports.NAMESPACE_KEYS="/peers/keys/",e.exports.NAMESPACE_METADATA="/peers/metadata/",e.exports.NAMESPACE_PROTOCOL="/peers/protos/"},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-address-book"]||(n.roots["libp2p-address-book"]={});s.Addresses=function(){function e(e){if(this.addrs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.addrs=a.emptyArray,e.prototype.certifiedRecord=null,e.encode=function(e,t){if(t||(t=o.create()),null!=e.addrs&&e.addrs.length)for(var r=0;r<e.addrs.length;++r)s.Addresses.Address.encode(e.addrs[r],t.uint32(10).fork()).ldelim();return null!=e.certifiedRecord&&Object.hasOwnProperty.call(e,"certifiedRecord")&&s.Addresses.CertifiedRecord.encode(e.certifiedRecord,t.uint32(18).fork()).ldelim(),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.Addresses;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.addrs&&n.addrs.length||(n.addrs=[]),n.addrs.push(s.Addresses.Address.decode(e,e.uint32()));break;case 2:n.certifiedRecord=s.Addresses.CertifiedRecord.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.Addresses)return e;var t=new s.Addresses;if(e.addrs){if(!Array.isArray(e.addrs))throw TypeError(".Addresses.addrs: array expected");t.addrs=[];for(var r=0;r<e.addrs.length;++r){if("object"!==typeof e.addrs[r])throw TypeError(".Addresses.addrs: object expected");t.addrs[r]=s.Addresses.Address.fromObject(e.addrs[r])}}if(null!=e.certifiedRecord){if("object"!==typeof e.certifiedRecord)throw TypeError(".Addresses.certifiedRecord: object expected");t.certifiedRecord=s.Addresses.CertifiedRecord.fromObject(e.certifiedRecord)}return t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.addrs=[]),t.defaults&&(r.certifiedRecord=null),e.addrs&&e.addrs.length){r.addrs=[];for(var n=0;n<e.addrs.length;++n)r.addrs[n]=s.Addresses.Address.toObject(e.addrs[n],t)}return null!=e.certifiedRecord&&e.hasOwnProperty("certifiedRecord")&&(r.certifiedRecord=s.Addresses.CertifiedRecord.toObject(e.certifiedRecord,t)),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e.Address=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.multiaddr=a.newBuffer([]),e.prototype.isCertified=!1,e.encode=function(e,t){return t||(t=o.create()),null!=e.multiaddr&&Object.hasOwnProperty.call(e,"multiaddr")&&t.uint32(10).bytes(e.multiaddr),null!=e.isCertified&&Object.hasOwnProperty.call(e,"isCertified")&&t.uint32(16).bool(e.isCertified),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.Addresses.Address;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.multiaddr=e.bytes();break;case 2:n.isCertified=e.bool();break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.Addresses.Address)return e;var t=new s.Addresses.Address;return null!=e.multiaddr&&("string"===typeof e.multiaddr?a.base64.decode(e.multiaddr,t.multiaddr=a.newBuffer(a.base64.length(e.multiaddr)),0):e.multiaddr.length&&(t.multiaddr=e.multiaddr)),null!=e.isCertified&&(t.isCertified=Boolean(e.isCertified)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.multiaddr="":(r.multiaddr=[],t.bytes!==Array&&(r.multiaddr=a.newBuffer(r.multiaddr))),r.isCertified=!1),null!=e.multiaddr&&e.hasOwnProperty("multiaddr")&&(r.multiaddr=t.bytes===String?a.base64.encode(e.multiaddr,0,e.multiaddr.length):t.bytes===Array?Array.prototype.slice.call(e.multiaddr):e.multiaddr),null!=e.isCertified&&e.hasOwnProperty("isCertified")&&(r.isCertified=e.isCertified),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.CertifiedRecord=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.seq=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.raw=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),null!=e.seq&&Object.hasOwnProperty.call(e,"seq")&&t.uint32(8).uint64(e.seq),null!=e.raw&&Object.hasOwnProperty.call(e,"raw")&&t.uint32(18).bytes(e.raw),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.Addresses.CertifiedRecord;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.seq=e.uint64();break;case 2:n.raw=e.bytes();break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.Addresses.CertifiedRecord)return e;var t=new s.Addresses.CertifiedRecord;return null!=e.seq&&(a.Long?(t.seq=a.Long.fromValue(e.seq)).unsigned=!0:"string"===typeof e.seq?t.seq=parseInt(e.seq,10):"number"===typeof e.seq?t.seq=e.seq:"object"===typeof e.seq&&(t.seq=new a.LongBits(e.seq.low>>>0,e.seq.high>>>0).toNumber(!0))),null!=e.raw&&("string"===typeof e.raw?a.base64.decode(e.raw,t.raw=a.newBuffer(a.base64.length(e.raw)),0):e.raw.length&&(t.raw=e.raw)),t},e.toObject=function(e,t){t||(t={});var r={};if(t.defaults){if(a.Long){var n=new a.Long(0,0,!0);r.seq=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.seq=t.longs===String?"0":0;t.bytes===String?r.raw="":(r.raw=[],t.bytes!==Array&&(r.raw=a.newBuffer(r.raw)))}return null!=e.seq&&e.hasOwnProperty("seq")&&("number"===typeof e.seq?r.seq=t.longs===String?String(e.seq):e.seq:r.seq=t.longs===String?a.Long.prototype.toString.call(e.seq):t.longs===Number?new a.LongBits(e.seq.low>>>0,e.seq.high>>>0).toNumber(!0):e.seq),null!=e.raw&&e.hasOwnProperty("raw")&&(r.raw=t.bytes===String?a.base64.encode(e.raw,0,e.raw.length):t.bytes===Array?Array.prototype.slice.call(e.raw):e.raw),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e}(),e.exports=s},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-proto-book"]||(n.roots["libp2p-proto-book"]={});s.Protocols=function(){function e(e){if(this.protocols=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.protocols=a.emptyArray,e.encode=function(e,t){if(t||(t=o.create()),null!=e.protocols&&e.protocols.length)for(var r=0;r<e.protocols.length;++r)t.uint32(10).string(e.protocols[r]);return t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.Protocols;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.protocols&&n.protocols.length||(n.protocols=[]),n.protocols.push(e.string());break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.Protocols)return e;var t=new s.Protocols;if(e.protocols){if(!Array.isArray(e.protocols))throw TypeError(".Protocols.protocols: array expected");t.protocols=[];for(var r=0;r<e.protocols.length;++r)t.protocols[r]=String(e.protocols[r])}return t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.protocols=[]),e.protocols&&e.protocols.length){r.protocols=[];for(var n=0;n<e.protocols.length;++n)r.protocols[n]=e.protocols[n]}return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";var n=r(40),i=r(21),o=r(8),a=r(9),s=r(22),u=Object.assign(s("libp2p:registrar"),{error:s("libp2p:registrar:err")}),c=r(15),f=r(50).codes.ERR_INVALID_PARAMETERS,l=r(952),h=function(){function e(t){var r=t.peerStore,n=t.connectionManager;o(this,e),this.peerStore=r,this.connectionManager=n,this.topologies=new Map,this._handle=void 0,this._onDisconnect=this._onDisconnect.bind(this),this.connectionManager.on("peer:disconnect",this._onDisconnect)}return a(e,[{key:"handle",get:function(){return this._handle},set:function(e){this._handle=e}},{key:"getConnection",value:function(e){return this.connectionManager.get(e)}},{key:"register",value:function(e){if(!l.isTopology(e))throw u.error("topology must be an instance of interfaces/topology"),c(new Error("topology must be an instance of interfaces/topology"),f);var t=(1e9*Math.random()).toString(36)+Date.now();return this.topologies.set(t,e),e.registrar=this,t}},{key:"unregister",value:function(e){return this.topologies.delete(e)}},{key:"_onDisconnect",value:function(e){var t,r=i(this.topologies);try{for(r.s();!(t=r.n()).done;){n(t.value,2)[1].disconnect(e.remotePeer)}}catch(o){r.e(o)}finally{r.f()}}}]),e}();e.exports=h},function(e,t,r){"use strict";var n=r(8),i=r(9),o=function(){},a=Symbol.for("@libp2p/js-interfaces/topology"),s=function(){function e(t){var r=t.min,i=void 0===r?0:r,a=t.max,s=void 0===a?1/0:a,u=t.handlers,c=void 0===u?{}:u;n(this,e),this.min=i,this.max=s,this._onConnect=c.onConnect||o,this._onDisconnect=c.onDisconnect||o,this.peers=new Set}return i(e,[{key:Symbol.toStringTag,get:function(){return"Topology"}},{key:a,get:function(){return!0}},{key:"registrar",set:function(e){this._registrar=e}},{key:"disconnect",value:function(e){this._onDisconnect(e)}}],[{key:"isTopology",value:function(e){return Boolean(e&&e[a])}}]),e}();e.exports=s},function(e,t,r){"use strict";e.exports={PROTOCOL:"/ipfs/ping/1.0.0",PING_LENGTH:32,PROTOCOL_VERSION:"1.0.0",PROTOCOL_NAME:"ping"}},function(e,t,r){"use strict";var n=r(40),i=r(21),o=r(0),a=r(6),s=r(29),u=r(8),c=r(9),f=r(22),l=Object.assign(f("libp2p:identify"),{error:f("libp2p:identify:err")}),h=r(15),d=r(95),p=r(60).pipe,v=r(312),y=v.collect,b=v.take,g=v.consume,m=r(175).fromString,w=r(43),k=r(42).Multiaddr,S=r(281).toBuffer,E=r(955),_=r(212),A=r(293),x=r(456),T=x.MULTICODEC_IDENTIFY,M=x.MULTICODEC_IDENTIFY_PUSH,C=x.IDENTIFY_PROTOCOL_VERSION,O=x.MULTICODEC_IDENTIFY_PROTOCOL_NAME,I=x.MULTICODEC_IDENTIFY_PUSH_PROTOCOL_NAME,P=x.MULTICODEC_IDENTIFY_PROTOCOL_VERSION,R=x.MULTICODEC_IDENTIFY_PUSH_PROTOCOL_VERSION,B=r(50).codes,D=function(){function e(t){var r=this,n=t.libp2p;u(this,e),this._libp2p=n,this.peerStore=n.peerStore,this.addressManager=n.addressManager,this.connectionManager=n.connectionManager,this.peerId=n.peerId,this.handleMessage=this.handleMessage.bind(this);var i=e.getProtocolStr(n);this.identifyProtocolStr=i.identifyProtocolStr,this.identifyPushProtocolStr=i.identifyPushProtocolStr,this._host=s({protocolVersion:"".concat(n._config.protocolPrefix,"/").concat(C)},n._options.host),this.peerStore.metadataBook.set(this.peerId,"AgentVersion",m(this._host.agentVersion)),this.peerStore.metadataBook.set(this.peerId,"ProtocolVersion",m(this._host.protocolVersion)),this.connectionManager.on("peer:connect",(function(e){r.identify(e).catch(l.error)})),this.peerStore.on("change:multiaddrs",(function(e){e.peerId.toString()===r.peerId.toString()&&r.pushToPeerStore()})),this.peerStore.on("change:protocols",(function(e){e.peerId.toString()===r.peerId.toString()&&r.pushToPeerStore()}))}return c(e,[{key:"push",value:function(){var e=a(o.mark((function e(t){var r,n,i,s,u=this;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.peerStore.addressBook.getRawEnvelope(this.peerId);case 2:return r=e.sent,n=this._libp2p.multiaddrs.map((function(e){return e.bytes})),i=this.peerStore.protoBook.get(this.peerId)||[],s=t.map(function(){var e=a(o.mark((function e(t){var a,s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.newStream(u.identifyPushProtocolStr);case 3:return a=e.sent,s=a.stream,e.next=7,p([E.Identify.encode({listenAddrs:n,signedPeerRecord:r,protocols:i}).finish()],d.encode(),s,g);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),l.error("could not push identify update to peer",e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",Promise.all(s));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"pushToPeerStore",value:function(){if(this._libp2p.isStarted()){var e,t,r=[],n=i(this.peerStore.peers.values());try{for(n.s();!(t=n.n()).done;){var o=t.value;o.protocols.includes(this.identifyPushProtocolStr)&&(e=this.connectionManager.get(o.id))&&r.push(e)}}catch(a){n.e(a)}finally{n.f()}this.push(r)}}},{key:"identify",value:function(){var t=a(o.mark((function t(r){var i,a,s,u,c,f,v,g,x,T,M,C,O,I,P;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.newStream(this.identifyProtocolStr);case 2:return i=t.sent,a=i.stream,t.next=6,p([],a,d.decode(),b(1),S,y);case 6:if(s=t.sent,u=n(s,1),c=u[0]){t.next=11;break}throw h(new Error("No data could be retrieved"),B.ERR_CONNECTION_ENDED);case 11:t.prev=11,f=E.Identify.decode(c),t.next=18;break;case 15:throw t.prev=15,t.t0=t.catch(11),h(t.t0,B.ERR_INVALID_MESSAGE);case 18:return g=(v=f).publicKey,x=v.listenAddrs,T=v.protocols,M=v.observedAddr,C=v.signedPeerRecord,t.next=21,w.createFromPubKey(g);case 21:if(O=t.sent,r.remotePeer.toB58String()===O.toB58String()){t.next=24;break}throw h(new Error("identified peer does not match the expected peer"),B.ERR_INVALID_PEER);case 24:return I=e.getCleanMultiaddr(M),t.prev=25,t.next=28,_.openAndCertify(C,A.DOMAIN);case 28:if(P=t.sent,!this.peerStore.addressBook.consumePeerRecord(P)){t.next=34;break}return this.peerStore.protoBook.set(O,T),this.peerStore.metadataBook.set(O,"AgentVersion",m(f.agentVersion)),this.peerStore.metadataBook.set(O,"ProtocolVersion",m(f.protocolVersion)),t.abrupt("return");case 34:t.next=39;break;case 36:t.prev=36,t.t1=t.catch(25),l("received invalid envelope, discard it and fallback to listenAddrs is available",t.t1);case 39:try{this.peerStore.addressBook.set(O,x.map((function(e){return new k(e)})))}catch(o){l.error("received invalid addrs",o)}this.peerStore.protoBook.set(O,T),this.peerStore.metadataBook.set(O,"AgentVersion",m(f.agentVersion)),this.peerStore.metadataBook.set(O,"ProtocolVersion",m(f.protocolVersion)),l("received observed address of %s",I);case 44:case"end":return t.stop()}}),t,this,[[11,15],[25,36]])})));return function(e){return t.apply(this,arguments)}}()},{key:"handleMessage",value:function(e){var t=e.connection,r=e.stream,n=e.protocol;switch(n){case this.identifyProtocolStr:return this._handleIdentify({connection:t,stream:r});case this.identifyPushProtocolStr:return this._handlePush({connection:t,stream:r});default:l.error("cannot handle unknown protocol %s",n)}}},{key:"_handleIdentify",value:function(){var e=a(o.mark((function e(t){var r,n,i,a,s,u;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.connection,n=t.stream,i=new Uint8Array(0),this.peerId.pubKey&&(i=this.peerId.pubKey.bytes),e.next=5,this.peerStore.addressBook.getRawEnvelope(this.peerId);case 5:return a=e.sent,s=this.peerStore.protoBook.get(this.peerId)||[],u=E.Identify.encode({protocolVersion:this._host.protocolVersion,agentVersion:this._host.agentVersion,publicKey:i,listenAddrs:this._libp2p.multiaddrs.map((function(e){return e.bytes})),signedPeerRecord:a,observedAddr:r.remoteAddr.bytes,protocols:s}).finish(),e.prev=8,e.next=11,p([u],d.encode(),n,g);case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(8),l.error("could not respond to identify request",e.t0);case 16:case"end":return e.stop()}}),e,this,[[8,13]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_handlePush",value:function(){var e=a(o.mark((function e(t){var r,i,a,s,u,c,f,h;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.connection,i=t.stream,e.prev=1,e.next=4,p([],i,d.decode(),b(1),S,y);case 4:s=e.sent,u=n(s,1),c=u[0],a=E.Identify.decode(c),e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(1),e.abrupt("return",l.error("received invalid message",e.t0));case 13:return f=r.remotePeer,e.prev=14,e.next=17,_.openAndCertify(a.signedPeerRecord,A.DOMAIN);case 17:if(h=e.sent,!this.peerStore.addressBook.consumePeerRecord(h)){e.next=21;break}return this.peerStore.protoBook.set(f,a.protocols),e.abrupt("return");case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(14),l("received invalid envelope, discard it and fallback to listenAddrs is available",e.t1);case 26:try{this.peerStore.addressBook.set(f,a.listenAddrs.map((function(e){return new k(e)})))}catch(o){l.error("received invalid addrs",o)}this.peerStore.protoBook.set(f,a.protocols);case 28:case"end":return e.stop()}}),e,this,[[1,10],[14,23]])})));return function(t){return e.apply(this,arguments)}}()}],[{key:"getProtocolStr",value:function(e){return{identifyProtocolStr:"/".concat(e._config.protocolPrefix,"/").concat(O,"/").concat(P),identifyPushProtocolStr:"/".concat(e._config.protocolPrefix,"/").concat(I,"/").concat(R)}}},{key:"getCleanMultiaddr",value:function(e){if(e&&e.length>0)try{return new k(e)}catch(t){return null}return null}}]),e}(),N={IDENTIFY:T,IDENTIFY_PUSH:M};D.multicodecs=N,D.Messsage=E,e.exports=D},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-identify"]||(n.roots["libp2p-identify"]={});s.Identify=function(){function e(e){if(this.listenAddrs=[],this.protocols=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.protocolVersion="",e.prototype.agentVersion="",e.prototype.publicKey=a.newBuffer([]),e.prototype.listenAddrs=a.emptyArray,e.prototype.observedAddr=a.newBuffer([]),e.prototype.protocols=a.emptyArray,e.prototype.signedPeerRecord=a.newBuffer([]),e.encode=function(e,t){if(t||(t=o.create()),null!=e.publicKey&&Object.hasOwnProperty.call(e,"publicKey")&&t.uint32(10).bytes(e.publicKey),null!=e.listenAddrs&&e.listenAddrs.length)for(var r=0;r<e.listenAddrs.length;++r)t.uint32(18).bytes(e.listenAddrs[r]);if(null!=e.protocols&&e.protocols.length)for(r=0;r<e.protocols.length;++r)t.uint32(26).string(e.protocols[r]);return null!=e.observedAddr&&Object.hasOwnProperty.call(e,"observedAddr")&&t.uint32(34).bytes(e.observedAddr),null!=e.protocolVersion&&Object.hasOwnProperty.call(e,"protocolVersion")&&t.uint32(42).string(e.protocolVersion),null!=e.agentVersion&&Object.hasOwnProperty.call(e,"agentVersion")&&t.uint32(50).string(e.agentVersion),null!=e.signedPeerRecord&&Object.hasOwnProperty.call(e,"signedPeerRecord")&&t.uint32(66).bytes(e.signedPeerRecord),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.Identify;e.pos<r;){var o=e.uint32();switch(o>>>3){case 5:n.protocolVersion=e.string();break;case 6:n.agentVersion=e.string();break;case 1:n.publicKey=e.bytes();break;case 2:n.listenAddrs&&n.listenAddrs.length||(n.listenAddrs=[]),n.listenAddrs.push(e.bytes());break;case 4:n.observedAddr=e.bytes();break;case 3:n.protocols&&n.protocols.length||(n.protocols=[]),n.protocols.push(e.string());break;case 8:n.signedPeerRecord=e.bytes();break;default:e.skipType(7&o)}}return n},e.fromObject=function(e){if(e instanceof s.Identify)return e;var t=new s.Identify;if(null!=e.protocolVersion&&(t.protocolVersion=String(e.protocolVersion)),null!=e.agentVersion&&(t.agentVersion=String(e.agentVersion)),null!=e.publicKey&&("string"===typeof e.publicKey?a.base64.decode(e.publicKey,t.publicKey=a.newBuffer(a.base64.length(e.publicKey)),0):e.publicKey.length&&(t.publicKey=e.publicKey)),e.listenAddrs){if(!Array.isArray(e.listenAddrs))throw TypeError(".Identify.listenAddrs: array expected");t.listenAddrs=[];for(var r=0;r<e.listenAddrs.length;++r)"string"===typeof e.listenAddrs[r]?a.base64.decode(e.listenAddrs[r],t.listenAddrs[r]=a.newBuffer(a.base64.length(e.listenAddrs[r])),0):e.listenAddrs[r].length&&(t.listenAddrs[r]=e.listenAddrs[r])}if(null!=e.observedAddr&&("string"===typeof e.observedAddr?a.base64.decode(e.observedAddr,t.observedAddr=a.newBuffer(a.base64.length(e.observedAddr)),0):e.observedAddr.length&&(t.observedAddr=e.observedAddr)),e.protocols){if(!Array.isArray(e.protocols))throw TypeError(".Identify.protocols: array expected");t.protocols=[];for(r=0;r<e.protocols.length;++r)t.protocols[r]=String(e.protocols[r])}return null!=e.signedPeerRecord&&("string"===typeof e.signedPeerRecord?a.base64.decode(e.signedPeerRecord,t.signedPeerRecord=a.newBuffer(a.base64.length(e.signedPeerRecord)),0):e.signedPeerRecord.length&&(t.signedPeerRecord=e.signedPeerRecord)),t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.listenAddrs=[],r.protocols=[]),t.defaults&&(t.bytes===String?r.publicKey="":(r.publicKey=[],t.bytes!==Array&&(r.publicKey=a.newBuffer(r.publicKey))),t.bytes===String?r.observedAddr="":(r.observedAddr=[],t.bytes!==Array&&(r.observedAddr=a.newBuffer(r.observedAddr))),r.protocolVersion="",r.agentVersion="",t.bytes===String?r.signedPeerRecord="":(r.signedPeerRecord=[],t.bytes!==Array&&(r.signedPeerRecord=a.newBuffer(r.signedPeerRecord)))),null!=e.publicKey&&e.hasOwnProperty("publicKey")&&(r.publicKey=t.bytes===String?a.base64.encode(e.publicKey,0,e.publicKey.length):t.bytes===Array?Array.prototype.slice.call(e.publicKey):e.publicKey),e.listenAddrs&&e.listenAddrs.length){r.listenAddrs=[];for(var n=0;n<e.listenAddrs.length;++n)r.listenAddrs[n]=t.bytes===String?a.base64.encode(e.listenAddrs[n],0,e.listenAddrs[n].length):t.bytes===Array?Array.prototype.slice.call(e.listenAddrs[n]):e.listenAddrs[n]}if(e.protocols&&e.protocols.length){r.protocols=[];for(n=0;n<e.protocols.length;++n)r.protocols[n]=e.protocols[n]}return null!=e.observedAddr&&e.hasOwnProperty("observedAddr")&&(r.observedAddr=t.bytes===String?a.base64.encode(e.observedAddr,0,e.observedAddr.length):t.bytes===Array?Array.prototype.slice.call(e.observedAddr):e.observedAddr),null!=e.protocolVersion&&e.hasOwnProperty("protocolVersion")&&(r.protocolVersion=e.protocolVersion),null!=e.agentVersion&&e.hasOwnProperty("agentVersion")&&(r.agentVersion=e.agentVersion),null!=e.signedPeerRecord&&e.hasOwnProperty("signedPeerRecord")&&(r.signedPeerRecord=t.bytes===String?a.base64.encode(e.signedPeerRecord,0,e.signedPeerRecord.length):t.bytes===Array?Array.prototype.slice.call(e.signedPeerRecord):e.signedPeerRecord),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";var n=r(0),i=r(21),o=r(6),a=r(957),s=r(8),u=r(9),c=["peerId","addressManager","transportManager"],f=r(959),l=r(22),h=r(960).promisify,d=r(42).Multiaddr,p=Object.assign(l("libp2p:nat"),{error:l("libp2p:nat:err")}),v=r(961).isBrowser,y=r(962),b=r(459),g=r(457),m=r(15),w=r(50).codes.ERR_INVALID_PARAMETERS,k=r(966),S=7200;function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1024,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:65535;return Math.floor(Math.random()*(t-e+1)+e)}var _=function(){function e(t){var r=t.peerId,n=t.addressManager,i=t.transportManager,o=a(t,c);if(s(this,e),this._peerId=r,this._addressManager=n,this._transportManager=i,this._enabled=o.enabled,this._externalIp=o.externalIp,this._options={description:o.description||"".concat(g.name,"@").concat(g.version," ").concat(this._peerId),ttl:o.ttl||S,autoUpdate:o.keepAlive||!0,gateway:o.gateway,enablePMP:Boolean(o.pmp&&o.pmp.enabled)},this._options.ttl<S)throw m(new Error("NatManager ttl should be at least ".concat(S," seconds")),w)}return u(e,[{key:"start",value:function(){!v&&this._enabled&&this._start().catch((function(e){p.error(e)}))}},{key:"_start",value:function(){var e=o(n.mark((function e(){var t,r,o,a,s,u,c,f,l,h,v,y;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this._transportManager.getAddrs(),r=i(t),e.prev=2,r.s();case 4:if((o=r.n()).done){e.next=29;break}if(a=o.value,s=a.toOptions(),u=s.family,c=s.host,f=s.port,l=s.transport,a.isThinWaistAddress()&&"tcp"===l){e.next=9;break}return e.abrupt("continue",27);case 9:if(!k(a)){e.next=11;break}return e.abrupt("continue",27);case 11:if(4===u){e.next=13;break}return e.abrupt("continue",27);case 13:if(h=this._getClient(),e.t0=this._externalIp,e.t0){e.next=19;break}return e.next=18,h.externalIp();case 18:e.t0=e.sent;case 19:if(v=e.t0,!b(v)){e.next=22;break}throw new Error("".concat(v," is private - please set config.nat.externalIp to an externally routable IP or ensure you are not behind a double NAT"));case 22:return y=E(),p("opening uPnP connection from ".concat(v,":").concat(y," to ").concat(c,":").concat(f)),e.next=26,h.map({publicPort:y,privatePort:f,protocol:l.toUpperCase()});case 26:this._addressManager.addObservedAddr(d.fromNodeAddress({family:4,address:v,port:y},l));case 27:e.next=4;break;case 29:e.next=34;break;case 31:e.prev=31,e.t1=e.catch(2),r.e(e.t1);case 34:return e.prev=34,r.f(),e.finish(34);case 37:case"end":return e.stop()}}),e,this,[[2,31,34,37]])})));return function(){return e.apply(this,arguments)}}()},{key:"_getClient",value:function(){if(this._client)return this._client;var e=new f(this._options),t=h(e.map.bind(e)),r=h(e.destroy.bind(e)),n=h(e.externalIp.bind(e));return this._client={map:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return y((function(){return t.apply(void 0,r)}),{onFailedAttempt:p.error,unref:!0})},destroy:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y((function(){return r.apply(void 0,t)}),{onFailedAttempt:p.error,unref:!0})},externalIp:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return y((function(){return n.apply(void 0,t)}),{onFailedAttempt:p.error,unref:!0})}},this._client}},{key:"stop",value:function(){var e=o(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!v&&this._client){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this._client.destroy();case 5:this._client=null,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),p.error(e.t0);case 11:case"end":return e.stop()}}),e,this,[[2,8]])})));return function(){return e.apply(this,arguments)}}()}]),e}();e.exports=_},function(e,t,r){var n=r(958);e.exports=function(e,t){if(null==e)return{};var r,i,o=n(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promisify=i;var n="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__";function i(e){if("function"!==typeof e)throw new TypeError("Argument to promisify must be a function");var t=e[n],r=i.Promise||Promise;if("function"!==typeof r)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return new r((function(r,i){o.push((function(e){if(e)return i(e);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];if(1===o.length||!t)return r(o[0]);var s={};o.forEach((function(e,r){var n=t[r];n&&(s[n]=e)})),r(s)})),e.apply(n,o)}))}}i.argumentNames=n,i.Promise=void 0},function(e,t,r){"use strict";(function(t){var n=r(480),i="object"===typeof window&&"object"===typeof document&&9===document.nodeType,o=n(),a=i&&!o,s=o&&!i,u=o&&i,c="undefined"!==typeof t&&"undefined"!==typeof t.release&&"node"===t.release.name&&!o,f="function"===typeof importScripts&&"undefined"!==typeof self&&"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,l="undefined"!==typeof t&&!1;e.exports={isTest:l,isElectron:o,isElectronMain:s,isElectronRenderer:u,isNode:c,isBrowser:a,isWebWorker:f,isEnvWithDom:i}}).call(this,r(39))},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(29),a=r(8),s=r(26),u=r(27),c=r(93),f=r(963),l=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],h=function(e){s(r,e);var t=u(r);function r(e){var n;(a(this,r),n=t.call(this),e instanceof Error)?(n.originalError=e,e=e.message):(n.originalError=new Error(e),n.originalError.stack=n.stack);return n.name="AbortError",n.message=e,n}return r}(c(Error)),d=function(e,t,r){var n=r.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=n,e},p=function(e,t){return new Promise((function(r,a){t=o({onFailedAttempt:function(){},retries:10},t);var s=f.operation(t);s.attempt(function(){var o=i(n.mark((function i(o){return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.t0=r,n.next=4,e(o);case 4:n.t1=n.sent,(0,n.t0)(n.t1),n.next=34;break;case 8:if(n.prev=8,n.t2=n.catch(0),n.t2 instanceof Error){n.next=13;break}return a(new TypeError('Non-error was thrown: "'.concat(n.t2,'". You should only throw errors.'))),n.abrupt("return");case 13:if(!(n.t2 instanceof h)){n.next=18;break}s.stop(),a(n.t2.originalError),n.next=34;break;case 18:if(!(n.t2 instanceof TypeError)||(i=n.t2.message,l.includes(i))){n.next=23;break}s.stop(),a(n.t2),n.next=34;break;case 23:return d(n.t2,o,t),n.prev=24,n.next=27,t.onFailedAttempt(n.t2);case 27:n.next=33;break;case 29:return n.prev=29,n.t3=n.catch(24),a(n.t3),n.abrupt("return");case 33:s.retry(n.t2)||a(s.mainError());case 34:case"end":return n.stop()}var i}),i,null,[[0,8],[24,29]])})));return function(e){return o.apply(this,arguments)}}())}))};e.exports=p,e.exports.default=p,e.exports.AbortError=h},function(e,t,r){e.exports=r(964)},function(e,t,r){var n=r(965);t.operation=function(e){var r=t.timeouts(e);return new n(r,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})},t.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],i=0;i<t.retries;i++)n.push(this.createTimeout(i,t));return e&&e.forever&&!n.length&&n.push(this.createTimeout(i,t)),n.sort((function(e,t){return e-t})),n},t.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1,n=Math.round(r*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return n=Math.min(n,t.maxTimeout)},t.wrap=function(e,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var i in n=[],e)"function"===typeof e[i]&&n.push(i);for(var o=0;o<n.length;o++){var a=n[o],s=e[a];e[a]=function(n){var i=t.operation(r),o=Array.prototype.slice.call(arguments,1),a=o.pop();o.push((function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),a.apply(this,arguments))})),i.attempt((function(){n.apply(e,o)}))}.bind(e,s),e[a].options=r}}},function(e,t){function r(e,t){"boolean"===typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(void 0===r){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1)}var n=this;return this._timer=setTimeout((function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout((function(){n._operationTimeoutCb(n._attempts)}),n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)}),r),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){r._operationTimeoutCb()}),r._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},r.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},r.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,r=0,n=0;n<this._errors.length;n++){var i=this._errors[n],o=i.message,a=(e[o]||0)+1;e[o]=a,a>=r&&(t=i,r=a)}return t}},function(e,t,r){"use strict";var n=r(967);e.exports=function(e){var t=e.nodeAddress().address;return n(t)}},function(e,t,r){"use strict";e.exports=function(e){return/^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^::1$/.test(e)}},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(26),a=r(27),s=r(969),u=r(42).Multiaddr,c=r(294),f=r(57).EventEmitter,l=r(22),h=Object.assign(l("libp2p:bootstrap"),{error:l("libp2p:bootstrap:error")}),d=function(e){o(r,e);var t=a(r);function r(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{list:[]};if(n(this,r),!i.list||!i.list.length)throw new Error("Bootstrap requires a list of peer addresses");return(e=t.call(this))._list=i.list,e._interval=i.interval||1e4,e._timer=null,e}return i(r,[{key:"start",value:function(){var e=this;this._timer||(this._timer=setInterval((function(){return e._discoverBootstrapPeers()}),this._interval),h("Starting bootstrap node discovery"),this._discoverBootstrapPeers())}},{key:"_discoverBootstrapPeers",value:function(){var e=this;this._timer&&this._list.forEach((function(t){if(!c.P2P.matches(t))return h.error("Invalid multiaddr");var r=new u(t),n=r.getPeerId();if(n){var i=s.createFromB58String(n);try{e.emit("peer",{id:i,multiaddrs:[r]})}catch(o){h.error("Invalid bootstrap peer id",o)}}else h.error("Invalid bootstrap multiaddr without peer id")}))}},{key:"stop",value:function(){this._timer&&clearInterval(this._timer),this._timer=null}}]),r}(f);(e.exports=d).tag="bootstrap"},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(29),u=r(90).CID,c=r(67),f=r(162),l=r(58),h=r(63),d=r(58).base58btc,p=r(67).base32,v=r(161).base16,y=r(88),b=r(970),g=r(170),m=r(986).PeerIdProto,w=r(178).equals,k=r(119).fromString,S=r(120).toString,E=r(89).identity,_=s(s(s(s({},c),f),l),h),A=Object.keys(_).reduce((function(e,t){return e.or(_[t])}),p.decoder),x=g(function(){function e(t,r,n){if(o(this,e),!(t instanceof Uint8Array))throw new Error("invalid id provided");if(r&&n&&!w(r.public.bytes,n.bytes))throw new Error("inconsistent arguments");this._id=t,this._idB58String=d.encode(this.id).substring(1),this._privKey=r,this._pubKey=n}return a(e,[{key:"id",get:function(){return this._id},set:function(e){throw new Error("Id is immutable")}},{key:"privKey",get:function(){return this._privKey},set:function(e){this._privKey=e}},{key:"pubKey",get:function(){if(this._pubKey)return this._pubKey;if(this._privKey)return this._privKey.public;try{var e=y.decode(this.id);e.code===E.code&&(this._pubKey=b.unmarshalPublicKey(e.digest))}catch(t){}return this._pubKey},set:function(e){this._pubKey=e}},{key:"marshalPubKey",value:function(){if(this.pubKey)return b.marshalPublicKey(this.pubKey)}},{key:"marshalPrivKey",value:function(){if(this.privKey)return b.marshalPrivateKey(this.privKey)}},{key:"marshal",value:function(e){return m.encode({id:this.toBytes(),pubKey:this.marshalPubKey(),privKey:e?null:this.marshalPrivKey()}).finish()}},{key:"toPrint",value:function(){var e=this.toB58String();e.startsWith("Qm")&&(e=e.slice(2));var t=6;return e.length<t&&(t=e.length),"<peer.ID "+e.substr(0,t)+">"}},{key:"toJSON",value:function(){return{id:this.toB58String(),privKey:O(this.marshalPrivKey()),pubKey:O(this.marshalPubKey())}}},{key:"toHexString",value:function(){return v.encode(this.id).substring(1)}},{key:"toBytes",value:function(){return this.id}},{key:"toB58String",value:function(){return this._idB58String}},{key:"toString",value:function(){if(!this._idCIDString){var e=u.createV1(114,y.decode(this.id));Object.defineProperty(this,"_idCIDString",{value:e.toString(),enumerable:!1})}return this._idCIDString}},{key:"equals",value:function(e){if(e instanceof Uint8Array)return w(this.id,e);if(e.id)return w(this.id,e.id);throw new Error("not valid Id")}},{key:"isEqual",value:function(e){return this.equals(e)}},{key:"isValid",value:function(){return Boolean(this.privKey&&this.privKey.public&&this.privKey.public.bytes&&this.pubKey.bytes instanceof Uint8Array&&w(this.privKey.public.bytes,this.pubKey.bytes))}},{key:"hasInlinePublicKey",value:function(){try{if(y.decode(this.id).code===E.code)return!0}catch(e){}return!1}}]),e}(),{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"});t=e.exports=x;var T=function(e){return e.bytes.length<=42?y.create(E.code,e.bytes).bytes:e.hash()},M=function(){var e=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T(r);case 2:return i=e.sent,e.abrupt("return",new x(i,t,r));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.create=function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=t||{}).bits=t.bits||2048,t.keyType=t.keyType||"RSA",e.next=5,b.generateKeyPair(t.keyType,t.bits);case 5:return r=e.sent,e.abrupt("return",M(r,r.public));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromHexString=function(e){return new x(v.decode("f"+e))},t.createFromBytes=function(e){try{var r=u.decode(e);if(!C(r))throw new Error("Supplied PeerID CID is invalid");return t.createFromCID(r)}catch(n){if(y.decode(e).code!==E.code)throw new Error("Supplied PeerID CID is invalid");return new x(e)}},t.createFromB58String=function(e){return t.createFromBytes(d.decode("z"+e))};var C=function(e){return 114===e.code||112===e.code};function O(e){if(e)return S(e,"base64pad")}t.createFromCID=function(e){if(!(e=u.asCID(e))||!C(e))throw new Error("Supplied PeerID CID is invalid");return new x(e.multihash.bytes)},t.createFromPubKey=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof(r=t)&&(r=k(t,"base64pad")),r instanceof Uint8Array){e.next=4;break}throw new Error("Supplied key is neither a base64 string nor a Uint8Array");case 4:return e.next=6,b.unmarshalPublicKey(r);case 6:return i=e.sent,e.abrupt("return",M(void 0,i));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromPrivKey=function(){var e=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t&&(t=k(t,"base64pad")),t instanceof Uint8Array){e.next=3;break}throw new Error("Supplied key is neither a base64 string nor a Uint8Array");case 3:return e.next=5,b.unmarshalPrivateKey(t);case 5:return r=e.sent,e.abrupt("return",M(r,r.public));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromJSON=function(){var e=i(n.mark((function e(t){var r,i,o,a,s,u,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=d.decode("z"+t.id),i=t.privKey&&k(t.privKey,"base64pad"),o=t.pubKey&&k(t.pubKey,"base64pad"),e.t0=o,!e.t0){e.next=8;break}return e.next=7,b.unmarshalPublicKey(o);case 7:e.t0=e.sent;case 8:if(a=e.t0,i){e.next=11;break}return e.abrupt("return",new x(r,void 0,a));case 11:return e.next=13,b.unmarshalPrivateKey(i);case 13:return s=e.sent,e.next=16,T(s.public);case 16:if(u=e.sent,!a){e.next=21;break}return e.next=20,T(a);case 20:c=e.sent;case 21:if(!a||w(u,c)){e.next=23;break}throw new Error("Public and private key do not match");case 23:if(!r||w(u,r)){e.next=25;break}throw new Error("Id and private key do not match");case 25:return e.abrupt("return",new x(r,s,a));case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.createFromProtobuf=function(){var e=i(n.mark((function e(t){var r,i,o,a,s,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"===typeof t&&(t=k(t,"base16")),r=m.decode(t),i=r.id,o=r.privKey,a=r.pubKey,!o){e.next=8;break}return e.next=5,b.unmarshalPrivateKey(o);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=!1;case 9:if(o=e.t0,!a){e.next=16;break}return e.next=13,b.unmarshalPublicKey(a);case 13:e.t1=e.sent,e.next=17;break;case 16:e.t1=!1;case 17:if(a=e.t1,!o){e.next=22;break}return e.next=21,T(o.public);case 21:u=e.sent;case 22:if(!a){e.next=26;break}return e.next=25,T(a);case 25:s=e.sent;case 26:if(!o){e.next=31;break}if(!a){e.next=30;break}if(w(u,s)){e.next=30;break}throw new Error("Public and private key do not match");case 30:return e.abrupt("return",new x(u,o,o.public));case 31:if(!a){e.next=33;break}return e.abrupt("return",new x(s,void 0,a));case 33:if(!i){e.next=35;break}return e.abrupt("return",new x(i));case 35:throw new Error("Protobuf did not contain any usable key material");case 36:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.parse=function(e){return"1"!==e.charAt(0)&&"Q"!==e.charAt(0)||(e="z".concat(e)),t.createFromBytes(A.decode(e))},t.isPeerId=function(e){return Boolean("object"===typeof e&&e._id&&e._idB58String)}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(298);r(62),r(169);var a=r(18),s=r(15),u=r(119).fromString,c=r(971),f={rsa:r(972),ed25519:r(976),secp256k1:r(978)(o,r(483))},l="secp256k1 support requires libp2p-crypto-secp256k1 package",h="ERR_MISSING_PACKAGE";function d(e){var t=f[e.toLowerCase()];if(!t){var r=Object.keys(f).join(" / ");throw s(new Error("invalid or unsupported key type ".concat(e,". Must be ").concat(r)),"ERR_UNSUPPORTED_KEY_TYPE")}return t}var p=function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(t).generateKeyPair(r));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),v=function(){var e=i(n.mark((function e(t,r,i){var o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=d(t),"ed25519"===t.toLowerCase()){e.next=3;break}throw s(new Error("Seed key derivation is unimplemented for RSA or secp256k1"),"ERR_UNSUPPORTED_KEY_DERIVATION_TYPE");case 3:return e.abrupt("return",o.generateKeyPairFromSeed(r,i));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),y=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=o.PrivateKey.decode(t),i=r.Data,e.t0=r.Type,e.next=e.t0===o.KeyType.RSA?5:e.t0===o.KeyType.Ed25519?6:e.t0===o.KeyType.Secp256k1?7:12;break;case 5:return e.abrupt("return",f.rsa.unmarshalRsaPrivateKey(i));case 6:return e.abrupt("return",f.ed25519.unmarshalEd25519PrivateKey(i));case 7:if(!f.secp256k1){e.next=11;break}return e.abrupt("return",f.secp256k1.unmarshalSecp256k1PrivateKey(i));case 11:throw s(new Error(l),h);case 12:d(r.Type);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=i(n.mark((function e(t,r){var i,o,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.import(t,r);case 3:return i=e.sent,e.abrupt("return",y(i));case 7:e.prev=7,e.t0=e.catch(0);case 9:if(null!==(o=a.pki.decryptRsaPrivateKey(t,r))){e.next=12;break}throw s(new Error("Cannot read the key, most likely the password is wrong or not a RSA key"),"ERR_CANNOT_DECRYPT_PEM");case 12:return l=a.asn1.toDer(a.pki.privateKeyToAsn1(o)),l=u(l.getBytes(),"ascii"),e.abrupt("return",f.rsa.unmarshalRsaPrivateKey(l));case 15:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}();e.exports={supportedKeys:f,keysPBM:o,keyStretcher:r(980),generateEphemeralKeyPair:r(983),generateKeyPair:p,generateKeyPairFromSeed:v,unmarshalPublicKey:function(e){var t=o.PublicKey.decode(e),r=t.Data;switch(t.Type){case o.KeyType.RSA:return f.rsa.unmarshalRsaPublicKey(r);case o.KeyType.Ed25519:return f.ed25519.unmarshalEd25519PublicKey(r);case o.KeyType.Secp256k1:if(f.secp256k1)return f.secp256k1.unmarshalSecp256k1PublicKey(r);throw s(new Error(l),h);default:d(t.Type)}},marshalPublicKey:function(e,t){return d(t=(t||"rsa").toLowerCase()),e.bytes},unmarshalPrivateKey:y,marshalPrivateKey:function(e,t){return d(t=(t||"rsa").toLowerCase()),e.bytes},import:b}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(63).base64,a=r(482);e.exports={import:function(){var e=i(n.mark((function e(t,r){var i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.decode(t),s=a.create(),e.next=4,s.decrypt(i,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(49).sha256,u=r(15),c=r(178).equals,f=r(120).toString;r(137);var l=r(18),h=r(973),d=r(298),p=r(300),v=function(){function e(t){o(this,e),this._key=t}return a(e,[{key:"verify",value:function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndVerify(this._key,r,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"marshal",value:function(){return h.utils.jwkToPkix(this._key)}},{key:"bytes",get:function(){return d.PublicKey.encode({Type:d.KeyType.RSA,Data:this.marshal()}).finish()}},{key:"encrypt",value:function(e){return h.encrypt(this._key,e)}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),y=function(){function e(t,r){o(this,e),this._key=t,this._publicKey=r}return a(e,[{key:"genSecret",value:function(){return h.getRandomValues(16)}},{key:"sign",value:function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndSign(this._key,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"public",get:function(){if(!this._publicKey)throw u(new Error("public key not provided"),"ERR_PUBKEY_NOT_PROVIDED");return new v(this._publicKey)}},{key:"decrypt",value:function(e){return h.decrypt(this._key,e)}},{key:"marshal",value:function(){return h.utils.jwkToPkcs1(this._key)}},{key:"bytes",get:function(){return d.PrivateKey.encode({Type:d.KeyType.RSA,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.public.hash();case 2:return t=e.sent,e.abrupt("return",f(t,"base58btc"));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i,o,a,s,c=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("pkcs-8"!==(r=c.length>1&&void 0!==c[1]?c[1]:"pkcs-8")){e.next=9;break}return i=new l.util.ByteBuffer(this.marshal()),o=l.asn1.fromDer(i),a=l.pki.privateKeyFromAsn1(o),s={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"},e.abrupt("return",l.pki.encryptRsaPrivateKey(a,t,s));case 9:if("libp2p-key"!==r){e.next=13;break}return e.abrupt("return",p.export(this.bytes,t));case 13:throw u(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function b(){return(b=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=h.utils.pkcs1ToJwk(t),e.next=3,h.unmarshalPrivateKey(r);case 3:return i=e.sent,e.abrupt("return",new y(i.privateKey,i.publicKey));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.unmarshalPrivateKey(t);case 2:return r=e.sent,e.abrupt("return",new y(r.privateKey,r.publicKey));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey(t);case 2:return r=e.sent,e.abrupt("return",new y(r.privateKey,r.publicKey));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports={RsaPublicKey:v,RsaPrivateKey:y,unmarshalRsaPublicKey:function(e){var t=h.utils.pkixToJwk(e);return new v(t)},unmarshalRsaPrivateKey:function(e){return b.apply(this,arguments)},generateKeyPair:function(e){return m.apply(this,arguments)},fromJwk:function(e){return g.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(216),a=r(483),s=r(120).toString,u=r(119).fromString;function c(e){return Promise.all([o.get().subtle.exportKey("jwk",e.privateKey),o.get().subtle.exportKey("jwk",e.publicKey)])}t.utils=r(974),t.generateKey=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]);case 2:return r=e.sent,e.next=5,c(r);case 5:return i=e.sent,e.abrupt("return",{privateKey:i[0],publicKey:i[1]});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.unmarshalPrivateKey=function(){var e=i(n.mark((function e(t){var r,i,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);case 2:return r=e.sent,e.t0=r,e.next=6,n=t,o.get().subtle.importKey("jwk",{kty:n.kty,n:n.n,e:n.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]);case 6:return e.t1=e.sent,i=[e.t0,e.t1],e.next=10,c({privateKey:i[0],publicKey:i[1]});case 10:return a=e.sent,e.abrupt("return",{privateKey:a[0],publicKey:a[1]});case 12:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),t.getRandomValues=a,t.hashAndSign=function(){var e=i(n.mark((function e(t,r){var i,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]);case 2:return i=e.sent,e.next=5,o.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},i,Uint8Array.from(r));case 5:return a=e.sent,e.abrupt("return",new Uint8Array(a,a.byteOffset,a.byteLength));case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),t.hashAndVerify=function(){var e=i(n.mark((function e(t,r,i){var a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);case 2:return a=e.sent,e.abrupt("return",o.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},a,r,i));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();var f=r(975),l=f.jwk2pub,h=f.jwk2priv;function d(e,t,r,n){var i=t?l(e):h(e),o=n(s(Uint8Array.from(r),"ascii"),i);return u(o,"ascii")}t.encrypt=function(e,t){return d(e,!0,t,(function(e,t){return t.encrypt(e)}))},t.decrypt=function(e,t){return d(e,!1,t,(function(e,t){return t.decrypt(e)}))}},function(e,t,r){"use strict";r(62),r(78);var n=r(18),i=r(299),o=i.bigIntegerToUintBase64url,a=i.base64urlToBigInteger,s=r(119).fromString,u=r(120).toString;t.pkcs1ToJwk=function(e){var t=n.asn1.fromDer(u(e,"ascii")),r=n.pki.privateKeyFromAsn1(t);return{kty:"RSA",n:o(r.n),e:o(r.e),d:o(r.d),p:o(r.p),q:o(r.q),dp:o(r.dP),dq:o(r.dQ),qi:o(r.qInv),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){var t=n.pki.privateKeyToAsn1({n:a(e.n),e:a(e.e),d:a(e.d),p:a(e.p),q:a(e.q),dP:a(e.dp),dQ:a(e.dq),qInv:a(e.qi)});return s(n.asn1.toDer(t).getBytes(),"ascii")},t.pkixToJwk=function(e){var t=n.asn1.fromDer(u(e,"ascii")),r=n.pki.publicKeyFromAsn1(t);return{kty:"RSA",n:o(r.n),e:o(r.e),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){var t=n.pki.publicKeyToAsn1({n:a(e.n),e:a(e.e)});return s(n.asn1.toDer(t).getBytes(),"ascii")}},function(e,t,r){"use strict";var n=r(48);r(78);var i=r(18),o=r(299).base64urlToBigInteger;function a(e,t){return t.map((function(t){return o(e[t])}))}e.exports={jwk2pub:function(e){var t;return(t=i.pki).setRsaPublicKey.apply(t,n(a(e,["n","e"])))},jwk2priv:function(e){var t;return(t=i.pki).setRsaPrivateKey.apply(t,n(a(e,["n","e","d","p","q","dp","dq","qi"])))}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(15),u=r(178).equals,c=r(49).sha256,f=r(58).base58btc,l=r(89).identity,h=r(977),d=r(298),p=r(300),v=function(){function e(t){o(this,e),this._key=m(t,h.publicKeyLength)}return a(e,[{key:"verify",value:function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndVerify(this._key,r,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return d.PublicKey.encode({Type:d.KeyType.Ed25519,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return u(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),y=function(){function e(t,r){o(this,e),this._key=m(t,h.privateKeyLength),this._publicKey=m(r,h.publicKeyLength)}return a(e,[{key:"sign",value:function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndSign(this._key,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"public",get:function(){return new v(this._publicKey)}},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return d.PrivateKey.encode({Type:d.KeyType.Ed25519,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return u(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.digest(this.public.bytes);case 2:return t=e.sent,e.abrupt("return",f.encode(t.bytes).substring(1));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("libp2p-key"!==(r=i.length>1&&void 0!==i[1]?i[1]:"libp2p-key")){e.next=5;break}return e.abrupt("return",p.export(this.bytes,t));case 5:throw s(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function b(){return(b=i(n.mark((function e(){var t,r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey();case 2:return t=e.sent,r=t.privateKey,i=t.publicKey,e.abrupt("return",new y(r,i));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=i(n.mark((function e(t){var r,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKeyFromSeed(t);case 2:return r=e.sent,i=r.privateKey,o=r.publicKey,e.abrupt("return",new y(i,o));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){if((e=Uint8Array.from(e||[])).length!==t)throw s(new Error("Key must be a Uint8Array of length ".concat(t,", got ").concat(e.length)),"ERR_INVALID_KEY_TYPE");return e}e.exports={Ed25519PublicKey:v,Ed25519PrivateKey:y,unmarshalEd25519PrivateKey:function(e){if(e.length>h.privateKeyLength){var t=(e=m(e,h.privateKeyLength+h.publicKeyLength)).slice(0,h.privateKeyLength),r=e.slice(h.privateKeyLength,e.length);return new y(t,r)}var n=(e=m(e,h.privateKeyLength)).slice(0,h.privateKeyLength),i=e.slice(h.publicKeyLength);return new y(n,i)},unmarshalEd25519PublicKey:function(e){return e=m(e,h.publicKeyLength),new v(e)},generateKeyPair:function(){return b.apply(this,arguments)},generateKeyPairFromSeed:function(e){return g.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(286);function a(e,r){for(var n=new Uint8Array(t.privateKeyLength),i=0;i<32;i++)n[i]=e[i],n[32+i]=r[i];return n}t.publicKeyLength=32,t.privateKeyLength=64,t.generateKey=i(n.mark((function e(){var t,r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.utils.randomPrivateKey(),e.next=3,o.getPublicKey(t);case 3:return r=e.sent,i=a(t,r),e.abrupt("return",{privateKey:i,publicKey:r});case 6:case"end":return e.stop()}}),e)}))),t.generateKeyFromSeed=function(){var e=i(n.mark((function e(t){var r,i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(32===t.length){e.next=4;break}throw new TypeError('"seed" must be 32 bytes in length.');case 4:if(t instanceof Uint8Array){e.next=6;break}throw new TypeError('"seed" must be a node.js Buffer, or Uint8Array.');case 6:return r=t,e.next=9,o.getPublicKey(r);case 9:return i=e.sent,s=a(r,i),e.abrupt("return",{privateKey:s,publicKey:i});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.hashAndSign=function(e,t){var r=e.slice(0,32);return o.sign(t,r)},t.hashAndVerify=function(e,t,r){return o.verify(t,r,e)}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(49).sha256,u=r(15),c=r(178).equals,f=r(120).toString,l=r(300);e.exports=function(e,t,h){h=h||r(979)();var d=function(){function t(e){o(this,t),h.validatePublicKey(e),this._key=e}return a(t,[{key:"verify",value:function(e,t){return h.hashAndVerify(this._key,t,e)}},{key:"marshal",value:function(){return h.compressPublicKey(this._key)}},{key:"bytes",get:function(){return e.PublicKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),t}(),p=function(){function t(e,r){o(this,t),this._key=e,this._publicKey=r||h.computePublicKey(e),h.validatePrivateKey(this._key),h.validatePublicKey(this._publicKey)}return a(t,[{key:"sign",value:function(e){return h.hashAndSign(this._key,e)}},{key:"public",get:function(){return new d(this._publicKey)}},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return e.PrivateKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.public.hash();case 2:return t=e.sent,e.abrupt("return",f(t,"base58btc"));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("libp2p-key"!==(r=i.length>1&&void 0!==i[1]?i[1]:"libp2p-key")){e.next=5;break}return e.abrupt("return",l.export(this.bytes,t));case 5:throw u(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),t}();function v(){return(v=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey();case 2:return t=e.sent,e.abrupt("return",new p(t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return{Secp256k1PublicKey:d,Secp256k1PrivateKey:p,unmarshalSecp256k1PrivateKey:function(e){return new p(e)},unmarshalSecp256k1PublicKey:function(e){return new d(e)},generateKeyPair:function(){return v.apply(this,arguments)}}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(15),a=r(287),s=r(49).sha256;e.exports=function(){function e(){return(e=i(n.mark((function e(t,r){var i,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(r);case 2:return i=e.sent,u=i.digest,e.prev=4,e.next=7,a.sign(u,t);case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(4),o(e.t0,"ERR_INVALID_INPUT");case 13:case"end":return e.stop()}}),e,null,[[4,10]])})))).apply(this,arguments)}function t(){return(t=i(n.mark((function e(t,r,i){var u,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.digest(i);case 3:return u=e.sent,c=u.digest,e.abrupt("return",a.verify(r,c,t));case 8:throw e.prev=8,e.t0=e.catch(0),o(e.t0,"ERR_INVALID_INPUT");case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}return{generateKey:function(){return a.utils.randomPrivateKey()},privateKeyLength:32,hashAndSign:function(t,r){return e.apply(this,arguments)},hashAndVerify:function(e,r,n){return t.apply(this,arguments)},compressPublicKey:function(e){return a.Point.fromHex(e).toRawBytes(!0)},decompressPublicKey:function(e){return a.Point.fromHex(e).toRawBytes(!1)},validatePrivateKey:function(e){try{a.getPublicKey(e,!0)}catch(t){throw o(t,"ERR_INVALID_PRIVATE_KEY")}},validatePublicKey:function(e){try{a.Point.fromHex(e)}catch(t){throw o(t,"ERR_INVALID_PUBLIC_KEY")}},computePublicKey:function(e){try{return a.getPublicKey(e,!0)}catch(t){throw o(t,"ERR_INVALID_PRIVATE_KEY")}}}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(15),a=r(215).concat,s=r(119).fromString,u=r(981),c={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=function(){var e=i(n.mark((function e(t,r,i){var f,l,h,d,p,v,y,b,g,m,w,k,S,E,_,A,x;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=c[t]){e.next=4;break}throw l=Object.keys(c).join(" / "),o(new Error("unknown cipher type '".concat(t,"'. Must be ").concat(l)),"ERR_INVALID_CIPHER_TYPE");case 4:if(r){e.next=6;break}throw o(new Error("missing hash type"),"ERR_MISSING_HASH_TYPE");case 6:return h=f.keySize,d=f.ivSize,20,p=s("key expansion"),v=2*(d+h+20),e.next=13,u.create(r,i);case 13:return y=e.sent,e.next=16,y.digest(p);case 16:b=e.sent,g=[],m=0;case 19:if(!(m<v)){e.next=32;break}return e.next=22,y.digest(a([b,p]));case 22:return w=e.sent,k=w.length,m+k>v&&(k=v-m),g.push(w),m+=k,e.next=29,y.digest(b);case 29:b=e.sent,e.next=19;break;case 32:return S=v/2,E=a(g),_=E.slice(0,S),A=E.slice(S,v),x=function(e){return{iv:e.slice(0,d),cipherKey:e.slice(d,d+h),macKey:e.slice(d+h)}},e.abrupt("return",{k1:x(_),k2:x(A)});case 38:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(216),a=r(982),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"},u=function(){var e=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.sign({name:"HMAC"},t,r);case 2:return i=e.sent,e.abrupt("return",new Uint8Array(i,i.byteOffset,i.byteLength));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.create=function(){var e=i(n.mark((function e(t,r){var c,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=s[t],e.next=3,o.get().subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]);case 3:return f=e.sent,e.abrupt("return",{digest:function(e){return i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u(f,e));case 1:case"end":return t.stop()}}),t)})))()},length:a[t]});case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(984);e.exports=function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.generateEphmeralKeyPair(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(29),i=r(0),o=r(6),a=r(15),s=r(216),u=r(299).base64urlToBuffer,c=r(985),f=r(120).toString,l=r(215).concat,h=r(178).equals,d={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(){var e=o(i.mark((function e(t){var r,n,a;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(Object.keys(d),t),e.next=3,s.get().subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]);case 3:return r=e.sent,n=function(){var e=o(i.mark((function e(n,o){var a,u,c;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=6;break}return e.next=3,s.get().subtle.importKey("jwk",b(t,o),{name:"ECDH",namedCurve:t},!1,["deriveBits"]);case 3:a=e.sent,e.next=7;break;case 6:a=r.privateKey;case 7:return e.next=9,s.get().subtle.importKey("jwk",y(t,n),{name:"ECDH",namedCurve:t},!1,[]);case 9:return e.t0=e.sent,e.t1=a,u=[e.t0,e.t1],e.next=14,s.get().subtle.deriveBits({name:"ECDH",namedCurve:t,public:u[0]},u[1],d[t]);case 14:return c=e.sent,e.abrupt("return",new Uint8Array(c,c.byteOffset,c.byteLength));case 16:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),e.next=7,s.get().subtle.exportKey("jwk",r.publicKey);case 7:return a=e.sent,e.abrupt("return",{key:v(a),genSharedKey:n});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var p={"P-256":32,"P-384":48,"P-521":66};function v(e){var t=p[e.crv];return l([Uint8Array.from([4]),u(e.x,t),u(e.y,t)],1+2*t)}function y(e,t){var r=p[e];if(h(!t.slice(0,1),Uint8Array.from([4])))throw a(new Error("Cannot unmarshal public key - invalid key format"),"ERR_INVALID_KEY_FORMAT");return{kty:"EC",crv:e,x:f(t.slice(1,r+1),"base64url"),y:f(t.slice(1+r),"base64url"),ext:!0}}var b=function(e,t){return n(n({},y(e,t.public)),{},{d:f(t.private,"base64url")})}},function(e,t,r){"use strict";var n=r(15);e.exports=function(e,t){if(!e.includes(t)){var r=e.join(" / ");throw n(new Error("Unknown curve: ".concat(t,". Must be ").concat(r)),"ERR_INVALID_CURVE")}}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-peer-id"]||(n.roots["libp2p-peer-id"]={});s.PeerIdProto=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.id=a.newBuffer([]),e.prototype.pubKey=a.newBuffer([]),e.prototype.privKey=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(10).bytes(e.id),null!=e.pubKey&&Object.hasOwnProperty.call(e,"pubKey")&&t.uint32(18).bytes(e.pubKey),null!=e.privKey&&Object.hasOwnProperty.call(e,"privKey")&&t.uint32(26).bytes(e.privKey),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PeerIdProto;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.id=e.bytes();break;case 2:n.pubKey=e.bytes();break;case 3:n.privKey=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("id"))throw a.ProtocolError("missing required 'id'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PeerIdProto)return e;var t=new s.PeerIdProto;return null!=e.id&&("string"===typeof e.id?a.base64.decode(e.id,t.id=a.newBuffer(a.base64.length(e.id)),0):e.id.length&&(t.id=e.id)),null!=e.pubKey&&("string"===typeof e.pubKey?a.base64.decode(e.pubKey,t.pubKey=a.newBuffer(a.base64.length(e.pubKey)),0):e.pubKey.length&&(t.pubKey=e.pubKey)),null!=e.privKey&&("string"===typeof e.privKey?a.base64.decode(e.privKey,t.privKey=a.newBuffer(a.base64.length(e.privKey)),0):e.privKey.length&&(t.privKey=e.privKey)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.id="":(r.id=[],t.bytes!==Array&&(r.id=a.newBuffer(r.id))),t.bytes===String?r.pubKey="":(r.pubKey=[],t.bytes!==Array&&(r.pubKey=a.newBuffer(r.pubKey))),t.bytes===String?r.privKey="":(r.privKey=[],t.bytes!==Array&&(r.privKey=a.newBuffer(r.privKey)))),null!=e.id&&e.hasOwnProperty("id")&&(r.id=t.bytes===String?a.base64.encode(e.id,0,e.id.length):t.bytes===Array?Array.prototype.slice.call(e.id):e.id),null!=e.pubKey&&e.hasOwnProperty("pubKey")&&(r.pubKey=t.bytes===String?a.base64.encode(e.pubKey,0,e.pubKey.length):t.bytes===Array?Array.prototype.slice.call(e.pubKey):e.pubKey),null!=e.privKey&&e.hasOwnProperty("privKey")&&(r.privKey=t.bytes===String?a.base64.encode(e.privKey,0,e.privKey.length):t.bytes===Array?Array.prototype.slice.call(e.privKey):e.privKey),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";e.exports=r(988)},function(e,t,r){"use strict";var n=r(0),i=r(21),o=r(6),a=r(29),s=r(8),u=r(9),c=r(30),f=r(60),l=r(173),h=r(22)("libp2p:mplex"),d=r(118),p=r(989),v=r(484),y=r(485),b=y.MessageTypes,g=y.MessageTypeNames,m=r(992),w=function(){function e(t){s(this,e),t="function"===typeof(t=t||{})?{onStream:t}:t,this._streamId=0,this._streams={initiators:new Map,receivers:new Map},this._options=t,this.sink=this._createSink(),this.source=this._createSource(),this.onStream=t.onStream,this.onStreamEnd=t.onStreamEnd}return u(e,[{key:"streams",get:function(){var e=[];return this._streams.initiators.forEach((function(t){e.push(t)})),this._streams.receivers.forEach((function(t){e.push(t)})),e}},{key:"newStream",value:function(e){var t=this._streamId++;e=null==e?t.toString():String(e);var r=this._streams.initiators;return this._newStream({id:t,name:e,type:"initiator",registry:r})}},{key:"_newReceiverStream",value:function(e){var t=e.id,r=e.name,n=this._streams.receivers;return this._newStream({id:t,name:r,type:"receiver",registry:n})}},{key:"_newStream",value:function(e){var t=this,r=e.id,n=e.name,i=e.type,o=e.registry;if(o.has(r))throw new Error("".concat(i," stream ").concat(r," already exists!"));h("new %s stream %s %s",i,r,n);var s=m({id:r,name:n,send:function(e){return h.enabled&&h("%s stream %s %s send",i,r,n,a(a({},e),{},{type:g[e.type],data:e.data&&e.data.slice()})),t.source.push(e)},type:i,onEnd:function(){h("%s stream %s %s ended",i,r,n),o.delete(r),t.onStreamEnd&&t.onStreamEnd(s)},maxMsgSize:this._options.maxMsgSize});return o.set(r,s),s}},{key:"_createSink",value:function(){var e=this;return function(){var t=o(n.mark((function t(r){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e._options.signal&&(r=d(r,e._options.signal)),t.prev=1,t.next=4,f(r,p.decode,v(e._options.maxMsgSize),function(){var t=o(n.mark((function t(r){var o,a,s,u,f,l,h,d,p;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=!0,a=!1,t.prev=2,u=c(r);case 4:return t.next=6,u.next();case 6:return f=t.sent,o=f.done,t.next=10,f.value;case 10:if(l=t.sent,o){t.next=18;break}h=i(l);try{for(h.s();!(d=h.n()).done;)p=d.value,e._handleIncoming(p)}catch(n){h.e(n)}finally{h.f()}case 15:o=!0,t.next=4;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(2),a=!0,s=t.t0;case 24:if(t.prev=24,t.prev=25,o||null==u.return){t.next=29;break}return t.next=29,u.return();case 29:if(t.prev=29,!a){t.next=32;break}throw s;case 32:return t.finish(29);case 33:return t.finish(24);case 34:case"end":return t.stop()}}),t,null,[[2,20,24,34],[25,,29,33]])})));return function(e){return t.apply(this,arguments)}}());case 4:t.next=10;break;case 6:return t.prev=6,t.t0=t.catch(1),h("error in sink",t.t0),t.abrupt("return",e.source.end(t.t0));case 10:e.source.end();case 11:case"end":return t.stop()}}),t,null,[[1,6]])})));return function(e){return t.apply(this,arguments)}}()}},{key:"_createSource",value:function(){var e=this,t=l({onEnd:function(t){var r,n=e._streams,o=n.initiators,a=n.receivers,s=i(o.values());try{for(s.s();!(r=s.n()).done;){r.value.abort(t)}}catch(t){s.e(t)}finally{s.f()}var u,c=i(a.values());try{for(c.s();!(u=c.n()).done;){u.value.abort(t)}}catch(t){c.e(t)}finally{c.f()}},writev:!0});return Object.assign(p.encode(t),{push:t.push,end:t.end,return:t.return})}},{key:"_handleIncoming",value:function(e){var t=e.id,r=e.type,n=e.data;if(h.enabled&&h("incoming message",{id:t,type:g[r],data:n.slice()}),r===b.NEW_STREAM&&this.onStream){var i=this._newReceiverStream({id:t,name:n.toString()});return this.onStream(i)}var o=(1&r?this._streams.initiators:this._streams.receivers).get(t);if(!o)return h("missing stream %s",t);switch(r){case b.MESSAGE_INITIATOR:case b.MESSAGE_RECEIVER:o.source.push(n);break;case b.CLOSE_INITIATOR:case b.CLOSE_RECEIVER:o.close();break;case b.RESET_INITIATOR:case b.RESET_RECEIVER:o.reset();break;default:h("unknown message type %s",r)}}}]),e}();w.multicodec="/mplex/6.7.0",e.exports=w},function(e,t,r){"use strict";t.encode=r(990),t.decode=r(991)},function(e,t,r){"use strict";var n=r(0),i=r(8),o=r(9),a=r(45),s=r(44),u=r(30),c=r(91),f=r(79),l=10240,h=new(function(){function e(){i(this,e),this._pool=new Uint8Array(l),this._poolOffset=0}return o(e,[{key:"write",value:function(e){var t=this._pool,r=this._poolOffset;c.encode(e.id<<3|e.type,t,r),r+=c.encode.bytes,c.encode(e.data?e.data.length:0,t,r),r+=c.encode.bytes;var n=t.subarray(this._poolOffset,r);return l-r<100?(this._pool=new Uint8Array(l),this._poolOffset=0):this._poolOffset=r,e.data?[n,e.data]:n}}]),e}());e.exports=function(e){return function(){var t=s(n.mark((function t(){var r,i,o,s,c,l,d;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=!0,i=!1,t.prev=2,s=u(e);case 4:return t.next=6,a(s.next());case 6:return c=t.sent,r=c.done,t.next=10,a(c.value);case 10:if(l=t.sent,r){t.next=23;break}if(d=l,!Array.isArray(d)){t.next=18;break}return t.next=16,new f(d.map((function(e){return h.write(e)})));case 16:t.next=20;break;case 18:return t.next=20,new f(h.write(d));case 20:r=!0,t.next=4;break;case 23:t.next=29;break;case 25:t.prev=25,t.t0=t.catch(2),i=!0,o=t.t0;case 29:if(t.prev=29,t.prev=30,r||null==s.return){t.next=34;break}return t.next=34,a(s.return());case 34:if(t.prev=34,!i){t.next=37;break}throw o;case 37:return t.finish(34);case 38:return t.finish(29);case 39:case"end":return t.stop()}}),t,null,[[2,25,29,39],[30,,34,38]])})));return function(){return t.apply(this,arguments)}}()()}},function(e,t,r){"use strict";var n=r(8),i=r(9),o=r(0),a=r(45),s=r(44),u=r(30),c=r(91),f=r(79);e.exports=function(e){return function(){var t=s(o.mark((function t(){var r,n,i,s,c,f,h,d,p;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new l,n=!0,i=!1,t.prev=3,c=u(e);case 5:return t.next=7,a(c.next());case 7:return f=t.sent,n=f.done,t.next=11,a(f.value);case 11:if(h=t.sent,n){t.next=21;break}if(d=h,!(p=r.write(d)).length){t.next=18;break}return t.next=18,p;case 18:n=!0,t.next=5;break;case 21:t.next=27;break;case 23:t.prev=23,t.t0=t.catch(3),i=!0,s=t.t0;case 27:if(t.prev=27,t.prev=28,n||null==c.return){t.next=32;break}return t.next=32,a(c.return());case 32:if(t.prev=32,!i){t.next=35;break}throw s;case 35:return t.finish(32);case 36:return t.finish(27);case 37:case"end":return t.stop()}}),t,null,[[3,23,27,37],[28,,32,36]])})));return function(){return t.apply(this,arguments)}}()()};var l=function(){function e(){var t=this;n(this,e),this._buffer=new f,this._bufferProxy=new Proxy({},{get:function(e,r){return"l"===r[0]?t._buffer[r]:t._buffer.get(parseInt(r))}}),this._headerInfo=null}return i(e,[{key:"write",value:function(e){if(!e||!e.length)return[];this._buffer.append(e);for(var t=[];this._buffer.length;){if(!this._headerInfo)try{this._headerInfo=this._decodeHeader(this._bufferProxy)}catch(s){break}var r=this._headerInfo,n=r.id,i=r.type,o=r.length,a=r.offset;if(this._buffer.length-a<o)break;t.push({id:n,type:i,data:this._buffer.shallowSlice(a,a+o)}),this._buffer.consume(a+o),this._headerInfo=null}return t}},{key:"_decodeHeader",value:function(e){var t=c.decode(e),r=c.decode.bytes,n=c.decode(e,r);return{id:t>>3,type:7&t,offset:r+=c.decode.bytes,length:n}}}]),e}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(30),a=r(118),s=r(177),u=r(22)("libp2p:mplex:stream"),c=r(173),f=r(79),l=r(15),h=r(484).MAX_MSG_SIZE,d=r(485),p=d.InitiatorMessageTypes,v=d.ReceiverMessageTypes,y="ERR_MPLEX_STREAM_RESET";e.exports=function(e){var t=e.id,r=e.name,d=e.send,b=e.onEnd,g=void 0===b?function(){}:b,m=e.type,w=void 0===m?"initiator":m,k=e.maxMsgSize,S=void 0===k?h:k,E=new s,_=new s,A="initiator"===w?p:v,x="initiator"===w?"i".concat(t):"r".concat(t);r=String(null==r?t:r);var T,M=!1,C=!1,O=function(e){C||(C=!0,u("%s stream %s sink end",w,r,e),e&&!T&&(T=e),M&&(I.timeline.close=Date.now(),g(T)))},I={close:function(){return I.source.end()},abort:function(e){u("%s stream %s abort",w,r,e),I.source.end(e),E.abort(),O(e)},reset:function(){var e=l(new Error("stream reset"),y);_.abort(),I.source.end(e),O(e)},sink:function(){var e=i(n.mark((function e(i){var s,c,l,h,p,v,b;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=a(i,[{signal:E.signal,options:{abortMessage:"stream aborted",abortCode:"ERR_MPLEX_STREAM_ABORT"}},{signal:_.signal,options:{abortMessage:"stream reset",abortCode:y}}]),"initiator"===w&&d({id:t,type:A.NEW_STREAM,data:r}),e.prev=2,s=!0,c=!1,e.prev=5,h=o(i);case 7:return e.next=9,h.next();case 9:return p=e.sent,s=p.done,e.next=13,p.value;case 13:if(v=e.sent,s){e.next=28;break}b=v;case 16:if(!b.length){e.next=25;break}if(!(b.length<=S)){e.next=20;break}return d({id:t,type:A.MESSAGE,data:b}),e.abrupt("break",25);case 20:b=f.isBufferList(b)?b:new f(b),d({id:t,type:A.MESSAGE,data:b.shallowSlice(0,S)}),b.consume(S),e.next=16;break;case 25:s=!0,e.next=7;break;case 28:e.next=34;break;case 30:e.prev=30,e.t0=e.catch(5),c=!0,l=e.t0;case 34:if(e.prev=34,e.prev=35,s||null==h.return){e.next=39;break}return e.next=39,h.return();case 39:if(e.prev=39,!c){e.next=42;break}throw l;case 42:return e.finish(39);case 43:return e.finish(34);case 44:e.next=51;break;case 46:return e.prev=46,e.t1=e.catch(2),e.t1.code===y?u("%s stream %s reset",w,r):(u("%s stream %s error",w,r,e.t1),d({id:t,type:A.RESET})),I.source.end(e.t1),e.abrupt("return",O(e.t1));case 51:d({id:t,type:A.CLOSE}),O();case 53:case"end":return e.stop()}}),e,null,[[2,46],[5,30,34,44],[35,,39,43]])})));return function(t){return e.apply(this,arguments)}}(),source:c((function(e){M||(M=!0,u("%s stream %s source end",w,r,e),e&&!T&&(T=e),C&&(I.timeline.close=Date.now(),g(T)))})),timeline:{open:Date.now(),close:null},id:x};return I}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(994),u=r(170),c=r(1006),f=r(118).AbortError,l=r(280),h=r(22),d=h("libp2p:websockets");d.error=h("libp2p:websockets:error");var p=r(1007),v=r(1008),y=r(1009),b=r(488),g=function(){function e(t){var r=t.upgrader,n=t.filter;if(o(this,e),!r)throw new Error("An upgrader must be provided. See https://github.com/libp2p/interface-transport#upgrader.");this._upgrader=r,this._filter=n}return a(e,[{key:"dial",value:function(){var e=i(n.mark((function e(t){var r,i,o,a,s=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>1&&void 0!==s[1]?s[1]:{},d("dialing %s",t),e.next=4,this._connect(t,r);case 4:return i=e.sent,o=y(i,{remoteAddr:t,signal:r.signal}),d("new outbound connection %s",o.remoteAddr),e.next=9,this._upgrader.upgradeOutbound(o);case 9:return a=e.sent,d("outbound connection %s upgraded",o.remoteAddr),e.abrupt("return",a);case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_connect",value:function(){var e=i(n.mark((function e(t){var r,i,o,a,u,h,p,v=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=v.length>1&&void 0!==v[1]?v[1]:{}).signal||!r.signal.aborted){e.next=3;break}throw new f;case 3:if(i=t.toOptions(),d("dialing %s:%s",i.host,i.port),o=l(),a=function(e){var t="connection error: ".concat(e.message);d.error(t),o.reject(e)},(u=s(c(t),Object.assign({binary:!0},r))).socket.on?u.socket.on("error",a):u.socket.onerror=a,r.signal){e.next=14;break}return e.next=12,Promise.race([u.connected(),o.promise]);case 12:return d("connected %s",t),e.abrupt("return",u);case 14:return p=new Promise((function(e,t){if(h=function(){t(new f),setTimeout((function(){u.close()}))},r.signal.aborted)return h();r.signal.addEventListener("abort",h)})),e.prev=15,e.next=18,Promise.race([p,o.promise,u.connected()]);case 18:return e.prev=18,r.signal.removeEventListener("abort",h),e.finish(18);case 21:return d("connected %s",t),e.abrupt("return",u);case 23:case"end":return e.stop()}}),e,null,[[15,,18,21]])})));return function(t){return e.apply(this,arguments)}}()},{key:"createListener",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"function"===typeof e&&(t=e,e={}),v({handler:t,upgrader:this._upgrader},e)}},{key:"filter",value:function(e){return e=Array.isArray(e)?e:[e],this._filter?this._filter(e):p.isBrowser||p.isWebWorker?b.dnsWss(e):b.all(e)}}]),e}();e.exports=u(g,{className:"WebSockets",symbolName:"@libp2p/js-libp2p-websockets/websockets"})},function(e,t,r){"use strict";var n=r(995),i=r(997),o=r(1003);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="undefined"===typeof window?{}:window.location,a=o(e,r),s=new n(a,t.websocket),u=i(s,t);return u.remoteAddress=a,u.close=function(){return new Promise((function(e,t){s.addEventListener("close",e),s.close()}))},u.destroy=function(){s.terminate?s.terminate():s.close()},u.socket=s,u},e.exports.connect=e.exports},function(e,t,r){e.exports="undefined"===typeof WebSocket?r(996):WebSocket},,function(e,t,r){var n=r(998),i=r(1001);e.exports=function(e,t){(t=t||{}).binaryType?e.binaryType=t.binaryType:t.binary&&(e.binaryType="arraybuffer");var r={sink:i(e,t),source:n(e,t),connected:function(){return r.source.connected()}};return r}},function(e,t,r){var n=r(0),i=r(45),o=r(44),a=r(30),s=r(13).Buffer,u=r(999).EventIterator;e.exports=function(e){var t,r=e.removeEventListener||e.removeListener,c=o(n.mark((function t(){var o,c,f,l,h,d,p,v;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=new u((function(t){var n=t.push,i=t.stop,o=t.fail;return e.addEventListener("message",n),e.addEventListener("error",o),e.addEventListener("close",i),function(){r.call(e,"message",n),r.call(e,"error",o),r.call(e,"close",i)}}),{highWaterMark:1/0}),c=!0,f=!1,t.prev=3,h=a(o);case 5:return t.next=7,i(h.next());case 7:return d=t.sent,c=d.done,t.next=11,i(d.value);case 11:if(p=t.sent,c){t.next=19;break}return v=p.data,t.next=16,(n=v)instanceof ArrayBuffer||null!=n&&null!=n.constructor&&"ArrayBuffer"===n.constructor.name&&"number"===typeof n.byteLength?s.from(v):v;case 16:c=!0,t.next=5;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(3),f=!0,l=t.t0;case 25:if(t.prev=25,t.prev=26,c||null==h.return){t.next=30;break}return t.next=30,i(h.return());case 30:if(t.prev=30,!f){t.next=33;break}throw l;case 33:return t.finish(30);case 34:return t.finish(25);case 35:case"end":return t.stop()}var n}),t,null,[[3,21,25,35],[26,,30,34]])})))(),f=1===e.readyState;return e.addEventListener("open",(function(){f=!0,t=null})),e.addEventListener("close",(function(){f=!1,t=null})),e.addEventListener("error",(function(e){f||(t=e)})),c.connected=function(){return new Promise((function(n,i){if(f)return n();if(t)return i(t);var o=function(t){r.call(e,"open",a),r.call(e,"error",s),t()},a=function(){return o(n)},s=function(e){return o((function(){return i(e)}))};e.addEventListener("open",a),e.addEventListener("error",s)}))},c}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1e3);t.EventIterator=n.EventIterator,t.subscribe=function(e,t,r){var i=this;return new n.EventIterator((function(r){var n=r.push;return i.addEventListener(e,n,t),function(){return i.removeEventListener(e,n,t)}}),r)},t.default=n.EventIterator},function(e,t,r){"use strict";var n=r(21),i=r(8),o=r(9);Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){i(this,e),this.pullQueue=[],this.pushQueue=[],this.eventHandlers={},this.isPaused=!1,this.isStopped=!1}return o(e,[{key:"push",value:function(e){if(!this.isStopped){var t={value:e,done:!1};if(this.pullQueue.length){var r=this.pullQueue.shift();r&&r.resolve(t)}else this.pushQueue.push(Promise.resolve(t)),void 0!==this.highWaterMark&&this.pushQueue.length>=this.highWaterMark&&!this.isPaused&&(this.isPaused=!0,this.eventHandlers.highWater?this.eventHandlers.highWater():console&&console.warn("EventIterator queue reached ".concat(this.pushQueue.length," items")))}}},{key:"stop",value:function(){if(!this.isStopped){this.isStopped=!0,this.remove();var e,t=n(this.pullQueue);try{for(t.s();!(e=t.n()).done;){e.value.resolve({value:void 0,done:!0})}}catch(r){t.e(r)}finally{t.f()}this.pullQueue.length=0}}},{key:"fail",value:function(e){if(!this.isStopped)if(this.isStopped=!0,this.remove(),this.pullQueue.length){var t,r=n(this.pullQueue);try{for(r.s();!(t=r.n()).done;){t.value.reject(e)}}catch(o){r.e(o)}finally{r.f()}this.pullQueue.length=0}else{var i=Promise.reject(e);i.catch((function(){})),this.pushQueue.push(i)}}},{key:"remove",value:function(){var e=this;Promise.resolve().then((function(){e.removeCallback&&e.removeCallback()}))}},{key:Symbol.asyncIterator,value:function(){var e=this;return{next:function(t){var r=e.pushQueue.shift();return r?(void 0!==e.lowWaterMark&&e.pushQueue.length<=e.lowWaterMark&&e.isPaused&&(e.isPaused=!1,e.eventHandlers.lowWater&&e.eventHandlers.lowWater()),r):e.isStopped?Promise.resolve({value:void 0,done:!0}):new Promise((function(t,r){e.pullQueue.push({resolve:t,reject:r})}))},return:function(){return e.isStopped=!0,e.pushQueue.length=0,e.remove(),Promise.resolve({value:void 0,done:!0})}}}}]),e}(),s=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.highWaterMark,o=void 0===n?100:n,s=r.lowWaterMark,u=void 0===s?1:s;i(this,e);var c=new a;c.highWaterMark=o,c.lowWaterMark=u,c.removeCallback=t({push:function(e){return c.push(e)},stop:function(){return c.stop()},fail:function(e){return c.fail(e)},on:function(e,t){c.eventHandlers[e]=t}})||function(){},this[Symbol.asyncIterator]=function(){return c[Symbol.asyncIterator]()},Object.freeze(this)};t.EventIterator=s,t.default=s},function(e,t,r){var n=r(0),i=r(6),o=r(30),a=r(1002);e.exports=function(e,t){return(t=t||{}).closeOnEnd=!1!==t.closeOnEnd,function(){var r=i(n.mark((function r(i){var s,u,c,f,l,h,d;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:s=!0,u=!1,r.prev=2,f=o(i);case 4:return r.next=6,f.next();case 6:return l=r.sent,s=l.done,r.next=10,l.value;case 10:if(h=r.sent,s){r.next=27;break}return d=h,r.prev=13,r.next=16,a(e);case 16:r.next=23;break;case 18:if(r.prev=18,r.t0=r.catch(13),"socket closed"!==r.t0.message){r.next=22;break}return r.abrupt("break",27);case 22:throw r.t0;case 23:e.send(d);case 24:s=!0,r.next=4;break;case 27:r.next=33;break;case 29:r.prev=29,r.t1=r.catch(2),u=!0,c=r.t1;case 33:if(r.prev=33,r.prev=34,s||null==f.return){r.next=38;break}return r.next=38,f.return();case 38:if(r.prev=38,!u){r.next=41;break}throw c;case 41:return r.finish(38);case 42:return r.finish(33);case 43:if(!(t.closeOnEnd&&e.readyState<=1)){r.next=45;break}return r.abrupt("return",new Promise((function(t,r){e.addEventListener("close",(function(e){if(e.wasClean||1006===e.code)t();else{var n=Object.assign(new Error("ws error"),{event:e});r(n)}})),setTimeout((function(){return e.close()}))})));case 45:case"end":return r.stop()}}),r,null,[[2,29,33,43],[13,18],[34,,38,42]])})));return function(e){return r.apply(this,arguments)}}()}},function(e,t,r){var n=r(0),i=r(6);e.exports=function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.readyState>=2)){e.next=2;break}throw new Error("socket closed");case 2:if(1!==t.readyState){e.next=4;break}return e.abrupt("return");case 4:return e.abrupt("return",new Promise((function(e,r){var n=t&&(t.removeEventListener||t.removeListener);function i(){"function"===typeof n&&(n.call(t,"open",o),n.call(t,"error",a))}function o(){i(),e()}function a(e){i(),r(e)}t.addEventListener("open",o),t.addEventListener("error",a)})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){var n=r(1004).relative,i={http:"ws",https:"wss"};e.exports=function(e,t){return n(e,t,i,"ws")}},function(e,t,r){"use strict";var n=r(486),i=n.URLWithLegacySupport,o=n.format,a=n.URLSearchParams,s=n.defaultBase,u=r(1005);e.exports={URL:i,URLSearchParams:a,format:o,relative:u,defaultBase:s}},function(e,t,r){"use strict";var n=r(486),i=n.URLWithLegacySupport,o=n.format;e.exports=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,s=r.protocol?r.protocol.replace(":",""):"http";s=(n[s]||a||s)+":";try{t=new i(e)}catch(c){t={}}var u=Object.assign({},r,{protocol:s||t.protocol,host:r.host||t.host});return new i(e,o(u)).toString()}},function(e,t,r){var n=r(42).Multiaddr,i=function(e,t){return t},o={ip4:i,ip6:function(e,t,r,n){return 1===n.length&&"ip6"===n[0].protocol?t:"[".concat(t,"]")},tcp:function(e,t,r,n,i){return n.some((function(e){return["http","https","ws","wss"].includes(e.protocol)}))?"".concat(e,":").concat(t):function(e,t,r,n){if(n&&!1===n.assumeHttp)return"tcp://".concat(e,":").concat(t);var i="tcp",o=":".concat(t);return"tcp"===r[r.length-1].protocol&&(i="443"===t?"https":"http",o="443"===t||"80"===t?"":o),"".concat(i,"://").concat(e).concat(o)}(e,t,n,i)},udp:function(e,t){return"udp://".concat(e,":").concat(t)},dnsaddr:i,dns4:i,dns6:i,ipfs:function(e,t){return"".concat(e,"/ipfs/").concat(t)},p2p:function(e,t){return"".concat(e,"/p2p/").concat(t)},http:function(e){return"http://".concat(e)},https:function(e){return"https://".concat(e)},ws:function(e){return"ws://".concat(e)},wss:function(e){return"wss://".concat(e)},"p2p-websocket-star":function(e){return"".concat(e,"/p2p-websocket-star")},"p2p-webrtc-star":function(e){return"".concat(e,"/p2p-webrtc-star")},"p2p-webrtc-direct":function(e){return"".concat(e,"/p2p-webrtc-direct")}};e.exports=function(e,t){var r=new n(e),i=e.toString().split("/").slice(1);return r.tuples().map((function(e){return{protocol:i.shift(),content:e[1]?i.shift():null}})).reduce((function(e,r,n,i){var a=o[r.protocol];if(!a)throw new Error("Unsupported protocol ".concat(r.protocol));return a(e,r.content,n,i,t)}),"")}},function(e,t,r){"use strict";(function(t){var n=r(480),i="object"===typeof window&&"object"===typeof document&&9===document.nodeType,o=n(),a=i&&!o,s=o&&!i,u=o&&i,c="undefined"!==typeof t&&"undefined"!==typeof t.release&&"node"===t.release.name&&!o,f="function"===typeof importScripts&&"undefined"!==typeof self&&"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,l="undefined"!==typeof t&&!1,h="undefined"!==typeof navigator&&"ReactNative"===navigator.product;e.exports={isTest:l,isElectron:o,isElectronMain:s,isElectronRenderer:u,isNode:c,isBrowser:a,isWebWorker:f,isEnvWithDom:i,isReactNative:h}}).call(this,r(39))},function(e,t,r){"use strict";e.exports=function(){throw new Error("WebSocket Servers can not be created in the browser!")}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(45),a=r(44),s=r(30),u=r(118),c=r(487).CLOSE_TIMEOUT,f=r(1010),l=r(1011),h=r(22),d=h("libp2p:websockets:socket");d.error=h("libp2p:websockets:socket:error"),e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={sink:function(r){return i(n.mark((function i(){return n.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t.signal&&(r=u(r,t.signal)),i.prev=1,i.next=4,e.sink(a(n.mark((function e(){var t,i,a,u,c,f,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,i=!1,e.prev=2,u=s(r);case 4:return e.next=6,o(u.next());case 6:return c=e.sent,t=c.done,e.next=10,o(c.value);case 10:if(f=e.sent,t){e.next=18;break}return l=f,e.next=15,l instanceof Uint8Array?l:l.slice();case 15:t=!0,e.next=4;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(2),i=!0,a=e.t0;case 24:if(e.prev=24,e.prev=25,t||null==u.return){e.next=29;break}return e.next=29,o(u.return());case 29:if(e.prev=29,!i){e.next=32;break}throw a;case 32:return e.finish(29);case 33:return e.finish(24);case 34:case"end":return e.stop()}}),e,null,[[2,20,24,34],[25,,29,33]])})))());case 4:i.next=9;break;case 6:i.prev=6,i.t0=i.catch(1),"aborted"!==i.t0.type&&d.error(i.t0);case 9:case"end":return i.stop()}}),i,null,[[1,6]])})))()},source:t.signal?u(e.source,t.signal):e.source,conn:e,localAddr:t.localAddr||(e.localAddress&&e.localPort?f(e.localAddress,e.localPort):void 0),remoteAddr:t.remoteAddr||f(e.remoteAddress,e.remotePort),timeline:{open:Date.now()},close:function(){return i(n.mark((function t(){var i,o,a,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Date.now(),t.prev=1,t.next=4,l(e.close(),c);case 4:t.next=11;break;case 6:t.prev=6,t.t0=t.catch(1),o=r.remoteAddr.toOptions(),a=o.host,s=o.port,d("timeout closing stream to %s:%s after %dms, destroying it manually",a,s,Date.now()-i),e.destroy();case 11:return t.prev=11,r.timeline.close=Date.now(),t.finish(11);case 14:case"end":return t.stop()}}),t,null,[[1,6,11,14]])})))()}};return e.socket.once&&e.socket.once("close",(function(){r.timeline.close||(r.timeline.close=Date.now())})),r}},function(e,t,r){"use strict";var n=r(22),i=Object.assign(n("libp2p:ip-port-to-multiaddr"),{error:n("libp2p:ip-port-to-multiaddr:err")}),o=r(42).Multiaddr,a=r(15),s=r(1072),u=s.Address4,c=s.Address6,f={ERR_INVALID_IP_PARAMETER:"ERR_INVALID_IP_PARAMETER",ERR_INVALID_PORT_PARAMETER:"ERR_INVALID_PORT_PARAMETER",ERR_INVALID_IP:"ERR_INVALID_IP"};e.exports=function(e,t){if("string"!==typeof e)throw a(new Error("invalid ip provided: ".concat(e)),f.ERR_INVALID_IP_PARAMETER);if("string"===typeof t&&(t=parseInt(t)),isNaN(t))throw a(new Error("invalid port provided: ".concat(t)),f.ERR_INVALID_PORT_PARAMETER);try{return new u(e),new o("/ip4/".concat(e,"/tcp/").concat(t))}catch(s){}try{var r=new c(e);return r.is4()?new o("/ip4/".concat(r.to4().correctForm(),"/tcp/").concat(t)):new o("/ip6/".concat(e,"/tcp/").concat(t))}catch(l){var n="invalid ip:port for creating a multiaddr: ".concat(e,":").concat(t);throw i.error(n),a(new Error(n),f.ERR_INVALID_IP)}},e.exports.Errors=f},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(29),a=r(8),s=r(26),u=r(27),c=function(e){s(r,e);var t=u(r);function r(e){var n;return a(this,r),(n=t.call(this,e)).name="TimeoutError",n}return r}(r(93)(Error)),f=function(e,t,r,a){var s,u=new Promise((function(u,f){if("number"!==typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");t!==1/0?(a=o({customTimers:{setTimeout:setTimeout,clearTimeout:clearTimeout}},a),s=a.customTimers.setTimeout.call(void 0,(function(){if("function"!==typeof r){var n="string"===typeof r?r:"Promise timed out after ".concat(t," milliseconds"),i=r instanceof Error?r:new c(n);"function"===typeof e.cancel&&e.cancel(),f(i)}else try{u(r())}catch(o){f(o)}}),t),i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=u,t.next=4,e;case 4:t.t1=t.sent,(0,t.t0)(t.t1),t.next=11;break;case 8:t.prev=8,t.t2=t.catch(0),f(t.t2);case 11:return t.prev=11,a.customTimers.clearTimeout.call(void 0,s),t.finish(11);case 14:case"end":return t.stop()}}),t,null,[[0,8,11,14]])})))()):u(e)}));return u.clear=function(){clearTimeout(s),s=void 0},u};e.exports=f,e.exports.default=f,e.exports.TimeoutError=c},,function(e,t,r){"use strict";(function(e){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};t.__esModule=!0,t.decrypt=t.encrypt=t.derive=t.verify=t.sign=t.getPublic=t.kdf=void 0;var s=new(r(410).ec)("secp256k1"),u=window.crypto||window.msCrypto,c=u.subtle||u.webkitSubtle;if(void 0===c||void 0===u)throw new Error("crypto and/or subtle api unavailable");var f=function(t){return u.getRandomValues(e.alloc(t))},l=function(t){return c.digest({name:"SHA-256"},t).then(e.from)};t.kdf=function(t,r){for(var n=1,i=0,o=Promise.resolve(e.from("")),a=function(){var r=e.from([n>>24,n>>16,n>>8,n]),a=l(e.concat([r,t]));o=o.then((function(t){return a.then((function(r){return e.concat([t,r])}))})),i+=32,n+=1};i<r;)a();return o};t.getPublic=function(t){return new Promise((function(r,n){32!==t.length?n(new Error("Private key should be 32 bytes long")):r(e.from(s.keyFromPrivate(t).getPublic("array")))}))};t.sign=function(t,r){return new Promise((function(n,i){32!==t.length?i(new Error("Private key should be 32 bytes long")):r.length<=0?i(new Error("Message should not be empty")):r.length>32?i(new Error("Message is too long (max 32 bytes)")):n(e.from(s.sign(r,t,{canonical:!0}).toDER("hex"),"hex"))}))};t.verify=function(e,t,r){return new Promise((function(n,i){try{65!==e.length||4!==e[0]?i(new Error("Public key should 65 bytes long")):t.length<=0?i(new Error("Message should not be empty")):t.length>32?i(new Error("Message is too long (max 32 bytes)")):s.verify(t,r.toString("hex"),e,"hex")?n(!0):i(new Error("Bad signature"))}catch(o){i(new Error("Invalid arguments"))}}))};t.derive=function(t,r){return new Promise((function(n,i){if(32!==t.length)i(new Error("Bad private key, it should be 32 bytes but it's actually "+t.length+" bytes long"));else if(65!==r.length)i(new Error("Bad public key, it should be 65 bytes but it's actually "+r.length+" bytes long"));else if(4!==r[0])i(new Error("Bad public key, a valid public key would begin with 4"));else{var o=s.keyFromPrivate(t),a=s.keyFromPublic(r),u=o.derive(a.getPublic());n(e.from(u.toArray()))}}))};t.encrypt=function(r,n,i){return o(void 0,void 0,void 0,(function(){var s;return a(this,(function(u){return s=(i=i||{}).ephemPrivateKey||f(32),[2,(0,t.derive)(s,r).then((function(e){return(0,t.kdf)(e,32)})).then((function(r){return o(void 0,void 0,void 0,(function(){var o,u;return a(this,(function(a){return o=i.iv||f(16),u=r.slice(0,16),[2,(h=o,d=u,p=n,c.importKey("raw",d,"AES-CTR",!1,["encrypt"]).then((function(e){return c.encrypt({name:"AES-CTR",counter:h,length:128},e,p)})).then(e.from)).then((function(t){return e.concat([o,t])})).then((function(n){return l(r.slice(16)).then((function(t){return function(t,r){var n={name:"HMAC",hash:{name:"SHA-256"}};return c.importKey("raw",t,n,!1,["sign"]).then((function(e){return c.sign(n,e,r)})).then(e.from)}(t,n)})).then((function(r){return(0,t.getPublic)(s).then((function(t){return e.concat([t,n,r])}))}))}))];var h,d,p}))}))}))]}))}))};t.decrypt=function(r,n){return new Promise((function(i,o){if(n.length<=113)o(new Error("Invalid Ciphertext. Data is too small. It should ba at least 113 bytes"));else if(4!==n[0])o(new Error("Not a valid ciphertext. It should begin with 4 but actually begin with "+n[0]));else{var a=n.slice(0,65),s=n.length-113,u=n.slice(65,81),f=n.slice(65,81+s),h=f.slice(16),d=n.slice(81+s);i((0,t.derive)(r,a).then((function(e){return(0,t.kdf)(e,32)})).then((function(e){return l(e.slice(16)).then((function(t){return[e.slice(0,16),t]}))})).then((function(t){var r=t[0];return function(e,t,r){var n={name:"HMAC",hash:{name:"SHA-256"}};return c.importKey("raw",e,n,!1,["verify"]).then((function(e){return c.verify(n,e,r,t)}))}(t[1],f,d).then((function(t){return t?(n=u,i=r,o=h,c.importKey("raw",i,"AES-CTR",!1,["decrypt"]).then((function(e){return c.decrypt({name:"AES-CTR",counter:n,length:128},e,o)})).then(e.from)):Promise.reject(new Error("Incorrect MAC"));var n,i,o}))})).then(e.from))}}))},i(r(1014),t)}).call(this,r(13).Buffer)},function(e,t,r){"use strict";t.__esModule=!0,t.KeyPath=t.Path=void 0;t.Path=function(e,t,r){return{account:e,scope:t,keyIndex:r}};var n=function(e){var r=e.split("/");if(4!==r.length||"m"!==r[0])throw new Error("invalid value for path");return(0,t.Path)(r[1],r[2],r[3])},i=function(e){var t=n(e);if(parseInt(t.account)>Math.pow(2,16)-1||parseInt(t.scope)>Math.pow(2,16)-1||parseInt(t.keyIndex)>Math.pow(2,21)-1)throw new Error("invalid path with value exceeding its limits");return e},o=function(e){return function(){var t=n(e);return parseInt(t.account)*Math.pow(2,37)+parseInt(t.scope)*Math.pow(2,21)+parseInt(t.keyIndex)}};t.KeyPath=function(e){return{value:i(e),parse:function(){return n(e)},next:function(r){return function(e,r){var i=n(e),o=parseInt(i.keyIndex),a=void 0!==r&&r>1?r:1,s="m/"+i.account+"/"+i.scope+"/"+(o+a).toString(10);return(0,t.KeyPath)(s)}(e,r)},valueOf:o(e)}}},,,function(e,t,r){"use strict";var n=r(40),i=r(0),o=r(21),a=r(8),s=r(9),u=r(61),c=r(136),f=r(84),l=r(26),h=r(27),d=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),p=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&d(t,e,r);return p(t,e),t},y=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},b=v(r(1018)),g=r(1047),m=r(1048),w=v(r(135)),k=r(495),S=r(496),E=r(76),_=r(1049),A=r(1056),x=r(1057),T=r(219),M=r(212),C=function(e){l(r,e);var t=h(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,r);var o=[w.GossipsubIDv11,w.GossipsubIDv10],s=Object.assign(Object.assign({gossipIncoming:!0,fallbackToFloodsub:!0,floodPublish:!0,doPX:!1,directPeers:[],D:w.GossipsubD,Dlo:w.GossipsubDlo,Dhi:w.GossipsubDhi,Dscore:w.GossipsubDscore,Dout:w.GossipsubDout,Dlazy:w.GossipsubDlazy,heartbeatInterval:w.GossipsubHeartbeatInterval,fanoutTTL:w.GossipsubFanoutTTL,mcacheLength:w.GossipsubHistoryLength,mcacheGossip:w.GossipsubHistoryGossip,seenTTL:w.GossipsubSeenTTL},i),{scoreParams:_.createPeerScoreParams(i.scoreParams),scoreThresholds:_.createPeerScoreThresholds(i.scoreThresholds)});return s.fallbackToFloodsub&&o.push(w.FloodsubID),(n=t.call(this,Object.assign({debugName:"libp2p:gossipsub",multicodecs:o,libp2p:e},s)))._options=s,n.direct=new Set(s.directPeers.map((function(e){return e.id.toB58String()}))),s.directPeers.forEach((function(t){e.peerStore.addressBook.add(t.id,t.addrs)})),n.seenCache=new x({validity:s.seenTTL/1e3}),n.mesh=new Map,n.fanout=new Map,n.lastpub=new Map,n.gossip=new Map,n.control=new Map,n.peerhave=new Map,n.iasked=new Map,n.backoff=new Map,n.outbound=new Map,n.messageCache=i.messageCache||new g.MessageCache(s.mcacheGossip,s.mcacheLength,n.getMsgId.bind(u(n))),n.heartbeat=new k.Heartbeat(u(n)),n.heartbeatTicks=0,n.gossipTracer=new A.IWantTracer(n.getMsgId.bind(u(n))),n._libp2p=e,n.score=new _.PeerScore(n._options.scoreParams,e.connectionManager,n.getMsgId.bind(u(n))),n}return s(r,[{key:"_decodeRpc",value:function(e){return m.RPC.decode(e)}},{key:"_encodeRpc",value:function(e){return m.RPC.encode(e).finish()}},{key:"_addPeer",value:function(e,t){var n=c(f(r.prototype),"_addPeer",this).call(this,e,t);this.score.addPeer(e.toB58String());var i,a=!1,s=o(this._libp2p.connectionManager.getAll(e));try{for(s.s();!(i=s.n()).done;){var u=i.value;if("outbound"===u.stat.direction&&Array.from(u.registry.values()).some((function(e){return t===e.protocol}))){a=!0;break}}}catch(l){s.e(l)}finally{s.f()}return this.outbound.set(n.id.toB58String(),a),n}},{key:"_removePeer",value:function(e){var t,n=c(f(r.prototype),"_removePeer",this).call(this,e),i=e.toB58String(),a=o(this.mesh.values());try{for(a.s();!(t=a.n()).done;){t.value.delete(i)}}catch(l){a.e(l)}finally{a.f()}var s,u=o(this.fanout.values());try{for(u.s();!(s=u.n()).done;){s.value.delete(i)}}catch(l){u.e(l)}finally{u.f()}return this.gossip.delete(i),this.control.delete(i),this.outbound.delete(i),this.score.removePeer(i),n}},{key:"_processRpc",value:function(e,t,n){var o=this,a=Object.create(null,{_processRpc:{get:function(){return c(f(r.prototype),"_processRpc",o)}}});return y(this,void 0,void 0,i.mark((function r(){return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,a._processRpc.call(this,e,t,n);case 2:if(!r.sent){r.next=5;break}return n.control&&this._processRpcControlMessage(e,n.control),r.abrupt("return",!0);case 5:return r.abrupt("return",!1);case 6:case"end":return r.stop()}}),r,this)})))}},{key:"_processRpcControlMessage",value:function(e,t){if(t){var r=t.ihave?this._handleIHave(e,t.ihave):[],n=t.iwant?this._handleIWant(e,t.iwant):[],i=t.graft?this._handleGraft(e,t.graft):[];if(t.prune&&this._handlePrune(e,t.prune),r.length||n.length||i.length){var o=E.createGossipRpc(n,{iwant:r,prune:i});this._sendRpc(e,o)}}}},{key:"_processRpcMessage",value:function(e){var t=this,n=Object.create(null,{_processRpcMessage:{get:function(){return c(f(r.prototype),"_processRpcMessage",t)}}});return y(this,void 0,void 0,i.mark((function t(){var r,o;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getMsgId(e);case 2:if(r=t.sent,o=E.messageIdToString(r),!this.seenCache.has(o)){t.next=7;break}return this.score.duplicateMessage(e),t.abrupt("return");case 7:return this.seenCache.put(o),t.next=10,this.score.validateMessage(e);case 10:return t.next=12,n._processRpcMessage.call(this,e);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"_acceptFrom",value:function(e){return this.direct.has(e)||this.score.score(e)>=this._options.scoreThresholds.graylistThreshold}},{key:"validate",value:function(e){var t=this,n=Object.create(null,{validate:{get:function(){return c(f(r.prototype),"validate",t)}}});return y(this,void 0,void 0,i.mark((function t(){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.validate.call(this,e);case 3:t.next=10;break;case 5:throw t.prev=5,t.t0=t.catch(0),this.score.rejectMessage(e,t.t0.code),this.gossipTracer.rejectMessage(e,t.t0.code),t.t0;case 10:case"end":return t.stop()}}),t,this,[[0,5]])})))}},{key:"_handleIHave",value:function(e,t){var r=this;if(!t.length)return[];var n=this.score.score(e);if(n<this._options.scoreThresholds.gossipThreshold)return this.log("IHAVE: ignoring peer %s with score below threshold [ score = %d ]",e,n),[];var i=(this.peerhave.get(e)||0)+1;if(this.peerhave.set(e,i),i>w.GossipsubMaxIHaveMessages)return this.log("IHAVE: peer %s has advertised too many times (%d) within this heartbeat interval; ignoring",e,i),[];var o=this.iasked.get(e)||0;if(o>=w.GossipsubMaxIHaveLength)return this.log("IHAVE: peer %s has already advertised too many messages (%d); ignoring",e,o),[];var a=new Map;if(t.forEach((function(e){var t=e.topicID,n=e.messageIDs;t&&n&&r.mesh.has(t)&&n.forEach((function(e){var t=E.messageIdToString(e);r.seenCache.has(t)||a.set(t,e)}))})),!a.size)return[];var s=a.size;s+o>w.GossipsubMaxIHaveLength&&(s=w.GossipsubMaxIHaveLength-o),this.log("IHAVE: Asking for %d out of %d messages from %s",s,a.size,e);var u=Array.from(a.values());return E.shuffle(u),u=u.slice(0,s),this.iasked.set(e,o+s),this.gossipTracer.addPromise(e,u),[{messageIDs:u}]}},{key:"_handleIWant",value:function(e,t){var r=this;if(!t.length)return[];var i=this.score.score(e);if(i<this._options.scoreThresholds.gossipThreshold)return this.log("IWANT: ignoring peer %s with score below threshold [score = %d]",e,i),[];var o=new Map;return t.forEach((function(t){var i=t.messageIDs;i&&i.forEach((function(t){var i=r.messageCache.getForPeer(t,e),a=n(i,2),s=a[0],u=a[1];s&&(u>w.GossipsubGossipRetransmission?r.log("IWANT: Peer %s has asked for message %s too many times: ignoring request",e,t):o.set(E.messageIdToString(t),s))}))})),o.size?(this.log("IWANT: Sending %d messages to %s",o.size,e),Array.from(o.values()).map(b.utils.normalizeOutRpcMessage)):[]}},{key:"_handleGraft",value:function(e,t){var r=this,n=[],i=this.score.score(e),o=this._now(),a=this._options.doPX;return t.forEach((function(t){var s,u=t.topicID;if(u){var c=r.mesh.get(u);if(c){if(!c.has(e)){if(r.direct.has(e))return r.log("GRAFT: ignoring request from direct peer %s",e),n.push(u),void(a=!1);var f=null===(s=r.backoff.get(u))||void 0===s?void 0:s.get(e);if("number"===typeof f&&o<f){r.log("GRAFT: ignoring backed off peer %s",e),r.score.addPenalty(e,1),a=!1;var l=f+w.GossipsubGraftFloodThreshold-w.GossipsubPruneBackoff;return o<l&&r.score.addPenalty(e,1),r._addBackoff(e,u),void n.push(u)}if(i<0)return r.log("GRAFT: ignoring peer %s with negative score: score=%d, topic=%s",e,i,u),n.push(u),a=!1,void r._addBackoff(e,u);if(c.size>=r._options.Dhi&&!r.outbound.get(e))return n.push(u),void r._addBackoff(e,u);r.log("GRAFT: Add mesh link from %s in %s",e,u),r.score.graft(e,u),c.add(e)}}else a=!1}})),n.length?n.map((function(t){return r._makePrune(e,t,a)})):[]}},{key:"_handlePrune",value:function(e,t){var r=this,n=this.score.score(e);t.forEach((function(t){var i=t.topicID,o=t.backoff,a=t.peers;if(i){var s=r.mesh.get(i);if(s&&(r.log("PRUNE: Remove mesh link to %s in %s",e,i),r.score.prune(e,i),s.delete(e),"number"===typeof o&&o>0?r._doAddBackoff(e,i,1e3*o):r._addBackoff(e,i),a&&a.length)){if(n<r._options.scoreThresholds.acceptPXThreshold)return void r.log("PRUNE: ignoring PX from peer %s with insufficient score [score = %d, topic = %s]",e,n,i);r._pxConnect(a)}}}))}},{key:"_addBackoff",value:function(e,t){this._doAddBackoff(e,t,w.GossipsubPruneBackoff)}},{key:"_doAddBackoff",value:function(e,t,r){var n=this.backoff.get(t);n||(n=new Map,this.backoff.set(t,n));var i=this._now()+r;(n.get(e)||0)<i&&n.set(e,i)}},{key:"_applyIwantPenalties",value:function(){var e=this;this.gossipTracer.getBrokenPromises().forEach((function(t,r){e.log("peer %s didn't follow up in %d IWANT requests; adding penalty",r,t),e.score.addPenalty(r,t)}))}},{key:"_clearBackoff",value:function(){var e=this;if(this.heartbeatTicks%w.GossipsubPruneBackoffTicks===0){var t=this._now();this.backoff.forEach((function(r,n){r.forEach((function(e,n){e<t&&r.delete(n)})),0===r.size&&e.backoff.delete(n)}))}}},{key:"_directConnect",value:function(){var e=this;if(this.heartbeatTicks%w.GossipsubDirectConnectTicks===0){var t=[];this.direct.forEach((function(r){var n=e.peers.get(r);n&&n.isWritable||t.push(r)})),t.length&&t.forEach((function(t){e._connect(t)}))}}},{key:"_pxConnect",value:function(e){return y(this,void 0,void 0,i.mark((function t(){var r,n=this;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.length>w.GossipsubPrunePeers&&(E.shuffle(e),e=e.slice(0,w.GossipsubPrunePeers)),r=[],t.next=4,Promise.all(e.map((function(e){return y(n,void 0,void 0,i.mark((function t(){var n,o,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.peerID){t.next=2;break}return t.abrupt("return");case 2:if(n=T.createFromBytes(e.peerID),o=n.toB58String(),!this.peers.has(o)){t.next=6;break}return t.abrupt("return");case 6:if(e.signedPeerRecord){t.next=9;break}return r.push(o),t.abrupt("return");case 9:return t.prev=9,t.next=12,M.openAndCertify(e.signedPeerRecord,"libp2p-peer-record");case 12:if(a=t.sent,s=a.peerId.toB58String(),o===s){t.next=17;break}return this.log("bogus peer record obtained through px: peer ID %s doesn't match expected peer %s",s,o),t.abrupt("return");case 17:if(this._libp2p.peerStore.addressBook.consumePeerRecord(a)){t.next=20;break}return this.log("bogus peer record obtained through px: could not add peer record to address book"),t.abrupt("return");case 20:r.push(o),t.next=26;break;case 23:t.prev=23,t.t0=t.catch(9),this.log("bogus peer record obtained through px: invalid signature or not a peer record");case 26:case"end":return t.stop()}}),t,this,[[9,23]])})))})));case 4:if(r.length){t.next=6;break}return t.abrupt("return");case 6:r.forEach((function(e){return n._connect(e)}));case 7:case"end":return t.stop()}}),t)})))}},{key:"start",value:function(){var e=this;c(f(r.prototype),"start",this).call(this),this.heartbeat.start(),this.score.start(),this._directPeerInitial=setTimeout((function(){e.direct.forEach((function(t){e._connect(t)}))}),w.GossipsubDirectConnectInitialDelay)}},{key:"stop",value:function(){c(f(r.prototype),"stop",this).call(this),this.heartbeat.stop(),this.score.stop(),this.mesh=new Map,this.fanout=new Map,this.lastpub=new Map,this.gossip=new Map,this.control=new Map,this.peerhave=new Map,this.iasked=new Map,this.backoff=new Map,this.outbound=new Map,this.gossipTracer.clear(),clearTimeout(this._directPeerInitial)}},{key:"_connect",value:function(e){this.log("Initiating connection with %s",e),this._libp2p.dialProtocol(T.createFromB58String(e),this.multicodecs)}},{key:"subscribe",value:function(e){c(f(r.prototype),"subscribe",this).call(this,e),this.join(e)}},{key:"unsubscribe",value:function(e){c(f(r.prototype),"unsubscribe",this).call(this,e),this.leave(e)}},{key:"join",value:function(e){var t=this;if(!this.started)throw new Error("Gossipsub has not started");this.log("JOIN %s",e);var r=this.fanout.get(e);if(r)r.forEach((function(e){t.score.score(e)<0&&r.delete(e)})),r.size<this._options.D&&S.getGossipPeers(this,e,this._options.D-r.size,(function(e){return!r.has(e)&&!t.direct.has(e)&&t.score.score(e)>=0})).forEach((function(e){return r.add(e)})),this.mesh.set(e,r),this.fanout.delete(e),this.lastpub.delete(e);else{var n=S.getGossipPeers(this,e,this._options.D,(function(e){return!t.direct.has(e)&&t.score.score(e)>=0}));this.mesh.set(e,n)}this.mesh.get(e).forEach((function(r){t.log("JOIN: Add mesh link to %s in %s",r,e),t._sendGraft(r,e)}))}},{key:"leave",value:function(e){var t=this;if(!this.started)throw new Error("Gossipsub has not started");this.log("LEAVE %s",e);var r=this.mesh.get(e);r&&(r.forEach((function(r){t.log("LEAVE: Remove mesh link to %s in %s",r,e),t._sendPrune(r,e)})),this.mesh.delete(e))}},{key:"_publish",value:function(e){return y(this,void 0,void 0,i.mark((function t(){var r,n,o,a,s=this;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.receivedFrom!==this.peerId.toB58String()&&(this.score.deliverMessage(e),this.gossipTracer.deliverMessage(e)),t.next=3,this.getMsgId(e);case 3:r=t.sent,n=E.messageIdToString(r),this.seenCache.put(n),this.messageCache.put(e),o=new Set,e.topicIDs.forEach((function(t){var r=s.topics.get(t);if(r)if(s._options.floodPublish&&e.from===s.peerId.toB58String())r.forEach((function(e){(s.direct.has(e)||s.score.score(e)>=s._options.scoreThresholds.publishThreshold)&&o.add(e)}));else{s.direct.forEach((function(e){o.add(e)})),r.forEach((function(e){var t=s.score.score(e),r=s.peers.get(e);r&&r.protocol===w.FloodsubID&&t>=s._options.scoreThresholds.publishThreshold&&o.add(e)}));var n=s.mesh.get(t);if(!n||!n.size){if(!(n=s.fanout.get(t))){var i=S.getGossipPeers(s,t,s._options.D,(function(e){return s.score.score(e)>=s._options.scoreThresholds.publishThreshold}));i.size>0?(n=i,s.fanout.set(t,i)):n=new Set}s.lastpub.set(t,s._now())}n.forEach((function(e){o.add(e)}))}})),a=E.createGossipRpc([b.utils.normalizeOutRpcMessage(e)]),o.forEach((function(t){t!==e.from&&s._sendRpc(t,a)}));case 11:case"end":return t.stop()}}),t,this)})))}},{key:"_sendGraft",value:function(e,t){var r=[{topicID:t}],n=E.createGossipRpc([],{graft:r});this._sendRpc(e,n)}},{key:"_sendPrune",value:function(e,t){var r=[this._makePrune(e,t,this._options.doPX)],n=E.createGossipRpc([],{prune:r});this._sendRpc(e,n)}},{key:"_sendRpc",value:function(e,t){var r=this.peers.get(e);if(r&&r.isWritable){var n=this.control.get(e);n&&(this._piggybackControl(e,t,n),this.control.delete(e));var i=this.gossip.get(e);i&&(this._piggybackGossip(e,t,i),this.gossip.delete(e)),r.write(m.RPC.encode(t).finish())}}},{key:"_piggybackControl",value:function(e,t,r){var n=this,i=(r.graft||[]).filter((function(t){var r=t.topicID;return(r&&n.mesh.get(r)||new Set).has(e)})),o=(r.prune||[]).filter((function(t){var r=t.topicID;return!(r&&n.mesh.get(r)||new Set).has(e)}));(i.length||o.length)&&(t.control?(t.control.graft=t.control.graft&&t.control.graft.concat(i),t.control.prune=t.control.prune&&t.control.prune.concat(o)):t.control={ihave:[],iwant:[],graft:i,prune:o})}},{key:"_piggybackGossip",value:function(e,t,r){t.control||(t.control={ihave:[],iwant:[],graft:[],prune:[]}),t.control.ihave=r}},{key:"_sendGraftPrune",value:function(e,t,r){var i,a=this,s=this._options.doPX,u=o(e);try{var c=function(){var e=n(i.value,2),o=e[0],u=e[1].map((function(e){return{topicID:e}})),c=[],f=t.get(o);f&&(c=f.map((function(e){return a._makePrune(o,e,s&&!r.get(o))})),t.delete(o));var l=E.createGossipRpc([],{graft:u,prune:c});a._sendRpc(o,l)};for(u.s();!(i=u.n()).done;)c()}catch(d){u.e(d)}finally{u.f()}var f,l=o(t);try{var h=function(){var e=n(f.value,2),t=e[0],i=e[1].map((function(e){return a._makePrune(t,e,s&&!r.get(t))})),o=E.createGossipRpc([],{prune:i});a._sendRpc(t,o)};for(l.s();!(f=l.n()).done;)h()}catch(d){l.e(d)}finally{l.f()}}},{key:"_emitGossip",value:function(e,t){var r=this,n=this.messageCache.getGossipIDs(e);if(n.length){E.shuffle(n),n.length>w.GossipsubMaxIHaveLength&&this.log("too many messages for gossip; will truncate IHAVE list (%d messages)",n.length);var i=[],o=this.topics.get(e);if(o){o.forEach((function(e){var n=r.peers.get(e);n&&!t.has(e)&&!r.direct.has(e)&&E.hasGossipProtocol(n.protocol)&&r.score.score(e)>=r._options.scoreThresholds.gossipThreshold&&i.push(e)}));var a=this._options.Dlazy,s=w.GossipsubGossipFactor*i.length;s>a&&(a=s),a>i.length?a=i.length:E.shuffle(i),i.slice(0,a).forEach((function(t){var i=n;n.length>w.GossipsubMaxIHaveLength&&(i=E.shuffle(i.slice()).slice(0,w.GossipsubMaxIHaveLength)),r._pushGossip(t,{topicID:e,messageIDs:i})}))}}}},{key:"_flush",value:function(){var e,t=o(this.gossip.entries());try{for(t.s();!(e=t.n()).done;){var r=n(e.value,2),i=r[0],a=r[1];this.gossip.delete(i);var s=E.createGossipRpc([],{ihave:a});this._sendRpc(i,s)}}catch(p){t.e(p)}finally{t.f()}var u,c=o(this.control.entries());try{for(c.s();!(u=c.n()).done;){var f=n(u.value,2),l=f[0],h=f[1];this.control.delete(l);var d=E.createGossipRpc([],{graft:h.graft,prune:h.prune});this._sendRpc(l,d)}}catch(p){c.e(p)}finally{c.f()}}},{key:"_pushGossip",value:function(e,t){this.log("Add gossip to %s",e);var r=this.gossip.get(e)||[];this.gossip.set(e,r.concat(t))}},{key:"_now",value:function(){return Date.now()}},{key:"_makePrune",value:function(e,t,r){var n=this;if(this.peers.get(e).protocol===w.GossipsubIDv10)return{topicID:t,peers:[]};var i=w.GossipsubPruneBackoff/1e3,o=[];r&&S.getGossipPeers(this,t,w.GossipsubPrunePeers,(function(t){return t!==e&&n.score.score(t)>=0})).forEach((function(e){var t=T.createFromB58String(e);o.push({peerID:t.toBytes(),signedPeerRecord:n._libp2p.peerStore.addressBook.getRawEnvelope(t)})}));return{topicID:t,peers:o,backoff:i}}}]),r}(b.default);C.multicodec=w.GossipsubIDv11,e.exports=C},function(e,t,r){"use strict";var n=r(21),i=r(0),o=r(6),a=r(8),s=r(9),u=r(61),c=r(26),f=r(27),l=r(30),h=r(22),d=r(57).EventEmitter,p=r(15),v=r(60).pipe,y=r(1019).default,b=r(1025),g=r(305).codes,m=r(492).RPC,w=r(1027),k=r(1028).SignaturePolicy,S=r(493),E=r(1046),_=E.signMessage,A=E.verifySignature,x=function(e){c(r,e);var t=f(r);function r(e){var n,i=e.debugName,o=e.multicodecs,s=e.libp2p,c=e.globalSignaturePolicy,f=void 0===c?k.StrictSign:c,l=e.canRelayMessage,d=void 0!==l&&l,v=e.emitSelf,b=void 0!==v&&v,m=e.messageProcessingConcurrency,w=void 0===m?10:m;if(a(this,r),"string"!==typeof i)throw new Error("a debugname `string` is required");if(!o)throw new Error("multicodecs are required");if(!s)throw new Error("libp2p is required");if((n=t.call(this)).log=Object.assign(h(i),{err:h("".concat(i,":error"))}),n.multicodecs=S.ensureArray(o),n._libp2p=s,n.registrar=s.registrar,n.peerId=s.peerId,n.started=!1,n.topics=new Map,n.subscriptions=new Set,n.peers=new Map,!k[f])throw p(new Error("Invalid global signature policy"),g.ERR_INVALID_SIGNATURE_POLICY);return n.globalSignaturePolicy=f,n.canRelayMessage=d,n.emitSelf=b,n.topicValidators=new Map,n.queue=new y({concurrency:w}),n._registrarId=void 0,n._onIncomingStream=n._onIncomingStream.bind(u(n)),n._onPeerConnected=n._onPeerConnected.bind(u(n)),n._onPeerDisconnected=n._onPeerDisconnected.bind(u(n)),n}return s(r,[{key:"start",value:function(){if(!this.started){this.log("starting"),this.registrar.handle(this.multicodecs,this._onIncomingStream);var e=new b({multicodecs:this.multicodecs,handlers:{onConnect:this._onPeerConnected,onDisconnect:this._onPeerDisconnected}});this._registrarId=this.registrar.register(e),this.log("started"),this.started=!0}}},{key:"stop",value:function(){this.started&&(this.registrar.unregister(this._registrarId),this.log("stopping"),this.peers.forEach((function(e){return e.close()})),this.peers=new Map,this.subscriptions=new Set,this.started=!1,this.log("stopped"))}},{key:"_onIncomingStream",value:function(e){var t=e.protocol,r=e.stream,n=e.connection.remotePeer,i=n.toB58String(),o=this._addPeer(n,t),a=o.attachInboundStream(r);this._processMessages(i,a,o)}},{key:"_onPeerConnected",value:function(){var e=o(i.mark((function e(t,r){var n,o,a,s,u;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.toB58String(),this.log("connected",n),e.prev=2,e.next=5,r.newStream(this.multicodecs);case 5:return o=e.sent,a=o.stream,s=o.protocol,u=this._addPeer(t,s),e.next=11,u.attachOutboundStream(a);case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),this.log.err(e.t0);case 16:this._sendSubscriptions(n,Array.from(this.subscriptions),!0);case 17:case"end":return e.stop()}}),e,this,[[2,13]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_onPeerDisconnected",value:function(e,t){var r=e.toB58String();this.log("connection ended",r,t?t.message:""),this._removePeer(e)}},{key:"_addPeer",value:function(e,t){var r=this,n=e.toB58String(),i=this.peers.get(n);if(i)return i;this.log("new peer",n);var o=new w({id:e,protocol:t});return this.peers.set(n,o),o.once("close",(function(){return r._removePeer(e)})),o}},{key:"_removePeer",value:function(e){if(e){var t=e.toB58String(),r=this.peers.get(t);if(r){r.removeAllListeners(),r.close(),this.log("delete peer",t),this.peers.delete(t);var i,o=n(this.topics.values());try{for(o.s();!(i=o.n()).done;){i.value.delete(t)}}catch(a){o.e(a)}finally{o.f()}return r}}}},{key:"_processMessages",value:function(){var e=o(i.mark((function e(t,r,n){var a=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v(r,function(){var e=o(i.mark((function e(r){var s,u,c,f,h,d,p;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=!0,u=!1,e.prev=2,f=function(){var e=p instanceof Uint8Array?p:p.slice(),r=a._decodeRpc(e);o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a._processRpc(t,n,r);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),a.log.err(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})))()},h=l(r);case 5:return e.next=7,h.next();case 7:return d=e.sent,s=d.done,e.next=11,d.value;case 11:if(p=e.sent,s){e.next=17;break}f();case 14:s=!0,e.next=5;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(2),u=!0,c=e.t0;case 23:if(e.prev=23,e.prev=24,s||null==h.return){e.next=28;break}return e.next=28,h.return();case 28:if(e.prev=28,!u){e.next=31;break}throw c;case 31:return e.finish(28);case 32:return e.finish(23);case 33:case"end":return e.stop()}}),e,null,[[2,19,23,33],[24,,28,32]])})));return function(t){return e.apply(this,arguments)}}());case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),this._onPeerDisconnected(n.id,e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_processRpc",value:function(){var e=o(i.mark((function e(t,r,n){var a,s,u=this;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.log("rpc from",t),a=n.subscriptions,s=n.msgs,a.length&&(a.forEach((function(e){u._processRpcSubOpt(t,e)})),this.emit("pubsub:subscription-change",r.id,a)),this._acceptFrom(t)){e.next=7;break}return this.log("received message from unacceptable peer %s",t),e.abrupt("return",!1);case 7:return s.length&&this.queue.addAll(s.map((function(e){return o(i.mark((function r(){var n;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(u.canRelayMessage||e.topicIDs&&e.topicIDs.some((function(e){return u.subscriptions.has(e)}))){r.next=3;break}return u.log("received message we didn't subscribe to. Dropping."),r.abrupt("return");case 3:return r.prev=3,n=S.normalizeInRpcMessage(e,t),r.next=7,u._processRpcMessage(n);case 7:r.next=12;break;case 9:r.prev=9,r.t0=r.catch(3),u.log.err(r.t0);case 12:case"end":return r.stop()}}),r,null,[[3,9]])})))}))),e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_processRpcSubOpt",value:function(e,t){var r=t.topicID;if(r){var n=this.topics.get(r);n||(n=new Set,this.topics.set(r,n)),t.subscribe?n.add(e):n.delete(e)}}},{key:"_processRpcMessage",value:function(){var e=o(i.mark((function e(t){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.peerId.toB58String()!==t.from||this.emitSelf){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this.validate(t);case 5:e.next=11;break;case 7:return e.prev=7,e.t0=e.catch(2),this.log("Message is invalid, dropping it. %O",e.t0),e.abrupt("return");case 11:return this._emitMessage(t),e.abrupt("return",this._publish(S.normalizeOutRpcMessage(t)));case 13:case"end":return e.stop()}}),e,this,[[2,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_emitMessage",value:function(e){var t=this;e.topicIDs.forEach((function(r){t.subscriptions.has(r)&&t.emit(r,e)}))}},{key:"getMsgId",value:function(e){var t=this.globalSignaturePolicy;switch(t){case k.StrictSign:return S.msgId(e.from,e.seqno);case k.StrictNoSign:return S.noSignMsgId(e.data);default:throw p(new Error("Cannot get message id: unhandled signature policy: "+t),g.ERR_UNHANDLED_SIGNATURE_POLICY)}}},{key:"_acceptFrom",value:function(e){return!0}},{key:"_decodeRpc",value:function(e){return m.decode(e)}},{key:"_encodeRpc",value:function(e){return m.encode(e).finish()}},{key:"_sendRpc",value:function(e,t){var r=this.peers.get(e);if(r&&r.isWritable)r.write(this._encodeRpc(t));else{var n="Cannot send RPC to ".concat(e," as there is no open stream to it available");this.log.err(n)}}},{key:"_sendSubscriptions",value:function(e,t,r){return this._sendRpc(e,{subscriptions:t.map((function(e){return{topicID:e,subscribe:r}}))})}},{key:"validate",value:function(){var e=o(i.mark((function e(t){var r,o,a,s,u;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=this.globalSignaturePolicy,e.t0=r,e.next=e.t0===k.StrictNoSign?4:e.t0===k.StrictSign?13:22;break;case 4:if(!t.from){e.next=6;break}throw p(new Error("StrictNoSigning: from should not be present"),g.ERR_UNEXPECTED_FROM);case 6:if(!t.signature){e.next=8;break}throw p(new Error("StrictNoSigning: signature should not be present"),g.ERR_UNEXPECTED_SIGNATURE);case 8:if(!t.key){e.next=10;break}throw p(new Error("StrictNoSigning: key should not be present"),g.ERR_UNEXPECTED_KEY);case 10:if(!t.seqno){e.next=12;break}throw p(new Error("StrictNoSigning: seqno should not be present"),g.ERR_UNEXPECTED_SEQNO);case 12:return e.abrupt("break",23);case 13:if(t.signature){e.next=15;break}throw p(new Error("StrictSigning: Signing required and no signature was present"),g.ERR_MISSING_SIGNATURE);case 15:if(t.seqno){e.next=17;break}throw p(new Error("StrictSigning: Signing required and no seqno was present"),g.ERR_MISSING_SEQNO);case 17:return e.next=19,A(t);case 19:if(e.sent){e.next=21;break}throw p(new Error("StrictSigning: Invalid message signature"),g.ERR_INVALID_SIGNATURE);case 21:return e.abrupt("break",23);case 22:throw p(new Error("Cannot validate message: unhandled signature policy: "+r),g.ERR_UNHANDLED_SIGNATURE_POLICY);case 23:o=n(t.topicIDs),e.prev=24,o.s();case 26:if((a=o.n()).done){e.next=34;break}if(s=a.value,!(u=this.topicValidators.get(s))){e.next=32;break}return e.next=32,u(s,t);case 32:e.next=26;break;case 34:e.next=39;break;case 36:e.prev=36,e.t1=e.catch(24),o.e(e.t1);case 39:return e.prev=39,o.f(),e.finish(39);case 42:case"end":return e.stop()}}),e,this,[[24,36,39,42]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_buildMessage",value:function(e){var t=this.globalSignaturePolicy;switch(t){case k.StrictSign:return e.from=this.peerId.toB58String(),e.seqno=S.randomSeqno(),_(this.peerId,e);case k.StrictNoSign:return Promise.resolve(e);default:throw p(new Error("Cannot build message: unhandled signature policy: "+t),g.ERR_UNHANDLED_SIGNATURE_POLICY)}}},{key:"getSubscribers",value:function(e){if(!this.started)throw p(new Error("not started yet"),"ERR_NOT_STARTED_YET");if(!e||"string"!==typeof e)throw p(new Error("a string topic must be provided"),"ERR_NOT_VALID_TOPIC");var t=this.topics.get(e);return t?Array.from(t):[]}},{key:"publish",value:function(){var e=o(i.mark((function e(t,r){var n,o,a,s;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.started){e.next=2;break}throw new Error("Pubsub has not started");case 2:return this.log("publish",t,r),n=this.peerId.toB58String(),o={receivedFrom:n,data:r,topicIDs:[t]},e.next=7,this._buildMessage(o);case 7:return a=e.sent,s=S.normalizeInRpcMessage(a),this.emitSelf&&this._emitMessage(s),e.next=12,this._publish(s);case 12:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_publish",value:function(e){throw p(new Error("publish must be implemented by the subclass"),"ERR_NOT_IMPLEMENTED")}},{key:"subscribe",value:function(e){var t=this;if(!this.started)throw new Error("Pubsub has not started");this.subscriptions.has(e)||(this.subscriptions.add(e),this.peers.forEach((function(r,n){return t._sendSubscriptions(n,[e],!0)})))}},{key:"unsubscribe",value:function(e){var t=this;if(!this.started)throw new Error("Pubsub is not started");this.subscriptions.has(e)&&0===this.listenerCount(e)&&(this.subscriptions.delete(e),this.peers.forEach((function(r,n){return t._sendSubscriptions(n,[e],!1)})))}},{key:"getTopics",value:function(){if(!this.started)throw new Error("Pubsub is not started");return Array.from(this.subscriptions)}}]),r}(d);x.utils=S,x.SignaturePolicy=k,e.exports=x},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(26),u=r(27);Object.defineProperty(t,"__esModule",{value:!0});var c=r(1020),f=r(1021),l=r(1023),h=function(){},d=new f.TimeoutError,p=function(e){s(r,e);var t=u(r);function r(e){var n,i,a,s,u;if(o(this,r),(n=t.call(this))._intervalCount=0,n._intervalEnd=0,n._pendingCount=0,n._resolveEmpty=h,n._resolveIdle=h,!("number"===typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:l.default},e)).intervalCap&&e.intervalCap>=1))throw new TypeError("Expected `intervalCap` to be a number from 1 and up, got `".concat(null!==(a=null===(i=e.intervalCap)||void 0===i?void 0:i.toString())&&void 0!==a?a:"","` (").concat(typeof e.intervalCap,")"));if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError("Expected `interval` to be a finite number >= 0, got `".concat(null!==(u=null===(s=e.interval)||void 0===s?void 0:s.toString())&&void 0!==u?u:"","` (").concat(typeof e.interval,")"));return n._carryoverConcurrencyCount=e.carryoverConcurrencyCount,n._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,n._intervalCap=e.intervalCap,n._interval=e.interval,n._queue=new e.queueClass,n._queueClass=e.queueClass,n.concurrency=e.concurrency,n._timeout=e.timeout,n._throwOnTimeout=!0===e.throwOnTimeout,n._isPaused=!1===e.autoStart,n}return a(r,[{key:"_doesIntervalAllowAnother",get:function(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}},{key:"_doesConcurrentAllowAnother",get:function(){return this._pendingCount<this._concurrency}},{key:"_next",value:function(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}},{key:"_resolvePromises",value:function(){this._resolveEmpty(),this._resolveEmpty=h,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=h,this.emit("idle"))}},{key:"_onResumeInterval",value:function(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}},{key:"_isIntervalPaused",value:function(){var e=this,t=Date.now();if(void 0===this._intervalId){var r=this._intervalEnd-t;if(!(r<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((function(){e._onResumeInterval()}),r)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}},{key:"_tryToStartAnother",value:function(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){var e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){var t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}},{key:"_initializeIntervalIfNeeded",value:function(){var e=this;this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((function(){e._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}},{key:"_onInterval",value:function(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}},{key:"_processQueue",value:function(){for(;this._tryToStartAnother(););}},{key:"concurrency",get:function(){return this._concurrency},set:function(e){if(!("number"===typeof e&&e>=1))throw new TypeError("Expected `concurrency` to be a number from 1 and up, got `".concat(e,"` (").concat(typeof e,")"));this._concurrency=e,this._processQueue()}},{key:"add",value:function(){var e=i(n.mark((function e(t){var r,o=this,a=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise((function(e,a){var s=function(){var s=i(n.mark((function i(){var s;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o._pendingCount++,o._intervalCount++,n.prev=2,s=void 0===o._timeout&&void 0===r.timeout?t():f.default(Promise.resolve(t()),void 0===r.timeout?o._timeout:r.timeout,(function(){(void 0===r.throwOnTimeout?o._throwOnTimeout:r.throwOnTimeout)&&a(d)})),n.t0=e,n.next=7,s;case 7:n.t1=n.sent,(0,n.t0)(n.t1),n.next=14;break;case 11:n.prev=11,n.t2=n.catch(2),a(n.t2);case 14:o._next();case 15:case"end":return n.stop()}}),i,null,[[2,11]])})));return function(){return s.apply(this,arguments)}}();o._queue.enqueue(s,r),o._tryToStartAnother(),o.emit("add")})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"addAll",value:function(){var e=i(n.mark((function e(t,r){var o=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t.map(function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.add(t,r));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"start",value:function(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}},{key:"pause",value:function(){this._isPaused=!0}},{key:"clear",value:function(){this._queue=new this._queueClass}},{key:"onEmpty",value:function(){var e=i(n.mark((function e(){var t=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this._queue.size){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",new Promise((function(e){var r=t._resolveEmpty;t._resolveEmpty=function(){r(),e()}})));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onIdle",value:function(){var e=i(n.mark((function e(){var t=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this._pendingCount||0!==this._queue.size){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",new Promise((function(e){var r=t._resolveIdle;t._resolveIdle=function(){r(),e()}})));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"size",get:function(){return this._queue.size}},{key:"sizeBy",value:function(e){return this._queue.filter(e).length}},{key:"pending",get:function(){return this._pendingCount}},{key:"isPaused",get:function(){return this._isPaused}},{key:"timeout",get:function(){return this._timeout},set:function(e){this._timeout=e}}]),r}(c);t.default=p},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,r,n,o){if("function"!==typeof r)throw new TypeError("The listener must be a function");var s=new a(r,n||e,o),u=i?i+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function u(e,t){0===--e._eventsCount?e._events=new o:delete e._events[t]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},c.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=new Array(o);n<o;n++)a[n]=r[n].fn;return a},c.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},c.prototype.emit=function(e,t,r,n,o,a){var s=i?i+e:e;if(!this._events[s])return!1;var u,c,f=this._events[s],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(e,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,t),!0;case 3:return f.fn.call(f.context,t,r),!0;case 4:return f.fn.call(f.context,t,r,n),!0;case 5:return f.fn.call(f.context,t,r,n,o),!0;case 6:return f.fn.call(f.context,t,r,n,o,a),!0}for(c=1,u=new Array(l-1);c<l;c++)u[c-1]=arguments[c];f.fn.apply(f.context,u)}else{var h,d=f.length;for(c=0;c<d;c++)switch(f[c].once&&this.removeListener(e,f[c].fn,void 0,!0),l){case 1:f[c].fn.call(f[c].context);break;case 2:f[c].fn.call(f[c].context,t);break;case 3:f[c].fn.call(f[c].context,t,r);break;case 4:f[c].fn.call(f[c].context,t,r,n);break;default:if(!u)for(h=1,u=new Array(l-1);h<l;h++)u[h-1]=arguments[h];f[c].fn.apply(f[c].context,u)}}return!0},c.prototype.on=function(e,t,r){return s(this,e,t,r,!1)},c.prototype.once=function(e,t,r){return s(this,e,t,r,!0)},c.prototype.removeListener=function(e,t,r,n){var o=i?i+e:e;if(!this._events[o])return this;if(!t)return u(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||n&&!a.once||r&&a.context!==r||u(this,o);else{for(var s=0,c=[],f=a.length;s<f;s++)(a[s].fn!==t||n&&!a[s].once||r&&a[s].context!==r)&&c.push(a[s]);c.length?this._events[o]=1===c.length?c[0]:c:u(this,o)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&u(this,t)):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,e.exports=c},function(e,t,r){"use strict";var n=r(8),i=r(26),o=r(27),a=r(93),s=r(1022),u=function(e){i(r,e);var t=o(r);function r(e){var i;return n(this,r),(i=t.call(this,e)).name="TimeoutError",i}return r}(a(Error)),c=function(e,t,r){return new Promise((function(n,i){if("number"!==typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(t!==1/0){var o=setTimeout((function(){if("function"!==typeof r){var o="string"===typeof r?r:"Promise timed out after ".concat(t," milliseconds"),a=r instanceof Error?r:new u(o);"function"===typeof e.cancel&&e.cancel(),i(a)}else try{n(r())}catch(s){i(s)}}),t);s(e.then(n,i),(function(){clearTimeout(o)}))}else n(e)}))};e.exports=c,e.exports.default=c,e.exports.TimeoutError=u},function(e,t,r){"use strict";e.exports=function(e,t){return t=t||function(){},e.then((function(e){return new Promise((function(e){e(t())})).then((function(){return e}))}),(function(e){return new Promise((function(e){e(t())})).then((function(){throw e}))}))}},function(e,t,r){"use strict";var n=r(8),i=r(9);Object.defineProperty(t,"__esModule",{value:!0});var o=r(1024),a=function(){function e(){n(this,e),this._queue=[]}return i(e,[{key:"enqueue",value:function(e,t){var r={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority)this._queue.push(r);else{var n=o.default(this._queue,r,(function(e,t){return t.priority-e.priority}));this._queue.splice(n,0,r)}}},{key:"dequeue",value:function(){var e=this._queue.shift();return null===e||void 0===e?void 0:e.run}},{key:"filter",value:function(e){return this._queue.filter((function(t){return t.priority===e.priority})).map((function(e){return e.run}))}},{key:"size",get:function(){return this._queue.length}}]),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){for(var n=0,i=e.length;i>0;){var o=i/2|0,a=n+o;r(e[a],t)<=0?(n=++a,i-=o+1):i=o}return n}},function(e,t,r){"use strict";var n=r(21),i=r(8),o=r(9),a=r(61),s=r(26),u=r(27),c=r(1026),f=Symbol.for("@libp2p/js-interfaces/topology/multicodec-topology"),l=function(e){s(r,e);var t=u(r);function r(e){var n,o=e.min,s=e.max,u=e.multicodecs,c=e.handlers;if(i(this,r),n=t.call(this,{min:o,max:s,handlers:c}),!u)throw new Error("one or more multicodec should be provided");if(!c)throw new Error("the handlers should be provided");if("function"!==typeof c.onConnect)throw new Error("the 'onConnect' handler must be provided");if("function"!==typeof c.onDisconnect)throw new Error("the 'onDisconnect' handler must be provided");return n.multicodecs=Array.isArray(u)?u:[u],n._registrar=void 0,n._onProtocolChange=n._onProtocolChange.bind(a(n)),n._onPeerConnect=n._onPeerConnect.bind(a(n)),n}return o(r,[{key:Symbol.toStringTag,get:function(){return"Topology"}},{key:f,get:function(){return!0}},{key:"registrar",set:function(e){this._registrar=e,this._registrar.peerStore.on("change:protocols",this._onProtocolChange),this._registrar.connectionManager.on("peer:connect",this._onPeerConnect),this._updatePeers(this._registrar.peerStore.peers.values())}},{key:"_updatePeers",value:function(e){var t,r=this,i=n(e);try{var o=function(){var e=t.value,n=e.id,i=e.protocols;if(r.multicodecs.filter((function(e){return i.includes(e)})).length){r.peers.add(n.toB58String());var o=r._registrar.getConnection(n);o&&r._onConnect(n,o)}else r.peers.delete(n.toB58String())};for(i.s();!(t=i.n()).done;)o()}catch(a){i.e(a)}finally{i.f()}}},{key:"_onProtocolChange",value:function(e){var t=this,r=e.peerId,i=e.protocols,o=this.peers.has(r.toB58String()),a=i.filter((function(e){return t.multicodecs.includes(e)}));o&&0===a.length&&this._onDisconnect(r);var s,u=n(i);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(this.multicodecs.includes(c)){var f=this._registrar.peerStore.get(r);return void this._updatePeers([f])}}}catch(l){u.e(l)}finally{u.f()}}},{key:"_onPeerConnect",value:function(e){var t=e.remotePeer,r=this._registrar.peerStore.protoBook.get(t);r&&this.multicodecs.find((function(e){return r.includes(e)}))&&(this.peers.add(t.toB58String()),this._onConnect(t,e))}}],[{key:"isMulticodecTopology",value:function(e){return Boolean(e&&e[f])}}]),r}(c);e.exports=l},function(e,t,r){"use strict";var n=r(8),i=r(9),o=function(){},a=Symbol.for("@libp2p/js-interfaces/topology"),s=function(){function e(t){var r=t.min,i=void 0===r?0:r,a=t.max,s=void 0===a?1/0:a,u=t.handlers,c=void 0===u?{}:u;n(this,e),this.min=i,this.max=s,this._onConnect=c.onConnect||o,this._onDisconnect=c.onDisconnect||o,this.peers=new Set}return i(e,[{key:Symbol.toStringTag,get:function(){return"Topology"}},{key:a,get:function(){return!0}},{key:"registrar",set:function(e){this._registrar=e}},{key:"disconnect",value:function(e){this._onDisconnect(e)}}],[{key:"isTopology",value:function(e){return Boolean(e&&e[a])}}]),e}();e.exports=s},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(26),u=r(27),c=r(22),f=Object.assign(c("libp2p-pubsub:peer-streams"),{error:c("libp2p-pubsub:peer-streams:err")}),l=r(57).EventEmitter,h=r(95),d=r(173),p=r(60).pipe,v=r(118).source,y=r(177).default,b=function(e){s(r,e);var t=u(r);function r(e){var n,i=e.id,a=e.protocol;return o(this,r),(n=t.call(this)).id=i,n.protocol=a,n._rawOutboundStream=null,n._rawInboundStream=null,n._inboundAbortController=new y,n.outboundStream=null,n.inboundStream=null,n}return a(r,[{key:"isReadable",get:function(){return Boolean(this.inboundStream)}},{key:"isWritable",get:function(){return Boolean(this.outboundStream)}},{key:"write",value:function(e){if(!this.outboundStream){var t=this.id.toB58String();throw new Error("No writable connection to "+t)}this.outboundStream.push(e)}},{key:"attachInboundStream",value:function(e){return this._rawInboundStream=e,this.inboundStream=v(p(this._rawInboundStream,h.decode()),this._inboundAbortController.signal,{returnOnAbort:!0}),this.emit("stream:inbound"),this.inboundStream}},{key:"attachOutboundStream",value:function(){var e=i(n.mark((function e(t){var r,i=this;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.outboundStream,!this.outboundStream){e.next=4;break}return e.next=4,this.outboundStream.end();case 4:this._rawOutboundStream=t,this.outboundStream=d({onEnd:function(e){i._rawOutboundStream&&i._rawOutboundStream.reset&&i._rawOutboundStream.reset(),i._rawOutboundStream=null,i.outboundStream=null,e&&i.emit("close")}}),p(this.outboundStream,h.encode(),this._rawOutboundStream).catch((function(e){f.error(e)})),r||this.emit("stream:outbound");case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"close",value:function(){this.outboundStream&&this.outboundStream.end(),this.inboundStream&&this._inboundAbortController.abort(),this._rawOutboundStream=null,this.outboundStream=null,this._rawInboundStream=null,this.inboundStream=null,this.emit("close")}}]),r}(l);e.exports=b},function(e,t,r){"use strict";t.SignaturePolicy={StrictSign:"StrictSign",StrictNoSign:"StrictNoSign"}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(307);r(62),r(169);var a=r(18),s=r(15),u=r(96).fromString,c=r(1030),f={rsa:r(1031),ed25519:r(1035),secp256k1:r(1037)(o,r(306))},l="secp256k1 support requires libp2p-crypto-secp256k1 package",h="ERR_MISSING_PACKAGE";function d(e){var t=f[e.toLowerCase()];if(!t){var r=Object.keys(f).join(" / ");throw s(new Error("invalid or unsupported key type ".concat(e,". Must be ").concat(r)),"ERR_UNSUPPORTED_KEY_TYPE")}return t}var p=function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",d(t).generateKeyPair(r));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),v=function(){var e=i(n.mark((function e(t,r,i){var o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=d(t),"ed25519"===t.toLowerCase()){e.next=3;break}throw s(new Error("Seed key derivation is unimplemented for RSA or secp256k1"),"ERR_UNSUPPORTED_KEY_DERIVATION_TYPE");case 3:return e.abrupt("return",o.generateKeyPairFromSeed(r,i));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),y=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=o.PrivateKey.decode(t),i=r.Data,e.t0=r.Type,e.next=e.t0===o.KeyType.RSA?5:e.t0===o.KeyType.Ed25519?6:e.t0===o.KeyType.Secp256k1?7:12;break;case 5:return e.abrupt("return",f.rsa.unmarshalRsaPrivateKey(i));case 6:return e.abrupt("return",f.ed25519.unmarshalEd25519PrivateKey(i));case 7:if(!f.secp256k1){e.next=11;break}return e.abrupt("return",f.secp256k1.unmarshalSecp256k1PrivateKey(i));case 11:throw s(new Error(l),h);case 12:d(r.Type);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=i(n.mark((function e(t,r){var i,o,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.import(t,r);case 3:return i=e.sent,e.abrupt("return",y(i));case 7:e.prev=7,e.t0=e.catch(0);case 9:if(null!==(o=a.pki.decryptRsaPrivateKey(t,r))){e.next=12;break}throw s(new Error("Cannot read the key, most likely the password is wrong or not a RSA key"),"ERR_CANNOT_DECRYPT_PEM");case 12:return l=a.asn1.toDer(a.pki.privateKeyToAsn1(o)),l=u(l.getBytes(),"ascii"),e.abrupt("return",f.rsa.unmarshalRsaPrivateKey(l));case 15:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}();e.exports={supportedKeys:f,keysPBM:o,keyStretcher:r(1039),generateEphemeralKeyPair:r(1042),generateKeyPair:p,generateKeyPairFromSeed:v,unmarshalPublicKey:function(e){var t=o.PublicKey.decode(e),r=t.Data;switch(t.Type){case o.KeyType.RSA:return f.rsa.unmarshalRsaPublicKey(r);case o.KeyType.Ed25519:return f.ed25519.unmarshalEd25519PublicKey(r);case o.KeyType.Secp256k1:if(f.secp256k1)return f.secp256k1.unmarshalSecp256k1PublicKey(r);throw s(new Error(l),h);default:d(t.Type)}},marshalPublicKey:function(e,t){return d(t=(t||"rsa").toLowerCase()),e.bytes},unmarshalPrivateKey:y,marshalPrivateKey:function(e,t){return d(t=(t||"rsa").toLowerCase()),e.bytes},import:b}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(63).base64,a=r(494);e.exports={import:function(){var e=i(n.mark((function e(t,r){var i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.decode(t),s=a.create(),e.next=4,s.decrypt(i,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(49).sha256,u=r(15),c=r(181).equals,f=r(85).toString;r(137);var l=r(18),h=r(1032),d=r(307),p=r(309),v=function(){function e(t){o(this,e),this._key=t}return a(e,[{key:"verify",value:function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndVerify(this._key,r,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"marshal",value:function(){return h.utils.jwkToPkix(this._key)}},{key:"bytes",get:function(){return d.PublicKey.encode({Type:d.KeyType.RSA,Data:this.marshal()}).finish()}},{key:"encrypt",value:function(e){return h.encrypt(this._key,e)}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),y=function(){function e(t,r){o(this,e),this._key=t,this._publicKey=r}return a(e,[{key:"genSecret",value:function(){return h.getRandomValues(16)}},{key:"sign",value:function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndSign(this._key,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"public",get:function(){if(!this._publicKey)throw u(new Error("public key not provided"),"ERR_PUBKEY_NOT_PROVIDED");return new v(this._publicKey)}},{key:"decrypt",value:function(e){return h.decrypt(this._key,e)}},{key:"marshal",value:function(){return h.utils.jwkToPkcs1(this._key)}},{key:"bytes",get:function(){return d.PrivateKey.encode({Type:d.KeyType.RSA,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.public.hash();case 2:return t=e.sent,e.abrupt("return",f(t,"base58btc"));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i,o,a,s,c=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("pkcs-8"!==(r=c.length>1&&void 0!==c[1]?c[1]:"pkcs-8")){e.next=9;break}return i=new l.util.ByteBuffer(this.marshal()),o=l.asn1.fromDer(i),a=l.pki.privateKeyFromAsn1(o),s={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"},e.abrupt("return",l.pki.encryptRsaPrivateKey(a,t,s));case 9:if("libp2p-key"!==r){e.next=13;break}return e.abrupt("return",p.export(this.bytes,t));case 13:throw u(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function b(){return(b=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=h.utils.pkcs1ToJwk(t),e.next=3,h.unmarshalPrivateKey(r);case 3:return i=e.sent,e.abrupt("return",new y(i.privateKey,i.publicKey));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.unmarshalPrivateKey(t);case 2:return r=e.sent,e.abrupt("return",new y(r.privateKey,r.publicKey));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=i(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey(t);case 2:return r=e.sent,e.abrupt("return",new y(r.privateKey,r.publicKey));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports={RsaPublicKey:v,RsaPrivateKey:y,unmarshalRsaPublicKey:function(e){var t=h.utils.pkixToJwk(e);return new v(t)},unmarshalRsaPrivateKey:function(e){return b.apply(this,arguments)},generateKeyPair:function(e){return m.apply(this,arguments)},fromJwk:function(e){return g.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(220),a=r(306),s=r(85).toString,u=r(96).fromString;function c(e){return Promise.all([o.get().subtle.exportKey("jwk",e.privateKey),o.get().subtle.exportKey("jwk",e.publicKey)])}t.utils=r(1033),t.generateKey=function(){var e=i(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]);case 2:return r=e.sent,e.next=5,c(r);case 5:return i=e.sent,e.abrupt("return",{privateKey:i[0],publicKey:i[1]});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.unmarshalPrivateKey=function(){var e=i(n.mark((function e(t){var r,i,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);case 2:return r=e.sent,e.t0=r,e.next=6,n=t,o.get().subtle.importKey("jwk",{kty:n.kty,n:n.n,e:n.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]);case 6:return e.t1=e.sent,i=[e.t0,e.t1],e.next=10,c({privateKey:i[0],publicKey:i[1]});case 10:return a=e.sent,e.abrupt("return",{privateKey:a[0],publicKey:a[1]});case 12:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),t.getRandomValues=a,t.hashAndSign=function(){var e=i(n.mark((function e(t,r){var i,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]);case 2:return i=e.sent,e.next=5,o.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},i,Uint8Array.from(r));case 5:return a=e.sent,e.abrupt("return",new Uint8Array(a,a.byteOffset,a.byteLength));case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),t.hashAndVerify=function(){var e=i(n.mark((function e(t,r,i){var a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);case 2:return a=e.sent,e.abrupt("return",o.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},a,r,i));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();var f=r(1034),l=f.jwk2pub,h=f.jwk2priv;function d(e,t,r,n){var i=t?l(e):h(e),o=n(s(Uint8Array.from(r),"ascii"),i);return u(o,"ascii")}t.encrypt=function(e,t){return d(e,!0,t,(function(e,t){return t.encrypt(e)}))},t.decrypt=function(e,t){return d(e,!1,t,(function(e,t){return t.decrypt(e)}))}},function(e,t,r){"use strict";r(62),r(78);var n=r(18),i=r(308),o=i.bigIntegerToUintBase64url,a=i.base64urlToBigInteger,s=r(96).fromString,u=r(85).toString;t.pkcs1ToJwk=function(e){var t=n.asn1.fromDer(u(e,"ascii")),r=n.pki.privateKeyFromAsn1(t);return{kty:"RSA",n:o(r.n),e:o(r.e),d:o(r.d),p:o(r.p),q:o(r.q),dp:o(r.dP),dq:o(r.dQ),qi:o(r.qInv),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){var t=n.pki.privateKeyToAsn1({n:a(e.n),e:a(e.e),d:a(e.d),p:a(e.p),q:a(e.q),dP:a(e.dp),dQ:a(e.dq),qInv:a(e.qi)});return s(n.asn1.toDer(t).getBytes(),"ascii")},t.pkixToJwk=function(e){var t=n.asn1.fromDer(u(e,"ascii")),r=n.pki.publicKeyFromAsn1(t);return{kty:"RSA",n:o(r.n),e:o(r.e),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){var t=n.pki.publicKeyToAsn1({n:a(e.n),e:a(e.e)});return s(n.asn1.toDer(t).getBytes(),"ascii")}},function(e,t,r){"use strict";var n=r(48);r(78);var i=r(18),o=r(308).base64urlToBigInteger;function a(e,t){return t.map((function(t){return o(e[t])}))}e.exports={jwk2pub:function(e){var t;return(t=i.pki).setRsaPublicKey.apply(t,n(a(e,["n","e"])))},jwk2priv:function(e){var t;return(t=i.pki).setRsaPrivateKey.apply(t,n(a(e,["n","e","d","p","q","dp","dq","qi"])))}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(15),u=r(181).equals,c=r(49).sha256,f=r(58).base58btc,l=r(89).identity,h=r(1036),d=r(307),p=r(309),v=function(){function e(t){o(this,e),this._key=m(t,h.publicKeyLength)}return a(e,[{key:"verify",value:function(){var e=i(n.mark((function e(t,r){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndVerify(this._key,r,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return d.PublicKey.encode({Type:d.KeyType.Ed25519,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return u(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),y=function(){function e(t,r){o(this,e),this._key=m(t,h.privateKeyLength),this._publicKey=m(r,h.publicKeyLength)}return a(e,[{key:"sign",value:function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.hashAndSign(this._key,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"public",get:function(){return new v(this._publicKey)}},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return d.PrivateKey.encode({Type:d.KeyType.Ed25519,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return u(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.digest(this.public.bytes);case 2:return t=e.sent,e.abrupt("return",f.encode(t.bytes).substring(1));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("libp2p-key"!==(r=i.length>1&&void 0!==i[1]?i[1]:"libp2p-key")){e.next=5;break}return e.abrupt("return",p.export(this.bytes,t));case 5:throw s(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function b(){return(b=i(n.mark((function e(){var t,r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey();case 2:return t=e.sent,r=t.privateKey,i=t.publicKey,e.abrupt("return",new y(r,i));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=i(n.mark((function e(t){var r,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKeyFromSeed(t);case 2:return r=e.sent,i=r.privateKey,o=r.publicKey,e.abrupt("return",new y(i,o));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){if((e=Uint8Array.from(e||[])).length!==t)throw s(new Error("Key must be a Uint8Array of length ".concat(t,", got ").concat(e.length)),"ERR_INVALID_KEY_TYPE");return e}e.exports={Ed25519PublicKey:v,Ed25519PrivateKey:y,unmarshalEd25519PrivateKey:function(e){if(e.length>h.privateKeyLength){var t=(e=m(e,h.privateKeyLength+h.publicKeyLength)).slice(0,h.privateKeyLength),r=e.slice(h.privateKeyLength,e.length);return new y(t,r)}var n=(e=m(e,h.privateKeyLength)).slice(0,h.privateKeyLength),i=e.slice(h.publicKeyLength);return new y(n,i)},unmarshalEd25519PublicKey:function(e){return e=m(e,h.publicKeyLength),new v(e)},generateKeyPair:function(){return b.apply(this,arguments)},generateKeyPairFromSeed:function(e){return g.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(286);function a(e,r){for(var n=new Uint8Array(t.privateKeyLength),i=0;i<32;i++)n[i]=e[i],n[32+i]=r[i];return n}t.publicKeyLength=32,t.privateKeyLength=64,t.generateKey=i(n.mark((function e(){var t,r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.utils.randomPrivateKey(),e.next=3,o.getPublicKey(t);case 3:return r=e.sent,i=a(t,r),e.abrupt("return",{privateKey:i,publicKey:r});case 6:case"end":return e.stop()}}),e)}))),t.generateKeyFromSeed=function(){var e=i(n.mark((function e(t){var r,i,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(32===t.length){e.next=4;break}throw new TypeError('"seed" must be 32 bytes in length.');case 4:if(t instanceof Uint8Array){e.next=6;break}throw new TypeError('"seed" must be a node.js Buffer, or Uint8Array.');case 6:return r=t,e.next=9,o.getPublicKey(r);case 9:return i=e.sent,s=a(r,i),e.abrupt("return",{privateKey:s,publicKey:i});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.hashAndSign=function(e,t){var r=e.slice(0,32);return o.sign(t,r)},t.hashAndVerify=function(e,t,r){return o.verify(t,r,e)}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(8),a=r(9),s=r(49).sha256,u=r(15),c=r(181).equals,f=r(85).toString,l=r(309);e.exports=function(e,t,h){h=h||r(1038)();var d=function(){function t(e){o(this,t),h.validatePublicKey(e),this._key=e}return a(t,[{key:"verify",value:function(e,t){return h.hashAndVerify(this._key,t,e)}},{key:"marshal",value:function(){return h.compressPublicKey(this._key)}},{key:"bytes",get:function(){return e.PublicKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),t}(),p=function(){function t(e,r){o(this,t),this._key=e,this._publicKey=r||h.computePublicKey(e),h.validatePrivateKey(this._key),h.validatePublicKey(this._publicKey)}return a(t,[{key:"sign",value:function(e){return h.hashAndSign(this._key,e)}},{key:"public",get:function(){return new d(this._publicKey)}},{key:"marshal",value:function(){return this._key}},{key:"bytes",get:function(){return e.PrivateKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()}).finish()}},{key:"equals",value:function(e){return c(this.bytes,e.bytes)}},{key:"hash",value:function(){var e=i(n.mark((function e(){var t,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(this.bytes);case 2:return t=e.sent,r=t.bytes,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"id",value:function(){var e=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.public.hash();case 2:return t=e.sent,e.abrupt("return",f(t,"base58btc"));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"export",value:function(){var e=i(n.mark((function e(t){var r,i=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("libp2p-key"!==(r=i.length>1&&void 0!==i[1]?i[1]:"libp2p-key")){e.next=5;break}return e.abrupt("return",l.export(this.bytes,t));case 5:throw u(new Error("export format '".concat(r,"' is not supported")),"ERR_INVALID_EXPORT_FORMAT");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),t}();function v(){return(v=i(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.generateKey();case 2:return t=e.sent,e.abrupt("return",new p(t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return{Secp256k1PublicKey:d,Secp256k1PrivateKey:p,unmarshalSecp256k1PrivateKey:function(e){return new p(e)},unmarshalSecp256k1PublicKey:function(e){return new d(e)},generateKeyPair:function(){return v.apply(this,arguments)}}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(15),a=r(287),s=r(49).sha256;e.exports=function(){function e(){return(e=i(n.mark((function e(t,r){var i,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.digest(r);case 2:return i=e.sent,u=i.digest,e.prev=4,e.next=7,a.sign(u,t);case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(4),o(e.t0,"ERR_INVALID_INPUT");case 13:case"end":return e.stop()}}),e,null,[[4,10]])})))).apply(this,arguments)}function t(){return(t=i(n.mark((function e(t,r,i){var u,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.digest(i);case 3:return u=e.sent,c=u.digest,e.abrupt("return",a.verify(r,c,t));case 8:throw e.prev=8,e.t0=e.catch(0),o(e.t0,"ERR_INVALID_INPUT");case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}return{generateKey:function(){return a.utils.randomPrivateKey()},privateKeyLength:32,hashAndSign:function(t,r){return e.apply(this,arguments)},hashAndVerify:function(e,r,n){return t.apply(this,arguments)},compressPublicKey:function(e){return a.Point.fromHex(e).toRawBytes(!0)},decompressPublicKey:function(e){return a.Point.fromHex(e).toRawBytes(!1)},validatePrivateKey:function(e){try{a.getPublicKey(e,!0)}catch(t){throw o(t,"ERR_INVALID_PRIVATE_KEY")}},validatePublicKey:function(e){try{a.Point.fromHex(e)}catch(t){throw o(t,"ERR_INVALID_PUBLIC_KEY")}},computePublicKey:function(e){try{return a.getPublicKey(e,!0)}catch(t){throw o(t,"ERR_INVALID_PRIVATE_KEY")}}}}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(15),a=r(180).concat,s=r(96).fromString,u=r(1040),c={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=function(){var e=i(n.mark((function e(t,r,i){var f,l,h,d,p,v,y,b,g,m,w,k,S,E,_,A,x;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=c[t]){e.next=4;break}throw l=Object.keys(c).join(" / "),o(new Error("unknown cipher type '".concat(t,"'. Must be ").concat(l)),"ERR_INVALID_CIPHER_TYPE");case 4:if(r){e.next=6;break}throw o(new Error("missing hash type"),"ERR_MISSING_HASH_TYPE");case 6:return h=f.keySize,d=f.ivSize,20,p=s("key expansion"),v=2*(d+h+20),e.next=13,u.create(r,i);case 13:return y=e.sent,e.next=16,y.digest(p);case 16:b=e.sent,g=[],m=0;case 19:if(!(m<v)){e.next=32;break}return e.next=22,y.digest(a([b,p]));case 22:return w=e.sent,k=w.length,m+k>v&&(k=v-m),g.push(w),m+=k,e.next=29,y.digest(b);case 29:b=e.sent,e.next=19;break;case 32:return S=v/2,E=a(g),_=E.slice(0,S),A=E.slice(S,v),x=function(e){return{iv:e.slice(0,d),cipherKey:e.slice(d,d+h),macKey:e.slice(d+h)}},e.abrupt("return",{k1:x(_),k2:x(A)});case 38:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(220),a=r(1041),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"},u=function(){var e=i(n.mark((function e(t,r){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.get().subtle.sign({name:"HMAC"},t,r);case 2:return i=e.sent,e.abrupt("return",new Uint8Array(i,i.byteOffset,i.byteLength));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();t.create=function(){var e=i(n.mark((function e(t,r){var c,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=s[t],e.next=3,o.get().subtle.importKey("raw",r,{name:"HMAC",hash:{name:c}},!1,["sign"]);case 3:return f=e.sent,e.abrupt("return",{digest:function(e){return i(n.mark((function t(){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u(f,e));case 1:case"end":return t.stop()}}),t)})))()},length:a[t]});case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict";var n=r(0),i=r(6),o=r(1043);e.exports=function(){var e=i(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o.generateEphmeralKeyPair(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},function(e,t,r){"use strict";var n=r(29),i=r(0),o=r(6),a=r(15),s=r(220),u=r(308).base64urlToBuffer,c=r(1044),f=r(85).toString,l=r(180).concat,h=r(181).equals,d={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(){var e=o(i.mark((function e(t){var r,n,a;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(Object.keys(d),t),e.next=3,s.get().subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]);case 3:return r=e.sent,n=function(){var e=o(i.mark((function e(n,o){var a,u,c;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=6;break}return e.next=3,s.get().subtle.importKey("jwk",b(t,o),{name:"ECDH",namedCurve:t},!1,["deriveBits"]);case 3:a=e.sent,e.next=7;break;case 6:a=r.privateKey;case 7:return e.next=9,s.get().subtle.importKey("jwk",y(t,n),{name:"ECDH",namedCurve:t},!1,[]);case 9:return e.t0=e.sent,e.t1=a,u=[e.t0,e.t1],e.next=14,s.get().subtle.deriveBits({name:"ECDH",namedCurve:t,public:u[0]},u[1],d[t]);case 14:return c=e.sent,e.abrupt("return",new Uint8Array(c,c.byteOffset,c.byteLength));case 16:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),e.next=7,s.get().subtle.exportKey("jwk",r.publicKey);case 7:return a=e.sent,e.abrupt("return",{key:v(a),genSharedKey:n});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var p={"P-256":32,"P-384":48,"P-521":66};function v(e){var t=p[e.crv];return l([Uint8Array.from([4]),u(e.x,t),u(e.y,t)],1+2*t)}function y(e,t){var r=p[e];if(h(!t.slice(0,1),Uint8Array.from([4])))throw a(new Error("Cannot unmarshal public key - invalid key format"),"ERR_INVALID_KEY_FORMAT");return{kty:"EC",crv:e,x:f(t.slice(1,r+1),"base64url"),y:f(t.slice(1+r),"base64url"),ext:!0}}var b=function(e,t){return n(n({},y(e,t.public)),{},{d:f(t.private,"base64url")})}},function(e,t,r){"use strict";var n=r(15);e.exports=function(e,t){if(!e.includes(t)){var r=e.join(" / ");throw n(new Error("Unknown curve: ".concat(t,". Must be ").concat(r)),"ERR_INVALID_CURVE")}}},function(e,t,r){"use strict";var n=r(41),i=n.Reader,o=n.Writer,a=n.util,s=n.roots["libp2p-peer-id"]||(n.roots["libp2p-peer-id"]={});s.PeerIdProto=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.id=a.newBuffer([]),e.prototype.pubKey=a.newBuffer([]),e.prototype.privKey=a.newBuffer([]),e.encode=function(e,t){return t||(t=o.create()),t.uint32(10).bytes(e.id),null!=e.pubKey&&Object.hasOwnProperty.call(e,"pubKey")&&t.uint32(18).bytes(e.pubKey),null!=e.privKey&&Object.hasOwnProperty.call(e,"privKey")&&t.uint32(26).bytes(e.privKey),t},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new s.PeerIdProto;e.pos<r;){var o=e.uint32();switch(o>>>3){case 1:n.id=e.bytes();break;case 2:n.pubKey=e.bytes();break;case 3:n.privKey=e.bytes();break;default:e.skipType(7&o)}}if(!n.hasOwnProperty("id"))throw a.ProtocolError("missing required 'id'",{instance:n});return n},e.fromObject=function(e){if(e instanceof s.PeerIdProto)return e;var t=new s.PeerIdProto;return null!=e.id&&("string"===typeof e.id?a.base64.decode(e.id,t.id=a.newBuffer(a.base64.length(e.id)),0):e.id.length&&(t.id=e.id)),null!=e.pubKey&&("string"===typeof e.pubKey?a.base64.decode(e.pubKey,t.pubKey=a.newBuffer(a.base64.length(e.pubKey)),0):e.pubKey.length&&(t.pubKey=e.pubKey)),null!=e.privKey&&("string"===typeof e.privKey?a.base64.decode(e.privKey,t.privKey=a.newBuffer(a.base64.length(e.privKey)),0):e.privKey.length&&(t.privKey=e.privKey)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.id="":(r.id=[],t.bytes!==Array&&(r.id=a.newBuffer(r.id))),t.bytes===String?r.pubKey="":(r.pubKey=[],t.bytes!==Array&&(r.pubKey=a.newBuffer(r.pubKey))),t.bytes===String?r.privKey="":(r.privKey=[],t.bytes!==Array&&(r.privKey=a.newBuffer(r.privKey)))),null!=e.id&&e.hasOwnProperty("id")&&(r.id=t.bytes===String?a.base64.encode(e.id,0,e.id.length):t.bytes===Array?Array.prototype.slice.call(e.id):e.id),null!=e.pubKey&&e.hasOwnProperty("pubKey")&&(r.pubKey=t.bytes===String?a.base64.encode(e.pubKey,0,e.pubKey.length):t.bytes===Array?Array.prototype.slice.call(e.pubKey):e.pubKey),null!=e.privKey&&e.hasOwnProperty("privKey")&&(r.privKey=t.bytes===String?a.base64.encode(e.privKey,0,e.privKey.length):t.bytes===Array?Array.prototype.slice.call(e.privKey):e.privKey),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.exports=s},function(e,t,r){"use strict";var n=r(0),i=r(29),o=r(6),a=r(219),s=r(492).RPC,u=r(180).concat,c=(0,r(96).fromString)("libp2p-pubsub:"),f=r(493).normalizeOutRpcMessage;function l(){return(l=o(n.mark((function e(t,r){var o,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=u([c,s.Message.encode(f(r)).finish()]),e.next=3,t.privKey.sign(o);case 3:return a=e.sent,e.abrupt("return",i(i({},r),{},{signature:a,key:t.pubKey.bytes}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(){return(h=o(n.mark((function e(t){var r,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.signature){e.next=2;break}throw new Error("Message must contain a signature to be verified");case 2:if(t.from){e.next=4;break}throw new Error("Message must contain a from property to be verified");case 4:return r=u([c,s.Message.encode(i(i({},t),{},{from:a.createFromB58String(t.from).toBytes(),signature:void 0,key:void 0})).finish()]),e.next=7,d(t);case 7:return o=e.sent,e.abrupt("return",o.verify(r,t.signature));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return p.apply(this,arguments)}function p(){return(p=o(n.mark((function e(t){var r,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.from){e.next=2;break}throw new Error("Could not get the public key from the originator id");case 2:if(r=a.createFromB58String(t.from),!t.key){e.next=12;break}return e.next=6,a.createFromPubKey(t.key);case 6:if(!(i=e.sent).equals(r)){e.next=9;break}return e.abrupt("return",i.pubKey);case 9:throw new Error("Public Key does not match the originator");case 12:if(!r.pubKey){e.next=16;break}return e.abrupt("return",r.pubKey);case 16:throw new Error("Could not get the public key from the originator id");case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports={messagePublicKey:d,signMessage:function(e,t){return l.apply(this,arguments)},SignPrefix:c,verifySignature:function(e){return h.apply(this,arguments)}}},function(e,t,r){"use strict";var n=r(21),i=r(0),o=r(8),a=r(9),s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MessageCache=void 0;var u=r(76),c=function(){function e(t,r,n){o(this,e),this.msgs=new Map,this.peertx=new Map,this.history=[];for(var i=0;i<r;i++)this.history[i]=[];this.gossip=t,this.msgIdFn=n}return a(e,[{key:"put",value:function(e){return s(this,void 0,void 0,i.mark((function t(){var r,n;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getMsgId(e);case 2:r=t.sent,n=u.messageIdToString(r),this.msgs.set(n,e),this.history[0].push({msgID:r,topics:e.topicIDs});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getMsgId",value:function(e){return this.msgIdFn(e)}},{key:"get",value:function(e){return this.msgs.get(u.messageIdToString(e))}},{key:"getForPeer",value:function(e,t){var r=u.messageIdToString(e),n=this.msgs.get(r);if(!n)return[void 0,0];var i=this.peertx.get(r);i||(i=new Map,this.peertx.set(r,i));var o=(i.get(t)||0)+1;return i.set(t,o),[n,o]}},{key:"getGossipIDs",value:function(e){for(var t=[],r=0;r<this.gossip;r++)this.history[r].forEach((function(r){var i,o=n(r.topics);try{for(o.s();!(i=o.n()).done;){if(i.value===e){t.push(r.msgID);break}}}catch(a){o.e(a)}finally{o.f()}}));return t}},{key:"shift",value:function(){var e=this;this.history[this.history.length-1].forEach((function(t){var r=u.messageIdToString(t.msgID);e.msgs.delete(r),e.peertx.delete(r)})),this.history.pop(),this.history.unshift([])}}]),e}();t.MessageCache=c},function(e,t,r){var n,i,o;i=[r(41)],void 0===(o="function"===typeof(n=function(e){"use strict";var t=e.Reader,r=e.Writer,n=e.util,i=e.roots.default||(e.roots.default={});return i.RPC=function(){function o(e){if(this.subscriptions=[],this.msgs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var a;return o.prototype.subscriptions=n.emptyArray,o.prototype.msgs=n.emptyArray,o.prototype.control=null,Object.defineProperty(o.prototype,"_control",{get:n.oneOfGetter(a=["control"]),set:n.oneOfSetter(a)}),o.encode=function(e,t){if(t||(t=r.create()),null!=e.subscriptions&&e.subscriptions.length)for(var n=0;n<e.subscriptions.length;++n)i.RPC.SubOpts.encode(e.subscriptions[n],t.uint32(10).fork()).ldelim();if(null!=e.msgs&&e.msgs.length)for(n=0;n<e.msgs.length;++n)i.RPC.Message.encode(e.msgs[n],t.uint32(18).fork()).ldelim();return null!=e.control&&Object.hasOwnProperty.call(e,"control")&&i.RPC.ControlMessage.encode(e.control,t.uint32(26).fork()).ldelim(),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.subscriptions&&o.subscriptions.length||(o.subscriptions=[]),o.subscriptions.push(i.RPC.SubOpts.decode(e,e.uint32()));break;case 2:o.msgs&&o.msgs.length||(o.msgs=[]),o.msgs.push(i.RPC.Message.decode(e,e.uint32()));break;case 3:o.control=i.RPC.ControlMessage.decode(e,e.uint32());break;default:e.skipType(7&a)}}return o},o.fromObject=function(e){if(e instanceof i.RPC)return e;var t=new i.RPC;if(e.subscriptions){if(!Array.isArray(e.subscriptions))throw TypeError(".RPC.subscriptions: array expected");t.subscriptions=[];for(var r=0;r<e.subscriptions.length;++r){if("object"!==typeof e.subscriptions[r])throw TypeError(".RPC.subscriptions: object expected");t.subscriptions[r]=i.RPC.SubOpts.fromObject(e.subscriptions[r])}}if(e.msgs){if(!Array.isArray(e.msgs))throw TypeError(".RPC.msgs: array expected");for(t.msgs=[],r=0;r<e.msgs.length;++r){if("object"!==typeof e.msgs[r])throw TypeError(".RPC.msgs: object expected");t.msgs[r]=i.RPC.Message.fromObject(e.msgs[r])}}if(null!=e.control){if("object"!==typeof e.control)throw TypeError(".RPC.control: object expected");t.control=i.RPC.ControlMessage.fromObject(e.control)}return t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.subscriptions=[],r.msgs=[]),e.subscriptions&&e.subscriptions.length){r.subscriptions=[];for(var n=0;n<e.subscriptions.length;++n)r.subscriptions[n]=i.RPC.SubOpts.toObject(e.subscriptions[n],t)}if(e.msgs&&e.msgs.length)for(r.msgs=[],n=0;n<e.msgs.length;++n)r.msgs[n]=i.RPC.Message.toObject(e.msgs[n],t);return null!=e.control&&e.hasOwnProperty("control")&&(r.control=i.RPC.ControlMessage.toObject(e.control,t),t.oneofs&&(r._control="control")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.SubOpts=function(){function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var a;return o.prototype.subscribe=null,o.prototype.topicID=null,Object.defineProperty(o.prototype,"_subscribe",{get:n.oneOfGetter(a=["subscribe"]),set:n.oneOfSetter(a)}),Object.defineProperty(o.prototype,"_topicID",{get:n.oneOfGetter(a=["topicID"]),set:n.oneOfSetter(a)}),o.encode=function(e,t){return t||(t=r.create()),null!=e.subscribe&&Object.hasOwnProperty.call(e,"subscribe")&&t.uint32(8).bool(e.subscribe),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&t.uint32(18).string(e.topicID),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.SubOpts;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.subscribe=e.bool();break;case 2:o.topicID=e.string();break;default:e.skipType(7&a)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.SubOpts)return e;var t=new i.RPC.SubOpts;return null!=e.subscribe&&(t.subscribe=Boolean(e.subscribe)),null!=e.topicID&&(t.topicID=String(e.topicID)),t},o.toObject=function(e,t){t||(t={});var r={};return null!=e.subscribe&&e.hasOwnProperty("subscribe")&&(r.subscribe=e.subscribe,t.oneofs&&(r._subscribe="subscribe")),null!=e.topicID&&e.hasOwnProperty("topicID")&&(r.topicID=e.topicID,t.oneofs&&(r._topicID="topicID")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.Message=function(){function o(e){if(this.topicIDs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var a;return o.prototype.from=null,o.prototype.data=null,o.prototype.seqno=null,o.prototype.topicIDs=n.emptyArray,o.prototype.signature=null,o.prototype.key=null,Object.defineProperty(o.prototype,"_from",{get:n.oneOfGetter(a=["from"]),set:n.oneOfSetter(a)}),Object.defineProperty(o.prototype,"_data",{get:n.oneOfGetter(a=["data"]),set:n.oneOfSetter(a)}),Object.defineProperty(o.prototype,"_seqno",{get:n.oneOfGetter(a=["seqno"]),set:n.oneOfSetter(a)}),Object.defineProperty(o.prototype,"_signature",{get:n.oneOfGetter(a=["signature"]),set:n.oneOfSetter(a)}),Object.defineProperty(o.prototype,"_key",{get:n.oneOfGetter(a=["key"]),set:n.oneOfSetter(a)}),o.encode=function(e,t){if(t||(t=r.create()),null!=e.from&&Object.hasOwnProperty.call(e,"from")&&t.uint32(10).bytes(e.from),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(18).bytes(e.data),null!=e.seqno&&Object.hasOwnProperty.call(e,"seqno")&&t.uint32(26).bytes(e.seqno),null!=e.topicIDs&&e.topicIDs.length)for(var n=0;n<e.topicIDs.length;++n)t.uint32(34).string(e.topicIDs[n]);return null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(42).bytes(e.signature),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(50).bytes(e.key),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.Message;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.from=e.bytes();break;case 2:o.data=e.bytes();break;case 3:o.seqno=e.bytes();break;case 4:o.topicIDs&&o.topicIDs.length||(o.topicIDs=[]),o.topicIDs.push(e.string());break;case 5:o.signature=e.bytes();break;case 6:o.key=e.bytes();break;default:e.skipType(7&a)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.Message)return e;var t=new i.RPC.Message;if(null!=e.from&&("string"===typeof e.from?n.base64.decode(e.from,t.from=n.newBuffer(n.base64.length(e.from)),0):e.from.length&&(t.from=e.from)),null!=e.data&&("string"===typeof e.data?n.base64.decode(e.data,t.data=n.newBuffer(n.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),null!=e.seqno&&("string"===typeof e.seqno?n.base64.decode(e.seqno,t.seqno=n.newBuffer(n.base64.length(e.seqno)),0):e.seqno.length&&(t.seqno=e.seqno)),e.topicIDs){if(!Array.isArray(e.topicIDs))throw TypeError(".RPC.Message.topicIDs: array expected");t.topicIDs=[];for(var r=0;r<e.topicIDs.length;++r)t.topicIDs[r]=String(e.topicIDs[r])}return null!=e.signature&&("string"===typeof e.signature?n.base64.decode(e.signature,t.signature=n.newBuffer(n.base64.length(e.signature)),0):e.signature.length&&(t.signature=e.signature)),null!=e.key&&("string"===typeof e.key?n.base64.decode(e.key,t.key=n.newBuffer(n.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.topicIDs=[]),null!=e.from&&e.hasOwnProperty("from")&&(r.from=t.bytes===String?n.base64.encode(e.from,0,e.from.length):t.bytes===Array?Array.prototype.slice.call(e.from):e.from,t.oneofs&&(r._from="from")),null!=e.data&&e.hasOwnProperty("data")&&(r.data=t.bytes===String?n.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data,t.oneofs&&(r._data="data")),null!=e.seqno&&e.hasOwnProperty("seqno")&&(r.seqno=t.bytes===String?n.base64.encode(e.seqno,0,e.seqno.length):t.bytes===Array?Array.prototype.slice.call(e.seqno):e.seqno,t.oneofs&&(r._seqno="seqno")),e.topicIDs&&e.topicIDs.length){r.topicIDs=[];for(var i=0;i<e.topicIDs.length;++i)r.topicIDs[i]=e.topicIDs[i]}return null!=e.signature&&e.hasOwnProperty("signature")&&(r.signature=t.bytes===String?n.base64.encode(e.signature,0,e.signature.length):t.bytes===Array?Array.prototype.slice.call(e.signature):e.signature,t.oneofs&&(r._signature="signature")),null!=e.key&&e.hasOwnProperty("key")&&(r.key=t.bytes===String?n.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key,t.oneofs&&(r._key="key")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlMessage=function(){function o(e){if(this.ihave=[],this.iwant=[],this.graft=[],this.prune=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return o.prototype.ihave=n.emptyArray,o.prototype.iwant=n.emptyArray,o.prototype.graft=n.emptyArray,o.prototype.prune=n.emptyArray,o.encode=function(e,t){if(t||(t=r.create()),null!=e.ihave&&e.ihave.length)for(var n=0;n<e.ihave.length;++n)i.RPC.ControlIHave.encode(e.ihave[n],t.uint32(10).fork()).ldelim();if(null!=e.iwant&&e.iwant.length)for(n=0;n<e.iwant.length;++n)i.RPC.ControlIWant.encode(e.iwant[n],t.uint32(18).fork()).ldelim();if(null!=e.graft&&e.graft.length)for(n=0;n<e.graft.length;++n)i.RPC.ControlGraft.encode(e.graft[n],t.uint32(26).fork()).ldelim();if(null!=e.prune&&e.prune.length)for(n=0;n<e.prune.length;++n)i.RPC.ControlPrune.encode(e.prune[n],t.uint32(34).fork()).ldelim();return t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlMessage;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.ihave&&o.ihave.length||(o.ihave=[]),o.ihave.push(i.RPC.ControlIHave.decode(e,e.uint32()));break;case 2:o.iwant&&o.iwant.length||(o.iwant=[]),o.iwant.push(i.RPC.ControlIWant.decode(e,e.uint32()));break;case 3:o.graft&&o.graft.length||(o.graft=[]),o.graft.push(i.RPC.ControlGraft.decode(e,e.uint32()));break;case 4:o.prune&&o.prune.length||(o.prune=[]),o.prune.push(i.RPC.ControlPrune.decode(e,e.uint32()));break;default:e.skipType(7&a)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlMessage)return e;var t=new i.RPC.ControlMessage;if(e.ihave){if(!Array.isArray(e.ihave))throw TypeError(".RPC.ControlMessage.ihave: array expected");t.ihave=[];for(var r=0;r<e.ihave.length;++r){if("object"!==typeof e.ihave[r])throw TypeError(".RPC.ControlMessage.ihave: object expected");t.ihave[r]=i.RPC.ControlIHave.fromObject(e.ihave[r])}}if(e.iwant){if(!Array.isArray(e.iwant))throw TypeError(".RPC.ControlMessage.iwant: array expected");for(t.iwant=[],r=0;r<e.iwant.length;++r){if("object"!==typeof e.iwant[r])throw TypeError(".RPC.ControlMessage.iwant: object expected");t.iwant[r]=i.RPC.ControlIWant.fromObject(e.iwant[r])}}if(e.graft){if(!Array.isArray(e.graft))throw TypeError(".RPC.ControlMessage.graft: array expected");for(t.graft=[],r=0;r<e.graft.length;++r){if("object"!==typeof e.graft[r])throw TypeError(".RPC.ControlMessage.graft: object expected");t.graft[r]=i.RPC.ControlGraft.fromObject(e.graft[r])}}if(e.prune){if(!Array.isArray(e.prune))throw TypeError(".RPC.ControlMessage.prune: array expected");for(t.prune=[],r=0;r<e.prune.length;++r){if("object"!==typeof e.prune[r])throw TypeError(".RPC.ControlMessage.prune: object expected");t.prune[r]=i.RPC.ControlPrune.fromObject(e.prune[r])}}return t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.ihave=[],r.iwant=[],r.graft=[],r.prune=[]),e.ihave&&e.ihave.length){r.ihave=[];for(var n=0;n<e.ihave.length;++n)r.ihave[n]=i.RPC.ControlIHave.toObject(e.ihave[n],t)}if(e.iwant&&e.iwant.length)for(r.iwant=[],n=0;n<e.iwant.length;++n)r.iwant[n]=i.RPC.ControlIWant.toObject(e.iwant[n],t);if(e.graft&&e.graft.length)for(r.graft=[],n=0;n<e.graft.length;++n)r.graft[n]=i.RPC.ControlGraft.toObject(e.graft[n],t);if(e.prune&&e.prune.length)for(r.prune=[],n=0;n<e.prune.length;++n)r.prune[n]=i.RPC.ControlPrune.toObject(e.prune[n],t);return r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlIHave=function(){function o(e){if(this.messageIDs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var a;return o.prototype.topicID=null,o.prototype.messageIDs=n.emptyArray,Object.defineProperty(o.prototype,"_topicID",{get:n.oneOfGetter(a=["topicID"]),set:n.oneOfSetter(a)}),o.encode=function(e,t){if(t||(t=r.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&t.uint32(10).string(e.topicID),null!=e.messageIDs&&e.messageIDs.length)for(var n=0;n<e.messageIDs.length;++n)t.uint32(18).bytes(e.messageIDs[n]);return t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlIHave;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.topicID=e.string();break;case 2:o.messageIDs&&o.messageIDs.length||(o.messageIDs=[]),o.messageIDs.push(e.bytes());break;default:e.skipType(7&a)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlIHave)return e;var t=new i.RPC.ControlIHave;if(null!=e.topicID&&(t.topicID=String(e.topicID)),e.messageIDs){if(!Array.isArray(e.messageIDs))throw TypeError(".RPC.ControlIHave.messageIDs: array expected");t.messageIDs=[];for(var r=0;r<e.messageIDs.length;++r)"string"===typeof e.messageIDs[r]?n.base64.decode(e.messageIDs[r],t.messageIDs[r]=n.newBuffer(n.base64.length(e.messageIDs[r])),0):e.messageIDs[r].length&&(t.messageIDs[r]=e.messageIDs[r])}return t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.messageIDs=[]),null!=e.topicID&&e.hasOwnProperty("topicID")&&(r.topicID=e.topicID,t.oneofs&&(r._topicID="topicID")),e.messageIDs&&e.messageIDs.length){r.messageIDs=[];for(var i=0;i<e.messageIDs.length;++i)r.messageIDs[i]=t.bytes===String?n.base64.encode(e.messageIDs[i],0,e.messageIDs[i].length):t.bytes===Array?Array.prototype.slice.call(e.messageIDs[i]):e.messageIDs[i]}return r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlIWant=function(){function o(e){if(this.messageIDs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return o.prototype.messageIDs=n.emptyArray,o.encode=function(e,t){if(t||(t=r.create()),null!=e.messageIDs&&e.messageIDs.length)for(var n=0;n<e.messageIDs.length;++n)t.uint32(10).bytes(e.messageIDs[n]);return t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlIWant;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.messageIDs&&o.messageIDs.length||(o.messageIDs=[]),o.messageIDs.push(e.bytes());break;default:e.skipType(7&a)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlIWant)return e;var t=new i.RPC.ControlIWant;if(e.messageIDs){if(!Array.isArray(e.messageIDs))throw TypeError(".RPC.ControlIWant.messageIDs: array expected");t.messageIDs=[];for(var r=0;r<e.messageIDs.length;++r)"string"===typeof e.messageIDs[r]?n.base64.decode(e.messageIDs[r],t.messageIDs[r]=n.newBuffer(n.base64.length(e.messageIDs[r])),0):e.messageIDs[r].length&&(t.messageIDs[r]=e.messageIDs[r])}return t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.messageIDs=[]),e.messageIDs&&e.messageIDs.length){r.messageIDs=[];for(var i=0;i<e.messageIDs.length;++i)r.messageIDs[i]=t.bytes===String?n.base64.encode(e.messageIDs[i],0,e.messageIDs[i].length):t.bytes===Array?Array.prototype.slice.call(e.messageIDs[i]):e.messageIDs[i]}return r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlGraft=function(){function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var a;return o.prototype.topicID=null,Object.defineProperty(o.prototype,"_topicID",{get:n.oneOfGetter(a=["topicID"]),set:n.oneOfSetter(a)}),o.encode=function(e,t){return t||(t=r.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&t.uint32(10).string(e.topicID),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlGraft;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.topicID=e.string();break;default:e.skipType(7&a)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlGraft)return e;var t=new i.RPC.ControlGraft;return null!=e.topicID&&(t.topicID=String(e.topicID)),t},o.toObject=function(e,t){t||(t={});var r={};return null!=e.topicID&&e.hasOwnProperty("topicID")&&(r.topicID=e.topicID,t.oneofs&&(r._topicID="topicID")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlPrune=function(){function o(e){if(this.peers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var a;return o.prototype.topicID=null,o.prototype.peers=n.emptyArray,o.prototype.backoff=null,Object.defineProperty(o.prototype,"_topicID",{get:n.oneOfGetter(a=["topicID"]),set:n.oneOfSetter(a)}),Object.defineProperty(o.prototype,"_backoff",{get:n.oneOfGetter(a=["backoff"]),set:n.oneOfSetter(a)}),o.encode=function(e,t){if(t||(t=r.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&t.uint32(10).string(e.topicID),null!=e.peers&&e.peers.length)for(var n=0;n<e.peers.length;++n)i.RPC.PeerInfo.encode(e.peers[n],t.uint32(18).fork()).ldelim();return null!=e.backoff&&Object.hasOwnProperty.call(e,"backoff")&&t.uint32(24).uint64(e.backoff),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlPrune;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.topicID=e.string();break;case 2:o.peers&&o.peers.length||(o.peers=[]),o.peers.push(i.RPC.PeerInfo.decode(e,e.uint32()));break;case 3:o.backoff=e.uint64();break;default:e.skipType(7&a)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlPrune)return e;var t=new i.RPC.ControlPrune;if(null!=e.topicID&&(t.topicID=String(e.topicID)),e.peers){if(!Array.isArray(e.peers))throw TypeError(".RPC.ControlPrune.peers: array expected");t.peers=[];for(var r=0;r<e.peers.length;++r){if("object"!==typeof e.peers[r])throw TypeError(".RPC.ControlPrune.peers: object expected");t.peers[r]=i.RPC.PeerInfo.fromObject(e.peers[r])}}return null!=e.backoff&&(n.Long?(t.backoff=n.Long.fromValue(e.backoff)).unsigned=!0:"string"===typeof e.backoff?t.backoff=parseInt(e.backoff,10):"number"===typeof e.backoff?t.backoff=e.backoff:"object"===typeof e.backoff&&(t.backoff=new n.LongBits(e.backoff.low>>>0,e.backoff.high>>>0).toNumber(!0))),t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.peers=[]),null!=e.topicID&&e.hasOwnProperty("topicID")&&(r.topicID=e.topicID,t.oneofs&&(r._topicID="topicID")),e.peers&&e.peers.length){r.peers=[];for(var o=0;o<e.peers.length;++o)r.peers[o]=i.RPC.PeerInfo.toObject(e.peers[o],t)}return null!=e.backoff&&e.hasOwnProperty("backoff")&&("number"===typeof e.backoff?r.backoff=t.longs===String?String(e.backoff):e.backoff:r.backoff=t.longs===String?n.Long.prototype.toString.call(e.backoff):t.longs===Number?new n.LongBits(e.backoff.low>>>0,e.backoff.high>>>0).toNumber(!0):e.backoff,t.oneofs&&(r._backoff="backoff")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.PeerInfo=function(){function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var a;return o.prototype.peerID=null,o.prototype.signedPeerRecord=null,Object.defineProperty(o.prototype,"_peerID",{get:n.oneOfGetter(a=["peerID"]),set:n.oneOfSetter(a)}),Object.defineProperty(o.prototype,"_signedPeerRecord",{get:n.oneOfGetter(a=["signedPeerRecord"]),set:n.oneOfSetter(a)}),o.encode=function(e,t){return t||(t=r.create()),null!=e.peerID&&Object.hasOwnProperty.call(e,"peerID")&&t.uint32(10).bytes(e.peerID),null!=e.signedPeerRecord&&Object.hasOwnProperty.call(e,"signedPeerRecord")&&t.uint32(18).bytes(e.signedPeerRecord),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.PeerInfo;e.pos<n;){var a=e.uint32();switch(a>>>3){case 1:o.peerID=e.bytes();break;case 2:o.signedPeerRecord=e.bytes();break;default:e.skipType(7&a)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.PeerInfo)return e;var t=new i.RPC.PeerInfo;return null!=e.peerID&&("string"===typeof e.peerID?n.base64.decode(e.peerID,t.peerID=n.newBuffer(n.base64.length(e.peerID)),0):e.peerID.length&&(t.peerID=e.peerID)),null!=e.signedPeerRecord&&("string"===typeof e.signedPeerRecord?n.base64.decode(e.signedPeerRecord,t.signedPeerRecord=n.newBuffer(n.base64.length(e.signedPeerRecord)),0):e.signedPeerRecord.length&&(t.signedPeerRecord=e.signedPeerRecord)),t},o.toObject=function(e,t){t||(t={});var r={};return null!=e.peerID&&e.hasOwnProperty("peerID")&&(r.peerID=t.bytes===String?n.base64.encode(e.peerID,0,e.peerID.length):t.bytes===Array?Array.prototype.slice.call(e.peerID):e.peerID,t.oneofs&&(r._peerID="peerID")),null!=e.signedPeerRecord&&e.hasOwnProperty("signedPeerRecord")&&(r.signedPeerRecord=t.bytes===String?n.base64.encode(e.signedPeerRecord,0,e.signedPeerRecord.length):t.bytes===Array?Array.prototype.slice.call(e.signedPeerRecord):e.signedPeerRecord,t.oneofs&&(r._signedPeerRecord="signedPeerRecord")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o}(),i})?n.apply(t,i):n)||(e.exports=o)},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(497),t),i(r(1050),t),i(r(1051),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validatePeerScoreThresholds=t.createPeerScoreThresholds=t.defaultPeerScoreThresholds=void 0;var n=r(498),i=r(15);t.defaultPeerScoreThresholds={gossipThreshold:-10,publishThreshold:-50,graylistThreshold:-80,acceptPXThreshold:10,opportunisticGraftThreshold:20},t.createPeerScoreThresholds=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(Object.assign({},t.defaultPeerScoreThresholds),e)},t.validatePeerScoreThresholds=function(e){if(e.gossipThreshold>0)throw i(new Error("invalid gossip threshold; it must be <= 0"),n.ERR_INVALID_PEER_SCORE_THRESHOLDS);if(e.publishThreshold>0||e.publishThreshold>e.gossipThreshold)throw i(new Error("invalid publish threshold; it must be <= 0 and <= gossip threshold"),n.ERR_INVALID_PEER_SCORE_THRESHOLDS);if(e.graylistThreshold>0||e.graylistThreshold>e.publishThreshold)throw i(new Error("invalid graylist threshold; it must be <= 0 and <= publish threshold"),n.ERR_INVALID_PEER_SCORE_THRESHOLDS);if(e.acceptPXThreshold<0)throw i(new Error("invalid accept PX threshold; it must be >= 0"),n.ERR_INVALID_PEER_SCORE_THRESHOLDS);if(e.opportunisticGraftThreshold<0)throw i(new Error("invalid opportunistic grafting threshold; it must be >= 0"),n.ERR_INVALID_PEER_SCORE_THRESHOLDS)}},function(e,t,r){"use strict";var n=r(21),i=r(0),o=r(40),a=r(8),s=r(9),u=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PeerScore=void 0;var f=r(497),l=r(1052),h=r(1053),d=r(1054),p=r(135),v=c(r(219)),y=r(22),b=r(305).codes,g=b.ERR_INVALID_SIGNATURE,m=b.ERR_MISSING_SIGNATURE,w=y("libp2p:gossipsub:score"),k=function(){function e(t,r,n){a(this,e),f.validatePeerScoreParams(t),this.params=t,this._connectionManager=r,this.peerStats=new Map,this.peerIPs=new Map,this.deliveryRecords=new d.MessageDeliveries,this.msgId=n}return s(e,[{key:"start",value:function(){var e=this;this._backgroundInterval?w("Peer score already running"):(this._backgroundInterval=setInterval((function(){return e.background()}),this.params.decayInterval),w("started"))}},{key:"stop",value:function(){this._backgroundInterval?(clearInterval(this._backgroundInterval),delete this._backgroundInterval,this.peerIPs.clear(),this.peerStats.clear(),this.deliveryRecords.clear(),w("stopped")):w("Peer score already stopped")}},{key:"background",value:function(){this._refreshScores(),this._updateIPs(),this.deliveryRecords.gc()}},{key:"_refreshScores",value:function(){var e=this,t=Date.now(),r=this.params.decayToZero;this.peerStats.forEach((function(n,i){n.connected?(Object.entries(n.topics).forEach((function(n){var i=o(n,2),a=i[0],s=i[1],u=e.params.topics[a];u&&(s.firstMessageDeliveries*=u.firstMessageDeliveriesDecay,s.firstMessageDeliveries<r&&(s.firstMessageDeliveries=0),s.meshMessageDeliveries*=u.meshMessageDeliveriesDecay,s.meshMessageDeliveries<r&&(s.meshMessageDeliveries=0),s.meshFailurePenalty*=u.meshFailurePenaltyDecay,s.meshFailurePenalty<r&&(s.meshFailurePenalty=0),s.invalidMessageDeliveries*=u.invalidMessageDeliveriesDecay,s.invalidMessageDeliveries<r&&(s.invalidMessageDeliveries=0),s.inMesh&&(s.meshTime=t-s.graftTime,s.meshTime>u.meshMessageDeliveriesActivation&&(s.meshMessageDeliveriesActive=!0)))})),n.behaviourPenalty*=e.params.behaviourPenaltyDecay,n.behaviourPenalty<r&&(n.behaviourPenalty=0)):t>n.expire&&(e._removeIPs(i,n.ips),e.peerStats.delete(i))}))}},{key:"score",value:function(e){var t=this.peerStats.get(e);return t?h.computeScore(e,t,this.params,this.peerIPs):0}},{key:"addPenalty",value:function(e,t){var r=this.peerStats.get(e);r&&(r.behaviourPenalty+=t)}},{key:"addPeer",value:function(e){var t=l.createPeerStats({connected:!0});this.peerStats.set(e,t);var r=this._getIPs(e);this._setIPs(e,r,t.ips),t.ips=r}},{key:"removePeer",value:function(e){var t=this,r=this.peerStats.get(e);if(r){if(this.score(e)>0)return this._removeIPs(e,r.ips),void this.peerStats.delete(e);Object.entries(r.topics).forEach((function(e){var r=o(e,2),n=r[0],i=r[1];i.firstMessageDeliveries=0;var a=t.params.topics[n].meshMessageDeliveriesThreshold;if(i.inMesh&&i.meshMessageDeliveriesActive&&i.meshMessageDeliveries<a){var s=a-i.meshMessageDeliveries;i.meshFailurePenalty+=s*s}i.inMesh=!1})),r.connected=!1,r.expire=Date.now()+this.params.retainScore}}},{key:"graft",value:function(e,t){var r=this.peerStats.get(e);if(r){var n=l.ensureTopicStats(t,r,this.params);n&&(n.inMesh=!0,n.graftTime=Date.now(),n.meshTime=0,n.meshMessageDeliveriesActive=!1)}}},{key:"prune",value:function(e,t){var r=this.peerStats.get(e);if(r){var n=l.ensureTopicStats(t,r,this.params);if(n){var i=this.params.topics[t].meshMessageDeliveriesThreshold;if(n.meshMessageDeliveriesActive&&n.meshMessageDeliveries<i){var o=i-n.meshMessageDeliveries;n.meshFailurePenalty+=o*o}n.inMesh=!1}}}},{key:"validateMessage",value:function(e){return u(this,void 0,void 0,i.mark((function t(){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=this.deliveryRecords,t.next=3,this.msgId(e);case 3:t.t1=t.sent,t.t0.ensureRecord.call(t.t0,t.t1);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"deliverMessage",value:function(e){return u(this,void 0,void 0,i.mark((function t(){var r,n,o,a=this;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.receivedFrom,this._markFirstMessageDelivery(r,e),t.t0=this.deliveryRecords,t.next=5,this.msgId(e);case 5:if(t.t1=t.sent,n=t.t0.ensureRecord.call(t.t0,t.t1),o=Date.now(),n.status===d.DeliveryRecordStatus.unknown){t.next=11;break}return w("unexpected delivery: message from %s was first seen %s ago and has delivery status %d",r,o-n.firstSeen,d.DeliveryRecordStatus[n.status]),t.abrupt("return");case 11:n.status=d.DeliveryRecordStatus.valid,n.validated=o,n.peers.forEach((function(t){t!==r&&a._markDuplicateMessageDelivery(t,e)}));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"rejectMessage",value:function(e,t){return u(this,void 0,void 0,i.mark((function r(){var n,o,a=this;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=e.receivedFrom,r.t0=t,r.next=r.t0===m||r.t0===g?4:6;break;case 4:return this._markInvalidMessageDelivery(n,e),r.abrupt("return");case 6:return r.t1=this.deliveryRecords,r.next=9,this.msgId(e);case 9:if(r.t2=r.sent,(o=r.t1.ensureRecord.call(r.t1,r.t2)).status===d.DeliveryRecordStatus.unknown){r.next=14;break}return w("unexpected rejection: message from %s was first seen %s ago and has delivery status %d",n,Date.now()-o.firstSeen,d.DeliveryRecordStatus[o.status]),r.abrupt("return");case 14:r.t3=t,r.next=r.t3===p.ERR_TOPIC_VALIDATOR_IGNORE?17:19;break;case 17:return o.status=d.DeliveryRecordStatus.ignored,r.abrupt("return");case 19:o.status=d.DeliveryRecordStatus.invalid,this._markInvalidMessageDelivery(n,e),o.peers.forEach((function(t){a._markInvalidMessageDelivery(t,e)}));case 22:case"end":return r.stop()}}),r,this)})))}},{key:"duplicateMessage",value:function(e){return u(this,void 0,void 0,i.mark((function t(){var r,n;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.receivedFrom,t.t0=this.deliveryRecords,t.next=4,this.msgId(e);case 4:if(t.t1=t.sent,!(n=t.t0.ensureRecord.call(t.t0,t.t1)).peers.has(r)){t.next=8;break}return t.abrupt("return");case 8:t.t2=n.status,t.next=t.t2===d.DeliveryRecordStatus.unknown?11:t.t2===d.DeliveryRecordStatus.valid?13:t.t2===d.DeliveryRecordStatus.invalid?16:18;break;case 11:return n.peers.add(r),t.abrupt("break",18);case 13:return n.peers.add(r),this._markDuplicateMessageDelivery(r,e,n.validated),t.abrupt("break",18);case 16:return this._markInvalidMessageDelivery(r,e),t.abrupt("break",18);case 18:case"end":return t.stop()}}),t,this)})))}},{key:"_markInvalidMessageDelivery",value:function(e,t){var r=this,n=this.peerStats.get(e);n&&t.topicIDs.forEach((function(e){var t=l.ensureTopicStats(e,n,r.params);t&&(t.invalidMessageDeliveries+=1)}))}},{key:"_markFirstMessageDelivery",value:function(e,t){var r=this,n=this.peerStats.get(e);n&&t.topicIDs.forEach((function(e){var t=l.ensureTopicStats(e,n,r.params);if(t){var i=r.params.topics[e].firstMessageDeliveriesCap;t.firstMessageDeliveries+=1,t.firstMessageDeliveries>i&&(t.firstMessageDeliveries=i),t.inMesh&&(i=r.params.topics[e].meshMessageDeliveriesCap,t.meshMessageDeliveries+=1,t.meshMessageDeliveries>i&&(t.meshMessageDeliveries=i))}}))}},{key:"_markDuplicateMessageDelivery",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.peerStats.get(e);if(i){var o=n?Date.now():0;t.topicIDs.forEach((function(e){var t=l.ensureTopicStats(e,i,r.params);if(t&&t.inMesh){var a=r.params.topics[e];if(!(n&&o>n+a.meshMessageDeliveriesWindow)){var s=a.meshMessageDeliveriesCap;t.meshMessageDeliveries+=1,t.meshMessageDeliveries>s&&(t.meshMessageDeliveries=s)}}}))}}},{key:"_getIPs",value:function(e){return this._connectionManager.getAll(v.default.createFromB58String(e)).map((function(e){return e.remoteAddr.toOptions().host}))}},{key:"_setIPs",value:function(e,t,r){var i,o=n(t);try{e:for(o.s();!(i=o.n()).done;){var a,s=i.value,u=n(r);try{for(u.s();!(a=u.n()).done;){if(s===a.value)continue e}}catch(y){u.e(y)}finally{u.f()}var c=this.peerIPs.get(s);c||(c=new Set,this.peerIPs.set(s,c)),c.add(e)}}catch(y){o.e(y)}finally{o.f()}var f,l=n(r);try{e:for(l.s();!(f=l.n()).done;){var h,d=f.value,p=n(t);try{for(p.s();!(h=p.n()).done;){if(d===h.value)continue e}}catch(y){p.e(y)}finally{p.f()}var v=this.peerIPs.get(d);v&&(v.delete(e),v.size||this.peerIPs.delete(d))}}catch(y){l.e(y)}finally{l.f()}}},{key:"_removeIPs",value:function(e,t){var r=this;t.forEach((function(t){var n=r.peerIPs.get(t);n&&(n.delete(e),n.size||r.peerIPs.delete(t))}))}},{key:"_updateIPs",value:function(){var e=this;this.peerStats.forEach((function(t,r){var n=e._getIPs(r);e._setIPs(r,n,t.ips),t.ips=n}))}}]),e}();t.PeerScore=k},function(e,t,r){"use strict";var n=r(40);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign({inMesh:!1,graftTime:0,meshTime:0,firstMessageDeliveries:0,meshMessageDeliveries:0,meshMessageDeliveriesActive:!1,meshFailurePenalty:0,invalidMessageDeliveries:0},e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ensureTopicStats=t.createTopicStats=t.createPeerStats=void 0,t.createPeerStats=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(Object.assign({connected:!1,expire:0,ips:[],behaviourPenalty:0},e),{topics:e.topics?Object.entries(e.topics).reduce((function(e,t){var r=n(t,2),o=r[0],a=r[1];return e[o]=i(a),e}),{}):{}})},t.createTopicStats=i,t.ensureTopicStats=function(e,t,r){var n=t.topics[e];return n||(r.topics[e]?(t.topics[e]=n=i(),n):void 0)}},function(e,t,r){"use strict";var n=r(40);Object.defineProperty(t,"__esModule",{value:!0}),t.computeScore=void 0,t.computeScore=function(e,t,r,i){var o=0;Object.entries(t.topics).forEach((function(e){var t=n(e,2),i=t[0],a=t[1],s=r.topics[i];if(s){var u=0;if(a.inMesh){var c=a.meshTime/s.timeInMeshQuantum;c>s.timeInMeshCap&&(c=s.timeInMeshCap),u+=c*s.timeInMeshWeight}if(u+=a.firstMessageDeliveries*s.firstMessageDeliveriesWeight,a.meshMessageDeliveriesActive&&a.meshMessageDeliveries<s.meshMessageDeliveriesThreshold){var f=s.meshMessageDeliveriesThreshold-a.meshMessageDeliveries;u+=f*f*s.meshMessageDeliveriesWeight}u+=a.meshFailurePenalty*s.meshFailurePenaltyWeight,u+=a.invalidMessageDeliveries*a.invalidMessageDeliveries*s.invalidMessageDeliveriesWeight,o+=u*s.topicWeight}})),r.topicScoreCap>0&&o>r.topicScoreCap&&(o=r.topicScoreCap);var a=r.appSpecificScore(e);o+=a*r.appSpecificWeight,t.ips.forEach((function(e){if(!r.IPColocationFactorWhitelist.has(e)){var t=i.get(e),n=t?t.size:0;if(n>r.IPColocationFactorThreshold){var a=n-r.IPColocationFactorThreshold;o+=a*a*r.IPColocationFactorWeight}}}));var s=t.behaviourPenalty*t.behaviourPenalty;return o+=s*r.behaviourPenaltyWeight}},function(e,t,r){"use strict";var n=r(8),i=r(9),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDeliveries=t.DeliveryRecordStatus=void 0;var a,s=r(135),u=o(r(1055)),c=r(76);!function(e){e[e.unknown=0]="unknown",e[e.valid=1]="valid",e[e.invalid=2]="invalid",e[e.ignored=3]="ignored"}(a=t.DeliveryRecordStatus||(t.DeliveryRecordStatus={}));var f=function(){function e(){n(this,e),this.records=new Map,this.queue=new u.default}return i(e,[{key:"ensureRecord",value:function(e){var t=c.messageIdToString(e),r=this.records.get(t);if(r)return r;r={status:a.unknown,firstSeen:Date.now(),validated:0,peers:new Set},this.records.set(t,r);var n={msgId:t,expire:Date.now()+s.TimeCacheDuration};return this.queue.push(n),r}},{key:"gc",value:function(){for(var e=Date.now(),t=this.queue.peekFront();t&&t.expire<e;)this.records.delete(t.msgId),this.queue.shift(),t=this.queue.peekFront()}},{key:"clear",value:function(){this.records.clear(),this.queue.clear()}}]),e}();t.MessageDeliveries=f},function(e,t,r){"use strict";function n(e,t){t=t||{};this._head=0,this._tail=0,this._capacity=t.capacity,this._capacityMask=3,this._list=new Array(4),Array.isArray(e)&&this._fromArray(e)}n.prototype.peekAt=function(e){var t=e;if(t===(0|t)){var r=this.size();if(!(t>=r||t<-r))return t<0&&(t+=r),t=this._head+t&this._capacityMask,this._list[t]}},n.prototype.get=function(e){return this.peekAt(e)},n.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},n.prototype.peekFront=function(){return this.peek()},n.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(n.prototype,"length",{get:function(){return this.size()}}),n.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},n.prototype.unshift=function(e){if(void 0===e)return this.size();var t=this._list.length;return this._head=this._head-1+t&this._capacityMask,this._list[this._head]=e,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.pop(),this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},n.prototype.shift=function(){var e=this._head;if(e!==this._tail){var t=this._list[e];return this._list[e]=void 0,this._head=e+1&this._capacityMask,e<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),t}},n.prototype.push=function(e){if(void 0===e)return this.size();var t=this._tail;return this._list[t]=e,this._tail=t+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},n.prototype.pop=function(){var e=this._tail;if(e!==this._head){var t=this._list.length;this._tail=e-1+t&this._capacityMask;var r=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&e>1e4&&e<=t>>>2&&this._shrinkArray(),r}},n.prototype.removeOne=function(e){var t=e;if(t===(0|t)&&this._head!==this._tail){var r=this.size(),n=this._list.length;if(!(t>=r||t<-r)){t<0&&(t+=r),t=this._head+t&this._capacityMask;var i,o=this._list[t];if(e<r/2){for(i=e;i>0;i--)this._list[t]=this._list[t=t-1+n&this._capacityMask];this._list[t]=void 0,this._head=this._head+1+n&this._capacityMask}else{for(i=r-1-e;i>0;i--)this._list[t]=this._list[t=t+1+n&this._capacityMask];this._list[t]=void 0,this._tail=this._tail-1+n&this._capacityMask}return o}}},n.prototype.remove=function(e,t){var r,n=e,i=t;if(n===(0|n)&&this._head!==this._tail){var o=this.size(),a=this._list.length;if(!(n>=o||n<-o||t<1)){if(n<0&&(n+=o),1===t||!t)return(r=new Array(1))[0]=this.removeOne(n),r;if(0===n&&n+t>=o)return r=this.toArray(),this.clear(),r;var s;for(n+t>o&&(t=o-n),r=new Array(t),s=0;s<t;s++)r[s]=this._list[this._head+n+s&this._capacityMask];if(n=this._head+n&this._capacityMask,e+t===o){for(this._tail=this._tail-t+a&this._capacityMask,s=t;s>0;s--)this._list[n=n+1+a&this._capacityMask]=void 0;return r}if(0===e){for(this._head=this._head+t+a&this._capacityMask,s=t-1;s>0;s--)this._list[n=n+1+a&this._capacityMask]=void 0;return r}if(n<o/2){for(this._head=this._head+e+t+a&this._capacityMask,s=e;s>0;s--)this.unshift(this._list[n=n-1+a&this._capacityMask]);for(n=this._head-1+a&this._capacityMask;i>0;)this._list[n=n-1+a&this._capacityMask]=void 0,i--;e<0&&(this._tail=n)}else{for(this._tail=n,n=n+t+a&this._capacityMask,s=o-(t+e);s>0;s--)this.push(this._list[n++]);for(n=this._tail;i>0;)this._list[n=n+1+a&this._capacityMask]=void 0,i--}return this._head<2&&this._tail>1e4&&this._tail<=a>>>2&&this._shrinkArray(),r}}},n.prototype.splice=function(e,t){var r=e;if(r===(0|r)){var n=this.size();if(r<0&&(r+=n),!(r>n)){if(arguments.length>2){var i,o,a,s=arguments.length,u=this._list.length,c=2;if(!n||r<n/2){for(o=new Array(r),i=0;i<r;i++)o[i]=this._list[this._head+i&this._capacityMask];for(0===t?(a=[],r>0&&(this._head=this._head+r+u&this._capacityMask)):(a=this.remove(r,t),this._head=this._head+r+u&this._capacityMask);s>c;)this.unshift(arguments[--s]);for(i=r;i>0;i--)this.unshift(o[i-1])}else{var f=(o=new Array(n-(r+t))).length;for(i=0;i<f;i++)o[i]=this._list[this._head+r+t+i&this._capacityMask];for(0===t?(a=[],r!=n&&(this._tail=this._head+r+u&this._capacityMask)):(a=this.remove(r,t),this._tail=this._tail-f+u&this._capacityMask);c<s;)this.push(arguments[c++]);for(i=0;i<f;i++)this.push(o[i])}return a}return this.remove(r,t)}}},n.prototype.clear=function(){this._head=0,this._tail=0},n.prototype.isEmpty=function(){return this._head===this._tail},n.prototype.toArray=function(){return this._copyArray(!1)},n.prototype._fromArray=function(e){for(var t=0;t<e.length;t++)this.push(e[t])},n.prototype._copyArray=function(e){var t,r=[],n=this._list,i=n.length;if(e||this._head>this._tail){for(t=this._head;t<i;t++)r.push(n[t]);for(t=0;t<this._tail;t++)r.push(n[t])}else for(t=this._head;t<this._tail;t++)r.push(n[t]);return r},n.prototype._growArray=function(){this._head&&(this._list=this._copyArray(!0),this._head=0),this._tail=this._list.length,this._list.length*=2,this._capacityMask=this._capacityMask<<1|1},n.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},e.exports=n},function(e,t,r){"use strict";var n=r(0),i=r(8),o=r(9),a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.IWantTracer=void 0;var s=r(135),u=r(76),c=r(305).codes,f=c.ERR_INVALID_SIGNATURE,l=c.ERR_MISSING_SIGNATURE,h=function(){function e(t){i(this,e),this.getMsgId=t,this.promises=new Map}return o(e,[{key:"addPromise",value:function(e,t){var r=t[Math.floor(Math.random()*t.length)],n=u.messageIdToString(r),i=this.promises.get(n);i||(i=new Map,this.promises.set(n,i)),i.has(e)||i.set(e,Date.now()+s.GossipsubIWantFollowupTime)}},{key:"getBrokenPromises",value:function(){var e=this,t=Date.now(),r=new Map;return this.promises.forEach((function(n,i){n.forEach((function(e,i){e<t&&(r.set(i,(r.get(i)||0)+1),n.delete(i))})),n.size||e.promises.delete(i)})),r}},{key:"deliverMessage",value:function(e){return a(this,void 0,void 0,n.mark((function t(){var r,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getMsgId(e);case 2:r=t.sent,i=u.messageIdToString(r),this.promises.delete(i);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"rejectMessage",value:function(e,t){return a(this,void 0,void 0,n.mark((function r(){var i,o;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=t,r.next=r.t0===f||r.t0===l?3:4;break;case 3:return r.abrupt("return");case 4:return r.next=6,this.getMsgId(e);case 6:i=r.sent,o=u.messageIdToString(i),this.promises.delete(o);case 9:case"end":return r.stop()}}),r,this)})))}},{key:"clear",value:function(){this.promises.clear()}}]),e}();t.IWantTracer=h},function(e,t,r){"use strict";var n=r(1058);e.exports=function e(t){var r=this;if(!(this instanceof e))return new e(t);var i=(t=t||{}).validity||30,o=new Map,a=n((function(){o.forEach((function(e,t){var r=e.validity||i;(function(e){var t=(new Date).getTime()-e.getTime();return Math.floor(t/1e3)})(e.timestamp)>r&&o.delete(t)}))}),200);this.put=function(e,t,n){r.has(e)||o.set(e,{value:t,timestamp:new Date,validity:n}),a()},this.get=function(e){if(o.has(e))return o.get(e).value;throw new Error("key does not exist")},this.has=function(e){return o.has(e)}}},function(e,t,r){(function(t){var r="Expected a function",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,f=u||c||Function("return this")(),l=Object.prototype.toString,h=Math.max,d=Math.min,p=function(){return f.Date.now()};function v(e,t,n){var i,o,a,s,u,c,f=0,l=!1,v=!1,g=!0;if("function"!=typeof e)throw new TypeError(r);function m(t){var r=i,n=o;return i=o=void 0,f=t,s=e.apply(n,r)}function w(e){return f=e,u=setTimeout(S,t),l?m(e):s}function k(e){var r=e-c;return void 0===c||r>=t||r<0||v&&e-f>=a}function S(){var e=p();if(k(e))return E(e);u=setTimeout(S,function(e){var r=t-(e-c);return v?d(r,a-(e-f)):r}(e))}function E(e){return u=void 0,g&&i?m(e):(i=o=void 0,s)}function _(){var e=p(),r=k(e);if(i=arguments,o=this,c=e,r){if(void 0===u)return w(c);if(v)return u=setTimeout(S,t),m(c)}return void 0===u&&(u=setTimeout(S,t)),s}return t=b(t)||0,y(n)&&(l=!!n.leading,a=(v="maxWait"in n)?h(b(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),_.cancel=function(){void 0!==u&&clearTimeout(u),f=0,i=c=o=u=void 0},_.flush=function(){return void 0===u?s:E(p())},_}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var r=o.test(e);return r||a.test(e)?s(e.slice(2),r?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),v(e,t,{leading:i,maxWait:t,trailing:o})}}).call(this,r(36))},function(e,t,r){"use strict";t.SignaturePolicy={StrictSign:"StrictSign",StrictNoSign:"StrictNoSign"}},,,function(e,t,r){"use strict";r(186);var n=r(1),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,o={},c=null,f=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(f=t.ref),t)s.call(t,n)&&!u.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:c,ref:f,props:o,_owner:a.current}}t.jsx=c,t.jsxs=c},function(e,t,r){"use strict";var n=r(1064);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";e.exports=r(1066)},function(e,t,r){"use strict";var n="function"===typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,f=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,v=n?Symbol.for("react.suspense_list"):60120,y=n?Symbol.for("react.memo"):60115,b=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,k=n?Symbol.for("react.scope"):60119;function S(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case l:case h:case a:case u:case s:case p:return e;default:switch(e=e&&e.$$typeof){case f:case d:case b:case y:case c:return e;default:return t}}case o:return t}}}function E(e){return S(e)===h}t.AsyncMode=l,t.ConcurrentMode=h,t.ContextConsumer=f,t.ContextProvider=c,t.Element=i,t.ForwardRef=d,t.Fragment=a,t.Lazy=b,t.Memo=y,t.Portal=o,t.Profiler=u,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||S(e)===l},t.isConcurrentMode=E,t.isContextConsumer=function(e){return S(e)===f},t.isContextProvider=function(e){return S(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return S(e)===d},t.isFragment=function(e){return S(e)===a},t.isLazy=function(e){return S(e)===b},t.isMemo=function(e){return S(e)===y},t.isPortal=function(e){return S(e)===o},t.isProfiler=function(e){return S(e)===u},t.isStrictMode=function(e){return S(e)===s},t.isSuspense=function(e){return S(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===h||e===u||e===s||e===p||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===y||e.$$typeof===c||e.$$typeof===f||e.$$typeof===d||e.$$typeof===m||e.$$typeof===w||e.$$typeof===k||e.$$typeof===g)},t.typeOf=S},function(e,t,r){"use strict";var n=60103,i=60106,o=60107,a=60108,s=60114,u=60109,c=60110,f=60112,l=60113,h=60120,d=60115,p=60116,v=60121,y=60122,b=60117,g=60129,m=60131;if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element"),i=w("react.portal"),o=w("react.fragment"),a=w("react.strict_mode"),s=w("react.profiler"),u=w("react.provider"),c=w("react.context"),f=w("react.forward_ref"),l=w("react.suspense"),h=w("react.suspense_list"),d=w("react.memo"),p=w("react.lazy"),v=w("react.block"),y=w("react.server.block"),b=w("react.fundamental"),g=w("react.debug_trace_mode"),m=w("react.legacy_hidden")}function k(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case s:case a:case l:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case p:case d:case u:return e;default:return t}}case i:return t}}}var S=u,E=n,_=f,A=o,x=p,T=d,M=i,C=s,O=a,I=l;t.ContextConsumer=c,t.ContextProvider=S,t.Element=E,t.ForwardRef=_,t.Fragment=A,t.Lazy=x,t.Memo=T,t.Portal=M,t.Profiler=C,t.StrictMode=O,t.Suspense=I,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===p},t.isMemo=function(e){return k(e)===d},t.isPortal=function(e){return k(e)===i},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===a},t.isSuspense=function(e){return k(e)===l},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===s||e===g||e===a||e===l||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===b||e.$$typeof===v||e[0]===y)},t.typeOf=k},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var n=r(1070).default;function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!==typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=a?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(o,s,u):o[s]=e[s]}return o.default=e,r&&r.set(e,o),o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=r=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=r=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r(1074)},function(e,t,r){"use strict";r.r(t),r.d(t,"Address4",(function(){return k})),r.d(t,"Address6",(function(){return X})),r.d(t,"AddressError",(function(){return g})),r.d(t,"v6",(function(){return W}));var n={};r.r(n),r.d(n,"spanAllZeroes",(function(){return R})),r.d(n,"spanAll",(function(){return B})),r.d(n,"spanLeadingZeroes",(function(){return N})),r.d(n,"simpleGroup",(function(){return L}));var i=r(5),o=r(7);function a(e){return!(this.subnetMask<e.subnetMask)&&this.mask(e.subnetMask)===e.mask()}function s(e){return function(){return this.addressMinusSuffix===this.correctForm()&&(this.subnetMask===e&&!this.parsedSubnet||this.parsedSubnet===String(this.subnetMask))}}var u=32,c=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,f=/\/\d{1,2}$/,l=r(10),h=r(11),d=r(37),p=r(144);var v=r(227);function y(e,t,r){return(y=Object(v.a)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Object(p.a)(i,r.prototype),i}).apply(null,arguments)}function b(e){var t="function"===typeof Map?new Map:void 0;return(b=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return y(e,arguments,Object(d.a)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Object(p.a)(n,e)})(e)}var g=function(e){Object(l.a)(r,e);var t=Object(h.a)(r);function r(e,n){var o;return Object(i.a)(this,r),(o=t.call(this,e)).name="AddressError",null!==n&&(o.parseMessage=n),o}return r}(b(Error)),m=r(47),w=r(32),k=function(){function e(t){Object(i.a)(this,e),this.groups=4,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=s(u),this.isInSubnet=a,this.address=t;var r=f.exec(t);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/".concat(this.subnetMask),this.subnetMask<0||this.subnetMask>u)throw new g("Invalid subnet mask.");t=t.replace(f,"")}this.addressMinusSuffix=t,this.parsedAddress=this.parse(t)}return Object(o.a)(e,[{key:"parse",value:function(e){var t=e.split(".");if(!e.match(c))throw new g("Invalid IPv4 address.");return t}},{key:"correctForm",value:function(){return this.parsedAddress.map((function(e){return parseInt(e,10)})).join(".")}},{key:"toHex",value:function(){return this.parsedAddress.map((function(e){return Object(w.sprintf)("%02x",parseInt(e,10))})).join(":")}},{key:"toArray",value:function(){return this.parsedAddress.map((function(e){return parseInt(e,10)}))}},{key:"toGroup6",value:function(){var e,t=[];for(e=0;e<4;e+=2){var r=Object(w.sprintf)("%02x%02x",parseInt(this.parsedAddress[e],10),parseInt(this.parsedAddress[e+1],10));t.push(Object(w.sprintf)("%x",parseInt(r,16)))}return t.join(":")}},{key:"bigInteger",value:function(){return new m.BigInteger(this.parsedAddress.map((function(e){return Object(w.sprintf)("%02x",parseInt(e,10))})).join(""),16)}},{key:"_startAddress",value:function(){return new m.BigInteger(this.mask()+"0".repeat(u-this.subnetMask),2)}},{key:"startAddress",value:function(){return e.fromBigInteger(this._startAddress())}},{key:"startAddressExclusive",value:function(){var t=new m.BigInteger("1");return e.fromBigInteger(this._startAddress().add(t))}},{key:"_endAddress",value:function(){return new m.BigInteger(this.mask()+"1".repeat(u-this.subnetMask),2)}},{key:"endAddress",value:function(){return e.fromBigInteger(this._endAddress())}},{key:"endAddressExclusive",value:function(){var t=new m.BigInteger("1");return e.fromBigInteger(this._endAddress().subtract(t))}},{key:"mask",value:function(e){return void 0===e&&(e=this.subnetMask),this.getBitsBase2(0,e)}},{key:"getBitsBase2",value:function(e,t){return this.binaryZeroPad().slice(e,t)}},{key:"reverseForm",value:function(e){e||(e={});var t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:Object(w.sprintf)("%s.in-addr.arpa.",t)}},{key:"isMulticast",value:function(){return this.isInSubnet(new e("224.0.0.0/4"))}},{key:"binaryZeroPad",value:function(){return this.bigInteger().toString(2).padStart(u,"0")}},{key:"groupForV6",value:function(){var e=this.parsedAddress;return this.address.replace(c,Object(w.sprintf)('<span class="hover-group group-v4 group-6">%s</span>.<span class="hover-group group-v4 group-7">%s</span>',e.slice(0,2).join("."),e.slice(2,4).join(".")))}}],[{key:"isValid",value:function(t){try{return new e(t),!0}catch(r){return!1}}},{key:"fromHex",value:function(t){var r,n=t.replace(/:/g,"").padStart(8,"0"),i=[];for(r=0;r<8;r+=2){var o=n.slice(r,r+2);i.push(parseInt(o,16))}return new e(i.join("."))}},{key:"fromInteger",value:function(t){return e.fromHex(t.toString(16))}},{key:"fromArpa",value:function(t){return new e(t.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join("."))}},{key:"fromBigInteger",value:function(t){return e.fromInteger(parseInt(t.toString(),10))}}]),e}(),S=r(51),E=r(104),_=128,A={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"},x={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"},T=/([^0-9a-f:/%])/gi,M=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi,C=/\/\d{1,3}(?=%|$)/,O=/%.*$/,I=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/),P=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/);function R(e){return e.replace(/(0+)/g,'<span class="zero">$1</span>')}function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.split("");return r.map((function(e,r){return Object(w.sprintf)('<span class="digit value-%s position-%d">%s</span>',e,r+t,R(e))})).join("")}function D(e){return e.replace(/^(0+)/,'<span class="zero">$1</span>')}function N(e){return e.split(":").map((function(e){return D(e)})).join(":")}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.split(":");return r.map((function(e,r){return/group-v4/.test(e)?e:Object(w.sprintf)('<span class="hover-group group-%d">%s</span>',r+t,D(e))}))}function j(e){return Object(w.sprintf)("(%s)",e.join("|"))}function U(e){return e.length<4?Object(w.sprintf)("0{0,%d}%s",4-e.length,e):e}var F="[^A-Fa-f0-9:]";function K(e){var t=[];e.forEach((function(e,r){0===parseInt(e,16)&&t.push(r)}));var r=t.map((function(t){return e.map((function(e,r){if(r===t){var n=0===r||7===r?":":"";return j([U(e),n])}return U(e)})).join(":")}));return r.push(e.map(U).join(":")),j(r)}function z(e,t,r){var n=t?"":":",i=r?"":":",o=[];t||r||o.push("::"),t&&r&&o.push(""),(r&&!t||!r&&t)&&o.push(":"),o.push(Object(w.sprintf)("%s(:0{1,4}){1,%d}",n,e-1)),o.push(Object(w.sprintf)("(0{1,4}:){1,%d}%s",e-1,i)),o.push(Object(w.sprintf)("(0{1,4}:){%d}0{1,4}",e-1));for(var a=1;a<e-1;a++)for(var s=1;s<e-a;s++)o.push(Object(w.sprintf)("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",s,e-s-a-1));return j(o)}function V(e){if(!e)throw new Error("Assertion failed.")}function H(e){for(var t=/(\d+)(\d{3})/;t.test(e);)e=e.replace(t,"$1,$2");return e}function J(e){return e=(e=e.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2')).replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2')}function q(e){return Object(w.sprintf)("%04x",parseInt(e,16))}function G(e){return 255&e}var X=function(){function e(t,r){Object(i.a)(this,e),this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=a,this.isCorrect=s(_),this.groups=void 0===r?8:r,this.address=t;var n=C.exec(t);if(n){if(this.parsedSubnet=n[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/".concat(this.subnetMask),Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>_)throw new g("Invalid subnet mask.");t=t.replace(C,"")}else if(/\//.test(t))throw new g("Invalid subnet mask.");var o=O.exec(t);o&&(this.zone=o[0],t=t.replace(O,"")),this.addressMinusSuffix=t,this.parsedAddress=this.parse(this.addressMinusSuffix)}return Object(o.a)(e,[{key:"microsoftTranscription",value:function(){return Object(w.sprintf)("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}},{key:"mask",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.subnetMask;return this.getBitsBase2(0,e)}},{key:"possibleSubnets",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128,t=_-this.subnetMask,r=Math.abs(e-_),n=t-r;return n<0?"0":H(new m.BigInteger("2",10).pow(n).toString(10))}},{key:"_startAddress",value:function(){return new m.BigInteger(this.mask()+"0".repeat(_-this.subnetMask),2)}},{key:"startAddress",value:function(){return e.fromBigInteger(this._startAddress())}},{key:"startAddressExclusive",value:function(){var t=new m.BigInteger("1");return e.fromBigInteger(this._startAddress().add(t))}},{key:"_endAddress",value:function(){return new m.BigInteger(this.mask()+"1".repeat(_-this.subnetMask),2)}},{key:"endAddress",value:function(){return e.fromBigInteger(this._endAddress())}},{key:"endAddressExclusive",value:function(){var t=new m.BigInteger("1");return e.fromBigInteger(this._endAddress().subtract(t))}},{key:"getScope",value:function(){var e=A[this.getBits(12,16).intValue()];return"Global unicast"===this.getType()&&"Link local"!==e&&(e="Global"),e||"Unknown"}},{key:"getType",value:function(){for(var t=0,r=Object.keys(x);t<r.length;t++){var n=r[t];if(this.isInSubnet(new e(n)))return x[n]}return"Global unicast"}},{key:"getBits",value:function(e,t){return new m.BigInteger(this.getBitsBase2(e,t),2)}},{key:"getBitsBase2",value:function(e,t){return this.binaryZeroPad().slice(e,t)}},{key:"getBitsBase16",value:function(e,t){var r=t-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(r/4,"0")}},{key:"getBitsPastSubnet",value:function(){return this.getBitsBase2(this.subnetMask,_)}},{key:"reverseForm",value:function(e){e||(e={});var t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:Object(w.sprintf)("%s.ip6.arpa.",r):e.omitSuffix?"":"ip6.arpa."}},{key:"correctForm",value:function(){var e,t=[],r=0,n=[];for(e=0;e<this.parsedAddress.length;e++){var i=parseInt(this.parsedAddress[e],16);0===i&&r++,0!==i&&r>0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);var o=n.map((function(e){return e[1]-e[0]+1}));if(n.length>0){var a=o.indexOf(Math.max.apply(Math,Object(E.a)(o)));t=function(e,t){var r,n=[],i=[];for(r=0;r<e.length;r++)r<t[0]?n.push(e[r]):r>t[1]&&i.push(e[r]);return n.concat(["compact"]).concat(i)}(this.parsedAddress,n[a])}else t=this.parsedAddress;for(e=0;e<t.length;e++)"compact"!==t[e]&&(t[e]=parseInt(t[e],16).toString(16));var s=t.join(":");return s=(s=(s=s.replace(/^compact$/,"::")).replace(/^compact|compact$/,":")).replace(/compact/,"")}},{key:"binaryZeroPad",value:function(){return this.bigInteger().toString(2).padStart(_,"0")}},{key:"parse4in6",value:function(e){var t=e.split(":"),r=t.slice(-1)[0].match(c);if(r){this.parsedAddress4=r[0],this.address4=new k(this.parsedAddress4);for(var n=0;n<this.address4.groups;n++)if(/^0[0-9]+/.test(this.address4.parsedAddress[n]))throw new g("IPv4 addresses can't have leading zeroes.",e.replace(c,this.address4.parsedAddress.map(J).join(".")));this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}},{key:"parse",value:function(e){var t=(e=this.parse4in6(e)).match(T);if(t)throw new g(Object(w.sprintf)("Bad character%s detected in address: %s",t.length>1?"s":"",t.join("")),e.replace(T,'<span class="parse-error">$1</span>'));var r=e.match(M);if(r)throw new g(Object(w.sprintf)("Address failed regex: %s",r.join("")),e.replace(M,'<span class="parse-error">$1</span>'));var n=[],i=e.split("::");if(2===i.length){var o=i[0].split(":"),a=i[1].split(":");1===o.length&&""===o[0]&&(o=[]),1===a.length&&""===a[0]&&(a=[]);var s=this.groups-(o.length+a.length);if(!s)throw new g("Error parsing groups");this.elidedGroups=s,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,n=n.concat(o);for(var u=0;u<s;u++)n.push("0");n=n.concat(a)}else{if(1!==i.length)throw new g("Too many :: groups found");n=e.split(":"),this.elidedGroups=0}if((n=n.map((function(e){return Object(w.sprintf)("%x",parseInt(e,16))}))).length!==this.groups)throw new g("Incorrect number of groups found");return n}},{key:"canonicalForm",value:function(){return this.parsedAddress.map(q).join(":")}},{key:"decimal",value:function(){return this.parsedAddress.map((function(e){return Object(w.sprintf)("%05d",parseInt(e,16))})).join(":")}},{key:"bigInteger",value:function(){return new m.BigInteger(this.parsedAddress.map(q).join(""),16)}},{key:"to4",value:function(){var e=this.binaryZeroPad().split("");return k.fromHex(new m.BigInteger(e.slice(96,128).join(""),2).toString(16))}},{key:"to4in6",value:function(){var t=this.to4(),r=new e(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),n="";return/:$/.test(r)||(n=":"),r+n+t.address}},{key:"inspectTeredo",value:function(){var e=this.getBitsBase16(0,32),t=this.getBits(80,96).xor(new m.BigInteger("ffff",16)).toString(),r=k.fromHex(this.getBitsBase16(32,64)),n=k.fromHex(this.getBits(96,128).xor(new m.BigInteger("ffffffff",16)).toString(16)),i=this.getBits(64,80),o=this.getBitsBase2(64,80),a=i.testBit(15),s=i.testBit(14),u=i.testBit(8),c=i.testBit(9),f=new m.BigInteger(o.slice(2,6)+o.slice(8,16),2).toString(10);return{prefix:Object(w.sprintf)("%s:%s",e.slice(0,4),e.slice(4,8)),server4:r.address,client4:n.address,flags:o,coneNat:a,microsoft:{reserved:s,universalLocal:c,groupIndividual:u,nonce:f},udpPort:t}}},{key:"inspect6to4",value:function(){var e=this.getBitsBase16(0,16),t=k.fromHex(this.getBitsBase16(16,48));return{prefix:Object(w.sprintf)("%s",e.slice(0,4)),gateway:t.address}}},{key:"to6to4",value:function(){return this.is4()?new e(["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":")):null}},{key:"toByteArray",value:function(){var e=this.bigInteger().toByteArray();return 17===e.length&&0===e[0]?e.slice(1):e}},{key:"toUnsignedByteArray",value:function(){return this.toByteArray().map(G)}},{key:"isCanonical",value:function(){return this.addressMinusSuffix===this.canonicalForm()}},{key:"isLinkLocal",value:function(){return"1111111010000000000000000000000000000000000000000000000000000000"===this.getBitsBase2(0,64)}},{key:"isMulticast",value:function(){return"Multicast"===this.getType()}},{key:"is4",value:function(){return this.v4}},{key:"isTeredo",value:function(){return this.isInSubnet(new e("2001::/32"))}},{key:"is6to4",value:function(){return this.isInSubnet(new e("2002::/16"))}},{key:"isLoopback",value:function(){return"Loopback"===this.getType()}},{key:"href",value:function(e){return e=void 0===e?"":Object(w.sprintf)(":%s",e),Object(w.sprintf)("http://[%s]%s/",this.correctForm(),e)}},{key:"link",value:function(e){e||(e={}),void 0===e.className&&(e.className=""),void 0===e.prefix&&(e.prefix="/#address="),void 0===e.v4&&(e.v4=!1);var t=this.correctForm;return e.v4&&(t=this.to4in6),e.className?Object(w.sprintf)('<a href="%1$s%2$s" class="%3$s">%2$s</a>',e.prefix,t.call(this),e.className):Object(w.sprintf)('<a href="%1$s%2$s">%2$s</a>',e.prefix,t.call(this))}},{key:"group",value:function(){if(0===this.elidedGroups)return L(this.address).join(":");V("number"===typeof this.elidedGroups),V("number"===typeof this.elisionBegin);var e=[],t=this.address.split("::"),r=Object(S.a)(t,2),n=r[0],i=r[1];n.length?e.push.apply(e,Object(E.a)(L(n))):e.push("");for(var o=["hover-group"],a=this.elisionBegin;a<this.elisionBegin+this.elidedGroups;a++)o.push(Object(w.sprintf)("group-%d",a));return e.push(Object(w.sprintf)('<span class="%s"></span>',o.join(" "))),i.length?e.push.apply(e,Object(E.a)(L(i,this.elisionEnd))):e.push(""),this.is4()&&(V(this.address4 instanceof k),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}},{key:"regularExpressionString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=[],n=new e(this.correctForm());if(0===n.elidedGroups)r.push(K(n.parsedAddress));else if(8===n.elidedGroups)r.push(z(8));else{var i=n.address.split("::");i[0].length&&r.push(K(i[0].split(":"))),V("number"===typeof n.elidedGroups),r.push(z(n.elidedGroups,0!==i[0].length,0!==i[1].length)),i[1].length&&r.push(K(i[1].split(":"))),r=[r.join(":")]}return t||(r=["(?=^|",F,"|[^\\w\\:])("].concat(Object(E.a)(r),[")(?=[^\\w\\:]|",F,"|$)"])),r.join("")}},{key:"regularExpression",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new RegExp(this.regularExpressionString(e),"i")}}],[{key:"isValid",value:function(t){try{return new e(t),!0}catch(r){return!1}}},{key:"fromBigInteger",value:function(t){var r,n=t.toString(16).padStart(32,"0"),i=[];for(r=0;r<8;r++)i.push(n.slice(4*r,4*(r+1)));return new e(i.join(":"))}},{key:"fromURL",value:function(t){var r,n,i=null;if(-1!==t.indexOf("[")&&-1!==t.indexOf("]:")){if(null===(n=P.exec(t)))return{error:"failed to parse address with port",address:null,port:null};r=n[1],i=n[2]}else if(-1!==t.indexOf("/")){if(t=t.replace(/^[a-z0-9]+:\/\//,""),null===(n=I.exec(t)))return{error:"failed to parse address from URL",address:null,port:null};r=n[1]}else r=t;return i?((i=parseInt(i,10))<0||i>65536)&&(i=null):i=null,{address:new e(r),port:i}}},{key:"fromAddress4",value:function(t){var r=new k(t),n=_-(u-r.subnetMask);return new e("::ffff:".concat(r.correctForm(),"/").concat(n))}},{key:"fromArpa",value:function(t){var r=t.replace(/(\.ip6\.arpa)?\.$/,"");if(63!==r.length)throw new g("Invalid 'ip6.arpa' form.");for(var n=r.split(".").reverse(),i=7;i>0;i--){var o=4*i;n.splice(o,0,":")}return new e(r=n.join(""))}},{key:"fromByteArray",value:function(e){return this.fromUnsignedByteArray(e.map(G))}},{key:"fromUnsignedByteArray",value:function(t){for(var r=new m.BigInteger("256",10),n=new m.BigInteger("0",10),i=new m.BigInteger("1",10),o=t.length-1;o>=0;o--)n=n.add(i.multiply(new m.BigInteger(t[o].toString(10),10))),i=i.multiply(r);return e.fromBigInteger(n)}}]),e}(),W={helpers:n}},,function(e,t,r){"use strict";r.r(t),r.d(t,"capitalize",(function(){return n.a})),r.d(t,"createChainedFunction",(function(){return i.a})),r.d(t,"createSvgIcon",(function(){return o.a})),r.d(t,"debounce",(function(){return a.a})),r.d(t,"deprecatedPropType",(function(){return s})),r.d(t,"isMuiElement",(function(){return u.a})),r.d(t,"ownerDocument",(function(){return c.a})),r.d(t,"ownerWindow",(function(){return f.a})),r.d(t,"requirePropFactory",(function(){return l})),r.d(t,"setRef",(function(){return h.a})),r.d(t,"unsupportedProp",(function(){return d})),r.d(t,"useControlled",(function(){return p.a})),r.d(t,"useEventCallback",(function(){return v.a})),r.d(t,"useForkRef",(function(){return y.a})),r.d(t,"unstable_useId",(function(){return g})),r.d(t,"useIsFocusVisible",(function(){return m.a}));var n=r(31),i=r(122),o=r(224),a=r(140);function s(e,t){return function(){return null}}var u=r(101),c=r(53),f=r(141);function l(e){return function(){return null}}var h=r(80);function d(e,t,r,n,i){return null}var p=r(223),v=r(70),y=r(35),b=r(1);function g(e){var t=b.useState(e),r=t[0],n=t[1],i=e||r;return b.useEffect((function(){null==r&&n("mui-".concat(Math.round(1e5*Math.random())))}),[r]),i}var m=r(222)},function(e,t,r){"use strict";var n=r(12),i=r(4),o=r(1),a=(r(24),r(16)),s=r(19),u=r(59),c=r(314),f=r(31),l=o.forwardRef((function(e,t){var r=e.children,s=e.classes,u=e.className,l=e.color,h=void 0===l?"default":l,d=e.component,p=void 0===d?"button":d,v=e.disabled,y=void 0!==v&&v,b=e.disableElevation,g=void 0!==b&&b,m=e.disableFocusRipple,w=void 0!==m&&m,k=e.endIcon,S=e.focusVisibleClassName,E=e.fullWidth,_=void 0!==E&&E,A=e.size,x=void 0===A?"medium":A,T=e.startIcon,M=e.type,C=void 0===M?"button":M,O=e.variant,I=void 0===O?"text":O,P=Object(n.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),R=T&&o.createElement("span",{className:Object(a.a)(s.startIcon,s["iconSize".concat(Object(f.a)(x))])},T),B=k&&o.createElement("span",{className:Object(a.a)(s.endIcon,s["iconSize".concat(Object(f.a)(x))])},k);return o.createElement(c.a,Object(i.a)({className:Object(a.a)(s.root,s[I],u,"inherit"===h?s.colorInherit:"default"!==h&&s["".concat(I).concat(Object(f.a)(h))],"medium"!==x&&[s["".concat(I,"Size").concat(Object(f.a)(x))],s["size".concat(Object(f.a)(x))]],g&&s.disableElevation,y&&s.disabled,_&&s.fullWidth),component:p,disabled:y,focusRipple:!w,focusVisibleClassName:Object(a.a)(s.focusVisible,S),ref:t,type:C},P),o.createElement("span",{className:s.label},R,r,B))}));t.a=Object(s.a)((function(e){return{root:Object(i.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(u.b)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(u.b)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(u.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(u.b)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(u.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(l)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(19),u=r(314),c=r(101),f=r(35),l=r(103),h=r(38),d="undefined"===typeof window?o.useEffect:o.useLayoutEffect,p=o.forwardRef((function(e,t){var r=e.alignItems,s=void 0===r?"center":r,p=e.autoFocus,v=void 0!==p&&p,y=e.button,b=void 0!==y&&y,g=e.children,m=e.classes,w=e.className,k=e.component,S=e.ContainerComponent,E=void 0===S?"li":S,_=e.ContainerProps,A=(_=void 0===_?{}:_).className,x=Object(i.a)(_,["className"]),T=e.dense,M=void 0!==T&&T,C=e.disabled,O=void 0!==C&&C,I=e.disableGutters,P=void 0!==I&&I,R=e.divider,B=void 0!==R&&R,D=e.focusVisibleClassName,N=e.selected,L=void 0!==N&&N,j=Object(i.a)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),U=o.useContext(l.a),F={dense:M||U.dense||!1,alignItems:s},K=o.useRef(null);d((function(){v&&K.current&&K.current.focus()}),[v]);var z=o.Children.toArray(g),V=z.length&&Object(c.a)(z[z.length-1],["ListItemSecondaryAction"]),H=o.useCallback((function(e){K.current=h.findDOMNode(e)}),[]),J=Object(f.a)(H,t),q=Object(n.a)({className:Object(a.a)(m.root,w,F.dense&&m.dense,!P&&m.gutters,B&&m.divider,O&&m.disabled,b&&m.button,"center"!==s&&m.alignItemsFlexStart,V&&m.secondaryAction,L&&m.selected),disabled:O},j),G=k||"li";return b&&(q.component=k||"div",q.focusVisibleClassName=Object(a.a)(m.focusVisible,D),G=u.a),V?(G=q.component||k?G:"div","li"===E&&("li"===G?G="div":"li"===q.component&&(q.component="div")),o.createElement(l.a.Provider,{value:F},o.createElement(E,Object(n.a)({className:Object(a.a)(m.container,A),ref:J},x),o.createElement(G,q,z),z.pop()))):o.createElement(l.a.Provider,{value:F},o.createElement(G,Object(n.a)({ref:J},q),z))}));t.a=Object(s.a)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(p)},function(e,t,r){"use strict";var n=r(4),i=r(1081),o=r(145);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)(e,Object(n.a)({defaultTheme:o.a},t))}},function(e,t,r){"use strict";var n=r(12),i=r(73),o=r(4),a=r(1),s=(r(24),r(16)),u=r(19),c=r(1076),f=a.forwardRef((function(e,t){var r,i=e.classes,u=e.className,f=e.component,l=void 0===f?"li":f,h=e.disableGutters,d=void 0!==h&&h,p=e.ListItemClasses,v=e.role,y=void 0===v?"menuitem":v,b=e.selected,g=e.tabIndex,m=Object(n.a)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(r=void 0!==g?g:-1),a.createElement(c.a,Object(o.a)({button:!0,role:y,tabIndex:r,component:l,selected:b,disableGutters:d,classes:Object(o.a)({dense:i.dense},p),className:Object(s.a)(i.root,u,b&&i.selected,!d&&i.gutters),ref:t},m))}));t.a=Object(u.a)((function(e){return{root:Object(o.a)({},e.typography.body1,Object(i.a)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Object(o.a)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(f)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(125),u=r(19),c=r(31),f=r(101),l=r(126),h=o.forwardRef((function(e,t){var r=e.children,u=e.classes,h=e.className,d=e.color,p=void 0===d?"primary":d,v=e.component,y=void 0===v?"div":v,b=e.disabled,g=void 0!==b&&b,m=e.error,w=void 0!==m&&m,k=e.fullWidth,S=void 0!==k&&k,E=e.focused,_=e.hiddenLabel,A=void 0!==_&&_,x=e.margin,T=void 0===x?"none":x,M=e.required,C=void 0!==M&&M,O=e.size,I=e.variant,P=void 0===I?"standard":I,R=Object(i.a)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),B=o.useState((function(){var e=!1;return r&&o.Children.forEach(r,(function(t){if(Object(f.a)(t,["Input","Select"])){var r=Object(f.a)(t,["Select"])?t.props.input:t;r&&Object(s.a)(r.props)&&(e=!0)}})),e})),D=B[0],N=B[1],L=o.useState((function(){var e=!1;return r&&o.Children.forEach(r,(function(t){Object(f.a)(t,["Input","Select"])&&Object(s.b)(t.props,!0)&&(e=!0)})),e})),j=L[0],U=L[1],F=o.useState(!1),K=F[0],z=F[1],V=void 0!==E?E:K;g&&V&&z(!1);var H=o.useCallback((function(){U(!0)}),[]),J={adornedStart:D,setAdornedStart:N,color:p,disabled:g,error:w,filled:j,focused:V,fullWidth:S,hiddenLabel:A,margin:("small"===O?"dense":void 0)||T,onBlur:function(){z(!1)},onEmpty:o.useCallback((function(){U(!1)}),[]),onFilled:H,onFocus:function(){z(!0)},registerEffect:undefined,required:C,variant:P};return o.createElement(l.a.Provider,{value:J},o.createElement(y,Object(n.a)({className:Object(a.a)(u.root,h,"none"!==T&&u["margin".concat(Object(c.a)(T))],S&&u.fullWidth),ref:t},R),r))}));t.a=Object(u.a)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(h)},function(e,t,r){"use strict";var n=r(12),i=r(4),o=r(1),a=(r(24),r(16)),s=r(19),u=o.forwardRef((function(e,t){var r=e.classes,s=e.className,u=e.component,c=void 0===u?"div":u,f=e.square,l=void 0!==f&&f,h=e.elevation,d=void 0===h?1:h,p=e.variant,v=void 0===p?"elevation":p,y=Object(n.a)(e,["classes","className","component","square","elevation","variant"]);return o.createElement(c,Object(i.a)({className:Object(a.a)(r.root,s,"outlined"===v?r.outlined:r["elevation".concat(d)],!l&&r.rounded),ref:t},y))}));t.a=Object(s.a)((function(e){var t={};return e.shadows.forEach((function(e,r){t["elevation".concat(r)]={boxShadow:e}})),Object(i.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(u)},function(e,t,r){"use strict";r.d(t,"a",(function(){return pr}));var n=r(12),i=r(4),o=r(1),a=r.n(o),s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u="object"===("undefined"===typeof window?"undefined":s(window))&&"object"===("undefined"===typeof document?"undefined":s(document))&&9===document.nodeType;var c=r(149),f=r(124),l=r(184),h=r(100),d={}.constructor;function p(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(p);if(e.constructor!==d)return e;var t={};for(var r in e)t[r]=p(e[r]);return t}function v(e,t,r){void 0===e&&(e="unnamed");var n=r.jss,i=p(t),o=n.plugins.onCreateRule(e,i,r);return o||(e[0],null)}var y=function(e,t){for(var r="",n=0;n<e.length&&"!important"!==e[n];n++)r&&(r+=t),r+=e[n];return r},b=function(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)r&&(r+=", "),r+=y(e[n]," ");else r=y(e,", ");return t||"!important"!==e[e.length-1]||(r+=" !important"),r};function g(e,t){for(var r="",n=0;n<t;n++)r+=" ";return r+e}function m(e,t,r){void 0===r&&(r={});var n="";if(!t)return n;var i=r.indent,o=void 0===i?0:i,a=t.fallbacks;if(e&&o++,a)if(Array.isArray(a))for(var s=0;s<a.length;s++){var u=a[s];for(var c in u){var f=u[c];null!=f&&(n&&(n+="\n"),n+=""+g(c+": "+b(f)+";",o))}}else for(var l in a){var h=a[l];null!=h&&(n&&(n+="\n"),n+=""+g(l+": "+b(h)+";",o))}for(var d in t){var p=t[d];null!=p&&"fallbacks"!==d&&(n&&(n+="\n"),n+=""+g(d+": "+b(p)+";",o))}return(n||r.allowEmpty)&&e?(n&&(n="\n"+n+"\n"),g(e+" {"+n,--o)+g("}",o)):n}var w=/([[\].#*$><+~=|^:(),"'`\s])/g,k="undefined"!==typeof CSS&&CSS.escape,S=function(e){return k?k(e):e.replace(w,"\\$1")},E=function(){function e(e,t,r){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var n=r.sheet,i=r.Renderer;this.key=e,this.options=r,this.style=t,n?this.renderer=n.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,r){if(void 0===t)return this.style[e];var n=!!r&&r.force;if(!n&&this.style[e]===t)return this;var i=t;r&&!1===r.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!n)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),_=function(e){function t(t,r,n){var i;(i=e.call(this,t,r,n)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=n.selector,a=n.scoped,s=n.sheet,u=n.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u(Object(l.a)(Object(l.a)(i)),s),i.selectorText="."+S(i.id)),i}Object(f.a)(t,e);var r=t.prototype;return r.applyTo=function(e){var t=this.renderer;if(t){var r=this.toJSON();for(var n in r)t.setProperty(e,n,r[n])}return this},r.toJSON=function(){var e={};for(var t in this.style){var r=this.style[t];"object"!==typeof r?e[t]=r:Array.isArray(r)&&(e[t]=b(r))}return e},r.toString=function(e){var t=this.options.sheet,r=!!t&&t.options.link?Object(i.a)({},e,{allowEmpty:!0}):e;return m(this.selectorText,this.style,r)},Object(c.a)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,r=this.renderable;if(r&&t)t.setSelector(r,e)||t.replaceRule(r,this)}},get:function(){return this.selectorText}}]),t}(E),A={onCreateRule:function(e,t,r){return"@"===e[0]||r.parent&&"keyframes"===r.parent.type?null:new _(e,t,r)}},x={indent:1,children:!0},T=/@([\w-]+)/,M=function(){function e(e,t,r){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var n=e.match(T);for(var o in this.at=n?n[1]:"unknown",this.query=r.name||"@"+this.at,this.options=r,this.rules=new Y(Object(i.a)({},r,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n?(this.options.jss.plugins.onProcessRule(n),n):null},t.toString=function(e){if(void 0===e&&(e=x),null==e.indent&&(e.indent=x.indent),null==e.children&&(e.children=x.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),C=/@media|@supports\s+/,O={onCreateRule:function(e,t,r){return C.test(e)?new M(e,t,r):null}},I={indent:1,children:!0},P=/@keyframes\s+([\w-]+)/,R=function(){function e(e,t,r){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var n=e.match(P);n&&n[1]?this.name=n[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=r;var o=r.scoped,a=r.sheet,s=r.generateId;for(var u in this.id=!1===o?this.name:S(s(this,a)),this.rules=new Y(Object(i.a)({},r,{parent:this})),t)this.rules.add(u,t[u],Object(i.a)({},r,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=I),null==e.indent&&(e.indent=I.indent),null==e.children&&(e.children=I.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),B=/@keyframes\s+/,D=/\$([\w-]+)/g,N=function(e,t){return"string"===typeof e?e.replace(D,(function(e,r){return r in t?t[r]:e})):e},L=function(e,t,r){var n=e[t],i=N(n,r);i!==n&&(e[t]=i)},j={onCreateRule:function(e,t,r){return"string"===typeof e&&B.test(e)?new R(e,t,r):null},onProcessStyle:function(e,t,r){return"style"===t.type&&r?("animation-name"in e&&L(e,"animation-name",r.keyframes),"animation"in e&&L(e,"animation",r.keyframes),e):e},onChangeValue:function(e,t,r){var n=r.options.sheet;if(!n)return e;switch(t){case"animation":case"animation-name":return N(e,n.keyframes);default:return e}}},U=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).renderable=void 0,t}return Object(f.a)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,r=!!t&&t.options.link?Object(i.a)({},e,{allowEmpty:!0}):e;return m(this.key,this.style,r)},t}(E),F={onCreateRule:function(e,t,r){return r.parent&&"keyframes"===r.parent.type?new U(e,t,r):null}},K=function(){function e(e,t,r){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",r=0;r<this.style.length;r++)t+=m(this.at,this.style[r]),this.style[r+1]&&(t+="\n");return t}return m(this.at,this.style,e)},e}(),z=/@font-face/,V={onCreateRule:function(e,t,r){return z.test(e)?new K(e,t,r):null}},H=function(){function e(e,t,r){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){return m(this.key,this.style,e)},e}(),J={onCreateRule:function(e,t,r){return"@viewport"===e||"@-ms-viewport"===e?new H(e,t,r):null}},q=function(){function e(e,t,r){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=r}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",r=0;r<this.value.length;r++)t+=this.key+" "+this.value[r]+";",this.value[r+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),G={"@charset":!0,"@import":!0,"@namespace":!0},X=[A,O,j,F,V,J,{onCreateRule:function(e,t,r){return e in G?new q(e,t,r):null}}],W={process:!0},Z={force:!0,process:!0},Y=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,r){var n=this.options,o=n.parent,a=n.sheet,s=n.jss,u=n.Renderer,c=n.generateId,f=n.scoped,l=Object(i.a)({classes:this.classes,parent:o,sheet:a,jss:s,Renderer:u,generateId:c,scoped:f,name:e,keyframes:this.keyframes,selector:void 0},r),h=e;e in this.raw&&(h=e+"-d"+this.counter++),this.raw[h]=t,h in this.classes&&(l.selector="."+S(this.classes[h]));var d=v(h,t,l);if(!d)return null;this.register(d);var p=void 0===l.index?this.index.length:l.index;return this.index.splice(p,0,d),d},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof _?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof R&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof _?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof R&&delete this.keyframes[e.name]},t.update=function(){var e,t,r;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],r=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,r);else for(var n=0;n<this.index.length;n++)this.updateOne(this.index[n],t,r)},t.updateOne=function(t,r,n){void 0===n&&(n=W);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(r,n);else{var s=t,u=s.style;if(o.onUpdate(r,t,a,n),n.process&&u&&u!==s.style){for(var c in o.onProcessStyle(s.style,s,a),s.style){var f=s.style[c];f!==u[c]&&s.prop(c,f,Z)}for(var l in u){var h=s.style[l],d=u[l];null==h&&h!==d&&s.prop(l,null,Z)}}}},t.toString=function(e){for(var t="",r=this.options.sheet,n=!!r&&r.options.link,i=0;i<this.index.length;i++){var o=this.index[i].toString(e);(o||n)&&(t&&(t+="\n"),t+=o)}return t},e}(),Q=function(){function e(e,t){for(var r in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Object(i.a)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Y(this.options),e)this.rules.add(r,e[r]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,r){var n=this.queue;this.attached&&!n&&(this.queue=[]);var i=this.rules.add(e,t,r);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(n?n.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var r=[];for(var n in e){var i=this.addRule(n,e[n],t);i&&r.push(i)}return r},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,r){return this.rules.updateOne(e,t,r),this},t.toString=function(e){return this.rules.toString(e)},e}(),$=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,r){for(var n=0;n<this.registry.onCreateRule.length;n++){var i=this.registry.onCreateRule[n](e,t,r);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,r=0;r<this.registry.onProcessRule.length;r++)this.registry.onProcessRule[r](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,r){for(var n=0;n<this.registry.onProcessStyle.length;n++)t.style=this.registry.onProcessStyle[n](t.style,t,r)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,r,n){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,r,n)},t.onChangeValue=function(e,t,r){for(var n=e,i=0;i<this.registry.onChangeValue.length;i++)n=this.registry.onChangeValue[i](n,t,r);return n},t.use=function(e,t){void 0===t&&(t={queue:"external"});var r=this.plugins[t.queue];-1===r.indexOf(e)&&(r.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var r in t)r in e&&e[r].push(t[r]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),ee=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,r=e.options.index;if(-1===t.indexOf(e))if(0===t.length||r>=this.index)t.push(e);else for(var n=0;n<t.length;n++)if(t[n].options.index>r)return void t.splice(n,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,r=t.attached,n=Object(h.a)(t,["attached"]),i="",o=0;o<this.registry.length;o++){var a=this.registry[o];null!=r&&a.attached!==r||(i&&(i+="\n"),i+=a.toString(n))}return i},Object(c.a)(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),te="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof self&&self.Math===Math?self:Function("return this")(),re="2f1acc6c3a606b082e5eef5e54414ffb";null==te[re]&&(te[re]=0);var ne=te[re]++,ie=function(e){void 0===e&&(e={});var t=0;return function(r,n){t+=1;var i="",o="";return n&&(n.options.classNamePrefix&&(o=n.options.classNamePrefix),null!=n.options.jss.id&&(i=String(n.options.jss.id))),e.minify?""+(o||"c")+ne+i+t:o+r.key+"-"+ne+(i?"-"+i:"")+"-"+t}},oe=function(e){var t;return function(){return t||(t=e()),t}},ae=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(r){return""}},se=function(e,t,r){try{var n=r;if(Array.isArray(r)&&(n=b(r,!0),"!important"===r[r.length-1]))return e.style.setProperty(t,n,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,n):e.style.setProperty(t,n)}catch(i){return!1}return!0},ue=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(r){}},ce=function(e,t){return e.selectorText=t,e.selectorText===t},fe=oe((function(){return document.querySelector("head")}));function le(e){var t=ee.registry;if(t.length>0){var r=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n.attached&&n.options.index>t.index&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if((r=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.attached&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e))&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=e.insertionPoint;if(n&&"string"===typeof n){var i=function(e){for(var t=fe(),r=0;r<t.childNodes.length;r++){var n=t.childNodes[r];if(8===n.nodeType&&n.nodeValue.trim()===e)return n}return null}(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var he=oe((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),de=function(e,t,r){try{if("insertRule"in e)e.insertRule(t,r);else if("appendRule"in e){e.appendRule(t)}}catch(n){return!1}return e.cssRules[r]},pe=function(e,t){var r=e.cssRules.length;return void 0===t||t>r?r:t},ve=function(){function e(e){this.getPropertyValue=ae,this.setProperty=se,this.removeProperty=ue,this.setSelector=ce,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],e&&ee.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},r=t.media,n=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),n&&this.element.setAttribute("data-meta",n);var o=he();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var r=t.insertionPoint,n=le(t);if(!1!==n&&n.parent)n.parent.insertBefore(e,n.node);else if(r&&"number"===typeof r.nodeType){var i=r,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else fe().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var r=0;r<e.index.length;r++)this.insertRule(e.index[r],r,t)},t.insertRule=function(e,t,r){if(void 0===r&&(r=this.element.sheet),e.rules){var n=e,i=r;if("conditional"===e.type||"keyframes"===e.type){var o=pe(r,t);if(!1===(i=de(r,n.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(n.rules,i),i}var a=e.toString();if(!a)return!1;var s=pe(r,t),u=de(r,a,s);return!1!==u&&(this.hasInsertedRules=!0,this.refCssRule(e,s,u),u)},t.refCssRule=function(e,t,r){e.renderable=r,e.options.parent instanceof Q&&(this.cssRules[t]=r)},t.deleteRule=function(e){var t=this.element.sheet,r=this.indexOf(e);return-1!==r&&(t.deleteRule(r),this.cssRules.splice(r,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var r=this.indexOf(e);return-1!==r&&(this.element.sheet.deleteRule(r),this.cssRules.splice(r,1),this.insertRule(t,r))},t.getRules=function(){return this.element.sheet.cssRules},e}(),ye=0,be=function(){function e(e){this.id=ye++,this.version="10.6.0",this.plugins=new $,this.options={id:{minify:!1},createGenerateId:ie,Renderer:u?ve:null,plugins:[]},this.generateId=ie({minify:!1});for(var t=0;t<X.length;t++)this.plugins.use(X[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Object(i.a)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var r=t.index;"number"!==typeof r&&(r=0===ee.index?0:ee.index+1);var n=new Q(e,Object(i.a)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:r}));return this.plugins.onProcessSheet(n),n},t.removeStyleSheet=function(e){return e.detach(),ee.remove(e),this},t.createRule=function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r={}),"object"===typeof e)return this.createRule(void 0,e,t);var n=Object(i.a)({},r,{name:e,jss:this,Renderer:this.options.Renderer});n.generateId||(n.generateId=this.generateId),n.classes||(n.classes={}),n.keyframes||(n.keyframes={});var o=v(e,t,n);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach((function(t){e.plugins.use(t)})),this},e}();function ge(e){var t=null;for(var r in e){var n=e[r],i=typeof n;if("function"===i)t||(t={}),t[r]=n;else if("object"===i&&null!==n&&!Array.isArray(n)){var o=ge(n);o&&(t||(t={}),t[r]=o)}}return t}var me="object"===typeof CSS&&null!=CSS&&"number"in CSS,we=function(e){return new be(e)},ke=(we(),r(1113)),Se={set:function(e,t,r,n){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(r,n)},get:function(e,t,r){var n=e.get(t);return n?n.get(r):void 0},delete:function(e,t,r){e.get(t).delete(r)}},Ee=r(520),_e=(r(24),r(230)),Ae=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var xe=Date.now(),Te="fnValues"+xe,Me="fnStyle"+ ++xe,Ce=function(){return{onCreateRule:function(e,t,r){if("function"!==typeof t)return null;var n=v(e,{},r);return n[Me]=t,n},onProcessStyle:function(e,t){if(Te in t||Me in t)return e;var r={};for(var n in e){var i=e[n];"function"===typeof i&&(delete e[n],r[n]=i)}return t[Te]=r,e},onUpdate:function(e,t,r,n){var i=t,o=i[Me];o&&(i.style=o(e)||{});var a=i[Te];if(a)for(var s in a)i.prop(s,a[s](e),n)}}},Oe="@global",Ie="@global ",Pe=function(){function e(e,t,r){for(var n in this.type="global",this.at=Oe,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=r,this.rules=new Y(Object(i.a)({},r,{parent:this})),t)this.rules.add(n,t[n]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Re=function(){function e(e,t,r){this.type="global",this.at=Oe,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=r;var n=e.substr(Ie.length);this.rule=r.jss.createRule(n,t,Object(i.a)({},r,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Be=/\s*,\s*/g;function De(e,t){for(var r=e.split(Be),n="",i=0;i<r.length;i++)n+=t+" "+r[i].trim(),r[i+1]&&(n+=", ");return n}var Ne=function(){return{onCreateRule:function(e,t,r){if(!e)return null;if(e===Oe)return new Pe(e,t,r);if("@"===e[0]&&e.substr(0,Ie.length)===Ie)return new Re(e,t,r);var n=r.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(r.scoped=!1),!1===r.scoped&&(r.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var r=e.options,n=e.style,o=n?n[Oe]:null;if(o){for(var a in o)t.addRule(a,o[a],Object(i.a)({},r,{selector:De(a,e.selector)}));delete n[Oe]}}(e,t),function(e,t){var r=e.options,n=e.style;for(var o in n)if("@"===o[0]&&o.substr(0,Oe.length)===Oe){var a=De(o.substr(Oe.length),e.selector);t.addRule(a,n[o],Object(i.a)({},r,{selector:a})),delete n[o]}}(e,t))}}},Le=/\s*,\s*/g,je=/&/g,Ue=/\$([\w-]+)/g;var Fe=function(){function e(e,t){return function(r,n){var i=e.getRule(n)||t&&t.getRule(n);return i?(i=i).selector:n}}function t(e,t){for(var r=t.split(Le),n=e.split(Le),i="",o=0;o<r.length;o++)for(var a=r[o],s=0;s<n.length;s++){var u=n[s];i&&(i+=", "),i+=-1!==u.indexOf("&")?u.replace(je,a):a+" "+u}return i}function r(e,t,r){if(r)return Object(i.a)({},r,{index:r.index+1});var n=e.options.nestingLevel;n=void 0===n?1:n+1;var o=Object(i.a)({},e.options,{nestingLevel:n,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(n,o,a){if("style"!==o.type)return n;var s,u,c=o,f=c.options.parent;for(var l in n){var h=-1!==l.indexOf("&"),d="@"===l[0];if(h||d){if(s=r(c,f,s),h){var p=t(l,c.selector);u||(u=e(f,a)),p=p.replace(Ue,u),f.addRule(p,n[l],Object(i.a)({},s,{selector:p}))}else d&&f.addRule(l,{},s).addRule(c.key,n[l],{selector:c.selector});delete n[l]}}return n}}},Ke=/[A-Z]/g,ze=/^ms-/,Ve={};function He(e){return"-"+e.toLowerCase()}var Je=function(e){if(Ve.hasOwnProperty(e))return Ve[e];var t=e.replace(Ke,He);return Ve[e]=ze.test(t)?"-"+t:t};function qe(e){var t={};for(var r in e){t[0===r.indexOf("--")?r:Je(r)]=e[r]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(qe):t.fallbacks=qe(e.fallbacks)),t}var Ge=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=qe(e[t]);return e}return qe(e)},onChangeValue:function(e,t,r){if(0===t.indexOf("--"))return e;var n=Je(t);return t===n?e:(r.prop(n,e),null)}}},Xe=me&&CSS?CSS.px:"px",We=me&&CSS?CSS.ms:"ms",Ze=me&&CSS?CSS.percent:"%";function Ye(e){var t=/(-[a-z])/g,r=function(e){return e[1].toUpperCase()},n={};for(var i in e)n[i]=e[i],n[i.replace(t,r)]=e[i];return n}var Qe=Ye({"animation-delay":We,"animation-duration":We,"background-position":Xe,"background-position-x":Xe,"background-position-y":Xe,"background-size":Xe,border:Xe,"border-bottom":Xe,"border-bottom-left-radius":Xe,"border-bottom-right-radius":Xe,"border-bottom-width":Xe,"border-left":Xe,"border-left-width":Xe,"border-radius":Xe,"border-right":Xe,"border-right-width":Xe,"border-top":Xe,"border-top-left-radius":Xe,"border-top-right-radius":Xe,"border-top-width":Xe,"border-width":Xe,"border-block":Xe,"border-block-end":Xe,"border-block-end-width":Xe,"border-block-start":Xe,"border-block-start-width":Xe,"border-block-width":Xe,"border-inline":Xe,"border-inline-end":Xe,"border-inline-end-width":Xe,"border-inline-start":Xe,"border-inline-start-width":Xe,"border-inline-width":Xe,"border-start-start-radius":Xe,"border-start-end-radius":Xe,"border-end-start-radius":Xe,"border-end-end-radius":Xe,margin:Xe,"margin-bottom":Xe,"margin-left":Xe,"margin-right":Xe,"margin-top":Xe,"margin-block":Xe,"margin-block-end":Xe,"margin-block-start":Xe,"margin-inline":Xe,"margin-inline-end":Xe,"margin-inline-start":Xe,padding:Xe,"padding-bottom":Xe,"padding-left":Xe,"padding-right":Xe,"padding-top":Xe,"padding-block":Xe,"padding-block-end":Xe,"padding-block-start":Xe,"padding-inline":Xe,"padding-inline-end":Xe,"padding-inline-start":Xe,"mask-position-x":Xe,"mask-position-y":Xe,"mask-size":Xe,height:Xe,width:Xe,"min-height":Xe,"max-height":Xe,"min-width":Xe,"max-width":Xe,bottom:Xe,left:Xe,top:Xe,right:Xe,inset:Xe,"inset-block":Xe,"inset-block-end":Xe,"inset-block-start":Xe,"inset-inline":Xe,"inset-inline-end":Xe,"inset-inline-start":Xe,"box-shadow":Xe,"text-shadow":Xe,"column-gap":Xe,"column-rule":Xe,"column-rule-width":Xe,"column-width":Xe,"font-size":Xe,"font-size-delta":Xe,"letter-spacing":Xe,"text-decoration-thickness":Xe,"text-indent":Xe,"text-stroke":Xe,"text-stroke-width":Xe,"word-spacing":Xe,motion:Xe,"motion-offset":Xe,outline:Xe,"outline-offset":Xe,"outline-width":Xe,perspective:Xe,"perspective-origin-x":Ze,"perspective-origin-y":Ze,"transform-origin":Ze,"transform-origin-x":Ze,"transform-origin-y":Ze,"transform-origin-z":Ze,"transition-delay":We,"transition-duration":We,"vertical-align":Xe,"flex-basis":Xe,"shape-margin":Xe,size:Xe,gap:Xe,grid:Xe,"grid-gap":Xe,"row-gap":Xe,"grid-row-gap":Xe,"grid-column-gap":Xe,"grid-template-rows":Xe,"grid-template-columns":Xe,"grid-auto-rows":Xe,"grid-auto-columns":Xe,"box-shadow-x":Xe,"box-shadow-y":Xe,"box-shadow-blur":Xe,"box-shadow-spread":Xe,"font-line-height":Xe,"text-shadow-x":Xe,"text-shadow-y":Xe,"text-shadow-blur":Xe});function $e(e,t,r){if(null==t)return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=$e(e,t[n],r);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=$e(i,t[i],r);else for(var o in t)t[o]=$e(e+"-"+o,t[o],r);else if("number"===typeof t&&!1===isNaN(t)){var a=r[e]||Qe[e];return!a||0===t&&a===Xe?t.toString():"function"===typeof a?a(t).toString():""+t+a}return t}var et=function(e){void 0===e&&(e={});var t=Ye(e);return{onProcessStyle:function(e,r){if("style"!==r.type)return e;for(var n in e)e[n]=$e(n,e[n],t);return e},onChangeValue:function(e,r){return $e(r,e,t)}}},tt=r(102),rt="",nt="",it="",ot="",at=u&&"ontouchstart"in document.documentElement;if(u){var st={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},ut=document.createElement("p").style;for(var ct in st)if(ct+"Transform"in ut){rt=ct,nt=st[ct];break}"Webkit"===rt&&"msHyphens"in ut&&(rt="ms",nt=st.ms,ot="edge"),"Webkit"===rt&&"-apple-trailing-word"in ut&&(it="apple")}var ft=rt,lt=nt,ht=it,dt=ot,pt=at;var vt={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===ft?"-webkit-"+e:lt+e)}},yt={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===ft?lt+"print-"+e:e)}},bt=/[-\s]+(.)?/g;function gt(e,t){return t?t.toUpperCase():""}function mt(e){return e.replace(bt,gt)}function wt(e){return mt("-"+e)}var kt,St={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===ft){var r="mask-image";if(mt(r)in t)return e;if(ft+wt(r)in t)return lt+e}return e}},Et={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==ht||pt?e:lt+e)}},_t={noPrefill:["transform"],supportedProperty:function(e,t,r){return"transform"===e&&(r.transform?e:lt+e)}},At={noPrefill:["transition"],supportedProperty:function(e,t,r){return"transition"===e&&(r.transition?e:lt+e)}},xt={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===ft||"ms"===ft&&"edge"!==dt?lt+e:e)}},Tt={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===ft||"ms"===ft||"apple"===ht?lt+e:e)}},Mt={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===ft?"WebkitColumn"+wt(e)in t&&lt+"column-"+e:"Moz"===ft&&("page"+wt(e)in t&&"page-"+e))}},Ct={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===ft)return e;var r=e.replace("-inline","");return ft+wt(r)in t&&lt+r}},Ot={supportedProperty:function(e,t){return mt(e)in t&&e}},It={supportedProperty:function(e,t){var r=wt(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:ft+r in t?lt+e:"Webkit"!==ft&&"Webkit"+r in t&&"-webkit-"+e}},Pt={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===ft?""+lt+e:e)}},Rt={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===ft?lt+"scroll-chaining":e)}},Bt={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Dt={supportedProperty:function(e,t){var r=Bt[e];return!!r&&(ft+wt(r)in t&&lt+r)}},Nt={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Lt=Object.keys(Nt),jt=function(e){return lt+e},Ut=[vt,yt,St,Et,_t,At,xt,Tt,Mt,Ct,Ot,It,Pt,Rt,Dt,{supportedProperty:function(e,t,r){var n=r.multiple;if(Lt.indexOf(e)>-1){var i=Nt[e];if(!Array.isArray(i))return ft+wt(i)in t&&lt+i;if(!n)return!1;for(var o=0;o<i.length;o++)if(!(ft+wt(i[0])in t))return!1;return i.map(jt)}return!1}}],Ft=Ut.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Kt=Ut.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Object(tt.a)(t.noPrefill)),e}),[]),zt={};if(u){kt=document.createElement("p");var Vt=window.getComputedStyle(document.documentElement,"");for(var Ht in Vt)isNaN(Ht)||(zt[Vt[Ht]]=Vt[Ht]);Kt.forEach((function(e){return delete zt[e]}))}function Jt(e,t){if(void 0===t&&(t={}),!kt)return e;if(null!=zt[e])return zt[e];"transition"!==e&&"transform"!==e||(t[e]=e in kt.style);for(var r=0;r<Ft.length&&(zt[e]=Ft[r](e,kt.style,t),!zt[e]);r++);try{kt.style[e]=""}catch(n){return!1}return zt[e]}var qt,Gt={},Xt={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Wt=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Zt(e,t,r){if("var"===t)return"var";if("all"===t)return"all";if("all"===r)return", all";var n=t?Jt(t):", "+Jt(r);return n||(t||r)}function Yt(e,t){var r=t;if(!qt||"content"===e)return t;if("string"!==typeof r||!isNaN(parseInt(r,10)))return r;var n=e+r;if(null!=Gt[n])return Gt[n];try{qt.style[e]=r}catch(i){return Gt[n]=!1,!1}if(Xt[e])r=r.replace(Wt,Zt);else if(""===qt.style[e]&&("-ms-flex"===(r=lt+r)&&(qt.style[e]="-ms-flexbox"),qt.style[e]=r,""===qt.style[e]))return Gt[n]=!1,!1;return qt.style[e]="",Gt[n]=r,Gt[n]}u&&(qt=document.createElement("p"));var Qt=function(){function e(t){for(var r in t){var n=t[r];if("fallbacks"===r&&Array.isArray(n))t[r]=n.map(e);else{var i=!1,o=Jt(r);o&&o!==r&&(i=!0);var a=!1,s=Yt(o,b(n));s&&s!==n&&(a=!0),(i||a)&&(i&&delete t[r],t[o||r]=s||n)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(r=t.at)[1]||"ms"===ft?r:"@"+lt+"keyframes"+r.substr(10)}var r},onProcessStyle:function(t,r){return"style"!==r.type?t:e(t)},onChangeValue:function(e,t){return Yt(t,b(e))||e}}};var $t=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,r){if("style"!==r.type)return t;for(var n={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)n[i[o]]=t[i[o]];return n}}};function er(){return{plugins:[Ce(),Ne(),Fe(),Ge(),et(),"undefined"===typeof window?null:Qt(),$t()]}}var tr=we(er()),rr={disableGeneration:!1,generateClassName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,r=void 0!==t&&t,n=e.productionPrefix,i=void 0===n?"jss":n,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),u=0,c=function(){return u+=1};return function(e,t){var n=t.options.name;if(n&&0===n.indexOf("Mui")&&!t.options.link&&!r){if(-1!==Ae.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(n,"-").concat(e.key);return t.options.theme[_e.a]&&""===a?"".concat(o,"-").concat(c()):o}return"".concat(s).concat(i).concat(c())}}(),jss:tr,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},nr=a.a.createContext(rr);var ir=-1e9;function or(){return ir+=1}r(121);var ar=r(1114);function sr(e){var t="function"===typeof e;return{create:function(r,n){var o;try{o=t?e(r):e}catch(u){throw u}if(!n||!r.overrides||!r.overrides[n])return o;var a=r.overrides[n],s=Object(i.a)({},o);return Object.keys(a).forEach((function(e){s[e]=Object(ar.a)(s[e],a[e])})),s},options:{}}}var ur={};function cr(e,t,r){var n=e.state;if(e.stylesOptions.disableGeneration)return t||{};n.cacheClasses||(n.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return n.classes!==n.cacheClasses.lastJSS&&(n.cacheClasses.lastJSS=n.classes,i=!0),t!==n.cacheClasses.lastProp&&(n.cacheClasses.lastProp=t,i=!0),i&&(n.cacheClasses.value=Object(ke.a)({baseClasses:n.cacheClasses.lastJSS,newClasses:t,Component:r})),n.cacheClasses.value}function fr(e,t){var r=e.state,n=e.theme,o=e.stylesOptions,a=e.stylesCreator,s=e.name;if(!o.disableGeneration){var u=Se.get(o.sheetsManager,a,n);u||(u={refs:0,staticSheet:null,dynamicStyles:null},Se.set(o.sheetsManager,a,n,u));var c=Object(i.a)({},a.options,o,{theme:n,flip:"boolean"===typeof o.flip?o.flip:"rtl"===n.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var f=o.sheetsRegistry;if(0===u.refs){var l;o.sheetsCache&&(l=Se.get(o.sheetsCache,a,n));var h=a.create(n,s);l||((l=o.jss.createStyleSheet(h,Object(i.a)({link:!1},c))).attach(),o.sheetsCache&&Se.set(o.sheetsCache,a,n,l)),f&&f.add(l),u.staticSheet=l,u.dynamicStyles=ge(h)}if(u.dynamicStyles){var d=o.jss.createStyleSheet(u.dynamicStyles,Object(i.a)({link:!0},c));d.update(t),d.attach(),r.dynamicSheet=d,r.classes=Object(ke.a)({baseClasses:u.staticSheet.classes,newClasses:d.classes}),f&&f.add(d)}else r.classes=u.staticSheet.classes;u.refs+=1}}function lr(e,t){var r=e.state;r.dynamicSheet&&r.dynamicSheet.update(t)}function hr(e){var t=e.state,r=e.theme,n=e.stylesOptions,i=e.stylesCreator;if(!n.disableGeneration){var o=Se.get(n.sheetsManager,i,r);o.refs-=1;var a=n.sheetsRegistry;0===o.refs&&(Se.delete(n.sheetsManager,i,r),n.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(n.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function dr(e,t){var r,n=a.a.useRef([]),i=a.a.useMemo((function(){return{}}),t);n.current!==i&&(n.current=i,r=e()),a.a.useEffect((function(){return function(){r&&r()}}),[i])}function pr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name,o=t.classNamePrefix,s=t.Component,u=t.defaultTheme,c=void 0===u?ur:u,f=Object(n.a)(t,["name","classNamePrefix","Component","defaultTheme"]),l=sr(e),h=r||o||"makeStyles";l.options={index:or(),name:r,meta:h,classNamePrefix:h};var d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(Ee.a)()||c,n=Object(i.a)({},a.a.useContext(nr),f),o=a.a.useRef(),u=a.a.useRef();dr((function(){var i={name:r,state:{},stylesCreator:l,stylesOptions:n,theme:t};return fr(i,e),u.current=!1,o.current=i,function(){hr(i)}}),[t,l]),a.a.useEffect((function(){u.current&&lr(o.current,e),u.current=!0}));var h=cr(o.current,e.classes,s);return h};return d}},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=r.n(o),s=(r(24),r(1113)),u=r(147),c=r(121),f=r(519),l=(r(311),r(16)),h=r(53),d=r(31),p=r(19),v=r(38),y=r.n(v),b=r(140),g=r(141),m=r(122),w=r(520),k=r(1115),S=r(80),E=r(35);var _="undefined"!==typeof window?o.useLayoutEffect:o.useEffect;var A=o.forwardRef((function(e,t){var r=e.children,n=e.container,i=e.disablePortal,a=void 0!==i&&i,s=e.onRendered,u=o.useState(null),c=u[0],f=u[1],l=Object(E.a)(o.isValidElement(r)?r.ref:null,t);return _((function(){a||f(function(e){return e="function"===typeof e?e():e,v.findDOMNode(e)}(n)||document.body)}),[n,a]),_((function(){if(c&&!a)return Object(S.a)(t,c),function(){Object(S.a)(t,null)}}),[t,c,a]),_((function(){s&&(c||a)&&s()}),[s,c,a]),a?o.isValidElement(r)?o.cloneElement(r,{ref:l}):r:c?v.createPortal(r,c):c})),x=r(70),T=r(231);var M=r(149),C=r(102);function O(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function I(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function P(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function R(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=[t,r].concat(Object(C.a)(n)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===a.indexOf(e.tagName)&&I(e,i)}))}function B(e,t){var r=-1;return e.some((function(e,n){return!!t(e)&&(r=n,!0)})),r}function D(e,t){var r,n=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(h.a)(e);return t.body===e?Object(g.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=O();n.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(P(o)+a,"px"),r=Object(h.a)(o).querySelectorAll(".mui-fixed"),[].forEach.call(r,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(P(e)+a,"px")}))}var s=o.parentElement,u="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;n.push({value:u.style.overflow,key:"overflow",el:u}),u.style.overflow="hidden"}return function(){r&&[].forEach.call(r,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),n.forEach((function(e){var t=e.value,r=e.el,n=e.key;t?r.style.setProperty(n,t):r.style.removeProperty(n)}))}}var N=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return Object(M.a)(e,[{key:"add",value:function(e,t){var r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&I(e.modalRef,!1);var n=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);R(t,e.mountNode,e.modalRef,n,!0);var i=B(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:n}),r)}},{key:"mount",value:function(e,t){var r=B(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),n=this.containers[r];n.restore||(n.restore=D(n,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var r=B(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),n=this.containers[r];if(n.modals.splice(n.modals.indexOf(e),1),this.modals.splice(t,1),0===n.modals.length)n.restore&&n.restore(),e.modalRef&&I(e.modalRef,!0),R(n.container,e.mountNode,e.modalRef,n.hiddenSiblingNodes,!1),this.containers.splice(r,1);else{var i=n.modals[n.modals.length-1];i.modalRef&&I(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var L=function(e){var t=e.children,r=e.disableAutoFocus,n=void 0!==r&&r,i=e.disableEnforceFocus,a=void 0!==i&&i,s=e.disableRestoreFocus,u=void 0!==s&&s,c=e.getDoc,f=e.isEnabled,l=e.open,d=o.useRef(),p=o.useRef(null),y=o.useRef(null),b=o.useRef(),g=o.useRef(null),m=o.useCallback((function(e){g.current=v.findDOMNode(e)}),[]),w=Object(E.a)(t.ref,m),k=o.useRef();return o.useEffect((function(){k.current=l}),[l]),!k.current&&l&&"undefined"!==typeof window&&(b.current=c().activeElement),o.useEffect((function(){if(l){var e=Object(h.a)(g.current);n||!g.current||g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex",-1),g.current.focus());var t=function(){null!==g.current&&(e.hasFocus()&&!a&&f()&&!d.current?g.current&&!g.current.contains(e.activeElement)&&g.current.focus():d.current=!1)},r=function(t){!a&&f()&&9===t.keyCode&&e.activeElement===g.current&&(d.current=!0,t.shiftKey?y.current.focus():p.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",r,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",r,!0),u||(b.current&&b.current.focus&&b.current.focus(),b.current=null)}}}),[n,a,u,f,l]),o.createElement(o.Fragment,null,o.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelStart"}),o.cloneElement(t,{ref:w}),o.createElement("div",{tabIndex:0,ref:y,"data-test":"sentinelEnd"}))},j={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},U=o.forwardRef((function(e,t){var r=e.invisible,a=void 0!==r&&r,s=e.open,u=Object(i.a)(e,["invisible","open"]);return s?o.createElement("div",Object(n.a)({"aria-hidden":!0,ref:t},u,{style:Object(n.a)({},j.root,a?j.invisible:{},u.style)})):null}));var F=new N,K=o.forwardRef((function(e,t){var r=Object(w.a)(),a=Object(k.a)({name:"MuiModal",props:Object(n.a)({},e),theme:r}),s=a.BackdropComponent,u=void 0===s?U:s,c=a.BackdropProps,f=a.children,l=a.closeAfterTransition,d=void 0!==l&&l,p=a.container,y=a.disableAutoFocus,b=void 0!==y&&y,g=a.disableBackdropClick,S=void 0!==g&&g,_=a.disableEnforceFocus,M=void 0!==_&&_,C=a.disableEscapeKeyDown,O=void 0!==C&&C,P=a.disablePortal,R=void 0!==P&&P,B=a.disableRestoreFocus,D=void 0!==B&&B,N=a.disableScrollLock,j=void 0!==N&&N,K=a.hideBackdrop,z=void 0!==K&&K,V=a.keepMounted,H=void 0!==V&&V,J=a.manager,q=void 0===J?F:J,G=a.onBackdropClick,X=a.onClose,W=a.onEscapeKeyDown,Z=a.onRendered,Y=a.open,Q=Object(i.a)(a,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),$=o.useState(!0),ee=$[0],te=$[1],re=o.useRef({}),ne=o.useRef(null),ie=o.useRef(null),oe=Object(E.a)(ie,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(a),se=function(){return Object(h.a)(ne.current)},ue=function(){return re.current.modalRef=ie.current,re.current.mountNode=ne.current,re.current},ce=function(){q.mount(ue(),{disableScrollLock:j}),ie.current.scrollTop=0},fe=Object(x.a)((function(){var e=function(e){return e="function"===typeof e?e():e,v.findDOMNode(e)}(p)||se().body;q.add(ue(),e),ie.current&&ce()})),le=o.useCallback((function(){return q.isTopModal(ue())}),[q]),he=Object(x.a)((function(e){ne.current=e,e&&(Z&&Z(),Y&&le()?ce():I(ie.current,!0))})),de=o.useCallback((function(){q.remove(ue())}),[q]);if(o.useEffect((function(){return function(){de()}}),[de]),o.useEffect((function(){Y?fe():ae&&d||de()}),[Y,de,ae,d,fe]),!H&&!Y&&(!ae||ee))return null;var pe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(r||{zIndex:T.a}),ve={};return void 0===f.props.tabIndex&&(ve.tabIndex=f.props.tabIndex||"-1"),ae&&(ve.onEnter=Object(m.a)((function(){te(!1)}),f.props.onEnter),ve.onExited=Object(m.a)((function(){te(!0),d&&de()}),f.props.onExited)),o.createElement(A,{ref:he,container:p,disablePortal:R},o.createElement("div",Object(n.a)({ref:oe,onKeyDown:function(e){"Escape"===e.key&&le()&&(W&&W(e),O||(e.stopPropagation(),X&&X(e,"escapeKeyDown")))},role:"presentation"},Q,{style:Object(n.a)({},pe.root,!Y&&ee?pe.hidden:{},Q.style)}),z?null:o.createElement(u,Object(n.a)({open:Y,onClick:function(e){e.target===e.currentTarget&&(G&&G(e),!S&&X&&X(e,"backdropClick"))}},c)),o.createElement(L,{disableEnforceFocus:M,disableAutoFocus:b,disableRestoreFocus:D,getDoc:se,isEnabled:le,open:Y},o.cloneElement(f,ve))))})),z=r(100),V=r(124),H=!1,J=r(148),q="unmounted",G="exited",X="entering",W="entered",Z="exiting",Y=function(e){function t(t,r){var n;n=e.call(this,t,r)||this;var i,o=r&&!r.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?o?(i=G,n.appearStatus=X):i=W:i=t.unmountOnExit||t.mountOnEnter?q:G,n.state={status:i},n.nextCallback=null,n}Object(V.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===q?{status:G}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var r=this.state.status;this.props.in?r!==X&&r!==W&&(t=X):r!==X&&r!==W||(t=Z)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,r,n=this.props.timeout;return e=t=r=n,null!=n&&"number"!==typeof n&&(e=n.exit,t=n.enter,r=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:r}},r.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===X?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===G&&this.setState({status:q})},r.performEnter=function(e){var t=this,r=this.props.enter,n=this.context?this.context.isMounting:e,i=this.props.nodeRef?[n]:[y.a.findDOMNode(this),n],o=i[0],a=i[1],s=this.getTimeouts(),u=n?s.appear:s.enter;!e&&!r||H?this.safeSetState({status:W},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:X},(function(){t.props.onEntering(o,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:W},(function(){t.props.onEntered(o,a)}))}))})))},r.performExit=function(){var e=this,t=this.props.exit,r=this.getTimeouts(),n=this.props.nodeRef?void 0:y.a.findDOMNode(this);t&&!H?(this.props.onExit(n),this.safeSetState({status:Z},(function(){e.props.onExiting(n),e.onTransitionEnd(r.exit,(function(){e.safeSetState({status:G},(function(){e.props.onExited(n)}))}))}))):this.safeSetState({status:G},(function(){e.props.onExited(n)}))},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},r.onTransitionEnd=function(e,t){this.setNextCallback(t);var r=this.props.nodeRef?this.props.nodeRef.current:y.a.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(r&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},r.render=function(){var e=this.state.status;if(e===q)return null;var t=this.props,r=t.children,n=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(z.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(J.a.Provider,{value:null},"function"===typeof r?r(e,n):a.a.cloneElement(a.a.Children.only(r),n))},t}(a.a.Component);function Q(){}Y.contextType=J.a,Y.propTypes={},Y.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Q,onEntering:Q,onEntered:Q,onExit:Q,onExiting:Q,onExited:Q},Y.UNMOUNTED=q,Y.EXITED=G,Y.ENTERING=X,Y.ENTERED=W,Y.EXITING=Z;var $=Y,ee=r(146);function te(e,t){var r=e.timeout,n=e.style,i=void 0===n?{}:n;return{duration:i.transitionDuration||"number"===typeof r?r:r[t.mode]||0,delay:i.transitionDelay}}function re(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var ne={entering:{opacity:1,transform:re(1)},entered:{opacity:1,transform:"none"}},ie=o.forwardRef((function(e,t){var r=e.children,a=e.disableStrictModeCompat,s=void 0!==a&&a,c=e.in,f=e.onEnter,l=e.onEntered,h=e.onEntering,d=e.onExit,p=e.onExited,v=e.onExiting,y=e.style,b=e.timeout,g=void 0===b?"auto":b,m=e.TransitionComponent,w=void 0===m?$:m,k=Object(i.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),S=o.useRef(),_=o.useRef(),A=Object(ee.a)(),x=A.unstable_strictMode&&!s,T=o.useRef(null),M=Object(E.a)(r.ref,t),C=Object(E.a)(x?T:void 0,M),O=function(e){return function(t,r){if(e){var n=x?[T.current,t]:[t,r],i=Object(u.a)(n,2),o=i[0],a=i[1];void 0===a?e(o):e(o,a)}}},I=O(h),P=O((function(e,t){!function(e){e.scrollTop}(e);var r,n=te({style:y,timeout:g},{mode:"enter"}),i=n.duration,o=n.delay;"auto"===g?(r=A.transitions.getAutoHeightDuration(e.clientHeight),_.current=r):r=i,e.style.transition=[A.transitions.create("opacity",{duration:r,delay:o}),A.transitions.create("transform",{duration:.666*r,delay:o})].join(","),f&&f(e,t)})),R=O(l),B=O(v),D=O((function(e){var t,r=te({style:y,timeout:g},{mode:"exit"}),n=r.duration,i=r.delay;"auto"===g?(t=A.transitions.getAutoHeightDuration(e.clientHeight),_.current=t):t=n,e.style.transition=[A.transitions.create("opacity",{duration:t,delay:i}),A.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=re(.75),d&&d(e)})),N=O(p);return o.useEffect((function(){return function(){clearTimeout(S.current)}}),[]),o.createElement(w,Object(n.a)({appear:!0,in:c,nodeRef:x?T:void 0,onEnter:P,onEntered:R,onEntering:I,onExit:D,onExited:N,onExiting:B,addEndListener:function(e,t){var r=x?e:t;"auto"===g&&(S.current=setTimeout(r,_.current||0))},timeout:"auto"===g?null:g},k),(function(e,t){return o.cloneElement(r,Object(n.a)({style:Object(n.a)({opacity:0,transform:re(.75),visibility:"exited"!==e||c?void 0:"hidden"},ne[e],y,r.props.style),ref:C},t))}))}));ie.muiSupportAuto=!0;var oe=ie,ae=r(1080);function se(e,t){var r=0;return"number"===typeof t?r=t:"center"===t?r=e.height/2:"bottom"===t&&(r=e.height),r}function ue(e,t){var r=0;return"number"===typeof t?r=t:"center"===t?r=e.width/2:"right"===t&&(r=e.width),r}function ce(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function fe(e){return"function"===typeof e?e():e}var le=o.forwardRef((function(e,t){var r=e.action,a=e.anchorEl,s=e.anchorOrigin,u=void 0===s?{vertical:"top",horizontal:"left"}:s,c=e.anchorPosition,f=e.anchorReference,d=void 0===f?"anchorEl":f,p=e.children,y=e.classes,w=e.className,k=e.container,S=e.elevation,E=void 0===S?8:S,_=e.getContentAnchorEl,A=e.marginThreshold,x=void 0===A?16:A,T=e.onEnter,M=e.onEntered,C=e.onEntering,O=e.onExit,I=e.onExited,P=e.onExiting,R=e.open,B=e.PaperProps,D=void 0===B?{}:B,N=e.transformOrigin,L=void 0===N?{vertical:"top",horizontal:"left"}:N,j=e.TransitionComponent,U=void 0===j?oe:j,F=e.transitionDuration,z=void 0===F?"auto":F,V=e.TransitionProps,H=void 0===V?{}:V,J=Object(i.a)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),q=o.useRef(),G=o.useCallback((function(e){if("anchorPosition"===d)return c;var t=fe(a),r=(t&&1===t.nodeType?t:Object(h.a)(q.current).body).getBoundingClientRect(),n=0===e?u.vertical:"center";return{top:r.top+se(r,n),left:r.left+ue(r,u.horizontal)}}),[a,u.horizontal,u.vertical,c,d]),X=o.useCallback((function(e){var t=0;if(_&&"anchorEl"===d){var r=_(e);if(r&&e.contains(r)){var n=function(e,t){for(var r=t,n=0;r&&r!==e;)n+=(r=r.parentElement).scrollTop;return n}(e,r);t=r.offsetTop+r.clientHeight/2-n||0}0}return t}),[u.vertical,d,_]),W=o.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:se(e,L.vertical)+t,horizontal:ue(e,L.horizontal)}}),[L.horizontal,L.vertical]),Z=o.useCallback((function(e){var t=X(e),r={width:e.offsetWidth,height:e.offsetHeight},n=W(r,t);if("none"===d)return{top:null,left:null,transformOrigin:ce(n)};var i=G(t),o=i.top-n.vertical,s=i.left-n.horizontal,u=o+r.height,c=s+r.width,f=Object(g.a)(fe(a)),l=f.innerHeight-x,h=f.innerWidth-x;if(o<x){var p=o-x;o-=p,n.vertical+=p}else if(u>l){var v=u-l;o-=v,n.vertical+=v}if(s<x){var y=s-x;s-=y,n.horizontal+=y}else if(c>h){var b=c-h;s-=b,n.horizontal+=b}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:ce(n)}}),[a,d,G,X,W,x]),Y=o.useCallback((function(){var e=q.current;if(e){var t=Z(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[Z]),Q=o.useCallback((function(e){q.current=v.findDOMNode(e)}),[]);o.useEffect((function(){R&&Y()})),o.useImperativeHandle(r,(function(){return R?{updatePosition:function(){Y()}}:null}),[R,Y]),o.useEffect((function(){if(R){var e=Object(b.a)((function(){Y()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[R,Y]);var $=z;"auto"!==z||U.muiSupportAuto||($=void 0);var ee=k||(a?Object(h.a)(fe(a)).body:void 0);return o.createElement(K,Object(n.a)({container:ee,open:R,ref:t,BackdropProps:{invisible:!0},className:Object(l.a)(y.root,w)},J),o.createElement(U,Object(n.a)({appear:!0,in:R,onEnter:T,onEntered:M,onExit:O,onExited:I,onExiting:P,timeout:$},H,{onEntering:Object(m.a)((function(e,t){C&&C(e,t),Y()}),H.onEntering)}),o.createElement(ae.a,Object(n.a)({elevation:E,ref:Q},D,{className:Object(l.a)(y.paper,D.className)}),p)))})),he=Object(p.a)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(le),de=r(1116);function pe(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function ve(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function ye(e,t){if(void 0===t)return!0;var r=e.innerText;return void 0===r&&(r=e.textContent),0!==(r=r.trim().toLowerCase()).length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join("")))}function be(e,t,r,n,i,o){for(var a=!1,s=i(e,t,!!t&&r);s;){if(s===e.firstChild){if(a)return;a=!0}var u=!n&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&ye(s,o)&&!u)return void s.focus();s=i(e,s,r)}}var ge="undefined"===typeof window?o.useEffect:o.useLayoutEffect,me=o.forwardRef((function(e,t){var r=e.actions,a=e.autoFocus,s=void 0!==a&&a,u=e.autoFocusItem,c=void 0!==u&&u,f=e.children,l=e.className,d=e.disabledItemsFocusable,p=void 0!==d&&d,y=e.disableListWrap,b=void 0!==y&&y,g=e.onKeyDown,m=e.variant,w=void 0===m?"selectedMenu":m,k=Object(i.a)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),S=o.useRef(null),_=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ge((function(){s&&S.current.focus()}),[s]),o.useImperativeHandle(r,(function(){return{adjustStyleForScrollbar:function(e,t){var r=!S.current.style.width;if(e.clientHeight<S.current.clientHeight&&r){var n="".concat(O(),"px");S.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=n,S.current.style.width="calc(100% + ".concat(n,")")}return S.current}}}),[]);var A=o.useCallback((function(e){S.current=v.findDOMNode(e)}),[]),x=Object(E.a)(A,t),T=-1;o.Children.forEach(f,(function(e,t){o.isValidElement(e)&&(e.props.disabled||("selectedMenu"===w&&e.props.selected||-1===T)&&(T=t))}));var M=o.Children.map(f,(function(e,t){if(t===T){var r={};return c&&(r.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===w&&(r.tabIndex=0),o.cloneElement(e,r)}return e}));return o.createElement(de.a,Object(n.a)({role:"menu",ref:x,className:l,onKeyDown:function(e){var t=S.current,r=e.key,n=Object(h.a)(t).activeElement;if("ArrowDown"===r)e.preventDefault(),be(t,n,b,p,pe);else if("ArrowUp"===r)e.preventDefault(),be(t,n,b,p,ve);else if("Home"===r)e.preventDefault(),be(t,null,b,p,pe);else if("End"===r)e.preventDefault(),be(t,null,b,p,ve);else if(1===r.length){var i=_.current,o=r.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);var s=n&&!i.repeating&&ye(n,i);i.previousKeyMatched&&(s||be(t,n,!1,p,pe,i))?e.preventDefault():i.previousKeyMatched=!1}g&&g(e)},tabIndex:s?0:-1},k),M)})),we={vertical:"top",horizontal:"right"},ke={vertical:"top",horizontal:"left"},Se=o.forwardRef((function(e,t){var r=e.autoFocus,a=void 0===r||r,s=e.children,u=e.classes,c=e.disableAutoFocusItem,f=void 0!==c&&c,h=e.MenuListProps,d=void 0===h?{}:h,p=e.onClose,y=e.onEntering,b=e.open,g=e.PaperProps,m=void 0===g?{}:g,w=e.PopoverClasses,k=e.transitionDuration,E=void 0===k?"auto":k,_=e.variant,A=void 0===_?"selectedMenu":_,x=Object(i.a)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),T=Object(ee.a)(),M=a&&!f&&b,C=o.useRef(null),O=o.useRef(null),I=-1;o.Children.map(s,(function(e,t){o.isValidElement(e)&&(e.props.disabled||("menu"!==A&&e.props.selected||-1===I)&&(I=t))}));var P=o.Children.map(s,(function(e,t){return t===I?o.cloneElement(e,{ref:function(t){O.current=v.findDOMNode(t),Object(S.a)(e.ref,t)}}):e}));return o.createElement(he,Object(n.a)({getContentAnchorEl:function(){return O.current},classes:w,onClose:p,onEntering:function(e,t){C.current&&C.current.adjustStyleForScrollbar(e,T),y&&y(e,t)},anchorOrigin:"rtl"===T.direction?we:ke,transformOrigin:"rtl"===T.direction?we:ke,PaperProps:Object(n.a)({},m,{classes:Object(n.a)({},m.classes,{root:u.paper})}),open:b,ref:t,transitionDuration:E},x),o.createElement(me,Object(n.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),p&&p(e,"tabKeyDown"))},actions:C,autoFocus:a&&(-1===I||f),autoFocusItem:M,variant:A},d,{className:Object(l.a)(u.list,d.className)}),P))})),Ee=Object(p.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(Se),_e=r(125),Ae=r(223);function xe(e,t){return"object"===Object(c.a)(t)&&null!==t?e===t:String(e)===String(t)}var Te=o.forwardRef((function(e,t){var r=e["aria-label"],a=e.autoFocus,s=e.autoWidth,c=e.children,p=e.classes,v=e.className,y=e.defaultValue,b=e.disabled,g=e.displayEmpty,m=e.IconComponent,w=e.inputRef,k=e.labelId,S=e.MenuProps,_=void 0===S?{}:S,A=e.multiple,x=e.name,T=e.onBlur,M=e.onChange,C=e.onClose,O=e.onFocus,I=e.onOpen,P=e.open,R=e.readOnly,B=e.renderValue,D=e.SelectDisplayProps,N=void 0===D?{}:D,L=e.tabIndex,j=(e.type,e.value),U=e.variant,F=void 0===U?"standard":U,K=Object(i.a)(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),z=Object(Ae.a)({controlled:j,default:y,name:"Select"}),V=Object(u.a)(z,2),H=V[0],J=V[1],q=o.useRef(null),G=o.useState(null),X=G[0],W=G[1],Z=o.useRef(null!=P).current,Y=o.useState(),Q=Y[0],$=Y[1],ee=o.useState(!1),te=ee[0],re=ee[1],ne=Object(E.a)(t,w);o.useImperativeHandle(ne,(function(){return{focus:function(){X.focus()},node:q.current,value:H}}),[X,H]),o.useEffect((function(){a&&X&&X.focus()}),[a,X]),o.useEffect((function(){if(X){var e=Object(h.a)(X).getElementById(k);if(e){var t=function(){getSelection().isCollapsed&&X.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[k,X]);var ie,oe,ae=function(e,t){e?I&&I(t):C&&C(t),Z||($(s?null:X.clientWidth),re(e))},se=o.Children.toArray(c),ue=function(e){return function(t){var r;if(A||ae(!1,t),A){r=Array.isArray(H)?H.slice():[];var n=H.indexOf(e.props.value);-1===n?r.push(e.props.value):r.splice(n,1)}else r=e.props.value;e.props.onClick&&e.props.onClick(t),H!==r&&(J(r),M&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:r,name:x}}),M(t,e)))}},ce=null!==X&&(Z?P:te);delete K["aria-invalid"];var fe=[],le=!1;(Object(_e.b)({value:H})||g)&&(B?ie=B(H):le=!0);var he=se.map((function(e){if(!o.isValidElement(e))return null;var t;if(A){if(!Array.isArray(H))throw new Error(Object(f.a)(2));(t=H.some((function(t){return xe(t,e.props.value)})))&&le&&fe.push(e.props.children)}else(t=xe(H,e.props.value))&&le&&(oe=e.props.children);return t&&!0,o.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:ue(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));le&&(ie=A?fe.join(", "):oe);var de,pe=Q;!s&&Z&&X&&(pe=X.clientWidth),de="undefined"!==typeof L?L:b?null:0;var ve=N.id||(x?"mui-component-select-".concat(x):void 0);return o.createElement(o.Fragment,null,o.createElement("div",Object(n.a)({className:Object(l.a)(p.root,p.select,p.selectMenu,p[F],v,b&&p.disabled),ref:W,tabIndex:de,role:"button","aria-disabled":b?"true":void 0,"aria-expanded":ce?"true":void 0,"aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[k,ve].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){if(!R){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),ae(!0,e))}},onMouseDown:b||R?null:function(e){0===e.button&&(e.preventDefault(),X.focus(),ae(!0,e))},onBlur:function(e){!ce&&T&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:H,name:x}}),T(e))},onFocus:O},N,{id:ve}),function(e){return null==e||"string"===typeof e&&!e.trim()}(ie)?o.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):ie),o.createElement("input",Object(n.a)({value:Array.isArray(H)?H.join(","):H,name:x,ref:q,"aria-hidden":!0,onChange:function(e){var t=se.map((function(e){return e.props.value})).indexOf(e.target.value);if(-1!==t){var r=se[t];J(r.props.value),M&&M(e,r)}},tabIndex:-1,className:p.nativeInput,autoFocus:a},K)),o.createElement(m,{className:Object(l.a)(p.icon,p["icon".concat(Object(d.a)(F))],ce&&p.iconOpen,b&&p.disabled)}),o.createElement(Ee,Object(n.a)({id:"menu-".concat(x||""),anchorEl:X,open:ce,onClose:function(e){ae(!1,e)}},_,{MenuListProps:Object(n.a)({"aria-labelledby":k,role:"listbox",disableListWrap:!0},_.MenuListProps),PaperProps:Object(n.a)({},_.PaperProps,{style:Object(n.a)({minWidth:pe},null!=_.PaperProps?_.PaperProps.style:null)})}),he))})),Me=r(69),Ce=r(81),Oe=r(224),Ie=Object(Oe.a)(o.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Pe=r(1118),Re=o.forwardRef((function(e,t){var r=e.classes,a=e.className,s=e.disabled,u=e.IconComponent,c=e.inputRef,f=e.variant,h=void 0===f?"standard":f,p=Object(i.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return o.createElement(o.Fragment,null,o.createElement("select",Object(n.a)({className:Object(l.a)(r.root,r.select,r[h],a,s&&r.disabled),disabled:s,ref:c||t},p)),e.multiple?null:o.createElement(u,{className:Object(l.a)(r.icon,r["icon".concat(Object(d.a)(h))],s&&r.disabled)}))})),Be=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},De=o.createElement(Pe.a,null),Ne=o.forwardRef((function(e,t){var r=e.children,a=e.classes,s=e.IconComponent,u=void 0===s?Ie:s,c=e.input,f=void 0===c?De:c,l=e.inputProps,h=(e.variant,Object(i.a)(e,["children","classes","IconComponent","input","inputProps","variant"])),d=Object(Ce.a)(),p=Object(Me.a)({props:e,muiFormControl:d,states:["variant"]});return o.cloneElement(f,Object(n.a)({inputComponent:Re,inputProps:Object(n.a)({children:r,classes:a,IconComponent:u,variant:p.variant,type:void 0},l,f?f.props.inputProps:{}),ref:t},h))}));Ne.muiName="Select";Object(p.a)(Be,{name:"MuiNativeSelect"})(Ne);var Le=r(1119),je=r(1127),Ue=Be,Fe=o.createElement(Pe.a,null),Ke=o.createElement(Le.a,null),ze=o.forwardRef((function e(t,r){var a=t.autoWidth,u=void 0!==a&&a,c=t.children,f=t.classes,l=t.displayEmpty,h=void 0!==l&&l,d=t.IconComponent,p=void 0===d?Ie:d,v=t.id,y=t.input,b=t.inputProps,g=t.label,m=t.labelId,w=t.labelWidth,k=void 0===w?0:w,S=t.MenuProps,E=t.multiple,_=void 0!==E&&E,A=t.native,x=void 0!==A&&A,T=t.onClose,M=t.onOpen,C=t.open,O=t.renderValue,I=t.SelectDisplayProps,P=t.variant,R=void 0===P?"standard":P,B=Object(i.a)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),D=x?Re:Te,N=Object(Ce.a)(),L=Object(Me.a)({props:t,muiFormControl:N,states:["variant"]}).variant||R,j=y||{standard:Fe,outlined:o.createElement(je.a,{label:g,labelWidth:k}),filled:Ke}[L];return o.cloneElement(j,Object(n.a)({inputComponent:D,inputProps:Object(n.a)({children:c,IconComponent:p,variant:L,type:void 0,multiple:_},x?{id:v}:{autoWidth:u,displayEmpty:h,labelId:m,MenuProps:S,onClose:T,onOpen:M,open:C,renderValue:O,SelectDisplayProps:Object(n.a)({id:v},I)},b,{classes:b?Object(s.a)({baseClasses:f,newClasses:b.classes,Component:e}):f},y?y.props.inputProps:{}),ref:r},B))}));ze.muiName="Select";t.a=Object(p.a)(Ue,{name:"MuiSelect"})(ze)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(69),u=r(81),c=r(19),f=r(31),l=o.forwardRef((function(e,t){var r=e.children,c=e.classes,l=e.className,h=(e.color,e.component),d=void 0===h?"label":h,p=(e.disabled,e.error,e.filled,e.focused,e.required,Object(i.a)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),v=Object(u.a)(),y=Object(s.a)({props:e,muiFormControl:v,states:["color","required","focused","disabled","error","filled"]});return o.createElement(d,Object(n.a)({className:Object(a.a)(c.root,c["color".concat(Object(f.a)(y.color||"primary"))],l,y.disabled&&c.disabled,y.error&&c.error,y.filled&&c.filled,y.focused&&c.focused,y.required&&c.required),ref:t},p),r,y.required&&o.createElement("span",{"aria-hidden":!0,className:Object(a.a)(c.asterisk,y.error&&c.error)},"\u2009","*"))})),h=Object(c.a)((function(e){return{root:Object(n.a)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(l),d=o.forwardRef((function(e,t){var r=e.classes,c=e.className,f=e.disableAnimation,l=void 0!==f&&f,d=(e.margin,e.shrink),p=(e.variant,Object(i.a)(e,["classes","className","disableAnimation","margin","shrink","variant"])),v=Object(u.a)(),y=d;"undefined"===typeof y&&v&&(y=v.filled||v.focused||v.adornedStart);var b=Object(s.a)({props:e,muiFormControl:v,states:["margin","variant"]});return o.createElement(h,Object(n.a)({"data-shrink":y,className:Object(a.a)(r.root,c,v&&r.formControl,!l&&r.animated,y&&r.shrink,"dense"===b.margin&&r.marginDense,{filled:r.filled,outlined:r.outlined}[b.variant]),classes:{focused:r.focused,disabled:r.disabled,error:r.error,required:r.required,asterisk:r.asterisk},ref:t},p))}));t.a=Object(c.a)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(d)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(1118),u=r(1119),c=r(1127),f=r(1083),l=r(1079),h=r(69),d=r(81),p=r(19),v=o.forwardRef((function(e,t){var r=e.children,s=e.classes,u=e.className,c=e.component,f=void 0===c?"p":c,l=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,Object(i.a)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),p=Object(d.a)(),v=Object(h.a)({props:e,muiFormControl:p,states:["variant","margin","disabled","error","filled","focused","required"]});return o.createElement(f,Object(n.a)({className:Object(a.a)(s.root,("filled"===v.variant||"outlined"===v.variant)&&s.contained,u,v.disabled&&s.disabled,v.error&&s.error,v.filled&&s.filled,v.focused&&s.focused,v.required&&s.required,"dense"===v.margin&&s.marginDense),ref:t},l)," "===r?o.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):r)})),y=Object(p.a)((function(e){return{root:Object(n.a)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(v),b=r(1082),g={standard:s.a,filled:u.a,outlined:c.a},m=o.forwardRef((function(e,t){var r=e.autoComplete,s=e.autoFocus,u=void 0!==s&&s,c=e.children,h=e.classes,d=e.className,p=e.color,v=void 0===p?"primary":p,m=e.defaultValue,w=e.disabled,k=void 0!==w&&w,S=e.error,E=void 0!==S&&S,_=e.FormHelperTextProps,A=e.fullWidth,x=void 0!==A&&A,T=e.helperText,M=e.hiddenLabel,C=e.id,O=e.InputLabelProps,I=e.inputProps,P=e.InputProps,R=e.inputRef,B=e.label,D=e.multiline,N=void 0!==D&&D,L=e.name,j=e.onBlur,U=e.onChange,F=e.onFocus,K=e.placeholder,z=e.required,V=void 0!==z&&z,H=e.rows,J=e.rowsMax,q=e.select,G=void 0!==q&&q,X=e.SelectProps,W=e.type,Z=e.value,Y=e.variant,Q=void 0===Y?"standard":Y,$=Object(i.a)(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]);var ee={};if("outlined"===Q&&(O&&"undefined"!==typeof O.shrink&&(ee.notched=O.shrink),B)){var te,re=null!==(te=null===O||void 0===O?void 0:O.required)&&void 0!==te?te:V;ee.label=o.createElement(o.Fragment,null,B,re&&"\xa0*")}G&&(X&&X.native||(ee.id=void 0),ee["aria-describedby"]=void 0);var ne=T&&C?"".concat(C,"-helper-text"):void 0,ie=B&&C?"".concat(C,"-label"):void 0,oe=g[Q],ae=o.createElement(oe,Object(n.a)({"aria-describedby":ne,autoComplete:r,autoFocus:u,defaultValue:m,fullWidth:x,multiline:N,name:L,rows:H,rowsMax:J,type:W,value:Z,id:C,inputRef:R,onBlur:j,onChange:U,onFocus:F,placeholder:K,inputProps:I},ee,P));return o.createElement(l.a,Object(n.a)({className:Object(a.a)(h.root,d),disabled:k,error:E,fullWidth:x,hiddenLabel:M,ref:t,required:V,color:v,variant:Q},$),B&&o.createElement(f.a,Object(n.a)({htmlFor:C,id:ie},O),B),G?o.createElement(b.a,Object(n.a)({"aria-describedby":ne,id:C,labelId:ie,value:Z,input:ae},X),c):ae,T&&o.createElement(y,Object(n.a)({id:ne},_),T))}));t.a=Object(p.a)({root:{}},{name:"MuiTextField"})(m)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(4);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,r=e.newClasses;e.Component;if(!r)return t;var i=Object(n.a)({},t);return Object.keys(r).forEach((function(e){r[e]&&(i[e]="".concat(t[e]," ").concat(r[e]))})),i}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(4),i=r(121);function o(e){return e&&"object"===Object(i.a)(e)&&e.constructor===Object}function a(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=r.clone?Object(n.a)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((function(n){"__proto__"!==n&&(o(t[n])&&n in e?i[n]=a(e[n],t[n],r):i[n]=t[n])})),i}},function(e,t,r){"use strict";function n(e){var t=e.theme,r=e.name,n=e.props;if(!t||!t.props||!t.props[r])return n;var i,o=t.props[r];for(i in o)void 0===n[i]&&(n[i]=o[i]);return n}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(19),u=r(103),c=o.forwardRef((function(e,t){var r=e.children,s=e.classes,c=e.className,f=e.component,l=void 0===f?"ul":f,h=e.dense,d=void 0!==h&&h,p=e.disablePadding,v=void 0!==p&&p,y=e.subheader,b=Object(i.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),g=o.useMemo((function(){return{dense:d}}),[d]);return o.createElement(u.a.Provider,{value:g},o.createElement(l,Object(n.a)({className:Object(a.a)(s.root,c,d&&s.dense,!v&&s.padding,y&&s.subheader),ref:t},b),y,r))}));t.a=Object(s.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(c)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(19),u=r(235),c=r(103),f=o.forwardRef((function(e,t){var r=e.children,s=e.classes,f=e.className,l=e.disableTypography,h=void 0!==l&&l,d=e.inset,p=void 0!==d&&d,v=e.primary,y=e.primaryTypographyProps,b=e.secondary,g=e.secondaryTypographyProps,m=Object(i.a)(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),w=o.useContext(c.a).dense,k=null!=v?v:r;null==k||k.type===u.a||h||(k=o.createElement(u.a,Object(n.a)({variant:w?"body2":"body1",className:s.primary,component:"span",display:"block"},y),k));var S=b;return null==S||S.type===u.a||h||(S=o.createElement(u.a,Object(n.a)({variant:"body2",className:s.secondary,color:"textSecondary",display:"block"},g),S)),o.createElement("div",Object(n.a)({className:Object(a.a)(s.root,f,w&&s.dense,p&&s.inset,k&&S&&s.multiline),ref:t},m),k,S)}));t.a=Object(s.a)({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(f)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(521),u=r(19),c=o.forwardRef((function(e,t){var r=e.disableUnderline,u=e.classes,c=e.fullWidth,f=void 0!==c&&c,l=e.inputComponent,h=void 0===l?"input":l,d=e.multiline,p=void 0!==d&&d,v=e.type,y=void 0===v?"text":v,b=Object(i.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return o.createElement(s.a,Object(n.a)({classes:Object(n.a)({},u,{root:Object(a.a)(u.root,!r&&u.underline),underline:null}),fullWidth:f,inputComponent:h,multiline:p,ref:t,type:y},b))}));c.muiName="Input",t.a=Object(u.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(c)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(521),u=r(19),c=o.forwardRef((function(e,t){var r=e.disableUnderline,u=e.classes,c=e.fullWidth,f=void 0!==c&&c,l=e.inputComponent,h=void 0===l?"input":l,d=e.multiline,p=void 0!==d&&d,v=e.type,y=void 0===v?"text":v,b=Object(i.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return o.createElement(s.a,Object(n.a)({classes:Object(n.a)({},u,{root:Object(a.a)(u.root,!r&&u.underline),underline:null}),fullWidth:f,inputComponent:h,multiline:p,ref:t,type:y},b))}));c.muiName="Input",t.a=Object(u.a)((function(e){var t="light"===e.palette.type,r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",n=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:n,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:n}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(c)},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return c}));var n=r(2),i=r(3),o=r(515),a=new i.b(o.a),s=null;try{if(null==(s=window))throw new Error("try next")}catch(f){try{if(null==(s=e))throw new Error("try next")}catch(f){s={}}}var u=s.crypto||s.msCrypto;function c(e){(e<=0||e>1024||e%1)&&a.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return u.getRandomValues(t),Object(n.a)(t)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(e){return a.throwError("no secure random source avaialble",i.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,r(36))},function(e,t,r){"use strict";t.a={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"}},function(e,t,r){"use strict";var n=r(4),i=r(1),o=r.n(i),a=(r(24),r(229)),s=r(520),u=r(230);t.a=function(e){var t=e.children,r=e.theme,i=Object(s.a)(),c=o.a.useMemo((function(){var e=null===i?r:function(e,t){return"function"===typeof t?t(e):Object(n.a)({},e,t)}(i,r);return null!=e&&(e[u.a]=null!==i),e}),[r,i]);return o.a.createElement(a.a.Provider,{value:c},t)}},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(19),u=r(31),c=r(1080),f=o.forwardRef((function(e,t){var r=e.classes,s=e.className,f=e.color,l=void 0===f?"primary":f,h=e.position,d=void 0===h?"fixed":h,p=Object(i.a)(e,["classes","className","color","position"]);return o.createElement(c.a,Object(n.a)({square:!0,component:"header",elevation:4,className:Object(a.a)(r.root,r["position".concat(Object(u.a)(d))],r["color".concat(Object(u.a)(l))],s,"fixed"===d&&"mui-fixed"),ref:t},p))}));t.a=Object(s.a)((function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}}),{name:"MuiAppBar"})(f)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(73),a=r(1),s=(r(24),r(16)),u=r(19),c=a.forwardRef((function(e,t){var r=e.classes,o=e.className,u=e.component,c=void 0===u?"div":u,f=e.disableGutters,l=void 0!==f&&f,h=e.variant,d=void 0===h?"regular":h,p=Object(i.a)(e,["classes","className","component","disableGutters","variant"]);return a.createElement(c,Object(n.a)({className:Object(s.a)(r.root,r[d],o,!l&&r.gutters),ref:t},p))}));t.a=Object(u.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(o.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(c)},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(19),u=r(59),c=r(314),f=r(31),l=o.forwardRef((function(e,t){var r=e.edge,s=void 0!==r&&r,u=e.children,l=e.classes,h=e.className,d=e.color,p=void 0===d?"default":d,v=e.disabled,y=void 0!==v&&v,b=e.disableFocusRipple,g=void 0!==b&&b,m=e.size,w=void 0===m?"medium":m,k=Object(i.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return o.createElement(c.a,Object(n.a)({className:Object(a.a)(l.root,h,"default"!==p&&l["color".concat(Object(f.a)(p))],y&&l.disabled,"small"===w&&l["size".concat(Object(f.a)(w))],{start:l.edgeStart,end:l.edgeEnd}[s]),centerRipple:!0,focusRipple:!g,disabled:y,ref:t},k),o.createElement("span",{className:l.label},u))}));t.a=Object(s.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(u.b)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(l)},function(e,t,r){"use strict";t.a={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"}},function(e,t,r){"use strict";var n=r(4),i=r(12),o=r(1),a=(r(24),r(16)),s=r(521),u=r(73),c=r(19),f=r(146),l=r(31),h=o.forwardRef((function(e,t){e.children;var r=e.classes,s=e.className,c=e.label,h=e.labelWidth,d=e.notched,p=e.style,v=Object(i.a)(e,["children","classes","className","label","labelWidth","notched","style"]),y="rtl"===Object(f.a)().direction?"right":"left";if(void 0!==c)return o.createElement("fieldset",Object(n.a)({"aria-hidden":!0,className:Object(a.a)(r.root,s),ref:t,style:p},v),o.createElement("legend",{className:Object(a.a)(r.legendLabelled,d&&r.legendNotched)},c?o.createElement("span",null,c):o.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})));var b=h>0?.75*h+8:.01;return o.createElement("fieldset",Object(n.a)({"aria-hidden":!0,style:Object(n.a)(Object(u.a)({},"padding".concat(Object(l.a)(y)),8),p),className:Object(a.a)(r.root,s),ref:t},v),o.createElement("legend",{className:r.legend,style:{width:d?b:.01}},o.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))})),d=Object(c.a)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(h),p=o.forwardRef((function(e,t){var r=e.classes,u=e.fullWidth,c=void 0!==u&&u,f=e.inputComponent,l=void 0===f?"input":f,h=e.label,p=e.labelWidth,v=void 0===p?0:p,y=e.multiline,b=void 0!==y&&y,g=e.notched,m=e.type,w=void 0===m?"text":m,k=Object(i.a)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return o.createElement(s.a,Object(n.a)({renderSuffix:function(e){return o.createElement(d,{className:r.notchedOutline,label:h,labelWidth:v,notched:"undefined"!==typeof g?g:Boolean(e.startAdornment||e.filled||e.focused)})},classes:Object(n.a)({},r,{root:Object(a.a)(r.root,r.underline),notchedOutline:null}),fullWidth:c,inputComponent:l,multiline:b,ref:t,type:w},k))}));p.muiName="Input";t.a=Object(c.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(p)}]]);
//# sourceMappingURL=2.ad16d0c5.chunk.js.map